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 625324 - Option to focus cancel button by default on question dialogs
Option to focus cancel button by default on question dialogs
Status: RESOLVED DUPLICATE of bug 534935
Product: zenity
Classification: Core
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Zenity Maintainers
Zenity Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-26 15:07 UTC by James Stanley
Modified: 2013-11-23 22:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds the --focus-cancel option for qestion dialogs (2.43 KB, patch)
2010-07-26 15:07 UTC, James Stanley
none Details | Review
Adds the --focus-cancel option for qestion dialogs and fixed some inconsistencies in wording (3.48 KB, patch)
2010-07-26 20:26 UTC, James Stanley
none Details | Review
Failed to fully fix wording inconsistencies in last page, have attached correct patch. (3.75 KB, patch)
2010-07-26 20:32 UTC, James Stanley
needs-work Details | Review
Corrected coding style error in previous patch. (3.57 KB, patch)
2010-09-08 10:00 UTC, James Stanley
none Details | Review

Description James Stanley 2010-07-26 15:07:20 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.
Comment 1 Luis Medinas 2010-07-26 17:34:12 UTC
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
Comment 2 James Stanley 2010-07-26 20:26:31 UTC
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.
Comment 3 James Stanley 2010-07-26 20:32:24 UTC
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!
Comment 4 Luis Medinas 2010-09-08 09:15:41 UTC
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.
Comment 5 James Stanley 2010-09-08 09:45:21 UTC
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.
Comment 6 Luis Medinas 2010-09-08 09:51:00 UTC
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);
Comment 7 James Stanley 2010-09-08 09:59:28 UTC
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.
Comment 8 James Stanley 2010-09-08 10:00:55 UTC
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.
Comment 9 Arx Cruz 2013-11-23 22:44:27 UTC

*** This bug has been marked as a duplicate of bug 534935 ***