Browse Source

rename action namespace

CPP-GTK4
yggverse 3 months ago
parent
commit
a533e3aa7a
  1. 16
      src/app/browser.cpp
  2. 14
      src/app/browser/header/menu.cpp
  3. 2
      src/app/browser/header/menu.hpp
  4. 4
      src/app/browser/header/tab.cpp
  5. 2
      src/app/browser/header/tab.hpp
  6. 4
      src/main.cpp

16
src/app/browser.cpp

@ -34,7 +34,7 @@ Browser::Browser(
// Init actions // Init actions
add_action( add_action(
"tab_append", "main_tab_append",
[this] [this]
{ {
browserMain->tab_append(); browserMain->tab_append();
@ -42,7 +42,7 @@ Browser::Browser(
); );
add_action( add_action(
"tab_update", "main_tab_update",
[this] [this]
{ {
browserMain->tab_update(); browserMain->tab_update();
@ -51,7 +51,7 @@ Browser::Browser(
// Close // Close
add_action( add_action(
"tab_close", "main_tab_close",
[this] [this]
{ {
browserMain->tab_close(); browserMain->tab_close();
@ -60,7 +60,7 @@ Browser::Browser(
// Close submenu // Close submenu
add_action( add_action(
"tab_close_left", "main_tab_close_left",
[this] [this]
{ {
browserMain->tab_close_left(); browserMain->tab_close_left();
@ -68,7 +68,7 @@ Browser::Browser(
); );
add_action( add_action(
"tab_close_right", "main_tab_close_right",
[this] [this]
{ {
browserMain->tab_close_right(); browserMain->tab_close_right();
@ -76,7 +76,7 @@ Browser::Browser(
); );
add_action( add_action(
"tab_close_all", "main_tab_close_all",
[this] [this]
{ {
browserMain->tab_close_all(); browserMain->tab_close_all();
@ -113,7 +113,7 @@ Browser::Browser(
); );
add_action( add_action(
"tab_history_back", "tab_history_back", // @TODO rename
[this] [this]
{ {
browserMain->tab_history_back(); browserMain->tab_history_back();
@ -121,7 +121,7 @@ Browser::Browser(
); );
add_action( add_action(
"tab_history_forward", "tab_history_forward", // @TODO rename
[this] [this]
{ {
browserMain->tab_history_forward(); browserMain->tab_history_forward();

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

@ -14,12 +14,12 @@ Menu::Menu()
tab->append( tab->append(
_("New tab.."), _("New tab.."),
"win.tab_append" "win.main_tab_append"
); );
tab->append( tab->append(
_("Update"), _("Update"),
"win.tab_update" "win.main_tab_update"
); );
// Build tab close submenu model // Build tab close submenu model
@ -27,22 +27,22 @@ Menu::Menu()
tab_close->append( tab_close->append(
_("Active tab"), _("Active tab"),
"win.tab_close" "win.main_tab_close"
); );
tab_close->append( tab_close->append(
_("All tabs to left"), _("All tabs to left"),
"win.tab_close_left" "win.main_tab_close_left"
); );
tab_close->append( tab_close->append(
_("All tabs to right"), _("All tabs to right"),
"win.tab_close_right" "win.main_tab_close_right"
); );
tab_close->append( tab_close->append(
_("All tabs"), _("All tabs"),
"win.tab_close_all" "win.main_tab_close_all"
); );
tab->append_submenu( tab->append_submenu(
@ -81,5 +81,3 @@ Menu::Menu()
main main
); );
} }
Menu::~Menu() = default;

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

@ -17,8 +17,6 @@ namespace app::browser::header
public: public:
Menu(); Menu();
~Menu();
}; };
} }

4
src/app/browser/header/tab.cpp

@ -5,7 +5,7 @@ using namespace app::browser::header;
Tab::Tab() Tab::Tab()
{ {
set_action_name( set_action_name(
"win.tab_append" "win.main_tab_append"
); );
set_icon_name( set_icon_name(
@ -16,5 +16,3 @@ Tab::Tab()
_("New tab") _("New tab")
); );
} }
Tab::~Tab() = default;

2
src/app/browser/header/tab.hpp

@ -11,8 +11,6 @@ namespace app::browser::header
public: public:
Tab(); Tab();
~Tab();
}; };
} }

4
src/main.cpp

@ -28,12 +28,12 @@ int main(
// Init accels @TODO db settings // Init accels @TODO db settings
app->set_accel_for_action( app->set_accel_for_action(
"win.tab_append", "win.main_tab_append",
"<Primary>t" "<Primary>t"
); );
app->set_accel_for_action( app->set_accel_for_action(
"win.tab_update", "win.main_tab_update",
"<Primary>r" "<Primary>r"
); );

Loading…
Cancel
Save