Commit graph

95 commits

Author SHA1 Message Date
Christian Soffke
b321a719d3 option_select & time_menu : Fix unbalanced push/pop activity
Change-Id: Icabbabb16b2f173168a441af474ee8403b908dd4
2022-12-30 10:35:50 -05:00
William Wilgus
6b87bfadff wps.c cleanup gui_show_wps
remove some old cruft move a few things around clean-up flow

Change-Id: I138c6cd9e2d58ef526eb686333da413819df725d
2022-12-14 22:35:33 -05:00
Christian Soffke
dfd9c10589 Eliminate skin updates in between activities
1) Adds way to pop activity without refreshing the skin at
the same time.

Activities are sometimes popped in immediate succession,
or one activity is popped before another one is pushed right
away. This can lead to the UI appearing glitchy, due to an
activity only appearing for a split-second, which is especially
noticeable with complex skins that change the dimensions
of the UI viewport depending on the current activity

To fix this, prevent superfluous skin updates

* when switching between:
- WPS and browser
- WPS and Playlist Catalogue
- WPS and playlist
- WPS and Settings/System/Plugins

* when accessing Track Info or when displaying
bookmarks using the context menu on the WPS

* when switching from QuickScreen to Shortcuts Menu

2) The playlist viewer activity was pushed & popped
redundantly by playlist_view.

----
NB:
Behavior has remained unchanged in all instances of the
code where pop_current_activity() has been replaced by
pop_current_activity(ACTIVITY_REFRESH_NOW).

Change-Id: I56b517b8c9dba823a9fed3a3f558d7469dcea9fd
2022-12-11 11:50:33 +01:00
roman.artiukhin
b63f4c5884 Exit option select on ACTION_STD_MENU
Similar to 59f3f43d. It makes it behave consistently with tree/playlists other menus. So it's possible to exit option select using Back button on Clip Zip or Power button on Rocker

Change-Id: I93fe71ba2222ae16d59f3ba4cfbbedad3fb2568b
2022-12-09 11:02:50 -05:00
Aidan MacDonald
1e6c8d2ea6 skin engine: Settings ID to pointer conversions
Convert %St tag to operate on settings pointers instead of IDs.

Change-Id: Iabf4c280be82b495a64b560b59620fb477e0c738
2022-12-04 11:19:57 -05:00
Aidan MacDonald
4ff97ae07c settings: More settings ID to pointer conversions
Convert cfg_int_to_string(), cfg_to_string(), settings_write_config().

Change-Id: Icb72d2ff874cf90ffe5fe14878aece0a53f6bd18
2022-12-04 10:46:02 -05:00
William Wilgus
f6c719d7ec replace strlcpy with strmemccpy
replace applicable calls to strlcpy with calls to strmemccpy
which null terminates on truncation

in theory the strmemccpy calls should be slightly faster since they
don't traverse the rest of the source string on truncation
but I seriously doubt there is too much of that going on in the code base

Change-Id: Ia0251514e36a6242bbf3f03c5e0df123aba60ed2
2022-11-14 23:56:16 -05:00
Aidan MacDonald
d5a081cbd1 gui: Remove "enum list_wrap" from list action functions
Removing the "list_wrap" argument is actually pretty easy.
In practice, almost all lists are using LIST_WRAP_UNLESS_HELD
behavior so we can make that the default. A couple of lists
disable wraparound with LIST_WRAP_OFF; this is now achieved
by setting the list "wraparound" flag to false when setting
up the list. LIST_WRAP_ON was unused and is of questionable
value, so it has been removed entirely.

This makes list wraparound behavior a property of the list,
controlled solely by the "wraparound" flag. The result is a
simpler list API and implementation, without changing the
behavior of any lists.

Change-Id: Ib55d17519e6d92fc95ae17b84ab0aaf4233bcb5a
2022-10-05 11:22:55 -04:00
Aidan MacDonald
ff378deb69 gui: Remove gui_synclist_limit_scroll()
Since gui_synclist_do_button() overrides the setting at runtime
there is no reason to have a public API call to set it. Really
it should be a local variable, but it will be simpler to do that
after refactoring how list wraparound behavior is handled.

