summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-file-conflict-dialog.c
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2015-12-26 20:31:28 +0100
committerWolfgang Ulbrich <[email protected]>2016-01-13 15:05:41 +0100
commit4df0d0df37e1a69a4c6bcd76580adc736d1f4e5f (patch)
tree76c8620361191a8d14a4212c2ec47f40dffd14df /libcaja-private/caja-file-conflict-dialog.c
parentb1b2cb896d0cbe4a210af4bf3b867cb89580c4c3 (diff)
downloadcaja-4df0d0df37e1a69a4c6bcd76580adc736d1f4e5f.tar.bz2
caja-4df0d0df37e1a69a4c6bcd76580adc736d1f4e5f.tar.xz
GTK3 file-conflict-dialog: port to GtkStyleContext
taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=5da941e
Diffstat (limited to 'libcaja-private/caja-file-conflict-dialog.c')
-rw-r--r--libcaja-private/caja-file-conflict-dialog.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/libcaja-private/caja-file-conflict-dialog.c b/libcaja-private/caja-file-conflict-dialog.c
index cda3069b..28887f88 100644
--- a/libcaja-private/caja-file-conflict-dialog.c
+++ b/libcaja-private/caja-file-conflict-dialog.c
@@ -115,7 +115,12 @@ file_list_ready_cb (GList *files,
GdkPixbuf *pixbuf;
GtkWidget *label;
GString *str;
+#if GTK_CHECK_VERSION(3,0,0)
+ PangoFontDescription *desc, *old_desc;
+ GtkStyleContext *style;
+#else
PangoFontDescription *desc;
+#endif
details = fcd->details;
@@ -219,18 +224,35 @@ file_list_ready_cb (GList *files,
gtk_widget_set_size_request (label, 350, -1);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_box_pack_start (GTK_BOX (details->titles_vbox),
+ label, FALSE, FALSE, 0);
+
+ style = gtk_widget_get_style_context (label);
+ gtk_style_context_get_style (style,
+ GTK_STYLE_PROPERTY_FONT, &old_desc,
+ NULL);
+
+ desc = pango_font_description_new ();
+ pango_font_description_set_weight (desc, PANGO_WEIGHT_BOLD);
+ pango_font_description_set_size (desc,
+ pango_font_description_get_size (old_desc) * PANGO_SCALE_LARGE);
+ gtk_widget_override_font (label, desc);
+ pango_font_description_free (desc);
+ pango_font_description_free (old_desc);
#else
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,
pango_font_description_get_size (gtk_widget_get_style (label)->font_desc) * PANGO_SCALE_LARGE);
gtk_widget_modify_font (label, desc);
pango_font_description_free (desc);
+#endif
gtk_widget_show (label);
label = gtk_label_new (secondary_text);