mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:12:45 +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:
		
							parent
							
								
									3a71c018bf
								
							
						
					
					
						commit
						74be54cce8
					
				
					 5 changed files with 77 additions and 20 deletions
				
			
		|  | @ -1,6 +1,7 @@ | |||
| #include "WSMenuItem.h" | ||||
| #include "WSClientConnection.h" | ||||
| #include "WSMenu.h" | ||||
| #include "WSWindowManager.h" | ||||
| #include <LibDraw/GraphicsBitmap.h> | ||||
| 
 | ||||
| WSMenuItem::WSMenuItem(WSMenu& menu, unsigned identifier, const String& text, const String& shortcut_text, bool enabled, bool checkable, bool checked, const GraphicsBitmap* icon) | ||||
|  | @ -45,6 +46,7 @@ void WSMenuItem::set_checked(bool checked) | |||
| WSMenu* WSMenuItem::submenu() | ||||
| { | ||||
|     ASSERT(is_submenu()); | ||||
|     ASSERT(m_menu.client()); | ||||
|     return m_menu.client()->find_menu_by_id(m_submenu_id); | ||||
|     if (m_menu.client()) | ||||
|         return m_menu.client()->find_menu_by_id(m_submenu_id); | ||||
|     return WSWindowManager::the().find_internal_menu_by_id(m_submenu_id); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling