diff options
author | Ted Gould <ted@canonical.com> | 2009-01-21 16:20:52 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-01-21 16:20:52 -0600 |
commit | 281b4d99f44ae09e239ce66f24264dc72ac5bba6 (patch) | |
tree | 4ff6c963c7b032f598e87c58896a293596f4f71c | |
parent | 0e3f32e6112f5e00b92858a8a2882cc4de3cd0d7 (diff) | |
download | ayatana-indicator-messages-281b4d99f44ae09e239ce66f24264dc72ac5bba6.tar.gz ayatana-indicator-messages-281b4d99f44ae09e239ce66f24264dc72ac5bba6.tar.bz2 ayatana-indicator-messages-281b4d99f44ae09e239ce66f24264dc72ac5bba6.zip |
Make menu items for IM indicators
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | src/indicator-messages.c | 13 |
2 files changed, 15 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index 19fc98b..60b95d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +indicator-messages (0.1~ppa4) intrepid; urgency=low + + * Make menu items for IM indicators + + -- Ted Gould <ted@ubuntu.com> Wed, 21 Jan 2009 14:35:33 -0600 + indicator-messages (0.1~ppa3) intrepid; urgency=low * Adding a build dependency on libindicate-dev diff --git a/src/indicator-messages.c b/src/indicator-messages.c index 677f1ed..c8540cb 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -1,4 +1,5 @@ +#include <string.h> #include <gtk/gtk.h> #include <libindicate/listener.h> @@ -49,9 +50,12 @@ subtype_cb (IndicateListener * listener, IndicateListenerServer * server, Indica if (propertydata == NULL || propertydata[0] == '\0') { /* It's possible that this message didn't have a subtype. That's * okay, but we don't want to display those */ + g_debug("No subtype"); return; } + g_debug("Message subtype: %s", propertydata); + if (!strcmp(propertydata, "im")) { imHash_t * hasher = g_new(imHash_t, 1); hasher->server = server; @@ -94,6 +98,7 @@ indicator_added (IndicateListener * listener, IndicateListenerServer * server, I all of the others can go to the bit bucket */ return; } + g_debug("Got a message"); indicate_listener_get_property(listener, server, indicator, "subtype", subtype_cb, data); return; @@ -110,15 +115,15 @@ get_menu_item (void) NULL, g_object_unref); #endif - GtkWidget * main = gtk_menu_item_new_with_label("Message Me"); + GtkWidget * mainmenu = gtk_menu_item_new_with_label("Message Me"); GtkWidget * submenu = gtk_menu_new(); - gtk_menu_item_set_submenu(GTK_MENU_ITEM(main), submenu); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(mainmenu), submenu); gtk_widget_show(submenu); - gtk_widget_show(main); + gtk_widget_show(mainmenu); g_signal_connect(listener, "indicator-added", G_CALLBACK(indicator_added), submenu); - return main; + return mainmenu; } |