[orca/new-settings] Made posible to check conflicts for profile names with spaces



commit d1c96d6bf6fb41a84a774a7164d60c2aca9741c5
Author: Juanje Ojeda <jojeda emergya es>
Date:   Fri Sep 10 11:53:50 2010 +0200

    Made posible to check conflicts for profile names with spaces

 src/orca/orca_gui_prefs.py |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index 063de14..20a98d3 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -4417,14 +4417,15 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
     def showProfileGUI(self, widget):
         """Show profile Dialog to add a new one"""
 
-        profileToSave = orca_gui_profile.showProfileUI()
+        profileToSaveLabel = orca_gui_profile.showProfileUI()
+        profileToSave = profileToSaveLabel.replace(' ','_')
 
         def saveActiveProfile():
-            profile = {profileToSave: self.profilesComboModel.append([profileToSave])}
+            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.replace(' ','_')
+            self.prefsDict['activeProfile'] = profileToSave
             self.writeUserPreferences()
 
 
@@ -4436,8 +4437,9 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
                 # We're here because given profile name exists, so we have
                 # to give that info to the user and give him the chance
                 # to continue, or not saving the profile
-                message = "Profile <b>%s</b> yet exists.\n" % profileToSave + \
-                      "Continue updating existent profile with these new changes?"
+                message = "Profile <b>%s</b> already exists.\n" % \
+                          profileToSaveLabel + \
+                          "Continue updating existent profile with these new changes?"
     
                 dialog = gtk.MessageDialog(None,
                         gtk.DIALOG_MODAL,



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