forked from AuroraMiddleware/gtk
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:
parent
b78691f098
commit
3a28082114
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user