Use the cell renderer's "text" and "weight" properties rather than

2003-09-09  Federico Mena Quintero  <federico@ximian.com>

	* gtkfilechooserimpldefault.c (set_cell_text_bold_if_folder): Use
	the cell renderer's "text" and "weight" properties rather than
	"markup".
This commit is contained in:
Federico Mena Quintero 2003-09-10 01:26:13 +00:00 committed by Federico Mena Quintero
parent b78691f098
commit 3a28082114

View File

@ -1515,23 +1515,9 @@ list_icon_data_func (GtkTreeViewColumn *tree_column,
static void static void
set_cell_text_bold_if_folder (const GtkFileInfo *info, GtkCellRenderer *cell, const char *text) 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 ("<span weight=\"bold\">%s</span>", escaped);
g_object_set (cell, "markup", markup, NULL);
g_free (escaped);
g_free (markup);
}
else
g_object_set (cell, g_object_set (cell,
"text", text, "text", text,
"attributes", NULL, "weight", gtk_file_info_get_is_folder (info) ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL,
NULL); NULL);
} }