[gnote/tabbed: 16/19] Register actions at a proper place
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote/tabbed: 16/19] Register actions at a proper place
- Date: Tue, 2 Nov 2021 14:34:34 +0000 (UTC)
commit 29ca8077a2d6411804bc4558e885d6f78ecda218
Author: Aurimas Černius <aurisc4 gmail com>
Date: Tue Nov 2 13:55:20 2021 +0200
Register actions at a proper place
src/recentchanges.cpp | 48 ++++++++++++++++++++++++------------------------
1 file changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/src/recentchanges.cpp b/src/recentchanges.cpp
index 11d4882c..70dbc566 100644
--- a/src/recentchanges.cpp
+++ b/src/recentchanges.cpp
@@ -113,8 +113,32 @@ namespace gnote {
set_default_size(450,400);
}
+ set_title(_("Gnote"));
set_icon_name(IconManager::GNOTE);
+ std::map<Glib::ustring, const Glib::VariantType*> actions = g.action_manager().get_main_window_actions();
+ for(std::map<Glib::ustring, const Glib::VariantType*>::iterator iter = actions.begin();
+ iter != actions.end(); ++iter) {
+ MainWindowAction::Ptr action;
+ if(iter->second == NULL) {
+ add_action(action = MainWindowAction::create(iter->first));
+ }
+ else if(iter->second == &Glib::Variant<bool>::variant_type()) {
+ add_action(action = MainWindowAction::create(iter->first, false));
+ }
+ else if(iter->second == &Glib::Variant<gint32>::variant_type()) {
+ add_action(action = MainWindowAction::create(iter->first, 0));
+ }
+ else if(iter->second == &Glib::Variant<Glib::ustring>::variant_type()) {
+ add_action(action = MainWindowAction::create(iter->first, Glib::ustring("")));
+ }
+ if(action) {
+ action->is_modifying(g.action_manager().is_modifying_main_window_action(iter->first));
+ }
+ }
+ find_action("close-window")->signal_activate()
+ .connect(sigc::mem_fun(*this, &NoteRecentChanges::on_close_window));
+
m_search_notes_widget = new SearchNotesWidget(g, m);
m_search_notes_widget->signal_open_note
.connect(sigc::mem_fun(*this, &NoteRecentChanges::on_open_note));
@@ -152,30 +176,6 @@ namespace gnote {
GDK_KEY_W, Gdk::CONTROL_MASK, (Gtk::AccelFlags)0);
m_keybinder.add_accelerator(sigc::mem_fun(*this, &NoteRecentChanges::close_window),
GDK_KEY_Q, Gdk::CONTROL_MASK, (Gtk::AccelFlags)0);
-
- std::map<Glib::ustring, const Glib::VariantType*> actions = g.action_manager().get_main_window_actions();
- for(std::map<Glib::ustring, const Glib::VariantType*>::iterator iter = actions.begin();
- iter != actions.end(); ++iter) {
- MainWindowAction::Ptr action;
- if(iter->second == NULL) {
- add_action(action = MainWindowAction::create(iter->first));
- }
- else if(iter->second == &Glib::Variant<bool>::variant_type()) {
- add_action(action = MainWindowAction::create(iter->first, false));
- }
- else if(iter->second == &Glib::Variant<gint32>::variant_type()) {
- add_action(action = MainWindowAction::create(iter->first, 0));
- }
- else if(iter->second == &Glib::Variant<Glib::ustring>::variant_type()) {
- add_action(action = MainWindowAction::create(iter->first, Glib::ustring("")));
- }
- if(action) {
- action->is_modifying(g.action_manager().is_modifying_main_window_action(iter->first));
- }
- }
- find_action("close-window")->signal_activate()
- .connect(sigc::mem_fun(*this, &NoteRecentChanges::on_close_window));
- set_title(_("Gnote"));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]