Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > 9bb938de93248ca5cc71ecf424cefd6c > files > 41

kdebase-3.5.4-21.el5_5.1.src.rpm

Index: konqueror/konq_mainwindow.h
===================================================================
--- konqueror/konq_mainwindow.h	(Revision 581611)
+++ konqueror/konq_mainwindow.h	(Revision 581612)
@@ -749,6 +749,8 @@
 
   bool m_urlCompletionStarted;
 
+  bool m_prevMenuBarVisible;
+
   static bool s_preloaded;
   static KonqMainWindow* s_preloadedWindow;
   static int s_initialMemoryUsage;
Index: konqueror/konq_mainwindow.cc
===================================================================
--- konqueror/konq_mainwindow.cc	(Revision 581611)
+++ konqueror/konq_mainwindow.cc	(Revision 581612)
@@ -170,6 +170,8 @@
 
   m_bViewModeToggled = false;
 
+  m_prevMenuBarVisible = true;
+
   m_pViewManager = new KonqViewManager( this );
 
   m_toggleViewGUIClient = new ToggleViewGUIClient( this );
@@ -3544,10 +3546,10 @@
         plugActionList( "fullscreen", lst );
     }
 
-
+    m_prevMenuBarVisible = menuBar()->isVisible();
     menuBar()->hide();
     m_paShowMenuBar->setChecked( false );
- 
+
     // Qt bug, the flags are lost. They know about it.
     // happens only with the hackish non-_NET_WM_STATE_FULLSCREEN way
     setWFlags( WDestructiveClose );
@@ -3571,8 +3573,11 @@
 #endif
     unplugActionList( "fullscreen" );
 
-    menuBar()->show(); // maybe we should store this setting instead of forcing it
-    m_paShowMenuBar->setChecked( true );
+    if (m_prevMenuBarVisible)
+    {
+        menuBar()->show();
+        m_paShowMenuBar->setChecked( true );
+    }
 
     // Qt bug, the flags aren't restored. They know about it.
     setWFlags( WType_TopLevel | WDestructiveClose );