Change-Id: Id09d42197814102693752a9f64db8325118ca796
2022-10-05 11:22:34 -04:00
Aidan MacDonald
dcac2c616f Add setting for numeric list sort order
The sort order of numeric lists can now be changed with the
new "List Order" setting. It defaults to ascending for most
scrollwheel targets and descending for all others, matching
the old hardcoded behavior.

Change-Id: I4866f04ec5995158edf9e40badf7f661b3ddea81
2021-12-11 01:13:22 +00:00
Christian Soffke
1697b13693 whitespace fixes
Change-Id: I86880595b78e3cae62361c32ca57cf6f6a4ad963
2021-10-21 22:42:01 +02: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
Solomon Peachy
8143e4437b Speech Feedback improvements on the Quickscreen
Patch by Igor Poretsky

Change-Id: I1bb94965cb18efaa0787d7780f6cf22814231144
2019-08-05 05:01:29 +02: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
Michael Sevakis
aced667f48 Undo hacks to meant to get around string formatting limitations
The new vuprintf makes unnecessary workarounds due to formatting
limitations. I checked grep output for whatever appeared to fit
but it's possible I missed some instances because they weren't
so obvious.

Also, this means sound settings can dynamically work with any
number of decimals rather than the current assumption of one or
two. Add an ipow() function to help and take advantage of dynamic
field width and precision. Consolidate string formatting of sound
settings.

Change-Id: I46caf534859dfd1916cd440cd25e5206b192fcd8
2017-11-21 05:01:14 -05:00
PurlingNayuki
f0bec023d9 Implement volume limiter feature
Add a "volume limit" parameter to the configuration file. The maximum
value of volume setting in sound menu will be limited to the same as
volume limit. Also each time when setvol() is excuted, Rockbox will
check if the global_settings.volume value larger than
global_settings.volume_limit. If larger, take the value of volume_limit
instead. The volume_limit argument shares the same maximum and minimum values
with volume argument, while taking the maximum volume as its default value.

Change-Id: I8ca9bc6ea6e617b48fc346aae5f2a0a1d259ae36
Reviewed-on: http://gerrit.rockbox.org/697
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2014-01-13 11:32:03 +01:00
Jonathan Gordon
68ee7aac6e skin_engine: Make pressing the setting bar touch region work
might need some tweaking, but works.

Change-Id: I0784cd4fe9996531da6cc275491ff3b4e83cdbcf
2012-07-06 14:28:34 +10:00
Jonathan Gordon
65f9df3083 skin_engine: Allow the %St() (setting) skin tag be used as a bar
%St(<setting name>) or %St(<bar tags>, setting, <setting name>)

Change-Id: I71396d683634d4d1ad2357018c4029ecb4229677
2012-07-05 23:30:06 +10:00
Michael Sevakis
c9bcbe202d Fundamentally rewrite much of the audio DSP.
Creates a standard buffer passing, local data passing and messaging
system for processing stages. Stages can be moved to their own source
files to reduce clutter and ease assimilation of new ones. dsp.c
becomes dsp_core.c which supports an engine and framework for effects.

Formats and change notifications are passed along with the buffer so
that they arrive at the correct time at each stage in the chain
regardless of the internal delays of a particular one.

Removes restrictions on the number of samples that can be processed at
a time and it pays attention to destination buffer size restrictions
without having to limit input count, which also allows pcmbuf to
remain fuller and safely set its own buffer limits as it sees fit.
There is no longer a need to query input/output counts given a certain
number of input samples; just give it the sizes of the source and
destination buffers.

