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)
downloadrockbox-53f156a6fcec07301a6b29a3f647fff43520af7a.tar.gz
rockbox-53f156a6fcec07301a6b29a3f647fff43520af7a.zip
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
1517desc: in settings_menu 1517desc: in settings_menu
1518eng: "Max playlist size" 1518eng: "Max playlist size"
1519new: 1519new:
1520
1521id: LANG_JUMP_SCROLL
1522desc: (player) menu altarnative for jump scroll
1523eng: "Jump scroll"
1524new:
1525
1526id: LANG_ONE_TIME
1527desc: (player) the jump scroll shall be done "one time"
1528eng: "One time"
1529new:
1530
1531id: LANG_ALWAYS
1532desc: (player) the jump scroll shall be done "always"
1533eng: "Always"
1534new:
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
1483desc: in settings_menu 1483desc: in settings_menu
1484eng: "Max playlist size" 1484eng: "Max playlist size"
1485new: "Max storlek på spellistan" 1485new: "Max storlek på spellistan"
1486
1487id: LANG_JUMP_SCROLL
1488desc: (player) menu altarnative for jump scroll
1489eng: "Jump scroll"
1490new: "Hopprullning"
1491
1492id: LANG_ONE_TIME
1493desc: (player) the jump scroll shall be done "one time"
1494eng: "One time"
1495new: "En gång"
1496
1497id: LANG_ALWAYS
1498desc: (player) the jump scroll shall be done "always"
1499eng: "Always"
1500new: "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:
1440xF4 (int) Playlist first index 1440xF4 (int) Playlist first index
1450xF8 (int) Playlist shuffle seed 1450xF8 (int) Playlist shuffle seed
1460xFC (char[260]) Resume playlist (path/to/dir or path/to/playlist.m3u) 1460xFC (char[260]) Resume playlist (path/to/dir or path/to/playlist.m3u)
1470xFD (char)jump scroll mode (only for player)
147 148
148*************************************/ 149*************************************/
149 150
@@ -411,7 +412,9 @@ int settings_save( void )
411 memcpy(&config_block[0xF8], &global_settings.resume_seed, 4); 412 memcpy(&config_block[0xF8], &global_settings.resume_seed, 4);
412 413
413 strncpy(&config_block[0xFC], global_settings.resume_file, MAX_PATH); 414 strncpy(&config_block[0xFC], global_settings.resume_file, MAX_PATH);
414 415#ifdef HAVE_LCD_CHARCELLS
416 config_block[0xfd]=(unsigned char)global_settings.jump_scroll;
417#endif
415 DEBUGF( "+Resume file %s\n",global_settings.resume_file ); 418 DEBUGF( "+Resume file %s\n",global_settings.resume_file );
416 DEBUGF( "+Resume index %X offset %X\n", 419 DEBUGF( "+Resume index %X offset %X\n",
417 global_settings.resume_index, 420 global_settings.resume_index,
@@ -528,6 +531,8 @@ void settings_apply(void)
528 font_reset(); 531 font_reset();
529 532
530 lcd_scroll_step(global_settings.scroll_step); 533 lcd_scroll_step(global_settings.scroll_step);
534#else
535 lcd_jump_scroll(global_settings.jump_scroll);
531#endif 536#endif
532 lcd_bidir_scroll(global_settings.bidir_limit); 537 lcd_bidir_scroll(global_settings.bidir_limit);
533 lcd_scroll_delay(global_settings.scroll_delay * (HZ/10)); 538 lcd_scroll_delay(global_settings.scroll_delay * (HZ/10));
@@ -727,6 +732,10 @@ void settings_load(void)
727 strncpy(global_settings.lang_file, &config_block[0xcc], MAX_FILENAME); 732 strncpy(global_settings.lang_file, &config_block[0xcc], MAX_FILENAME);
728 strncpy(global_settings.font_file, &config_block[0xe0], MAX_FILENAME); 733 strncpy(global_settings.font_file, &config_block[0xe0], MAX_FILENAME);
729 strncpy(global_settings.resume_file, &config_block[0xFC], MAX_PATH); 734 strncpy(global_settings.resume_file, &config_block[0xFC], MAX_PATH);
735#ifdef HAVE_LCD_CHARSCELLS
736 if (config_block[0xfd] != 0xff)
737 global_settings.jump_scroll = config_block[0xfd];
738#endif
730 global_settings.resume_file[MAX_PATH]=0; 739 global_settings.resume_file[MAX_PATH]=0;
731 } 740 }
732 741
@@ -1217,6 +1226,8 @@ bool settings_save_config(void)
1217 1226
1218#ifdef HAVE_LCD_BITMAP 1227#ifdef HAVE_LCD_BITMAP
1219 fprintf(fd, "scroll step: %d\r\n", global_settings.scroll_step); 1228 fprintf(fd, "scroll step: %d\r\n", global_settings.scroll_step);
1229#else
1230 fprintf(fd, "jump scroll: %d\r\n", global_settings.jump_scroll);
1220#endif 1231#endif
1221 1232
1222 fprintf(fd, "bidir limit: %d\r\n", global_settings.bidir_limit); 1233 fprintf(fd, "bidir limit: %d\r\n", global_settings.bidir_limit);
@@ -1393,6 +1404,9 @@ void settings_reset(void) {
1393 global_settings.battery_type = 0; 1404 global_settings.battery_type = 0;
1394 global_settings.scroll_speed = 8; 1405 global_settings.scroll_speed = 8;
1395 global_settings.bidir_limit = 50; 1406 global_settings.bidir_limit = 50;
1407#ifdef HAVE_LCD_CHARCELLS
1408 global_settings.jump_scroll = 1;
1409#endif
1396 global_settings.scroll_delay = 100; 1410 global_settings.scroll_delay = 100;
1397 global_settings.scroll_step = 6; 1411 global_settings.scroll_step = 6;
1398 global_settings.ff_rewind_min_step = DEFAULT_FF_REWIND_MIN_STEP; 1412 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
151 int bidir_limit; /* bidir scroll length limit */ 151 int bidir_limit; /* bidir scroll length limit */
152 int scroll_delay; /* delay (in 1/10s) before starting scroll */ 152 int scroll_delay; /* delay (in 1/10s) before starting scroll */
153 int scroll_step; /* pixels to advance per update */ 153 int scroll_step; /* pixels to advance per update */
154 154#ifdef HAVE_LCD_CHARCELLS
155 int jump_scroll; /* Fast jump when scrolling */
156#endif
155 bool fade_on_stop; /* fade on pause/unpause/stop */ 157 bool fade_on_stop; /* fade on pause/unpause/stop */
156 bool caption_backlight; /* turn on backlight at end and start of track */ 158 bool caption_backlight; /* turn on backlight at end and start of track */
157 159
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)
456 &lcd_bidir_scroll, 25, 0, 200 ); 456 &lcd_bidir_scroll, 25, 0, 200 );
457} 457}
458 458
459#ifdef HAVE_LCD_CHARCELLS
460static bool jump_scroll(void)
461{
462 char* names[] = { str(LANG_OFF), str(LANG_ONE_TIME), str(LANG_ALWAYS)};
463
464 return set_option(str(LANG_JUMP_SCROLL), &global_settings.jump_scroll,
465 names, 3, lcd_jump_scroll);
466}
467#endif
468
459#ifndef SIMULATOR 469#ifndef SIMULATOR
460/** 470/**
461 * Menu to set the battery capacity 471 * Menu to set the battery capacity
@@ -748,7 +758,10 @@ static bool scroll_settings_menu(void)
748#ifdef HAVE_LCD_BITMAP 758#ifdef HAVE_LCD_BITMAP
749 { str(LANG_SCROLL_STEP), scroll_step }, 759 { str(LANG_SCROLL_STEP), scroll_step },
750#endif 760#endif
751 { str(LANG_BIDIR_SCROLL), bidir_limit }, 761 { str(LANG_BIDIR_SCROLL), bidir_limit },
762#ifdef HAVE_LCD_CHARCELLS
763 { str(LANG_JUMP_SCROLL), jump_scroll },
764#endif
752 }; 765 };
753 766
754 m = menu_init( items, sizeof items / sizeof(struct menu_items) ); 767 m = menu_init( items, sizeof items / sizeof(struct menu_items) );