Commit graph

18187 commits

Author SHA1 Message Date
Petr Mikhalicin
4e13e69de3 plugin otp: Fix handling of unknown otpauth uri parameters
OTP uri parameters is key value options separated by '&'.
So, we on unknown params we have to reject also everything what was
behind '&'

Example:
otpauth://totp/kek?issuer=petya%40IPARTKN.TEST&secret=1234567890&digits=6&algorithm=SHA1&period=30

"algorithm" was unknown. So, next token after it was "SHA1&period", not "period"

Change-Id: I48eb198fd46212c6422dd8eac214adafdf3a52eb
2025-12-27 12:08:06 -05:00
Petr Mikhalicin
ca57184ff0 plugin otp: Make 'Generate Code' first option at otp plugin
Generating code is more popular action then adding accounts. So, let's
make it first

Change-Id: I15ea07ef63186611c4a87ba741c5a7b5d0d5041c
2025-12-27 12:06:57 -05:00
Christian Soffke
f7ede2b9df plugins: Disk Tidy: wait for dircache
Running Disk Tidy while the dircache is loading is a lot
slower than waiting for it to finish building first.

Typical scenarios for this would be starting Disk Tidy
immediately after booting or after unplugging from USB.

Deleting files during a dircache build also seems to easily
result in memory corruption, as evidenced by visual glitches
appearing in the theme.

Change-Id: I9250d918d916b112ffe2504a9225a0b52bcc3622
2025-12-27 16:29:16 +01:00
Christian Soffke
8e512d1f79 plugins: Disk Tidy: SBS title & minor display adjustments
- Move header that displays "Cleaning...", or
  that shows the last run's date, into SBS
  title area, if it exists.
- Left-align everything if SBS title doesn't exist
- Display "Nothing removed" instead of multiple
  zeros for items, size, dirs, and files
- Display "Today" instead of the current date
- display "2m 1s" instead of "00:02:01, and
  "<1s" instead of "00:00:00"
- "1 items" -> "1 item"

Change-Id: I40302af00d1038adca45a1c6a908af76bd9917cc
2025-12-27 16:29:16 +01:00
Christian Soffke
71f84bedd6 plugins: text viewer: use basename in title
i.e. pictureflow.cfg instead of something like
/<microSD0>/main/.rockbox/rocks/demos/pictureflow.cfg
since the last path component is usually more important
and may not be visible otherwise.

Change-Id: Icdc2d0db21d9290ce53213b0a650c83631e7c9ed
2025-12-27 16:29:16 +01:00
Christian Soffke
8c9f70de82 plugins: text viewer: use SBS title
Take advantage of skinned status bar title, instead of
displaying a custom header that reduces space for content.

A custom header will still be displayed if the SBS
doesn't come with its own title, such as on the default
theme, or if the status bar has been turned off in Text
Viewer's settings.

Change-Id: I14c8d9a61acf338d09d7f54947399e8692987a7b
2025-12-27 16:29:16 +01:00
Christian Soffke
1fd45d23a0 plugins: text viewer: use theme colors & backdrop
When Night Mode was added to Text Viewer
in ab1b67f, the regular mode was changed to
black and white instead of using theme colors.
This looks out of place in custom themes when
the statusbar is enabled, i.e. using the default
Text Viewer setting. Only switch to black and
white when statusbar is disabled, which also
disables the backdrop.

Change-Id: I3ff5e1c42de11ca58640e91bcb315ce7804fadcd
2025-12-27 10:28:00 -05:00
Christian Soffke
06af1090bb plugins: vu_meter: enable theme for submenus
Also properly handle situation where theme is already
enabled at launch.

Change-Id: Ic7b3dcf38e77f6e9d6ef4a5512f729e47880e46c
2025-12-27 15:49:05 +01:00
Christian Soffke
17ea0bb82e simplelist: fix unbalanced viewportmanager calls
viewportmanager_theme_enable isn't balanced by
viewportmanager_theme_undo when connecting to USB
while simplelist is displayed.

Change-Id: Iad9408a52150934246c886a01a5d1efc8febd0fd
2025-12-26 16:05:24 +01:00
Solomon Peachy
515b2816cd FS#13724 - Updated Swedish translation (Wilton Millfjord)
Change-Id: If4c18da6a95a08c9ef3c38d79479742c0da62528
2025-12-26 08:46:21 -05:00
Christian Soffke
dbec04dc81 simplelist: stop scrolling when leaving
Fixes (at least) Shortcuts menu not stopping
a scrolling line after leaving menu for a
plugin in some situations.

