[pitivi] project: Remove unused emission parameter



commit 6f9a49d7b27f3d18dbe6bba45d3146ccf8fa6a0b
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Tue Feb 9 13:51:05 2016 +0100

    project: Remove unused emission parameter
    
    Differential Revision: https://phabricator.freedesktop.org/D748

 pitivi/application.py           |    4 ++--
 pitivi/clipproperties.py        |    4 ++--
 pitivi/dialogs/startupwizard.py |    9 ++++-----
 pitivi/mainwindow.py            |    2 +-
 pitivi/medialibrary.py          |    2 +-
 pitivi/project.py               |   11 +++++------
 pitivi/timeline/timeline.py     |    6 +++---
 pitivi/titleeditor.py           |    2 +-
 8 files changed, 19 insertions(+), 21 deletions(-)
---
diff --git a/pitivi/application.py b/pitivi/application.py
index ca6517b..fcb0d5d 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -58,7 +58,7 @@ class Pitivi(Gtk.Application, Loggable):
     @ivar project_manager: The project manager object used in the application
     @type project_manager: L{ProjectManager}
     @ivar settings: Application-wide settings.
-    @type settings: L{GlobalSettings}.
+    @type settings: L{pitivi.settings.GlobalSettings}.
     """
 
     __gsignals__ = {
@@ -260,7 +260,7 @@ class Pitivi(Gtk.Application, Loggable):
     def _newProjectLoadingCb(self, unused_project_manager, uri):
         self._setScenarioFile(uri)
 
-    def _newProjectLoaded(self, unused_project_manager, project, unused_fully_loaded):
+    def _newProjectLoaded(self, unused_project_manager, project):
         self.action_log.clean()
 
         self.timeline_log_observer.startObserving(project.timeline)
diff --git a/pitivi/clipproperties.py b/pitivi/clipproperties.py
index ff86e4f..815fde0 100644
--- a/pitivi/clipproperties.py
+++ b/pitivi/clipproperties.py
@@ -247,7 +247,7 @@ class EffectProperties(Gtk.Expander, Loggable):
             "new-project-loaded", self._newProjectLoadedCb)
         self.connect('notify::expanded', self._expandedCb)
 
-    def _newProjectLoadedCb(self, unused_app, project, unused_fully_loaded):
+    def _newProjectLoadedCb(self, unused_app, project):
         if self._selection is not None:
             self._selection.disconnect_by_func(self._selectionChangedCb)
             self._selection = None
@@ -560,7 +560,7 @@ class TransformationProperties(Gtk.Expander, Loggable):
         self.app.project_manager.connect(
             "new-project-loaded", self._newProjectLoadedCb)
 
-    def _newProjectLoadedCb(self, unused_app, project, unused_fully_loaded):
+    def _newProjectLoadedCb(self, unused_app, project):
         if self._selection is not None:
             self._selection.disconnect_by_func(self._selectionChangedCb)
             self._selection = None
diff --git a/pitivi/dialogs/startupwizard.py b/pitivi/dialogs/startupwizard.py
index 76df4b0..1688b49 100644
--- a/pitivi/dialogs/startupwizard.py
+++ b/pitivi/dialogs/startupwizard.py
@@ -147,16 +147,15 @@ class StartUpWizard(object):
         """Handle the failure of a project open operation."""
         self.show()
 
-    def _projectLoadedCb(self, project_manager, unused_project, fully_loaded):
+    def _projectLoadedCb(self, project_manager, unused_project):
         """
         Handle the success of a project load operation.
 
         @type project_manager: L{ProjectManager}
         """
-        if fully_loaded:
-            project_manager.disconnect_by_func(self._projectFailedCb)
-            project_manager.disconnect_by_func(self._projectLoadedCb)
-            project_manager.disconnect_by_func(self._projectLoadingCb)
+        project_manager.disconnect_by_func(self._projectFailedCb)
+        project_manager.disconnect_by_func(self._projectLoadedCb)
+        project_manager.disconnect_by_func(self._projectLoadingCb)
 
     def _projectLoadingCb(self, unused_project_manager, unused_project):
         """Handle the start of a project load operation."""
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index 7104a85..16272ee 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -707,7 +707,7 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
 
 # Project management callbacks
 
-    def _projectManagerNewProjectLoadedCb(self, project_manager, project, unused_fully_loaded):
+    def _projectManagerNewProjectLoadedCb(self, project_manager, project):
         """
         @type project_manager: L{ProjectManager}
         @type project: L{Project}
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index f07e30c..df4365a 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -1423,7 +1423,7 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
         self._welcome_infobar.show_all()
         self._connectToProject(project)
 
