From 3a2808211466bd5f75435d2a3228d27201364c76 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 10 Sep 2003 01:26:13 +0000 Subject: [PATCH] Use the cell renderer's "text" and "weight" properties rather than 2003-09-09 Federico Mena Quintero * gtkfilechooserimpldefault.c (set_cell_text_bold_if_folder): Use the cell renderer's "text" and "weight" properties rather than "markup". --- gtk/gtkfilechooserdefault.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index dd176ffc32..03d7f88362 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -1515,24 +1515,10 @@ list_icon_data_func (GtkTreeViewColumn *tree_column, static void set_cell_text_bold_if_folder (const GtkFileInfo *info, GtkCellRenderer *cell, const char *text) { - if (gtk_file_info_get_is_folder (info)) - { - char *escaped; - char *markup; - - escaped = g_markup_escape_text (text, -1); - markup = g_strdup_printf ("%s", escaped); - - g_object_set (cell, "markup", markup, NULL); - - g_free (escaped); - g_free (markup); - } - else - g_object_set (cell, - "text", text, - "attributes", NULL, - NULL); + g_object_set (cell, + "text", text, + "weight", gtk_file_info_get_is_folder (info) ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL, + NULL); } static void