Change-Id: I90b4cc71a63e557565d028aae27db082e2e1813f
2025-12-26 02:50:15 -05:00
Christian Soffke
b04fd3efed plugins: fix dangling sbs_title pointer
Change-Id: Ief2a5dde8760e55524a74b482079a2a9ebafece9
2025-12-26 08:29:26 +01:00
Solomon Peachy
aaee78586a Minor mechanical correction to French translation
(USB-DAC is correct, and will be spelled out properly au francais
 thanks to voice-corrections.txt)

Change-Id: I2dd8e0e41df3e687a26fa74272f5248cda8f7b20
2025-12-23 20:08:52 -05:00
Christian Soffke
5aa2b339d5 plugins & debug menu: apply consistent titles
Purge "Menu" or "Rockbox" from plugin menu titles
and match application names from manual.

Exception: "Main Menu" is left unchanged as the
title for the Main Menu Configuration plugin, since
it appears in Rockbox's Settings menu and therefore
should match the name of the setting.

E.g.:

"Rockbox Goban" => "Goban"
"Image Viewer Menu" => "Image Viewer"
"Viewer Menu" => "Text Viewer"
"Menu" => "Chess Clock"
"Do What?" => "Text Editor"
"Mpegplayer Menu" => "MPEG Player"
"Multiboot Settings" => "Multiboot"
"Disktidy" => "Disk Tidy"
...

Change-Id: Ie6d3be7557f31a36309489037ad8b2b27b06706e
2025-12-23 10:25:05 -05:00
Christian Soffke
fe690dfa20 plugins: playing time: adjust error message, keep theme enabled
Replace generic error message  with voiced
info about the number of tracks skipped

Change-Id: I334fac447eeef2eb5c0d302675b98027b01b09d0
2025-12-23 10:22:14 -05:00
Christian Soffke
4e211b55f9 plugins: sort, vbrfix: add warning
Destructive operations should come with a
warning, especially if they are easy to
select by accident from the Open With... menu.
vbrfix even seems to be selected by default
for audio files (which is probably not ideal).

Change-Id: I4d2c79f2f19129d8b0257655e2d7c6093ad86eca
2025-12-23 09:58:23 -05:00
Christian Soffke
f316535684 plugins: view-text, zxbox: fix panic when called without parameter
Change-Id: Ife654e6dcb29916f661ce0c2232f4060ac02f5d2
2025-12-21 23:58:04 -05:00
Solomon Peachy
a2e63fca59 FS#13721: Updated French Translation (Matthieu BACHELIER)
Change-Id: Id49928589f68ff5d77a830c76823a4e21d952360
2025-12-21 17:54:55 -05:00
Christian Soffke
4698be4a17 plugins: flipit: remove 4s delay on devices without instruction
Change-Id: Iab0e54ca20de5318bf3d74e8571d0e6e209e3430
2025-12-20 13:57:03 +01:00
Roman Artiukhin
c594b58af2 imageviewer: jpegp: Fix downscaled image rendering
Fixed rendering issue when dimension is not divisible by downscale factor

Fixes FS#13719

Change-Id: I3b4ad035d5cce57acd3dc8a8e846bb5303598c8d
2025-12-19 13:35:52 +02:00
Solomon Peachy
488b915432 FS#13716 - Update to Latvian translation (Renalds Belaks)
Change-Id: I815f5482d6227be4dd4206311d365dcc949d3ac8
2025-12-15 15:12:13 -05:00
Christian Soffke
16cf7f5d8b plugins: starfield: enable USB audio
forgot about this...

Change-Id: Ib9d1451785390f1fabcaab679271510e76f9e330
2025-12-15 07:48:45 -05:00
William Wilgus
2398616d63 Bugfix lua font_getstringsize ignoring supplied fontid
Change-Id: I62c334300f427670b237957553176302a8589fe7
2025-12-14 17:51:29 -05:00
Aidan MacDonald
a30f822500 plugins: add strstr() to plugin API
Multiple plugins carry their own strstr() implementation because
the in-core version wasn't exported to the plugin API.

