diff options
author | Radek Vykydal <rvykydal@redhat.com> | 2010-05-05 09:42:57 +0200 |
---|---|---|
committer | Radek Vykydal <rvykydal@redhat.com> | 2010-05-07 16:10:54 +0200 |
commit | 3be17d57d0aa37e25c63521d3854e9b421c250eb (patch) | |
tree | b91a9478be6f3be49ecbc9976d940501f87a9b57 | |
parent | 336efd35dda928d0d1d2e46989af1bfe83442bbc (diff) | |
download | anaconda-3be17d57d0aa37e25c63521d3854e9b421c250eb.tar.gz anaconda-3be17d57d0aa37e25c63521d3854e9b421c250eb.tar.xz anaconda-3be17d57d0aa37e25c63521d3854e9b421c250eb.zip |
Use gtk consts instead of magic ints.
-rw-r--r-- | iw/blpasswidget.py | 4 | ||||
-rw-r--r-- | iw/lvm_dialog_gui.py | 8 | ||||
-rw-r--r-- | iw/osbootwidget.py | 4 | ||||
-rw-r--r-- | iw/partition_dialog_gui.py | 4 | ||||
-rw-r--r-- | iw/raid_dialog_gui.py | 8 |
5 files changed, 14 insertions, 14 deletions
diff --git a/iw/blpasswidget.py b/iw/blpasswidget.py index c07b4df30..c6e6881bd 100644 --- a/iw/blpasswidget.py +++ b/iw/blpasswidget.py @@ -97,7 +97,7 @@ class BootloaderPasswordWidget: # get the bootloader password def passwordWindow(self, *args): dialog = gtk.Dialog(_("Enter Boot Loader Password"), self.parent) - dialog.add_button('gtk-cancel', 2) + dialog.add_button('gtk-cancel', gtk.RESPONSE_CANCEL) dialog.add_button('gtk-ok', 1) dialog.set_position(gtk.WIN_POS_CENTER) gui.addFrame(dialog) @@ -132,7 +132,7 @@ class BootloaderPasswordWidget: while 1: rc = dialog.run() - if rc in [2, gtk.RESPONSE_DELETE_EVENT]: + if rc in [gtk.RESPONSE_CANCEL, 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 73a27f72d..2474627ea 100644 --- a/iw/lvm_dialog_gui.py +++ b/iw/lvm_dialog_gui.py @@ -505,7 +505,7 @@ class VolumeGroupEditor: # Here is where the gtk crap begins. dialog = gtk.Dialog(tstr, self.parent) gui.addFrame(dialog) - dialog.add_button('gtk-cancel', 2) + dialog.add_button('gtk-cancel', gtk.RESPONSE_CANCEL) dialog.add_button('gtk-ok', 1) dialog.set_position(gtk.WIN_POS_CENTER) @@ -569,7 +569,7 @@ class VolumeGroupEditor: while 1: rc = dialog.run() - if rc in [2, gtk.RESPONSE_DELETE_EVENT]: + if rc in [gtk.RESPONSE_CANCEL, gtk.RESPONSE_DELETE_EVENT]: if isNew: del self.lvs[lv['name']] dialog.destroy() @@ -958,7 +958,7 @@ class VolumeGroupEditor: while 1: rc = self.dialog.run() - if rc in [2, gtk.RESPONSE_DELETE_EVENT]: + if rc in [gtk.RESPONSE_CANCEL, gtk.RESPONSE_DELETE_EVENT]: self.destroy() return [] @@ -1285,7 +1285,7 @@ class VolumeGroupEditor: dialog = gtk.Dialog(tstr, self.parent) gui.addFrame(dialog) - dialog.add_button('gtk-cancel', 2) + dialog.add_button('gtk-cancel', gtk.RESPONSE_CANCEL) dialog.add_button('gtk-ok', 1) dialog.set_position(gtk.WIN_POS_CENTER) diff --git a/iw/osbootwidget.py b/iw/osbootwidget.py index 42fc73a39..8c89d4383 100644 --- a/iw/osbootwidget.py +++ b/iw/osbootwidget.py @@ -128,7 +128,7 @@ class OSBootWidget: # adds/edits a new "other" os to the boot loader config def editOther(self, oldDevice, oldLabel, isDefault, isRoot = 0): dialog = gtk.Dialog(_("Image"), self.parent) - dialog.add_button('gtk-cancel', 2) + dialog.add_button('gtk-cancel', gtk.RESPONSE_CANCEL) dialog.add_button('gtk-ok', 1) dialog.set_position(gtk.WIN_POS_CENTER) gui.addFrame(dialog) @@ -197,7 +197,7 @@ class OSBootWidget: rc = dialog.run() # cancel - if rc in [2, gtk.RESPONSE_DELETE_EVENT]: + if rc in [gtk.RESPONSE_CANCEL, gtk.RESPONSE_DELETE_EVENT]: break label = labelEntry.get_text() diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py index fc93d666b..9279636ea 100644 --- a/iw/partition_dialog_gui.py +++ b/iw/partition_dialog_gui.py @@ -105,7 +105,7 @@ class PartitionEditor: luksdev = None # user hit cancel, do nothing - if rc in [2, gtk.RESPONSE_DELETE_EVENT]: + if rc in [gtk.RESPONSE_CANCEL, gtk.RESPONSE_DELETE_EVENT]: self.destroy() return [] @@ -380,7 +380,7 @@ class PartitionEditor: self.dialog = gtk.Dialog(tstr, self.parent) gui.addFrame(self.dialog) - self.dialog.add_button('gtk-cancel', 2) + self.dialog.add_button('gtk-cancel', gtk.RESPONSE_CANCEL) self.dialog.add_button('gtk-ok', 1) self.dialog.set_position(gtk.WIN_POS_CENTER) diff --git a/iw/raid_dialog_gui.py b/iw/raid_dialog_gui.py index ee0aea70f..9b633d6d8 100644 --- a/iw/raid_dialog_gui.py +++ b/iw/raid_dialog_gui.py @@ -142,7 +142,7 @@ class RaidEditor: rc = self.dialog.run() # user hit cancel, do nothing - if rc in [2, gtk.RESPONSE_DELETE_EVENT]: + if rc in [gtk.RESPONSE_CANCEL, gtk.RESPONSE_DELETE_EVENT]: self.destroy() return [] @@ -404,7 +404,7 @@ class RaidEditor: dialog = gtk.Dialog(tstr, self.parent) gui.addFrame(dialog) - dialog.add_button('gtk-cancel', 2) + dialog.add_button('gtk-cancel', gtk.RESPONSE_CANCEL) self.ok_button = dialog.add_button('gtk-ok', 1) dialog.set_position(gtk.WIN_POS_CENTER) @@ -787,7 +787,7 @@ class RaidCloneDialog: rc = self.dialog.run() # user hit cancel, do nothing - if rc in [2, gtk.RESPONSE_DELETE_EVENT]: + if rc in [gtk.RESPONSE_CANCEL, gtk.RESPONSE_DELETE_EVENT]: self.destroy() return None @@ -861,7 +861,7 @@ class RaidCloneDialog: self.dialog = gtk.Dialog(_("Clone Drive Tool"), self.parent) self.dialog.set_default_size(500, 200) gui.addFrame(self.dialog) - self.dialog.add_button('gtk-cancel', 2) + self.dialog.add_button('gtk-cancel', gtk.RESPONSE_CANCEL) self.dialog.add_button('gtk-ok', 1) self.dialog.set_position(gtk.WIN_POS_CENTER) |