[pitivi] viewer: Separate the undock callback



commit bb3e667eeccfcc6e1548d99884add44caa99d891
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Mon Jan 14 20:32:12 2019 +0100

    viewer: Separate the undock callback

 pitivi/viewer/viewer.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/viewer/viewer.py b/pitivi/viewer/viewer.py
index ae32d552..35a8f517 100644
--- a/pitivi/viewer/viewer.py
+++ b/pitivi/viewer/viewer.py
@@ -280,7 +280,7 @@ class ViewerContainer(Gtk.Box, Loggable):
 
         self.undock_button = Gtk.ToolButton()
         self.undock_button.set_icon_name("view-restore")
-        self.undock_button.connect("clicked", self.undock)
+        self.undock_button.connect("clicked", self.undock_cb)
         self.undock_button.set_tooltip_text(
             _("Detach the viewer\nYou can re-attach it by closing the newly created window."))
         bbox.pack_start(self.undock_button, False, False, 0)
@@ -393,9 +393,12 @@ class ViewerContainer(Gtk.Box, Loggable):
         self.app.gui.editor.timeline_ui.timeline.scrollToPlayhead(
             align=Gtk.Align.CENTER, when_not_in_view=True)
 
+    def undock_cb(self, unused_widget):
+        self.undock()
+
     # Public methods for controlling playback
 
-    def undock(self, *unused_widget):
+    def undock(self):
         if not self.docked:
             self.warning("The viewer is already undocked")
             return


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]