summaryrefslogtreecommitdiff
path: root/apps/plugins/pictureflow
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-05-31 16:56:54 +0000
committerThomas Martitz <kugel@rockbox.org>2009-05-31 16:56:54 +0000
commitc69331ef32171966b19f4348c72539d4c6a149ba (patch)
tree8a42e5951b9711d5a5226da8f47eee9d24451247 /apps/plugins/pictureflow
parentb2afc258dc6e87bfc5684bb87eb38b52d0138212 (diff)
Restructure/cleanup the album list buttom mapping, removing it entirely for scrollwheel. No functional change (scrollwheel didn't use it before, anyway).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21148 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pictureflow')
-rw-r--r--apps/plugins/pictureflow/pictureflow.c43
1 files changed, 20 insertions, 23 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c
index 96f79792ca..a7a4205fa2 100644
--- a/apps/plugins/pictureflow/pictureflow.c
+++ b/apps/plugins/pictureflow/pictureflow.c
@@ -48,6 +48,10 @@ PLUGIN_HEADER
#define PF_MENU ACTION_STD_MENU
#define PF_QUIT (LAST_ACTION_PLACEHOLDER + 1)
+#if !defined(HAVE_SCROLLWHEEL)
+ /* scrollwheel targets use the wheel, just as they do in lists,
+ * so there's no need for a special context,
+ * others use left/right here too (as oppsed to up/down in lists) */
const struct button_mapping pf_context_album_scroll[] =
{
#ifdef HAVE_TOUCHSCREEN
@@ -56,39 +60,28 @@ const struct button_mapping pf_context_album_scroll[] =
{PF_NEXT, BUTTON_MIDRIGHT, BUTTON_NONE},
{PF_NEXT_REPEAT, BUTTON_MIDRIGHT|BUTTON_REPEAT, BUTTON_NONE},
#endif
-#if CONFIG_KEYPAD == IRIVER_H100_PAD || CONFIG_KEYPAD == IRIVER_H300_PAD || \
- CONFIG_KEYPAD == IAUDIO_X5M5_PAD || CONFIG_KEYPAD == GIGABEAT_PAD || \
- CONFIG_KEYPAD == GIGABEAT_S_PAD || CONFIG_KEYPAD == RECORDER_PAD || \
- CONFIG_KEYPAD == ARCHOS_AV300_PAD || CONFIG_KEYPAD == SANSA_C100_PAD || \
- CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD || \
- CONFIG_KEYPAD == SANSA_M200_PAD || CONFIG_KEYPAD == IRIVER_IFP7XX_PAD || \
- CONFIG_KEYPAD == MROBE100_PAD || CONFIG_KEYPAD == PHILIPS_SA9200_PAD || \
- CONFIG_KEYPAD == IAUDIO67_PAD || CONFIG_KEYPAD == CREATIVEZVM_PAD || \
- CONFIG_KEYPAD == PHILIPS_HDD1630_PAD || CONFIG_KEYPAD == CREATIVEZV_PAD \
- || CONFIG_KEYPAD == LOGIK_DAX_PAD || CONFIG_KEYPAD == MEIZU_M6SL_PAD
- {PF_PREV, BUTTON_LEFT, BUTTON_NONE},
- {PF_PREV_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
- {PF_NEXT, BUTTON_RIGHT, BUTTON_NONE},
- {PF_NEXT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
-#elif CONFIG_KEYPAD == ONDIO_PAD
+#if (CONFIG_KEYPAD == IAUDIO_M3_PAD || CONFIG_KEYPAD == MROBE500_PAD)
+ {PF_PREV, BUTTON_RC_REW, BUTTON_NONE},
+ {PF_PREV_REPEAT, BUTTON_RC_REW|BUTTON_REPEAT,BUTTON_NONE},
+ {PF_NEXT, BUTTON_RC_FF, BUTTON_NONE},
+ {PF_NEXT_REPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE},
+#else
{PF_PREV, BUTTON_LEFT, BUTTON_NONE},
{PF_PREV_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
{PF_NEXT, BUTTON_RIGHT, BUTTON_NONE},
{PF_NEXT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
+#endif
+#if CONFIG_KEYPAD == ONDIO_PAD
{PF_SELECT, BUTTON_UP|BUTTON_REL, BUTTON_UP},
{PF_CONTEXT, BUTTON_UP|BUTTON_REPEAT, BUTTON_UP},
{ACTION_NONE, BUTTON_UP, BUTTON_NONE},
{ACTION_NONE, BUTTON_DOWN, BUTTON_NONE},
{ACTION_NONE, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE},
{ACTION_NONE, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT},
-#elif CONFIG_KEYPAD == IAUDIO_M3_PAD || CONFIG_KEYPAD == MROBE500_PAD
- {PF_PREV, BUTTON_RC_REW, BUTTON_NONE},
- {PF_PREV_REPEAT, BUTTON_RC_REW|BUTTON_REPEAT,BUTTON_NONE},
- {PF_NEXT, BUTTON_RC_FF, BUTTON_NONE},
- {PF_NEXT_REPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE},
#endif
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|1)
};
+#endif /* !defined(HAVE_SCROLLWHEEL) */
const struct button_mapping pf_context_buttons[] =
{
@@ -144,7 +137,9 @@ const struct button_mapping pf_context_buttons[] =
};
const struct button_mapping *pf_contexts[] =
{
+#if !defined(HAVE_SCROLLWHEEL)
pf_context_album_scroll,
+#endif
pf_context_buttons
};
@@ -2601,9 +2596,11 @@ int main(void)
rb->yield();
/*/ Handle buttons */
- button = rb->get_custom_action(CONTEXT_CUSTOM|
- (pf_state == pf_show_tracks ? 1 : 0),
- instant_update ? 0 : HZ/16,
+ button = rb->get_custom_action(CONTEXT_CUSTOM
+#if !defined(HAVE_SCROLLWHEEL)
+ |(pf_state == pf_show_tracks ? 1 : 0)
+#endif
+ ,instant_update ? 0 : HZ/16,
get_context_map);
switch (button) {