From a533e3aa7a86e6c291697601df8da5817c777c45 Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 4 Sep 2024 23:29:01 +0300 Subject: [PATCH] rename action namespace --- src/app/browser.cpp | 16 ++++++++-------- src/app/browser/header/menu.cpp | 16 +++++++--------- src/app/browser/header/menu.hpp | 2 -- src/app/browser/header/tab.cpp | 6 ++---- src/app/browser/header/tab.hpp | 2 -- src/main.cpp | 4 ++-- 6 files changed, 19 insertions(+), 27 deletions(-) diff --git a/src/app/browser.cpp b/src/app/browser.cpp index 362ee4c6..4f4f4e58 100644 --- a/src/app/browser.cpp +++ b/src/app/browser.cpp @@ -34,7 +34,7 @@ Browser::Browser( // Init actions add_action( - "tab_append", + "main_tab_append", [this] { browserMain->tab_append(); @@ -42,7 +42,7 @@ Browser::Browser( ); add_action( - "tab_update", + "main_tab_update", [this] { browserMain->tab_update(); @@ -51,7 +51,7 @@ Browser::Browser( // Close add_action( - "tab_close", + "main_tab_close", [this] { browserMain->tab_close(); @@ -60,7 +60,7 @@ Browser::Browser( // Close submenu add_action( - "tab_close_left", + "main_tab_close_left", [this] { browserMain->tab_close_left(); @@ -68,7 +68,7 @@ Browser::Browser( ); add_action( - "tab_close_right", + "main_tab_close_right", [this] { browserMain->tab_close_right(); @@ -76,7 +76,7 @@ Browser::Browser( ); add_action( - "tab_close_all", + "main_tab_close_all", [this] { browserMain->tab_close_all(); @@ -113,7 +113,7 @@ Browser::Browser( ); add_action( - "tab_history_back", + "tab_history_back", // @TODO rename [this] { browserMain->tab_history_back(); @@ -121,7 +121,7 @@ Browser::Browser( ); add_action( - "tab_history_forward", + "tab_history_forward", // @TODO rename [this] { browserMain->tab_history_forward(); diff --git a/src/app/browser/header/menu.cpp b/src/app/browser/header/menu.cpp index d2b54f81..6f32b273 100644 --- a/src/app/browser/header/menu.cpp +++ b/src/app/browser/header/menu.cpp @@ -14,12 +14,12 @@ Menu::Menu() tab->append( _("New tab.."), - "win.tab_append" + "win.main_tab_append" ); tab->append( _("Update"), - "win.tab_update" + "win.main_tab_update" ); // Build tab close submenu model @@ -27,22 +27,22 @@ Menu::Menu() tab_close->append( _("Active tab"), - "win.tab_close" + "win.main_tab_close" ); tab_close->append( _("All tabs to left"), - "win.tab_close_left" + "win.main_tab_close_left" ); tab_close->append( _("All tabs to right"), - "win.tab_close_right" + "win.main_tab_close_right" ); tab_close->append( _("All tabs"), - "win.tab_close_all" + "win.main_tab_close_all" ); tab->append_submenu( @@ -80,6 +80,4 @@ Menu::Menu() set_menu_model( main ); -} - -Menu::~Menu() = default; \ No newline at end of file +} \ No newline at end of file diff --git a/src/app/browser/header/menu.hpp b/src/app/browser/header/menu.hpp index 5d984bd2..f60e6b89 100644 --- a/src/app/browser/header/menu.hpp +++ b/src/app/browser/header/menu.hpp @@ -17,8 +17,6 @@ namespace app::browser::header public: Menu(); - - ~Menu(); }; } diff --git a/src/app/browser/header/tab.cpp b/src/app/browser/header/tab.cpp index 5136672e..8bdf2aa9 100644 --- a/src/app/browser/header/tab.cpp +++ b/src/app/browser/header/tab.cpp @@ -5,7 +5,7 @@ using namespace app::browser::header; Tab::Tab() { set_action_name( - "win.tab_append" + "win.main_tab_append" ); set_icon_name( @@ -15,6 +15,4 @@ Tab::Tab() set_tooltip_text( _("New tab") ); -} - -Tab::~Tab() = default; \ No newline at end of file +} \ No newline at end of file diff --git a/src/app/browser/header/tab.hpp b/src/app/browser/header/tab.hpp index c1d61f31..a2d1d0e3 100644 --- a/src/app/browser/header/tab.hpp +++ b/src/app/browser/header/tab.hpp @@ -11,8 +11,6 @@ namespace app::browser::header public: Tab(); - - ~Tab(); }; } diff --git a/src/main.cpp b/src/main.cpp index 1dade241..686b1ffe 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,12 +28,12 @@ int main( // Init accels @TODO db settings app->set_accel_for_action( - "win.tab_append", + "win.main_tab_append", "t" ); app->set_accel_for_action( - "win.tab_update", + "win.main_tab_update", "r" );