summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/gui/list.c4
-rw-r--r--apps/gui/list.h22
-rw-r--r--apps/menu.c17
-rw-r--r--apps/playlist_viewer.c9
-rw-r--r--apps/tree.c10
-rw-r--r--docs/CREDITS2
6 files changed, 47 insertions, 17 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 67c0f3055d..ebb915e0bc 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -651,7 +651,9 @@ unsigned gui_synclist_do_button(struct gui_synclist * lists, unsigned button)
#ifdef LIST_PGRIGHT
case LIST_PGRIGHT:
+#if !(LIST_PGRIGHT & BUTTON_REPEAT)
case LIST_PGRIGHT | BUTTON_REPEAT:
+#endif
#ifdef LIST_RC_PGRIGHT
case LIST_RC_PGRIGHT:
case LIST_RC_PGRIGHT | BUTTON_REPEAT:
@@ -663,7 +665,9 @@ unsigned gui_synclist_do_button(struct gui_synclist * lists, unsigned button)
#ifdef LIST_PGLEFT
case LIST_PGLEFT:
+#if !(LIST_PGLEFT & BUTTON_REPEAT)
case LIST_PGLEFT | BUTTON_REPEAT:
+#endif
#ifdef LIST_RC_PGLEFT
case LIST_RC_PGLEFT:
case LIST_RC_PGLEFT | BUTTON_REPEAT:
diff --git a/apps/gui/list.h b/apps/gui/list.h
index b898e14f37..f0a6d3f32c 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -33,8 +33,8 @@
#define LIST_PREV BUTTON_UP
#define LIST_PGUP (BUTTON_ON | BUTTON_UP)
#define LIST_PGDN (BUTTON_ON | BUTTON_DOWN)
-#define LIST_PGRIGHT (BUTTON_ON | BUTTON_RIGHT)
-#define LIST_PGLEFT (BUTTON_ON | BUTTON_LEFT)
+#define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_REPEAT)
+#define LIST_PGLEFT (BUTTON_LEFT | BUTTON_REPEAT)
#ifdef CONFIG_REMOTE_KEYPAD
#define LIST_RC_NEXT BUTTON_RC_FF
@@ -50,8 +50,8 @@
#define LIST_PREV BUTTON_UP
#define LIST_PGUP (BUTTON_ON | BUTTON_UP)
#define LIST_PGDN (BUTTON_ON | BUTTON_DOWN)
-#define LIST_PGRIGHT (BUTTON_ON | BUTTON_RIGHT)
-#define LIST_PGLEFT (BUTTON_ON | BUTTON_LEFT)
+#define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_REPEAT)
+#define LIST_PGLEFT (BUTTON_LEFT | BUTTON_REPEAT)
#define LIST_RC_NEXT BUTTON_RC_RIGHT
#define LIST_RC_PREV BUTTON_RC_LEFT
@@ -72,30 +72,40 @@
#elif (CONFIG_KEYPAD == IPOD_3G_PAD) || (CONFIG_KEYPAD == IPOD_4G_PAD)
#define LIST_NEXT BUTTON_SCROLL_FWD
#define LIST_PREV BUTTON_SCROLL_BACK
+#define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_REPEAT)
+#define LIST_PGLEFT (BUTTON_LEFT | BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
#define LIST_NEXT BUTTON_DOWN
#define LIST_PREV BUTTON_UP
+//#define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_)
+//#define LIST_PGLEFT (BUTTON_LEFT | BUTTON_) Todo: define those
#elif CONFIG_KEYPAD == GMINI100_PAD
#define LIST_NEXT BUTTON_DOWN
#define LIST_PREV BUTTON_UP
#define LIST_PGUP (BUTTON_ON | BUTTON_UP)
#define LIST_PGDN (BUTTON_ON | BUTTON_DOWN)
-#define LIST_PGRIGHT (BUTTON_ON | BUTTON_RIGHT)
-#define LIST_PGLEFT (BUTTON_ON | BUTTON_LEFT)
+#define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_REPEAT)
+#define LIST_PGLEFT (BUTTON_LEFT | BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
#define LIST_NEXT BUTTON_DOWN
#define LIST_PREV BUTTON_UP
+#define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_REPEAT)
+#define LIST_PGLEFT (BUTTON_LEFT | BUTTON_REPEAT)
#elif CONFIG_KEYPAD == GIGABEAT_PAD
#define LIST_NEXT BUTTON_DOWN
#define LIST_PREV BUTTON_UP
+#define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_REPEAT)
+#define LIST_PGLEFT (BUTTON_LEFT | BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
#define LIST_NEXT BUTTON_SCROLL_DOWN
#define LIST_PREV BUTTON_SCROLL_UP
+#define LIST_PGRIGHT (BUTTON_RIGHT | BUTTON_REPEAT)
+#define LIST_PGLEFT (BUTTON_LEFT | BUTTON_REPEAT)
#endif
diff --git a/apps/menu.c b/apps/menu.c
index f67c0633c6..a1c70824ce 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -124,6 +124,7 @@ int menu_show(int m)
#endif
bool exit = false;
int key;
+ unsigned lastbutton = 0;
gui_synclist_draw(&(menus[m].synclist));
gui_syncstatusbar_draw(&statusbars, true);
@@ -143,7 +144,9 @@ int menu_show(int m)
if(gui_synclist_do_button(&(menus[m].synclist), key))
menu_talk_selected(m);
switch( key ) {
- case MENU_ENTER:
+ case MENU_ENTER | BUTTON_REL:
+ if (lastbutton != MENU_ENTER)
+ break;
#ifdef MENU_ENTER2
case MENU_ENTER2:
#endif
@@ -156,12 +159,18 @@ int menu_show(int m)
return gui_synclist_get_sel_pos(&(menus[m].synclist));
- case MENU_EXIT:
+ case MENU_EXIT | BUTTON_REL:
+ if (lastbutton != MENU_EXIT)
+ break;
#ifdef MENU_EXIT2
case MENU_EXIT2:
#endif
#ifdef MENU_EXIT_MENU
- case MENU_EXIT_MENU:
+ case MENU_EXIT_MENU | BUTTON_REL:
+ /* This is important for the Ondio's */
+ if ((key == (MENU_EXIT_MENU | BUTTON_REL)) &&
+ (lastbutton != MENU_EXIT_MENU))
+ break;
#endif
#ifdef MENU_RC_EXIT
case MENU_RC_EXIT:
@@ -178,6 +187,8 @@ int menu_show(int m)
break;
}
gui_syncstatusbar_draw(&statusbars, false);
+ if ( key )
+ lastbutton = key;
}
return MENU_SELECTED_EXIT;
}
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c
index 6c21cc4a99..46482cb7fa 100644
--- a/apps/playlist_viewer.c
+++ b/apps/playlist_viewer.c
@@ -677,7 +677,9 @@ bool playlist_viewer_ex(char* filename)
}
switch (button)
{
- case TREE_EXIT:
+ case TREE_EXIT | BUTTON_REL:
+ if (lastbutton != TREE_EXIT)
+ break;
#ifdef TREE_RC_EXIT
case TREE_RC_EXIT:
#endif
@@ -688,8 +690,9 @@ bool playlist_viewer_ex(char* filename)
break;
#ifdef TREE_ENTER
- case TREE_ENTER:
- case TREE_ENTER | BUTTON_REPEAT:
+ case TREE_ENTER | BUTTON_REL:
+ if (lastbutton != TREE_ENTER)
+ break;
#endif
#ifdef TREE_RC_RUN
case TREE_RC_RUN:
diff --git a/apps/tree.c b/apps/tree.c
index 0dd03779a5..ac0e44c7f1 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -587,8 +587,9 @@ static bool dirbrowse(void)
switch ( button ) {
#ifdef TREE_ENTER
- case TREE_ENTER:
- case TREE_ENTER | BUTTON_REPEAT:
+ case TREE_ENTER | BUTTON_REL:
+ if (lastbutton != TREE_ENTER)
+ break;
#endif
#ifdef TREE_RC_RUN
case TREE_RC_RUN:
@@ -617,8 +618,9 @@ static bool dirbrowse(void)
restore = true;
break;
- case TREE_EXIT:
- case TREE_EXIT | BUTTON_REPEAT:
+ case TREE_EXIT | BUTTON_REL:
+ if (lastbutton != TREE_EXIT)
+ break;
#ifdef TREE_RC_EXIT
case TREE_RC_EXIT:
#endif
diff --git a/docs/CREDITS b/docs/CREDITS
index f666efe3c1..0b907024ce 100644
--- a/docs/CREDITS
+++ b/docs/CREDITS
@@ -222,4 +222,4 @@ Emanuel Zephir
Alexander Levin
Barry Wardell
Lars van de Klomp
-philippe Miossec
+Philippe Miossec