ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #00073
[Branch ~indicator-applet-developers/indicator-messages/trunk] Rev 131: Bringing up to use some of the new features and defines in DBusmenu 0.1.1
Merge authors:
Ted Gould (ted)
Related merge proposals:
https://code.launchpad.net/~ted/indicator-messages/dbusmenu011/+merge/11200
proposed by: Ted Gould (ted)
review: Approve - David Barth (dbarth)
------------------------------------------------------------
revno: 131 [merge]
committer: Ted Gould <ted@xxxxxxxxxxxxx>
branch nick: trunk
timestamp: Fri 2009-09-04 13:47:44 -0500
message:
Bringing up to use some of the new features and defines in DBusmenu 0.1.1
modified:
configure.ac
src/im-menu-item.c
src/messages-service.c
--
lp:indicator-messages
https://code.launchpad.net/~indicator-applet-developers/indicator-messages/trunk
Your team ayatana-commits is subscribed to branch lp:indicator-messages.
To unsubscribe from this branch go to https://code.launchpad.net/~indicator-applet-developers/indicator-messages/trunk/+edit-subscription.
=== modified file 'configure.ac'
--- configure.ac 2009-08-27 18:58:13 +0000
+++ configure.ac 2009-09-03 19:06:22 +0000
@@ -28,7 +28,7 @@
PANEL_REQUIRED_VERSION=2.0.0
INDICATE_REQUIRED_VERSION=0.2.0
INDICATOR_REQUIRED_VERSION=0.2.0
-DBUSMENUGTK_REQUIRED_VERSION=0.1.0
+DBUSMENUGTK_REQUIRED_VERSION=0.1.1
PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION
=== modified file 'src/im-menu-item.c'
--- src/im-menu-item.c 2009-08-26 21:47:55 +0000
+++ src/im-menu-item.c 2009-09-04 14:02:34 +0000
@@ -24,6 +24,7 @@
#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 @@
IndicateListenerServer * server,
IndicateListenerIndicator * indicator,
gchar * property,
- GdkPixbuf * propertydata,
+ gchar * propertydata,
gpointer data);
static void activate_cb (ImMenuItem * self,
gpointer data);
@@ -147,10 +148,9 @@
}
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 @@
} 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 @@
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);
=== modified file 'src/messages-service.c'
--- src/messages-service.c 2009-08-26 21:47:55 +0000
+++ src/messages-service.c 2009-09-03 19:13:45 +0000
@@ -531,7 +531,7 @@
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 @@
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;
}