diff options
Diffstat (limited to 'example/simple-client.c')
-rw-r--r-- | example/simple-client.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/example/simple-client.c b/example/simple-client.c index d5c9ad8..5d464ac 100644 --- a/example/simple-client.c +++ b/example/simple-client.c @@ -113,6 +113,12 @@ image_clicked_cb (GtkWidget *widget, gpointer data) } static void +scroll_event_cb (AppIndicator * ci, gint delta, guint direction) +{ + g_print("Got scroll event! delta: %d, direction: %d\n", delta, direction); +} + +static void append_submenu (GtkWidget *item) { GtkWidget *menu; @@ -184,6 +190,9 @@ main (int argc, char ** argv) app_indicator_set_attention_icon(ci, "indicator-messages-new"); app_indicator_set_label (ci, "1%", "100%"); + g_signal_connect (ci, "scroll-event", + G_CALLBACK (scroll_event_cb), NULL); + g_timeout_add_seconds(1, percent_change, ci); menu = gtk_menu_new (); |