Change-Id: Ib57a9b63754c89fb3447ec1d3958963d23145105
2025-12-12 13:30:54 +00:00
Roman Artiukhin
2e1af37536 plugins: imageviewer: don't downscale unscaled image if it fits on screen
Change-Id: Ifd686884d1d8fe3dca9da58ba38ee2de822b5787
2025-12-12 08:06:20 -05:00
Roman Artiukhin
4e18f60987 cuesheet: allow playback from arbitrarily named cue file
The removed filename check is required for proper cuesheet recognition in WPS, but it should not prevent playback from an otherwise valid cuesheet.

Change-Id: I2876a8855f06fb569e3ac171b04931af8be16cd1
2025-12-10 17:37:19 -05:00
Solomon Peachy
cbfaa49d3f xrick: Fix up -wundef warnings in miniz library
Ensure that if a posistive condition results in "#define XXX 1", ensure
we set "#define XXX 0" if that test fails.  This is necessary because
the code uses "#if XXX" isntead of "#ifdef XXX" all over the place.

Change-Id: I16157fd6ae251a70331f48a895b6c53a6648ab2b
2025-12-07 14:28:51 -05:00
Solomon Peachy
a5df7c2e02 Revert "xrick: fix sim build warning on arm with -Wundef"
This reverts commit f05be27ae6.

Reason for revert: Introduces warnings on all (x86) sim builds.  

Change-Id: I052c3569693663910a4290668b90ff444da65c75
2025-12-07 14:18:02 -05:00
Christian Soffke
f05be27ae6 xrick: fix sim build warning on arm with -Wundef
Change-Id: I11513a20e0cd0bfd6dbe0759c86e4ff893a3d537
2025-12-07 13:22:13 -05:00
William Wilgus
11552d0710 bugfix PLUGIN_GOTO_ROOT didn't reset previous screen
Change-Id: I971eb5a6890d35c9a06c37526c8107c6afde35e5
2025-12-07 13:10:04 -05:00
William Wilgus
7a73ca2230 FixRed lua -- rb->strtol for native targets
missed this reference

Change-Id: If8d747399223e5cd33d044a274e6d1d81745ed1c
2025-12-06 21:26:27 -05:00
William Wilgus
8a773fb29f lua -- remove strtol and strtoul replace with rb->strtol and rb->strtoul
Change-Id: Ib7ba358b6488b946404c0c4cd8773e948810a7f7
2025-12-06 18:11:13 -05:00
Solomon Peachy
e94a96cdcf FS#13497: '0' is sometimes a valid track number
Most notably for CD rips that use a track number of 0 for
the leadin.

Therefore change our "invalid track number" canary to -1 instead
of 0.  Additionally don't try to parse an empty string.

In the process, get rid of redudant 'discnum = 0' as well.

NOTE: While not strictly necessary, we recommend rebuilding the
      database to ensure files without track numbers are
      updated with the new canary.

Change-Id: I543f98ca49cec7b5eeffa7c14c1eca57171f345a
2025-12-06 09:20:32 -05:00
Solomon Peachy
481cc70fe0 libc: Add an implementation of strtol/strtoul and export it via plugins
These were lifted from the lua plugin.

sdl, doom, puzzles updated to use the exported version

todo: lua, maybe?
also: convert uses of atoi [back] to strtol

Change-Id: I5a1ebbe8d8c99349e594ab9bbbce474e7645b4e9
2025-12-06 09:04:36 -05:00
William Wilgus
32edbd430d plugins - Add PLUGIN_GOTO_ROOT - lua add PLUGIN_GOTO_ROOT and PLUGIN_ERROR
Change-Id: I018f68685877700571aa7687428cfdda436a0294
2025-12-05 12:03:58 -05:00
William Wilgus
7b7d9a384a scrobbler / log viewer allow cancel button long press to exit plugin
some devices will shutdown before the button repeat even occurs so unfortunately
it still might not work on some devices (sansa clip series)

Change-Id: I1c5eda6c5a97887f69e1fbd0ada39cce01db352b
2025-12-05 12:03:58 -05:00
Aidan MacDonald
9d7af45122 touchscreen: Allow progress bars to be used in the .sbs
Progress bars (for seeking in the current track) can now be
used on the .sbs skin.

Change-Id: I42377b16036ca4ca8017ecfa2bdab08bd0fa1e64
2025-12-05 12:02:53 +00:00
Aidan MacDonald
9b5b9d6a6d touchscreen: Allow volume bars to be used in the .sbs
Move the volume bar input handling to skin_touchsupport.c so
volume bars can be used in the .sbs as well as the .wps skin.

