[pitivi] clipmediaprops: Set instance attributes in __init__



commit ee7ad7ceca756dd6ab1a3f197c0cff6f95351582
Author: Mathieu Duponchelle <mduponchelle1 gmail com>
Date:   Thu Dec 26 15:29:36 2013 +0100

    clipmediaprops: Set instance attributes in __init__

 pitivi/dialogs/clipmediaprops.py |   47 +++++++++++++++++--------------------
 1 files changed, 22 insertions(+), 25 deletions(-)
---
diff --git a/pitivi/dialogs/clipmediaprops.py b/pitivi/dialogs/clipmediaprops.py
index 155ef8a..116b5df 100644
--- a/pitivi/dialogs/clipmediaprops.py
+++ b/pitivi/dialogs/clipmediaprops.py
@@ -43,7 +43,28 @@ class ClipMediaPropsDialog():
         self.audio_streams = audio_streams
         self.video_streams = video_streams
         self.has_audio = self.has_video = self.is_image = False
-        self._createUi()
+
+        builder = Gtk.Builder()
+        builder.add_from_file(os.path.join(get_ui_dir(), "clipmediaprops.ui"))
+        builder.connect_signals(self)
+        self.dialog = builder.get_object("Import Settings")
+        self.channels = builder.get_object("channels")
+        self.size_height = builder.get_object("size_height")
+        self.size_width = builder.get_object("size_width")
+        self.frame_rate = builder.get_object("frame_rate")
+        self.aspect_ratio = builder.get_object("aspect_ratio")
+        self.sample_rate = builder.get_object("sample_rate")
+        self.frame1 = builder.get_object("frame1")
+        self.frame2 = builder.get_object("frame2")
+        self.hbox2 = builder.get_object("hbox2")
+        self.hbox3 = builder.get_object("hbox3")
+        self.label2 = builder.get_object("label2")
+        self.checkbutton1 = builder.get_object("checkbutton1")
+        self.checkbutton2 = builder.get_object("checkbutton2")
+        self.checkbutton3 = builder.get_object("checkbutton3")
+        self.checkbutton4 = builder.get_object("checkbutton4")
+        self.checkbutton5 = builder.get_object("checkbutton5")
+        self.checkbutton6 = builder.get_object("checkbutton6")
 
     def run(self):
         """Set up widgets and run the dialog"""
@@ -85,30 +106,6 @@ class ClipMediaPropsDialog():
             self.label2.set_markup("<b>" + _("Image:") + "</b>")
         self.dialog.run()
 
-    def _createUi(self):
-        """Create the Gtk builder"""
-        builder = Gtk.Builder()
-        builder.add_from_file(os.path.join(get_ui_dir(), "clipmediaprops.ui"))
-        builder.connect_signals(self)
-        self.dialog = builder.get_object("Import Settings")
-        self.channels = builder.get_object("channels")
-        self.size_height = builder.get_object("size_height")
-        self.size_width = builder.get_object("size_width")
-        self.frame_rate = builder.get_object("frame_rate")
-        self.aspect_ratio = builder.get_object("aspect_ratio")
-        self.sample_rate = builder.get_object("sample_rate")
-        self.frame1 = builder.get_object("frame1")
-        self.frame2 = builder.get_object("frame2")
-        self.hbox2 = builder.get_object("hbox2")
-        self.hbox3 = builder.get_object("hbox3")
-        self.label2 = builder.get_object("label2")
-        self.checkbutton1 = builder.get_object("checkbutton1")
-        self.checkbutton2 = builder.get_object("checkbutton2")
-        self.checkbutton3 = builder.get_object("checkbutton3")
-        self.checkbutton4 = builder.get_object("checkbutton4")
-        self.checkbutton5 = builder.get_object("checkbutton5")
-        self.checkbutton6 = builder.get_object("checkbutton6")
-
     def _applyButtonCb(self, unused_button):
         """Apply widget values to the project"""
         project = self.project


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