Browse Source

Refactor OptionsFrame.py

Rename all <Name>Panel to <Name>Tab
e.g. AudioPanel -> AudioTab

Now every Tab inherits from TabPanel class

TabPanel class contains all the methods to
create widgets, disable them, set the sizers etc

Moved almost all magic literals
(strings, numbers, etc) to class level

OtherTab:
	Renamed to CMDTab

OutputTab:
	Change output format pick from
	checkbox to radiobutton
doc-issue-template
MrS0m30n3 10 years ago
parent
commit
73ef2ce2a5
2 changed files with 717 additions and 539 deletions
  1. 14
      youtube_dl_gui/MainFrame.py
  2. 1242
      youtube_dl_gui/OptionsFrame.py

14
youtube_dl_gui/MainFrame.py

@ -81,11 +81,11 @@ class MainFrame(wx.Frame):
self.log_manager = log_manager
self.download_manager = None
self.update_thread = None
app_icon = get_icon_path()
self.app_icon = get_icon_path()
# Set app icon
if app_icon is not None:
self.SetIcon(wx.Icon(app_icon, wx.BITMAP_TYPE_PNG))
if self.app_icon is not None:
self.app_icon = wx.Icon(self.app_icon, wx.BITMAP_TYPE_PNG)
self.SetIcon(self.app_icon)
# Create components
self._panel = wx.Panel(self)
@ -311,11 +311,7 @@ class MainFrame(wx.Frame):
def _on_options(self, event):
''' Event handler method for self._options_btn. '''
options_frame = OptionsFrame(
self.opt_manager,
parent=self,
logger=self.log_manager
)
options_frame = OptionsFrame(self)
options_frame.Show()
def _on_close(self, event):

1242
youtube_dl_gui/OptionsFrame.py
File diff suppressed because it is too large
View File

Loading…
Cancel
Save