Feat/gtk4#341
Open
rmakestrash-jpg wants to merge 10 commits into
Open
Conversation
- implement PredefinedMenuItem handlers with GTK4 GActions - add parent_menu tracking to GtkMenuChild for remove/update ops - implement Menu::remove() and Submenu::remove() with position tracking - implement set_text() and set_icon() with remove+reinsert pattern - implement remove_for_gtk_window() cleanup - fix typo: applicaiton -> application - fix new_native_icon type (Submenu -> Icon) - add duplicate action guards for Fullscreen/About 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add icon() getter method to MenuChild - Populate icon bytes in IconMenuItem constructors for compat layer - Extract PNG bytes before Icon is moved to MenuChild - Add set_icon/set_native_icon methods to Submenu - Store raw PNG bytes in PlatformIcon for Send+Sync safety Part of GTK4 migration for Tauri Linux support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add explicit lifetime annotations to Ref/RefMut returns - Use #[cfg_attr(not(feature = "linux-ksni"), allow(dead_code))] for icon() and png_data() methods used only by linux-ksni feature - Use #[cfg_attr(target_os = "linux", allow(dead_code))] for accelerator() which is only used on Windows/macOS - Mark from_gtk_mnemonic() as #[cfg(test)] since it's only used in tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… support Rename GTK's `new_menu_item()` back to `new()` to match Windows/macOS backends. The feat/gtk4 branch had an API mismatch where normal.rs called `new_menu_item()` but only GTK defined it - Windows/macOS still used `new()`. This fixes Windows build error E0599: "no function or associated item named `new_menu_item` found for struct `MenuChild`" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Match native GNOME/WebKitGTK behavior by setting has_arrow=false on PopoverMenu widgets used for context menus. Reference: https://bugs.webkit.org/show_bug.cgi?id=211241 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This reverts commit 603a5e3.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Member
|
can you cleanup the PR so it only has changes related to gtk4 migration? mainly the sync workflow file, and compatibility files/structs. |
|
Mac compilation seems to fail when using this version: from: https://github.com/C0D3-M4513R/DexProtectOscRS/actions/runs/26201385288/job/77091930610 |
1 task
johncarmack1984
added a commit
to johncarmack1984/muda
that referenced
this pull request
Jul 3, 2026
Builds on the feat/gtk4 line (tauri-apps#272 by @amrbashir, continued in tauri-apps#341 by @rmakestrash-jpg), merged onto current dev and adapted to the current shared API: KeyAccelerator (with a Key-based to_gtk conversion), PredefinedMenuItemType, and predefined-item accelerators wired like the macOS backend. The public gtk API keeps every method name and signature shape. Only the gtk types follow the toolkit: gtk::Menu -> gtk::PopoverMenu, gtk::MenuBar -> gtk::PopoverMenuBar, and IsA<gtk::Container> bounds widen to IsA<gtk::Widget>. ContextMenu::gtk_context_menu is retained, built on demand from the default gio::Application. A consumer that compiled against the gtk3 API compiles against this one unchanged at every call site; a gtk3 consumer process cannot link a gtk4 muda anyway, so no working program is broken by the type moves. The ksni tray integration and the fork-sync workflow from tauri-apps#341 are not included, per review feedback there. gtk4 is exposed under the existing `gtk` feature and dependency alias, so shared code and consumers see the same names. MSRV rises to 1.92 (gtk4-rs 0.11).
johncarmack1984
added a commit
to johncarmack1984/muda
that referenced
this pull request
Jul 3, 2026
Builds on the feat/gtk4 line (tauri-apps#272 by @amrbashir, continued in tauri-apps#341 by @rmakestrash-jpg), merged onto current dev and adapted to the current shared API: KeyAccelerator (with a Key-based to_gtk conversion), PredefinedMenuItemType, and predefined-item accelerators wired like the macOS backend. The public gtk API keeps every method name and signature shape. Only the gtk types follow the toolkit: gtk::Menu -> gtk::PopoverMenu, gtk::MenuBar -> gtk::PopoverMenuBar, and IsA<gtk::Container> bounds widen to IsA<gtk::Widget>. ContextMenu::gtk_context_menu is retained, built on demand from the default gio::Application. A consumer that compiled against the gtk3 API compiles against this one unchanged at every call site; a gtk3 consumer process cannot link a gtk4 muda anyway, so no working program is broken by the type moves. The ksni tray integration and the fork-sync workflow from tauri-apps#341 are not included, per review feedback there. gtk4 is exposed under the existing `gtk` feature and dependency alias, so shared code and consumers see the same names. MSRV rises to 1.92 (gtk4-rs 0.11).
johncarmack1984
added a commit
to johncarmack1984/muda
that referenced
this pull request
Jul 3, 2026
Builds on the feat/gtk4 line (tauri-apps#272, continued in tauri-apps#341), merged onto current dev and adapted to the current shared API: KeyAccelerator with a Key-based to_gtk conversion, PredefinedMenuItemType, and predefined-item accelerators wired like the macOS backend. The public gtk API keeps every method name and signature shape; only the widget types follow the toolkit (PopoverMenu, PopoverMenuBar, Widget bounds). ContextMenu::gtk_context_menu is retained, built on demand from the default gio::Application. Icon menu items render: gtk4's PopoverMenu ignores icons on model items, so icon items are marked with a custom attribute and a real icon+label widget is bound via add_child, reaching nested submenu slots. Context menus rebuild on show so label, icon, and checked-state changes are reflected. gtk4 is exposed under the existing gtk feature and dependency alias. MSRV rises to 1.92 (gtk4-rs 0.11). Co-authored-by: amrbashir <github@amrbashir.me> Co-authored-by: rmakestrash-jpg <rmakestrash-jpg@users.noreply.github.com>
johncarmack1984
added a commit
to johncarmack1984/muda
that referenced
this pull request
Jul 3, 2026
The gtk4 backend as inherited from the feat/gtk4 line (tauri-apps#272, continued in tauri-apps#341): PopoverMenuBar and gio::Menu based, with accelerators, checks, icons, context menus, and the about dialog. Co-authored-by: amrbashir <github@amrbashir.me> Co-authored-by: rmakestrash-jpg <rmakestrash-jpg@users.noreply.github.com>
johncarmack1984
added a commit
to johncarmack1984/muda
that referenced
this pull request
Jul 3, 2026
Builds on the feat/gtk4 line (tauri-apps#272 by @amrbashir, continued in tauri-apps#341 by @rmakestrash-jpg), merged onto current dev and adapted to the current shared API: KeyAccelerator (with a Key-based to_gtk conversion), PredefinedMenuItemType, and predefined-item accelerators wired like the macOS backend. The public gtk API keeps every method name and signature shape. Only the gtk types follow the toolkit: gtk::Menu -> gtk::PopoverMenu, gtk::MenuBar -> gtk::PopoverMenuBar, and IsA<gtk::Container> bounds widen to IsA<gtk::Widget>. ContextMenu::gtk_context_menu is retained, built on demand from the default gio::Application. A consumer that compiled against the gtk3 API compiles against this one unchanged at every call site; a gtk3 consumer process cannot link a gtk4 muda anyway, so no working program is broken by the type moves. The ksni tray integration and the fork-sync workflow from tauri-apps#341 are not included, per review feedback there. gtk4 is exposed under the existing `gtk` feature and dependency alias, so shared code and consumers see the same names. MSRV rises to 1.92 (gtk4-rs 0.11).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gtk4