"View" menu has useless "Menu Bar" item

Bug #912679 reported by Matthew Paul Thomas
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DBus Menu
Invalid
Undecided
Unassigned
xchat (Ubuntu)
New
Low
Unassigned

Bug Description

xchat 2.8.8-3ubuntu8, Ubuntu 11.10

1. Open the "View" menu.
2. Uncheck "Menu Bar".

What happens:
1. There's a checked "Menu Bar" item.
2. A dialog appears saying "The Menubar [sic] is now hidden", which isn't true.

What should happen: The "Menu Bar" menu item shouldn't exist.

(The equivalent problem is bug 787465 in gnome-terminal, and bug 915283 in Gimp.)

Revision history for this message
Michal Predotka (mpredotka) wrote :

What if someone don't use global menu?

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

I have no problem with the item being present when someone isn't using the global menu bar.

Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

I'm pretty certain this is an issue in the global menu rendering, not in xchat or the other applications themselves.

Changed in xchat (Ubuntu):
importance: Undecided → Low
affects: xchat (Ubuntu) → unity (Ubuntu)
affects: unity (Ubuntu) → libdbusmenu (Ubuntu)
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

It can't be an issue with the global menu rendering, because the rendering system can't possibly tell which menu items are for hiding an in-window menu bar and which aren't. (It could try, by looking for the string "Menu Bar" or "Menubar", but the menus might not be in English.)

XChat needs to not have a "View" > "Menu Bar" item, when running in Unity, for exactly the same reason as XChat Azure doesn't have a "View" > "Menu Bar" item on Mac OS X.

affects: libdbusmenu (Ubuntu) → xchat (Ubuntu)
Changed in dbusmenu:
status: New → Invalid
description: updated
Revision history for this message
Michal Predotka (mpredotka) wrote :

Is it possible for a program to recognize if its menu is rendered in global menu bar? If not, how can it display this menu entry if someone is useing global menu bar and hide if not?

Revision history for this message
Michal Predotka (mpredotka) wrote :

Sorry. Should be: how can it hide this menu entry if someone is useing global menu bar and show if not?

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Yes, <https://wiki.ubuntu.com/MenuBar#detecting> describes how to detect whether the global menu bar is in use. So I guess the fix will look something like this:

if (gtk_menu_proxy_get() != NULL) {
    # existing code that adds the "Menu Bar" item
    # to the "View" menu goes here
}

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Actually, I guess that should be "(gtk_menu_proxy_get() == NULL)", since you want to add the item only if the global menu bar is *not* in use.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.