[pitivi] transitions: Remove unused parameters from the center tabs constructors



commit 0693deae7094d925f2e06484f2e1c0337c025df1
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Sun Mar 30 21:50:22 2014 +0200

    transitions: Remove unused parameters from the center tabs constructors

 pitivi/clipproperties.py |   43 ++++++++++++++++++++++---------------------
 pitivi/mainwindow.py     |    6 +++---
 pitivi/titleeditor.py    |    6 ++++--
 pitivi/transitions.py    |    6 ++++--
 4 files changed, 33 insertions(+), 28 deletions(-)
---
diff --git a/pitivi/clipproperties.py b/pitivi/clipproperties.py
index f234363..b9236d4 100644
--- a/pitivi/clipproperties.py
+++ b/pitivi/clipproperties.py
@@ -19,9 +19,6 @@
 # Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-"""
-Class handling the midle pane
-"""
 import os
 
 from gi.repository import Gtk
@@ -69,37 +66,41 @@ def compare_type(track, effect_type):
 class ClipProperties(Gtk.ScrolledWindow, Loggable):
     """
     Widget for configuring the selected clip.
+
+    @type app: L{Pitivi}
     """
 
-    def __init__(self, instance, uiman):
+    def __init__(self, app):
         Gtk.ScrolledWindow.__init__(self)
         Loggable.__init__(self)
-        self.app = instance
-        self.settings = instance.settings
+        self.app = app
+        self.settings = app.settings
         self._project = None
 
-        self.infobar_box = Gtk.VBox()
-        effects_properties_manager = EffectsPropertiesManager(instance)
-        self.effect_expander = EffectProperties(instance, effects_properties_manager, self)
-        self.effect_expander.set_vexpand(False)
-        # Transformation boxed DISABLED
-        #self.transformation_expander = TransformationProperties(instance, instance.action_log)
-        #self.transformation_expander.set_vexpand(False)
+        self.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
+
+        viewport = Gtk.Viewport()
+        viewport.show()
+        self.add(viewport)
 
         vbox = Gtk.VBox()
         vbox.set_spacing(SPACING)
+        vbox.show()
+        viewport.add(vbox)
+
+        self.infobar_box = Gtk.VBox()
+        self.infobar_box.show()
         vbox.pack_start(self.infobar_box, False, True, 0)
+
         # Transformation boxed DISABLED
+        #self.transformation_expander = TransformationProperties(instance, instance.action_log)
+        #self.transformation_expander.set_vexpand(False)
         #vbox.pack_start(self.transformation_expander, False, True, 0)
-        vbox.pack_start(self.effect_expander, True, True, 0)
 
-        viewport = Gtk.Viewport()
-        viewport.add(vbox)
-        self.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
-        self.add(viewport)
-        viewport.show()
-        vbox.show()
-        self.infobar_box.show()
+        effects_properties_manager = EffectsPropertiesManager(app)
+        self.effect_expander = EffectProperties(app, effects_properties_manager, self)
+        self.effect_expander.set_vexpand(False)
+        vbox.pack_start(self.effect_expander, True, True, 0)
 
     def _setProject(self, project):
         self._project = project
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index e5cb1ad..1e2bdde 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -270,9 +270,9 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
 
         # Second set of tabs
         self.context_tabs = BaseTabs(self.app)
-        self.clipconfig = ClipProperties(self.app, self.uimanager)
-        self.trans_list = TransitionsListWidget(self.app, self.uimanager)
-        self.title_editor = TitleEditor(self.app, self.uimanager)
+        self.clipconfig = ClipProperties(self.app)
+        self.trans_list = TransitionsListWidget(self.app)
+        self.title_editor = TitleEditor(self.app)
         self.context_tabs.append_page(self.clipconfig, Gtk.Label(label=_("Clip")))
         self.context_tabs.append_page(self.trans_list, Gtk.Label(label=_("Transition")))
         self.context_tabs.append_page(self.title_editor.widget, Gtk.Label(label=_("Title")))
diff --git a/pitivi/titleeditor.py b/pitivi/titleeditor.py
index bffc874..bea5a34 100644
--- a/pitivi/titleeditor.py
+++ b/pitivi/titleeditor.py
@@ -572,12 +572,14 @@ class InteractivePangoBuffer(PangoBuffer):
 class TitleEditor(Loggable):
     """
     Widget for configuring the selected title.
+
+    @type app: L{Pitivi}
     """
 
-    def __init__(self, instance, unused_uimap):
+    def __init__(self, app):
         Loggable.__init__(self)
         Signallable.__init__(self)
-        self.app = instance
+        self.app = app
         self.bt = {}
         self.settings = {}
         self.source = None
diff --git a/pitivi/transitions.py b/pitivi/transitions.py
index 358b6de..40a3385 100644
--- a/pitivi/transitions.py
+++ b/pitivi/transitions.py
@@ -43,14 +43,16 @@ from pitivi.utils.ui import SPACING, PADDING
 class TransitionsListWidget(Signallable, Gtk.VBox, Loggable):
     """
     Widget for configuring the selected transition.
+
+    @type app: L{Pitivi}
     """
 
-    def __init__(self, instance, unused_uiman):
+    def __init__(self, app):
         Gtk.VBox.__init__(self)
         Loggable.__init__(self)
         Signallable.__init__(self)
 
-        self.app = instance
+        self.app = app
         self.element = None
         self._pixdir = os.path.join(get_pixmap_dir(), "transitions")
         icon_theme = Gtk.IconTheme.get_default()


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