1
0
Commit Graph

16 Commits

Author SHA1 Message Date
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
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
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
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
fbef20c4e2 Log the exact version at init (#22) 2020-05-13 12:07:59 -04:00
Patrick Gaskin
859520c8d2 Decreased the failsafe timeout again (#2) 2020-05-07 10:43:33 -04:00
Patrick Gaskin
bfce7251f8 Decreased the failsafe timeout (closes #2)
It was originally higher to make it easier to test, but it is too
easy to trigger by mistake when launching things immediately after
booting.
2020-05-01 20:35:37 -04:00
shermp
ff6c38b2da Implemented action chaining
commit d4e71cdd21347d1d64ef59de4c8bc0afaf775523
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 19:52:26 2020 +1200

    Log when action is run

    Co-authored-by: Patrick Gaskin <patrick@pgaskin.net>

commit 6533e8cc6a74a0b7246334b4712a96d678aefcd0
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 19:32:28 2020 +1200

    Fixed field numbers in 'chain' error messages

    Fixes the consequences of copy & paste

commit 9c4311ce5b1eb01b81a18cc19b39025514ba6be4
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 19:27:30 2020 +1200

    Simplified nm_config_push_action()

    The previous implementation was a bit... convoluted

    Co-authored-by: Patrick Gaskin <patrick@pgaskin.net>

commit e17509a85f1f125e3be4386966d37452c970f8a5
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 16:29:46 2020 +1200

    Config parser tweaks based on review

    Co-authored-by: Patrick Gaskin <patrick@pgaskin.net>

commit fbea6709ffb3cc755d01bdb7ba3ed06fc901aca5
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 15:23:22 2020 +1200

    Small documentation tweak

    Co-authored-by: Patrick Gaskin <patrick@pgaskin.net>

commit adbfc4b8edd84ca8ce381b0d4a306678f7039be1
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 15:12:49 2020 +1200

    Fix config error segfault

    Allocating some memory helps...

commit a0eb89598a74df1e7937c8615c4a4d7d1d17101b
Merge: 17d6e90 7491a97
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 14:48:06 2020 +1200

    Merge branch 'master' into pre-hook-exp2

commit 17d6e90d62df4b754967d2f2ea94f0d29aa8786d
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 11:52:41 2020 +1200

    Change loop as suggested

commit fa16f123b6c08fce88227f74b75aa2b1983bef65
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 11:50:54 2020 +1200

    Initial config parsing implementation for chain

commit d4648c424cd4c79aece73d10549c57a91a49366a
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 11:09:58 2020 +1200

    Add initial chain documentation

commit fc85239500cb892ee9ecd20c370e664007446d8f
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 11:02:31 2020 +1200

    Fix broken loop

commit ce71679a42f1fe7f82f9df68e862e6af2f57c18e
Author: shermp <14854761+shermp@users.noreply.github.com>
Date:   Sat Apr 25 10:14:59 2020 +1200

    (WIP) Added nm_menu_action_t for action chaining.

    Note: this commit will NOT compile
2020-04-25 21:13:42 -04:00
Patrick Gaskin
bcc61c14d4 Refactored actions
* New return type which allows showing messages or toasts.
* Unified action header.
* More macros to make stuff consistent.
* A few bugfixes.
2020-04-24 20:24:34 -04:00
Patrick Gaskin
a293143fd0 Renamed to NickelMenu 2020-04-22 21:27:00 -04:00
Patrick Gaskin
a19ece7cd8 Implemented config file parsing 2020-04-22 21:17:37 -04:00
Patrick Gaskin
4b45731adf Renamed subsystem to action 2020-04-22 13:01:55 -04:00
Patrick Gaskin
61ed6820c7 Started implementing config, implemented uninstall flag 2020-04-22 12:50:39 -04:00
Patrick Gaskin
c7586e95fc Various fixes and improvements 2020-04-22 01:31:30 -04:00
Patrick Gaskin
7e5320ff6f Initial commit
Nothing has actually been tested yet.
2020-04-22 00:13:02 -04:00