GNOME Bugzilla – Bug 340849
orca --setup is not enabling the accessibility flag.
Last modified: 2008-07-22 19:20:58 UTC
Please describe the problem: Orca is not enabling the accessibility flag, and is displaying an error message that refers to the depricated orca-setup script. Steps to reproduce: 1. Run orca --setup from an account which does not have the flag enabled. 2. 3. Actual results: If the accessibility flag has not been previously enabled in the current account, running orca --setup yields the following message: accessibility has not been enabled for this session. Please run orca-setup, and then logout and log back in. Expected results: Orca should enable the flag, and offer the user the option of logging out immediately. Does this happen every time? yes. Other information:
I'm not quite sure how to go about doing the automatic log out thing, but I think it's something like the following: import gnome.ui ... client = gnome.ui.master_client() client.request_save(gnome.ui.SAVE_GLOBAL, # Save style True, # Shutdown gnome.ui.INTERACT_ANY, # Allow user interaction False, # Fast True) # All apps save state I played with this, but could not get the master_client() method to return a non-null value.
Created attachment 64945 [details] [review] Partially address the problem - does not offer GUI to log out. This partially addresses the problem, but does not offer the user the option to logout. Instead, it just tells them to do so. In order to offer the option to log out, I need help from Rich to create a log out dialog, I think?
The gnopernicus equivalent dialog looks like: +-------------------------------------+ | Question | +-------------------------------------+ | | | ? You will need to logout for | | changes to take effect. | | Do you want to log out now? | | | +-------------------------------------+ | [ No ] [ Yes [ | +-------------------------------------+ I'll need to add this dialog to the Glade file and hook up the logic in Orca to use it.
Dialog box GUI added to the Orca Glade file. Still need to adjust the code to use it though.
Because there doesn't appear (according to Will) to be a Python API equivalent to the C code above, we are going to take a slightly different approach to solving this problem for a user that has requested a GUI setup. If it's determined (beforehand) that the accessibility flag is not already enabled, then the user will just get a text/console setup. When that is completed, orca will tell them: "Accessibility has just been enabled for this session." "Please logout and log back in and rerun orca." I'm working on a patch for this part now. I'll also leave the logoutDialog in the Glade file, just in case that needed Python API call becomes available in the future.
For 0.2.4, if Orca detects the accessibility flag is not enabled, it will dump the user into text setup made, let them do some set up, enable accessibility, and then tell them to log out and log back in. I'm going to turn this bug into an RFE for having the GUI offer the option to automatically log the user out.
Need to file a blocker rfe with the python folks to get a binding for the API call that we need.
I've filed bug #356011 against gnome-python for the "client = gnome.ui.master_client() returning None" problem. I've attached a small standalone Python script that reproduces that problem. I've adjusted the summary of this bug to show that it is currently blocked.
Seems the magic to get this to work is to make sure you call gnome.init() before using gnome.ui.master.client(). Something like: import gnome import gnome.ui program = gnome.init('orca', '1.0', gnome.libgnome_module_info_get(), sys.argv, []) client = gnome.ui.master_client() client.request_save(gnome.ui.SAVE_GLOBAL, # Save style True, # Shutdown gnome.ui.INTERACT_ANY, # Allow user interaction False, # Fast True) # All apps save state This seems to work nicely. We have all the pieces now. I'll put together a patch which does this.
Created attachment 72873 [details] [review] Patch to almost fix the problem. The attached patch will almost provide the missing functionality. If the gconf accessibility key wasn't enabled, and the user previously didn't have a ~/.orca directory, then when Orca is started the user will be asked the setup question on the console. If they are logged into the desktop, then will will be told that they need to logout in order to enable accessibility and would they like to logout now. If they answer yes, they Orca will log the user out of the desktop. The only problem is that the current test in Orca to determine if the user is logged into the desktop is insufficient. I've filed bug #356179 on that. When a correct test is found, this patch needs to be adjusted accordingly.
Created attachment 72879 [details] [review] Patch to fix the problem. Modified the previous patch to include correct code to determine if we are running within the GNOME desktop.
Changes checked into CVS HEAD. Closing as FIXED.