Skip to content

Commit 46bb418

Browse files
authored
Merge 31c29a0 into af74ed7
2 parents af74ed7 + 31c29a0 commit 46bb418

File tree

2 files changed

+9
-2
lines changed

2 files changed

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

menus.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import tkinter as tk
1010
from tkinter import messagebox, filedialog, ttk
1111
import json
12+
import subprocess
13+
import platform
1214
from typing import Callable
1315
import serial.tools.list_ports # type: ignore
1416

@@ -551,8 +553,13 @@ def confirm_selection():
551553

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

557564
def about(self):
558565
"""Handler for the 'About' menu item."""

0 commit comments

Comments
 (0)