mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
update actions
This commit is contained in:
parent
5065dd23d6
commit
d63ba8f1ad
11 changed files with 97 additions and 127 deletions
|
|
@ -124,21 +124,12 @@ void Tab::refresh(
|
|||
);
|
||||
}
|
||||
|
||||
void Tab::update(
|
||||
void Tab::page_update(
|
||||
const int & PAGE_NUMBER
|
||||
) {
|
||||
auto pageWidget = get_nth_page(
|
||||
get_tabPage(
|
||||
PAGE_NUMBER
|
||||
);
|
||||
|
||||
if (pageWidget == nullptr)
|
||||
{
|
||||
throw _("Tab page not found!");
|
||||
}
|
||||
|
||||
pageWidget->activate_action(
|
||||
"page.update"
|
||||
);
|
||||
)->update();
|
||||
}
|
||||
|
||||
// Private helpers
|
||||
|
|
|
|||
|
|
@ -40,6 +40,10 @@ namespace app::browser::main
|
|||
);
|
||||
|
||||
// Actions
|
||||
void refresh(
|
||||
const int & PAGE_NUMBER // @TODO
|
||||
);
|
||||
|
||||
void append(
|
||||
const Glib::ustring & TITLE,
|
||||
const Glib::ustring & REQUEST = "",
|
||||
|
|
@ -54,21 +58,17 @@ namespace app::browser::main
|
|||
void close_right();
|
||||
void close_all();
|
||||
|
||||
bool page_navigation_history_try_back(
|
||||
const int & PAGE_NUMBER
|
||||
);
|
||||
void page_update(
|
||||
const int & PAGE_NUMBER
|
||||
);
|
||||
|
||||
bool page_navigation_history_try_forward(
|
||||
const int & PAGE_NUMBER
|
||||
);
|
||||
bool page_navigation_history_try_back(
|
||||
const int & PAGE_NUMBER
|
||||
);
|
||||
|
||||
void refresh(
|
||||
const int & PAGE_NUMBER
|
||||
);
|
||||
|
||||
void update(
|
||||
const int & PAGE_NUMBER
|
||||
);
|
||||
bool page_navigation_history_try_forward(
|
||||
const int & PAGE_NUMBER
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,23 +15,6 @@ Page::Page(
|
|||
Gtk::Orientation::VERTICAL
|
||||
);
|
||||
|
||||
// Init actions group
|
||||
auto GioSimpleActionGroup = Gio::SimpleActionGroup::create();
|
||||
|
||||
// Define group actions
|
||||
GioSimpleActionGroup->add_action(
|
||||
"update",
|
||||
[this]
|
||||
{
|
||||
Page::update();
|
||||
}
|
||||
);
|
||||
|
||||
insert_action_group(
|
||||
"page",
|
||||
GioSimpleActionGroup
|
||||
);
|
||||
|
||||
// Init components
|
||||
pageNavigation = Gtk::make_managed<page::Navigation>(
|
||||
REQUEST
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include <giomm/asyncresult.h>
|
||||
#include <giomm/inputstream.h>
|
||||
#include <giomm/outputstream.h>
|
||||
#include <giomm/simpleactiongroup.h>
|
||||
#include <giomm/socketclient.h>
|
||||
#include <giomm/socketconnection.h>
|
||||
#include <glibmm/i18n.h>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ Request::Request(
|
|||
parse();
|
||||
|
||||
activate_action(
|
||||
"page.update"
|
||||
"win.main_tab_page_navigation_update"
|
||||
);
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using namespace app::browser::main::tab::page::navigation;
|
|||
Update::Update()
|
||||
{
|
||||
set_action_name(
|
||||
"page.update"
|
||||
"win.main_tab_page_navigation_update"
|
||||
);
|
||||
|
||||
set_icon_name(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue