[pitivi: 31/41] Make the dependencies manager a modal window



commit 495f3c2fd0677830c5e92ec8c8b3c062bf46a3b6
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date:   Fri Aug 12 14:07:25 2011 +0200

    Make the dependencies manager a modal window

 pitivi/ui/depsmanager.py   |   12 +++++++-----
 pitivi/ui/startupwizard.py |    2 +-
 2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/ui/depsmanager.py b/pitivi/ui/depsmanager.py
index c92ed83..649d951 100644
--- a/pitivi/ui/depsmanager.py
+++ b/pitivi/ui/depsmanager.py
@@ -27,13 +27,14 @@ from gettext import gettext as _
 from pitivi.configure import get_ui_dir
 from pitivi.check import soft_deps
 
+
 class DepsManager(object):
     """Display a dialog listing missing soft dependencies.
-    The sane way to query packages (like frei0r), is by using PackageKit's GetRequires()
+    The sane way to query and install is by using PackageKit's InstallResource()
     """
 
-    def __init__(self):#, app):
-        #self.app = app
+    def __init__(self, app):
+        self.app = app
         self.builder = gtk.Builder()
         self.builder.add_from_file(os.path.join(get_ui_dir(), "depsmanager.ui"))
         self.builder.connect_signals(self)
@@ -44,7 +45,7 @@ class DepsManager(object):
     def _onCloseButtonClickedCb(self, unused_button):
         self.hide()
 
-    def _onInstallButtonClickedCb(self, unused_button): # TODO: do stuff here
+    def _onInstallButtonClickedCb(self, unused_button):  # TODO: do stuff here
         self.hide()
         for foo in soft_deps:
             print foo
@@ -58,7 +59,8 @@ class DepsManager(object):
         self.builder.get_object("pkg_list").set_text(label_contents)
 
     def show(self):
-#        self.window.set_transient_for(self.app.gui)
+        self.window.set_transient_for(self.app.gui)
+        self.window.set_modal(True)
         self._setDepsLabel()
         self.window.show()
         self.window.grab_focus()
diff --git a/pitivi/ui/startupwizard.py b/pitivi/ui/startupwizard.py
index 1e2ddcc..7198b3f 100644
--- a/pitivi/ui/startupwizard.py
+++ b/pitivi/ui/startupwizard.py
@@ -96,7 +96,7 @@ class StartUpWizard(object):
 
     def _onMissingDepsButtonClickedCb(self, unused_button):
         self.hide()
-        self.dep_manager = DepsManager()
+        self.dep_manager = DepsManager(self.app)
 
     def _userManualCb(self, unused_button):
         """Handle a click on the Help button."""



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