1
0
Commit Graph

128 Commits

Author SHA1 Message Date
Patrick Gaskin
cb2caff551 Improved extensibility of nickel_setting, split browser stuff into nickel_browser action (closes #59) (#60)
* Split browser actions from nickel_extra into nickel_browser

* Improved extensibility of nickel_setting action

Instead of nickel_setting:<setting> for toggling a setting and
nickel_setting:<setting>:<bool> for setting it explicitly, use
nickel_setting:<action>:<setting>.
2020-07-02 00:25:00 -04:00
Patrick Gaskin
7019745ff7 Fixed minor formatting issue in action.c 2020-06-29 07:58:21 -04:00
Patrick Gaskin
e89eb83869 Fixed reloaded config only propagating to new menus or the first existing one (fixes #57) (#58)
Instead of returning a bool from `nm_global_config_update` indicating whether
the menu items were modified, return an int indicating the current config
revision which can then be compared against one stored as a property of the
menu.

This issue was found by @jackiew1. See #56 for more details.

This fixes an issue in ee0eb7ccf7 (#47).
2020-06-26 09:26:44 -04:00
Patrick Gaskin
ea1c43b6a1 Implemented generator updates (closes #54) (#55) 2020-06-23 17:05:22 -04:00
Patrick Gaskin
40f27b37aa Updated symbol tests for 4.22.15190 2020-06-23 15:25:26 -04:00
NiLuJe
d0d169769b Hide (nearly) all symbols by default (#40)
https://github.com/geek1011/kobo-plugin-experiments/issues/9#issuecomment-642324579
2020-06-23 03:37:00 -04:00
Patrick Gaskin
ff434c9669 Fixed freeing old config after updates
This fixes a bug in ee0eb7ccf7 (#47).
2020-06-23 03:09:05 -04:00
Patrick Gaskin
ee0eb7ccf7 Implemented config file reloading and improved the config parser (closes #42) (closes #48) (#47)
Menu:
* Implemented menu item updating based on config file creation/deletion/modtime.
* Fixed ordering and separators for dynamically added actions.
* Simplified separator property setting.
* Fixed issue with item ordering on every second update (it keeps track by the item index based on the original menu, which changes after we add our items, so we actually need to remove our items before we find the item to prepend our new items to).
* Note: generators can't trigger updates yet, and are only updated when the config changes.

Config:
* Split config parsing and scanning into multiple steps.
* No more memory leaks on error.
* Properly handle memory allocation errors.
* Cleaner code.
* Less chance of making mistakes when adding features in the future.
* Also made if statements easier to read.
* Refactored config state and list management into separate functions.
* Extracted parsers for each config type into separate functions.
* Cleaned up whitespace.
* Rearranged variables.
* Fixed a few memory leaks and use-after-free issues for errors in the config parser.
* Fixed use-after-free of line in config parser.
* Moved config file filtering into scandir.

See #47 for details.
2020-06-22 23:34:37 -04:00
Patrick Gaskin
9d58df7a64 Fixed use-after-free in nm_action_result_free 2020-06-21 13:30:18 -04:00
NiLuJe
991b3e702d Actually catch allocation failures in handle_list_reply
Caught by Clang's static analyzer
2020-06-21 19:03:07 +02:00
Patrick Gaskin
af95f6464b Implemented option to set values for nickel_setting:* explicitly (closes #51) (#52) 2020-06-20 15:13:45 -04:00
Patrick Gaskin
7de21b827c Switched to new method for nickel_extras:web_browser and implemented url/css options (closes #49) (#50)
* Switched to new method for nickel_extras:web_browser.
* Added support for fw versions less than 4.11.11911 for nickel_extras:web_browser action.
* Added modal, URL, and CSS options to nickel_extras:web_browser.
2020-06-20 15:08:12 -04:00
Patrick Gaskin
50c7374fcf Reworked menu item injection (closes #43) (#45)
Menu items are now added before the menu opens rather than when the menu is created. This gives more flexibility to implement features like #42.
2020-06-16 19:48:09 -04:00
Patrick Gaskin
1001be39aa Fixed documentation for nickel_wifi action 2020-06-16 19:38:41 -04:00
Patrick Gaskin
880f82d420 Added a link to the MobileRead thread to the README 2020-06-16 19:34:42 -04:00
Patrick Gaskin
87aafe5899 Implemented nickel_wifi action (closes #25) (#46) 2020-06-16 19:12:21 -04:00
Patrick Gaskin
7f52a8165e Implemented nickel_misc:home action (closes #39) (#44) 2020-06-15 16:12:14 -04:00
Patrick Gaskin
2b40ede252 Fixed small grammatical error in docs 2020-06-15 16:08:07 -04:00
Sherman Perry
cd8acae0bf Switched to a macro for defining the log prefix (#41) 2020-06-11 18:52:55 -04:00
Patrick Gaskin
174b6e3130 Implemented nickel_open action (closes #26) (#38) 2020-06-08 18:42:25 -04:00
Patrick Gaskin
eb7a5c5c35 Fixed Drone config for tagged commits 2020-06-01 14:31:20 -04:00
Patrick Gaskin
9dbf79c3e3 Implemented NM_UNINSTALL_CONFIGDIR build option (closes #34) (#37)
This option allows NickelMenu to be uninstalled by deleting the config dir.
2020-06-01 11:45:15 -04:00
Patrick Gaskin
980703ca94 Added Telnet toggle example 2020-05-25 19:07:08 -04:00
Patrick Gaskin
809a037396 Added Drone config for build and S3 uploads 2020-05-25 18:30:45 -04:00
Patrick Gaskin
88adf88880 Implemented skip action (closes #31) (#32) 2020-05-25 17:17:27 -04:00
Patrick Gaskin
fdc3ec4f50 Renamed chain to chain_success (breaking) (closes #33) (#36) 2020-05-25 17:15:14 -04:00
NiLuJe
ae787f1270 Implemented kfmon generator (closes #39) (#35) 2020-05-25 17:14:48 -04:00
Patrick Gaskin
a79454a274 Ignore special files during config parsing (closes #27) (#30) 2020-05-25 11:23:59 -04:00
Patrick Gaskin
1093239ba7 Cleaned up some macros 2020-05-25 07:06:04 -04:00
Patrick Gaskin
c4ab0154bc Implemented menu item generators (closes #4) (#28)
* Implemented menu item generators (closes #4)
* Initialized sz to -1 for nm_generator_do
* Cleaned up extra semicolon in config.c
* Fixed typo in generator size check
2020-05-25 06:57:59 -04:00
Patrick Gaskin
242c6ee7b5 Updated symbol tests for 4.21.15015 2020-05-19 17:44:54 -04:00
Patrick Gaskin
ffcf63dd39 Fixed default menu items 2020-05-19 13:13:48 -04:00
NiLuJe
d5621ba674 And more alphabetical order 2020-05-13 17:05:56 -04:00
NiLuJe
ec8fcd69be Minor cosmetic tweaks to the KFMon list code (#24)
* Switch to an enum for kfmon ipc errors codes.
* Also switch to a case switch in nm_kfmon_return_handler.
* Comment out the default case to have -Wswitch shout at you if you missed
one.
* Simplify pointer chasing loop.
* Explicitly mention KFMON_IPC_EAGAIN in the return_handler.
* Simplify some more.
* Make GCC happy.
* Slightly less convoluted.
* Alphabetical header order.
2020-05-13 17:05:05 -04:00
Patrick Gaskin
1968f0c959 Fixed a memory leak in cmd_output action 2020-05-13 16:39:16 -04:00
Patrick Gaskin
a32c17b8f4 Added clangd compile_flags.txt to gitignore 2020-05-13 13:18:22 -04:00
NiLuJe
fbef20c4e2 Log the exact version at init (#22) 2020-05-13 12:07:59 -04:00
Patrick Gaskin
043dfb37e6 Implemented quiet option for cmd_output (fixes #9) (#21) 2020-05-13 11:38:05 -04:00
Patrick Gaskin
bf03f9e22b Implemented conditional actions (closes #11) (#20) 2020-05-13 11:37:35 -04:00
NiLuJe
fa1f08a369 Allow whitespace in cmd_spawn/cmd_output args (fixes #16) (#19)
* Allow whitespace in cmd_spawn/cmd_output args

* Trim cmd no matter the content of the extra option field

* Don't mistake a stray colon in the actual command for a field separator

* Simplified quiet option for cmd_spawn, fixed up parsing
    * Fixed case where option could start with, but not actually be, quiet.
    * Fixed restoring the original command when no option is specified.
    * Simplified code.

* Fixed typos in comments

Co-authored-by: Patrick Gaskin <patrick@pgaskin.net>
2020-05-12 21:54:43 -04:00
Patrick Gaskin
4cd4b1e5a8 Ensure the failsafe thread is a detached one (fixes #17) (#18)
Also name the thread.
2020-05-11 17:34:30 -04:00
NiLuJe
cb611e38be Ensure the failsafe thread is a detached one
Fix #17
2020-05-11 22:18:00 +02:00
Patrick Gaskin
3301667dfa Merge branch 'geek1011/menu-ux' (closes #10) 2020-05-11 13:29:41 -04:00
Patrick Gaskin
89b14c3202 Made the main menu separator colors consistent (#10) 2020-05-08 22:11:57 -04:00
Patrick Gaskin
44ca6d258c Changed insertion point for main menu to from Help to Settings (#10) 2020-05-08 22:09:46 -04:00
Patrick Gaskin
5c43b8268f Use specific kobopatch-patches version for testdata
Just in case I ever change the layout.
2020-05-08 20:09:58 -04:00
Patrick Gaskin
5a20edc661 Fixed typo in docs 2020-05-07 23:34:26 -04:00
Patrick Gaskin
84ba4a495d Added examples for starting Telnet/FTP
Unlike dev mode, you can choose to start one or the other. Also, the FTP
server serves the entire KOBOeReader partition, not just .kobo. This will not
conflict with dev mode.

Also added examples for showing the current IP and importing books.
2020-05-07 23:21:33 -04:00
Patrick Gaskin
5560bb5bd1 Merge branch 'geek1011/symbol-check' (closes #15) 2020-05-07 17:50:34 -04:00
Patrick Gaskin
e0647af1ef Updated action compatibility (#15) 2020-05-07 17:48:44 -04:00