Commit graph

18 commits

Author SHA1 Message Date
renovate[bot] 0b0ec147bc
fix(deps): update rust crate thiserror to 1.0.38 (#31)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-18 02:58:39 +02:00
github-actions[bot] b00c9e283b
Apply Version Updates From Current Changes (#27)
Co-authored-by: amrbashir <amrbashir@users.noreply.github.com>
2022-12-06 03:05:44 +02:00
Amr Bashir 812ff0d37a
refactor: rewrite (#18)
* refactor: rewrite

* fix syncing check items and cleanup

* clippy

* Add `append`, `prepend` and `insert`

* accept different menu items in `*_list` methods

* add context menu for gtk

* add `with_items`

* add `items` getter

* chore: unreachable! and typos

* implement remove

* `*_list`  -> `*_items`

* fix winit example

* add `show_context_menu_for_gtk_window` on `Submenu` type

* Add windows implementation

* TextMenuItem -> MenuItem, MenuItem trait -> MenuEntry

* Add `PredfinedMenuItem`

* move internal mod into its own file

* update tao example to latest tao's `muda` branch

* fix build on linux with latest tao changes

* Fix accelerators on Linux

* update examples

* remove recursive removal of submenus

* remvoe gtk menu items recursively

* fix tao example on macos

* On Windows, remove parents hmenu when removing an item

* Add documentation

* update README.md

* use insert_items with postion 0 for prepend_items

* Add menu mnemonics in examples

* Add `ContextMenu` trait

* Add methods to `ContextMenu` trait necessary for tray icon

* fix linux build

* fix context menu on gtk

* Expose gtk::Menu in ContextMenu trait

* Revert context menu to create a gtk::Menu on each call

* clippy lints

* cleanup crate structure

* update docs

* Fix doc tests and links

* more docs fixes

* error handling

* macOS implementation (#19)

* partial macOS implementation

* fix context menu examples

* add accelerator support for macOS

* strip ampersands from titles on macOS

* add CMD_OR_CTRL shorthand for modifiers

* implement actions for predefined menu items on macos

* fix examples

* more predefined items

* implement insert for macos

* refactor macOS implementation

* menu state getters and setters on macOS

* implement remove for macOS

* code tweaks

* add show_context_menu_for_nsview for Submenu on macOS

* docs improvements

* allow adding item to the same menu multiple times on macOS

* implement `items` for macOS

* strip only single ampersands from menu titles

* add support for menu item actions on macOS

* add app name to macOS About, Hide, Quit menu items

* add methods to set app window and help menus on macOS

* fix clickable submenu titles on macOS

* refactor submenu for safe reuse on macOS

* fmt & clippy

* few cleanups

* fix docs

* clippy

* fix docs

* cleanup examples

* fix tests

* fix clippy??

* use cargo action instead

* ???

* Replace popUpContextMenu with popUpMenuPositioningItem

Co-authored-by: Caesar Schinas <caesar@caesarschinas.com>
Co-authored-by: Wu Wayne <yuweiwu@pm.me>
2022-11-23 18:29:52 +02:00
Ngo Iok Ui (Wu Yu Wei) e33c5f0daf
feat: add accelerator module (#17)
* Add accelerator module

* Add Linux port

* Add macOS port

* Add Windows port

* Remove unused types

* Fix doc tests

* Add more variants
2022-07-20 14:34:09 +02:00
Amr Bashir 943beda6df
feat: implement NativeMenuItem (#9)
* feat: implement `NativeMenuItem`

* windows: refactor native menu item handle in window proc

* native menu items on linux

* change about status to not implemented on windows
2022-06-10 14:09:56 +02:00
Amr Bashir 6b98160e49
feat: accelerators (#6)
* feat: accelerators

* add accelerators on windows
2022-06-07 13:05:20 +02:00
amrbashir 68f16f15a3
refactor(linux): use Rc<RefCell> instead of Arc<Mutex> 2022-06-06 14:42:35 +02:00
amrbashir fc7b519b6a
chore: switch to tao branch that disables gtk menu creation 2022-06-05 15:13:56 +02:00
amrbashir a7b7b0cf34
typo 2022-05-08 19:36:39 +02:00
Yu-Wei Wu b2f1a3ab4f
Add macos port
Some configurations haven't implemented yet or just seem not possible.

Co-authored-by: Jason Tsai <jason@pews.dev>
2022-05-07 21:28:11 +08:00
amrbashir cadb53087b
rename crate to muda 2022-05-07 11:19:58 +02:00
amrbashir 7021b6c585
update crate metadata 2022-05-07 01:02:52 +02:00
amrbashir 31e2624ada
rename crate to minit 2022-05-07 00:52:41 +02:00
amrbashir 17ae5366c7
add documentation 2022-05-06 22:57:58 +02:00
amrbashir 2ccd400497
use native apis for getters on windows 2022-05-06 19:37:49 +02:00
amrbashir 832e4964e7
implement windows 2022-05-06 18:38:39 +02:00
amrbashir fbef2d8a40
use an event channel instead of callbacks 2022-05-06 16:25:45 +02:00
amrbashir a46c53dbe9
init - initial linux support 2022-05-05 13:50:22 +02:00