Merge lp:~indicator-applet-developers/libindicate/ubuntu into lp:~ubuntu-desktop/libindicate/ubuntu

Proposed by Ted Gould
Status: Merged
Merged at revision: not available
Proposed branch: lp:~indicator-applet-developers/libindicate/ubuntu
Merge into: lp:~ubuntu-desktop/libindicate/ubuntu
Diff against target: 223 lines (+82/-6)
8 files modified
Makefile.am (+2/-1)
configure.ac (+4/-4)
debian/changelog (+9/-0)
examples/im-client.c (+23/-0)
libindicate/listener.c (+28/-0)
libindicate/listener.h (+7/-0)
libindicate/server.c (+8/-0)
tests/Makefile.am (+1/-1)
To merge this branch: bzr merge lp:~indicator-applet-developers/libindicate/ubuntu
Reviewer Review Type Date Requested Status
Sebastien Bacher Pending
Review via email: mp+19619@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

0.3.3

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile.am'
--- Makefile.am 2009-08-18 16:28:35 +0000
+++ Makefile.am 2010-02-18 15:29:09 +0000
@@ -10,7 +10,8 @@
10 COPYING.LGPL.2.1 \10 COPYING.LGPL.2.1 \
11 gtk-doc.make \11 gtk-doc.make \
12 omf.make \12 omf.make \
13 xmldocs.make13 xmldocs.make \
14 autogen.sh
1415
15DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --disable-scrollkeeper16DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --disable-scrollkeeper
1617
1718
=== modified file 'configure.ac'
--- configure.ac 2010-02-11 15:36:39 +0000
+++ configure.ac 2010-02-18 15:29:09 +0000
@@ -1,10 +1,10 @@
11
2AC_INIT(libindicate, 0.3.2, ted@canonical.com)2AC_INIT(libindicate, 0.3.3, ted@canonical.com)
33
4AC_PREREQ(2.53)4AC_PREREQ(2.53)
55
6AM_CONFIG_HEADER(config.h)6AM_CONFIG_HEADER(config.h)
7AM_INIT_AUTOMAKE(libindicate, 0.3.2)7AM_INIT_AUTOMAKE(libindicate, 0.3.3)
88
9AM_MAINTAINER_MODE9AM_MAINTAINER_MODE
10m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES])10m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES])
@@ -28,7 +28,7 @@
28###########################28###########################
2929
30LIBINDICATE_CURRENT=430LIBINDICATE_CURRENT=4
31LIBINDICATE_REVISION=031LIBINDICATE_REVISION=1
32LIBINDICATE_AGE=032LIBINDICATE_AGE=0
3333
34AC_SUBST(LIBINDICATE_CURRENT)34AC_SUBST(LIBINDICATE_CURRENT)
@@ -40,7 +40,7 @@
40###########################40###########################
4141
42LIBINDICATEGTK_CURRENT=242LIBINDICATEGTK_CURRENT=2
43LIBINDICATEGTK_REVISION=043LIBINDICATEGTK_REVISION=1
44LIBINDICATEGTK_AGE=044LIBINDICATEGTK_AGE=0
4545
46AC_SUBST(LIBINDICATEGTK_CURRENT)46AC_SUBST(LIBINDICATEGTK_CURRENT)
4747
=== modified file 'debian/changelog'
--- debian/changelog 2010-02-11 19:14:52 +0000
+++ debian/changelog 2010-02-18 15:29:09 +0000
@@ -1,3 +1,12 @@
1libindicate (0.3.3-0ubuntu1~ppa1) lucid; urgency=low
2
3 * Upstream release 0.3.3
4 * Add ability to get properties as values in the server.
5 * Fix error messages on failed properties.
6 * Add menu support to im-client example.
7
8 -- Ted Gould <ted@ubuntu.com> Thu, 18 Feb 2010 09:25:28 -0600
9
1libindicate (0.3.2-0ubuntu1) lucid; urgency=low10libindicate (0.3.2-0ubuntu1) lucid; urgency=low
211
3 * Upstream release 0.3.212 * Upstream release 0.3.2
413
=== modified file 'examples/im-client.c'
--- examples/im-client.c 2009-08-28 19:40:56 +0000
+++ examples/im-client.c 2010-02-18 15:29:09 +0000
@@ -78,6 +78,12 @@
78 g_debug("Someone is no longer interested in my for: %d", interest);78 g_debug("Someone is no longer interested in my for: %d", interest);
79}79}
8080
81void
82menuitem_click (DbusmenuMenuitem * menuitem, guint timestamp, gpointer data)
83{
84 g_debug("Menuitem '%s' clicked at %d", (gchar *)data, timestamp);
85}
86
81int87int
82main (int argc, char ** argv)88main (int argc, char ** argv)
83{89{
@@ -90,6 +96,23 @@
90 g_signal_connect(G_OBJECT(server), INDICATE_SERVER_SIGNAL_INTEREST_ADDED, G_CALLBACK(interest_added), NULL);96 g_signal_connect(G_OBJECT(server), INDICATE_SERVER_SIGNAL_INTEREST_ADDED, G_CALLBACK(interest_added), NULL);
91 g_signal_connect(G_OBJECT(server), INDICATE_SERVER_SIGNAL_INTEREST_REMOVED, G_CALLBACK(interest_removed), NULL);97 g_signal_connect(G_OBJECT(server), INDICATE_SERVER_SIGNAL_INTEREST_REMOVED, G_CALLBACK(interest_removed), NULL);
9298
99 DbusmenuServer * dmserver = dbusmenu_server_new("/dbusmenu/path");
100 DbusmenuMenuitem * root = dbusmenu_menuitem_new();
101 dbusmenu_server_set_root(dmserver, root);
102 DbusmenuMenuitem * item;
103
104 item = dbusmenu_menuitem_new();
105 dbusmenu_menuitem_property_set(item, DBUSMENU_MENUITEM_PROP_LABEL, "Label 1");
106 dbusmenu_menuitem_child_append(root, item);
107 g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(menuitem_click), "Label 1");
108
109 item = dbusmenu_menuitem_new();
110 dbusmenu_menuitem_property_set(item, DBUSMENU_MENUITEM_PROP_LABEL, "Label 2");
111 dbusmenu_menuitem_child_append(root, item);
112 g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(menuitem_click), "Label 2");
113
114 indicate_server_set_menu(server, dmserver);
115
93 IndicateIndicator * indicator;116 IndicateIndicator * indicator;
94117
95 indicator = indicate_indicator_new();118 indicator = indicate_indicator_new();
96119
=== modified file 'libindicate/listener.c'
--- libindicate/listener.c 2010-02-10 14:44:22 +0000
+++ libindicate/listener.c 2010-02-18 15:29:09 +0000
@@ -712,6 +712,7 @@
712712
713typedef enum _get_property_type get_property_type;713typedef enum _get_property_type get_property_type;
714enum _get_property_type {714enum _get_property_type {
715 PROPERTY_TYPE_VALUE,
715 PROPERTY_TYPE_STRING,716 PROPERTY_TYPE_STRING,
716 PROPERTY_TYPE_TIME,717 PROPERTY_TYPE_TIME,
717 PROPERTY_TYPE_INT,718 PROPERTY_TYPE_INT,
@@ -749,6 +750,12 @@
749 }750 }
750751
751 switch (get_property_data->type) {752 switch (get_property_data->type) {
753 case PROPERTY_TYPE_VALUE: {
754 /* Just pass the GValue along. */
755 indicate_listener_get_property_value_cb cb =(indicate_listener_get_property_value_cb)get_property_data->cb;
756 cb(get_property_data->listener, get_property_data->server, get_property_data->indicator, get_property_data->property, &OUT_value, get_property_data->data);
757 break;
758 }
752 case PROPERTY_TYPE_STRING: {759 case PROPERTY_TYPE_STRING: {
753 /* Just pass the string along. */760 /* Just pass the string along. */
754 indicate_listener_get_property_cb cb = (indicate_listener_get_property_cb)get_property_data->cb;761 indicate_listener_get_property_cb cb = (indicate_listener_get_property_cb)get_property_data->cb;
@@ -807,6 +814,27 @@
807}814}
808815
809/**816/**
817 indicate_listener_get_property_value:
818 @listener: The #IndicateListener representing the connection
819 @server: The server that the indicator is on
820 @indicator: Which indicator is being queried
821 @property: Name of the property to get
822 @callback: The callback function to call with the data
823 @data: Arbitrary data to give the callback
824
825 A function to get a property from an indicator on a server
826 and bring it back locally. This wraps all the hassle of using
827 the DBus API and makes it pretty easy to get properties.
828
829 This function gets the raw gvalue data, without any conversion.
830*/
831void
832indicate_listener_get_property_value (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, indicate_listener_get_property_value_cb callback, gpointer data)
833{
834 return get_property_helper(listener, server, indicator, property, G_CALLBACK(callback), data, PROPERTY_TYPE_VALUE);
835}
836
837/**
810 indicate_listener_get_property:838 indicate_listener_get_property:
811 @listener: The #IndicateListener representing the connection839 @listener: The #IndicateListener representing the connection
812 @server: The server that the indicator is on840 @server: The server that the indicator is on
813841
=== modified file 'libindicate/listener.h'
--- libindicate/listener.h 2010-02-04 22:41:43 +0000
+++ libindicate/listener.h 2010-02-18 15:29:09 +0000
@@ -111,6 +111,7 @@
111111
112GType indicate_listener_get_type (void) G_GNUC_CONST;112GType indicate_listener_get_type (void) G_GNUC_CONST;
113113
114typedef void (*indicate_listener_get_property_value_cb) (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, const GValue * propertydata, gpointer data);
114typedef void (*indicate_listener_get_property_cb) (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, const gchar * propertydata, gpointer data);115typedef void (*indicate_listener_get_property_cb) (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, const gchar * propertydata, gpointer data);
115typedef void (*indicate_listener_get_property_time_cb) (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, const GTimeVal * propertydata, gpointer data);116typedef void (*indicate_listener_get_property_time_cb) (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, const GTimeVal * propertydata, gpointer data);
116typedef void (*indicate_listener_get_property_int_cb) (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gint propertydata, gpointer data);117typedef void (*indicate_listener_get_property_int_cb) (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gint propertydata, gpointer data);
@@ -121,6 +122,12 @@
121/* Create a new listener */122/* Create a new listener */
122IndicateListener * indicate_listener_new (void);123IndicateListener * indicate_listener_new (void);
123IndicateListener * indicate_listener_ref_default (void);124IndicateListener * indicate_listener_ref_default (void);
125void indicate_listener_get_property_value (IndicateListener * listener,
126 IndicateListenerServer * server,
127 IndicateListenerIndicator * indicator,
128 gchar * property,
129 indicate_listener_get_property_value_cb callback,
130 gpointer data);
124void indicate_listener_get_property (IndicateListener * listener,131void indicate_listener_get_property (IndicateListener * listener,
125 IndicateListenerServer * server,132 IndicateListenerServer * server,
126 IndicateListenerIndicator * indicator,133 IndicateListenerIndicator * indicator,
127134
=== modified file 'libindicate/server.c'
--- libindicate/server.c 2010-02-10 14:27:48 +0000
+++ libindicate/server.c 2010-02-18 15:29:09 +0000
@@ -52,6 +52,7 @@
52 REMOVE_INTEREST_FAILED,52 REMOVE_INTEREST_FAILED,
53 NO_MAX_INDICATORS_SET,53 NO_MAX_INDICATORS_SET,
54 MAX_INDICATORS_SET_FAILED,54 MAX_INDICATORS_SET_FAILED,
55 NO_SUCH_PROPERTY,
55 LAST_ERROR56 LAST_ERROR
56};57};
5758
@@ -1259,6 +1260,13 @@
12591260
1260 const GValue * ind_property = indicate_indicator_get_property_value(indicator, property);1261 const GValue * ind_property = indicate_indicator_get_property_value(indicator, property);
1261 if (ind_property == NULL) {1262 if (ind_property == NULL) {
1263 if (error != NULL) {
1264 g_set_error(error,
1265 indicate_server_error_quark(),
1266 NO_SUCH_PROPERTY,
1267 "Indicator %d has no property named '%s'",
1268 id, property);
1269 }
1262 return FALSE;1270 return FALSE;
1263 }1271 }
12641272
12651273
=== modified file 'tests/Makefile.am'
--- tests/Makefile.am 2010-02-04 22:41:43 +0000
+++ tests/Makefile.am 2010-02-18 15:29:09 +0000
@@ -267,7 +267,7 @@
267267
268test-max-indicators-repeat: test-max-indicators-client test-max-indicators-server-repeat Makefile.am268test-max-indicators-repeat: test-max-indicators-client test-max-indicators-server-repeat Makefile.am
269 @echo "#!/bin/sh" > $@269 @echo "#!/bin/sh" > $@
270 @echo "$(DBUS_RUNNER) --task ./test-max-indicators-client --task-name Client --task ./test-max-indicators-server-repeat --task-name Server" >> $@270 @echo "$(DBUS_RUNNER) --task ./test-max-indicators-client --task-name Client --task ./test-max-indicators-server-repeat --task-name Server --ignore-return " >> $@
271 @chmod +x $@271 @chmod +x $@
272272
273test_max_indicators_server_repeat_SOURCES = \273test_max_indicators_server_repeat_SOURCES = \

Subscribers

People subscribed via source and target branches

to all changes: