Commit graph

39 commits

Author SHA1 Message Date
Aidan MacDonald
d7557e8da8 settings: Update doc comment for struct settings_list::cfg_vals
cfg_vals has not been used in conjunction with F_T_UCHARPTR for
quite a while.

Change-Id: I7f710201484ca25aab112897123afd07abdfd4c2
2022-12-01 14:24:51 -05:00
William Wilgus
0661784469 make int_setting step & unit int16_t
since int_setting is the largest struct in the union of settings
saving 32 bytes adds up over every setting

frees ~200 bytes

Change-Id: Id4722262e40db3021c740e138fe7352be10e2c70
2022-11-20 13:57:09 -05:00
William Wilgus
3550283442 Add open_plugin to core
open_plugin allows arbitrary plugins to be called
in hotkey and start screen

replaces PictureFlow Integration
shortcuts menu plays plugins now too

rather than store paths and parameters in the settings
that reside in memory instead entries in a file are searched by hash.
after all, the plugin has to be loaded from disk anyways

----------------------------------------------------------------------------
shortcut_viewer.rock--  can now call plugins rather than taking you to them
in the browser
-----------------------------------------------------------------------------
Added a new option to menus:
 F_CB_ON_SELECT_ONLY
 instead of option callback every time a item is accessed
 F_CB_ON_SELECT_ONLY fires callback only when item is selected
-----------------------------------------------------------------------------
Added manual entries
-----------------------------------------------------------------------------

Change-Id: I078b57b1d2b4dd633c89212c1082fcbc1b516e6a
2020-08-17 10:15:14 -04:00
William Wilgus
a06d9c85f7 Auto-Ranging Time Formatting For Menus (hh:mm:ss:mss)
Unifies time formatting in settings_list.c allows time format to
display as HH:MM:SS.MSS or any consecutive combination thereof
(hh:mm:ss, mm:ss, mm:ss.mss, ss.mss, hh, mm, ss ,mss)
works in INT and TABLE settings with the addition of flag 'F_TIME_SETTING'

Time is auto-ranged dependent on value

Adds talk_time_intervals to allow time values to be spoken similar to
display format:  x Hours, x Minutes, x Seconds, x Milliseconds

Table lookups merged or removed from recording, clip meter and lcd timeout
-String_Choice replaced with TABLE_SETTING or INT_SETTING for these
functions as well, cleaned-up cfg_vals that get saved to cfgfile

RTL Languages ARE supported

Negative values ARE supported

Backlight on/off are now Always and Never to share formatter with LCD
Timeout

Added flag to allow ranged units to be locked to a minimum index

Added flag to allow leading zero to be supressed from the largest unit

merged talk_time_unit() and talk_time_intervals()

optimized time_split()

optimized format_time_auto()

Backlight time-out list same as original

Change-Id: I59027c62d3f2956bd16fdcc1a48b2ac32c084abd
2018-12-22 12:27:21 -06:00
William Wilgus
dc87e9e9f3 Selective Backlight/Advanced Softlock - Selective actions based on context
Selective backlight allows the user to choose actions that will not
enable the backlight when pressed.

Advanced softlock allows user to choose actions that  will not be
blocked by screenlock on devices without a hold button.

Both only occur in FM and WPS Contexts.

Update:
Back from the dead
-Cleaned up code, removed unnecessary calls, re-arranged last filter action
  timeout conditional to work in case last_filtered_action_tick was never set
-Added entries to the manual
-Fixed back button on some menus not activating backlight
-Made menus more intuitive, no actions selected now changes menu item to off.
-Added talk fuctionality.
-Added option to disable selective backlight while on external power.
-Rewrote backlight and softlock handling code to fix issue with scrollwheels
-Menu changed to have toggle(yes/no) and settings
-Optimized selective actions lookup
-Added option to disable notification of 'buttons locked' while softlocked
-Removed uneeded code, consolidated action lookup to single function
-Fixed incorrect name on selective softlock menu
-Added option to disable touch on touchscreen devices
-Fixed backlight on original screenlock without selective screenlock active
-Added text selection in mask_select for when show_icons is off
-Fixed voice in mask_select to speak if voice is defined instead of spelling
-Added more lang defines (play skip seek)
-Added option to disable unknown keys turning on backlight
-Fixed Conditional argument In wrong place causing players without
	backlight to fail to build
-Fixed Disable Unknown blocking detection of context change
-Fixed canceling menu didn't update new settings
-Added Autolock on backlight off
-Removed backlight_on_force from backlight.c, Now sets ignore next to false
	and uses backlight_on
