[pitivi] application: Remove unused signals and methods



commit 20288238d987fa5b3fd1128888943528c2210ef7
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Wed Jan 15 14:18:19 2014 +0100

    application: Remove unused signals and methods

 pitivi/application.py |   32 +-------------------------------
 1 files changed, 1 insertions(+), 31 deletions(-)
---
diff --git a/pitivi/application.py b/pitivi/application.py
index 787e9ef..8518fdd 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -72,10 +72,6 @@ class Pitivi(Loggable, Signallable):
      - C{new-project-loading} : Pitivi is attempting to load a new project.
      - C{new-project-loaded} : A new L{Project} has been loaded, and the UI should refresh it's view.
      - C{new-project-failed} : A new L{Project} failed to load.
-     - C{closing-project} :  pitivi would like to close a project. handlers should return false
-     if they do not want this project to close. by default, assumes
-     true. This signal should only be used by classes that might want to abort
-     the closing of a project.
      - C{project-closed} : The project is closed, it will be freed when the callback returns.
      Classes should connect to this instance when they want to know that
      data related to that project is no longer going to be used.
@@ -93,7 +89,6 @@ class Pitivi(Loggable, Signallable):
         "new-project-created": ["project"],
         "new-project-loaded": ["project"],
         "new-project-failed": ["uri", "exception"],
-        "closing-project": ["project"],
         "project-closed": ["project"],
         "missing-uri": ["formatter", "uri"],
         "version-info-received": ["versions"],
@@ -161,7 +156,6 @@ class Pitivi(Loggable, Signallable):
         pm.connect("new-project-created", self._projectManagerNewProjectCreated)
         pm.connect("new-project-loaded", self._projectManagerNewProjectLoaded)
         pm.connect("new-project-failed", self._projectManagerNewProjectFailed)
-        pm.connect("closing-project", self._projectManagerClosingProject)
         pm.connect("project-closed", self._projectManagerProjectClosed)
 
     def _projectManagerNewProjectLoading(self, unused_project_manager, uri):
@@ -185,9 +179,6 @@ class Pitivi(Loggable, Signallable):
     def _projectManagerNewProjectFailed(self, unused_project_manager, uri, exception):
         self.emit("new-project-failed", uri, exception)
 
-    def _projectManagerClosingProject(self, unused_project_manager, project):
-        return self.emit("closing-project", project)
-
     def _projectManagerProjectClosed(self, unused_project_manager, project):
         #self.timelineLogObserver.stopObserving(project.timeline)
         self.projectLogObserver.stopObserving(project)
@@ -235,7 +226,6 @@ class InteractivePitivi(Pitivi):
     def __init__(self, debug=False):
         Pitivi.__init__(self)
         self.mainloop = GLib.MainLoop()
-        self.actioner = None
         self.gui = None
         if debug:
             sys.excepthook = self._excepthook
@@ -246,22 +236,6 @@ class InteractivePitivi(Pitivi):
         traceback.print_tb(tback)
         pdb.post_mortem(tback)
 
-    def _setActioner(self, actioner):
-        self.actioner = actioner
-        if self.actioner:
-            self.actioner.connect("eos", self._eosCb)
-            # On error, all we need to do is shutdown which
-            # is the same as we do for EOS
-            self.actioner.connect("error", self._eosCb)
-            # Configure the actioner and start acting!
-            self.actioner.startAction()
-
-    def _eosCb(self, unused_obj):
-        raise NotImplementedError()
-
-    def _loadProject(self, project_filename):
-        self.projectManager.loadProject(quote_uri(os.path.abspath(project_filename)))
-
     def run(self):
         """Runs the main loop."""
         self.mainloop.run()
@@ -286,9 +260,6 @@ class GuiPitivi(InteractivePitivi):
         dialog.format_secondary_text(detail)
         dialog.run()
 
-    def _eosCb(self, unused_obj):
-        self.shutdown()
-
     def _createGui(self):
         """Returns a Gtk.Widget which represents the UI."""
         return PitiviMainWindow(self)
@@ -362,8 +333,7 @@ class ProjectLoaderGuiPitivi(GuiPitivi):
         if not os.path.exists(project_filename):
             self.error("Project file does not exist: %s" % project_filename)
             sys.exit(1)
-        else:
-            self._loadProject(project_filename)
+        self.projectManager.loadProject(quote_uri(os.path.abspath(project_filename)))
 
 
 class StartupWizardGuiPitivi(GuiPitivi):


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