Browse Source

Restore load_all_options() before optionsframe Show()

doc-issue-template
MrS0m30n3 10 years ago
parent
commit
f5137e95e9
2 changed files with 5 additions and 0 deletions
  1. 1
      youtube_dl_gui/mainframe.py
  2. 4
      youtube_dl_gui/optionsframe.py

1
youtube_dl_gui/mainframe.py

@ -311,6 +311,7 @@ class MainFrame(wx.Frame):
def _on_options(self, event): def _on_options(self, event):
''' Event handler method for self._options_btn. ''' ''' Event handler method for self._options_btn. '''
self._options_frame.load_all_options()
self._options_frame.Show() self._options_frame.Show()
def _on_close(self, event): def _on_close(self, event):

4
youtube_dl_gui/optionsframe.py

@ -378,6 +378,9 @@ class LogTab(TabPanel):
return 0 return 0
return self.log_manager.log_size() return self.log_manager.log_size()
def _set_logsize(self):
self.log_size.SetLabel(self.LOGSIZE_LABEL.format(self._get_logsize()))
def _on_time(self, event): def _on_time(self, event):
''' Event handler for self.time_checkbox. ''' ''' Event handler for self.time_checkbox. '''
self.log_manager.add_time = self.time_checkbox.GetValue() self.log_manager.add_time = self.time_checkbox.GetValue()
@ -403,6 +406,7 @@ class LogTab(TabPanel):
''' Load panel options from OptionsHandler object. ''' ''' Load panel options from OptionsHandler object. '''
self.enable_checkbox.SetValue(self.opt_manager.options['enable_log']) self.enable_checkbox.SetValue(self.opt_manager.options['enable_log'])
self.time_checkbox.SetValue(self.opt_manager.options['log_time']) self.time_checkbox.SetValue(self.opt_manager.options['log_time'])
self._set_logsize()
def save_options(self): def save_options(self):
''' Save panel options to OptionsHandler object. ''' ''' Save panel options to OptionsHandler object. '''

Loading…
Cancel
Save