summaryrefslogtreecommitdiff
path: root/apps/settings.c
AgeCommit message (Collapse)Author
2010-09-01Android: don't compile powermgmt-sim.cThomas Martitz
Instead implement a bit of battery monitoring. Currently it only fetches the battery level (in %) every 30s, but it could do more like battery status, charger connected, voltage... Theoretically, we could also exit/quit after some time of inactivity too (perhaps not a bad idea since Rockbox puts a slight but still non-zero CPU load even if doing nothing). Ironically, Rockbox is now the only way to get the exact battery level (at least I haven't found anything yet) on my phone :-) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27974 a1c6a512-1295-4272-9138-f99709370657
2010-08-05One more get_user_file_path() fix. Don't store the user dir in config.cfg andThomas Martitz
pretent the file (fonts, wps, etc.)was in the installation dir (it'll still be loaded from the user dir). This way the behavior is the same for files in the installation dir and in the user config dir. This is needed because we historically only store the basename of the file at runtime and don't support writing these to config.cfg if they're outside of the rockbox dir. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27720 a1c6a512-1295-4272-9138-f99709370657
2010-08-02A few post-fixes to the get_user_file_path() commit.Thomas Martitz
Remove unneeded restriction from set_file that prevented filename settings to work if they were outside of ROCKBOX_DIR. Add the get_user_file_path() call to a few further places where it was forgotten. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27667 a1c6a512-1295-4272-9138-f99709370657
2010-08-01Rockbox as an application: add get_user_file_path().Thomas Martitz
For RaaA it evaluates user paths at runtime. For everything but codecs/plugins it will give the path under $HOME/.config/rockbox.org if write access is needed or if the file/folder in question exists there (otherwise it gives /usr/local/share/rockbox). This allows for installing themes under $HOME as well as having config.cfg and other important files there while installing the application (and default themes) under /usr/local. On the DAPs it's a no-op, returing /.rockbox directly. Not converted to use get_user_file_path() are plugins themselves, because RaaA doesn't build plugins yet. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27656 a1c6a512-1295-4272-9138-f99709370657
2010-07-26Fix potential buffer overflow.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27568 a1c6a512-1295-4272-9138-f99709370657
2010-07-25Rewrite set_file() to be smaller and better readable, and a comment ↵Thomas Martitz
describing what it does. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27567 a1c6a512-1295-4272-9138-f99709370657
2010-07-25Use MAX_PATH for array used for filename.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27547 a1c6a512-1295-4272-9138-f99709370657
2010-06-21Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with ↵Thomas Martitz
#if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently). The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
2010-06-21Don't leak a file handle if nvram.bin is <8 bytes in sizeMichael Sparmann
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27011 a1c6a512-1295-4272-9138-f99709370657
2010-06-05Remove the jump scroll settings since they don't do anything, drop the ↵Nils Wallménius
relevant lang ids too git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26575 a1c6a512-1295-4272-9138-f99709370657
2010-05-27Generate C file / header for svn version stringRafaël Carré
It's now easier to force rebuild of files depending on the svn revision version.c/version.h are generated once with new tools/genversion.sh Changes in the VCS are still not auto detected, so you'll have to remove builddir/version.* if you want to change the string in your binaries APPSVERSION is now called RBVERSION and is defined in the generated header instead of being defined by the Makefiles appsversion is now called rbversion (the plugin api number didn't change since old modules are still binary compatible) Change some bootloaders to use knwon-at-buildtime RBVERSION instead of "%s" + rbversion You'll need to run make clean to regenerate dependencies after the removal of apps/version.h To build binaries with a different version string, hand-edit tools/version.sh or tools/genversion.sh (which calls the former) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26320 a1c6a512-1295-4272-9138-f99709370657
2010-05-15Gigabeat S: Fully enable access to hardware tone controls and 3-D effect ↵Michael Sevakis
feature. Under the hood, it's designated a hardware equalizer since it is one. Implement code framework for hardware EQ in general. Menu aspect is well abstracted and so the UI and strings can be changed around if taste doesn't quite suit. So far the emphasis is distinction of the UI labelling from the software EQ so that it's clear the settings are for a different thing. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26051 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz
directory, also standard'ify some parts of the code base (almost entirely #include fixes). This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Make open() posix compliant api-wise. A few calls (those with O_CREAT) need ↵Thomas Martitz
the additional optional mode parameter so add it. Impact for the core is almost zero, as open() is a wrapper macro for the real open function which doesn't take the variable parameter. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25844 a1c6a512-1295-4272-9138-f99709370657
2010-04-02Fix someone elses yellow and redJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25434 a1c6a512-1295-4272-9138-f99709370657
2010-04-01Boot charting support.Torne Wuff
Select (B)ootchart in advanced options in configure, and logf will record timings for various stages of boot, for performance comparisons. Format logged is: BC:>function_name,123,80 where 123 is the line number, 80 is the number of ticks since boot. This can be loaded as CSV into a spreadsheet. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25426 a1c6a512-1295-4272-9138-f99709370657
2010-03-06fix cutoff of f2/f3_rec_screen in the recording screen. Teruaki Kawashima
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25046 a1c6a512-1295-4272-9138-f99709370657
2010-03-06Restore the 'read_disk' flag for settings_apply that was removed in r24922. ↵Magnus Holmgren
It is still needed to prevent uncessary disk I/O for fonts etc. Should fix FS#11071 (I haven't tested it on a HD-based player). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25042 a1c6a512-1295-4272-9138-f99709370657
2010-02-27Properly handle empty and '-' font settings.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24942 a1c6a512-1295-4272-9138-f99709370657
2010-02-26split the theme settings apply() sutff out of settings_apply(). this should ↵Jonathan Gordon
fix splashes not being loc'ed, statusbar over the splash (fixed in sim, not on my mini2g though), and the supposed boot time slowdown. What this also does is remove a bunch of unnecessary settings_Apply()'s from the ipod accessory code, and causes all non-skin settings to get applied each time (this includes font and langs which we wernt doing to stop disk access) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24922 a1c6a512-1295-4272-9138-f99709370657
2010-02-22fix charcellJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24848 a1c6a512-1295-4272-9138-f99709370657
2010-02-22do r24817 betterer to make it more generic and stuff. Skins will always be ↵Jonathan Gordon
in the .rockbox/wps/ dir so there is no real need to add lots of duplicated logic git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24847 a1c6a512-1295-4272-9138-f99709370657
2010-02-22fix remote WPS loadingJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24845 a1c6a512-1295-4272-9138-f99709370657
2010-02-22fix typo of wps and sbs.Teruaki Kawashima
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24841 a1c6a512-1295-4272-9138-f99709370657
2010-02-21Shorten settings_skins_apply() and correct some checks.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24817 a1c6a512-1295-4272-9138-f99709370657
2010-02-21Properly generate (with "Save Theme Settings") and handle filename settings ↵Thomas Martitz
with "-". git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24816 a1c6a512-1295-4272-9138-f99709370657
2010-02-16Reuse the backdrop buffers if 2 skins use the same backdrop (on the same ↵Jonathan Gordon
screen of course) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24690 a1c6a512-1295-4272-9138-f99709370657
2010-02-14FS#10984 - multifont! 2 major additions:Jonathan Gordon
1) seperate UI font for the remote and main displays 2) allow individual skins to load additional fonts for use in the skin (Uo to 7 extra in this first version) see CustomWPS for info on how to load a font in the skins. Code should always use FONT_UI+screen_number to get the correct user font git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24644 a1c6a512-1295-4272-9138-f99709370657
2010-02-08fix red. these long #if's need to be changed to a single #defineJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24566 a1c6a512-1295-4272-9138-f99709370657
2010-02-08revert r24478 and make the backdrop behaviour the same as it used to be (so ↵Jonathan Gordon
when in the wps the sbs' backdrop will be fully disabled). Also changes the API back to having to manually set the current backdrop. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24565 a1c6a512-1295-4272-9138-f99709370657
2010-01-29skin rework (FS#10922) notable changes:Jonathan Gordon
- simplify the setting/skin relationship. settings are used as the fallback if it's not specified in the skin - backdrop buffers are now in the skin buffer (which has also increased slightly to accomodate 1 backdrop for each skin and 2 full colour screens for bmps (up for 1.5)) - if no %X is specified in a skin then the backdrop setting will be used. use %Xd to explicitly disable a skin from displaying a backdrop - the base skin can now specify a backdrop. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24366 a1c6a512-1295-4272-9138-f99709370657
2010-01-27futile attempt to keep the ondioSP rombox working. This will almost ↵Jonathan Gordon
certainly be the last release with it. (The backdrop API is chaning very soon after release so this is no big deal) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24340 a1c6a512-1295-4272-9138-f99709370657
2009-11-16mpeg.h/c cleanupJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23652 a1c6a512-1295-4272-9138-f99709370657
2009-11-11remove 3 bad viewport functions:Jonathan Gordon
* viewport_set_current_vp() because if a screen wants to not use the user setting it shouldn't be dealing with the viewport manager at all (other than to disable the bars) * viewport_ui_vp_get_state() is unused (and not needed) * viewport_get_current_vp() because you should be using set_defaults() instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23606 a1c6a512-1295-4272-9138-f99709370657
2009-11-10Crossfade: carved out crossfade related code with lots of HAVE_CORSSFADE ↵Jeffrey Goode
conditionals, eliminated fade buffer on low memory targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23597 a1c6a512-1295-4272-9138-f99709370657
2009-11-04Compressor: simplify makeup gain setting, expand release range, finally ↵Jeffrey Goode
provide documention in the manual! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23518 a1c6a512-1295-4272-9138-f99709370657
2009-10-20Correct wrong usage of event callbacks all over the place. It's not supposed ↵Thomas Martitz
to return anything, and should take a data parameter. Fixing it because correcting the event api prototypes causes many warnings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23301 a1c6a512-1295-4272-9138-f99709370657
2009-10-19Remove a few superfluous calls and use the correct symbol.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23262 a1c6a512-1295-4272-9138-f99709370657
2009-10-19Initial custom statusbar commit.Thomas Martitz
The custom statusbar can be used as a WPS for the main UI, using .(r)sbs files. It's using the skin engine and knows all tags the WPS also knows. The default folder for .sbs is the wps folder to reuse images used in the WPS. As it can be shown in the WPS also, it's useful to move shared parts to the custom statusbar in order to save skin buffer space. There are a few restrictions/TODOs: *) Peak meter doesn't redraw nicely(not frequent enough), as very frequent updates would slow the UI down as hell (some targets fight with it in the WPS already: FS#10686) *) No touchregion support as the statusbar doesn't have any action handling (it won't fail to parse though). *) Drawing stuff into the default VP is forbidden (loading images in it is not). You *need* to use viewports for the displaying stuff (parsing fails if no viewport is used). *) Themes that don't use a custom ui viewport can be fixed up using the new %Vi tag to avoid nasty redraw effectts (you must not draw into it as well, it's used to fix up the ui viewport). %Vi describes the viewport that the lists can use without getting in the way of the statusbar. Otherwise, it behaves like the classic statusbar, it can be configured in the theme settings, and can be turned off in the wps using %wd. Note to translaters: When translating LANG_STATUSBAR_CUSTOM, please consider using the same translation as for LANG_CHANNEL_CUSTOM if it's compatible. They could be combined later then. Flyspray: FS#10566 Author: myself git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23258 a1c6a512-1295-4272-9138-f99709370657
2009-10-18Change the .lng files to contain strings from multiple users. Still ↵Tom Ross
hard-coded to only output the core strings for now. Should be the majority of the core changes needed for translatable plugins. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23241 a1c6a512-1295-4272-9138-f99709370657
2009-10-16Revert r23212, I committed it accidentally.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23214 a1c6a512-1295-4272-9138-f99709370657
2009-10-16initial custom statusbar commitThomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23212 a1c6a512-1295-4272-9138-f99709370657
2009-10-14Remove wps_reset(), and rename skin_data_init to skin_data_reset() and ↵Thomas Martitz
extend it to zero most of the wps_data members. As these are called when parsing a skin it doesn't need to be called by the wps or settings, so make it local to skin_parser.c. Reorder the members of struct wps_data for more effecient alignment. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23171 a1c6a512-1295-4272-9138-f99709370657
2009-10-09Fix player red and remove an obsolete function call.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23056 a1c6a512-1295-4272-9138-f99709370657
2009-10-05Fix red: Invert buttons in RTL modeTomer Shalev
- Revert renaming of button_set_flip() - Moved rtl flipping logic to apps/actions.c as a static function - Joined rtl_button_flip_needed() and button_flip_horizontally() git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22962 a1c6a512-1295-4272-9138-f99709370657
2009-10-05Invert buttons in RTL modeTomer Shalev
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22961 a1c6a512-1295-4272-9138-f99709370657
2009-09-25Replace limiter with dynamic range compressorJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22832 a1c6a512-1295-4272-9138-f99709370657
2009-08-24Fix a problem spotted in FS#10543. For F_CHOICE_SETTING, an invalid value ↵Thomas Martitz
would (which may happen if the values changed e.g. due to the statusbar at bottom addition) lead to the correspong 0 value, instead of leaving the setting untouched. Fix it by not calling atoi() for F_CHOICE_SETTING (they don't have int-like values). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22499 a1c6a512-1295-4272-9138-f99709370657
2009-08-20Make the formatter functions used by the settings return a pointer to avoid ↵Nils Wallménius
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-18FS#10199: Adds limiter DSP functionJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22394 a1c6a512-1295-4272-9138-f99709370657