1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:27:35 +00:00

WindowServer: Organize system menu app shortcuts into categories

If the .af file for an app contains the App/Category key, we'll now put
it in a submenu of the system menu, together with all the other apps in
that same category. This is pretty neat! :^)
This commit is contained in:
Andreas Kling 2019-11-11 10:43:03 +01:00
parent 3a71c018bf
commit 74be54cce8
5 changed files with 77 additions and 20 deletions

View file

@ -148,6 +148,8 @@ public:
m_current_menubar->for_each_menu(callback);
}
WSMenu* find_internal_menu_by_id(int);
private:
NonnullRefPtr<WSCursor> get_cursor(const String& name);
NonnullRefPtr<WSCursor> get_cursor(const String& name, const Point& hotspot);
@ -262,6 +264,8 @@ private:
WeakPtr<WSButton> m_hovered_button;
RefPtr<CConfigFile> m_wm_config;
HashMap<String, NonnullRefPtr<WSMenu>> m_app_category_menus;
};
template<typename Callback>