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

Re: nm-c-e integration take II - now with metacity! [PATCH 8/7 added]



Radek Vykydal wrote:
if you play with them you can see some issues:

* nm-c-e window is added as blocking which in combination
with metacity enabling moving of blocking windows (e.g. device
discovery) reveals that we are running in single thread -
background anaconda window is not repainted. I'd use some simpler
non-movable widget for waiting windows, but for nm-c-e we'll
probably need to run it non-blocking from anaconda
* Also focus issues are apparent with nm-connection-editor
when you click on anaconda window (similar to what Martin Gracik
was solving for firstboot I think).

The second * is actually mainly windows stacking issue.

Attached patch should solve both issues for nm-c-e.

Radek
>From 657ab80c6bc8e9c38c06175e09729d1ddb3e8b7e Mon Sep 17 00:00:00 2001
From: Radek Vykydal <rvykydal redhat com>
Date: Mon, 22 Feb 2010 16:28:03 +0100
Subject: [PATCH] Fix focus, repaint, and stack issues for nm-c-e.

* nm-c-e is called non-blocking
* fullscreen of icw doesn't allow to stack nm-c-e properly
* prevent focus change by making icw insensitive
---
 gui.py            |    2 +-
 iw/network_gui.py |   17 ++++++++++++++---
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/gui.py b/gui.py
index 2798e4c..f09faba 100755
--- a/gui.py
+++ b/gui.py
@@ -1434,7 +1434,7 @@ class InstallControlWindow:
             if flags.livecdInstall:
                 i.hide()
             else:
-                self.window.fullscreen()
+                self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DESKTOP)
 
         if flags.debug:
             self.mainxml.get_widget("debugButton").show_now()
diff --git a/iw/network_gui.py b/iw/network_gui.py
index a7b52da..2a3cac9 100644
--- a/iw/network_gui.py
+++ b/iw/network_gui.py
@@ -26,6 +26,8 @@ from iw_gui import *
 import gui
 import network
 import iutil
+import gobject
+import subprocess
 
 from constants import *
 import gettext
@@ -85,7 +87,16 @@ class NetworkWindow(InstallWindow):
         self.anaconda.network.hostname = hostname
         return None
 
+    def _NMExited(self, pid, condition, data):
+        self.intf.icw.window.set_sensitive(True)
+
     def _NMConfig(self, *args):
-        iutil.execWithRedirect("/usr/bin/nm-connection-editor", [],
-                               stdout = "/dev/tty5",
-                               stderr = "/dev/tty5")
+
+        self.intf.icw.window.set_sensitive(False)
+        # TODO - catch logging
+        # TODO - exception catching
+        cmd = ["/usr/bin/nm-connection-editor"]
+        out = open("/dev/tty5", "w")
+        proc = subprocess.Popen(cmd, stdout=out, stderr=out)
+        gobject.child_watch_add(proc.pid, self._NMExited, data=None, priority=gobject.PRIORITY_DEFAULT)
+        # TODO: close out/logging
-- 
1.6.0.6


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