After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 340849 - orca --setup is not enabling the accessibility flag.
orca --setup is not enabling the accessibility flag.
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
0.2.x
Other All
: Normal enhancement
: 2.18.0
Assigned To: Rich Burridge
Orca Maintainers
Depends on: 356179
Blocks:
 
 
Reported: 2006-05-06 18:28 UTC by Al Puzzuoli
Modified: 2008-07-22 19:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Partially address the problem - does not offer GUI to log out. (2.38 KB, patch)
2006-05-07 00:47 UTC, Willie Walker
committed Details | Review
Patch to almost fix the problem. (2.23 KB, patch)
2006-09-15 21:13 UTC, Rich Burridge
needs-work Details | Review
Patch to fix the problem. (2.31 KB, patch)
2006-09-15 22:29 UTC, Rich Burridge
none Details | Review

Description Al Puzzuoli 2006-05-06 18:28:34 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:
Comment 1 Willie Walker 2006-05-07 00:33:07 UTC
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.
Comment 2 Willie Walker 2006-05-07 00:47:33 UTC
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?
Comment 3 Rich Burridge 2006-05-08 15:39:19 UTC
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.
Comment 4 Rich Burridge 2006-05-11 16:16:21 UTC
Dialog box GUI added to the Orca Glade file. Still need to adjust
the code to use it though.
Comment 5 Rich Burridge 2006-05-12 15:23:01 UTC
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.

Comment 6 Willie Walker 2006-05-12 16:41:17 UTC
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.
Comment 7 Rich Burridge 2006-09-06 22:12:33 UTC
Need to file a blocker rfe with the python folks to get a binding for the API call that we need.
Comment 8 Rich Burridge 2006-09-14 20:27:06 UTC
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.
Comment 9 Rich Burridge 2006-09-15 17:29:37 UTC
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.
Comment 10 Rich Burridge 2006-09-15 21:13:27 UTC
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.
Comment 11 Rich Burridge 2006-09-15 22:29:53 UTC
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.
Comment 12 Rich Burridge 2006-09-15 22:33:27 UTC
Changes checked into CVS HEAD. Closing as FIXED.