Skip to content

Commit 44ae8cf

Browse files
committed
Updated UI code to reflect changes in PyCompilerARKGui class
1 parent 84fad57 commit 44ae8cf

3 files changed

Lines changed: 37 additions & 158 deletions

File tree

Core/MainWindow.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,14 +1511,18 @@ def _set(attr: str, key: str, method: str = "setText"):
15111511
# Logs
15121512
_set("label_logs_section", "label_logs_section")
15131513

1514-
# Tabs
1514+
# Tabs - only try if compiler_tabs exists and has tabs
15151515
try:
1516-
val0 = tr.get("tab_pyinstaller")
1517-
if val0:
1518-
self.compiler_tabs.setTabText(0, val0)
1519-
val1 = tr.get("tab_nuitka")
1520-
if val1:
1521-
self.compiler_tabs.setTabText(1, val1)
1516+
if hasattr(self, "compiler_tabs") and self.compiler_tabs:
1517+
tab_count = self.compiler_tabs.count()
1518+
if tab_count > 0:
1519+
val0 = tr.get("tab_pyinstaller")
1520+
if val0:
1521+
self.compiler_tabs.setTabText(0, val0)
1522+
if tab_count > 1:
1523+
val1 = tr.get("tab_nuitka")
1524+
if val1:
1525+
self.compiler_tabs.setTabText(1, val1)
15221526
except Exception:
15231527
pass
15241528

Core/init_ui.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,6 @@ def init_ui(self):
265265
pass
266266
# Static button widgets are no longer used - buttons are now in dynamic tabs
267267
self.btn_select_icon = None
268-
# Find select_theme widget if it exists in the UI
269-
self.select_theme = self.ui.findChild(QPushButton, "select_theme")
270268
# Static checkbox widgets are no longer used - options are now in dynamic tabs
271269
self.opt_onefile = None
272270
self.opt_windowed = None
@@ -363,6 +361,14 @@ def init_ui(self):
363361
except Exception:
364362
pass
365363

364+
# Find select_theme widget if it exists in the UI and connect it
365+
self.select_theme = self.ui.findChild(QPushButton, "select_theme")
366+
if getattr(self, "select_theme", None):
367+
try:
368+
self.select_theme.clicked.connect(lambda: show_theme_dialog(self))
369+
except Exception:
370+
pass
371+
366372
# Désactivation croisée des options selon le moteur actif
367373
import platform
368374

ui/ui_design.ui

