summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-file-conflict-dialog.c
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-01-13 15:15:35 +0100
committerWolfgang Ulbrich <[email protected]>2016-01-13 15:15:35 +0100
commit3b7b4cfa969402c5cc9e45369f552729f2b65308 (patch)
tree610589db57c82fb63f5984d28b3009eb2c0cbb5a /libcaja-private/caja-file-conflict-dialog.c
parent3c5a4ef68906a73850fa2ffe403cfcd37dc31ff9 (diff)
parent1befe8ddf08c12b5c926d269b31d270fb94b9c3e (diff)
downloadcaja-3b7b4cfa969402c5cc9e45369f552729f2b65308.tar.bz2
caja-3b7b4cfa969402c5cc9e45369f552729f2b65308.tar.xz
Merge pull request #498 from mate-desktop/dev-GtkStyleContext
port to gtk_style_context and other fixes
Diffstat (limited to 'libcaja-private/caja-file-conflict-dialog.c')
-rw-r--r--libcaja-private/caja-file-conflict-dialog.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/libcaja-private/caja-file-conflict-dialog.c b/libcaja-private/caja-file-conflict-dialog.c
index cda3069b..300543b3 100644
--- a/libcaja-private/caja-file-conflict-dialog.c
+++ b/libcaja-private/caja-file-conflict-dialog.c
@@ -115,7 +115,11 @@ file_list_ready_cb (GList *files,
GdkPixbuf *pixbuf;
GtkWidget *label;
GString *str;
+#if GTK_CHECK_VERSION(3,0,0)
+ PangoAttrList *attr_list;
+#else
PangoFontDescription *desc;
+#endif
details = fcd->details;
@@ -216,15 +220,28 @@ file_list_ready_cb (GList *files,
label = gtk_label_new (primary_text);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_line_wrap_mode (GTK_LABEL (label), PANGO_WRAP_WORD_CHAR);
- gtk_widget_set_size_request (label, 350, -1);
-#if GTK_CHECK_VERSION (3, 14, 0)
+#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_box_pack_start (GTK_BOX (details->titles_vbox),
+ label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
+
+ attr_list = pango_attr_list_new ();
+ pango_attr_list_insert (attr_list, pango_attr_weight_new (PANGO_WEIGHT_BOLD));
+ pango_attr_list_insert (attr_list, pango_attr_scale_new (PANGO_SCALE_LARGE));
+ g_object_set (label,
+ "attributes", attr_list,
+ NULL);
+
+ pango_attr_list_unref (attr_list);
#else
+ gtk_widget_set_size_request (label, 350, -1);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (details->titles_vbox),
label, FALSE, FALSE, 0);
+
gtk_widget_modify_font (label, NULL);
+
desc = pango_font_description_new ();
pango_font_description_set_weight (desc, PANGO_WEIGHT_BOLD);
pango_font_description_set_size (desc,
@@ -232,13 +249,14 @@ file_list_ready_cb (GList *files,
gtk_widget_modify_font (label, desc);
pango_font_description_free (desc);
gtk_widget_show (label);
+#endif
label = gtk_label_new (secondary_text);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_widget_set_size_request (label, 350, -1);
-#if GTK_CHECK_VERSION (3, 14, 0)
+#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_halign (label, GTK_ALIGN_START);
#else
+ gtk_widget_set_size_request (label, 350, -1);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
#endif
gtk_box_pack_start (GTK_BOX (details->titles_vbox),