summaryrefslogtreecommitdiff
path: root/capplets/time-admin/src/time-zone.c
diff options
context:
space:
mode:
authormouse <[email protected]>2019-06-24 10:03:57 +0800
committerGitHub <[email protected]>2019-06-24 10:03:57 +0800
commit39028e317750bcc4c81d762c25f2c88f5c8f3f56 (patch)
tree372cc9f259ae6d30530104358ab152d6e613da03 /capplets/time-admin/src/time-zone.c
parentc436dbdbd09ce0db5dd3c86f015621ebf56626f0 (diff)
parent2e903d139874a5516c70698c3b688c71d0a805e1 (diff)
downloadmate-control-center-39028e317750bcc4c81d762c25f2c88f5c8f3f56.tar.bz2
mate-control-center-39028e317750bcc4c81d762c25f2c88f5c8f3f56.tar.xz
Merge pull request #468 from mate-desktop/dialog-buttons
time-admin: shortcuts, images & shared code for buttons
Diffstat (limited to 'capplets/time-admin/src/time-zone.c')
-rw-r--r--capplets/time-admin/src/time-zone.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/capplets/time-admin/src/time-zone.c b/capplets/time-admin/src/time-zone.c
index 0523b799..7cb90e62 100644
--- a/capplets/time-admin/src/time-zone.c
+++ b/capplets/time-admin/src/time-zone.c
@@ -435,9 +435,7 @@ static void ChoooseTimezoneClose(GtkWidget *widget,
void SetupTimezoneDialog(TimeAdmin *ta)
{
- GtkWidget *Vbox;
- GtkWidget *TimeZoneFrame;
- GtkWidget *Scrolled;
+ GtkWidget *Vbox, *TimeZoneFrame, *Scrolled, *image;
ta->dialog = gtk_dialog_new_with_buttons (_("Time Zone Selection"),
NULL,
@@ -447,15 +445,23 @@ void SetupTimezoneDialog(TimeAdmin *ta)
gtk_window_set_default_size (GTK_WINDOW (ta->dialog), 730, 520);
gtk_window_set_icon_name (GTK_WINDOW(ta->dialog), "preferences-system-time");
- ta->TZclose = DialogAddButtonWithIconName(GTK_DIALOG(ta->dialog),
- _("Close"),
- "window-close",
- GTK_RESPONSE_CANCEL);
- ta->TZconfire = DialogAddButtonWithIconName(GTK_DIALOG(ta->dialog),
- _("Confirm"),
- "emblem-default",
- GTK_RESPONSE_OK);
+ ta->TZclose = gtk_button_new_with_mnemonic (_("_Close"));
+ image = gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image (GTK_BUTTON (ta->TZclose), image);
+ gtk_button_set_use_underline (GTK_BUTTON (ta->TZclose), TRUE);
+ gtk_style_context_add_class (gtk_widget_get_style_context (ta->TZclose), "text-button");
+ gtk_widget_set_can_default (ta->TZclose, TRUE);
+ gtk_dialog_add_action_widget (GTK_DIALOG (ta->dialog), ta->TZclose, GTK_RESPONSE_CANCEL);
+
+ ta->TZconfire = gtk_button_new_with_mnemonic (_("Con_firm"));
+ image = gtk_image_new_from_icon_name ("emblem-default", GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image (GTK_BUTTON (ta->TZconfire), image);
+ gtk_button_set_use_underline (GTK_BUTTON (ta->TZconfire), TRUE);
+ gtk_style_context_add_class (gtk_widget_get_style_context (ta->TZconfire), "text-button");
+ gtk_widget_set_can_default (ta->TZconfire, TRUE);
+ gtk_dialog_add_action_widget (GTK_DIALOG (ta->dialog), ta->TZconfire, GTK_RESPONSE_OK);
+
g_signal_connect (ta->TZconfire,
"clicked",
G_CALLBACK (ChoooseTimezoneDone),