[pitivi/ges] tabsmanager: Remove broken/crack code
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges] tabsmanager: Remove broken/crack code
- Date: Tue, 1 May 2012 21:37:06 +0000 (UTC)
commit 61dc4685fa6f69a7b12ce31c9f0fda5690a714c6
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Tue May 1 17:33:09 2012 -0400
tabsmanager: Remove broken/crack code
This code prevented being able to detach tabs from the
second hpane (such as clip properties and transitions).
pitivi/mainwindow.py | 2 +-
pitivi/tabsmanager.py | 27 ++-------------------------
2 files changed, 3 insertions(+), 26 deletions(-)
---
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index dbf6355..ddfe0f5 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -413,7 +413,7 @@ class PitiviMainWindow(gtk.Window, Loggable):
self.main_tabs.show()
# Second set of tabs
- self.context_tabs = BaseTabs(instance, True)
+ self.context_tabs = BaseTabs(instance)
self.clipconfig = ClipProperties(instance, self.uimanager)
self.context_tabs.append_page(self.clipconfig, gtk.Label(_("Clip configuration")))
self.clipconfig.show()
diff --git a/pitivi/tabsmanager.py b/pitivi/tabsmanager.py
index 08dac3b..01818c4 100644
--- a/pitivi/tabsmanager.py
+++ b/pitivi/tabsmanager.py
@@ -24,13 +24,12 @@ from pitivi.utils.ui import SPACING
class BaseTabs(gtk.Notebook):
- def __init__(self, app, hide_hpaned=False):
+ def __init__(self, app):
""" initialize """
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()
@@ -62,9 +61,6 @@ class BaseTabs(gtk.Notebook):
self._set_child_properties(child, label)
self.child_set_property(child, "detachable", True)
- if self._hide_hpaned:
- self._showSecondHpanedInMainWindow()
-
def _createWindowCb(self, from_notebook, child, x, y):
original_position = self.child_get_property(child, "position")
label = self.child_get_property(child, "tab-label")
@@ -74,7 +70,7 @@ class BaseTabs(gtk.Notebook):
window.set_title(label)
window.set_default_size(600, 400)
window.connect("destroy", self._detachedComponentWindowDestroyCb,
- child, original_position, label)
+ child, original_position, label)
notebook = gtk.Notebook()
notebook.props.show_tabs = False
window.add(notebook)
@@ -83,23 +79,4 @@ class BaseTabs(gtk.Notebook):
# 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.mainhpaned.remove(self.app.gui.secondhpaned)
- self.app.gui.secondhpaned.remove(self.app.gui.projecttabs)
- self.app.gui.secondhpaned.remove(self.app.gui.propertiestabs)
- self.app.gui.mainhpaned.pack1(self.app.gui.projecttabs, resize=True,
- shrink=False)
-
- def _showSecondHpanedInMainWindow(self):
- self.app.gui.mainhpaned.remove(self.app.gui.projecttabs)
- self.app.gui.secondhpaned.pack1(self.app.gui.projecttabs,
- resize=True, shrink=False)
- self.app.gui.secondhpaned.pack2(self.app.gui.propertiestabs,
- resize=True, shrink=False)
- self.app.gui.mainhpaned.pack1(self.app.gui.secondhpaned,
- resize=True, shrink=False)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]