summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/bookmark.c5
-rw-r--r--apps/lang/english.lang14
-rw-r--r--apps/menus/settings_menu.c3
-rw-r--r--apps/settings.h1
-rw-r--r--apps/settings_list.c2
5 files changed, 24 insertions, 1 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c
index 3d8df3ec0b..b8d41c7464 100644
--- a/apps/bookmark.c
+++ b/apps/bookmark.c
@@ -166,16 +166,21 @@ bool bookmark_mrb_load()
bool bookmark_autobookmark(bool prompt_ok)
{
char* bookmark;
+ bool update = false;
if (!system_check())
return false;
audio_pause(); /* first pause playback */
+ if (global_settings.autoupdatebookmark && bookmark_exist())
+ update = true;
bookmark = create_bookmark();
/* Workaround for inability to speak when paused: all callers will
just do audio_stop() when we return, so we can do it right
away. This makes it possible to speak the "Create a Bookmark?"
prompt and the "Bookmark Created" splash. */
audio_stop();
+ if (update)
+ return write_bookmark(true, bookmark);
switch (global_settings.autocreatebookmark)
{
case BOOKMARK_YES:
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index 2c09b594b2..653a0be3ed 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -12605,3 +12605,17 @@
touchscreen: "Cancel"
</voice>
</phrase>
+<phrase>
+ id: LANG_BOOKMARK_SETTINGS_AUTOUPDATE
+ desc: prompt for user to decide whether to update bookmarks
+ user: core
+ <source>
+ *: "Update on Stop"
+ </source>
+ <dest>
+ *: "Update on Stop"
+ </dest>
+ <voice>
+ *: "Update on Stop"
+ </voice>
+</phrase>
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index bcd49c942c..efd18b2204 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -347,11 +347,12 @@ static int bmark_callback(int action,const struct menu_item_ex *this_item)
}
MENUITEM_SETTING(autocreatebookmark,
&global_settings.autocreatebookmark, bmark_callback);
+MENUITEM_SETTING(autoupdatebookmark, &global_settings.autoupdatebookmark, NULL);
MENUITEM_SETTING(autoloadbookmark, &global_settings.autoloadbookmark, NULL);
MENUITEM_SETTING(usemrb, &global_settings.usemrb, NULL);
MAKE_MENU(bookmark_settings_menu, ID2P(LANG_BOOKMARK_SETTINGS), 0,
Icon_Bookmark,
- &autocreatebookmark, &autoloadbookmark, &usemrb);
+ &autocreatebookmark, &autoupdatebookmark, &autoloadbookmark, &usemrb);
/* BOOKMARK MENU */
/***********************************/
diff --git a/apps/settings.h b/apps/settings.h
index a324ef2dd7..d9aec8fc92 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -604,6 +604,7 @@ struct user_settings
/* auto bookmark settings */
int autoloadbookmark; /* auto load option: 0=off, 1=ask, 2=on */
int autocreatebookmark; /* auto create option: 0=off, 1=ask, 2=on */
+ bool autoupdatebookmark;/* auto update option */
int usemrb; /* use MRB list: 0=No, 1=Yes*/
#ifdef HAVE_DIRCACHE
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 9412ee4dd5..09eee6bb57 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -989,6 +989,8 @@ const struct settings_list settings[] = {
ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES),
ID2P(LANG_ASK), ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES),
ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK)),
+ OFFON_SETTING(0, autoupdatebookmark, LANG_BOOKMARK_SETTINGS_AUTOUPDATE,
+ false, "autoupdate bookmarks", NULL),
CHOICE_SETTING(0, autoloadbookmark, LANG_BOOKMARK_SETTINGS_AUTOLOAD,
BOOKMARK_NO, "autoload bookmarks", off_on_ask, NULL, 3,
ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES),