font chooser: Move buttons to template
Use the new builder dialog action support.
This commit is contained in:
parent
5436438520
commit
9aad874fad
@ -151,11 +151,7 @@ gtk_font_chooser_dialog_init (GtkFontChooserDialog *fontchooserdiag)
|
|||||||
|
|
||||||
gtk_widget_init_template (GTK_WIDGET (fontchooserdiag));
|
gtk_widget_init_template (GTK_WIDGET (fontchooserdiag));
|
||||||
gtk_dialog_set_use_header_bar_from_setting (GTK_DIALOG (fontchooserdiag));
|
gtk_dialog_set_use_header_bar_from_setting (GTK_DIALOG (fontchooserdiag));
|
||||||
gtk_dialog_add_buttons (GTK_DIALOG (fontchooserdiag),
|
|
||||||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
|
||||||
_("_Select"), GTK_RESPONSE_OK,
|
|
||||||
NULL);
|
|
||||||
gtk_dialog_set_default_response (GTK_DIALOG (fontchooserdiag), GTK_RESPONSE_OK);
|
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (fontchooserdiag),
|
gtk_dialog_set_alternative_button_order (GTK_DIALOG (fontchooserdiag),
|
||||||
GTK_RESPONSE_OK,
|
GTK_RESPONSE_OK,
|
||||||
|
@ -28,5 +28,24 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child type="action">
|
||||||
|
<object class="GtkButton" id="cancel_button">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="label" translatable="yes">_Cancel</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="action">
|
||||||
|
<object class="GtkButton" id="ok_button">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">_Select</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<action-widgets>
|
||||||
|
<action-widget response="cancel">cancel_button</action-widget>
|
||||||
|
<action-widget response="ok" default="true">ok_button</action-widget>
|
||||||
|
</action-widgets>
|
||||||
</template>
|
</template>
|
||||||
</interface>
|
</interface>
|
||||||
|
@ -1 +1,3 @@
|
|||||||
N_("Select Font");
|
N_("Select Font");
|
||||||
|
N_("_Cancel");
|
||||||
|
N_("_Select");
|
||||||
|
Loading…
Reference in New Issue
Block a user