summaryrefslogtreecommitdiff
path: root/apps/shortcuts.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/shortcuts.c')
-rw-r--r--apps/shortcuts.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/shortcuts.c b/apps/shortcuts.c
index 5322447b46..68a631dcf8 100644
--- a/apps/shortcuts.c
+++ b/apps/shortcuts.c
@@ -451,17 +451,22 @@ static int shortcut_menu_get_action(int action, struct gui_synclist *lists)
451static enum themable_icons shortcut_menu_get_icon(int selected_item, void * data) 451static enum themable_icons shortcut_menu_get_icon(int selected_item, void * data)
452{ 452{
453 (void)data; 453 (void)data;
454 int icon;
454 struct shortcut *sc = get_shortcut(selected_item); 455 struct shortcut *sc = get_shortcut(selected_item);
455 if (!sc) 456 if (!sc)
456 return Icon_NOICON; 457 return Icon_NOICON;
457 if (sc->icon == Icon_NOICON) 458 if (sc->icon == Icon_NOICON)
458 { 459 {
460
459 switch (sc->type) 461 switch (sc->type)
460 { 462 {
461 case SHORTCUT_FILE: 463 case SHORTCUT_FILE:
462 return filetype_get_icon(filetype_get_attr(sc->u.path)); 464 return filetype_get_icon(filetype_get_attr(sc->u.path));
463 case SHORTCUT_BROWSER: 465 case SHORTCUT_BROWSER:
464 return Icon_Plugin; 466 icon = filetype_get_icon(filetype_get_attr(sc->u.path));
467 if (icon <= 0)
468 icon = Icon_Folder;
469 return icon;
465 case SHORTCUT_SETTING: 470 case SHORTCUT_SETTING:
466 return Icon_Menu_setting; 471 return Icon_Menu_setting;
467 case SHORTCUT_DEBUGITEM: 472 case SHORTCUT_DEBUGITEM:
@@ -597,6 +602,7 @@ int do_shortcut_menu(void *ignored)
597 sc = get_shortcut(list.selection); 602 sc = get_shortcut(list.selection);
598 if (!sc) 603 if (!sc)
599 continue; 604 continue;
605 splashf(200, "%i", sc->type);
600 switch (sc->type) 606 switch (sc->type)
601 { 607 {
602 case SHORTCUT_PLAYLISTMENU: 608 case SHORTCUT_PLAYLISTMENU:
@@ -619,6 +625,7 @@ int do_shortcut_menu(void *ignored)
619 /* else fall through */ 625 /* else fall through */
620 case SHORTCUT_BROWSER: 626 case SHORTCUT_BROWSER:
621 { 627 {
628 splashf(200, "b %i %s", sc->type, sc->u.path);
622 if(open_plugin_add_path(ID2P(LANG_SHORTCUTS), sc->u.path, NULL) != 0) 629 if(open_plugin_add_path(ID2P(LANG_SHORTCUTS), sc->u.path, NULL) != 0)
623 { 630 {
624 done = GO_TO_PLUGIN; 631 done = GO_TO_PLUGIN;