mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
SystemMenu: Silence debug spam on startup
This commit is contained in:
parent
28f1486627
commit
21c78e2fc3
1 changed files with 4 additions and 0 deletions
|
@ -40,6 +40,8 @@
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
//#define SYSTEM_MENU_DEBUG
|
||||||
|
|
||||||
struct AppMetadata {
|
struct AppMetadata {
|
||||||
String executable;
|
String executable;
|
||||||
String name;
|
String name;
|
||||||
|
@ -136,8 +138,10 @@ NonnullRefPtr<GUI::Menu> build_system_menu()
|
||||||
if (!app.icon_path.is_empty())
|
if (!app.icon_path.is_empty())
|
||||||
icon = Gfx::Bitmap::load_from_file(app.icon_path);
|
icon = Gfx::Bitmap::load_from_file(app.icon_path);
|
||||||
|
|
||||||
|
#ifdef SYSTEM_MENU_DEBUG
|
||||||
if (icon)
|
if (icon)
|
||||||
dbg() << "App " << app.name << " has icon with size " << icon->size();
|
dbg() << "App " << app.name << " has icon with size " << icon->size();
|
||||||
|
#endif
|
||||||
|
|
||||||
auto parent_menu = g_app_category_menus.get(app.category).value_or(*system_menu);
|
auto parent_menu = g_app_category_menus.get(app.category).value_or(*system_menu);
|
||||||
parent_menu->add_action(GUI::Action::create(app.name, icon.ptr(), [app_identifier](auto&) {
|
parent_menu->add_action(GUI::Action::create(app.name, icon.ptr(), [app_identifier](auto&) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue