[pitivi/ges: 244/287] mainwindow: Reorganize the tabs code in _createUi
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges: 244/287] mainwindow: Reorganize the tabs code in _createUi
- Date: Thu, 15 Mar 2012 16:46:21 +0000 (UTC)
commit af2fbc8e26d25fbefb93e3ab908e6aef587cd88d
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Thu Feb 2 14:38:45 2012 -0500
mainwindow: Reorganize the tabs code in _createUi
pitivi/mainwindow.py | 52 ++++++++++++++++++++++---------------------------
1 files changed, 23 insertions(+), 29 deletions(-)
---
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index ef0c7a2..6ebd5ab 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -367,10 +367,10 @@ class PitiviMainWindow(gtk.Window, Loggable):
self.add(vbox)
vbox.show()
self.menu = self.uimanager.get_widget("/MainMenuBar")
- vbox.pack_start(self.menu, expand=False)
- self.menu.show()
self.toolbar = self.uimanager.get_widget("/MainToolBar")
+ vbox.pack_start(self.menu, expand=False)
vbox.pack_start(self.toolbar, expand=False)
+ self.menu.show()
self.toolbar.show()
# timeline and project tabs
vpaned = gtk.VPaned()
@@ -390,41 +390,30 @@ class PitiviMainWindow(gtk.Window, Loggable):
self.secondhpaned.show()
self.mainhpaned.show()
- self.projecttabs = BaseTabs(instance)
-
+ # First set of tabs
+ self.main_tabs = BaseTabs(instance)
self.medialibrary = MediaLibraryWidget(instance, self.uimanager)
- self.projecttabs.append_page(self.medialibrary, gtk.Label(_("Media Library")))
- self._connectToMediaLibrary()
- self.medialibrary.show()
-
self.effectlist = EffectListWidget(instance, self.uimanager)
- self.projecttabs.append_page(self.effectlist, gtk.Label(_("Effect Library")))
+ self.main_tabs.append_page(self.medialibrary, gtk.Label(_("Media Library")))
+ self.main_tabs.append_page(self.effectlist, gtk.Label(_("Effect Library")))
+ self.medialibrary.connect('play', self._mediaLibraryPlayCb)
+ self.medialibrary.show()
self.effectlist.show()
- self.secondhpaned.pack1(self.projecttabs, resize=True, shrink=False)
- self.projecttabs.show()
+ self.secondhpaned.pack1(self.main_tabs, resize=True, shrink=False)
+ self.main_tabs.show()
- # Actions with key accelerators that will be made unsensitive while
- # a gtk entry box is used to avoid conflicts.
- self.sensitive_actions = []
- for action in self.timeline_ui.playhead_actions:
- self.sensitive_actions.append(action[0])
- for action in self.toggleactions:
- self.sensitive_actions.append(action[0])
-
- #Clips properties
- self.propertiestabs = BaseTabs(instance, True)
+ # Second set of tabs
+ self.context_tabs = BaseTabs(instance, True)
self.clipconfig = ClipProperties(instance, self.uimanager)
- self.propertiestabs.append_page(self.clipconfig,
- gtk.Label(_("Clip configuration")))
+ self.context_tabs.append_page(self.clipconfig, gtk.Label(_("Clip configuration")))
self.clipconfig.show()
- self.secondhpaned.pack2(self.propertiestabs, resize=True, shrink=False)
- self.propertiestabs.show()
+ self.secondhpaned.pack2(self.context_tabs, resize=True, shrink=False)
+ self.context_tabs.show()
# Viewer
self.viewer = PitiviViewer(instance, undock_action=self.undock_action)
- # drag and drop
self.viewer.drag_dest_set(gtk.DEST_DEFAULT_DROP | gtk.DEST_DEFAULT_MOTION,
[FILESOURCE_TUPLE, URI_TUPLE],
gtk.gdk.ACTION_COPY)
@@ -465,6 +454,14 @@ class PitiviMainWindow(gtk.Window, Loggable):
if not self.settings.mainWindowShowTimelineToolbar:
ttb.props.visible = False
+ # Actions with key accelerators that will be made unsensitive while
+ # a gtk entry box is used to avoid conflicts.
+ self.sensitive_actions = []
+ for action in self.timeline_ui.playhead_actions:
+ self.sensitive_actions.append(action[0])
+ for action in self.toggleactions:
+ self.sensitive_actions.append(action[0])
+
#application icon
self.set_icon_name("pitivi")
@@ -472,9 +469,6 @@ class PitiviMainWindow(gtk.Window, Loggable):
os.environ["PULSE_PROP_media.role"] = "production"
os.environ["PULSE_PROP_application.icon_name"] = "pitivi"
- def _connectToMediaLibrary(self):
- self.medialibrary.connect('play', self._mediaLibraryPlayCb)
-
def setFullScreen(self, fullscreen):
""" Toggle the fullscreen mode of the application """
if fullscreen:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]