Change-Id: I018fa1c84f93b64d676b68e3bea63ddb9141e492
2025-12-05 12:02:53 +00:00
Aidan MacDonald
e3e0c7b73c skin engine: Fix some user-created touch regions being suppressed
Fix the heuristic used for detecting a touch-enabled theme.
The old method assumes that volume bar and progress bar tags
are always auto-created, but this might not be true. Instead,
mark regions that originate from a %T tag as user-created and
check for those.

Change-Id: Iec732d299a2b4e298bef8069a68ff94e3b642703
2025-12-05 12:02:53 +00:00
Aidan MacDonald
1816667937 touchscreen: Allow bar tag touchregions to be labeled
This is necessary if you want to detect touches on the bar region
using %Tl conditionals. Suppressing the auto-created region and then
creating one manually using %T doesn't give exactly the same results
because user-defined touch regions can't yet specify padding.

Change-Id: I2f4bde8eb56ba89645c72f3cc9d4b2355b934abd
2025-12-05 12:02:53 +00:00
Aidan MacDonald
910a39af27 touchscreen: Evaluate %Tp tag only if pointing mode is enabled
Simply knowing that a touchscreen is present isn't that useful for
themes. Having %Tp evaluate as true when in pointing mode and false
in 3x3 mode is better. For example, themes can change their layout
or hide touch UI elements when in 3x3 mode, or show a status icon.

Although a similar effect can be achieved with the %St tag it's
simpler to use %Tp for this purpose -- it can report the current
mode, not just the user preference.

Change-Id: Ie343c105970dca11864fa44c6a091ed8e9e35b3d
2025-12-04 19:36:51 -05:00
Aidan MacDonald
02ad19c959 touchscreen: Fix seeking to end of track in WPS
Seeking to the very end of the track with the touchscreen caused
rapid skipping through the playlist because each touch event
generates a separate seek operation, kind of like rapidly pressing
a physical button. Fix this bug by executing the seek operation
only for the release event.

Change-Id: Ic1080065a68e7cc2ba98e2f27293c954f2ec8fb2
2025-12-04 19:36:19 -05:00
Aidan MacDonald
010d22ed29 touchscreen: Port skin engine to gesture API
Use the gesture API for improved reliability.

Change-Id: I44c4e124132605ecf4f1499f97defd7b4b2d78e8
2025-12-04 19:00:38 -05:00
Aidan MacDonald
0f99defe1f touchscreen: Port quickscreen to gesture API
Use the gesture API to improve reliability, and allow press and hold
to repeatedly increment or decrement a value like on button targets.

Change-Id: Ic01b7a0802c3dec9f1534f5dd11e006b28a875b6
2025-12-04 17:29:54 -05:00
Aidan MacDonald
94468f693f touchscreen: Port yes/no screen to gesture API
Use the gesture API in the yes/no screen to suppress bogus
touches and generally improve reliability.

Change-Id: I44adf95255f07d81188fd249dc00a91519ca7b99
2025-12-04 17:29:54 -05:00
Aidan MacDonald
67233114f7 touchscreen: Port list code to gesture API
Make use of the new gesture API to overhaul list touch support.
This should fix most of the annoyances with touch navigation in
menus and make the touchscreen easier to use.

Change-Id: Ied300947fcf755e2810e9348496ed86eaf620669
2025-12-04 16:22:26 -05:00
Aidan MacDonald
e2363b0e2c plugins: Add touch API to plugin API and revamp touchscreen test
Change-Id: Iefb658693b03e0cda43e2a9fc93086485e790b4e
2025-12-04 09:01:51 -05:00
Aidan MacDonald
8aae723853 touchscreen: Integrate gesture API with action system
Provide a default gesture object in the action system which will
be kept up to date with touch events automatically. This reduces
the boilerplate needed to handle touch input.

Change-Id: I76f51ac2c3e3a0da204707d62e91a175c5f8c76a
2025-12-04 08:14:28 -05:00
Aidan MacDonald
bb1e0b48a0 touchscreen: Add gesture velocity helper
Add a helper for computing the motion velocity during a touchscreen press.

Change-Id: I1ef7452ba9815897fd3ec01f8980c89aeef5418f
2025-12-04 08:14:28 -05:00
Aidan MacDonald
7aa823215b touchscreen: Add gesture recognition API
Add a basic gesture API which can detect taps, long presses,
and dragging gestures.

Change-Id: Id10bf8d46b9195330ce951f9f108c81e87a8dad4
2025-12-04 08:14:28 -05:00