[orca/new-settings] Made the profile names comparison case insensitive. If the case is different but it's the same profi
- From: Juanje Ojeda Croissier <jojeda src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/new-settings] Made the profile names comparison case insensitive. If the case is different but it's the same profi
- Date: Fri, 10 Sep 2010 10:23:51 +0000 (UTC)
commit 3f88e8f50fb8c0e4b50484836bc1c75b019cd1b2
Author: Juanje Ojeda <jojeda emergya es>
Date: Fri Sep 10 12:17:50 2010 +0200
Made the profile names comparison case insensitive. If the case is different but it's the same profile name, it won't add a new combo box item.
src/orca/orca_gui_prefs.py | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index 20a98d3..795ccde 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -4418,12 +4418,13 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
"""Show profile Dialog to add a new one"""
profileToSaveLabel = orca_gui_profile.showProfileUI()
- profileToSave = profileToSaveLabel.replace(' ','_')
+ profileToSave = profileToSaveLabel.replace(' ','_').lower()
- def saveActiveProfile():
- profile = {profileToSave: self.profilesComboModel.append([profileToSaveLabel])}
- activeProfile = int(self.profilesComboModel.get_string_from_iter(profile[profileToSave]))
- self.profilesCombo.set_active(activeProfile)
+ def saveActiveProfile(newProfile = True):
+ if newProfile:
+ profile = {profileToSave: self.profilesComboModel.append([profileToSaveLabel])}
+ activeProfile = int(self.profilesComboModel.get_string_from_iter(profile[profileToSave]))
+ self.profilesCombo.set_active(activeProfile)
self.prefsDict['activeProfile'] = profileToSave
self.writeUserPreferences()
@@ -4453,7 +4454,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
if response == gtk.RESPONSE_YES:
dialog.destroy()
- saveActiveProfile()
+ saveActiveProfile(False)
else:
dialog.destroy()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]