GNOME Bugzilla – Bug 350294
_initGUIState in GUI prefs can issue a TypeError
Last modified: 2006-08-08 07:05:27 UTC
From an e-mail with community member Jorge Sandín: The first time you start up orca (without ~/.orca directory and user-settings.py file), there's an error:
+ Trace 70047
self.magMouseTrackingComboBox.set_active(index)
---- A potential workaround provided by Jorge is this (thanks Jorge!): Change the line orca_gui_prefs.py: 388: index = self._getComboBoxIndex(self.magMouseTrackingComboBox, mode) self.magMouseTrackingComboBox.set_active(index) to: index = self._getComboBoxIndex(self.magMouseTrackingComboBox, mode) if index != None: self.magMouseTrackingComboBox.set_active(index)
Created attachment 70404 [details] [review] Fix for the problem (plus one other).
There were two problems here: 1/ The _getComboBoxIndex() in orca_gui_prefs.py should return 0 rather than None if the "str" string to search for isn't found. There should have been a valid mode string going into the _getComboBoxIndex() routine (from the else: mode = _("Centered") in the _initGUIState() above. If this is not found, this suggests that you are running in a locale where these strings have not been consistently localized. For now, the _getComboBoxIndex() is more bullet-proof and will return 0 (the default -- Centered -- value). 2/ The initial value for orca_state.lastInputEventTimestamp should have been 0 not None. When there is no initial ~/.orca directory and/or ~/.orca/user-settings.py file, then this initial value is going to be used and therefore be of the correct type.
*** Bug 350382 has been marked as a duplicate of this bug. ***