summaryrefslogtreecommitdiff
path: root/applets/clock/calendar-window.c
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-02-11 07:44:06 +0100
committerWolfgang Ulbrich <[email protected]>2016-02-12 07:04:31 +0100
commit9fbaadf2b1d3cbc1a3c752f099e10fde1e086b02 (patch)
tree63476a8669e9400e1833fd875c78c318e14d9411 /applets/clock/calendar-window.c
parent2ce33ca53bc8b56f4cab9160197df44cc36082d4 (diff)
downloadmate-panel-9fbaadf2b1d3cbc1a3c752f099e10fde1e086b02.tar.bz2
mate-panel-9fbaadf2b1d3cbc1a3c752f099e10fde1e086b02.tar.xz
GTK+3 clock: clock: don't use deprecated GtkAlignment
taken from: https://git.gnome.org/browse/gnome-panel/commit/?id=5580bf9
Diffstat (limited to 'applets/clock/calendar-window.c')
-rw-r--r--applets/clock/calendar-window.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/applets/clock/calendar-window.c b/applets/clock/calendar-window.c
index 09449b44..e800f272 100644
--- a/applets/clock/calendar-window.c
+++ b/applets/clock/calendar-window.c
@@ -156,7 +156,9 @@ create_hig_frame (CalendarWindow *calwin,
GCallback callback)
{
GtkWidget *vbox;
+#if !GTK_CHECK_VERSION (3, 0, 0)
GtkWidget *alignment;
+#endif
GtkWidget *label;
GtkWidget *hbox;
GtkWidget *button;
@@ -195,11 +197,17 @@ create_hig_frame (CalendarWindow *calwin,
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
gtk_container_add (GTK_CONTAINER (button), label);
- alignment = gtk_alignment_new (1, 0, 0, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_show_all (button);
+
+ gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+#else
+ alignment = gtk_alignment_new (1, 0, 0, 0);
gtk_container_add (GTK_CONTAINER (alignment), button);
- gtk_widget_show_all (alignment);
+ gtk_widget_show_all (alignment);
gtk_container_add (GTK_CONTAINER (hbox), alignment);
+#endif
g_signal_connect_swapped (button, "clicked", callback, calwin);
}