summaryrefslogtreecommitdiff
path: root/libslab/document-tile.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-15 13:39:24 +0300
committermonsta <[email protected]>2016-01-15 13:39:24 +0300
commit854d41818845e0c89ae71add54a16d69419e8083 (patch)
treec82289f4aa9bb38647c7da8d1a102a0b2a6c6833 /libslab/document-tile.c
parenta632460eead10a87a9e24007bc911ab746c2a5b8 (diff)
downloadmate-control-center-854d41818845e0c89ae71add54a16d69419e8083.tar.bz2
mate-control-center-854d41818845e0c89ae71add54a16d69419e8083.tar.xz
[GTK+3] libslab: fix deprecated usage of GtkMisc
Diffstat (limited to 'libslab/document-tile.c')
-rw-r--r--libslab/document-tile.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libslab/document-tile.c b/libslab/document-tile.c
index 412be01b..f2187b04 100644
--- a/libslab/document-tile.c
+++ b/libslab/document-tile.c
@@ -690,7 +690,12 @@ create_header (const gchar *name)
header = gtk_label_new (name);
gtk_label_set_ellipsize (GTK_LABEL (header), PANGO_ELLIPSIZE_END);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (header, GTK_ALIGN_START);
+ gtk_widget_set_valign (header, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment (GTK_MISC (header), 0.0, 0.5);
+#endif
header_bin = gtk_alignment_new (0.0, 0.5, 1.0, 0.0);
gtk_container_add (GTK_CONTAINER (header_bin), header);
@@ -708,7 +713,12 @@ create_subheader (const gchar *desc)
subheader = gtk_label_new (desc);
gtk_label_set_ellipsize (GTK_LABEL (subheader), PANGO_ELLIPSIZE_END);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (subheader, GTK_ALIGN_START);
+ gtk_widget_set_valign (subheader, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment (GTK_MISC (subheader), 0.0, 0.5);
+#endif
gtk_widget_modify_fg (subheader, GTK_STATE_NORMAL,
&gtk_widget_get_style (subheader)->fg[GTK_STATE_INSENSITIVE]);
@@ -800,7 +810,12 @@ rename_entry_activate_cb (GtkEntry *entry, gpointer user_data)
}
header = gtk_label_new (priv->basename);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (header, GTK_ALIGN_START);
+ gtk_widget_set_valign (header, GTK_ALIGN_CENTER);
+#else
gtk_misc_set_alignment (GTK_MISC (header), 0.0, 0.5);
+#endif
child = gtk_bin_get_child (priv->header_bin);