From 4f05f4a2a539d49a9098285e3f991a36c71a826f Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Fri, 22 Apr 2005 15:56:33 +0000 Subject: [PATCH] while ok == 0 becomes while not ok --- src/config.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/config.py b/src/config.py index 2858ddeae..e25489440 100644 --- a/src/config.py +++ b/src/config.py @@ -38,6 +38,7 @@ gtk.glade.textdomain (APP) GTKGUI_GLADE = 'gtkgui.glade' + # helper function to create #aabbcc color string def mk_color_string(color): return '#' + (hex(color.red) + '0')[2:4] + \ @@ -498,15 +499,15 @@ class Preferences_window: file = os.path.join(os.getcwd(), file) dialog.set_filename(file) file = '' - ok = 0 - while ok == 0: + ok = False + while not ok: response = dialog.run() if response == gtk.RESPONSE_OK: file = dialog.get_filename() if os.path.exists(file): - ok = 1 + ok = True else: - ok = 1 + ok = True dialog.destroy() if file: self.xml.get_widget('sounds_entry').set_text(file) @@ -1476,15 +1477,15 @@ class Add_remove_emoticons_window: file = os.path.join(os.getcwd(), file) dialog.set_filename(file) file = '' - ok = 0 - while ok == 0: + ok = False + while not ok: response = dialog.run() if response == gtk.RESPONSE_OK: file = dialog.get_filename() if self.image_is_ok(file): - ok = 1 + ok = True else: - ok = 1 + ok = True dialog.destroy() if file: model.set_value(iter, 1, file)