Commit graph

12 commits

Author SHA1 Message Date
William Wilgus
dfe12252bb [Feature, Plugin] lastfm_scrobbler_viewer
a plugin to view lastfm scrobbler logs

uses print cell to give a spreadsheet view of scrobbler logs

buffers the whole file if possible otherwise it reads entries from disk

rudimentary text searching for columns
include / exclude; all/any and case sensitive

Change-Id: Id9616e5796658952fba4ea747f596cb77d6f34c0
2023-04-16 23:50:24 -04:00
William Wilgus
84fe501f53 Add locked actions to all soft lock targets
fiio m3k native is currently the only player with
defined buttons different from the standard
mapping.

This allows the user to use the keyremap plugin
to specify differing keymaps for their device in the locked state

Change-Id: Ie0b447bba0d5978e8d23fed423df30c794afc6f9
2023-01-02 13:19:43 -05:00
William Wilgus
6ebec601f9 [Feature/Bugfix] keyremap add Context flags
Add context flags to keyremap
CONTEXT_LOCKED
CONTEXT_REMOTE
CONTEXT_REMOTE_LOCKED

--CONTEXT_PLUGIN-- Removed -- Plugins need a custom action list
supplied and a method of supplying them

Change-Id: I5201d275ad0ab6130c2d05d5afb0c450f5c1746c
2022-12-31 16:12:18 -05:00
William Wilgus
855540e1f5 [BugFix] keyremap browse missing root, entry count off by 1
browse_context was missing its root causing a NULL deref

Export User Keys was looking for at least 4 entries when it only needed 3

Change-Id: If92ecccb36bd54e1b850ac2a969fe262b5d7fd14
2022-12-31 07:04:18 -05:00
Aidan MacDonald
6c52fa139c Remove browse_context_init()
Prefer to use designated initializers to avoid having to specify
unneeded parameters. Non-initialized members are zero-initialized
by the compiler.

Change-Id: Ia6a03c45cb3ef0b30f458d7d0ae1604a350c737c
2022-12-17 13:36:38 +00:00
Solomon Peachy
5c6d6bd612 keyremap: Use '%z' when printing size_t
Change-Id: Ie752c8b8e35b98e52ed8999e92d5c65181109240
2022-10-10 08:24:33 -04: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
William Wilgus
19d95d7b56 keyremap add plain text import and export
allows users to edit and view keymaps in a text editor
(parser requires one entry per line (LF or CRLF work as line endings)

allow naming of files on save

Change-Id: Id6627171eb96210b2deeef8d15bab3f8d1e0ab3f
2022-03-06 17:00:27 -05:00
William Wilgus
bba0564ec1 keyremap plugin use yes_no prompts, bugfix
use the supplied yes_no dialogs for file delete, key reset, save prompt

return to root menu automatically after loading a file

fix bug where deleting the last file in the list exited the menu

Change-Id: Ib98f6b200b9dee3e4350ad4d7ef80bbb95c77481
2022-02-24 00:26:40 -05:00
William Wilgus
295ec3790d Core Keyremap Allow setting keymap from plugin
Allow setting and removing keyremap on the fly

It was pretty annoying trying to work out a keyremap with a restart
required to set the remap and was quite annoying when I was no
longer able to navigate to the plugin or filebrowser due to setting
the wrong remap

now you can try out a keymap and if it doesn't work a restart will
sort things out

Change-Id: I848fb3bd759f9684ac2497324a371f92b7464f7b
2022-02-23 21:38:27 -05:00
William Wilgus
f7bb9e2167 Add custom action mapping to core
results of an idea I discussed in IRC

changed the way the lookup in the remap file works..

 entries consist of 3 int [action, button, prebtn]
 context look up table is at the beginning
 action_code contains the (context | CONTEXT_REMAPPED)
 button_code contains the index of the first remapped action for the matched context
 [0] CORE_CONTEXT_REMAP(ctx1) offset1=(3), count=(1)
 [1] CORE_CONTEXT_REMAP(ctx2, offset2=(5), count=(1)
 [2] sentinel, 0, 0
 [3] act0, btn, 0
 [4] sentinel 0, 0
 [5] act1, btn, 0
 [6] sentinel, 0, 0

 Note:
 last entry of each group is always the sentinel [CONTEXT_STOPSEARCHING, BUTTON_NONE, BUTTON_NONE]
 contexts must match exactly -- re-mapped contexts run before the built in w/ fall through contexts
 ie. you can't remap std_context and expect it to match std_context actions from the WPS context.

-- Done --

Code for reading core remap entries

-- Done --

import of core remap entires from disk
-- Done --

plugin to set new key mapping (the hard part)

The plugin is started and FULLY functional
you can add actions and contexts
you can change context, action, button, prebtn
delete keymap files
load keymapfiles
save user keymaps
test keymaps before applying them
loading keymaps to core still requires restart
-----------------------------------------------------------------------------------------------

Change-Id: Ib8b88c5ae91af4d540e1829de5db32669cd68203
2022-02-23 08:47:12 -05:00