|
40 | 40 | #define SNIPPET_EXTEND_SIZE 100 |
41 | 41 |
|
42 | 42 | typedef struct { |
| 43 | + gchar *def_path; |
43 | 44 | gchar *exec_format; |
| 45 | + |
44 | 46 | gint priority; |
45 | 47 | /* future? */ |
46 | 48 | } SearchHelper; |
@@ -91,6 +93,7 @@ static GHashTable *search_helpers = NULL; |
91 | 93 | static void |
92 | 94 | search_helper_free (SearchHelper *helper) |
93 | 95 | { |
| 96 | + g_free (helper->def_path); |
94 | 97 | g_free (helper->exec_format); |
95 | 98 | g_free (helper); |
96 | 99 | } |
@@ -214,13 +217,16 @@ process_search_helper_file (const gchar *path) |
214 | 217 |
|
215 | 218 | existing = g_hash_table_lookup (search_helpers, mime_type); |
216 | 219 | if (existing && existing->priority > priority) { |
217 | | - DEBUG ("Existing nemo search_helper for '%s' has higher priority than a new one (%s), ignoring the new one.", mime_type, path); |
| 220 | + DEBUG ("Existing nemo search_helper for '%s' (%s) has higher priority than a new one (%s), ignoring the new one.", |
| 221 | + mime_type, existing->def_path, path); |
218 | 222 | continue; |
219 | 223 | } else if (existing) { |
220 | | - DEBUG ("Replacing existing nemo search_helper for '%s' with %s based on priority.", mime_type, path); |
| 224 | + DEBUG ("Replacing existing nemo search_helper for '%s' (%s) with %s based on priority.", |
| 225 | + mime_type, existing->def_path, path); |
221 | 226 | } |
222 | 227 |
|
223 | 228 | helper = g_new0 (SearchHelper, 1); |
| 229 | + helper->def_path = g_strdup (path); |
224 | 230 | helper->exec_format = g_strdup (exec_format); |
225 | 231 | helper->priority = priority; |
226 | 232 |
|
@@ -272,7 +278,6 @@ initialize_search_helpers (NemoSearchEngineAdvanced *engine) |
272 | 278 | } |
273 | 279 |
|
274 | 280 | file_path = g_build_filename (path, filename, NULL); |
275 | | - DEBUG ("Processing '%s'", path); |
276 | 281 | process_search_helper_file (file_path); |
277 | 282 | g_free (file_path); |
278 | 283 | } |
|
0 commit comments