[pitivi: 3/18] Fix 635994: Show the Startup Wizard only when no project is loaded or created.
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 3/18] Fix 635994: Show the Startup Wizard only when no project is loaded or created.
- Date: Fri, 18 Mar 2011 12:09:46 +0000 (UTC)
commit 1ae79db29c52d26dd5b10e50d22930f090667c20
Author: Alex BÄ?luÈ? <alexandru balut gmail com>
Date: Sun Dec 12 18:23:03 2010 +0100
Fix 635994: Show the Startup Wizard only when no project is loaded or created.
pitivi/application.py | 24 +++++++++++++++++-------
pitivi/ui/mainwindow.py | 11 -----------
2 files changed, 17 insertions(+), 18 deletions(-)
---
diff --git a/pitivi/application.py b/pitivi/application.py
index 0f3acbd..ea00e19 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -53,9 +53,9 @@ from pitivi.projectmanager import ProjectManager, ProjectLogObserver
from pitivi.undo import UndoableActionLog, DebugActionLogObserver
from pitivi.timeline.timeline_undo import TimelineLogObserver
from pitivi.sourcelist_undo import SourceListLogObserver
-from pitivi.undo import UndoableAction
from pitivi.ui.viewer import PitiviViewer
from pitivi.actioner import Renderer, Previewer
+from pitivi.ui.startupwizard import StartUpWizard
# FIXME : Speedup loading time
# Currently we load everything in one go
@@ -272,12 +272,18 @@ class InteractivePitivi(Pitivi):
self.gui = PitiviMainWindow(self)
self.gui.show()
- if not options.import_sources and args:
- if options.render_output:
- self.output_file = "file://%s" % os.path.abspath(options.render_output)
- # load a project file
- project = "file://%s" % os.path.abspath(args[0])
- self.projectManager.loadProject(project)
+ if not options.import_sources:
+ if args:
+ if options.render_output:
+ self.output_file = "file://%s" % os.path.abspath(options.render_output)
+ # load a project file
+ project = "file://%s" % os.path.abspath(args[0])
+ self.projectManager.loadProject(project)
+ else:
+ self.projectManager.newBlankProject()
+
+ self.projectManager.connect("new-project-loaded", self._quitWizardCb)
+ self.wizard = StartUpWizard(self)
else:
# load the passed filenames, optionally adding them to the timeline
# (useful during development)
@@ -292,6 +298,10 @@ class InteractivePitivi(Pitivi):
# run the mainloop
self.mainloop.run()
+ def _quitWizardCb(self, unused_projectManager, uri):
+ if uri.uri is not None:
+ self.wizard.quit()
+
def _deleteCb(self, unused_widget, unused_data):
self.shutdown()
diff --git a/pitivi/ui/mainwindow.py b/pitivi/ui/mainwindow.py
index e78ac94..74cfa3c 100644
--- a/pitivi/ui/mainwindow.py
+++ b/pitivi/ui/mainwindow.py
@@ -64,7 +64,6 @@ from pitivi.ui.clipproperties import ClipProperties
from pitivi.ui.common import beautify_factory
from pitivi.utils import beautify_length
from pitivi.ui.zoominterface import Zoomable
-from pitivi.ui.startupwizard import StartUpWizard
if HAVE_GCONF:
D_G_INTERFACE = "/desktop/gnome/interface"
@@ -196,7 +195,6 @@ class PitiviMainWindow(gtk.Window, Loggable):
self._createUi(instance)
self.app = instance
- self._launchWizard()
self.manager = RecentManager()
self._zoom_duration_changed = False
self._missingUriOnLoading = False
@@ -205,8 +203,6 @@ class PitiviMainWindow(gtk.Window, Loggable):
self._projectManagerNewProjectLoadingCb)
self.app.projectManager.connect("new-project-loaded",
self._projectManagerNewProjectLoadedCb)
- self.app.projectManager.connect("new-project-loaded",
- self._quitWizardCb)
self.app.projectManager.connect("new-project-failed",
self._projectManagerNewProjectFailedCb)
self.app.projectManager.connect("save-project-failed",
@@ -525,13 +521,6 @@ class PitiviMainWindow(gtk.Window, Loggable):
def _connectToSourceList(self):
self.sourcelist.connect('play', self._sourceListPlayCb)
- def _launchWizard(self):
- self._wizard = StartUpWizard(self.app)
-
- def _quitWizardCb(self, projectManager, uri = None):
- if uri.uri != None:
- self._wizard.quit()
-
def toggleFullScreen(self):
""" Toggle the fullscreen mode of the application """
if not self.is_fullscreen:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]