Browse Source

change variable name

CPP-GTK4
yggverse 2 months ago
parent
commit
1c5d6669a5
  1. 60
      src/app/browser/header/menu.cpp

60
src/app/browser/header/menu.cpp

@ -27,133 +27,133 @@ Glib::RefPtr<Gio::Menu> Menu::main(
Glib::RefPtr<Gio::Menu> main_tab, Glib::RefPtr<Gio::Menu> main_tab,
Glib::RefPtr<Gio::Menu> main_tools Glib::RefPtr<Gio::Menu> main_tools
) { ) {
auto model = Gio::Menu::create(); auto menu = Gio::Menu::create();
model->append_submenu( menu->append_submenu(
_("Tab"), _("Tab"),
main_tab main_tab
); );
model->append_submenu( menu->append_submenu(
_("Tools"), _("Tools"),
main_tools main_tools
); );
model->append( menu->append(
_("Quit"), _("Quit"),
"app.quit" "app.quit"
); );
return model; return menu;
} }
Glib::RefPtr<Gio::Menu> Menu::main_tab( Glib::RefPtr<Gio::Menu> Menu::main_tab(
Glib::RefPtr<Gio::Menu> main_tab_page, Glib::RefPtr<Gio::Menu> main_tab_page,
Glib::RefPtr<Gio::Menu> main_tab_close Glib::RefPtr<Gio::Menu> main_tab_close
) { ) {
auto model = Gio::Menu::create(); auto menu = Gio::Menu::create();
model->append( menu->append(
_("New.."), _("New.."),
"win.main_tab_append" "win.main_tab_append"
); );
model->append_submenu( menu->append_submenu(
_("Page"), _("Page"),
main_tab_page main_tab_page
); );
model->append_submenu( menu->append_submenu(
_("Close"), _("Close"),
main_tab_close main_tab_close
); );
return model; return menu;
} }
Glib::RefPtr<Gio::Menu> Menu::main_tab_page( Glib::RefPtr<Gio::Menu> Menu::main_tab_page(
Glib::RefPtr<Gio::Menu> main_tab_page_navigation Glib::RefPtr<Gio::Menu> main_tab_page_navigation
) { ) {
auto model = Gio::Menu::create(); auto menu = Gio::Menu::create();
model->append_submenu( menu->append_submenu(
_("Navigation"), _("Navigation"),
main_tab_page_navigation main_tab_page_navigation
); );
return model; return menu;
} }
Glib::RefPtr<Gio::Menu> Menu::main_tab_page_navigation( Glib::RefPtr<Gio::Menu> Menu::main_tab_page_navigation(
Glib::RefPtr<Gio::Menu> main_tab_page_navigation_history Glib::RefPtr<Gio::Menu> main_tab_page_navigation_history
) { ) {
auto model = Gio::Menu::create(); auto menu = Gio::Menu::create();
model->append_submenu( menu->append_submenu(
_("History"), _("History"),
main_tab_page_navigation_history main_tab_page_navigation_history
); );
model->append( menu->append(
_("Update"), _("Update"),
"win.main_tab_page_update" "win.main_tab_page_update"
); );
return model; return menu;
} }
Glib::RefPtr<Gio::Menu> Menu::main_tab_page_navigation_history() Glib::RefPtr<Gio::Menu> Menu::main_tab_page_navigation_history()
{ {
auto model = Gio::Menu::create(); auto menu = Gio::Menu::create();
model->append( menu->append(
_("Back"), _("Back"),
"win.main_tab_page_navigation_history_try_back" "win.main_tab_page_navigation_history_try_back"
); );
model->append( menu->append(
_("Forward"), _("Forward"),
"win.main_tab_page_navigation_history_try_forward" "win.main_tab_page_navigation_history_try_forward"
); );
return model; return menu;
} }
Glib::RefPtr<Gio::Menu> Menu::main_tab_close() Glib::RefPtr<Gio::Menu> Menu::main_tab_close()
{ {
auto model = Gio::Menu::create(); auto menu = Gio::Menu::create();
model->append( menu->append(
_("Active tab"), _("Active tab"),
"win.main_tab_close" "win.main_tab_close"
); );
model->append( menu->append(
_("All tabs to left"), _("All tabs to left"),
"win.main_tab_close_left" "win.main_tab_close_left"
); );
model->append( menu->append(
_("All tabs to right"), _("All tabs to right"),
"win.main_tab_close_right" "win.main_tab_close_right"
); );
model->append( menu->append(
_("All tabs"), _("All tabs"),
"win.main_tab_close_all" "win.main_tab_close_all"
); );
return model; return menu;
} }
Glib::RefPtr<Gio::Menu> Menu::main_tools() Glib::RefPtr<Gio::Menu> Menu::main_tools()
{ {
auto model = Gio::Menu::create(); auto menu = Gio::Menu::create();
model->append( menu->append(
_("Debug"), _("Debug"),
"win.debug" "win.debug"
); );
return model; return menu;
} }
Loading…
Cancel
Save