diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/filetypes.c | 15 | ||||
-rw-r--r-- | apps/plugins/viewers.config | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c index 973f60e6e5..77d73df5cc 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c | |||
@@ -424,10 +424,14 @@ int filetype_list_viewers(const char* current_file) | |||
424 | { | 424 | { |
425 | int i, count = 0; | 425 | int i, count = 0; |
426 | char *strings[MAX_FILETYPES/2]; | 426 | char *strings[MAX_FILETYPES/2]; |
427 | char *ext; | ||
427 | struct menu_callback_with_desc cb_and_desc = | 428 | struct menu_callback_with_desc cb_and_desc = |
428 | { NULL, ID2P(LANG_ONPLAY_OPEN_WITH), Icon_Plugin }; | 429 | { NULL, ID2P(LANG_ONPLAY_OPEN_WITH), Icon_Plugin }; |
429 | struct menu_item_ex menu; | 430 | struct menu_item_ex menu; |
430 | 431 | ||
432 | ext = strrchr(current_file, '.'); | ||
433 | if (ext) | ||
434 | ext++; | ||
431 | for (i=0; i<filetype_count && count < (MAX_FILETYPES/2); i++) | 435 | for (i=0; i<filetype_count && count < (MAX_FILETYPES/2); i++) |
432 | { | 436 | { |
433 | if (filetypes[i].plugin) | 437 | if (filetypes[i].plugin) |
@@ -440,8 +444,15 @@ int filetype_list_viewers(const char* current_file) | |||
440 | } | 444 | } |
441 | if (j<count) | 445 | if (j<count) |
442 | continue; /* it is so grab the next plugin */ | 446 | continue; /* it is so grab the next plugin */ |
443 | strings[count] = filetypes[i].plugin; | 447 | if (ext && filetypes[i].extension && |
444 | count++; | 448 | (filetypes[i].extension[0] != '*')) |
449 | { | ||
450 | if (strcasecmp(filetypes[i].extension, ext)) | ||
451 | continue; /* skip this one */ | ||
452 | } | ||
453 | strings[count] = strrchr(filetypes[i].plugin,'/'); | ||
454 | if (strings[count]) | ||
455 | strings[count++]++; | ||
445 | } | 456 | } |
446 | } | 457 | } |
447 | #ifndef HAVE_LCD_BITMAP | 458 | #ifndef HAVE_LCD_BITMAP |
diff --git a/apps/plugins/viewers.config b/apps/plugins/viewers.config index 57bb5b4961..938a47a7ec 100644 --- a/apps/plugins/viewers.config +++ b/apps/plugins/viewers.config | |||
@@ -33,7 +33,7 @@ tap,viewers/zxbox,12 | |||
33 | sna,viewers/zxbox,12 | 33 | sna,viewers/zxbox,12 |
34 | tzx,viewers/zxbox,12 | 34 | tzx,viewers/zxbox,12 |
35 | z80,viewers/zxbox,12 | 35 | z80,viewers/zxbox,12 |
36 | zzz,viewers/properties,- | 36 | *,viewers/properties,- |
37 | colours,apps/text_editor,11 | 37 | colours,apps/text_editor,11 |
38 | ssg,games/superdom,- | 38 | ssg,games/superdom,- |
39 | link,viewers/shortcuts,- | 39 | link,viewers/shortcuts,- |