From f3c5b883bd5ee7070b7fdcf4316db96fa4b55c95 Mon Sep 17 00:00:00 2001 From: Andrzej Date: Tue, 21 Feb 2012 14:50:14 +0900 Subject: [PATCH] model: set single line label for icon sizes < "small" Effective only when icon_view=FALSE. --- src/appfinder-model.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/src/appfinder-model.c b/src/appfinder-model.c index 9bce6e2..a1cc770 100644 --- a/src/appfinder-model.c +++ b/src/appfinder-model.c @@ -460,7 +460,12 @@ xfce_appfinder_model_get_value (GtkTreeModel *tree_model, comment = garcon_menu_item_get_comment (item->item); if (comment != NULL) - item->abstract = g_markup_printf_escaped ("%s\n%s", name, comment); + { + if (model->icon_size < XFCE_APPFINDER_ICON_SIZE_SMALL) + item->abstract = g_markup_printf_escaped ("%s — %s", name, comment); + else + item->abstract = g_markup_printf_escaped ("%s\n%s", name, comment); + } else item->abstract = g_markup_printf_escaped ("%s", name); } @@ -2085,6 +2090,12 @@ xfce_appfinder_model_icon_theme_changed (XfceAppfinderModel *model) item->icon_large = NULL; item_changed = TRUE; } + if (item->abstract != NULL) + { + g_free (item->abstract); + item->abstract = NULL; + item_changed = TRUE; + } if (item->item == NULL) { -- 1.7.5.4