Skip to content

Commit 93e9f24

Browse files
committed
new file: assets/diag_watch.png
modified: ufade_gui.py
1 parent f9418de commit 93e9f24

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

assets/diag_watch.png

15.5 KB
Loading

ufade_gui.py

+19-5
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,13 @@ def show_watch_menu(self):
211211
ctk.CTkButton(self.dynamic_frame, text="Save device info", command=lambda: self.switch_menu("DevInfo"), width=200, height=70, font=self.stfont),
212212
ctk.CTkButton(self.dynamic_frame, text="Collect Unified Logs", command=lambda: self.switch_menu("CollectUL"), width=200, height=70, font=self.stfont),
213213
ctk.CTkButton(self.dynamic_frame, text="Extract crash reports", command=lambda: self.switch_menu("CrashReport"), width=200, height=70, font=self.stfont),
214+
ctk.CTkButton(self.dynamic_frame, text="Initiate Sysdiagnose", command=lambda: self.switch_menu("SysDiag"), width=200, height=70, font=self.stfont),
214215
ctk.CTkButton(self.dynamic_frame, text="Extract AFC Media files", command=lambda: self.switch_menu("Media"), width=200, height=70, font=self.stfont),
215216
]
216217
self.menu_text = ["Save informations about the device, installed apps,\nSIM and companion devices.",
217218
"Collects the AUL from the device and saves\nthem as a logarchive.",
218219
"Pull the crash report folder from the device.",
220+
"Create a Sysdiagnose archive on the device and\npull it to the disk afterwards.",
219221
"Pull the \"Media\"-folder from the device\n(pictures, videos, recordings)"]
220222
self.menu_textbox = []
221223
for btn in self.menu_buttons:
@@ -534,20 +536,32 @@ def show_sysdiag(self):
534536
if self.choose.get() == True:
535537
self.yesb.pack_forget()
536538
self.nob.pack_forget()
537-
self.text.pack_forget()
538-
self.text.configure(text="To trigger the creation of the Sysdiagnose files,\npress: Power/Side + VolUp + VolDown for 0.215 seconds.")
539+
self.text.pack_forget()
540+
if d_class == "Watch":
541+
self.text.configure(text="To trigger the creation of the Sysdiagnose files,\npress: Power/Side + Digital Crown for 0.215 seconds.")
542+
else:
543+
self.text.configure(text="To trigger the creation of the Sysdiagnose files,\npress: Power/Side + VolUp + VolDown for 0.215 seconds.")
539544
self.text.pack(pady=10)
540-
self.diag_image = ctk.CTkImage(dark_image=Image.open(os.path.join(os.path.dirname(__file__), "assets" , "diag.png")), size=(600, 300))
545+
if d_class == "Watch":
546+
self.diag_image = ctk.CTkImage(dark_image=Image.open(os.path.join(os.path.dirname(__file__), "assets" , "diag_watch.png")), size=(600, 300))
547+
else:
548+
self.diag_image = ctk.CTkImage(dark_image=Image.open(os.path.join(os.path.dirname(__file__), "assets" , "diag.png")), size=(600, 300))
541549
self.diaglabel = ctk.CTkLabel(self.dynamic_frame, image=self.diag_image, text=" ", width=600, height=300, fg_color="transparent", font=self.stfont, anchor="w", justify="left")
542550
self.diaglabel.pack()
543551
self.progress = ctk.CTkProgressBar(self.dynamic_frame, width=585, height=30, corner_radius=0, mode="indeterminate", indeterminate_speed=0.5)
544552
self.waitsys = ctk.IntVar(self, 0)
545553
self.diag = threading.Thread(target=lambda: self.sysdiag(self.text, self.progress, self.waitsys))
546554
self.diag.start()
547555
self.wait_variable(self.waitsys)
548-
ctk.CTkButton(self.dynamic_frame, text="OK", font=self.stfont, command=lambda: self.switch_menu("AdvMenu")).pack(pady=10)
556+
if d_class == "Watch":
557+
ctk.CTkButton(self.dynamic_frame, text="OK", font=self.stfont, command=self.show_watch_menu).pack(pady=10)
558+
else:
559+
ctk.CTkButton(self.dynamic_frame, text="OK", font=self.stfont, command=lambda: self.switch_menu("AdvMenu")).pack(pady=10)
549560
else:
550-
self.switch_menu("AdvMenu")
561+
if d_class == "Watch":
562+
self.show_watch_menu()
563+
else:
564+
self.switch_menu("AdvMenu")
551565

552566
def sysdiag(self, text, progress, waitsys):
553567
self.abort = ctk.CTkButton(self.dynamic_frame, text="Abort", font=self.stfont, command=self.abort_diag)

0 commit comments

Comments
 (0)