Commit 246407ef authored by Martin Krohn's avatar Martin Krohn
Browse files

Record last commands only once

We first check the history (model->items_hash) if the command is already in.
Only if the command is not in yet, we add it to the history
parent da2bde15
......@@ -1069,6 +1069,12 @@ xfce_appfinder_model_history_insert (XfceAppfinderModel *model,
appfinder_return_if_fail (XFCE_IS_APPFINDER_MODEL (model));
appfinder_return_if_fail (IS_STRING (command));
if (g_hash_table_lookup (model->items_hash, command) != NULL)
APPFINDER_DEBUG ("%s is already in the model. no insert", command);
/* add new command */
item = g_slice_new0 (ModelItem);
item->command = g_strdup (command);
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