From 6c7d5e0b0a60bfccd67080d4b74ed3362c6f29c1 Mon Sep 17 00:00:00 2001 From: MrS0m30n3 Date: Fri, 4 Apr 2014 19:18:47 +0300 Subject: [PATCH] Change reset function Options>General --- youtube_dl_gui/YoutubeDLGUI.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/youtube_dl_gui/YoutubeDLGUI.py b/youtube_dl_gui/YoutubeDLGUI.py index 0ba9b43..dbdbd65 100644 --- a/youtube_dl_gui/YoutubeDLGUI.py +++ b/youtube_dl_gui/YoutubeDLGUI.py @@ -979,11 +979,11 @@ class SubtitlesPanel(wx.Panel): class GeneralPanel(wx.Panel): - def __init__(self, parent, optList, controlParent): + def __init__(self, parent, optList, resetHandler): wx.Panel.__init__(self, parent) self.optList = optList - self.parent = controlParent + self.resetHandler = resetHandler mainBoxSizer = wx.BoxSizer(wx.VERTICAL) svTextBox = wx.BoxSizer(wx.HORIZONTAL) @@ -1016,7 +1016,7 @@ class GeneralPanel(wx.Panel): self.Bind(wx.EVT_BUTTON, self.OnReset, self.resetButton) def OnReset(self, event): - self.parent.reset() + self.resetHandler() def OnOpen(self, event): dlg = wx.DirDialog(None, "Choose directory") @@ -1105,7 +1105,7 @@ class OptionsFrame(wx.Frame): panel = wx.Panel(self) notebook = wx.Notebook(panel) - self.generalTab = GeneralPanel(notebook, self.optionsList, self) + self.generalTab = GeneralPanel(notebook, self.optionsList, self.reset) self.audioTab = AudioPanel(notebook, self.optionsList) self.connectionTab = ConnectionPanel(notebook, self.optionsList) self.videoTab = VideoPanel(notebook, self.optionsList)