diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2009-07-22 22:10:25 +0000 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2009-07-22 22:10:25 +0000 |
| commit | 5c9fe52629f2f0f68e25efe658281b2fa42bab84 (patch) | |
| tree | b0823e6b48173a84dc5dfc84ada7295ebbbd7d38 /apps/gui | |
| parent | 962faf12732b8e62dd2930c42e00111fc5d4f7ed (diff) | |
| download | rockbox-5c9fe52629f2f0f68e25efe658281b2fa42bab84.zip rockbox-5c9fe52629f2f0f68e25efe658281b2fa42bab84.tar.gz rockbox-5c9fe52629f2f0f68e25efe658281b2fa42bab84.tar.bz2 rockbox-5c9fe52629f2f0f68e25efe658281b2fa42bab84.tar.xz | |
Commit part of FS#9873 - Utilise buttons for playlisting
It adds a shortcut (combo or button) to directly go from the wps to the playlist viewer. The combos could possibly be improved on some targets, but I tried to keep a tad bit of consistency (was hardly possible).
I also added a corresponding touchscreen region and adapted cabbiev2.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22003 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
| -rw-r--r-- | apps/gui/gwps.c | 8 | ||||
| -rw-r--r-- | apps/gui/gwps.h | 2 | ||||
| -rw-r--r-- | apps/gui/wps_parser.c | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index eb1437c..154864a 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c @@ -65,6 +65,7 @@ #include "pcmbuf.h" #include "option_select.h" #include "dsp.h" +#include "playlist_viewer.h" #define RESTORE_WPS_INSTANTLY 0l #define RESTORE_WPS_NEXT_SECOND ((long)(HZ+current_tick)) @@ -786,7 +787,12 @@ long gui_wps_show(void) case SYS_POWEROFF: default_event_handler(SYS_POWEROFF); break; - + case ACTION_WPS_VIEW_PLAYLIST: + gwps_leave_wps(); + if (playlist_viewer()) /* true if USB connected */ + return SYS_USB_CONNECTED; + restore = true; + break; default: if(default_event_handler(button) == SYS_USB_CONNECTED) return GO_TO_ROOT; diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h index ac1cbad..2acde0d 100644 --- a/apps/gui/gwps.h +++ b/apps/gui/gwps.h @@ -378,7 +378,7 @@ struct touchregion { bool repeat; /* requires the area be held for the action */ int action; /* action this button will return */ }; -#define MAX_TOUCHREGIONS 12 +#define MAX_TOUCHREGIONS 15 #endif /* wps_data this struct holds all necessary data which describes the diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c index 248269d..fb0b3ac 100644 --- a/apps/gui/wps_parser.c +++ b/apps/gui/wps_parser.c @@ -1163,6 +1163,7 @@ static struct touchaction touchactions[] = { {"menu", ACTION_WPS_MENU }, {"browse", ACTION_WPS_BROWSE }, {"shuffle", ACTION_TOUCH_SHUFFLE }, {"repmode", ACTION_TOUCH_REPMODE }, {"quickscreen", ACTION_WPS_QUICKSCREEN },{"contextmenu", ACTION_WPS_CONTEXT }, + {"playlist", ACTION_WPS_VIEW_PLAYLIST }, }; static int parse_touchregion(const char *wps_bufptr, struct wps_token *token, struct wps_data *wps_data) @@ -1191,6 +1192,7 @@ static int parse_touchregion(const char *wps_bufptr, * contextmenu - open the context menu */ + if ((wps_data->touchregion_count +1 >= MAX_TOUCHREGIONS) || (*ptr != '|')) return WPS_ERROR_INVALID_PARAM; ptr++; |