Works in harmony with stages that are not deterministic in terms of
sample input/output ratio (like both resamplers but most notably
the timestretch). As a result it fixes quirks with timestretch hanging
up with certain settings and it now operates properly throughout its
full settings range.
Change-Id: Ib206ec78f6f6c79259c5af9009fe021d68be9734
Reviewed-on: http://gerrit.rockbox.org/200
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2012-04-29 10:00:56 +02:00
Jonathan Gordon
c1a14863f5 Fix FS#12262 - Volume (and all sound settings and anything using the "table" setting type) don't get applied correctly when being changed from the quickscreen or by using the %T(..., setting_inc/dec) skin tag
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30466 a1c6a512-1295-4272-9138-f99709370657
2011-09-07 13:33:05 +00:00
Nils Wallménius
3b04a85245 Remove a couple of dead inits and assignments found by the clang-static-analyzer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29996 a1c6a512-1295-4272-9138-f99709370657
2011-06-12 22:17:45 +00:00
Jonathan Gordon
b58d3656d7 FS#11925 - Add a proper system to keep track of the current screen/activity to make %cs far more useful
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29944 a1c6a512-1295-4272-9138-f99709370657
2011-06-01 14:41:49 +00:00
Andree Buschmann
f7c4594134 Fix further 'variable set but not used' warnings reported from GCC 4.6.0.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29809 a1c6a512-1295-4272-9138-f99709370657
2011-05-01 13:48:28 +00:00
Jonathan Gordon
2271995517 invert the quickscreen setting direction on wheel targets for settings which are number lists so pressing up makes it bigger (i.e contrast). fixes http://forums.rockbox.org/index.php/topic,27778.0.html
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29772 a1c6a512-1295-4272-9138-f99709370657
2011-04-24 07:04:52 +00:00
Jonathan Gordon
4caa8326ab 2 new touch region options... "settings_inc" and "settings_dec" which will increase or decrease most of the available settings. To use it put the config name of the setting as the next param after settings_inc... i.e %T(0, 0, 32, 32, settings_inc, repeat)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28009 a1c6a512-1295-4272-9138-f99709370657
2010-09-06 13:33:49 +00:00
Michael Sevakis
35fd1e4e99 Fix F_T_SOUND voicing for decimals and physical values.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25961 a1c6a512-1295-4272-9138-f99709370657
2010-05-12 06:44:29 +00:00
Michael Sevakis
1de56ac367 Have option_get_valuestring always call sound_val2phys before formatting rather than only if fractional places are specified.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25960 a1c6a512-1295-4272-9138-f99709370657
2010-05-12 05:23:02 +00:00
Thomas Martitz
50a6ca39ad Move c/h files implementing/defining standard library stuff into a new libc 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-06 21:04:40 +00:00
Jonathan Gordon
0900b563f2 FS#10855 3 minor sbs bugs, spotted and fixed by Teruaki Kawashima
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24065 a1c6a512-1295-4272-9138-f99709370657
2009-12-18 06:51:36 +00:00
Jonathan Gordon
235d1ae795 Fix FS#10745 - %mv not working in sbs...
This fix is as good as we can do, but not perfect. Because the sbs is only updated when a button is pressed it will stay in the "volume changing" state probalby longer than expected.. which isnt terrible, but useful to remember.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23455 a1c6a512-1295-4272-9138-f99709370657
2009-11-01 02:36:51 +00:00
Nils Wallménius
bb1549aad7 Don't cast away constness
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23064 a1c6a512-1295-4272-9138-f99709370657
2009-10-10 09:55:28 +00:00
Jeffrey Goode
22933cc19c FS#10636: Quickscreen incorrect operation when menu has negative step
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22887 a1c6a512-1295-4272-9138-f99709370657
2009-10-03 12:56:16 +00: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
Nils Wallménius
3d4701a6e4 FS#10080
* Move strncpy() from core to the pluginlib
* Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins
* Drop strncpy() from the codec api as no codec used it
* Bump codec and plugin api versions


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
2009-07-14 13:57:45 +00:00
Bertrik Sikken
ab222c1705 Simplify some redundant boolean expressions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21013 a1c6a512-1295-4272-9138-f99709370657
2009-05-21 14:15:24 +00:00
Bertrik Sikken
09085a30f6 Remove unneeded #include "backdrop.h"
Remove unneeded #include "statusbar.h"


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20891 a1c6a512-1295-4272-9138-f99709370657
2009-05-09 18:09:14 +00:00
Thomas Martitz
fd14cac7c2 Split HAVE_SCROLLWHEEL into HAVE_SCROLLWHEEL and HAVE_WHEEL_ACCELERATION, where the latter now activates the wheel acceleration code.
HAVE_SCROLLWHEEL plainly indicates the existence of a scrollwheel, thus all ipods define it now (in addition to the ones and some 
sansas which did before). Same applies to the manual.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20177 a1c6a512-1295-4272-9138-f99709370657
2009-03-02 19:25:50 +00:00
Jonathan Gordon
e385ee18ce Decouple the statusbar drawing from the rest of the screen drawing. it is not drawn roughly 4x per second automatically.
viewport_Set_defaults() will setup the given viewport with the correct "full screen" dimensions (so start at 0,0 if statusbars are disabled or 0,8 if they are enabled.)
All screens should keep the statusbar enabled, but if you really want to ignore the user setting you can disbaled it with viewportmanager_set_statusbar(false).

