← Back to team overview

dx-packages team mailing list archive

[Bug 1809850] Re: Re-creating Gtk Menu in event handler with Vala fails

 

** Summary changed:

- Re-creating Gtk Menu in event handler with Vala?
+ Re-creating Gtk Menu in event handler with Vala fails

-- 
You received this bug notification because you are a member of DX
Packages, which is subscribed to libappindicator in Ubuntu.
Matching subscriptions: dx-packages
https://bugs.launchpad.net/bugs/1809850

Title:
  Re-creating Gtk Menu in event handler with Vala fails

Status in libappindicator package in Ubuntu:
  New

Bug description:
  There is a plugin that I'd like to get running, which fails because of
  this issue; I've discussed it, and manage to isolate it, in these two
  posts:

  * https://askubuntu.com/questions/1089516/gnome3-appindicator-vala-app-cannot-show-submenu-it-auto-closes-immediately/
  * https://stackoverflow.com/questions/53805975/re-creating-gtk-menu-in-event-handler-with-vala


  The `test.vala` file from the second post is attached, it can be built
  with:

  valac -X -D'GETTEXT_PACKAGE="my-indicator"' -D NEWMETHOD
  --pkg=gtk+-3.0 --pkg appindicator3-0.1 test.vala

  ... the `-D NEWMETHOD` simply replaces the deprecated
  Gtk.ImageMenuItem with Gtk.MenuItem, so as to get rid of deprecation
  warnings, but the behavior is exactly the same.


  And the problem is: if a submenu creation code runs in an
  activate.connect handler, the created menu items never show. The
  animated .gif showing the issue (also in the above posts) is here:

  https://i.stack.imgur.com/wA6kT.gif

  Since this (creating submenu items in activate.connect handler)
  apparently worked at a point in the past, I'd consider the behavior I
  currently experience a bug.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libappindicator/+bug/1809850/+subscriptions


References