Commit 25307c33 authored by Martin Krohn's avatar Martin Krohn
Browse files

Record last commands only once

We first check the history (model->items) if the command is already in.
Only if the command is not in yet, we add it to the history
parent da2bde15
Pipeline #193 passed with stages
in 1 minute and 9 seconds
......@@ -1074,6 +1074,11 @@ xfce_appfinder_model_history_insert (XfceAppfinderModel *model,
item->command = g_strdup (command);
item->icon = GDK_PIXBUF (g_object_ref (G_OBJECT (model->command_icon)));
item->icon_large = GDK_PIXBUF (g_object_ref (G_OBJECT (model->command_icon_large)));
if (g_slist_find_custom(model->items, item, xfce_appfinder_model_item_compare) != NULL)
APPFINDER_DEBUG ("%s is already in the model. no insert", command);
model->items = g_slist_insert_sorted (model->items, item, xfce_appfinder_model_item_compare);
/* find the item and the position */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment