[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    dolphin showMenubar fix
From:       Laurens Vanhove <laurens () nature-helps ! com>
Date:       2008-09-18 19:53:21
Message-ID: 48D2B1B1.6080107 () nature-helps ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi all,

I've made a little patch to fix the effects of bug #171080 
<https://bugs.kde.org/show_bug.cgi?id=171080>.
It adds a single line in DolphinMainWindow::init() to sync the kaction 
to the real state of the menubar, and removes a previous, partial, 
workaround.

To reproduce the bug : add the showMenubar kaction to the toolbar, click 
it to hide the menu, close then restart the app -> the menu is hidden, 
but the kaction is checked (just like when the app is launched with the 
menu shown, it doesn't change).

So if anyone could verify and commit this ...


Regards,
Laurens

[Attachment #5 (text/html)]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi all,<br>
<br>
I've made a little patch to fix the effects of bug <a
 href="https://bugs.kde.org/show_bug.cgi?id=171080">#171080</a>.<br>
It adds a single line in DolphinMainWindow::init() to sync the kaction
to the real state of the menubar, and removes a previous, partial,
workaround.<br>
<br>
To reproduce the bug : add the showMenubar kaction to the toolbar,
click it to hide the menu, close then restart the app -&gt; the menu is
hidden, but the kaction is checked (just like when the app is launched
with the menu shown, it doesn't change).<br>
<br>
So if anyone could verify and commit this ...<br>
<br>
<br>
Regards,<br>
Laurens<br>
</body>
</html>

["dolphin-toggle-menubar.patch" (text/x-patch)]

diff -urN dolphin-orig/src/dolphincontextmenu.cpp dolphin/src/dolphincontextmenu.cpp
--- dolphin-orig/src/dolphincontextmenu.cpp	2008-09-14 19:07:52.000000000 +0200
+++ dolphin/src/dolphincontextmenu.cpp	2008-09-18 20:34:28.000000000 +0200
@@ -322,10 +322,6 @@
 {
     KAction* showMenuBar = m_mainWindow->showMenuBarAction();
     if (!m_mainWindow->menuBar()->isVisible()) {
-        // TODO: it should not be necessary to uncheck the menu
-        // bar action, but currently the action states don't get
-        // updated if the menu is disabled
-        showMenuBar->setChecked(false);
         menu->addAction(showMenuBar);
         menu->addSeparator();
     }
diff -urN dolphin-orig/src/dolphinmainwindow.cpp dolphin/src/dolphinmainwindow.cpp
--- dolphin-orig/src/dolphinmainwindow.cpp	2008-09-14 19:07:51.000000000 +0200
+++ dolphin/src/dolphinmainwindow.cpp	2008-09-18 20:37:49.000000000 +0200
@@ -861,6 +861,7 @@
         resize(750, 500);
     }
 
+    m_showMenuBar->setChecked(!menuBar()->isHidden()); // workaround for bug #171080
     emit urlChanged(homeUrl);
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic