[gnote] Use Gnote::signal_quit in tray



commit 2a90d0aa55d9be4f0671c1519040d328c938b619
Author: Aurimas Ä?ernius <aurisc4 gmail com>
Date:   Sun May 15 22:15:46 2011 +0300

    Use Gnote::signal_quit in tray
    
    Gtk::Main::signal_quit is not available in Gtkmm 3.

 src/tray.cpp |    5 ++---
 src/tray.hpp |    4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/tray.cpp b/src/tray.cpp
index 371e690..47719db 100644
--- a/src/tray.cpp
+++ b/src/tray.cpp
@@ -404,7 +404,7 @@ namespace gnote {
     gtk_status_icon_set_tooltip_text(gobj(), 
                                      tray_util_get_tooltip_text().c_str());
 
-    Gtk::Main::signal_quit().connect(sigc::mem_fun(*this, &TrayIcon::on_exit), 1);
+    Gnote::obj().signal_quit.connect(sigc::mem_fun(*this, &TrayIcon::on_exit));
     signal_activate().connect(sigc::mem_fun(*this, &TrayIcon::on_activate));
     signal_popup_menu().connect(sigc::mem_fun(*this, &TrayIcon::on_popup_menu));
   }
@@ -506,10 +506,9 @@ namespace gnote {
     ActionManager::obj()["QuitGNoteAction"]->activate();
   }
 
-  bool TrayIcon::on_exit()
+  void TrayIcon::on_exit()
   {
     set_visible(false);
-    return true;
   }
 
   bool TrayIcon::menu_opens_upward()
diff --git a/src/tray.hpp b/src/tray.hpp
index 94cd358..25b64aa 100644
--- a/src/tray.hpp
+++ b/src/tray.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2010 Aurimas Cernius
+ * Copyright (C) 2010-2011 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -110,7 +110,7 @@ public:
 
   void on_activate();
   void on_popup_menu(guint button, guint32 activate_time);
-  bool on_exit();
+  void on_exit();
   bool menu_opens_upward();
 
   void show_preferences();



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