diff options
author | William Wilgus <wilgus.william@gmail.com> | 2024-05-09 15:29:54 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2024-05-09 16:13:24 -0400 |
commit | 4128a1fe48c63e32196276bbc1eae6ac4871ec5c (patch) | |
tree | 95545e2c51a5f826e6f5c4f512d4634197225327 /apps/open_plugin.c | |
parent | 6e82897bfc2a4b7206e1b6db12002a979b17095e (diff) | |
download | rockbox-4128a1fe48c63e32196276bbc1eae6ac4871ec5c.tar.gz rockbox-4128a1fe48c63e32196276bbc1eae6ac4871ec5c.zip |
[Bugfix/Feature] OpenPlugin and default plugins
selecting files to run is nice and all but you might not like the plugin
you can edit it OpenPlugin Viewer Plugin but instead pop it when you add
a file to reduce suprises
shortcut viewer is not ready for this so exclude it for now
Change-Id: I950599d87f47d42e8c2d59695f6583d497b217f0
adds: default plugin (if any) is selected in the open with dialog
Diffstat (limited to 'apps/open_plugin.c')
-rw-r--r-- | apps/open_plugin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/open_plugin.c b/apps/open_plugin.c index e10463d260..8b5fce1d29 100644 --- a/apps/open_plugin.c +++ b/apps/open_plugin.c | |||
@@ -323,10 +323,10 @@ uint32_t open_plugin_add_path(const char *key, const char *plugin, const char *p | |||
323 | /* get the entry from the opx file */ | 323 | /* get the entry from the opx file */ |
324 | op_load_entry(0, OPEN_PLUGIN_LANG_IGNORE, op_entry, plugin); | 324 | op_load_entry(0, OPEN_PLUGIN_LANG_IGNORE, op_entry, plugin); |
325 | } | 325 | } |
326 | else if(!parameter) | 326 | else if(!parameter && lang_id != LANG_SHORTCUTS) |
327 | { | 327 | { |
328 | strmemccpy(op_entry->param, plugin, OPEN_PLUGIN_BUFSZ); | 328 | strmemccpy(op_entry->param, plugin, OPEN_PLUGIN_BUFSZ); |
329 | plugin = filetype_get_plugin(fattr, op_entry->path, OPEN_PLUGIN_BUFSZ); | 329 | plugin = filetype_get_viewer(op_entry->path, OPEN_PLUGIN_BUFSZ, plugin); |
330 | if (!plugin) | 330 | if (!plugin) |
331 | { | 331 | { |
332 | logf("OP no plugin found to run %s", op_entry->param); | 332 | logf("OP no plugin found to run %s", op_entry->param); |
@@ -376,7 +376,7 @@ static bool callback_show_item(char *name, int attr, struct tree_context *tc) | |||
376 | return false; | 376 | return false; |
377 | #endif | 377 | #endif |
378 | return attr & ATTR_DIRECTORY || | 378 | return attr & ATTR_DIRECTORY || |
379 | (filetype_supported(attr) && (attr & FILE_ATTR_AUDIO) == 0); | 379 | (filetype_supported(attr) && (attr & FILE_ATTR_AUDIO) != FILE_ATTR_AUDIO); |
380 | } | 380 | } |
381 | 381 | ||
382 | /* open_plugin_browse() | 382 | /* open_plugin_browse() |