From 18c94cc68c0f8c26a1df4a029f7893c2d79abc7b Mon Sep 17 00:00:00 2001 From: MrS0m30n3 Date: Fri, 14 Oct 2016 21:25:54 +0300 Subject: [PATCH] OptionsFrame class: Bind event on reset button --- youtube_dl_gui/optionsframe.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/youtube_dl_gui/optionsframe.py b/youtube_dl_gui/optionsframe.py index 1b3e07b..48ca66e 100644 --- a/youtube_dl_gui/optionsframe.py +++ b/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()