Browse Source

implement tab close options as submenu

CPP-GTK4
yggverse 3 months ago
parent
commit
e12e8c2b7b
  1. 26
      src/app/browser/header/menu.cpp
  2. 1
      src/app/browser/header/menu.hpp

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

@ -17,16 +17,34 @@ Menu::Menu() @@ -17,16 +17,34 @@ Menu::Menu()
"win.tab_append"
);
tab->append(
_("Close active"),
// Build tab close submenu model
tab_close = Gio::Menu::create();
tab_close->append(
_("Active tab"),
"win.tab_close"
);
tab->append(
_("Close all"),
tab_close->append(
_("Tabs to left"),
"win.tab_close_left"
);
tab_close->append(
_("Tabs to right"),
"win.tab_close_right"
);
tab_close->append(
_("All tabs"),
"win.tab_close_all"
);
tab->append_submenu(
_("Close"),
tab_close
);
// Build tool submenu model
tool = Gio::Menu::create();

1
src/app/browser/header/menu.hpp

@ -12,6 +12,7 @@ namespace app::browser::header @@ -12,6 +12,7 @@ namespace app::browser::header
private:
Glib::RefPtr<Gio::Menu> tab,
tab_close,
tool,
main;

Loading…
Cancel
Save