-    def _newProjectLoadedCb(self, unused_project_manager, project, unused_fully_ready):
+    def _newProjectLoadedCb(self, unused_project_manager, project):
         if self._project is not project:
             self._project = project
             self.storemodel.clear()
diff --git a/pitivi/project.py b/pitivi/project.py
index f11adaf..efee8f7 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -173,7 +173,7 @@ class ProjectManager(GObject.Object, Loggable):
         "new-project-loading": (GObject.SIGNAL_RUN_LAST, None, (str,)),
         "new-project-created": (GObject.SIGNAL_RUN_LAST, None, (object,)),
         "new-project-failed": (GObject.SIGNAL_RUN_LAST, None, (str, object)),
-        "new-project-loaded": (GObject.SIGNAL_RUN_LAST, None, (object, bool)),
+        "new-project-loaded": (GObject.SIGNAL_RUN_LAST, None, (object,)),
         "save-project-failed": (GObject.SIGNAL_RUN_LAST, None, (str, object)),
         "project-saved": (GObject.SIGNAL_RUN_LAST, None, (object, str)),
         "closing-project": (GObject.SIGNAL_RUN_LAST, bool, (object,)),
@@ -578,7 +578,7 @@ class ProjectManager(GObject.Object, Loggable):
 
         return True
 
-    def newBlankProject(self, emission=True, ignore_unsaved_changes=False):
+    def newBlankProject(self, ignore_unsaved_changes=False):
         """
         Start up a new blank project.
 
@@ -594,8 +594,7 @@ class ProjectManager(GObject.Object, Loggable):
                 return False
 
         self.__missing_uris = False
-        if emission:
-            self.emit("new-project-loading", None)
+        self.emit("new-project-loading", None)
         project = Project(self.app, name=DEFAULT_NAME)
 
         # setting default values for project metadata
@@ -610,7 +609,7 @@ class ProjectManager(GObject.Object, Loggable):
         project.connect("project-changed", self._projectChangedCb)
         project.pipeline.connect("died", self._projectPipelineDiedCb)
         project.setModificationState(False)
-        self.emit("new-project-loaded", self.current_project, emission)
+        self.emit("new-project-loaded", self.current_project)
         self.time_loaded = time.time()
 
         return True
@@ -684,7 +683,7 @@ class ProjectManager(GObject.Object, Loggable):
 
     def _projectLoadedCb(self, unused_project, unused_timeline):
         self.debug("Project loaded %s", self.current_project.props.uri)
-        self.emit("new-project-loaded", self.current_project, True)
+        self.emit("new-project-loaded", self.current_project)
         if self.__missing_uris:
             self.current_project.setModificationState(True)
         self.time_loaded = time.time()
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 2df989b..8fb85ac 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1267,7 +1267,7 @@ class TimelineContainer(Gtk.Grid, Zoomable, Loggable):
 
     def setProjectManager(self, projectmanager):
         if self._projectmanager is not None:
-            self._projectmanager.disconnect_by_func(self._projectChangedCb)
+            self._projectmanager.disconnect_by_func(self._projectLoadedCb)
 
         self._projectmanager = projectmanager
 
@@ -1275,7 +1275,7 @@ class TimelineContainer(Gtk.Grid, Zoomable, Loggable):
             projectmanager.connect(
                 "new-project-created", self._projectCreatedCb)
             projectmanager.connect(
-                "new-project-loaded", self._projectChangedCb)
+                "new-project-loaded", self._projectLoadedCb)
 
     def zoomFit(self):
         self.app.write_action("zoom-fit", {"optional-action-type": True})
@@ -1811,7 +1811,7 @@ class TimelineContainer(Gtk.Grid, Zoomable, Loggable):
             self.ges_timeline.set_snapping_distance(
                 Zoomable.pixelToNs(self._settings.edgeSnapDeadband))
 
-    def _projectChangedCb(self, unused_app, project, unused_fully_loaded):
+    def _projectLoadedCb(self, unused_app, project):
         """
         When a project is loaded, we connect to its pipeline
         """
diff --git a/pitivi/titleeditor.py b/pitivi/titleeditor.py
index 9d941bc..ecabb11 100644
--- a/pitivi/titleeditor.py
+++ b/pitivi/titleeditor.py
@@ -271,7 +271,7 @@ class TitleEditor(Loggable):
 
         self._project.pipeline.commit_timeline()
 
-    def _newProjectLoadedCb(self, app, project, unused_fully_loaded):
+    def _newProjectLoadedCb(self, app, project):
         if self._selection is not None:
             self._selection.disconnect_by_func(self._selectionChangedCb)
             self._selection = None


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