diff options
author | Ted Gould <ted@gould.cx> | 2010-09-19 13:28:14 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-09-19 13:28:14 -0500 |
commit | 49b70435e5ad752302913719fe227569b51aed40 (patch) | |
tree | b8cdf29d385ce2253aa7765ed40dbb63767c556a /tools/indicator-loader.c | |
parent | 0bcacdcdc45b229e955d9e9d748580f4c3fb3fd1 (diff) | |
parent | bf38aa8b5b4331ac13503d53b123e6bbf19f7432 (diff) | |
download | libayatana-indicator-49b70435e5ad752302913719fe227569b51aed40.tar.gz libayatana-indicator-49b70435e5ad752302913719fe227569b51aed40.tar.bz2 libayatana-indicator-49b70435e5ad752302913719fe227569b51aed40.zip |
* Upstream Merge
* Adding a function to signal a menu is shown
* Changing indicator directory to '4'
* debian/control: Switching from libindicator0 to libindicator1
as we've broken ABI. Conflicting with libindicator0 to make
upgrade simpler as it doesn't make sense to have both installed.
* Autogen update
Diffstat (limited to 'tools/indicator-loader.c')
-rw-r--r-- | tools/indicator-loader.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/indicator-loader.c b/tools/indicator-loader.c index 747b216..03614aa 100644 --- a/tools/indicator-loader.c +++ b/tools/indicator-loader.c @@ -28,6 +28,17 @@ License along with this library. If not, see #define ENTRY_DATA_NAME "indicator-custom-entry-data" static void +activate_entry (GtkWidget * widget, gpointer user_data) +{ + g_return_if_fail(INDICATOR_IS_OBJECT(user_data)); + gpointer entry = g_object_get_data(G_OBJECT(widget), ENTRY_DATA_NAME); + g_return_if_fail(entry == NULL); + + indicator_object_entry_activate(INDICATOR_OBJECT(user_data), (IndicatorObjectEntry *)entry, gtk_get_current_event_time()); + return; +} + +static void entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data) { g_debug("Signal: Entry Added"); @@ -48,6 +59,8 @@ entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_d gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), GTK_WIDGET(entry->menu)); } + g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(activate_entry), io); + gtk_menu_shell_append(GTK_MENU_SHELL(user_data), menuitem); gtk_widget_show(menuitem); |