rename action namespace

This commit is contained in:
yggverse 2024-09-04 23:29:01 +03:00
parent 57f43e2dd9
commit a533e3aa7a
6 changed files with 19 additions and 27 deletions

View File

@ -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();

View File

@ -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;
}

View File

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

View File

@ -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;
}

View File

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

View File

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