-Cleaned up autolock code added strings to lang file
-Fixed issue where rapid presses would bypass softlock
-Removed old softlock code, Cleaned selective actions code
-Changed menu to match existing RB menus
-Fixed Backlight_on_Hold blocked by backlight_ignore_next
-Fixed ignore_next for ipod
-Fixed bug allowing context with softlock to bypass selective backlight
-Changed mask_select to no longer prompt for changes to be saved
-Changed menu names
-Added ignore timeout to allow ipod scroll wheel to work properly and other
 players to still work properly, removed some previous code including
 ignore_event
-Increased ignore timeout to prevent sd card accesses from interrupting action
 code and turning on backlight
-Changed Unknown action to unmapped action in menu, changed handling code
-Removed unneeded logic and variables for handling unfiltered actions
-Reverted unmapped action code to previous functionality
-Added manual entries (thanks JohnB)
-Removed elusive unhandled unicode character from manual, changed formatting slightly

Actions:
Volume,Play,Seek,Skip

Extras:
Disable unmapped actions
Disable selective backlight on external power
Disable touch during softlock on touchscreen devices
Disable softlock notifications (power button still notifies)
Autolock on backlight off

Method:
Adds a function to ignore backlight on next call
 If selected action occurs backlight is forced on,
 Filter_first_keypress stays intact.

Selective softlock allows selected actions through, bypasses the normal
 softlock routine.

ToDo:
DONE

