[gnote] Remove quit action



commit 063d2edbf10af342bcdc99eb02b4b580770e3dac
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Nov 11 17:25:19 2018 +0200

    Remove quit action

 src/actionmanager.cpp |  2 --
 src/gnote.cpp         | 12 ------------
 src/gnote.hpp         |  3 +--
 3 files changed, 1 insertion(+), 16 deletions(-)
---
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index ff6e9b23..82939d62 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -103,7 +103,6 @@ namespace gnote {
     add_app_action("about");
     add_app_action("help-contents");
     add_app_action("help-shortcuts");
-    add_app_action("quit");
   }
 
   Glib::RefPtr<Gio::SimpleAction> ActionManager::get_app_action(const Glib::ustring & name) const
@@ -139,7 +138,6 @@ namespace gnote {
     add_app_menu_item(APP_ACTION_LAST, 100, _("_Shortcuts"), "app.help-shortcuts");
     add_app_menu_item(APP_ACTION_LAST, 150, _("_Help"), "app.help-contents");
     add_app_menu_item(APP_ACTION_LAST, 200, _("_About Gnote"), "app.about");
-    add_app_menu_item(APP_ACTION_LAST, 300, _("_Quit"), "app.quit");
   }
 
   Glib::RefPtr<Gio::Menu> ActionManager::get_app_menu() const
diff --git a/src/gnote.cpp b/src/gnote.cpp
index 3338271a..1095c4e2 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -230,17 +230,6 @@ namespace gnote {
   }
 
 
-  void Gnote::on_quit_gnote_action(const Glib::VariantBase&)
-  {
-    std::vector<Gtk::Window*> windows = Gtk::Window::list_toplevels();
-    FOREACH(Gtk::Window *window, windows) {
-      window->close();
-    }
-    if(is_background()) {
-      release();
-    }
-  }
-
   void Gnote::on_preferences_response(int /*res*/)
   {
     delete m_prefsdlg;
@@ -449,7 +438,6 @@ namespace gnote {
     am.get_app_action("help-contents")->signal_activate().connect(sigc::mem_fun(*this, 
&Gnote::on_show_help_action));
     am.get_app_action("help-shortcuts")->signal_activate().connect(sigc::mem_fun(*this, 
&Gnote::on_show_help_shortcust_action));
     am.get_app_action("about")->signal_activate().connect(sigc::mem_fun(*this, 
&Gnote::on_show_about_action));
-    am.get_app_action("quit")->signal_activate().connect(sigc::mem_fun(*this, &Gnote::on_quit_gnote_action));
 
     add_app_actions(static_cast<ActionManager &>(am).get_app_actions());
   }
diff --git a/src/gnote.hpp b/src/gnote.hpp
index bff5703f..0b707269 100644
--- a/src/gnote.hpp
+++ b/src/gnote.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2010-2017 Aurimas Cernius
+ * Copyright (C) 2010-2018 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -116,7 +116,6 @@ public:
       return *m_manager;
     }
 
-  void on_quit_gnote_action(const Glib::VariantBase&);
   void on_preferences_response(int res);
   void on_show_preferences_action(const Glib::VariantBase&);
   void on_show_help_action(const Glib::VariantBase&);


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