aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-messages.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-01-21 17:03:11 -0600
committerTed Gould <ted@canonical.com>2009-01-21 17:03:11 -0600
commit92e30f0deb4e4ff7c6f9a3829fc9d6972b1fbcc0 (patch)
treee3eb02bc023a2bff9e103a07654b6025fbaedb0e /src/indicator-messages.c
parent1ac3498216b856954b9035f84e8d85ee0f1de3ce (diff)
downloadayatana-indicator-messages-92e30f0deb4e4ff7c6f9a3829fc9d6972b1fbcc0.tar.gz
ayatana-indicator-messages-92e30f0deb4e4ff7c6f9a3829fc9d6972b1fbcc0.tar.bz2
ayatana-indicator-messages-92e30f0deb4e4ff7c6f9a3829fc9d6972b1fbcc0.zip
Lots of debugging message to figure out that I hadn't passed
the return variable in _new :(
Diffstat (limited to 'src/indicator-messages.c')
-rw-r--r--src/indicator-messages.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/indicator-messages.c b/src/indicator-messages.c
index a026798..be27489 100644
--- a/src/indicator-messages.c
+++ b/src/indicator-messages.c
@@ -39,7 +39,11 @@ imHash_destroy (gpointer data)
static void
subtype_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gchar * propertydata, gpointer data)
{
- GtkMenu * menushell = GTK_MENU(data);
+ GtkMenuShell * menushell = GTK_MENU_SHELL(data);
+ if (menushell == NULL) {
+ g_error("Data in callback is not a menushell");
+ return;
+ }
if (property == NULL || strcmp(property, "subtype")) {
/* We should only ever get subtypes, but just in case */
@@ -61,12 +65,15 @@ subtype_cb (IndicateListener * listener, IndicateListenerServer * server, Indica
hasher->server = server;
hasher->indicator = indicator;
- GtkWidget * menuitem = GTK_WIDGET(im_menu_item_new(listener, server, indicator));
- g_object_ref(menuitem);
+ g_debug("Building IM Item");
+ ImMenuItem * menuitem = im_menu_item_new(listener, server, indicator);
+ g_object_ref(G_OBJECT(menuitem));
+ g_debug("Adding to IM Hash");
g_hash_table_insert(imHash, hasher, menuitem);
- gtk_menu_shell_prepend(GTK_MENU_SHELL(menushell), menuitem);
+ g_debug("Placing in Shell");
+ gtk_menu_shell_prepend(menushell, menuitem);
#if 0
} else if (!strcmp(propertydata, "mail")) {
gpointer pntr_menu_item;