I have found out how to get the "about-to-show" signal from an
application indicator. I'm not sure which version of Ubuntu that this
became available in (I'm using trusty), but I think we can call this
fixed.

I didn't do this in C originally, so sorry if this sample is not quite
right.

AppIndicator *indicator;
GtkMenu *menu;
DbusmenuServer *menuServer;
DbusmenuMenuitem *rootMenuItem;

indicator = app_indicator_new(0, "sample", 
APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
menu = gtk_menu_new();
// must set menu before getting dbus-menu-server property
app_indicator_set_menu(indicator, menu);
g_object_get(indicator, "dbus-menu-server", &menuServer, NULL);
g_object_get(menuServer, "root-node", &rootMenuItem, NULL);
g_signal_connect(rootMenuItem, "about-to-show", G_CALLBACK(sample_cb), NULL);

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/522152

Title:
  indicator-application does not send signals when a menu is
  shown/hidden

To manage notifications about this bug go to:
https://bugs.launchpad.net/grandrock/+bug/522152/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to