mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
rename update button and action to reload
This commit is contained in:
parent
c44c278c33
commit
1df58f17de
17 changed files with 63 additions and 63 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#include "navigation/bookmark.hpp"
|
||||
#include "navigation/history.hpp"
|
||||
#include "navigation/request.hpp"
|
||||
#include "navigation/update.hpp"
|
||||
#include "navigation/reload.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::page;
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ Navigation::Navigation(
|
|||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__REFRESH,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__NAVIGATION_HISTORY_BACK,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__NAVIGATION_HISTORY_FORWARD,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__NAVIGATION_UPDATE
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__NAVIGATION_RELOAD
|
||||
) {
|
||||
// Init database
|
||||
DB::SESSION::init(
|
||||
|
|
@ -60,18 +60,18 @@ Navigation::Navigation(
|
|||
* navigationHistory
|
||||
);
|
||||
|
||||
navigationUpdate = Gtk::make_managed<navigation::Update>(
|
||||
ACTION__NAVIGATION_UPDATE
|
||||
navigationReload = Gtk::make_managed<navigation::Reload>(
|
||||
ACTION__NAVIGATION_RELOAD
|
||||
);
|
||||
|
||||
append(
|
||||
* navigationUpdate
|
||||
* navigationReload
|
||||
);
|
||||
|
||||
navigationRequest = Gtk::make_managed<navigation::Request>(
|
||||
db,
|
||||
ACTION__REFRESH,
|
||||
ACTION__NAVIGATION_UPDATE
|
||||
ACTION__NAVIGATION_RELOAD
|
||||
);
|
||||
|
||||
append(
|
||||
|
|
@ -98,7 +98,7 @@ void Navigation::update(
|
|||
navigationHistory->update();
|
||||
|
||||
// Toggle update button sensibility
|
||||
navigationUpdate->update(
|
||||
navigationReload->update(
|
||||
navigationRequest->get_text_length() > 0
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace app::browser::main::tab::page
|
|||
class Base;
|
||||
class Bookmark;
|
||||
class History;
|
||||
class Update;
|
||||
class Reload;
|
||||
class Request;
|
||||
}
|
||||
|
||||
|
|
@ -68,8 +68,8 @@ namespace app::browser::main::tab::page
|
|||
navigation::Base * navigationBase;
|
||||
navigation::Bookmark * navigationBookmark;
|
||||
navigation::History * navigationHistory;
|
||||
navigation::Reload * navigationReload;
|
||||
navigation::Request * navigationRequest;
|
||||
navigation::Update * navigationUpdate;
|
||||
|
||||
// Defaults
|
||||
const int SPACING = 8;
|
||||
|
|
@ -85,7 +85,7 @@ namespace app::browser::main::tab::page
|
|||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__REFRESH,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__NAVIGATION_HISTORY_BACK,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__NAVIGATION_HISTORY_FORWARD,
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__NAVIGATION_UPDATE
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__NAVIGATION_RELOAD
|
||||
);
|
||||
|
||||
// Actions
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
#include "update.hpp"
|
||||
#include "reload.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::page::navigation;
|
||||
|
||||
Update::Update(
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__UPDATE
|
||||
Reload::Reload(
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__RELOAD
|
||||
) {
|
||||
// Init actions
|
||||
action__update = ACTION__UPDATE;
|
||||
action__reload = ACTION__RELOAD;
|
||||
|
||||
// Init widget
|
||||
set_icon_name(
|
||||
|
|
@ -14,7 +14,7 @@ Update::Update(
|
|||
);
|
||||
|
||||
set_tooltip_text(
|
||||
_("Update")
|
||||
_("Reload")
|
||||
);
|
||||
|
||||
set_sensitive(
|
||||
|
|
@ -24,19 +24,19 @@ Update::Update(
|
|||
signal_clicked().connect(
|
||||
[this]
|
||||
{
|
||||
action__update->activate();
|
||||
action__reload->activate();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void Update::update(
|
||||
void Reload::update(
|
||||
const bool & ENABLED
|
||||
) {
|
||||
set_sensitive(
|
||||
ENABLED
|
||||
);
|
||||
|
||||
action__update->set_enabled(
|
||||
action__reload->set_enabled(
|
||||
ENABLED
|
||||
);
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_UPDATE_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_UPDATE_HPP
|
||||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_RELOAD_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_RELOAD_HPP
|
||||
|
||||
#include <giomm/simpleaction.h>
|
||||
#include <glibmm/i18n.h>
|
||||
|
|
@ -8,14 +8,14 @@
|
|||
|
||||
namespace app::browser::main::tab::page::navigation
|
||||
{
|
||||
class Update : public Gtk::Button
|
||||
class Reload : public Gtk::Button
|
||||
{
|
||||
Glib::RefPtr<Gio::SimpleAction> action__update;
|
||||
Glib::RefPtr<Gio::SimpleAction> action__reload;
|
||||
|
||||
public:
|
||||
|
||||
Update(
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__UPDATE
|
||||
Reload(
|
||||
const Glib::RefPtr<Gio::SimpleAction> & ACTION__RELOAD
|
||||
);
|
||||
|
||||
void update(
|
||||
|
|
@ -24,4 +24,4 @@ namespace app::browser::main::tab::page::navigation
|
|||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_UPDATE_HPP
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_RELOAD_HPP
|
||||
Loading…
Add table
Add a link
Reference in a new issue