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.
This commit is contained in:
Christian Dywan 2009-05-01 20:03:40 +02:00
parent ffb64d32fa
commit f93c3c166f

View 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);