diff options
author | Björn Stenberg <bjorn@haxx.se> | 2004-01-14 00:13:04 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2004-01-14 00:13:04 +0000 |
commit | a108ec2ebd237835a688ae5c82c90e07607219ae (patch) | |
tree | 17c0af92368ee76d16cfdc2162aadbb7f103d926 /apps/settings_menu.c | |
parent | 50b6358272eaf1f255bcb430766e6fc9e26810d3 (diff) |
Added Benjamin Metzlers bookmarking feature (patch #669440)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4227 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings_menu.c')
-rw-r--r-- | apps/settings_menu.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 65261e348c..a96c88c681 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -438,6 +438,40 @@ static bool resume(void) names, 4, NULL ); } +static bool autocreatebookmark(void) +{ + char* names[] = { str(LANG_SET_BOOL_NO), + str(LANG_SET_BOOL_YES), + str(LANG_RESUME_SETTING_ASK), + str(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES), + str(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK) }; + + return set_option( str(LANG_BOOKMARK_SETTINGS_AUTOCREATE), + &global_settings.autocreatebookmark, INT, + names, 5, NULL ); +} + +static bool autoloadbookmark(void) +{ + char* names[] = { str(LANG_SET_BOOL_NO), + str(LANG_SET_BOOL_YES), + str(LANG_RESUME_SETTING_ASK) }; + + return set_option( str(LANG_BOOKMARK_SETTINGS_AUTOLOAD), + &global_settings.autoloadbookmark, INT, + names, 3, NULL ); +} + +static bool useMRB(void) +{ + char* names[] = { str(LANG_SET_BOOL_NO), + str(LANG_SET_BOOL_YES), + str(LANG_BOOKMARK_SETTINGS_UNIQUE_ONLY)}; + + return set_option( str(LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS), + &global_settings.usemrb, INT, + names, 3, NULL ); +} static bool backlight_on_when_charging(void) { bool result = set_bool(str(LANG_BACKLIGHT_ON_WHEN_CHARGING), @@ -789,6 +823,23 @@ static bool playback_settings_menu(void) return result; } +static bool bookmark_settings_menu(void) +{ + int m; + bool result; + + struct menu_items items[] = { + { str(LANG_BOOKMARK_SETTINGS_AUTOCREATE), autocreatebookmark}, + { str(LANG_BOOKMARK_SETTINGS_AUTOLOAD), autoloadbookmark}, + { str(LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS), useMRB}, + }; + + m=menu_init( items, sizeof items / sizeof(struct menu_items) ); + result = menu_run(m); + menu_exit(m); + + return result; +} static bool reset_settings(void) { bool done=false; @@ -966,6 +1017,7 @@ bool settings_menu(void) { str(LANG_CUSTOM_FONT), font_browse }, #endif { str(LANG_SYSTEM), system_settings_menu }, + { str(LANG_BOOKMARK_SETTINGS),bookmark_settings_menu }, { str(LANG_SAVE_SETTINGS), settings_save_config }, }; |