summaryrefslogtreecommitdiff
path: root/apps/shortcuts.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/shortcuts.c')
-rw-r--r--apps/shortcuts.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/shortcuts.c b/apps/shortcuts.c
index aa9a32bbb2..70f140d42e 100644
--- a/apps/shortcuts.c
+++ b/apps/shortcuts.c
@@ -395,8 +395,6 @@ static const char * shortcut_menu_get_name(int selected_item, void * data,
395 char * buffer, size_t buffer_len) 395 char * buffer, size_t buffer_len)
396{ 396{
397 (void)data; 397 (void)data;
398 (void)buffer;
399 (void)buffer_len;
400 struct shortcut *sc = get_shortcut(selected_item); 398 struct shortcut *sc = get_shortcut(selected_item);
401 if (!sc) 399 if (!sc)
402 return ""; 400 return "";
@@ -409,6 +407,16 @@ static const char * shortcut_menu_get_name(int selected_item, void * data,
409 /* No translation support as only soft_shutdown has LANG_SHUTDOWN defined */ 407 /* No translation support as only soft_shutdown has LANG_SHUTDOWN defined */
410 return type_strings[SHORTCUT_SHUTDOWN]; 408 return type_strings[SHORTCUT_SHUTDOWN];
411 } 409 }
410 else if (sc->type == SHORTCUT_BROWSER && (sc->u.path)[0] != '\0')
411 {
412 char* pos;
413 if (path_basename(sc->u.path, (const char **)&pos) > 0)
414 {
415 if (snprintf(buffer, buffer_len, "%s (%s)", pos, sc->u.path) < (int)buffer_len)
416 return buffer;
417 }
418 }
419
412 return sc->name[0] ? sc->name : sc->u.path; 420 return sc->name[0] ? sc->name : sc->u.path;
413} 421}
414 422
@@ -609,7 +617,6 @@ int do_shortcut_menu(void *ignored)
609 /* else fall through */ 617 /* else fall through */
610 case SHORTCUT_BROWSER: 618 case SHORTCUT_BROWSER:
611 { 619 {
612
613 if(open_plugin_add_path(ID2P(LANG_SHORTCUTS), sc->u.path, NULL) != 0) 620 if(open_plugin_add_path(ID2P(LANG_SHORTCUTS), sc->u.path, NULL) != 0)
614 { 621 {
615 done = GO_TO_PLUGIN; 622 done = GO_TO_PLUGIN;