create tab page submenu

This commit is contained in:
yggverse 2024-09-05 03:11:10 +03:00
parent c77bfbbc7b
commit c0b7e9e969
4 changed files with 14 additions and 5 deletions

View File

@ -42,7 +42,7 @@ Browser::Browser(
); );
add_action( add_action(
"main_tab_update", "main_tab_page_update",
[this] [this]
{ {
browserMain->tab_update(); browserMain->tab_update();

View File

@ -17,9 +17,17 @@ Menu::Menu()
"win.main_tab_append" "win.main_tab_append"
); );
tab->append( // Build tab page submenu model
_("Update"), tab_page = Gio::Menu::create();
"win.main_tab_update"
tab_page->append(
_("Update"),
"win.main_tab_page_update"
);
tab->append_submenu(
_("Page"),
tab_page
); );
// Build tab close submenu model // Build tab close submenu model

View File

@ -10,6 +10,7 @@ namespace app::browser::header
class Menu : public Gtk::MenuButton class Menu : public Gtk::MenuButton
{ {
Glib::RefPtr<Gio::Menu> tab, Glib::RefPtr<Gio::Menu> tab,
tab_page,
tab_close, tab_close,
tool, tool,
main; main;

View File

@ -33,7 +33,7 @@ int main(
); );
app->set_accel_for_action( app->set_accel_for_action(
"win.main_tab_update", "win.main_tab_page_update",
"<Primary>r" "<Primary>r"
); );