mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
LibGUI: Make GAction scoped to its CObject parent (widget or window)
Unparented GActions are still parented to the application like before, making them globally available. This makes it possible to have actions that work whenever a specific window is active, no matter which widget is currently focused. :^)
This commit is contained in:
parent
6ab9dc4ff4
commit
5b47b0d867
8 changed files with 130 additions and 109 deletions
|
@ -241,9 +241,6 @@ public:
|
|||
|
||||
GAction* action_for_key_event(const GKeyEvent&);
|
||||
|
||||
void register_local_shortcut_action(Badge<GAction>, GAction&);
|
||||
void unregister_local_shortcut_action(Badge<GAction>, GAction&);
|
||||
|
||||
template<typename Callback>
|
||||
void for_each_child_widget(Callback callback)
|
||||
{
|
||||
|
@ -325,8 +322,6 @@ private:
|
|||
bool m_layout_dirty { false };
|
||||
bool m_updates_enabled { true };
|
||||
|
||||
HashMap<GShortcut, GAction*> m_local_shortcut_actions;
|
||||
|
||||
NonnullRefPtr<PaletteImpl> m_palette;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue