summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-21 13:10:21 +0300
committermonsta <[email protected]>2016-01-21 13:10:21 +0300
commitc5e3fe80b51fed3b47817321c2db814fded4aa36 (patch)
tree5e62a7547e0c7a859df2baaa5a114c55ae0f4d63
parente3d899644ab5da7780dd8e5c44c4ab765aea28fe (diff)
downloadmate-user-share-c5e3fe80b51fed3b47817321c2db814fded4aa36.tar.bz2
mate-user-share-c5e3fe80b51fed3b47817321c2db814fded4aa36.tar.xz
[GTK+3] fix deprecated usage of GtkMisc and GtkVBox
-rw-r--r--src/caja-share-bar.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/caja-share-bar.c b/src/caja-share-bar.c
index c704d85..4283b4e 100644
--- a/src/caja-share-bar.c
+++ b/src/caja-share-bar.c
@@ -95,7 +95,11 @@ caja_share_bar_init (CajaShareBar *bar)
action_area = gtk_info_bar_get_action_area (GTK_INFO_BAR (bar));
gtk_button_box_set_layout (GTK_BUTTON_BOX (action_area), GTK_BUTTONBOX_CENTER);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
+#else
vbox = gtk_vbox_new (FALSE, 3);
+#endif
gtk_container_add (GTK_CONTAINER (content_area), vbox);
attrs = pango_attr_list_new ();
@@ -104,12 +108,22 @@ caja_share_bar_init (CajaShareBar *bar)
gtk_label_set_attributes (GTK_LABEL (label), attrs);
pango_attr_list_unref (attrs);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (label), 0.5);
+#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
gtk_widget_show (label);
gtk_container_add (GTK_CONTAINER (vbox), label);
bar->priv->label = gtk_label_new (NULL);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (bar->priv->label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (bar->priv->label), 0.5);
+#else
gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0.0, 0.5);
+#endif
gtk_widget_show (bar->priv->label);
gtk_container_add (GTK_CONTAINER (vbox), bar->priv->label);