File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -262,6 +262,7 @@ typedef enum
262262#define NEMO_PLUGIN_PREFERENCES_DISABLED_EXTENSIONS "disabled-extensions"
263263#define NEMO_PLUGIN_PREFERENCES_DISABLED_ACTIONS "disabled-actions"
264264#define NEMO_PLUGIN_PREFERENCES_DISABLED_SCRIPTS "disabled-scripts"
265+ #define NEMO_PLUGIN_PREFERENCES_DISABLED_SEARCH_HELPERS "disabled-search-helpers"
265266
266267/* Connect-to server dialog last-used method */
267268#define NEMO_PREFERENCES_LAST_SERVER_CONNECT_METHOD "last-server-connect-method"
Original file line number Diff line number Diff line change 4444#define SNIPPET_EXTEND_SIZE 100
4545
4646typedef struct {
47+ gchar * filename ;
4748 gchar * def_path ;
4849 gchar * exec_format ;
49-
50- gint priority ;
5150 /* future? */
5251} SearchHelper ;
5352
@@ -258,6 +257,7 @@ initialize_search_helpers (NemoSearchEngineAdvanced *engine)
258257 GDir * dir ;
259258 const gchar * filename ;
260259 const gchar * path ;
260+ gchar * * disabled_helpers ;
261261
262262 path = (const gchar * ) d_iter -> data ;
263263 DEBUG ("Checking location '%s' for search helpers" , path );
@@ -271,19 +271,28 @@ initialize_search_helpers (NemoSearchEngineAdvanced *engine)
271271 continue ;
272272 }
273273
274+ disabled_helpers = g_settings_get_strv (nemo_search_preferences ,
275+ NEMO_PLUGIN_PREFERENCES_DISABLED_SEARCH_HELPERS );
276+
274277 while ((filename = g_dir_read_name (dir )) != NULL ) {
275278 gchar * file_path ;
276279
277280 if (!g_str_has_suffix (filename , ".nemo_search_helper" )) {
278281 continue ;
279282 }
280283
284+ if (g_strv_contains ((const gchar * const * ) disabled_helpers , filename )) {
285+ DEBUG ("Skipping disabled search helper: '%s'" , filename );
286+ continue ;
287+ }
288+
281289 file_path = g_build_filename (path , filename , NULL );
282290 process_search_helper_file (file_path );
283291 g_free (file_path );
284292 }
285293
286294 g_dir_close (dir );
295+ g_strfreev (disabled_helpers );
287296 }
288297
289298 g_list_free_full (dir_list , g_free );
Original file line number Diff line number Diff line change 885885 <default >false</default >
886886 <summary >Reverse the direction of the sort when viewing search results</summary >
887887 </key >
888+ <key name =" disabled-search-helpers" type =" as" >
889+ <default >[]</default >
890+ <summary >List of search helper filenames to skip when using content search.</summary >
891+ </key >
888892 </schema >
889893</schemalist >
You can’t perform that action at this time.
0 commit comments