previous commit (#1) has attribution for folder_select.c which mask_select
is based from.

Change-Id: I08132ddcfd64c81751ef23b720f3ec6d68695fe4
2017-01-17 23:06:17 +01:00
Michael Sevakis
31b7122867 Implement time-based resume and playback start.
This complements offset-based resume and playback start funcionality.
The implementation is global on both HWCODEC and SWCODEC.

Basically, if either the specified elapsed or offset are non-zero,
it indicates a mid-track resume.

To resume by time only, set elapsed to nonzero and offset to zero.
To resume by offset only, set offset to nonzero and elapsed to zero.

Which one the codec uses and which has priority is up to the codec;
however, using an elapsed time covers more cases:

* Codecs not able to use an offset such as VGM or other atomic
formats

* Starting playback at a nonzero elapsed time from a source that
contains no offset, such as a cuesheet

The change re-versions pretty much everything from tagcache to nvram.

Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38
Reviewed-on: http://gerrit.rockbox.org/516
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2014-03-10 04:12:30 +01:00
Jonathan Gordon
1eb17dc9f4 EQ settings: Rework the settings to clean up the config file.
Instead of 3 cfg lines per eq band there is now a single line
for each:
<config name>: <cutoff/center freq>, <q>, <gain>

In addition, the config value names make a bit more sense.

The old settings are still readable but config.cfg and any new
settings files will be written with the new config values. (The
old settings will be removed completly sometime after the next
stable release).

Also a slight rework of the advanced EQ menu UI

Change-Id: I9008658d36ded442a5f2f825916df42a3934cbef
Reviewed-on: http://gerrit.rockbox.org/394
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2013-02-09 13:05:32 +01:00
Richard Quirk
212e7808d5 Use crc32 of filename to resume tracks
As well as using an index, which breaks when a file is added or
removed, use the crc32 of the filename. When the crc32 check passes the
index is used directly. When it fails, the slow path is taken checking
each file name in the playlist until the right crc is found. If that fails
the playlist is started from the beginning.

See http://www.rockbox.org/tracker/6411

Bump plugin API and nvram version numbers

Change-Id: I156f61a9f1ac428b4a682bc680379cb6b60b1b10
Reviewed-on: http://gerrit.rockbox.org/372
Tested-by: Jonathan Gordon <rockbox@jdgordon.info>
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2013-01-02 08:29:38 +01:00
Nils Wallménius
3200d04d75 Make the formatter functions used by the settings return a pointer to avoid usless copying of lang strings, this brought with it a long chain of const correctness and a few random cleanups
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22440 a1c6a512-1295-4272-9138-f99709370657
2009-08-20 16:47:44 +00:00
Jonathan Gordon
edcacaa787 FS#9515 - customisable quickscreen. Allows you to choose which setting you want displayed on the quickscreen.
Allows almost every available setting. (change the options in settings > general settings > quickscreen items)
Not every setting will work perfectly, some might need aditional handling if the change doesnt take effect straight away (let us know which are problematic so they can be fixed)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18984 a1c6a512-1295-4272-9138-f99709370657
2008-11-03 11:11:07 +00:00
Jonathan Gordon
5395957549 Add a setting type which is completly user-defined. This setting type cannot be used by the regular menu macros (e.g MENUITEM_SETTING() macro) so if you are goign to use this type remember to implement the setting screen seperately (using option_select() if you can)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18983 a1c6a512-1295-4272-9138-f99709370657
2008-11-03 10:43:37 +00:00
Jonathan Gordon
9e2807fc66 Add a simple plugin (apps/settings_dumper.rock) which dumps the valid values of all the config settings to /settings_dumper.txt. If you notice any settings its not dumping please let me know.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18882 a1c6a512-1295-4272-9138-f99709370657
2008-10-26 11:44:21 +00:00
Jonathan Gordon
95f516e0b9 more slight playlist resume cleanuping... dont bother saving the playlist first index value. its reset to 0 before playlistcontrol is loaded anyway, and then reset to 0 after its finished so its completly useless in global_status.
runtimes, resume info, etc will be reset again...


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18561 a1c6a512-1295-4272-9138-f99709370657
2008-09-21 14:19:18 +00:00
Jonathan Gordon
40d713c5fc FS#9408 - dont bother saving the random seed in global status. I'm 99.9% sure this code was being ignored anyway.
If this commit causes problems with restarting playback open a bug report (getting testers was difficult...) 
Settings which are stored in the nvram.bin file will be reset with this commit. this includes  resume info, runtimes, "last screen" and a few others.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18555 a1c6a512-1295-4272-9138-f99709370657
2008-09-20 15:30:55 +00:00
Daniel Stenberg
2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
later. We still need to hunt down snippets used that are not. 1324 modified
files...
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:10:04 +00:00
Jonathan Gordon
b8bc45ded0 FS#8353 - add a quick way to make a .cfg from the sound settings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15971 a1c6a512-1295-4272-9138-f99709370657
2007-12-24 22:35:31 +00:00
Dan Everton
5886efabf5 Save some bytes and reuse the settings saving code for eq preset saving.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15891 a1c6a512-1295-4272-9138-f99709370657
2007-12-07 10:59:07 +00:00
Jens Arnold
09a786138c Allow (almost) arbitrary backlight fade in and fade out times (on targets with software PWM fading), and comvert the associated settings to table settings. * Settings system: Unify a bunch of formatters and getlang helpers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15817 a1c6a512-1295-4272-9138-f99709370657
2007-11-26 23:10:20 +00:00
Jens Arnold
d63f2375a2 Fix 64 bit warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15804 a1c6a512-1295-4272-9138-f99709370657
2007-11-25 18:01:04 +00:00
Jens Arnold
d490f44112 New way of handling integer settings with variable steps: table settings (FS #8186, with fixes by me). This allows to get rid of those synchronised tables in firmware/ and apps/, making things more flexible and less error prone. First application: backlight timeouts. * Make some more things 'const'.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15803 a1c6a512-1295-4272-9138-f99709370657
2007-11-25 17:36:21 +00:00
Nils Wallménius
acbd780239 Make id's created with the TALK_ID macro work in 64 bit sims
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15723 a1c6a512-1295-4272-9138-f99709370657
2007-11-20 19:50:52 +00:00
Jonathan Gordon
91ccc01bcf fix FS#7288 - pad the title of the scrolling settings so they actually scroll
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15469 a1c6a512-1295-4272-9138-f99709370657
2007-11-05 13:15:35 +00:00
Jonathan Gordon
0f7f3467bf Integer setting changes to make all those settings consistant on the target.
wheel targets, clockwise is increase value
archos player, + is increase
button targets, up is increase


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15120 a1c6a512-1295-4272-9138-f99709370657
2007-10-15 10:33:01 +00:00
Nils Wallménius
12a957b0e8 Disable wrapping of the bass and treble settings and do the same for volume in a cleaner way, closes FS#7783
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14712 a1c6a512-1295-4272-9138-f99709370657
2007-09-15 17:29:15 +00:00
Nils Wallménius
9b59183953 Use size_t type for the buffer_size parameter to formatter functions, static two private functions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14392 a1c6a512-1295-4272-9138-f99709370657
2007-08-19 10:22:46 +00:00
Jonathan Gordon
07a7d47cc1 Revert my filetypes commits from today. the nvram buffer is 44bytes of which 43 are currently being used. We need to figure out what to do about this.
So in the mean time, set the MAX_FILETYPES to a huge value so we don't have to worry about this for a long while.

This build shold be safe to use again. If you downloaded a build after r14286 make sure you grab a new one


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14291 a1c6a512-1295-4272-9138-f99709370657
2007-08-12 09:53:41 +00:00
Jonathan Gordon
7cb80a2a70 Fix a problem with the nvram settings which meant adding new items to the end needed the version bump (they dont anymore, but I'm bumping it now anyway to save some bug reports)
Also operator precedence fixing.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14290 a1c6a512-1295-4272-9138-f99709370657
2007-08-12 07:22:38 +00:00
Jonathan Gordon
9adf056b7b this adds 2 options to the recording settings menu to let you save all the recording settings to a .cfg and view your saved presets.
saves them in /.rockbox/recpresets.
also moves the default location for "write theme config" to /.rockbox/themes


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13510 a1c6a512-1295-4272-9138-f99709370657
2007-05-29 04:39:11 +00:00
Jonathan Gordon
8ca99d3288 Code Police: Remove tabs throught apps/ . Hopefully no actual code
change


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12504 a1c6a512-1295-4272-9138-f99709370657
2007-02-27 11:09:09 +00:00
Jonathan Gordon
ac07222b83 Flip the order of some of the setting screens. (If any more are
backwards let me know in the thread or IRC)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12400 a1c6a512-1295-4272-9138-f99709370657
2007-02-19 03:15:48 +00:00
Jonathan Gordon
4e73b537c3 Fix the keywords on some recently added files.
Remove apps/recording_settings_menu.c which should never have been 
commited


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12293 a1c6a512-1295-4272-9138-f99709370657
2007-02-13 00:32:17 +00:00
Jonathan Gordon
fb62831faa * Move playback menu to the new sysetm
(http://forums.rockbox.org/index.php?topic=8703.0 if I broke any of 
those settings accidently).
* Add set_int_ex() which is the same as set_int() but adds a param which 
is a callback that returns the voice ID to talk for the selected value
* Change the "pause on headphone unplug" to use meaningful strings in 
the config instead of numbers, this setting will be reset.
* saves ~500bytes on the rec build :D


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12285 a1c6a512-1295-4272-9138-f99709370657
2007-02-12 14:22:35 +00:00
Jonathan Gordon
fe3cfcc9b2 Convert the sound menu to the new system
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12230 a1c6a512-1295-4272-9138-f99709370657
2007-02-08 10:28:42 +00:00
Jonathan Gordon
4718a1e752 beginning of the new menu system. This commit shouldnt break anything,
but comming ones might.. report bugs in 
http://forums.rockbox.org/index.php?topic=8703.0 and more info at 
http://www.rockbox.org/twiki/bin/view/Main/SettingsRecode


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12227 a1c6a512-1295-4272-9138-f99709370657
2007-02-08 04:33:41 +00:00
Jonathan Gordon
f0d2861fc5 when saving config.cfg, only save settings which are not the same as
default, hopefully will give a small boost to saving and loading times.
Doing a manual save from "manage settings" > "write config" will save 
every 
setting.
Adds an option to save a cfg file from only the settings needed in a 
theme .cfg (I may have missed some so let me know).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12172 a1c6a512-1295-4272-9138-f99709370657
2007-02-01 13:57:14 +00:00
Jonathan Gordon
4ca8a43631 Add 4 settings which were somehow missed during the conversion to config.cfg.
Adds the LANG_ id for each setting to get them ready for the upcoming menu changes


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12113 a1c6a512-1295-4272-9138-f99709370657
2007-01-26 05:45:06 +00:00
Jonathan Gordon
0c3375648c allow int settings to call a function to get the default value (Fixes the contrast problem on archos)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12102 a1c6a512-1295-4272-9138-f99709370657
2007-01-24 03:14:07 +00:00
Jonathan Gordon
228d62dd18 Split the system status variables out of global_settings and put them into a new struct global_status. Use status_save() if these need
saving.
Added car_adapter_mode to the nvram settings, so nvram settings will be reset.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12101 a1c6a512-1295-4272-9138-f99709370657
2007-01-24 02:19:22 +00:00
Jonathan Gordon
b2e50906a4 Settings are now stored in /.rockbox/config.cfg instead of the hidden sector. (FS #6557)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12093 a1c6a512-1295-4272-9138-f99709370657
2007-01-23 13:40:44 +00:00