summaryrefslogtreecommitdiff
path: root/timerapplet
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2015-12-19 16:17:29 +0100
committerWolfgang Ulbrich <[email protected]>2015-12-19 16:17:29 +0100
commit807d21b1b86fa51e8acd840c4382b4b16784c2b6 (patch)
treefffcb6c0e1b12a55b31a621f326fbad56e3697bc /timerapplet
parent11c296282054815bac8fc08520a8971e36b51190 (diff)
downloadmate-applets-807d21b1b86fa51e8acd840c4382b4b16784c2b6.tar.bz2
mate-applets-807d21b1b86fa51e8acd840c4382b4b16784c2b6.tar.xz
GTK3 timer applet: don't use deprecated GtkMisc
Diffstat (limited to 'timerapplet')
-rw-r--r--timerapplet/timerapplet.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/timerapplet/timerapplet.c b/timerapplet/timerapplet.c
index 6aeb72b8..381219a1 100644
--- a/timerapplet/timerapplet.c
+++ b/timerapplet/timerapplet.c
@@ -303,7 +303,12 @@ timer_preferences_callback (GtkAction *action, TimerApplet *applet)
gtk_container_set_border_width (GTK_CONTAINER (dialog), 10);
widget = gtk_label_new (_("Name:"));
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (widget, GTK_ALIGN_END);
+ gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment (GTK_MISC (widget), 1.0, 0.5);
+#endif
gtk_table_attach (table, widget, 1, 2, 0, 1,
GTK_FILL, GTK_FILL,
0, 0);
@@ -315,7 +320,12 @@ timer_preferences_callback (GtkAction *action, TimerApplet *applet)
g_settings_bind (applet->settings, NAME_KEY, widget, "text", G_SETTINGS_BIND_DEFAULT);
widget = gtk_label_new (_("Hours:"));
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (widget, GTK_ALIGN_END);
+ gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment (GTK_MISC (widget), 1.0, 0.5);
+#endif
gtk_table_attach (table, widget, 1, 2, 1, 2,
GTK_FILL, GTK_FILL,
0, 0);
@@ -329,7 +339,12 @@ timer_preferences_callback (GtkAction *action, TimerApplet *applet)
g_signal_connect (widget, "value-changed", G_CALLBACK (timer_spin_button_value_changed), applet);
widget = gtk_label_new (_("Minutes:"));
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (widget, GTK_ALIGN_END);
+ gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment (GTK_MISC (widget), 1.0, 0.5);
+#endif
gtk_table_attach (table, widget, 1, 2, 2, 3,
GTK_FILL, GTK_FILL,
0, 0);
@@ -343,7 +358,12 @@ timer_preferences_callback (GtkAction *action, TimerApplet *applet)
g_signal_connect (widget, "value-changed", G_CALLBACK (timer_spin_button_value_changed), applet);
widget = gtk_label_new (_("Seconds:"));
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (widget, GTK_ALIGN_END);
+ gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment (GTK_MISC (widget), 1.0, 0.5);
+#endif
gtk_table_attach (table, widget, 1, 2, 3, 4,
GTK_FILL, GTK_FILL,
0, 0);