Lines changed: 18 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ui version="4.0">
3-
<class>PyInstallerGUI</class>
4-
<widget class="QWidget" name="PyInstallerGUI">
3+
<class>PyCompilerARKGui</class>
4+
<widget class="QWidget" name="PyCompilerARKGui">
55
<property name="geometry">
66
<rect>
77
<x>0</x>
@@ -143,7 +143,7 @@
143143
</layout>
144144
</widget>
145145
</item>
146-
<item>
146+
<item>
147147
<widget class="QFrame" name="frame_tools">
148148
<property name="frameShape">
149149
<enum>QFrame::Shape::StyledPanel</enum>
@@ -172,15 +172,26 @@
172172
<item>
173173
<widget class="QPushButton" name="btn_api_loader">
174174
<property name="text">
175-
<string>🧩 Bc Plugins Loader </string>
175+
<string>🧩 Bc Plugins Loader</string>
176176
</property>
177177
<property name="toolTip">
178178
<string>Charger BCASL Loader</string>
179179
</property>
180180
</widget>
181181
</item>
182182
<item>
183-
</item>
183+
<spacer name="toolsSpacer">
184+
<property name="orientation">
185+
<enum>Qt::Orientation::Vertical</enum>
186+
</property>
187+
<property name="sizeHint" stdset="0">
188+
<size>
189+
<width>20</width>
190+
<height>10</height>
191+
</size>
192+
</property>
193+
</spacer>
194+
</item>
184195
<item>
185196
<widget class="QPushButton" name="btn_show_stats">
186197
<property name="text">
@@ -384,149 +395,6 @@
384395
<property name="currentIndex">
385396
<number>0</number>
386397
</property>
387-
<widget class="QWidget" name="tab_pyinstaller">
388-
<attribute name="title">
389-
<string>PyInstaller</string>
390-
</attribute>
391-
<layout class="QVBoxLayout" name="pyinstaller_options_layout">
392-
<property name="spacing">
393-
<number>10</number>
394-
</property>
395-
<item>
396-
<widget class="QCheckBox" name="opt_onefile">
397-
<property name="text">
398-
<string>Onefile</string>
399-
</property>
400-
</widget>
401-
</item>
402-
<item>
403-
<widget class="QCheckBox" name="opt_windowed">
404-
<property name="text">
405-
<string>Windowed</string>
406-
</property>
407-
</widget>
408-
</item>
409-
<item>
410-
<widget class="QCheckBox" name="opt_noconfirm">
411-
<property name="text">
412-
<string>Noconfirm</string>
413-
</property>
414-
</widget>
415-
</item>
416-
<item>
417-
<widget class="QCheckBox" name="opt_clean">
418-
<property name="text">
419-
<string>Clean</string>
420-
</property>
421-
</widget>
422-
</item>
423-
<item>
424-
<widget class="QCheckBox" name="opt_noupx">
425-
<property name="text">
426-
<string>No UPX</string>
427-
</property>
428-
</widget>
429-
</item>
430-
<item>
431-
<widget class="QCheckBox" name="opt_main_only">
432-
<property name="text">
433-
<string>Compiler uniquement main.py ou app.py</string>
434-
</property>
435-
</widget>
436-
</item>
437-
<item>
438-
<widget class="QPushButton" name="btn_select_icon">
439-
<property name="text">
440-
<string>🎨 Choisir une icône (.ico)</string>
441-
</property>
442-
</widget>
443-
</item>
444-
<item>
445-
<widget class="QCheckBox" name="opt_debug">
446-
<property name="text">
447-
<string>Mode debug (--debug)</string>
448-
</property>
449-
</widget>
450-
</item>
451-
<item>
452-
<widget class="QPushButton" name="pyinstaller_add_data">
453-
<property name="text">
454-
<string>add_data</string>
455-
</property>
456-
</widget>
457-
</item>
458-
<item>
459-
<layout class="QHBoxLayout" name="outputDirLayout">
460-
<item>
461-
<widget class="QLineEdit" name="output_dir_input">
462-
<property name="placeholderText">
463-
<string>Dossier de sortie (--distpath). Laisser vide pour ./dist</string>
464-
</property>
465-
</widget>
466-
</item>
467-
</layout>
468-
</item>
469-
</layout>
470-
</widget>
471-
<widget class="QWidget" name="tab_nuitka">
472-
<attribute name="title">
473-
<string>Nuitka</string>
474-
</attribute>
475-
<layout class="QVBoxLayout" name="nuitka_options_layout">
476-
<property name="spacing">
477-
<number>10</number>
478-
</property>
479-
<item>
480-
<widget class="QCheckBox" name="nuitka_onefile">
481-
<property name="text">
482-
<string>Onefile (--onefile)</string>
483-
</property>
484-
</widget>
485-
</item>
486-
<item>
487-
<widget class="QCheckBox" name="nuitka_standalone">
488-
<property name="text">
489-
<string>Standalone (--standalone)</string>
490-
</property>
491-
</widget>
492-
</item>
493-
<item>
494-
<widget class="QCheckBox" name="nuitka_disable_console">
495-
<property name="text">
496-
<string>Désactiver la console Windows (--windows-disable-console)</string>
497-
</property>
498-
</widget>
499-
</item>
500-
<item>
501-
<widget class="QCheckBox" name="nuitka_show_progress">
502-
<property name="text">
503-
<string>Afficher la progression (--show-progress)</string>
504-
</property>
505-
</widget>
506-
</item>
507-
<item>
508-
<widget class="QPushButton" name="nuitka_add_data">
509-
<property name="text">
510-
<string>add_data</string>
511-
</property>
512-
</widget>
513-
</item>
514-
<item>
515-
<widget class="QLineEdit" name="nuitka_output_dir">
516-
<property name="placeholderText">
517-
<string>Dossier de sortie (--output-dir)</string>
518-
</property>
519-
</widget>
520-
</item>
521-
<item>
522-
<widget class="QPushButton" name="btn_nuitka_icon">
523-
<property name="text">
524-
<string>🎨 Choisir une icône (.ico) Nuitka</string>
525-
</property>
526-
</widget>
527-
</item>
528-
</layout>
529-
</widget>
530398
</widget>
531399
</item>
532400
</layout>
@@ -598,4 +466,5 @@
598466
</widget>
599467
<resources/>
600468
<connections/>
601-
</ui>
469+
</ui>
470+

0 commit comments

Comments
 (0)