[pitivi] widgets: Remove duplicate class



commit e09c2448493ece778698b377a2e0f257fe70c244
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Wed Apr 10 02:43:09 2019 +0200

    widgets: Remove duplicate class

 pitivi/utils/widgets.py | 82 -------------------------------------------------
 1 file changed, 82 deletions(-)
---
diff --git a/pitivi/utils/widgets.py b/pitivi/utils/widgets.py
index af2104c0..3d916f4e 100644
--- a/pitivi/utils/widgets.py
+++ b/pitivi/utils/widgets.py
@@ -1212,88 +1212,6 @@ class GstElementSettingsDialog(Loggable):
             widget.setWidgetToDefault()
 
 
-class BaseTabs(Gtk.Notebook):
-
-    def __init__(self, app, hide_hpaned=False):
-        Gtk.Notebook.__init__(self)
-        self.set_border_width(SPACING)
-
-        self.connect("create-window", self._createWindowCb)
-        self._hide_hpaned = hide_hpaned
-        self.app = app
-        self._createUi()
-
-    def _createUi(self):
-        """Sets up the GUI."""
-        settings = self.get_settings()
-        settings.props.gtk_dnd_drag_threshold = 1
-        self.set_tab_pos(Gtk.PositionType.TOP)
-
-    def append_page(self, child, label):
-        Gtk.Notebook.append_page(self, child, label)
-        self._set_child_properties(child, label)
-        child.show()
-        label.show()
-
-    def _set_child_properties(self, child, label):
-        self.child_set_property(child, "detachable", True)
-        self.child_set_property(child, "tab-expand", False)
-        self.child_set_property(child, "tab-fill", True)
-        label.props.xalign = 0.0
-
-    def _detachedComponentWindowDestroyCb(self, window, child,
-                                          original_position, label):
-        notebook = window.get_child()
-        position = notebook.child_get_property(child, "position")
-        notebook.remove_page(position)
-        label = Gtk.Label(label=label)
-        self.insert_page(child, label, original_position)
-        self._set_child_properties(child, label)
-        self.child_set_property(child, "detachable", True)
-
-        if self._hide_hpaned:
-            self._showSecondHpanedInMainWindow()
-
-    def _createWindowCb(self, unused_from_notebook, child, x, y):
-        original_position = self.child_get_property(child, "position")
-        label = self.child_get_property(child, "tab-label")
-        window = Gtk.Window()
-        window.set_type_hint(Gdk.WindowTypeHint.UTILITY)
-
-        window.set_title(label)
-        window.set_default_size(600, 400)
-        window.connect("destroy", self._detachedComponentWindowDestroyCb,
-                       child, original_position, label)
-        notebook = Gtk.Notebook()
-        notebook.props.show_tabs = False
-        window.add(notebook)
-
-        window.show_all()
-        # set_uposition is deprecated but what should I use instead?
-        window.set_uposition(x, y)
-
-        if self._hide_hpaned:
-            self._hideSecondHpanedInMainWindow()
-
-        return notebook
-
-    def _hideSecondHpanedInMainWindow(self):
-        self.app.gui.editor.mainhpaned.remove(self.app.gui.editor.secondhpaned)
-        self.app.gui.editor.secondhpaned.remove(self.app.gui.editor.projecttabs)
-        self.app.gui.editor.secondhpaned.remove(self.app.gui.editor.propertiestabs)
-        self.app.gui.editor.mainhpaned.pack1(self.app.gui.editor.projecttabs,
-                                             resize=True, shrink=False)
-
-    def _showSecondHpanedInMainWindow(self):
-        self.app.gui.editor.mainhpaned.remove(self.app.gui.editor.projecttabs)
-        self.app.gui.editor.secondhpaned.pack1(self.app.gui.editor.projecttabs,
-                                               resize=True, shrink=False)
-        self.app.gui.editor.secondhpaned.pack2(self.app.gui.editor.propertiestabs,
-                                               resize=True, shrink=False)
-        self.app.gui.editor.mainhpaned.pack1(self.app.gui.editor.secondhpaned,
-                                             resize=True, shrink=False)
-
-
 class ZoomBox(Gtk.Grid, Zoomable):
     """Container holding the widgets for zooming.
 


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