Skip to content

Commit 1170d37

Browse files
authored
Merge 7a48069 into af74ed7
2 parents af74ed7 + 7a48069 commit 1170d37

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed
1.61 MB
Binary file not shown.

menus.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66
from copy import deepcopy
77

88
from dataclasses import dataclass
9+
import os
910
import tkinter as tk
1011
from tkinter import messagebox, filedialog, ttk
1112
import json
13+
import subprocess
14+
import platform
1215
from typing import Callable
1316
import serial.tools.list_ports # type: ignore
1417

@@ -551,8 +554,13 @@ def confirm_selection():
551554

552555
def open_documentation(self):
553556
"""Handler for the 'Documentation' menu item."""
554-
print("Open Documentation")
555-
messagebox.showinfo("Documentation", "Documentation not available yet.")
557+
file_path = os.path.join(os.path.dirname(__file__), "Assets", "ArduinoLogique_Document_utilisateur.pdf")
558+
if platform.system() == "Windows":
559+
subprocess.Popen(["start", file_path], shell=True)
560+
elif platform.system() == "Darwin": # macOS
561+
subprocess.Popen(["open", file_path])
562+
else: # Linux and other Unix-like systems
563+
subprocess.Popen(["xdg-open", file_path])
556564

557565
def about(self):
558566
"""Handler for the 'About' menu item."""

0 commit comments

Comments
 (0)