[pitivi: 8/28] Changed StartupWizardGuiPitivi to forget about the wizard once a project has been loaded successfull
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 8/28] Changed StartupWizardGuiPitivi to forget about the wizard once a project has been loaded successfull
- Date: Thu, 14 Jul 2011 16:23:53 +0000 (UTC)
commit c9ab0500fd748c580c3aadf75d0f4c9fe8efd484
Author: Alex BÄluÈ <alexandru balut gmail com>
Date: Thu Jul 7 20:48:22 2011 +0200
Changed StartupWizardGuiPitivi to forget about the wizard once a project has been loaded successfully
pitivi/application.py | 14 ++++++++------
pitivi/ui/startupwizard.py | 3 +++
2 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/application.py b/pitivi/application.py
index bd21e69..46d521e 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -371,10 +371,10 @@ class StartupWizardGuiPitivi(FullGuiPitivi):
def __init__(self, debug=False):
FullGuiPitivi.__init__(self, debug)
self.projectManager.newBlankProject()
+ self.projectManager.connect("new-project-failed", self._projectFailedCb)
+ self.projectManager.connect("new-project-loaded", self._projectLoadedCb)
def _createGui(self):
- self.projectManager.connect("new-project-loading", self._hideWizardCb)
- self.projectManager.connect("new-project-failed", self._showWizardCb)
self.wizard = StartUpWizard(self)
return FullGuiPitivi._createGui(self)
@@ -382,11 +382,13 @@ class StartupWizardGuiPitivi(FullGuiPitivi):
FullGuiPitivi._showGui(self)
self.wizard.show()
- def _hideWizardCb(self, unused_projectManager, uri):
- if uri is not None:
- self.wizard.hide()
+ def _projectLoadedCb(self, unused_project_manager, project):
+ self.projectManager.disconnect_by_function(self._projectFailedCb)
+ self.projectManager.disconnect_by_function(self._projectLoadedCb)
+ del self.wizard
- def _showWizardCb(self, unused_projectManager, unused_uri, unused_exception):
+ def _projectFailedCb(self, unused_project_manager, unused_uri,
+ unused_exception):
self.wizard.show()
diff --git a/pitivi/ui/startupwizard.py b/pitivi/ui/startupwizard.py
index cb3b0f3..199840a 100644
--- a/pitivi/ui/startupwizard.py
+++ b/pitivi/ui/startupwizard.py
@@ -38,10 +38,13 @@ class StartUpWizard(object):
def _newProjectCb(self, unused_button4):
self.hide()
+ # A new project has already been created, so only display
+ # the Project Settings dialog.
self.app.gui.showProjectSettingsDialog()
def _loadCb(self, unused_button3):
self.data = unquote(self.data)
+ self.hide()
self.app.projectManager.loadProject(self.data)
def _keypressCb(self, widget, event):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]