GNOME Bugzilla – Bug 645890
add dialog box asking user to enable accessibility
Last modified: 2011-04-14 19:12:37 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?"
Created attachment 184415 [details] [review] ask user to enable accessibility on startup
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.
Created attachment 184428 [details] [review] modified Parag's patch by Jiro modified Parag's patch by Jiro
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
Thanks for improving the patch.
If this patch is ok then can someone please commit this?
Turning toolkit-accessibility on like that has no effect on already running applications, though. So it will be a somewhat confusing experience.
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.
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.
Thank you Jiro and Parag. Once I branch Caribou to a stable branch we could put this in master.
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.
Fixed. Changed the wording and flow a bit.