62 lines
1023 B
C++
Raw Normal View History

#include "menu.hpp"
using namespace app::browser::header;
Menu::Menu()
{
2024-08-12 18:12:01 +03:00
// Set widget defaults
set_tooltip_text(
TOOLTIP
);
2024-08-12 18:12:01 +03:00
// Build tab submenu model
2024-08-12 09:45:22 +03:00
tab = Gio::Menu::create();
2024-08-12 18:12:01 +03:00
tab->append(
_("New tab.."),
"win.tab_append"
);
tab->append(
_("Close active"),
"win.tab_close"
);
2024-08-12 18:12:01 +03:00
tab->append(
_("Close all"),
"win.tab_close_all"
);
// Build tool submenu model
2024-08-12 09:45:22 +03:00
tool = Gio::Menu::create();
2024-08-12 18:12:01 +03:00
tool->append(
_("Debug"),
"win.debug"
);
2024-08-12 18:12:01 +03:00
// Build main menu model
2024-08-12 09:45:22 +03:00
main = Gio::Menu::create();
2024-08-12 18:12:01 +03:00
main->append_submenu(
_("Tab"),
tab
);
2024-08-12 18:12:01 +03:00
main->append_submenu(
_("Tool"),
tool
);
2024-08-12 18:12:01 +03:00
main->append(
_("Quit"),
"app.quit"
);
2024-08-12 18:12:01 +03:00
// Apply model
set_menu_model(
main
);
2024-08-12 09:45:22 +03:00
}
Menu::~Menu() = default;