"View" menu has useless "Menu Bar" item

Bug #912679 reported by Matthew Paul Thomas on 2012-01-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DBus Menu
xchat (Ubuntu)

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.)

Michal Predotka (mpredotka) wrote :

What if someone don't use global menu?

Matthew Paul Thomas (mpt) wrote :

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

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)
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
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?

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?

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

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  Edit
Everyone can see this information.

Other bug subscribers