]> spindle.queued.net Git - midori/commitdiff
Ensure that completion items have a title
authorChristian Dywan <christian@twotoasts.de>
Fri, 1 May 2009 18:03:40 +0000 (20:03 +0200)
committerChristian Dywan <christian@twotoasts.de>
Fri, 1 May 2009 18:03:40 +0000 (20:03 +0200)
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

index a24ec9728ac910236d6b88ac8432f53deebef989..5d3ee8abbe27f2c711885d6a63cdee42d49cad50 100644 (file)
@@ -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);