aboutsummaryrefslogtreecommitdiff
path: root/example/simple-client.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-02-10 14:57:31 -0600
committerTed Gould <ted@gould.cx>2011-02-10 14:57:31 -0600
commita9814d5d7acde62dd8f5cf3424f795bb4c977dd1 (patch)
tree11f2e90896af12c6718eb4b408347bb22b643672 /example/simple-client.c
parent6def775bc45fdcf7ce59ccd08dd89c751b5cf3d3 (diff)
parent18d89929cb035b798916e10a6aa253fd5bcf4e7d (diff)
downloadlibayatana-appindicator-a9814d5d7acde62dd8f5cf3424f795bb4c977dd1.tar.gz
libayatana-appindicator-a9814d5d7acde62dd8f5cf3424f795bb4c977dd1.tar.bz2
libayatana-appindicator-a9814d5d7acde62dd8f5cf3424f795bb4c977dd1.zip
New upstream release.
∘ Fix Vala bindings ∘ Add support for scroll events
Diffstat (limited to 'example/simple-client.c')
-rw-r--r--example/simple-client.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/example/simple-client.c b/example/simple-client.c
index ac8360f..1cf06dc 100644
--- a/example/simple-client.c
+++ b/example/simple-client.c
@@ -98,6 +98,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;
@@ -162,6 +168,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 ();