Adding a menu item without a label gets treated as a separator even if label is added later

Bug #1086563 reported by Robert Ancell on 2012-12-04
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
DBus Menu
Fix Committed
High
Marco Trevisan (Treviño)
libdbusmenu (Ubuntu)
High
Unassigned
Trusty
High
Unassigned

Bug Description

* Impact
If you add a Gtk.MenuItem to an indicator menu without a label then appindicator treats the menu item like it is a separator (according to dbusmenu-dumper).

* Test case
Run this python script http://pastebin.ubuntu.com/7604811/

* Regression potential
check that menus and indicators are correctly displayed

Robert Ancell (robert-ancell) wrote :
Robert Ancell (robert-ancell) wrote :

I can see this is in dbusmenu libdbusmenu-gtk/parser.c:630:
      if (GTK_IS_SEPARATOR_MENU_ITEM (widget) || !find_menu_label (widget))

That logic is a bit off - not having a label doesn't make it a separator...

affects: libappindicator → dbusmenu
Changed in libdbusmenu:
status: New → In Progress
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
importance: Undecided → High

This the easiest way to reproduce this problem: http://pastebin.ubuntu.com/7604811/

Some indicators such as the first version of Syspeek indicator or the Copy.com indicator are affected by this.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libdbusmenu - 12.10.3+14.10.20140610-0ubuntu1

---------------
libdbusmenu (12.10.3+14.10.20140610-0ubuntu1) utopic; urgency=low

  [ Marco Trevisan (Treviño) ]
  * Parser: make sure that the old dbus menuitem is detached from the
    widget before recreating When a dbus menuitem has to be recreated,
    we need to disconnect the widget from it, or the old one will be
    reused at next parsing cycle. (LP: #1086563)
 -- Ubuntu daily release <email address hidden> Tue, 10 Jun 2014 15:29:30 +0000

Changed in libdbusmenu (Ubuntu):
status: New → Fix Released
Colin Law (colin-law) wrote :

Will this be fixed for 14.04?

Sebastien Bacher (seb128) wrote :

yes, the SRU is being prepared, it just needed to land in utopic first and we were waiting to get some feedback to make sure the change don't create issues

Colin Law (colin-law) wrote :

Great, many thanks.

description: updated
Doug McMahon (mc3man) wrote :

Been running the patched libdbusmenu for several days in 14.04, haven't noticed any ill or unexpected results

Sebastien Bacher (seb128) wrote :

Thanks Doug, I just uploaded to the trusty SRU queue
https://launchpad.net/ubuntu/trusty/+queue?queue_state=1&queue_text=libdbusmenu

Changed in libdbusmenu (Ubuntu):
importance: Undecided → High
Changed in libdbusmenu (Ubuntu Trusty):
importance: Undecided → High
status: New → In Progress
summary: - Adding a menu item without a label and with a submenu gets treated as a
- spearator even if label is added later
+ Adding a menu item without a label gets treated as a spearator even if
+ label is added later
description: updated
Changed in libdbusmenu:
status: In Progress → Fix Committed

Hello Robert, or anyone else affected,

Accepted libdbusmenu into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/libdbusmenu/12.10.3+14.04.20140612-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in libdbusmenu (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Orhideous (orhideous) on 2014-06-23
summary: - Adding a menu item without a label gets treated as a spearator even if
+ Adding a menu item without a label gets treated as a separator even if
label is added later

I've checked the test case python script and it displayed indicator with three menu items.

BTW the script should also have:

#!/usr/bin/env python

at the beginning. Maybe it is known for others but I first tried without that and when it failed I looked at other python scripts to know what's missing.

tags: added: verification-done
removed: verification-needed

The verification of the Stable Release Update for libdbusmenu has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libdbusmenu - 12.10.3+14.04.20140612-0ubuntu1

---------------
libdbusmenu (12.10.3+14.04.20140612-0ubuntu1) trusty; urgency=low

  [ Marco Trevisan (Treviño) ]
  * Backporting lp:~3v1n0/libdbusmenu/really-recreate-menu/+merge/222419
    (LP: #1086563)
 -- Ubuntu daily release <email address hidden> Thu, 12 Jun 2014 16:36:28 +0000

Changed in libdbusmenu (Ubuntu Trusty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments