[virt-tools-list] [PATCH virt-manager 1/2] virtManager, create: prevent focus on widget when not visible

Giuseppe Scrivano gscrivan at redhat.com
Fri Jul 4 13:06:17 UTC 2014


it fixes this error:

(virt-manager:11184): Gtk-WARNING **: GtkEntry - did not receive focus-out-event. If you connect a handler to this signal, it must return FALSE so the entry gets the event as well.

Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
---
 virtManager/create.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/virtManager/create.py b/virtManager/create.py
index a04b8ac..636f48e 100644
--- a/virtManager/create.py
+++ b/virtManager/create.py
@@ -1197,7 +1197,8 @@ class vmmCreate(vmmGObjectUI):
                 return
 
         self.widget("install-os-version-entry").set_text("")
-        self.widget("install-os-version-entry").grab_focus()
+        if self.widget("install-os-version").get_visible():
+            self.widget("install-os-version-entry").grab_focus()
 
     def change_os_version(self, box):
         show_all = uiutil.get_list_selection(box, 3)
-- 
1.9.3




More information about the virt-tools-list mailing list