From f7f7e443ed5ad285fb29cf0fc579dd76bd9fffe4 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Fri, 8 Nov 2002 00:12:29 +0000 Subject: don't use GTK, we don't need it. 2002-11-07 Rodrigo Moya * cal-client/client-test.c: don't use GTK, we don't need it. svn path=/trunk/; revision=18653 --- calendar/cal-client/client-test.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) (limited to 'calendar/cal-client/client-test.c') diff --git a/calendar/cal-client/client-test.c b/calendar/cal-client/client-test.c index 4a649e0428..312fe1536b 100644 --- a/calendar/cal-client/client-test.c +++ b/calendar/cal-client/client-test.c @@ -21,11 +21,8 @@ #include #include -#include -#include -#include -#include #include +#include #include #include "cal-client.h" #include "cal-util/cal-component.h" @@ -106,7 +103,7 @@ list_uids (gpointer data) printf ("------------------------------\n"); dump_component (comp); printf ("------------------------------\n"); - gtk_object_unref (GTK_OBJECT (comp)); + g_object_unref (comp); } else { printf ("FAILED: %d\n", status); } @@ -115,7 +112,7 @@ list_uids (gpointer data) cal_obj_uid_list_free (uids); - gtk_object_unref (GTK_OBJECT (client)); + g_object_unref (client); return FALSE; } @@ -143,7 +140,7 @@ cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data) char *comp_str; comp_str = cal_component_get_as_string (CAL_COMPONENT (l->data)); - gtk_object_unref (GTK_OBJECT (l->data)); + g_object_unref (l->data); cl_printf (client, "Free/Busy -> %s\n", comp_str); g_free (comp_str); } @@ -153,7 +150,7 @@ cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data) g_idle_add (list_uids, client); } else - gtk_object_unref (GTK_OBJECT (client)); + g_object_unref (client); } /* Callback used when an object is updated */ @@ -165,7 +162,7 @@ obj_updated_cb (CalClient *client, const char *uid, gpointer data) /* Callback used when a client is destroyed */ static void -client_destroy_cb (GtkObject *object, gpointer data) +client_destroy_cb (GObject *object, gpointer data) { if (CAL_CLIENT (object) == client1) client1 = NULL; @@ -175,7 +172,7 @@ client_destroy_cb (GtkObject *object, gpointer data) g_assert_not_reached (); if (!client1 && !client2) - gtk_main_quit (); + bonobo_main_quit (); } /* Creates a calendar client and tries to load the specified URI into it */ @@ -190,16 +187,16 @@ create_client (CalClient **client, const char *uri, gboolean only_if_exists) exit (1); } - gtk_signal_connect (GTK_OBJECT (*client), "destroy", - client_destroy_cb, - NULL); + g_signal_connect (G_OBJECT (*client), "destroy", + client_destroy_cb, + NULL); - gtk_signal_connect (GTK_OBJECT (*client), "cal_opened", - GTK_SIGNAL_FUNC (cal_opened_cb), - NULL); - gtk_signal_connect (GTK_OBJECT (*client), "obj_updated", - GTK_SIGNAL_FUNC (obj_updated_cb), + g_signal_connect (G_OBJECT (*client), "cal_opened", + G_CALLBACK (cal_opened_cb), NULL); + g_signal_connect (G_OBJECT (*client), "obj_updated", + G_CALLBACK (obj_updated_cb), + NULL); printf ("Calendar loading `%s'...\n", uri); @@ -220,7 +217,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, GNOMELOCALEDIR); textdomain (PACKAGE); - gnome_program_init ("tl-test", VERSION, LIBGNOME_MODULE, argc, argv, NULL); + g_type_init (); bonobo_activation_init (argc, argv); if (!bonobo_init (&argc, argv)) { -- cgit v1.2.3