[PATCH] Handle Esc keypress in (some more) dialogs as Cancel - (#520110).

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

 



Addition to patch 4fff93ac8e3b3187af5f50d17a065fafc610a5df.
---
 iw/blpasswidget.py         |    2 +-
 iw/lvm_dialog_gui.py       |    4 ++--
 iw/osbootwidget.py         |    2 +-
 iw/partition_dialog_gui.py |    2 +-
 iw/partition_gui.py        |    2 +-
 iw/raid_dialog_gui.py      |    4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/iw/blpasswidget.py b/iw/blpasswidget.py
index d1a72a8..e23e07d 100644
--- a/iw/blpasswidget.py
+++ b/iw/blpasswidget.py
@@ -132,7 +132,7 @@ class BootloaderPasswordWidget:
 
         while 1:
             rc = dialog.run()
-            if rc == 2:
+            if rc in [2, gtk.RESPONSE_DELETE_EVENT]:
                 break
 
             if pwEntry.get_text() != confirmEntry.get_text():
diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index e226650..d58a748 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -556,7 +556,7 @@ class VolumeGroupEditor:
 
         while 1:
             rc = dialog.run()
-            if rc == 2:
+            if rc in [2, gtk.RESPONSE_DELETE_EVENT]:
                 if isNew:
                     del self.lvs[lv['name']]
                 dialog.destroy()
@@ -914,7 +914,7 @@ class VolumeGroupEditor:
 	while 1:
 	    rc = self.dialog.run()
 
-	    if rc == 2:
+            if rc in [2, gtk.RESPONSE_DELETE_EVENT]:
 		self.destroy()
 		return []
 
diff --git a/iw/osbootwidget.py b/iw/osbootwidget.py
index 2f066da..86f1718 100644
--- a/iw/osbootwidget.py
+++ b/iw/osbootwidget.py
@@ -196,7 +196,7 @@ class OSBootWidget:
             rc = dialog.run()
 
             # cancel
-            if rc == 2:
+            if rc in [2, gtk.RESPONSE_DELETE_EVENT]:
                 break
 
             label = labelEntry.get_text()
diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py
index 5980efc..7e885b4 100644
--- a/iw/partition_dialog_gui.py
+++ b/iw/partition_dialog_gui.py
@@ -107,7 +107,7 @@ class PartitionEditor:
             luksdev = None
 	    
             # user hit cancel, do nothing
-            if rc == 2:
+            if rc in [2, gtk.RESPONSE_DELETE_EVENT]:
                 self.destroy()
                 return []
 
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index f18a652..1b5a4fc 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -1279,7 +1279,7 @@ class PartitionWindow(InstallWindow):
 	dialog.show_all()
 	rc = dialog.run()
 	dialog.destroy()
-	if rc == 2:
+        if rc in [2, gtk.RESPONSE_DELETE_EVENT]:
 	    return
 
 	# see which option they choose
diff --git a/iw/raid_dialog_gui.py b/iw/raid_dialog_gui.py
index bb457a5..54751d3 100644
--- a/iw/raid_dialog_gui.py
+++ b/iw/raid_dialog_gui.py
@@ -140,7 +140,7 @@ class RaidEditor:
 	    rc = self.dialog.run()
 
 	    # user hit cancel, do nothing
-	    if rc == 2:
+            if rc in [2, gtk.RESPONSE_DELETE_EVENT]:
 		self.destroy()
 		return []
 
@@ -696,7 +696,7 @@ class RaidCloneDialog:
 	    rc = self.dialog.run()
 
 	    # user hit cancel, do nothing
-	    if rc == 2:
+            if rc in [2, gtk.RESPONSE_DELETE_EVENT]:
 		self.destroy()
 		return None
 
-- 
1.6.0.6

_______________________________________________
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