From d8e4ebebc320c72ae93c88dc43d8ae220a94331d Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Sat, 16 Nov 2002 23:49:31 +0000 Subject: Lots of GObject work. 2002-11-16 Chris Toshok * gal/e-text/e-completion-test.c: Lots of GObject work. * gal/e-text/e-completion-view.[ch]: same. * gal/e-text/e-completion.[ch]: same. * gal/e-text/e-entry.[ch]: same. * gal/e-text/e-table-text-model.[ch]: same. * gal/e-text/e-text-model-uri.[ch]: same. * gal/e-text/e-text-model.[ch]: same. * gal/e-text/e-text-test.c: same. * gal/e-text/e-text.[ch]: same. svn path=/trunk/; revision=18800 --- widgets/text/e-entry-test.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'widgets/text/e-entry-test.c') diff --git a/widgets/text/e-entry-test.c b/widgets/text/e-entry-test.c index 5dc78364d4..d30ba20a9f 100644 --- a/widgets/text/e-entry-test.c +++ b/widgets/text/e-entry-test.c @@ -27,7 +27,7 @@ #include "e-entry.h" #include -static void destroy_callback(GtkWidget *app, gpointer data) +static void destroy_callback(gpointer data, GObject *where_object_was) { exit(0); } @@ -64,16 +64,15 @@ int main( int argc, char *argv[] ) app = gnome_app_new("EEntry Test", NULL); entry = e_entry_new(); - gtk_object_set(GTK_OBJECT(entry), - "editable", TRUE, - "use_ellipsis", TRUE, - NULL); + g_object_set(entry, + "editable", TRUE, + "use_ellipsis", TRUE, + NULL); gnome_app_set_contents( GNOME_APP( app ), entry ); /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( app ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) app ); + g_object_weak_ref (G_OBJECT (app), + destroy_callback, app); gtk_widget_show_all( app ); -- cgit v1.2.3