summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomer Shalev <shalev.tomer@gmail.com>2010-02-24 21:38:15 +0000
committerTomer Shalev <shalev.tomer@gmail.com>2010-02-24 21:38:15 +0000
commit04e3eb0c54bf3b395912d44e767aa43964d810e1 (patch)
tree76ca3b700ee145ede0bf912d52f635c82b7e3436
parent83d589dad1a0a96f3844d68b24d29c9b0f31e650 (diff)
downloadrockbox-04e3eb0c54bf3b395912d44e767aa43964d810e1.tar.gz
rockbox-04e3eb0c54bf3b395912d44e767aa43964d810e1.tar.bz2
rockbox-04e3eb0c54bf3b395912d44e767aa43964d810e1.zip
FS#10552 - Cowon D2: pgup/pgdn on minus/plus buttons in text viewer
Author: Nemtsev Alexey Changes that were not part of the original patch: - Updated corresponding manual entry - Added support for having both buttons and touchscreen mapping to the same action git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24896 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/viewer.c24
-rw-r--r--manual/plugins/text_viewer.tex10
2 files changed, 26 insertions, 8 deletions
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c
index 299c392177..c4197a383c 100644
--- a/apps/plugins/viewer.c
+++ b/apps/plugins/viewer.c
@@ -292,6 +292,8 @@ PLUGIN_HEADER
#elif CONFIG_KEYPAD == COWON_D2_PAD
#define VIEWER_QUIT BUTTON_POWER
#define VIEWER_MENU BUTTON_MENU
+#define VIEWER_PAGE_UP BUTTON_MINUS
+#define VIEWER_PAGE_DOWN BUTTON_PLUS
#elif CONFIG_KEYPAD == IAUDIO67_PAD
#define VIEWER_QUIT BUTTON_POWER
@@ -369,13 +371,19 @@ PLUGIN_HEADER
#endif
#ifdef HAVE_TOUCHSCREEN
-#ifndef VIEWER_QUIT
+#ifdef VIEWER_QUIT
+#define VIEWER_QUIT2 BUTTON_TOPLEFT
+#else
#define VIEWER_QUIT BUTTON_TOPLEFT
#endif
-#ifndef VIEWER_PAGE_UP
+#ifdef VIEWER_PAGE_UP
+#define VIEWER_PAGE_UP2 BUTTON_TOPMIDDLE
+#else
#define VIEWER_PAGE_UP BUTTON_TOPMIDDLE
#endif
-#ifndef VIEWER_PAGE_DOWN
+#ifdef VIEWER_PAGE_DOWN
+#define VIEWER_PAGE_DOWN2 BUTTON_BOTTOMMIDDLE
+#else
#define VIEWER_PAGE_DOWN BUTTON_BOTTOMMIDDLE
#endif
#ifndef VIEWER_SCREEN_LEFT
@@ -384,7 +392,9 @@ PLUGIN_HEADER
#ifndef VIEWER_SCREEN_RIGHT
#define VIEWER_SCREEN_RIGHT BUTTON_MIDRIGHT
#endif
-#ifndef VIEWER_MENU
+#ifdef VIEWER_MENU
+#define VIEWER_MENU2 BUTTON_TOPRIGHT
+#else
#define VIEWER_MENU BUTTON_TOPRIGHT
#endif
#ifndef VIEWER_AUTOSCROLL
@@ -1591,6 +1601,7 @@ enum plugin_status plugin_start(const void* file)
button = rb->button_get_w_tmo(HZ/10);
switch (button) {
case VIEWER_MENU:
+ case VIEWER_MENU2:
viewer_menu();
break;
@@ -1603,7 +1614,9 @@ enum plugin_status plugin_start(const void* file)
break;
case VIEWER_PAGE_UP:
+ case VIEWER_PAGE_UP2:
case VIEWER_PAGE_UP | BUTTON_REPEAT:
+ case VIEWER_PAGE_UP2 | BUTTON_REPEAT:
if (prefs.scroll_mode == PAGE)
{
/* Page up */
@@ -1621,7 +1634,9 @@ enum plugin_status plugin_start(const void* file)
break;
case VIEWER_PAGE_DOWN:
+ case VIEWER_PAGE_DOWN2:
case VIEWER_PAGE_DOWN | BUTTON_REPEAT:
+ case VIEWER_PAGE_DOWN2 | BUTTON_REPEAT:
if (prefs.scroll_mode == PAGE)
{
/* Page down */
@@ -1708,6 +1723,7 @@ enum plugin_status plugin_start(const void* file)
case VIEWER_RC_QUIT:
#endif
case VIEWER_QUIT:
+ case VIEWER_QUIT2:
viewer_exit(NULL);
done = true;
break;
diff --git a/manual/plugins/text_viewer.tex b/manual/plugins/text_viewer.tex
index 1836b45c2b..19012c75a5 100644
--- a/manual/plugins/text_viewer.tex
+++ b/manual/plugins/text_viewer.tex
@@ -15,7 +15,7 @@ files without a \fname{.txt} extension by using \emph{Open with} from the
\opt{IRIVER_H10_PAD}{\ButtonScrollUp}
\opt{SANSA_C200_PAD}{\ButtonVolUp}
\opt{GIGABEAT_S_PAD}{\ButtonPrev}
- \opt{COWON_D2_PAD}{\TouchTopMiddle}
+ \opt{COWON_D2_PAD}{\ButtonMinus{} / \TouchTopMiddle}
\opt{HAVEREMOTEKEYMAP}{& }
& Scroll{}-up\\
@@ -26,7 +26,7 @@ files without a \fname{.txt} extension by using \emph{Open with} from the
\opt{IRIVER_H10_PAD}{\ButtonScrollDown}
\opt{SANSA_C200_PAD}{\ButtonVolDown}
\opt{GIGABEAT_S_PAD}{\ButtonNext}
- \opt{COWON_D2_PAD}{\TouchBottomMiddle}
+ \opt{COWON_D2_PAD}{\ButtonPlus{} / \TouchBottomMiddle}
\opt{HAVEREMOTEKEYMAP}{& }
& Scroll{}-down\\
@@ -95,11 +95,12 @@ files without a \fname{.txt} extension by using \emph{Open with} from the
\opt{RECORDER_PAD}{\ButtonFOne}
\opt{ONDIO_PAD}{Long \ButtonMenu}
\opt{PLAYER_PAD,IPOD_4G_PAD,IPOD_3G_PAD,GIGABEAT_PAD,GIGABEAT_S_PAD%
- ,MROBE100_PAD,COWOND_D2_PAD}{\ButtonMenu}
+ ,MROBE100_PAD}{\ButtonMenu}
\opt{IRIVER_H100_PAD,IRIVER_H300_PAD}{\ButtonMode}
\opt{IAUDIO_X5_PAD,SANSA_C200_PAD,SANSA_E200_PAD}{\ButtonSelect}
\opt{SANSA_FUZE_PAD}{Long \ButtonSelect}
\opt{IRIVER_H10_PAD}{\ButtonRew}
+ \opt{COWON_D2_PAD}{\ButtonMenu{} / \TouchTopRight}
\opt{HAVEREMOTEKEYMAP}{& }
& Enter menu\\
@@ -107,9 +108,10 @@ files without a \fname{.txt} extension by using \emph{Open with} from the
\opt{RECORDER_PAD,ONDIO_PAD,IRIVER_H100_PAD,IRIVER_H300_PAD}{\ButtonOff}
\opt{IPOD_4G_PAD,IPOD_3G_PAD}{\ButtonMenu}
\opt{IAUDIO_X5_PAD,IRIVER_H10_PAD,SANSA_E200_PAD,SANSA_C200_PAD,GIGABEAT_PAD%
- ,MROBE100_PAD,COWON_D2_PAD}{\ButtonPower}
+ ,MROBE100_PAD}{\ButtonPower}
\opt{SANSA_FUZE_PAD}{Long \ButtonHome}
\opt{GIGABEAT_S_PAD}{\ButtonBack}
+ \opt{COWON_D2_PAD}{\ButtonPower{} / \TouchTopLeft}
\opt{HAVEREMOTEKEYMAP}{&
\opt{IRIVER_RC_H100_PAD}{\ButtonRCStop}
}