aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-09-04 23:57:47 -0500
committerTed Gould <ted@canonical.com>2009-09-04 23:57:47 -0500
commitf585e51aa9ebce21b54262ac8fa6151c01f3cb34 (patch)
tree16028144fa8f3bddb4a176ed093fc093ecabd654 /src
parent43fffd847c98dcd789cf3c823028ee2d66db98d7 (diff)
parent366dbb549bca2b6b6d901fc60780710cb3f36224 (diff)
downloadayatana-indicator-messages-f585e51aa9ebce21b54262ac8fa6151c01f3cb34.tar.gz
ayatana-indicator-messages-f585e51aa9ebce21b54262ac8fa6151c01f3cb34.tar.bz2
ayatana-indicator-messages-f585e51aa9ebce21b54262ac8fa6151c01f3cb34.zip
Updating to latest trunk
Diffstat (limited to 'src')
-rw-r--r--src/im-menu-item.c14
-rw-r--r--src/indicator-messages.c4
-rw-r--r--src/messages-service.c4
3 files changed, 14 insertions, 8 deletions
diff --git a/src/im-menu-item.c b/src/im-menu-item.c
index 008e33f..6f58ebd 100644
--- a/src/im-menu-item.c
+++ b/src/im-menu-item.c
@@ -24,6 +24,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
#include <glib/gi18n.h>
+#include <libdbusmenu-glib/client.h>
#include <libindicate-gtk/indicator.h>
#include <libindicate-gtk/listener.h>
#include "im-menu-item.h"
@@ -73,7 +74,7 @@ static void icon_cb (IndicateListener * listener,
IndicateListenerServer * server,
IndicateListenerIndicator * indicator,
gchar * property,
- GdkPixbuf * propertydata,
+ gchar * propertydata,
gpointer data);
static void activate_cb (ImMenuItem * self,
gpointer data);
@@ -147,10 +148,9 @@ im_menu_item_finalize (GObject *object)
}
static void
-icon_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, GdkPixbuf * propertydata, gpointer data)
+icon_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gchar * propertydata, gpointer data)
{
- /* dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), "icon", propertydata); */
-
+ dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(data), DBUSMENU_MENUITEM_PROP_ICON_DATA, propertydata);
return;
}
@@ -280,7 +280,7 @@ indicator_modified_cb (IndicateListener * listener, IndicateListenerServer * ser
} else if (!g_strcmp0(property, "time")) {
indicate_listener_get_property_time(listener, server, indicator, "time", time_cb, self);
} else if (!g_strcmp0(property, "icon")) {
- indicate_listener_get_property_icon(listener, server, indicator, "icon", icon_cb, self);
+ indicate_listener_get_property(listener, server, indicator, "icon", icon_cb, self);
}
return;
@@ -299,9 +299,11 @@ im_menu_item_new (IndicateListener * listener, IndicateListenerServer * server,
priv->show_time = show_time;
priv->time_update_min = 0;
+ dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), "type", DBUSMENU_CLIENT_TYPES_IMAGE);
+
indicate_listener_get_property(listener, server, indicator, "sender", sender_cb, self);
indicate_listener_get_property_time(listener, server, indicator, "time", time_cb, self);
- indicate_listener_get_property_icon(listener, server, indicator, "icon", icon_cb, self);
+ indicate_listener_get_property(listener, server, indicator, "icon", icon_cb, self);
g_signal_connect(G_OBJECT(self), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_cb), NULL);
priv->indicator_changed = g_signal_connect(G_OBJECT(listener), INDICATE_LISTENER_SIGNAL_INDICATOR_MODIFIED, G_CALLBACK(indicator_modified_cb), self);
diff --git a/src/indicator-messages.c b/src/indicator-messages.c
index 0a1002d..c410ef7 100644
--- a/src/indicator-messages.c
+++ b/src/indicator-messages.c
@@ -140,6 +140,10 @@ setup_icon_proxy (gpointer userdata)
static gboolean
new_launcher_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client)
{
+ g_return_val_if_fail(DBUSMENU_IS_MENUITEM(newitem), FALSE);
+ g_return_val_if_fail(DBUSMENU_IS_GTKCLIENT(client), FALSE);
+ /* Note: not checking parent, it's reasonable for it to be NULL */
+
GtkMenuItem * gmi = GTK_MENU_ITEM(gtk_menu_item_new());
GtkWidget * vbox = gtk_vbox_new(TRUE, 2);
diff --git a/src/messages-service.c b/src/messages-service.c
index 093ebfd..754021b 100644
--- a/src/messages-service.c
+++ b/src/messages-service.c
@@ -531,7 +531,7 @@ server_removed (IndicateListener * listener, IndicateListenerServer * server, gc
serverList = g_list_remove(serverList, sltp);
if (sltp->menuitem != NULL) {
- dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(sltp->menuitem), "visibile", "false");
+ dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(sltp->menuitem), DBUSMENU_MENUITEM_PROP_VISIBLE, "false");
dbusmenu_menuitem_child_delete(DBUSMENU_MENUITEM(data), DBUSMENU_MENUITEM(sltp->menuitem));
g_object_unref(G_OBJECT(sltp->menuitem));
}
@@ -776,7 +776,7 @@ indicator_removed (IndicateListener * listener, IndicateListenerServer * server,
g_signal_handler_disconnect(menuitem, ilt->timechange_cb);
g_free(ilt);
- dbusmenu_menuitem_property_set(menuitem, "visibile", "false");
+ dbusmenu_menuitem_property_set(menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, "false");
dbusmenu_menuitem_child_delete(DBUSMENU_MENUITEM(data), menuitem);
removed = TRUE;
}