From 2dc2f266359d30841fa2970dba0265cb22556b89 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 12 Jan 2009 16:38:46 -0600 Subject: Clean up the signal handlers and fixing the call in the test function. Now we're to the point of showing the way I think things should be. --- libindicate/indicator.c | 8 ++++++-- libindicate/server.c | 3 +++ libindicate/tests/indicate-and-crash.c | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'libindicate') diff --git a/libindicate/indicator.c b/libindicate/indicator.c index 43eac55..a319af2 100644 --- a/libindicate/indicator.c +++ b/libindicate/indicator.c @@ -21,6 +21,8 @@ static void indicate_indicator_finalize (GObject * object); static void indicate_indicator_class_init (IndicateIndicatorClass * class) { + g_debug("Indicator Class Initialized."); + GObjectClass * gobj; gobj = G_OBJECT_CLASS(class); @@ -54,6 +56,8 @@ indicate_indicator_class_init (IndicateIndicatorClass * class) static void indicate_indicator_init (IndicateIndicator * indicator) { + g_debug("Indicator Object Initialized."); + indicator->id = 0; indicator->server = indicate_server_ref_default(); @@ -88,12 +92,12 @@ indicate_indicator_show (IndicateIndicator * indicator) indicate_server_show(indicator->server); } - g_signal_emit(indicator, signals[SHOW], NULL, G_TYPE_NONE); + g_signal_emit(indicator, signals[SHOW], 0, TRUE); } void indicate_indicator_hide (IndicateIndicator * indicator) { - g_signal_emit(indicator, signals[HIDE], NULL, G_TYPE_NONE); + g_signal_emit(indicator, signals[HIDE], 0, TRUE); } diff --git a/libindicate/server.c b/libindicate/server.c index dd4513a..95c0a2c 100644 --- a/libindicate/server.c +++ b/libindicate/server.c @@ -44,6 +44,7 @@ static gboolean show_indicator_to_user (IndicateServer * server, guint id, GErro static void indicate_server_class_init (IndicateServerClass * class) { + g_debug("Server Class Initialized"); GObjectClass * gobj; gobj = G_OBJECT_CLASS(class); @@ -90,6 +91,8 @@ indicate_server_class_init (IndicateServerClass * class) static void indicate_server_init (IndicateServer * server) { + g_debug("Server Object Initialized"); + server->path = g_strdup("/org/freedesktop/indicate"); server->indicators = NULL; diff --git a/libindicate/tests/indicate-and-crash.c b/libindicate/tests/indicate-and-crash.c index 3cf3968..3cf4428 100644 --- a/libindicate/tests/indicate-and-crash.c +++ b/libindicate/tests/indicate-and-crash.c @@ -10,7 +10,7 @@ main (int argc, char ** argv) g_type_init(); IndicateIndicator * indicator = indicate_indicator_new(); - indicate_indicator_show(indicator->server); + indicate_indicator_show(indicator); //g_timeout_add_seconds(15, crashfunc, NULL); -- cgit v1.2.3