diff --git a/libnemo-private/nemo-search-engine-advanced.c b/libnemo-private/nemo-search-engine-advanced.c index 4e7499cec..a7a4612af 100644 --- a/libnemo-private/nemo-search-engine-advanced.c +++ b/libnemo-private/nemo-search-engine-advanced.c @@ -40,7 +40,9 @@ #define SNIPPET_EXTEND_SIZE 100 typedef struct { + gchar *def_path; gchar *exec_format; + gint priority; /* future? */ } SearchHelper; @@ -91,6 +93,7 @@ static GHashTable *search_helpers = NULL; static void search_helper_free (SearchHelper *helper) { + g_free (helper->def_path); g_free (helper->exec_format); g_free (helper); } @@ -214,13 +217,16 @@ process_search_helper_file (const gchar *path) existing = g_hash_table_lookup (search_helpers, mime_type); if (existing && existing->priority > priority) { - DEBUG ("Existing nemo search_helper for '%s' has higher priority than a new one (%s), ignoring the new one.", mime_type, path); + DEBUG ("Existing nemo search_helper for '%s' (%s) has higher priority than a new one (%s), ignoring the new one.", + mime_type, existing->def_path, path); continue; } else if (existing) { - DEBUG ("Replacing existing nemo search_helper for '%s' with %s based on priority.", mime_type, path); + DEBUG ("Replacing existing nemo search_helper for '%s' (%s) with %s based on priority.", + mime_type, existing->def_path, path); } helper = g_new0 (SearchHelper, 1); + helper->def_path = g_strdup (path); helper->exec_format = g_strdup (exec_format); helper->priority = priority; @@ -272,7 +278,6 @@ initialize_search_helpers (NemoSearchEngineAdvanced *engine) } file_path = g_build_filename (path, filename, NULL); - DEBUG ("Processing '%s'", path); process_search_helper_file (file_path); g_free (file_path); } diff --git a/search-helpers/mso.nemo_search_helper b/search-helpers/mso.nemo_search_helper index 2a36f9a17..b661bd591 100644 --- a/search-helpers/mso.nemo_search_helper +++ b/search-helpers/mso.nemo_search_helper @@ -2,4 +2,4 @@ TryExec=nemo-mso-to-txt; Exec=nemo-mso-to-txt %s MimeType=application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.openxmlformats-officedocument.presentationml.presentation; -priority=100 +Priority=100