[gnote] Do not loose menu on reopen search window



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

    Do not loose menu on reopen search window
    
    Applies to Gnote use cases, where Search All Notes window is not destroyed
    when closed: status icon and background mode.

 src/recentchanges.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/recentchanges.cpp b/src/recentchanges.cpp
index 6193719..a36df1e 100644
--- a/src/recentchanges.cpp
+++ b/src/recentchanges.cpp
@@ -1197,7 +1197,9 @@ namespace gnote {
     // The following code has to be done for the MenuBar to
     // appear properly the next time this window is opened.
     if (m_menubar) {
-      m_content_vbox.remove (*m_menubar);
+      if(Gnote::obj().windowed()) {
+        m_content_vbox.remove (*m_menubar);
+      }
 #if 0
       am ["OpenNoteAction"].Activated -= OnOpenNote;
       am ["DeleteNoteAction"].Activated -= OnDeleteNote;



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