Shortcuts Menu -- Update2
make shortcuts menu drop back into WPS on exit different icons for plugins and files versus folders Change-Id: I1b590c223b63a6b6598c33e767738daaea1c8ad0
This commit is contained in:
parent
d0ab6b24dc
commit
f348d921b6
2 changed files with 10 additions and 2 deletions
|
@ -839,7 +839,8 @@ long gui_wps_show(void)
|
||||||
if (global_settings.shortcuts_replaces_qs)
|
if (global_settings.shortcuts_replaces_qs)
|
||||||
{
|
{
|
||||||
global_status.last_screen = GO_TO_SHORTCUTMENU;
|
global_status.last_screen = GO_TO_SHORTCUTMENU;
|
||||||
return quick_screen_quick(button);
|
int ret = quick_screen_quick(button);
|
||||||
|
return (ret == GO_TO_PREVIOUS ? GO_TO_WPS : ret);
|
||||||
}
|
}
|
||||||
else if (quick_screen_quick(button) > 0)
|
else if (quick_screen_quick(button) > 0)
|
||||||
return GO_TO_ROOT;
|
return GO_TO_ROOT;
|
||||||
|
|
|
@ -451,17 +451,22 @@ static int shortcut_menu_get_action(int action, struct gui_synclist *lists)
|
||||||
static enum themable_icons shortcut_menu_get_icon(int selected_item, void * data)
|
static enum themable_icons shortcut_menu_get_icon(int selected_item, void * data)
|
||||||
{
|
{
|
||||||
(void)data;
|
(void)data;
|
||||||
|
int icon;
|
||||||
struct shortcut *sc = get_shortcut(selected_item);
|
struct shortcut *sc = get_shortcut(selected_item);
|
||||||
if (!sc)
|
if (!sc)
|
||||||
return Icon_NOICON;
|
return Icon_NOICON;
|
||||||
if (sc->icon == Icon_NOICON)
|
if (sc->icon == Icon_NOICON)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (sc->type)
|
switch (sc->type)
|
||||||
{
|
{
|
||||||
case SHORTCUT_FILE:
|
case SHORTCUT_FILE:
|
||||||
return filetype_get_icon(filetype_get_attr(sc->u.path));
|
return filetype_get_icon(filetype_get_attr(sc->u.path));
|
||||||
case SHORTCUT_BROWSER:
|
case SHORTCUT_BROWSER:
|
||||||
return Icon_Plugin;
|
icon = filetype_get_icon(filetype_get_attr(sc->u.path));
|
||||||
|
if (icon <= 0)
|
||||||
|
icon = Icon_Folder;
|
||||||
|
return icon;
|
||||||
case SHORTCUT_SETTING:
|
case SHORTCUT_SETTING:
|
||||||
return Icon_Menu_setting;
|
return Icon_Menu_setting;
|
||||||
case SHORTCUT_DEBUGITEM:
|
case SHORTCUT_DEBUGITEM:
|
||||||
|
@ -597,6 +602,7 @@ int do_shortcut_menu(void *ignored)
|
||||||
sc = get_shortcut(list.selection);
|
sc = get_shortcut(list.selection);
|
||||||
if (!sc)
|
if (!sc)
|
||||||
continue;
|
continue;
|
||||||
|
splashf(200, "%i", sc->type);
|
||||||
switch (sc->type)
|
switch (sc->type)
|
||||||
{
|
{
|
||||||
case SHORTCUT_PLAYLISTMENU:
|
case SHORTCUT_PLAYLISTMENU:
|
||||||
|
@ -619,6 +625,7 @@ int do_shortcut_menu(void *ignored)
|
||||||
/* else fall through */
|
/* else fall through */
|
||||||
case SHORTCUT_BROWSER:
|
case SHORTCUT_BROWSER:
|
||||||
{
|
{
|
||||||
|
splashf(200, "b %i %s", sc->type, sc->u.path);
|
||||||
if(open_plugin_add_path(ID2P(LANG_SHORTCUTS), sc->u.path, NULL) != 0)
|
if(open_plugin_add_path(ID2P(LANG_SHORTCUTS), sc->u.path, NULL) != 0)
|
||||||
{
|
{
|
||||||
done = GO_TO_PLUGIN;
|
done = GO_TO_PLUGIN;
|
||||||
|
|
Loading…
Reference in a new issue