[gnote] Add app menu item for preferences
- From: Aurimas Äernius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Add app menu item for preferences
- Date: Sat, 13 Oct 2012 19:44:09 +0000 (UTC)
commit 99824d3fb7879f19f9555004871e42e0c3790de0
Author: Aurimas Äernius <aurisc4 gmail com>
Date: Sat Oct 13 22:41:10 2012 +0300
Add app menu item for preferences
src/actionmanager.cpp | 2 ++
src/gnote.cpp | 8 +++++---
src/gnote.hpp | 2 +-
3 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index 364e3bf..f57fca6 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -266,6 +266,7 @@ namespace gnote {
{
add_app_action("new-note");
add_app_action("new-window");
+ add_app_action("show-preferences");
add_app_action("about");
add_app_action("help-contents");
add_app_action("quit");
@@ -298,6 +299,7 @@ namespace gnote {
{
add_app_menu_item(APP_ACTION_NEW, 100, _("_New Note"), "app.new-note");
add_app_menu_item(APP_ACTION_NEW, 200, _("New _Window"), "app.new-window");
+ add_app_menu_item(APP_ACTION_MANAGE, 100, _("_Preferences"), "app.show-preferences");
add_app_menu_item(APP_ACTION_HELP, 100, _("Help _Contents"), "app.help-contents");
add_app_menu_item(APP_ACTION_HELP, 200, _("_About"), "app.about");
add_app_menu_item(APP_ACTION_LAST, 100, _("_Quit"), "app.quit");
diff --git a/src/gnote.cpp b/src/gnote.cpp
index b6668fc..dc98548 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -284,8 +284,8 @@ namespace gnote {
#endif
am["QuitGNoteAction"]->signal_activate()
.connect(sigc::mem_fun(*this, &Gnote::quit));
- am["ShowPreferencesAction"]->signal_activate()
- .connect(sigc::mem_fun(*this, &Gnote::on_show_preferences_action));
+ am["ShowPreferencesAction"]->signal_activate().connect(
+ boost::bind(sigc::mem_fun(*this, &Gnote::on_show_preferences_action), Glib::VariantBase()));
am["ShowHelpAction"]->signal_activate()
.connect(boost::bind(sigc::mem_fun(*this, &Gnote::on_show_help_action), Glib::VariantBase()));
am["ShowAboutAction"]->signal_activate()
@@ -326,7 +326,7 @@ namespace gnote {
}
- void Gnote::on_show_preferences_action()
+ void Gnote::on_show_preferences_action(const Glib::VariantBase&)
{
if(!m_prefsdlg) {
m_prefsdlg = new PreferencesDialog(m_manager->get_addin_manager());
@@ -477,6 +477,8 @@ namespace gnote {
ActionManager & am(ActionManager::obj());
am.get_app_action("new-note")->signal_activate().connect(sigc::mem_fun(*this, &Gnote::on_new_note_app_action));
am.get_app_action("new-window")->signal_activate().connect(sigc::mem_fun(*this, &Gnote::on_new_window_action));
+ am.get_app_action("show-preferences")->signal_activate().connect(
+ sigc::mem_fun(*this, &Gnote::on_show_preferences_action));
am.get_app_action("sync-notes")->signal_activate().connect(sigc::mem_fun(*this, &Gnote::open_note_sync_window));
am.get_app_action("help-contents")->signal_activate().connect(sigc::mem_fun(*this, &Gnote::on_show_help_action));
am.get_app_action("about")->signal_activate().connect(sigc::mem_fun(*this, &Gnote::on_show_about_action));
diff --git a/src/gnote.hpp b/src/gnote.hpp
index 08d4de1..2d205c6 100644
--- a/src/gnote.hpp
+++ b/src/gnote.hpp
@@ -129,7 +129,7 @@ public:
void on_new_note_action();
void on_quit_gnote_action(const Glib::VariantBase&);
void on_preferences_response(int res);
- void on_show_preferences_action();
+ void on_show_preferences_action(const Glib::VariantBase&);
void on_show_help_action(const Glib::VariantBase&);
void on_show_about_action(const Glib::VariantBase&);
NoteRecentChanges::Ptr new_main_window();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]