[gnote] Fix new note tray action



commit aed066e1d77990705795004ccc1c6889badf8c75
Author: Aurimas Äernius <aurisc4 gmail com>
Date:   Sat Oct 20 00:10:10 2012 +0300

    Fix new note tray action

 src/gnote.cpp |   20 +-------------------
 src/gnote.hpp |    1 -
 2 files changed, 1 insertions(+), 20 deletions(-)
---
diff --git a/src/gnote.cpp b/src/gnote.cpp
index d156e98..2c19ad8 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -287,29 +287,11 @@ namespace gnote {
     am["ShowAboutAction"]->signal_activate()
       .connect(boost::bind(sigc::mem_fun(*this, &Gnote::on_show_about_action), Glib::VariantBase()));
     am["TrayNewNoteAction"]->signal_activate()
-      .connect(sigc::mem_fun(*this, &Gnote::on_new_note_action));
+      .connect(boost::bind(sigc::mem_fun(*this, &Gnote::on_new_note_app_action), Glib::VariantBase()));
     am["ShowSearchAllNotesAction"]->signal_activate()
       .connect(sigc::mem_fun(*this, &Gnote::open_search_all));
   }
 
-  void Gnote::on_new_note_action()
-  {
-    try {
-      Note::Ptr new_note = default_note_manager().create();
-      new_note->get_window()->show();
-    }
-    catch(const std::exception & e) 
-    {
-      utils::HIGMessageDialog dialog (
-        NULL,  (GtkDialogFlags)0,
-        Gtk::MESSAGE_ERROR,
-        Gtk::BUTTONS_OK,
-        _("Cannot create new note"),
-        e.what());
-      dialog.run ();
-    }    
-  }
-
   void Gnote::on_quit_gnote_action(const Glib::VariantBase&)
   {
     quit();
diff --git a/src/gnote.hpp b/src/gnote.hpp
index 00bc18e..b932392 100644
--- a/src/gnote.hpp
+++ b/src/gnote.hpp
@@ -126,7 +126,6 @@ public:
   void setup_global_actions();
   void start_tray_icon();
 
-  void on_new_note_action();
   void on_quit_gnote_action(const Glib::VariantBase&);
   void on_preferences_response(int res);
   void on_show_preferences_action(const Glib::VariantBase&);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]