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 737966 - Input sources, formats, languages: Add/Done buttons are not blue
Input sources, formats, languages: Add/Done buttons are not blue
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Region & Language
3.14.x
Other Linux
: Normal minor
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-06 02:14 UTC by Michael Catanzaro
Modified: 2014-10-17 10:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that doesn't work (6.26 KB, patch)
2014-10-09 01:53 UTC, Michael Catanzaro
none Details | Review
region: Make Add/Done buttons blue (6.43 KB, patch)
2014-10-16 15:10 UTC, Bastien Nocera
committed Details | Review
common: Make Done button in language chooser blue (3.41 KB, patch)
2014-10-16 15:15 UTC, Bastien Nocera
committed Details | Review

Description Michael Catanzaro 2014-10-06 02:14:22 UTC
The add button on the Add an Input Source dialog is not blue. It has the suggested-action style class in its UI file but it's not there when viewed in GtkInspector. The Done buttons on the Formats and Languages dialogs are also not blue. I guess these are being stripped out by GTK+ (3.14.1)?
Comment 1 Matthias Clasen 2014-10-07 11:47:08 UTC
The more modern way to do these buttons would be to use

   <object class="GtkDialog" id="dialog1">
    <child type="action">
      <object class="GtkButton" id="button_cancel">
        ...
      </object>
    </child>
    <child type="action">
      <object class="GtkButton" id="button_ok">
        ...
      </object>
    <child>
    <action-widgets>
      <action-widget response="cancel">button_cancel</action-widget>
      <action-widget response="ok" default="true">button_ok</action-widget>
    </action-widgets>
  </object>

The most important part here is the default="true" which tells GTK+ which button is the default - we synchronize suggested-action with default, for dialog actions.
Comment 2 Michael Catanzaro 2014-10-09 01:53:03 UTC
Created attachment 288085 [details] [review]
Patch that doesn't work

I tried to follow those instructions, using <child type="action"> and making sure to set the default response under <action-widgets>, but it's not working....
Comment 3 Bastien Nocera 2014-10-16 15:06:50 UTC
And it throws an error:
(gnome-control-center:31871): Gtk-CRITICAL **: gtk_widget_grab_default: assertion 'gtk_widget_get_can_default (widget)' failed

+        <property name="can_default">True</property>
fixes both the original bug and the warning.
Comment 4 Bastien Nocera 2014-10-16 15:10:32 UTC
Created attachment 288694 [details] [review]
region: Make Add/Done buttons blue
Comment 5 Bastien Nocera 2014-10-16 15:15:52 UTC
Created attachment 288695 [details] [review]
common: Make Done button in language chooser blue
Comment 6 Rui Matos 2014-10-16 17:08:09 UTC
Review of attachment 288694 [details] [review]:

sure
Comment 7 Rui Matos 2014-10-16 17:09:14 UTC
Review of attachment 288695 [details] [review]:

++
Comment 8 Michael Catanzaro 2014-10-16 22:50:30 UTC
Comment on attachment 288085 [details] [review]
Patch that doesn't work

D'oh.
Comment 9 Bastien Nocera 2014-10-17 10:21:33 UTC
Attachment 288694 [details] pushed as 212a4e9 - region: Make Add/Done buttons blue
Attachment 288695 [details] pushed as 633af27 - common: Make Done button in language chooser blue