GNOME Bugzilla – Bug 625324
Option to focus cancel button by default on question dialogs
Last modified: 2013-11-23 22:44:27 UTC
Created attachment 166589 [details] [review] Adds the --focus-cancel option for qestion dialogs This is a patch to add the --focus-cancel option for question dialogs which will cause the Cancel button to have focus rather than the OK button.
Hi... the patch looks good for me but can you please attach a new one based on git master (using git format-patch) ? Read http://live.gnome.org/Git/Developers to learn how to submit a git patch. Thanks for the patch
Created attachment 166602 [details] [review] Adds the --focus-cancel option for qestion dialogs and fixed some inconsistencies in wording I have now made the patch against the latest git, and attached the file generated by "git format-patch". I noticed a few minor inconsistencies in the wording of the --help output and man page text for the new label text options, so I changed those as well. I hope this helps.
Created attachment 166603 [details] [review] Failed to fully fix wording inconsistencies in last page, have attached correct patch. My apologies, I failed to commit a couple of my wording inconsistency changes before making the last patch. The attached patch should be applied instead of the one in my previous post. Sorry!
Review of attachment 166603 [details] [review]: Hi James, thanks for the patch! But the code style doesn't look good. See the first if/else it's not like the rest of the code on zenity. please fix the patch.
Review of attachment 166603 [details] [review]: My apologies, I did try hard to match the coding style. What exactly is not like the rest of the code? I tried to do indentation, spacing, and bracketing the same as I saw it in other places in the code.
Review of attachment 166603 [details] [review]: You should do something like: if (msg_data->focus_cancel) gtk_widget_grab_focus (cancel_button); else gtk_widget_grab_focus (ok_button);
Review of attachment 166603 [details] [review]: Ah! Sorry. I missed that while looking through. Sorry to cause such hassle with such a simple patch. I'm submitting a fixed one now.
Created attachment 169746 [details] [review] Corrected coding style error in previous patch. Fixed coding style error to better match the rest of the Zenity code.
*** This bug has been marked as a duplicate of bug 534935 ***