From f93c3c166f755ba8f8c64343faf81f3a60d75b0b Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 1 May 2009 20:03:40 +0200 Subject: [PATCH] Ensure that completion items have a title Items are added as lone URIs often enough, so it happened that we accidentally unset a title. We check that now. --- midori/midori-locationaction.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c index a24ec972..5d3ee8ab 100644 --- a/midori/midori-locationaction.c +++ b/midori/midori-locationaction.c @@ -620,6 +620,10 @@ midori_location_action_set_item (MidoriLocationAction* location_action, GdkPixbuf* icon; GdkPixbuf* new_icon; + /* Ensure we keep the title if we added the same URI with a title before */ + if (!item->title) + gtk_tree_model_get (location_action->model, iter, TITLE_COL, &item->title, -1); + gtk_list_store_set (GTK_LIST_STORE (location_action->model), iter, URI_COL, item->uri, TITLE_COL, item->title, -1);