Skip to content

Commit 1520f4b

Browse files
committed
Added _get_opt and _get_input methods to CXFreezeEngine class
1 parent de01351 commit 1520f4b

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

ENGINES/cx_freeze/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,20 @@ def create_tab(self, gui):
226226
pass
227227
return None
228228

229+
def _get_opt(self, name: str):
230+
"""Get option widget from engine instance or GUI."""
231+
# Try engine instance first (dynamic tabs)
232+
if hasattr(self, f"_cx_{name}"):
233+
return getattr(self, f"_cx_{name}")
234+
# Fallback to GUI widget (static UI)
235+
return getattr(self._gui, name, None) if hasattr(self, "_gui") else None
236+
237+
def _get_input(self, name: str):
238+
"""Get input widget from engine instance or GUI."""
239+
if hasattr(self, f"_cx_{name}"):
240+
return getattr(self, f"_cx_{name}")
241+
return getattr(self._gui, name, None) if hasattr(self, "_gui") else None
242+
229243
def _get_btn(self, name: str):
230244
"""Get button widget from engine instance or GUI."""
231245
if hasattr(self, f"_cx_btn_{name}"):

0 commit comments

Comments
 (0)