[gnote] Do not open Search Window in status icon mode



commit 2910453ad7757088e375b03aa56d71878ec54c4a
Author: Aurimas Äernius <aurisc4 gmail com>
Date:   Sun Nov 13 17:59:29 2011 +0200

    Do not open Search Window in status icon mode
    
    If user configured to use status icon, he does not want any window
    to open on start up, even if icon does not appear in 2 seconds.
    This is a problem, when Gnote is launched during start up.
    Fixes bug 653447.

 src/gnote.cpp |   24 ------------------------
 src/gnote.hpp |    1 -
 2 files changed, 0 insertions(+), 25 deletions(-)
---
diff --git a/src/gnote.cpp b/src/gnote.cpp
index c41a943..8d424d0 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -298,30 +298,6 @@ namespace gnote {
     // Create the tray icon and run the main loop
     m_tray_icon = Glib::RefPtr<TrayIcon>(new TrayIcon(default_note_manager()));
     m_tray = m_tray_icon->tray();
-
-    // Give the TrayIcon 2 seconds to appear.  If it
-    // doesn't by then, open the SearchAllNotes window.
-    bool is_tray_icon_showing = m_tray_icon->is_embedded()
-      && m_tray_icon->get_visible();
-      
-    if (!is_tray_icon_showing) {
-      Glib::RefPtr<Glib::TimeoutSource> timeout 
-        = Glib::TimeoutSource::create(2000);
-      timeout->connect(sigc::mem_fun(*this, &Gnote::check_tray_icon_showing));
-      timeout->attach();
-    }
-  }
-
-
-  bool Gnote::check_tray_icon_showing()
-  {
-    bool is_tray_icon_showing = m_tray_icon->is_embedded()
-      && m_tray_icon->get_visible();
-    if(!is_tray_icon_showing) {
-      ActionManager & am(ActionManager::obj());
-      am["ShowSearchAllNotesAction"]->activate();
-    }
-    return false;
   }
 
 
diff --git a/src/gnote.hpp b/src/gnote.hpp
index 8ecb084..cecaea6 100644
--- a/src/gnote.hpp
+++ b/src/gnote.hpp
@@ -121,7 +121,6 @@ public:
 
   void setup_global_actions();
   void start_tray_icon();
-  bool check_tray_icon_showing();
 
   void on_new_note_action();
   void on_quit_gnote_action();



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