[pitivi] Fix some pyflakes warnings
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Fix some pyflakes warnings
- Date: Sun, 2 Sep 2012 04:02:07 +0000 (UTC)
commit 93202844d0467729ea38e7972f12916b44357bf4
Author: Paul Lange <palango gmx de>
Date: Sun Aug 12 11:31:05 2012 +0200
Fix some pyflakes warnings
pitivi/clipproperties.py | 4 ----
pitivi/dialogs/startupwizard.py | 5 +----
pitivi/medialibrary.py | 1 -
pitivi/project.py | 1 -
pitivi/render.py | 8 --------
pitivi/timeline/ruler.py | 1 -
pitivi/timeline/timeline.py | 3 ---
pitivi/timeline/track.py | 3 +--
pitivi/utils/misc.py | 5 +++--
pitivi/utils/system.py | 2 --
pitivi/utils/timeline.py | 1 -
pitivi/utils/widgets.py | 2 --
12 files changed, 5 insertions(+), 31 deletions(-)
---
diff --git a/pitivi/clipproperties.py b/pitivi/clipproperties.py
index e6eaf77..88f0228 100644
--- a/pitivi/clipproperties.py
+++ b/pitivi/clipproperties.py
@@ -210,10 +210,6 @@ class EffectProperties(gtk.Expander, gtk.HBox):
activatedcell = gtk.CellRendererToggle()
activatedcell.props.xpad = PADDING
- activatedcol = self.treeview.insert_column_with_attributes(-1,
- _("Activated"),
- activatedcell,
- active=COL_ACTIVATED)
activatedcell.connect("toggled", self._effectActiveToggleCb)
typecol = gtk.TreeViewColumn(_("Type"))
diff --git a/pitivi/dialogs/startupwizard.py b/pitivi/dialogs/startupwizard.py
index 0b71061..bcae0cb 100644
--- a/pitivi/dialogs/startupwizard.py
+++ b/pitivi/dialogs/startupwizard.py
@@ -24,13 +24,10 @@ import gtk
from gettext import gettext as _
-from pitivi.configure import get_ui_dir, APPURL
+from pitivi.configure import get_ui_dir
from pitivi.dialogs.depsmanager import DepsManager
from pitivi.check import soft_deps
from pitivi.utils.misc import show_user_manual
-from pitivi.settings import GlobalSettings
-
-from urllib import unquote
class StartUpWizard(object):
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index b5b8087..4503adb 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -751,7 +751,6 @@ class MediaLibraryWidget(gtk.VBox, Loggable):
thumbnail_hash = md5(info.get_uri()).hexdigest()
thumb_dir = os.path.expanduser("~/.thumbnails/")
thumb_path_normal = thumb_dir + "normal/" + thumbnail_hash + ".png"
- thumb_path_large = thumb_dir + "large/" + thumbnail_hash + ".png"
# Pitivi used to consider 64 pixels as normal and 96 as large
# However, the fdo spec specifies 128 as normal and 256 as large.
# We will thus simply use the "normal" size and scale it down.
diff --git a/pitivi/project.py b/pitivi/project.py
index 2f8fc39..2c8cac5 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -382,7 +382,6 @@ class ProjectManager(Signallable, Loggable):
# The tracks of the timeline determine what tracks
# the rendered content will have. Pitivi currently supports
# projects with exactly one video track and one audio track.
- settings = project.getSettings()
project.connect("project-changed", self._projectChangedCb)
if emission:
self.current.disconnect = False
diff --git a/pitivi/render.py b/pitivi/render.py
index 5924cd8..ab9305e 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -420,14 +420,6 @@ class RenderDialog(Loggable):
# FIXME: re-enable this widget when bug #637078 is implemented
self.selected_only_button.destroy()
- # The Render dialog and the Project Settings dialog have some
- # common settings, for example the audio sample rate.
- # When these common settings are changed in the Render dialog,
- # we don't want them to be saved, so we create a copy of the project's
- # settings to be used by the Render dialog for rendering.
- render_settings = project.getSettings().copy()
- # Note: render_settings will end up as self.settings.
-
# Directory and Filename
self.filebutton.set_current_folder(self.app.settings.lastExportFolder)
if not self.project.name:
diff --git a/pitivi/timeline/ruler.py b/pitivi/timeline/ruler.py
index 381be93..920e302 100644
--- a/pitivi/timeline/ruler.py
+++ b/pitivi/timeline/ruler.py
@@ -219,7 +219,6 @@ class ScaleRuler(gtk.DrawingArea, Zoomable, Loggable):
break
offset = self.pixbuf_offset % spacing
- zoomRatio = self.zoomratio
self.drawFrameBoundaries(cr)
self.drawTicks(cr, offset, spacing, scale)
self.drawTimes(cr, offset, spacing, scale)
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 1d5727a..f270269 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -34,7 +34,6 @@ import glib
import ruler
import gobject
import goocanvas
-import cairo
from gettext import gettext as _
from os.path import join
@@ -749,7 +748,6 @@ class TimelineControls(gtk.VBox, Loggable):
Handles received drag data to reorder layers
"""
widget = context.get_source_widget()
- widget_type = type(widget)
self._unhighlightSeparators()
@@ -1421,7 +1419,6 @@ class Timeline(gtk.Table, Loggable, Zoomable):
priority = self.controls.getPriorityForY(y)
delta = Zoomable.pixelToNs(x)
- obj = self._temp_objects[0]
self._move_context.editTo(delta, priority)
## Zooming and Scrolling
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index 6fc5d14..7e5f8a6 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -354,7 +354,7 @@ class TrackObject(View, goocanvas.Group, Zoomable, Loggable):
def drag_start(self, item, target, event):
if not self._view.movable:
return
- point = self.from_item_event(item, event)
+
TrackObjectController.drag_start(self, item, target, event)
self._context = EditingContext(self._view.element,
@@ -427,7 +427,6 @@ class TrackObject(View, goocanvas.Group, Zoomable, Loggable):
self.element = element
element.selected = Selected()
element.selected.connect("selected-changed", self.selectedChangedCb)
- obj = self.element.get_timeline_object()
self.settings = instance.settings
self.unfocus()
diff --git a/pitivi/utils/misc.py b/pitivi/utils/misc.py
index c52e486..59b3094 100644
--- a/pitivi/utils/misc.py
+++ b/pitivi/utils/misc.py
@@ -27,19 +27,20 @@ import gobject
import gst
import gtk
import hashlib
-import bisect
import os
import struct
import time
import threading
+from gettext import gettext as _
+
from urlparse import urlsplit, urlunsplit, urlparse
from urllib import quote, unquote
import pitivi.utils.loggable as log
from pitivi.utils.threads import Thread
-from pitivi.configure import APPMANUALURL_OFFLINE, APPMANUALURL_ONLINE
+from pitivi.configure import APPMANUALURL_OFFLINE, APPMANUALURL_ONLINE, APPNAME
try:
import cProfile
diff --git a/pitivi/utils/system.py b/pitivi/utils/system.py
index 4216fb2..f34e013 100644
--- a/pitivi/utils/system.py
+++ b/pitivi/utils/system.py
@@ -47,8 +47,6 @@ class System(Signallable, Loggable):
#generic functions
def _inhibit(self, list_, key):
- is_blocked = self._isInhibited(list_, key)
-
if key == None or (not isinstance(key, str)):
assert False
diff --git a/pitivi/utils/timeline.py b/pitivi/utils/timeline.py
index 92c0db6..16ada78 100644
--- a/pitivi/utils/timeline.py
+++ b/pitivi/utils/timeline.py
@@ -423,7 +423,6 @@ class Controller(Loggable):
def _drag_threshold(self):
last = self.pos(self._dragging)
- difference = abs(self._initial - last)
if abs(self._initial - last) > self.__DRAG_THRESHOLD__:
return False
return True
diff --git a/pitivi/utils/widgets.py b/pitivi/utils/widgets.py
index 58b48b0..e6a5276 100644
--- a/pitivi/utils/widgets.py
+++ b/pitivi/utils/widgets.py
@@ -677,7 +677,6 @@ class ResolutionWidget(gtk.HBox, DynamicWidget):
def setWidgetValue(self, value):
width, height = value
- dar = gst.Fraction(width, height)
self.dwidthWidget.setWidgetValue(width)
self.dheightWidget.setWidgetValue(height)
@@ -761,7 +760,6 @@ def make_property_widget(unused_element, prop, value=None):
elif (type_name == 'gboolean'):
widget = ToggleWidget(default=prop.default_value)
elif (type_name == 'GEnum'):
- idx = 0
choices = []
for key, val in prop.enum_class.__enum_values__.iteritems():
choices.append([val.value_name, int(val)])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]