[pitivi] Use the reindent.py official python script



commit dbf5a5b3fa930c5136bee7bb2ed9efa590a784e5
Author: Thibault Saunier <thibault saunier collabora com>
Date:   Fri Jun 3 04:32:46 2011 -0400

    Use the reindent.py official python script

 pitivi/formatters/__init__.py    |    1 -
 pitivi/formatters/base.py        |    3 +-
 pitivi/timeline/timeline.py      |   16 +++++-----
 pitivi/ui/clipproperties.py      |    4 +-
 pitivi/ui/common.py              |    1 -
 pitivi/ui/dynamic.py             |    2 +-
 pitivi/ui/effectlist.py          |   60 +++++++++++++++++++-------------------
 pitivi/ui/encodingprogress.py    |    2 +-
 pitivi/ui/filechooserpreview.py  |    4 +-
 pitivi/ui/preset.py              |    1 -
 pitivi/ui/previewer.py           |    1 -
 pitivi/ui/ripple_update_group.py |    1 -
 tests/test_gap.py                |    2 -
 tests/test_pipeline.py           |    1 -
 tests/test_seeker.py             |    1 -
 tests/test_still_image.py        |    1 -
 tests/test_stream.py             |    1 -
 tests/test_timeline_factory.py   |    1 -
 tests/test_undo.py               |    9 ++---
 tests/test_utils.py              |    1 -
 tests/testcomplex.py             |    2 -
 win32/setup.py                   |   12 +++----
 22 files changed, 54 insertions(+), 73 deletions(-)
---
diff --git a/pitivi/formatters/__init__.py b/pitivi/formatters/__init__.py
index f902b96..d658759 100644
--- a/pitivi/formatters/__init__.py
+++ b/pitivi/formatters/__init__.py
@@ -22,4 +22,3 @@
 """
 Project store/load support
 """
-
diff --git a/pitivi/formatters/base.py b/pitivi/formatters/base.py
index 45ffb32..23a8a49 100644
--- a/pitivi/formatters/base.py
+++ b/pitivi/formatters/base.py
@@ -307,7 +307,7 @@ class Formatter(Signallable, Loggable):
         self.debug("oldpath:%r, newpath:%r", oldpath, newpath)
         # FIXME dumbest of dumbest implementation, whoever comes up
         # with a less ugly code is welcome to change this :)
-        
+
         # Split the paths for each directory level
         a = oldpath.split(os.sep)
         b = newpath.split(os.sep)
@@ -410,4 +410,3 @@ class DefaultFormatter(Formatter):
     description = "PiTiVi default file format"
 
     pass
