diff options
Diffstat (limited to 'apps/filetree.c')
-rw-r--r-- | apps/filetree.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/filetree.c b/apps/filetree.c index efe5e80a0f..75a32a9e42 100644 --- a/apps/filetree.c +++ b/apps/filetree.c | |||
@@ -435,7 +435,7 @@ static void ft_load_font(char *file) | |||
435 | int ft_enter(struct tree_context* c) | 435 | int ft_enter(struct tree_context* c) |
436 | { | 436 | { |
437 | int rc = GO_TO_PREVIOUS; | 437 | int rc = GO_TO_PREVIOUS; |
438 | static char buf[MAX_PATH]; | 438 | char buf[MAX_PATH]; |
439 | 439 | ||
440 | struct entry* file = tree_get_entry_at(c, c->selected_item); | 440 | struct entry* file = tree_get_entry_at(c, c->selected_item); |
441 | if (!file) | 441 | if (!file) |
@@ -641,6 +641,8 @@ int ft_enter(struct tree_context* c) | |||
641 | splash(HZ, ID2P(LANG_PARTY_MODE)); | 641 | splash(HZ, ID2P(LANG_PARTY_MODE)); |
642 | break; | 642 | break; |
643 | } | 643 | } |
644 | |||
645 | #ifdef PLUGINS_RUN_IN_BROWSER /* Stay in the filetree to run a plugin */ | ||
644 | switch (plugin_load(plugin, argument)) | 646 | switch (plugin_load(plugin, argument)) |
645 | { | 647 | { |
646 | case PLUGIN_GOTO_WPS: | 648 | case PLUGIN_GOTO_WPS: |
@@ -664,6 +666,10 @@ int ft_enter(struct tree_context* c) | |||
664 | default: | 666 | default: |
665 | break; | 667 | break; |
666 | } | 668 | } |
669 | #else /* Exit the filetree to run a plugin */ | ||
670 | plugin_open(plugin, argument); | ||
671 | rc = GO_TO_PLUGIN; | ||
672 | #endif | ||
667 | break; | 673 | break; |
668 | } | 674 | } |
669 | 675 | ||
@@ -687,6 +693,7 @@ int ft_enter(struct tree_context* c) | |||
687 | plugin = filetype_get_plugin(file, plugin_path, sizeof(plugin_path)); | 693 | plugin = filetype_get_plugin(file, plugin_path, sizeof(plugin_path)); |
688 | if (plugin) | 694 | if (plugin) |
689 | { | 695 | { |
696 | #ifdef PLUGINS_RUN_IN_BROWSER /* Stay in the filetree to run a plugin */ | ||
690 | switch (plugin_load(plugin, argument)) | 697 | switch (plugin_load(plugin, argument)) |
691 | { | 698 | { |
692 | case PLUGIN_USB_CONNECTED: | 699 | case PLUGIN_USB_CONNECTED: |
@@ -705,6 +712,10 @@ int ft_enter(struct tree_context* c) | |||
705 | default: | 712 | default: |
706 | break; | 713 | break; |
707 | } | 714 | } |
715 | #else /* Exit the filetree to run a plugin */ | ||
716 | plugin_open(plugin, argument); | ||
717 | rc = GO_TO_PLUGIN; | ||
718 | #endif | ||
708 | } | 719 | } |
709 | break; | 720 | break; |
710 | } | 721 | } |