[pitivi] Remove unuseful instance module



commit e41e9e87f3405e47d8b90f054530e6805c5733eb
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Wed Dec 25 10:47:10 2013 +0100

    Remove unuseful instance module
    
    This code never worked.

 pitivi/Makefile.am    |    1 -
 pitivi/application.py |   13 +------------
 pitivi/instance.py    |   33 ---------------------------------
 tests/test_basic.py   |    7 -------
 4 files changed, 1 insertions(+), 53 deletions(-)
---
diff --git a/pitivi/Makefile.am b/pitivi/Makefile.am
index 9759e5d..ce2cc38 100644
--- a/pitivi/Makefile.am
+++ b/pitivi/Makefile.am
@@ -16,7 +16,6 @@ pitivi_PYTHON = \
        clipproperties.py \
        configure.py \
        effects.py \
-       instance.py \
        mainwindow.py \
        mediafilespreviewer.py \
        medialibrary.py \
diff --git a/pitivi/application.py b/pitivi/application.py
index 7c213e7..1ed2216 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -34,10 +34,8 @@ from gi.repository import Gtk
 from gettext import gettext as _
 from optparse import OptionParser
 
-import pitivi.instance as instance
-
 from pitivi.effects import EffectsHandler
-from pitivi.configure import APPNAME, pitivi_version, RELEASES_URL
+from pitivi.configure import pitivi_version, RELEASES_URL
 from pitivi.settings import GlobalSettings
 from pitivi.utils.threads import ThreadMaster
 from pitivi.mainwindow import PitiviMainWindow
@@ -118,14 +116,6 @@ class Pitivi(Loggable, Signallable):
 
         self.info('starting up')
 
-        # store ourself in the instance global
-        if instance.Pitivi:
-            raise RuntimeWarning(_("There is already a %s instance, please inform "
-                "the developers by filing a bug at "
-                "http://bugzilla.gnome.org/enter_bug.cgi?product=pitivi";)
-                % APPNAME)
-        instance.Pitivi = self
-
         self.current_project = None
 
         # get settings
@@ -164,7 +154,6 @@ class Pitivi(Loggable, Signallable):
         self.threads.stopAllThreads()
         self.settings.storeSettings()
         self.current_project = None
-        instance.Pitivi = None
         self.emit("shutdown")
         return True
 
diff --git a/tests/test_basic.py b/tests/test_basic.py
index 107cf54..9f34bc7 100644
--- a/tests/test_basic.py
+++ b/tests/test_basic.py
@@ -1,5 +1,4 @@
 import unittest
-import pitivi
 from common import TestCase
 from pitivi.application import Pitivi
 
@@ -18,14 +17,8 @@ class BasicTest(TestCase):
         self.assertEqual(ptv.current_project, None)
         self.assert_(ptv.effects)
 
-        # was the unique instance object properly set
-        self.assertEquals(pitivi.instance.Pitivi, ptv)
-
         # close pitivi
         ptv.shutdown()
 
-        # make sure the instance has been unset
-        self.assertEquals(pitivi.instance.Pitivi, None)
-
 if __name__ == "__main__":
     unittest.main()


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