From c74b51f9b2532c873d22953ef358dda2051d9b8d Mon Sep 17 00:00:00 2001 From: Brandon Lewis Date: Tue, 20 Jul 2010 17:59:59 +0200 Subject: [PATCH] pass app instance to signal handlers --- tests/examples/ges-ui.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/examples/ges-ui.c b/tests/examples/ges-ui.c index 4814206281..36a1c9c8e2 100644 --- a/tests/examples/ges-ui.c +++ b/tests/examples/ges-ui.c @@ -13,36 +13,36 @@ App *app_new (void); void app_dispose (App * app); -void window_destroy_cb (GtkObject * window, gpointer user); +void window_destroy_cb (GtkObject * window, App * app); -void quit_item_activate_cb (GtkMenuItem * item, gpointer user); +void quit_item_activate_cb (GtkMenuItem * item, App * app); -void delete_item_activate_cb (GtkMenuItem * item, gpointer user); +void delete_item_activate_cb (GtkMenuItem * item, App * app); -void add_file_item_activate_cb (GtkMenuItem * item, gpointer user); +void add_file_item_activate_cb (GtkMenuItem * item, App * app); GtkWidget *create_ui (App * app); void -window_destroy_cb (GtkObject * window, gpointer user) +window_destroy_cb (GtkObject * window, App * app) { gtk_main_quit (); } void -quit_item_activate_cb (GtkMenuItem * item, gpointer user) +quit_item_activate_cb (GtkMenuItem * item, App * app) { gtk_main_quit (); } void -delete_item_activate_cb (GtkMenuItem * item, gpointer user) +delete_item_activate_cb (GtkMenuItem * item, App * app) { g_print ("beleted!"); } void -add_file_item_activate_cb (GtkMenuItem * item, gpointer user) +add_file_item_activate_cb (GtkMenuItem * item, App * app) { g_print ("add file"); } @@ -93,7 +93,7 @@ app_dispose (App * app) } GtkWidget * -create_ui (App * data) +create_ui (App * app) { GtkBuilder *builder; GtkWidget *window; @@ -101,7 +101,7 @@ create_ui (App * data) builder = gtk_builder_new (); gtk_builder_add_from_file (builder, "ges-ui.glade", NULL); window = GTK_WIDGET (gtk_builder_get_object (builder, "window")); - gtk_builder_connect_signals (builder, NULL); + gtk_builder_connect_signals (builder, app); g_object_unref (G_OBJECT (builder)); gtk_widget_show (window);