-
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index fe1829c..ec1503e 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -711,7 +711,7 @@ class TimelineEdges(object):
         """
         self._disconnectFromTimelineObject(timeline_object)
         for obj in timeline_object.track_objects:
-             self.removeTrackObject(obj)
+            self.removeTrackObject(obj)
 
     def _connectToTimelineObject(self, timeline_object):
         timeline_object.connect("track-object-added", self._trackObjectAddedCb)
@@ -1734,10 +1734,10 @@ class Timeline(Signallable, Loggable):
                 break
 
         if track is None:
-          raise TimelineError("There is no Track to add the effect to")
+            raise TimelineError("There is no Track to add the effect to")
 
         if not timeline_objects:
-          raise TimelineError("There is no timeline object to add effect to")
+            raise TimelineError("There is no timeline object to add effect to")
 
         listTimelineObjectTrackObject = []
         track_object = TrackEffect(factory, input_stream)
@@ -2056,9 +2056,9 @@ class Timeline(Signallable, Loggable):
 
         # Exclude objects that start after current position.
         for obj in self.timeline_objects:
-                tl_objs.append(obj)
-                if obj.start > time:
-                    break
+            tl_objs.append(obj)
+            if obj.start > time:
+                break
 
         keyframe_positions = self._getKeyframePositions(tl_objs)
         for n in range(len(keyframe_positions) -1, -1, -1):
@@ -2079,8 +2079,8 @@ class Timeline(Signallable, Loggable):
 
         keyframe_positions = self._getKeyframePositions(tl_objs)
         for n in range(0, len(keyframe_positions)):
-                if keyframe_positions[n] > time:
-                    return keyframe_positions[n]
+            if keyframe_positions[n] > time:
+                return keyframe_positions[n]
 
         return None
 
diff --git a/pitivi/ui/clipproperties.py b/pitivi/ui/clipproperties.py
index 78fa8a0..a0a5c79 100644
--- a/pitivi/ui/clipproperties.py
+++ b/pitivi/ui/clipproperties.py
@@ -389,8 +389,8 @@ class EffectProperties(gtk.HBox):
 
     def _treeviewSelectionChangedCb(self, treeview):
         if self.selection.count_selected_rows() == 0 and self.timeline_objects:
-                self.app.gui.setActionsSensitive(['DeleteObj'], True)
-                self._removeEffectBt.set_sensitive(False)
+            self.app.gui.setActionsSensitive(['DeleteObj'], True)
+            self._removeEffectBt.set_sensitive(False)
         else:
             self.app.gui.setActionsSensitive(['DeleteObj'], False)
             self._removeEffectBt.set_sensitive(True)
diff --git a/pitivi/ui/common.py b/pitivi/ui/common.py
index f1ae026..a149613 100644
--- a/pitivi/ui/common.py
+++ b/pitivi/ui/common.py
@@ -201,4 +201,3 @@ def set_combo_value(combo, value, default_index=-1):
 def get_combo_value(combo):
     active = combo.get_active()
     return combo.props.model[active][1]
-
diff --git a/pitivi/ui/dynamic.py b/pitivi/ui/dynamic.py
index 30bdfa8..c0cc407 100644
--- a/pitivi/ui/dynamic.py
+++ b/pitivi/ui/dynamic.py
@@ -319,7 +319,7 @@ class FractionWidget(TextWidget, DynamicWidget):
                 strval = "%g:%g" % (preset.num, preset.denom)
             fpreset = float(preset)
             if self.low <= fpreset and fpreset <= self.high:
-               choices.append(strval)
+                choices.append(strval)
 
         self.addChoices(choices)
 
diff --git a/pitivi/ui/effectlist.py b/pitivi/ui/effectlist.py
index 7122690..8e82ffa 100644
--- a/pitivi/ui/effectlist.py
+++ b/pitivi/ui/effectlist.py
@@ -204,30 +204,30 @@ class EffectList(gtk.VBox, Loggable):
         hsearch.show_all()
 
     def _addMenuItems(self, uiman):
-      view_menu_item = uiman.get_widget('/MainMenuBar/View')
-      view_menu = view_menu_item.get_submenu()
-      seperator = gtk.SeparatorMenuItem()
-      self.treeview_menuitem = gtk.RadioMenuItem(None,
-              _("Show Video Effects as a List"))
-      self.iconview_menuitem = gtk.RadioMenuItem(self.treeview_menuitem,
-              _("Show Video Effects as Icons"))
-
-      if self.settings.lastEffectView == SHOW_TREEVIEW:
-          self.treeview_menuitem.set_active(True)
-          self.iconview_menuitem.set_active(False)
-      else:
-          self.treeview_menuitem.set_active(False)
-          self.iconview_menuitem.set_active(True)
-
-      self.treeview_menuitem.connect("toggled", self._treeViewMenuItemToggledCb)
-      view_menu.append(seperator)
-      view_menu.append(self.treeview_menuitem)
-      view_menu.append(self.iconview_menuitem)
-      self.treeview_menuitem.show()
-      self.iconview_menuitem.show()
-      seperator.show()
-
-      self.effect_view = self.settings.lastEffectView
+        view_menu_item = uiman.get_widget('/MainMenuBar/View')
+        view_menu = view_menu_item.get_submenu()
+        seperator = gtk.SeparatorMenuItem()
+        self.treeview_menuitem = gtk.RadioMenuItem(None,
+                _("Show Video Effects as a List"))
+        self.iconview_menuitem = gtk.RadioMenuItem(self.treeview_menuitem,
+                _("Show Video Effects as Icons"))
+
+        if self.settings.lastEffectView == SHOW_TREEVIEW:
+            self.treeview_menuitem.set_active(True)
+            self.iconview_menuitem.set_active(False)
+        else:
+            self.treeview_menuitem.set_active(False)
+            self.iconview_menuitem.set_active(True)
+
+        self.treeview_menuitem.connect("toggled", self._treeViewMenuItemToggledCb)
+        view_menu.append(seperator)
+        view_menu.append(self.treeview_menuitem)
+        view_menu.append(self.iconview_menuitem)
+        self.treeview_menuitem.show()
+        self.iconview_menuitem.show()
+        seperator.show()
+
+        self.effect_view = self.settings.lastEffectView
 
     def _addFactories(self, elements, effectType):
         for element in elements:
@@ -363,10 +363,10 @@ class EffectList(gtk.VBox, Loggable):
             self._dragStarted = True
 
         if self.effect_view is SHOW_TREEVIEW:
-          if chain_up:
-              gtk.TreeView.do_button_press_event(view, event)
-          else:
-              view.grab_focus()
+            if chain_up:
+                gtk.TreeView.do_button_press_event(view, event)
+            else:
+                view.grab_focus()
 
         return False
 
@@ -463,7 +463,7 @@ class EffectList(gtk.VBox, Loggable):
         return not bool(view.get_path_at_pos(int(event.x), int(event.y)))
 
     def _getDndTuple(self):
-         if self.effectType.get_active() == VIDEO_EFFECT:
+        if self.effectType.get_active() == VIDEO_EFFECT:
             return [dnd.VIDEO_EFFECT_TUPLE, dnd.EFFECT_TUPLE]
-         else:
+        else:
             return [dnd.AUDIO_EFFECT_TUPLE, dnd.EFFECT_TUPLE]
diff --git a/pitivi/ui/encodingprogress.py b/pitivi/ui/encodingprogress.py
index 39b10f3..8cce0bc 100644
--- a/pitivi/ui/encodingprogress.py
+++ b/pitivi/ui/encodingprogress.py
@@ -54,7 +54,7 @@ class EncodingProgressDialog(Signallable):
 
         # UI widgets
         self.window.set_icon_from_file(configure.get_pixmap_dir() + "/pitivi-render-16.png")
-        
+
         # FIXME: re-enable these widgets when bugs #650710 and 637079 are fixed
         self.play_pause_button.hide()
         self.table1.hide()
diff --git a/pitivi/ui/filechooserpreview.py b/pitivi/ui/filechooserpreview.py
index a157827..e16a847 100644
--- a/pitivi/ui/filechooserpreview.py
+++ b/pitivi/ui/filechooserpreview.py
@@ -241,8 +241,8 @@ class PreviewWidget(gtk.VBox, Loggable):
             self.bbox.show()
 
     def show_error(self, uri):
-            self.l_error.show()
-            self.b_details.show()
+        self.l_error.show()
+        self.b_details.show()
 
     def clear_preview(self):
         self.log("Reset PreviewWidget ")
diff --git a/pitivi/ui/preset.py b/pitivi/ui/preset.py
index 5271925..626d3b2 100644
--- a/pitivi/ui/preset.py
+++ b/pitivi/ui/preset.py
@@ -181,4 +181,3 @@ class AudioPresetManager(PresetManager):
         parser.set(section, "channels", str(values["channels"]))
         parser.set(section, "depth", str(values["depth"]))
         parser.set(section, "sample-rate", str(values["sample-rate"]))
-
diff --git a/pitivi/ui/previewer.py b/pitivi/ui/previewer.py
index 9fb8c68..21f327d 100644
--- a/pitivi/ui/previewer.py
+++ b/pitivi/ui/previewer.py
@@ -560,4 +560,3 @@ class RandomAccessAudioPreviewer(RandomAccessPreviewer):
     def _showWaveformsChanged(self, settings):
         self._view = settings.showWaveforms
         self.emit("update", None)
-
diff --git a/pitivi/ui/ripple_update_group.py b/pitivi/ui/ripple_update_group.py
index c683940..5cb7602 100644
--- a/pitivi/ui/ripple_update_group.py
+++ b/pitivi/ui/ripple_update_group.py
@@ -122,4 +122,3 @@ class RippleUpdateGroup(object):
 
             # enqueue children
             queue.extend(((cur, v) for v in self.arcs[cur]))
-
diff --git a/tests/test_gap.py b/tests/test_gap.py
index 8cb1359..ef41ad0 100644
--- a/tests/test_gap.py
+++ b/tests/test_gap.py
@@ -220,5 +220,3 @@ class TestGap(TestCase):
             ( 0 * gst.SECOND, 1 * gst.SECOND),
             (12 * gst.SECOND, 2 * gst.SECOND),
         ])
-
-
diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py
index eb8a54a..6a17b68 100644
--- a/tests/test_pipeline.py
+++ b/tests/test_pipeline.py
@@ -320,4 +320,3 @@ class TestPipeline(TestCase):
 
 if __name__ == "__main__":
     main()
-
diff --git a/tests/test_seeker.py b/tests/test_seeker.py
index b8a1a13..e0bfce6 100644
--- a/tests/test_seeker.py
+++ b/tests/test_seeker.py
@@ -81,4 +81,3 @@ class TestSeeker(TestCase):
 
         # timeout with None position
         seeker._seekTimeoutCb()
-
diff --git a/tests/test_still_image.py b/tests/test_still_image.py
index 6e5ac85..756025c 100644
--- a/tests/test_still_image.py
+++ b/tests/test_still_image.py
@@ -158,4 +158,3 @@ class TestStillImage(TestCase):
         self.configureStreams(range(4), [0, self.clip_duration // 2, self.clip_duration, (3 * self.clip_duration) // 2])
         self.startRender()
         self.cleanUp()
-
diff --git a/tests/test_stream.py b/tests/test_stream.py
index 988511a..91982b9 100644
--- a/tests/test_stream.py
+++ b/tests/test_stream.py
@@ -279,4 +279,3 @@ class TestStreamGroupMatching(TestCase):
         group_b = [stream5, stream6, stream4]
         best_map = match_stream_groups(group_a, group_b)
         self.failUnlessEqual(known_best_map, best_map)
-
diff --git a/tests/test_timeline_factory.py b/tests/test_timeline_factory.py
index 8c0f732..47fbdf6 100644
--- a/tests/test_timeline_factory.py
+++ b/tests/test_timeline_factory.py
@@ -315,4 +315,3 @@ class TestTimelineSourceFactoryPipeline(MainLoopTestCase):
         pipeline.set_state(gst.STATE_NULL)
 
         factory.clean()
-
diff --git a/tests/test_undo.py b/tests/test_undo.py
index dbcad1a..c786ea1 100644
--- a/tests/test_undo.py
+++ b/tests/test_undo.py
@@ -386,12 +386,12 @@ class TestUndoableActionLog(TestCase):
                 self.n = n
 
             def do(self):
-               call_sequence.append("do%s" % self.n)
-               self._done()
+                call_sequence.append("do%s" % self.n)
+                self._done()
 
             def undo(self):
-               call_sequence.append("undo%s" % self.n)
-               self._undone()
+                call_sequence.append("undo%s" % self.n)
+                self._undone()
 
         action1 = Action(1)
         action2 = Action(2)
@@ -415,4 +415,3 @@ class TestUndoableActionLog(TestCase):
         call_sequence[:] = []
         self.log.undo()
         self.failUnlessEqual(call_sequence, ["undo3", "undo2", "undo1"])
-
diff --git a/tests/test_utils.py b/tests/test_utils.py
index c993a73..829f628 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -51,4 +51,3 @@ class TestBeautifyLength(TestCase):
     def testBeautifyHoursAndMinutes(self):
         self.failUnlessEqual(beautify_length(hour + minute + second),
                 "1 hour, 1 minute")
-
diff --git a/tests/testcomplex.py b/tests/testcomplex.py
index 36036f7..b1dcfb1 100644
--- a/tests/testcomplex.py
+++ b/tests/testcomplex.py
@@ -94,5 +94,3 @@ w.add(b)
 w.show_all()
 w.connect("destroy", gtk.main_quit)
 gtk.main()
-
-
diff --git a/win32/setup.py b/win32/setup.py
index c7a5f58..294acf6 100644
--- a/win32/setup.py
+++ b/win32/setup.py
@@ -88,7 +88,7 @@ class Deploy():
         for path in [self.dist_dir, self.dist_bin_dir, self.dist_etc_dir,
                 self.dist_share_dir, self.dist_lib_pitivi_dir,
                 self.dist_share_pixmaps_dir]:
-                os.makedirs(path)
+            os.makedirs(path)
 
     def checkDependencies(self):
         print ('Checking dependencies')
@@ -110,10 +110,10 @@ class Deploy():
             import gtk.gdk
             import gobject
         except ImportError:
-                self.close('IMPORT_ERROR: Could not find the Gtk Python bindings.\n'
-                    'You can download the installers at:\n'
-                    'http://www.pygtk.org/\n'
-                    'http://www.gtk.org/')
+            self.close('IMPORT_ERROR: Could not find the Gtk Python bindings.\n'
+                'You can download the installers at:\n'
+                'http://www.pygtk.org/\n'
+                'http://www.gtk.org/')
         else:
             print ('Gtk... OK')
 
@@ -220,5 +220,3 @@ def main():
 
 if __name__ == "__main__":
     main()
-
-



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