Re: [rhel6-branch] More partition dialogs focusing after error (#679810)

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

 



On 09/09/2011 03:52 PM, Martin Gracik wrote:
On partitioning errors the dialogs loose focus, after
the treeview is refreshed.
Before calling the present() function we need to clear
the gtk pending events, otherwise the treeview steels
the focus away.
---
  iw/partition_gui.py |   40 ++++++++++++++++++++++++++--------------
  1 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 6e4e7bf..3094bce 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -1650,19 +1650,21 @@ class PartitionWindow(InstallWindow):
                  # FIXME: this needs to handle exceptions
                  self.storage.devicetree.registerAction(action)

-	    if self.refresh(justRedraw=True):
+            if self.refresh(justRedraw=True):
                  actions.reverse()
                  for action in actions:
                      self.storage.devicetree.cancelAction(action)
                      if self.refresh():
                          raise RuntimeError, ("Returning partitions to state "
                                               "prior to RAID edit failed")
-                continue
-	    else:
-		break

-	raideditor.destroy()		
+                while gtk.events_pending():
+                    gtk.main_iteration()

Perhaps you want to call gui.processEvents()?

Ales

_______________________________________________
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