summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorKjell Ericson <kjell@haxx.se>2003-05-22 06:42:14 +0000
committerKjell Ericson <kjell@haxx.se>2003-05-22 06:42:14 +0000
commit53f156a6fcec07301a6b29a3f647fff43520af7a (patch)
treee780f297944fedf31f6cafce3a1d00d4dc989993 /apps
parent231ddff4bd3e9d0214b520726ef9235117c87b31 (diff)
New feature for player: Jump scroll!
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3693 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/lang/english.lang15
-rw-r--r--apps/lang/svenska.lang15
-rw-r--r--apps/settings.c16
-rw-r--r--apps/settings.h4
-rw-r--r--apps/settings_menu.c15
5 files changed, 62 insertions, 3 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index b30a8cd11d..604a77bd2e 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -1517,3 +1517,18 @@ id: LANG_MAX_FILES_IN_PLAYLIST
desc: in settings_menu
eng: "Max playlist size"
new:
+
+id: LANG_JUMP_SCROLL
+desc: (player) menu altarnative for jump scroll
+eng: "Jump scroll"
+new:
+
+id: LANG_ONE_TIME
+desc: (player) the jump scroll shall be done "one time"
+eng: "One time"
+new:
+
+id: LANG_ALWAYS
+desc: (player) the jump scroll shall be done "always"
+eng: "Always"
+new:
diff --git a/apps/lang/svenska.lang b/apps/lang/svenska.lang
index a83dcea7ba..6fd85c5acc 100644
--- a/apps/lang/svenska.lang
+++ b/apps/lang/svenska.lang
@@ -1483,3 +1483,18 @@ id: LANG_MAX_FILES_IN_PLAYLIST
desc: in settings_menu
eng: "Max playlist size"
new: "Max storlek på spellistan"
+
+id: LANG_JUMP_SCROLL
+desc: (player) menu altarnative for jump scroll
+eng: "Jump scroll"
+new: "Hopprullning"
+
+id: LANG_ONE_TIME
+desc: (player) the jump scroll shall be done "one time"
+eng: "One time"
+new: "En gång"
+
+id: LANG_ALWAYS
+desc: (player) the jump scroll shall be done "always"
+eng: "Always"
+new: "Alltid"
diff --git a/apps/settings.c b/apps/settings.c
index f4bb2427a4..5c7ef7e645 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -144,6 +144,7 @@ Rest of config block, only saved to disk:
0xF4 (int) Playlist first index
0xF8 (int) Playlist shuffle seed
0xFC (char[260]) Resume playlist (path/to/dir or path/to/playlist.m3u)
+0xFD (char)jump scroll mode (only for player)
*************************************/
@@ -411,7 +412,9 @@ int settings_save( void )
memcpy(&config_block[0xF8], &global_settings.resume_seed, 4);
strncpy(&config_block[0xFC], global_settings.resume_file, MAX_PATH);
-
+#ifdef HAVE_LCD_CHARCELLS
+ config_block[0xfd]=(unsigned char)global_settings.jump_scroll;
+#endif
DEBUGF( "+Resume file %s\n",global_settings.resume_file );
DEBUGF( "+Resume index %X offset %X\n",
global_settings.resume_index,
@@ -528,6 +531,8 @@ void settings_apply(void)
font_reset();
lcd_scroll_step(global_settings.scroll_step);
+#else
+ lcd_jump_scroll(global_settings.jump_scroll);
#endif
lcd_bidir_scroll(global_settings.bidir_limit);
lcd_scroll_delay(global_settings.scroll_delay * (HZ/10));
@@ -727,6 +732,10 @@ void settings_load(void)
strncpy(global_settings.lang_file, &config_block[0xcc], MAX_FILENAME);
strncpy(global_settings.font_file, &config_block[0xe0], MAX_FILENAME);
strncpy(global_settings.resume_file, &config_block[0xFC], MAX_PATH);
+#ifdef HAVE_LCD_CHARSCELLS
+ if (config_block[0xfd] != 0xff)
+ global_settings.jump_scroll = config_block[0xfd];
+#endif
global_settings.resume_file[MAX_PATH]=0;
}
@@ -1217,6 +1226,8 @@ bool settings_save_config(void)
#ifdef HAVE_LCD_BITMAP
fprintf(fd, "scroll step: %d\r\n", global_settings.scroll_step);
+#else
+ fprintf(fd, "jump scroll: %d\r\n", global_settings.jump_scroll);
#endif
fprintf(fd, "bidir limit: %d\r\n", global_settings.bidir_limit);
@@ -1393,6 +1404,9 @@ void settings_reset(void) {
global_settings.battery_type = 0;
global_settings.scroll_speed = 8;
global_settings.bidir_limit = 50;
+#ifdef HAVE_LCD_CHARCELLS
+ global_settings.jump_scroll = 1;
+#endif
global_settings.scroll_delay = 100;
global_settings.scroll_step = 6;
global_settings.ff_rewind_min_step = DEFAULT_FF_REWIND_MIN_STEP;
diff --git a/apps/settings.h b/apps/settings.h
index 55a6f96e2e..2d4d9fac2f 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -151,7 +151,9 @@ struct user_settings
int bidir_limit; /* bidir scroll length limit */
int scroll_delay; /* delay (in 1/10s) before starting scroll */
int scroll_step; /* pixels to advance per update */
-
+#ifdef HAVE_LCD_CHARCELLS
+ int jump_scroll; /* Fast jump when scrolling */
+#endif
bool fade_on_stop; /* fade on pause/unpause/stop */
bool caption_backlight; /* turn on backlight at end and start of track */
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index 60ce4b2007..52b8d86aac 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -456,6 +456,16 @@ static bool bidir_limit(void)
&lcd_bidir_scroll, 25, 0, 200 );
}
+#ifdef HAVE_LCD_CHARCELLS
+static bool jump_scroll(void)
+{
+ char* names[] = { str(LANG_OFF), str(LANG_ONE_TIME), str(LANG_ALWAYS)};
+
+ return set_option(str(LANG_JUMP_SCROLL), &global_settings.jump_scroll,
+ names, 3, lcd_jump_scroll);
+}
+#endif
+
#ifndef SIMULATOR
/**
* Menu to set the battery capacity
@@ -748,7 +758,10 @@ static bool scroll_settings_menu(void)
#ifdef HAVE_LCD_BITMAP
{ str(LANG_SCROLL_STEP), scroll_step },
#endif
- { str(LANG_BIDIR_SCROLL), bidir_limit },
+ { str(LANG_BIDIR_SCROLL), bidir_limit },
+#ifdef HAVE_LCD_CHARCELLS
+ { str(LANG_JUMP_SCROLL), jump_scroll },
+#endif
};
m = menu_init( items, sizeof items / sizeof(struct menu_items) );