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 645890 - add dialog box asking user to enable accessibility
add dialog box asking user to enable accessibility
Status: RESOLVED FIXED
Product: caribou
Classification: Applications
Component: default
git master
Other Linux
: Normal normal
: ---
Assigned To: caribou-maint
caribou-maint
Depends on:
Blocks:
 
 
Reported: 2011-03-28 04:33 UTC by Parag AN
Modified: 2011-04-14 19:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ask user to enable accessibility on startup (1.29 KB, patch)
2011-03-28 04:34 UTC, Parag AN
none Details | Review
modified Parag's patch by Jiro (1.64 KB, patch)
2011-03-28 08:43 UTC, Jiro Matsuzawa
none Details | Review

Description Parag AN 2011-03-28 04:33:32 UTC
Since I updated caribou-0.1.92 in Fedora 15, I have got many people reporting same bug(https://bugzilla.redhat.com/show_bug.cgi?id=690303) that caribou failed to start just because accessibility is not already started on the system.

I request to add dialog box that will ask user "Accessibility needs to be enabled. Do you want to enable it and run caribou?"
Comment 1 Parag AN 2011-03-28 04:34:32 UTC
Created attachment 184415 [details] [review]
ask user to enable accessibility on startup
Comment 2 Parag AN 2011-03-28 04:35:47 UTC
I have tried to modify source code and created above patch. Please have a look at it and if it looks good to commit then please do that.
Comment 3 Jiro Matsuzawa 2011-03-28 08:43:42 UTC
Created attachment 184428 [details] [review]
modified Parag's patch by Jiro

modified Parag's patch by Jiro
Comment 4 Jiro Matsuzawa 2011-03-28 08:44:17 UTC
Hi, Parag

Great! I think it's a good idea.
I have looked at your patch and tried to improve it.
An outline of the modifications:

1. Match existing coding style:
  1.1. Replace TAB characters with spaces
  1.2. put a space behind every comma
2. Wrapped the new message by the gettext fucntion
  => But, a string freeze break request is needed.
     Eitan, what do you think?
3. Use const.APP_NAME


The following is the diff between yours and mine:
         if not self._get_a11y_enabled():
-	    msgdialog = Gtk.MessageDialog(None, Gtk.DialogFlags.MODAL,Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO,"Accessibility needs to be enabled. Do you want to enable it and run caribou?")
-    	    resp = msgdialog.run()
-	    if resp == Gtk.ResponseType.NO:
-	       msgdialog.destroy()
-	       quit()
-	    if resp == Gtk.ResponseType.YES:
-	       settings = Gio.Settings('org.gnome.desktop.interface')
-	       atspi = settings.set_boolean("toolkit-accessibility",1)
-	       msgdialog.destroy() 
+            msgdialog = Gtk.MessageDialog(None,
+                                          Gtk.DialogFlags.MODAL,
+                                          Gtk.MessageType.QUESTION,
+                                          Gtk.ButtonsType.YES_NO,
+                                          _("Accessibility needs to be enabled. Do you want to enable it and run %s?") % const.APP_NAME)
+            resp = msgdialog.run()
+            if resp == Gtk.ResponseType.NO:
+                msgdialog.destroy()
+                quit()
+            if resp == Gtk.ResponseType.YES:
+                settings = Gio.Settings('org.gnome.desktop.interface')
+                atspi = settings.set_boolean("toolkit-accessibility", True)
+                msgdialog.destroy() 
         self.__current_acc = None
Comment 5 Parag AN 2011-03-28 09:00:25 UTC
Thanks for improving the patch.
Comment 6 Parag AN 2011-04-05 03:52:30 UTC
If this patch is ok then can someone please commit this?
Comment 7 Matthias Clasen 2011-04-05 12:29:59 UTC
Turning toolkit-accessibility on like that has no effect on already running applications, though. So it will be a somewhat confusing experience.
Comment 8 Parag AN 2011-04-05 14:12:14 UTC
But that is the only one way I found to stop the abrt bugs that caribou users are seeing. I just tried to find some solution. I am not a Xfce desktop user but I saw that caribou is auto-starting in Xfce which is also one of the reason that caribou is crashing there.
Comment 9 Parag AN 2011-04-05 14:13:31 UTC
I am trying to contact eejay since a week. He liked this idea when discussed with him on IRC at time of last stable release. Thats why I created patch then.
Comment 10 Eitan Isaacson 2011-04-05 15:17:28 UTC
Thank you Jiro and Parag.
Once I branch Caribou to a stable branch we could put this in master.
Comment 11 Eitan Isaacson 2011-04-14 18:25:49 UTC
Ok, I finally branched Caribou!

I think one of the buttons needs to log the user out, as enabling accessibility alone will not make everything work magically. I think.
Comment 12 Eitan Isaacson 2011-04-14 19:12:37 UTC
Fixed. Changed the wording and flow a bit.