aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-01-12 16:38:46 -0600
committerTed Gould <ted@canonical.com>2009-01-12 16:38:46 -0600
commit2dc2f266359d30841fa2970dba0265cb22556b89 (patch)
tree99c4ea90f561684db2ac98f41f857f5100709a31
parent3d55f9063f2ee1a1a472f5a7b0b4bfa4a798b1f9 (diff)
downloadlibayatana-indicator-2dc2f266359d30841fa2970dba0265cb22556b89.tar.gz
libayatana-indicator-2dc2f266359d30841fa2970dba0265cb22556b89.tar.bz2
libayatana-indicator-2dc2f266359d30841fa2970dba0265cb22556b89.zip
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.
-rw-r--r--libindicate/indicator.c8
-rw-r--r--libindicate/server.c3
-rw-r--r--libindicate/tests/indicate-and-crash.c2
3 files changed, 10 insertions, 3 deletions
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);