diff options
author | Ted Gould <ted@canonical.com> | 2009-09-04 09:11:59 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-09-04 09:11:59 -0500 |
commit | 506e943af17db275f1c83c7a4726d2d15897a09e (patch) | |
tree | 16028144fa8f3bddb4a176ed093fc093ecabd654 /src/im-menu-item.c | |
parent | 10327267daa9e4ba36ace96f637beaa9045e0895 (diff) | |
parent | a04a5e11668a7068f1307b28911df1097ab983cf (diff) | |
download | ayatana-indicator-messages-506e943af17db275f1c83c7a4726d2d15897a09e.tar.gz ayatana-indicator-messages-506e943af17db275f1c83c7a4726d2d15897a09e.tar.bz2 ayatana-indicator-messages-506e943af17db275f1c83c7a4726d2d15897a09e.zip |
Merging in the dbusmenu011 branch. I think I got other trunk updates as well.
Diffstat (limited to 'src/im-menu-item.c')
-rw-r--r-- | src/im-menu-item.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/im-menu-item.c b/src/im-menu-item.c index d35684e..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; } @@ -253,7 +253,7 @@ sender_cb (IndicateListener * listener, IndicateListenerServer * server, Indicat return; } - dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), "label", propertydata); + dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_LABEL, 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); |