[pitivi] Make Signallable and Loggable new style classes.
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi] Make Signallable and Loggable new style classes.
- Date: Tue, 5 May 2009 11:07:05 -0400 (EDT)
commit 7e074cd747883cd78563c5a962ae2403d189785a
Author: Alessandro Decina <alessandro d gmail com>
Date: Tue May 5 15:17:56 2009 +0200
Make Signallable and Loggable new style classes.
Fixes random segfaults with python2.6.
---
pitivi/action.py | 2 +-
pitivi/application.py | 2 +-
pitivi/device.py | 2 +-
pitivi/discoverer.py | 2 +-
pitivi/factories/base.py | 2 +-
pitivi/formatters/base.py | 2 +-
pitivi/log/log.py | 2 +-
pitivi/pipeline.py | 2 +-
pitivi/pluginmanager.py | 2 +-
pitivi/project.py | 2 +-
pitivi/settings.py | 4 ++--
pitivi/signalinterface.py | 2 +-
pitivi/sourcelist.py | 2 +-
pitivi/stream.py | 2 +-
pitivi/threads.py | 2 +-
pitivi/timeline/timeline.py | 6 +++---
pitivi/timeline/track.py | 4 ++--
pitivi/ui/previewer.py | 2 +-
pitivi/utils.py | 4 ++--
tests/test_signallable.py | 2 +-
20 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/pitivi/action.py b/pitivi/action.py
index c009fbf..cc75c64 100644
--- a/pitivi/action.py
+++ b/pitivi/action.py
@@ -39,7 +39,7 @@ from pitivi.log.loggable import Loggable
class ActionError(Exception):
pass
-class Action(object, Signallable, Loggable):
+class Action(Signallable, Loggable):
"""
Pipeline action.
diff --git a/pitivi/application.py b/pitivi/application.py
index 46d7e06..fa817c5 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -55,7 +55,7 @@ from pitivi.formatters.format import get_formatter_for_uri
# FIXME : maybe we should have subclasses for UI and CLI
-class Pitivi(object, Loggable, Signallable):
+class Pitivi(Loggable, Signallable):
"""
Pitivi's main application class.
diff --git a/pitivi/device.py b/pitivi/device.py
index 5986b36..8e6a6b5 100644
--- a/pitivi/device.py
+++ b/pitivi/device.py
@@ -65,7 +65,7 @@ def get_probe():
return HalDeviceProbe()
return None
-class DeviceProbe(object, Signallable, Loggable):
+class DeviceProbe(Signallable, Loggable):
"""
Allows listing of the various devices available.
diff --git a/pitivi/discoverer.py b/pitivi/discoverer.py
index d798aeb..2b9f8c0 100644
--- a/pitivi/discoverer.py
+++ b/pitivi/discoverer.py
@@ -45,7 +45,7 @@ from pitivi.stream import VideoStream
# what encoded format it is
# We will need that in order to create proper Stream objects.
-class Discoverer(object, Signallable, Loggable):
+class Discoverer(Signallable, Loggable):
"""
Queues requests to discover information about given files.
The discovery is done in a very fragmented way, so that it appears to be
diff --git a/pitivi/factories/base.py b/pitivi/factories/base.py
index 7a53729..0f116c0 100644
--- a/pitivi/factories/base.py
+++ b/pitivi/factories/base.py
@@ -36,7 +36,7 @@ class ObjectFactoryError(Exception):
class ObjectFactoryStreamError(ObjectFactoryError):
pass
-class ObjectFactory(object, Signallable, Loggable):
+class ObjectFactory(Signallable, Loggable):
"""
Base class for all factory implementations.
diff --git a/pitivi/formatters/base.py b/pitivi/formatters/base.py
index 278b97e..4e78b61 100644
--- a/pitivi/formatters/base.py
+++ b/pitivi/formatters/base.py
@@ -47,7 +47,7 @@ class FormatterSaveError(FormatterError):
class FormatterOverwriteError(FormatterSaveError):
"""A project can't be saved because it will be overwritten"""
-class Formatter(object, Signallable, Loggable):
+class Formatter(Signallable, Loggable):
"""
Provides convenience methods for storing and loading
Project files.
diff --git a/pitivi/log/log.py b/pitivi/log/log.py
index d9d5e1e..74a3fc1 100644
--- a/pitivi/log/log.py
+++ b/pitivi/log/log.py
@@ -712,7 +712,7 @@ def outputToFiles(stdout=None, stderr=None):
# base class for loggable objects
-class Loggable:
+class Loggable(object):
"""
Base class for objects that want to be able to log messages with
different level of severity. The levels are, in order from least
diff --git a/pitivi/pipeline.py b/pitivi/pipeline.py
index e76e62e..07c892a 100644
--- a/pitivi/pipeline.py
+++ b/pitivi/pipeline.py
@@ -84,7 +84,7 @@ class StreamEntry(object):
def __repr__(self):
return "<StreamEntry %s '%s'>" % (self.factory_entry.factory, self.stream)
-class Pipeline(object, Signallable, Loggable):
+class Pipeline(Signallable, Loggable):
"""
A container for all multimedia processing.
diff --git a/pitivi/pluginmanager.py b/pitivi/pluginmanager.py
index 264e9c4..c47ed78 100644
--- a/pitivi/pluginmanager.py
+++ b/pitivi/pluginmanager.py
@@ -40,7 +40,7 @@ import zope.interface.verify
from pitivi.signalinterface import Signallable
import pitivi.plugincore as plugincore
-class PluginManager(object, Signallable):
+class PluginManager(Signallable):
"""
Manages plugins in a centralized way.
diff --git a/pitivi/project.py b/pitivi/project.py
index 9c7a5f1..5f8d6f8 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -49,7 +49,7 @@ class ProjectSaveLoadError(ProjectError):
"""Error while loading/saving project"""
pass
-class Project(object, Signallable, Loggable):
+class Project(Signallable, Loggable):
"""The base class for PiTiVi projects
@ivar name: The name of the project
diff --git a/pitivi/settings.py b/pitivi/settings.py
index 56fbabf..7c2a136 100644
--- a/pitivi/settings.py
+++ b/pitivi/settings.py
@@ -122,7 +122,7 @@ class Notification(object):
setattr(instance, self.attrname, value)
instance.emit(self.signame)
-class GlobalSettings(object, Signallable):
+class GlobalSettings(Signallable):
"""
Global PiTiVi settings.
@@ -428,7 +428,7 @@ class RenderSettings(object):
def __repr__(self):
return "<RenderSettings %s [%d streams]>" % (self.muxer, len(self.settings))
-class ExportSettings(object, Signallable, Loggable):
+class ExportSettings(Signallable, Loggable):
"""
Multimedia export settings
diff --git a/pitivi/signalinterface.py b/pitivi/signalinterface.py
index 9849100..62b9ab9 100644
--- a/pitivi/signalinterface.py
+++ b/pitivi/signalinterface.py
@@ -31,7 +31,7 @@ Interfaces for event-based programming
from random import randint
-class Signallable:
+class Signallable(object):
"""
Signallable interface
diff --git a/pitivi/sourcelist.py b/pitivi/sourcelist.py
index 2e31f33..230a497 100644
--- a/pitivi/sourcelist.py
+++ b/pitivi/sourcelist.py
@@ -28,7 +28,7 @@ from pitivi.signalinterface import Signallable
from pitivi.log.loggable import Loggable
from pitivi.factories.base import URISourceFactoryMixin
-class SourceList(object, Signallable, Loggable):
+class SourceList(Signallable, Loggable):
"""
Contains the sources for a project, stored as FileSourceFactory
diff --git a/pitivi/stream.py b/pitivi/stream.py
index 54b100e..a32d72b 100644
--- a/pitivi/stream.py
+++ b/pitivi/stream.py
@@ -27,7 +27,7 @@ from pitivi.log.loggable import Loggable
import pitivi.log.log as log
import gst
-class MultimediaStream(object, Loggable):
+class MultimediaStream(Loggable):
"""
Defines a media stream
diff --git a/pitivi/threads.py b/pitivi/threads.py
index 72cadf8..13274b0 100644
--- a/pitivi/threads.py
+++ b/pitivi/threads.py
@@ -73,7 +73,7 @@ class CallbackThread(Thread):
def process(self):
self.callback(*self.args, **self.kwargs)
-class ThreadMaster(object, Loggable):
+class ThreadMaster(Loggable):
"""
Controls all thread existing in pitivi
"""
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 17c38d3..db70a56 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -35,7 +35,7 @@ UNSELECT = 1
class TimelineError(Exception):
pass
-class TimelineObject(object, Signallable, Loggable):
+class TimelineObject(Signallable, Loggable):
__signals__ = {
'start-changed': ['start'],
'duration-changed': ['duration'],
@@ -275,7 +275,7 @@ class TimelineObject(object, Signallable, Loggable):
except ValueError:
raise TimelineError()
-class Selection(object, Signallable):
+class Selection(Signallable):
__signals__ = {
"selection-changed" : []
@@ -468,7 +468,7 @@ class TimelineEdges(object):
len(self.edges) - 1, index + 1)]
-class Timeline(object ,Signallable, Loggable):
+class Timeline(Signallable, Loggable):
__signals__ = {
'duration-changed': ['duration'],
'track-added': ['track'],
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index a7de3a0..ce93c69 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -31,7 +31,7 @@ from pitivi.factories.test import VideoTestSourceFactory, \
class TrackError(Exception):
pass
-class TrackObject(object, Signallable):
+class TrackObject(Signallable):
__signals__ = {
'start-changed': ['start'],
'duration-changed': ['duration'],
@@ -296,7 +296,7 @@ class SourceTrackObject(TrackObject):
return source
-class Track(object, Signallable):
+class Track(Signallable):
__signals__ = {
'start-changed': ['start'],
'duration-changed': ['duration'],
diff --git a/pitivi/ui/previewer.py b/pitivi/ui/previewer.py
index 98fd8c1..1de0653 100644
--- a/pitivi/ui/previewer.py
+++ b/pitivi/ui/previewer.py
@@ -111,7 +111,7 @@ def get_preview_for_object(trackobject):
previewers[key] = DefaultPreviewer(factory, stream_)
return previewers[key]
-class Previewer(object, Signallable, Loggable):
+class Previewer(Signallable, Loggable):
__signals__ = {
"update" : ("segment",),
diff --git a/pitivi/utils.py b/pitivi/utils.py
index 694daba..6551315 100644
--- a/pitivi/utils.py
+++ b/pitivi/utils.py
@@ -224,7 +224,7 @@ def uri_is_reachable(uri):
_("%s doesn't yet handle non local projects") % APPNAME)
return os.path.isfile(gst.uri_get_location(uri))
-class PropertyChangeTracker(object, Signallable):
+class PropertyChangeTracker(Signallable):
def __init__(self, timeline_object):
self.properties = {}
@@ -241,7 +241,7 @@ class PropertyChangeTracker(object, Signallable):
self.emit(property_name + '-changed', timeline_object, old_value, value)
-class Seeker(object, Signallable):
+class Seeker(Signallable):
__signals__ = {'seek': ['position', 'format']}
def __init__(self, timeout):
diff --git a/tests/test_signallable.py b/tests/test_signallable.py
index 848f6ef..2a6f032 100644
--- a/tests/test_signallable.py
+++ b/tests/test_signallable.py
@@ -1,7 +1,7 @@
import unittest
from pitivi.signalinterface import Signallable
-class myobject(object, Signallable):
+class myobject(Signallable):
__signals__ = {
"signal-oneargs" : ["firstarg"],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]