Review Request: Make area switcher usable when KDevelop runs on an appmenu-enabled system

Aurélien Gâteau agateau at kde.org
Thu Jun 7 16:13:17 UTC 2012


Le jeudi 7 juin 2012 12:56:53 David Nolden a écrit :
> I don't use Ubuntu, and for me this completely kills the
> area-switcher. When I comment out the new code in
> UiController::setupActions, it works again.

What do you mean with "kills the area-switcher"? does it appear in the toolbar 
instead of the menubar or does it disappear completely?

> Obviously
> d->defaultMainWindow->menuBar()->isNativeMenuBar() returns true on my
> system too, even though I have a standard in-window menu bar. The
> documentation of isNativeMenuBar also states that this is just a hint
> set by the programmer, and not a way to read whether native menu-bars
> are used on the system.

I do not interpret the documentation as saying it is just a hint set by the 
programmer. The way it works is like this:

- On Mac OS, QMenuBar::isNativeMenuBar() returns true by default.
- On X11 without the appmenu-qt plugin, it returns false.
- On X11 with the appmenu-qt plugin installed, it returns true if a menubar 
renderer is running, false if there is none.

Furthermore, this flag is not style-dependent, it is platform-dependent. It 
works fine here with Plastique. What happens however, and maybe this is your 
problem, is that if I do this:

- run KDevelop with appmenu-qt and a menubar renderer
- quit
- stop the menubar renderer
- run KDevelop

Then I get no menubar at all :/ This is because KDevelop stores the menubar 
status in kdeveloprc. One then need to get rid of all the MenuBar=disabled 
keys in the file (sed -i /MenuBar=Disabled/d ~/.kde/share/config/kdeveloprc).

I am not sure if this code comes from KDevelop or from KXmlGuiWindow. I 
suspect the later, in which case KXmlGuiWindow code needs to be patched to not 
save menubar status when running with native menubars.

Aurélien




More information about the KDevelop-devel mailing list