From 01146fab5b2f827c15e75d14df85aad8c8fa58b5 Mon Sep 17 00:00:00 2001 From: MrS0m30n3 Date: Sun, 16 Oct 2016 13:24:38 +0300 Subject: [PATCH] Re-enable paste events --- youtube_dl_gui/mainframe.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/youtube_dl_gui/mainframe.py b/youtube_dl_gui/mainframe.py index d852024..d2b86d2 100644 --- a/youtube_dl_gui/mainframe.py +++ b/youtube_dl_gui/mainframe.py @@ -707,9 +707,9 @@ class MainFrame(wx.Frame): else: textctrl = wx.TextCtrl(self._panel, style=style) - #if event_handler is not None: - #textctrl.Bind(wx.EVT_TEXT_PASTE, event_handler) - #textctrl.Bind(wx.EVT_MIDDLE_DOWN, event_handler) + if event_handler is not None: + textctrl.Bind(wx.EVT_TEXT_PASTE, event_handler) + textctrl.Bind(wx.EVT_MIDDLE_DOWN, event_handler) if os.name == 'nt': # Enable CTRL+A on Windows @@ -957,7 +957,6 @@ class MainFrame(wx.Frame): click of the mouse. """ - # REFACTOR Remove not used anymore if event.ClassName == self.wxEVT_TEXT_PASTE: self._paste_from_clipboard() else: @@ -965,9 +964,10 @@ class MainFrame(wx.Frame): self._paste_from_clipboard() wx.TheClipboard.UsePrimarySelection(False) + # REFACTOR Remove not used anymore # Dynamically add urls after download process has started - if self.download_manager is not None: - self._status_list.load_urls(self._get_urls(), self.download_manager.add_url) + #if self.download_manager is not None: + #self._status_list.load_urls(self._get_urls(), self.download_manager.add_url) def _on_download(self, event): """Event handler of the self._download_btn widget.