diff options
author | Luke Yelavich <luke.yelavich@canonical.com> | 2011-02-11 07:47:26 +1100 |
---|---|---|
committer | Luke Yelavich <luke.yelavich@canonical.com> | 2011-02-11 07:47:26 +1100 |
commit | b63c137778bbec1fb010f095e08750817744fced (patch) | |
tree | 960f8b383fdc012dcaeb689c58484f1009eae1ec /example/simple-client.c | |
parent | fffab2e1e8d991a41cc591ceaca77c8a40f31f33 (diff) | |
parent | 409fc00a5a2f60dad3c1adb62d82c896cdfb2a2a (diff) | |
download | libayatana-appindicator-b63c137778bbec1fb010f095e08750817744fced.tar.gz libayatana-appindicator-b63c137778bbec1fb010f095e08750817744fced.tar.bz2 libayatana-appindicator-b63c137778bbec1fb010f095e08750817744fced.zip |
Merge from trunk
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 (); |