On platforms with native menubars (Mac, Unity) the showMenuBar action makes no 
sense since 
the menubar is integrated in the desktop shell instead of the application so 
the application gains 
no space by hiding/showing the menubar (sometimes it isn't possible to hide it 
at all)

So on thos platforms havign a menu item that does virtually nothing is bad and 
can be a little 
disconcerting.

I was thinking if we could somehow fix it centrally in frameworks instead of 
patching every app 
that has a KStandardAction::showMenubar

My current (yet to implement/test) idea is have KStandardAction::showMenubar 
check all the 
menubars of the top level windows of the app and if they are all marked as 
native, then return a 
dummy QAction that is not inserted in the menubar/actionCollection and that 
already returns 
"true" for checked.

This way the app thinks it got a real action to control the menubar status, but 
it is never shown 
to the user.

What do you think, do you think it could work or it is trying to be too smart 
and it'll break 
somehow?

Cheers,
  Albert

Reply via email to