This commit also includes some menu/list viewport cleanups from kugel in FS#9603


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19622 a1c6a512-1295-4272-9138-f99709370657
2008-12-31 05:59:26 +00:00
Jonathan Gordon
a22749b5c6 FS#9525 - The list for the quickscreen items chooser turned out to not really be usable so try this instead.
Settings in the menus will now have a context menu where you can reset the setting and if its OK to put it on the quickscreen there will be options there to put it on it.

Also, ban last.fm and cuesheet support settings from the QS


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19013 a1c6a512-1295-4272-9138-f99709370657
2008-11-05 09:30:20 +00:00
Nils Wallménius
93a87685c3 Clean up use of snprintf where strncpy if suited, avoid useless copying of constant strings for wps token evaluator, minor const police too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18625 a1c6a512-1295-4272-9138-f99709370657
2008-09-24 20:03:53 +00:00
Nils Wallménius
01729e7a18 FS#9281 Rename of splash functions.
* Remove gui_splash()
* Rename gui_syncsplash() to splashf() and remove its voice 
capabilities.
* Rename the internal splash() to splash_internal() and introduce an 
externally visible splash() that handles simple splashing  without 
printf functionality e.g. splash(HZ, ID2P(LANG_FOO)); or splash(HZ, 
"foo"); if a LANG_* id is passed it will be voiced.
* Adjust all places that called gui_syncsplash() to use the correct 
variant from above.
* Export both new functions to plugins and adjust places calling 
rb->splash() to use the correct variant so that we now have naming 
consistency between the core and plugins.
* Fix one latent bug that would cause my sim to crash with the above 
changes and correct P2STR and P2ID macros, thanks to pondlife.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18282 a1c6a512-1295-4272-9138-f99709370657
2008-08-15 08:27:39 +00:00
Bertrik Sikken
5356e6205b Simplified function option_screen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18083 a1c6a512-1295-4272-9138-f99709370657
2008-07-17 13:04:11 +00:00
Jonathan Gordon
d3cb2aca44 dont show the "cancelled" splash if the setting wasnt changed (only affects settings which have the F_TEMPVAR flag set)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18047 a1c6a512-1295-4272-9138-f99709370657
2008-07-15 14:25:16 +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
ff469ab573 Updated recording trigger screen (seems to be a feature almost noone uses?)
problems/complaints in http://forums.rockbox.org/index.php?topic=16837.0
there is a known issue that on this screen the stop icon wont update, I dont know why and noone else wants to look at it, so hopefully this will force another set of eyes on it.. this is only a graphical issue... recordings still work fine


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17643 a1c6a512-1295-4272-9138-f99709370657
2008-05-28 10:55:39 +00:00
Jonathan Gordon
cdf18bf388 callbacks were being called with the old value.. spotted in IRC last week
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17641 a1c6a512-1295-4272-9138-f99709370657
2008-05-28 10:41:07 +00:00
Jonathan Gordon
3e5b38945c const raid in option_select
add table settings and fix int settings with negative step in option_select_next_val
bump plugin API and sort newer functions


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17520 a1c6a512-1295-4272-9138-f99709370657
2008-05-15 06:58:36 +00:00
Jonathan Gordon
39bccd65b9 recommit the talking quickscreen... silly rename bug which I mised this morning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17348 a1c6a512-1295-4272-9138-f99709370657
2008-05-04 08:11:28 +00:00
Stéphane Doyon
49a73ca90f Revert r17345 on jdgordon's request, until we figure out why it crashes my x5.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17346 a1c6a512-1295-4272-9138-f99709370657
2008-05-04 02:57:30 +00:00
Jonathan Gordon
dd4e3848b8 make the quickscreen talk
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17345 a1c6a512-1295-4272-9138-f99709370657
2008-05-04 02:11:24 +00:00