From 03764ce599014a1c0714714552a53c161dabede7 Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 14 Aug 2024 07:11:24 +0300 Subject: [PATCH] fix tab update level --- src/app/browser.cpp | 13 +++++++++++++ src/app/browser.hpp | 1 + src/app/browser/header/menu.cpp | 2 +- src/app/browser/main.cpp | 5 +++++ src/app/browser/main.hpp | 3 +-- src/app/browser/main/tab/data/navbar/update.cpp | 2 +- src/main.cpp | 2 +- 7 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/app/browser.cpp b/src/app/browser.cpp index 7c9ec125..6ad78eed 100644 --- a/src/app/browser.cpp +++ b/src/app/browser.cpp @@ -41,6 +41,14 @@ Browser::Browser( ) ); + add_action( + "tab_update", + sigc::mem_fun( + *this, + &Browser::main_tab_update + ) + ); + // Close add_action( "tab_close", @@ -101,6 +109,11 @@ void Browser::main_tab_append() main->tab_append(); }; +void Browser::main_tab_update() +{ + main->tab_update(); +}; + void Browser::main_tab_close() { main->tab_close(); diff --git a/src/app/browser.hpp b/src/app/browser.hpp index 4b755593..c630d02e 100644 --- a/src/app/browser.hpp +++ b/src/app/browser.hpp @@ -34,6 +34,7 @@ namespace app ~Browser(); void main_tab_append(); + void main_tab_update(); void main_tab_close(); void main_tab_close_left(); diff --git a/src/app/browser/header/menu.cpp b/src/app/browser/header/menu.cpp index fe95161b..d2b54f81 100644 --- a/src/app/browser/header/menu.cpp +++ b/src/app/browser/header/menu.cpp @@ -19,7 +19,7 @@ Menu::Menu() tab->append( _("Update"), - "tab.update" + "win.tab_update" ); // Build tab close submenu model diff --git a/src/app/browser/main.cpp b/src/app/browser/main.cpp index f47e2fb8..f49eb6bc 100644 --- a/src/app/browser/main.cpp +++ b/src/app/browser/main.cpp @@ -42,6 +42,11 @@ void Main::tab_append() ); }; +void Main::tab_update() +{ + tab->update(); +}; + void Main::tab_close() { tab->close( diff --git a/src/app/browser/main.hpp b/src/app/browser/main.hpp index 36c8c0f1..d4d4e0bf 100644 --- a/src/app/browser/main.hpp +++ b/src/app/browser/main.hpp @@ -19,11 +19,10 @@ namespace app::browser public: Main(); - ~Main(); void tab_append(); - + void tab_update(); void tab_close(); void tab_close_left(); void tab_close_right(); diff --git a/src/app/browser/main/tab/data/navbar/update.cpp b/src/app/browser/main/tab/data/navbar/update.cpp index 3e3849a7..2841295d 100644 --- a/src/app/browser/main/tab/data/navbar/update.cpp +++ b/src/app/browser/main/tab/data/navbar/update.cpp @@ -5,7 +5,7 @@ using namespace app::browser::main::tab::data::navbar; Update::Update() { set_action_name( - "tab.update" + "win.tab_update" ); set_icon_name( diff --git a/src/main.cpp b/src/main.cpp index 8ccd1c92..d5d5cae4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,7 +33,7 @@ int main( ); app->set_accel_for_action( - "tab.update", + "win.tab_update", "r" );