Browse Source

OptionsFrame class: Bind event on reset button

doc-issue-template
MrS0m30n3 8 years ago
parent
commit
18c94cc68c
1 changed files with 4 additions and 1 deletions
  1. 5
      youtube_dl_gui/optionsframe.py

5
youtube_dl_gui/optionsframe.py

@ -85,7 +85,7 @@ class OptionsFrame(wx.Frame):
for tab, label in self.tabs:
self.notebook.AddPage(tab, label)
# TODO Bind reset button
self.Bind(wx.EVT_BUTTON, self._on_reset, self.reset_button)
self.Bind(wx.EVT_BUTTON, self._on_close, self.close_button)
self.Bind(wx.EVT_CLOSE, self._on_close)
@ -115,6 +115,9 @@ class OptionsFrame(wx.Frame):
self.save_all_options()
self.Hide()
def _on_reset(self, event):
self.reset()
def reset(self):
"""Resets the default options. """
self.opt_manager.load_default()

Loading…
Cancel
Save