[PATCH] Turn off CAN_FOCUS for MessageWindows (#582663)

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

 



note: I don't like having to traverse the children like this to 
find the label, but there is no other reference to it that I could
find in the objct. Hence logging the error if it ever changes.


Resolves: rhbz#582663
---
 gui.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/gui.py b/gui.py
index 846f145..a1f9778 100755
--- a/gui.py
+++ b/gui.py
@@ -724,6 +724,13 @@ class MessageWindow:
             style = gtk.MESSAGE_INFO
 
         self.dialog = gtk.MessageDialog(mainWindow, 0, style, buttons, str(text))
+        # Get the dialog text and turn off focus. If MessageDialog ever changes
+        # its order this will need to be adjusted.
+        label = self.dialog.get_content_area().get_children()[0].get_children()[1].get_children()[0]
+        if isinstance(label, gtk.Label):
+            label.unset_flags(gtk.CAN_FOCUS)
+        else:
+            log.error("gtk.Label not found in MessageDialog. Fix path in MessageWindow class.")
 
         if parent:
             self.dialog.set_transient_for(parent)
-- 
1.6.6.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux