summaryrefslogtreecommitdiff
path: root/applets/clock/calendar-window.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-06-30 14:39:23 +0300
committermonsta <[email protected]>2016-06-30 14:40:29 +0300
commit29a2534c7f5de5a8dc06d48b2e7c52d7416d6a6e (patch)
treeee78c9b70306b269aee0259c89692a8030ecbd5b /applets/clock/calendar-window.c
parent882f8f4d9959b6b27f08d2ddb525c7347df1797c (diff)
downloadmate-panel-29a2534c7f5de5a8dc06d48b2e7c52d7416d6a6e.tar.bz2
mate-panel-29a2534c7f5de5a8dc06d48b2e7c52d7416d6a6e.tar.xz
clock: fix UI issues introduced in 882f8f4
Diffstat (limited to 'applets/clock/calendar-window.c')
-rw-r--r--applets/clock/calendar-window.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/applets/clock/calendar-window.c b/applets/clock/calendar-window.c
index ceb3a38d..db14fb80 100644
--- a/applets/clock/calendar-window.c
+++ b/applets/clock/calendar-window.c
@@ -43,11 +43,6 @@
#define KEY_LOCATIONS_EXPANDED "expand-locations"
-#if !GTK_CHECK_VERSION (3, 0, 0)
-#define gtk_box_new(GTK_ORIENTATION_HORIZONTAL, b) gtk_hbox_new(FALSE, b)
-#define gtk_box_new(GTK_ORIENTATION_VERTICAL, b) gtk_vbox_new(FALSE, b)
-#endif
-
enum {
EDIT_LOCATIONS,
LAST_SIGNAL
@@ -166,14 +161,23 @@ create_hig_frame (CalendarWindow *calwin,
char *text;
GtkWidget *expander;
+#if GTK_CHECK_VERSION (3, 0, 0)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
+ vbox = gtk_vbox_new (FALSE, 6);
+#endif
bold_title = g_strdup_printf ("<b>%s</b>", title);
expander = gtk_expander_new (bold_title);
g_free (bold_title);
gtk_expander_set_use_markup (GTK_EXPANDER (expander), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
+ hbox = gtk_hbox_new (FALSE, 0);
+#endif
+
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), expander, FALSE, FALSE, 0);
gtk_widget_show_all (vbox);
@@ -252,7 +256,12 @@ calendar_window_fill (CalendarWindow *calwin)
gtk_container_add (GTK_CONTAINER (calwin), frame);
gtk_widget_show (frame);
+#if GTK_CHECK_VERSION (3, 0, 0)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
+ vbox = gtk_vbox_new (FALSE, 6);
+#endif
+
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);