aboutsummaryrefslogtreecommitdiff
path: root/example/menus.c
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2010-03-05 16:04:11 +0000
committerCody Russell <crussell@canonical.com>2010-03-05 16:04:11 +0000
commit6c7fcbe1d5ede0eaa6c6f2c10b0f0597ecdfffbd (patch)
treee65edc7907409cb8dbbd32a3e8efa010331eded8 /example/menus.c
parent2cffa8580d3f658adce63aa5ff7ced8a14d9c509 (diff)
downloadayatana-ido-6c7fcbe1d5ede0eaa6c6f2c10b0f0597ecdfffbd.tar.gz
ayatana-ido-6c7fcbe1d5ede0eaa6c6f2c10b0f0597ecdfffbd.tar.bz2
ayatana-ido-6c7fcbe1d5ede0eaa6c6f2c10b0f0597ecdfffbd.zip
Add grab/release signals
Diffstat (limited to 'example/menus.c')
-rw-r--r--example/menus.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/example/menus.c b/example/menus.c
index 7d4b282..133c7c8 100644
--- a/example/menus.c
+++ b/example/menus.c
@@ -3,6 +3,18 @@
#include "idoscalemenuitem.h"
#include "idoentrymenuitem.h"
+static void
+slider_grabbed (GtkWidget *widget, gpointer user_data)
+{
+ g_print ("grabbed\n");
+}
+
+static void
+slider_released (GtkWidget *widget, gpointer user_data)
+{
+ g_print ("released\n");
+}
+
int
main (int argc, char *argv[])
{
@@ -46,6 +58,9 @@ main (int argc, char *argv[])
gtk_image_set_from_stock (GTK_IMAGE (image), GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+ g_signal_connect (menuitem, "slider-grabbed", G_CALLBACK (slider_grabbed), NULL);
+ g_signal_connect (menuitem, "slider-released", G_CALLBACK (slider_released), NULL);
+
menuitem = ido_entry_menu_item_new ();
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);