From 6f622262948f42886a3f7e602a3b6aa2bb1c6e44 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Wed, 28 Mar 2012 00:38:30 +1100 Subject: quickscreen: optionally display the shortcuts menu instead of the QS Adds an option under settings > general settings > system to allow the user to have the shortcuts menu displayed instead of the quick screen. (option is "shortcuts instead of quickscreen" in the .cfg) Change-Id: Id679b461c40ac617629422736d1509384364084d Reviewed-on: http://gerrit.rockbox.org/199 Reviewed-by: Marek Salaba Reviewed-by: Jonathan Gordon --- apps/gui/quickscreen.c | 4 ++++ apps/lang/english.lang | 17 +++++++++++++++++ apps/menus/settings_menu.c | 7 +++++++ apps/settings.h | 3 +++ apps/settings_list.c | 2 ++ manual/appendix/config_file_options.tex | 7 +++++++ manual/configure_rockbox/system_options.tex | 5 ++++- 7 files changed, 44 insertions(+), 1 deletion(-) diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c index acef2c32a0..965fe67a4c 100644 --- a/apps/gui/quickscreen.c +++ b/apps/gui/quickscreen.c @@ -38,6 +38,7 @@ #include "list.h" #include "option_select.h" #include "debug.h" +#include "shortcuts.h" /* 1 top, 1 bottom, 2 on either side, 1 for the icons * if enough space, top and bottom have 2 lines */ @@ -391,6 +392,9 @@ bool quick_screen_quick(int button_enter) bool oldshuffle = global_settings.playlist_shuffle; int oldrepeat = global_settings.repeat_mode; + if (global_settings.shortcuts_replaces_qs) + return do_shortcut_menu(NULL); + qs.items[QUICKSCREEN_TOP] = get_setting(global_settings.qs_items[QUICKSCREEN_TOP], NULL); qs.items[QUICKSCREEN_LEFT] = diff --git a/apps/lang/english.lang b/apps/lang/english.lang index d428bee232..e1f68895c7 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -13007,3 +13007,20 @@ *: "Constrain Auto-Change" + + id: LANG_USE_SHORTCUTS_INSTEAD_OF_QS + desc: in settings_menu. + user: core + + *: none + quickscreen: "Use Shortcuts Menu Instead of Quick Screen" + + + *: none + quickscreen: "Use Shortcuts Menu Instead of Quick Screen" + + + *: none + quickscreen: "Use Shortcuts Menu Instead of Quick Screen" + + diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 659a7f2fbb..0e3e861834 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c @@ -297,6 +297,10 @@ MENUITEM_SETTING(buttonlight_brightness, &global_settings.buttonlight_brightness MENUITEM_SETTING(touchpad_sensitivity, &global_settings.touchpad_sensitivity, NULL); #endif +#ifdef HAVE_QUICKSCREEN +MENUITEM_SETTING(shortcuts_replaces_quickscreen, &global_settings.shortcuts_replaces_qs, NULL); +#endif + MAKE_MENU(system_menu, ID2P(LANG_SYSTEM), 0, Icon_System_menu, #if (BATTERY_CAPACITY_INC > 0) || (BATTERY_TYPES_COUNT > 1) @@ -306,6 +310,9 @@ MAKE_MENU(system_menu, ID2P(LANG_SYSTEM), &disk_menu, #endif &limits_menu, +#ifdef HAVE_QUICKSCREEN + &shortcuts_replaces_quickscreen, +#endif #ifdef HAVE_MORSE_INPUT &morse_input, #endif diff --git a/apps/settings.h b/apps/settings.h index 777c7dbefe..fb562c9191 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -827,6 +827,9 @@ struct user_settings char start_directory[MAX_PATHNAME+1]; /* Has the root been customized from the .cfg file? false = no, true = loaded from cfg */ bool root_menu_customized; +#ifdef HAVE_QUICKSCREEN + bool shortcuts_replaces_qs; +#endif }; /** global variables **/ diff --git a/apps/settings_list.c b/apps/settings_list.c index 5acebef2a5..6780c78ed3 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -1830,6 +1830,8 @@ const struct settings_list settings[] = { NULL, "qs bottom", qs_load_from_cfg, qs_write_to_cfg, qs_is_changed, qs_set_default), + OFFON_SETTING(0, shortcuts_replaces_qs, LANG_USE_SHORTCUTS_INSTEAD_OF_QS, + false, "shortcuts instead of quickscreen", NULL), #endif #ifdef HAVE_SPEAKER OFFON_SETTING(0, speaker_enabled, LANG_ENABLE_SPEAKER, false, "speaker", diff --git a/manual/appendix/config_file_options.tex b/manual/appendix/config_file_options.tex index 59148e15cc..7cb2b249d3 100644 --- a/manual/appendix/config_file_options.tex +++ b/manual/appendix/config_file_options.tex @@ -101,6 +101,13 @@ \opt{multidrive_usb}{ usb skip first drive & on, off & N/A\\ } + \opt{quickscreen}{ + qs top & any setting name, - for none & N/A\\ + qs bottom & any setting name, - for none & N/A\\ + qs left & any setting name, - for none & N/A\\ + qs right & any setting name, - for none & N/A\\ + shortcuts instead of quickscreen & off, on & N/A\\ + } idle poweroff & off, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 30, 45, 60 & min\\ diff --git a/manual/configure_rockbox/system_options.tex b/manual/configure_rockbox/system_options.tex index 726e2eed15..0d59e6661a 100644 --- a/manual/configure_rockbox/system_options.tex +++ b/manual/configure_rockbox/system_options.tex @@ -124,7 +124,10 @@ This sub menu relates to limits in the Rockbox operating system. \item LAN party computer $\rightarrow$ \dap $\rightarrow$ human \end{itemize} } - +\opt{quickscreen}{ + \subsection{Use Shortcuts Menu Instead of Quick Screen} This option + activates the shortcuts menu instead of opening the quick screen when enabled. +} \opt{HAVE_CAR_ADAPTER_MODE}{ \subsection{Car Adapter Mode} This option turns \setting{On} and \setting{Off} the car ignition -- cgit v1.2.3