Submenus not added when done so with Glade

Bug #608219 reported by Sense Egbert Hofstede on 2010-07-21
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Application Indicators
Invalid
Medium
Ted Gould
gtk+2.0 (Ubuntu)
Low
Unassigned
indicator-application (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: indicator-application

I'm working on adding Application Indicator support to Deluge and while working on a component for it I came along this bug.

Deluge is still using Glade for its interface. When it creates submenus and adds them to menuitems of a menu that is set to an AppIndicator, or is still to be set, the submenus don't appear in the Application Indicator menu, whereas they do in the menu of the GtkStatusIcon.

I'm using the latest code from http://git.deluge-torrent.org/

Please find attached my current patch.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: python-appindicator 0.2.3-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-9.14-generic 2.6.35-rc5
Uname: Linux 2.6.35-9-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Wed Jul 21 14:14:16 2010
ProcEnviron:
 LANGUAGE=nl_NL:nl:en_GB:en
 LANG=nl_NL.utf8
 SHELL=/bin/bash
SourcePackage: indicator-application

Related branches

Sense Egbert Hofstede (sense) wrote :
Changed in indicator-application (Ubuntu):
assignee: nobody → Sense Hofstede (sense)
Sense Egbert Hofstede (sense) wrote :

Further testing confirmed this is an issue with libappindicator. I'm trying to fix this by listening to notify::submenu.

Changed in indicator-application:
status: New → Confirmed
Changed in indicator-application (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in indicator-application:
assignee: nobody → Sense Hofstede (sense)
Changed in indicator-application (Ubuntu):
assignee: Sense Hofstede (sense) → nobody
Changed in indicator-application:
status: Confirmed → In Progress
Sense Egbert Hofstede (sense) wrote :

Jorge told to to assign this bug to Aurélien Gâteau, but I forgot to do so and tried to find a solution myself.
I'm now assigning this bug to Aurélien because I'm not sure if my proposed fixed in lp~sense/indicator-application/submenu-later is good enough since I can't fully test it myself due to problems with my local installation.
Aurélien, would you mind taking a look?

Changed in indicator-application (Ubuntu):
assignee: nobody → Aurélien Gâteau (agateau)
Changed in indicator-application:
assignee: Sense Hofstede (sense) → nobody
Changed in indicator-application:
assignee: nobody → Sense Hofstede (sense)
Changed in indicator-application (Ubuntu):
assignee: Aurélien Gâteau (agateau) → nobody
Sense Egbert Hofstede (sense) wrote :

The 'child-added' signal, which is currently the signal used by libappindicator to check for newly added submenus is only emitted when a GtkMenuItem is insterted in a GtkMenuShell. This means we need to add an extra signal for submenus added using gtk_menu_item_set_submenu(), because that is what we need to watch new submenus.
I'm working on a patch to GTK+2.0.

Changed in gtk+2.0 (Ubuntu):
status: New → Confirmed
Changed in gtk+2.0 (Ubuntu):
importance: Undecided → Low
Changed in gtk+2.0 (Ubuntu):
status: Confirmed → Fix Committed
Sense Egbert Hofstede (sense) wrote :

Attached a branch with a partial fix for AppInd's part of the problem, at lp:~sense/indicator-application/fix-608219
I'm pushing this non-working branch because I'll be away on a two-week holiday starting tomorrow, and now someone else can work on this bug.

The problem is that when you launch Deluge, patched with the patch attached to bug #584669, it will segfault. In the syslog I find entries like these when that happens: "nott kernel: [31724.397769] /usr/local/bin/[7178]: segfault at 1 ip 00007f174a4bc3ce sp 00007fff75791940 error 4 in libdbusmenu-glib.so.1.0.12[7f174a4b7000+10000]".

Jorge Castro (jorge) on 2010-08-05
Changed in indicator-application:
assignee: Sense Hofstede (sense) → Karl Lattimer (karl-qdh)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk+2.0 - 2.21.5-1ubuntu6

---------------
gtk+2.0 (2.21.5-1ubuntu6) maverick; urgency=low

  * debian/patches/043_ubuntu_menu_proxy.patch:
    - update by Cody Russell required to get the mnemonic activation working
      in the indicator-appmenu.
  * debian/patches/090_git_calendar_style_properties.patch:
    - git change to allow tweaking GtkCalendar layouts styling
  * debian/libgtk2.0-0.symbols: updated for the previous changes

  [ Sense Egbert Hofstede ]
  * debian/patches/072_indicator_menu_update.patch: Adding 'submenu-added' and
    'submenu-removed' signals so Application Indicators now that. (lp: #608219)
 -- Sebastien Bacher <email address hidden> Wed, 04 Aug 2010 15:59:31 +0200

Changed in gtk+2.0 (Ubuntu):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-application - 0.2.9-0ubuntu1

---------------
indicator-application (0.2.9-0ubuntu1) maverick; urgency=low

  [ Ted Gould ]
  * New upstream release.
    * Fix Mono binding versioning and build (LP: #636132)
    * Fix submenus with Glade applications (LP: #608219)
    * Add new functions to Mono and Python bindings
  * debian/libappindicator0.1-cil.installcligac: Add the 0.1
    policy file.

  [ Didier Roche ]
  * debian/control:
    - build with latest libindicator-dev for ABI breakage (LP: #637692)
 -- Didier Roche <email address hidden> Wed, 22 Sep 2010 20:01:04 +0200

Changed in indicator-application (Ubuntu):
status: Triaged → Fix Released
Sense Egbert Hofstede (sense) wrote :

Because I unfortunately and by accident used a branch associated with this bug to fix another issue it was thought that this bug was fixed. It was not, and therefore I am now reopening the bug.
Apologises for the inconvenience.

Changed in indicator-application (Ubuntu):
status: Fix Released → Triaged
Ted Gould (ted) on 2010-09-29
Changed in indicator-application:
importance: Undecided → Medium
Sebastien Bacher (seb128) wrote :

Could somebody upstream the gtk patch added there?

Karl Lattimer (karl-qdh) wrote :

https://bugs.launchpad.net/ayatana-ubuntu/+bug/584669 is affected by this bug, this is *partly* worked around by calling appindicator.set_menu() *AFTER* submenus have been appended to the menu.

However, a bug still exists in that the wrong widget is passed to the callback and therefore the setting is always read from the currently selected item rather than the activated item.

Sebastien Bacher (seb128) wrote :

is that still an issue in natty? lot of indicator bugs got fixed there

Changed in indicator-application (Ubuntu):
status: Triaged → Incomplete
Sense Egbert Hofstede (sense) wrote :

Deluge added its own indicator meanwhile, and that is using the unedited tray_menu from the GtkStatusIcon. However, the submenus are not displayed at all here, so this seems to be an issue still.

They are using Glade, maybe that worsens the situation.

Sense Egbert Hofstede (sense) wrote :

(The GTK+ patch is not used anymore. I'm not sure what is using it, but since Deluge isn't, it seems to me it can be removed again, unless someone sees a use case for it.)

David Barth (dbarth) wrote :

@Ted: not sure what's left to fix, but after the big refactoring, it's worth checking if the problem is definitely fixed or not.

Changed in indicator-application:
assignee: Karl Lattimer (karl-qdh) → Ted Gould (ted)
Ted Gould (ted) wrote :

I'm going to mark this as incomplete. Can someone test it with current Natty please? Thanks.

Changed in indicator-application:
status: In Progress → Incomplete
Sebastien Bacher (seb128) wrote :

We are closing this bug report as it lacks the information, described in the previous comments, we need to investigate the problem further. However, please reopen it if you can give us the missing information and don't hesitate to submit bug reports in the future.

Changed in indicator-application:
status: Incomplete → Invalid
Changed in indicator-application (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers