summaryrefslogtreecommitdiff
path: root/shell/cc-shell-model.c
diff options
context:
space:
mode:
authorVincent Untz <vuntz@gnome.org>2011-07-28 12:41:38 +0200
committerVincent Untz <vuntz@gnome.org>2011-08-02 10:16:11 +0200
commit48dec984dbfe5e69c6717c16f69a6f52e08cd1f2 (patch)
treeaae5e23341db7f385e2ddb6b3b748cd7328d6bce /shell/cc-shell-model.c
parentc635d8e875713c697ba9a9b13f5d7a4cc6ced432 (diff)
downloadgnome-control-center-48dec984dbfe5e69c6717c16f69a6f52e08cd1f2.tar.gz
shell: Do not add a trailing dash in search target when comment is empty
When the comment is empty, we do not want to add a dash to the search target, as it will be a trailing one. https://bugzilla.gnome.org/show_bug.cgi?id=655487
Diffstat (limited to 'shell/cc-shell-model.c')
-rw-r--r--shell/cc-shell-model.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/cc-shell-model.c b/shell/cc-shell-model.c
index c4ae28f68..dd916f8e0 100644
--- a/shell/cc-shell-model.c
+++ b/shell/cc-shell-model.c
@@ -199,7 +199,10 @@ cc_shell_model_add_item (CcShellModel *model,
pixbuf = load_pixbuf_for_gicon (icon);
- search_target = g_strconcat (name, " - ", comment, NULL);
+ if (comment && comment[0])
+ search_target = g_strconcat (name, " - ", comment, NULL);
+ else
+ search_target = g_strdup (name);
gtk_list_store_insert_with_values (GTK_LIST_STORE (model), NULL, 0,
COL_NAME, name,