From 03077752f8a7b86e1008ca85d726690b0c8fac2f Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Wed, 8 Apr 2009 14:25:50 +0300 Subject: gtypified the interests enum. --- libindicate/Makefile.am | 44 ++++++++++++++++++++++++++++++++++++++++++-- libindicate/interests.h | 5 ++--- libindicate/server.h | 4 ---- 3 files changed, 44 insertions(+), 9 deletions(-) diff --git a/libindicate/Makefile.am b/libindicate/Makefile.am index c1900a6..91072f7 100644 --- a/libindicate/Makefile.am +++ b/libindicate/Makefile.am @@ -1,3 +1,6 @@ +MARSHAL_PREFIX = indicate_marshal +MARSHAL_FILE = indicate-marshal +ENUM_FILE = indicate-enum-types INCLUDES= \ -DG_LOG_DOMAIN=\"libindicate\" @@ -14,7 +17,9 @@ BUILT_SOURCES = \ dbus-listener-server.h \ dbus-listener-client.h \ listener-marshal.c \ - listener-marshal.h + listener-marshal.h \ + $(ENUM_FILE).h \ + $(ENUM_FILE).c lib_LTLIBRARIES = \ libindicate.la @@ -26,7 +31,8 @@ indicate_headers = \ indicator-message.h \ listener.h \ server.h \ - interests.h + interests.h \ + $(ENUM_FILE).h libindicateinclude_HEADERS = \ $(indicate_headers) @@ -37,6 +43,7 @@ libindicate_la_SOURCES = \ dbus-indicate-client.h \ dbus-listener-server.h \ dbus-listener-client.h \ + indicate-enum-types.c \ server.c \ listener.c \ listener-marshal.c \ @@ -97,6 +104,39 @@ listener-marshal.c: $(srcdir)/listener-marshal.list pkgconfig_DATA = indicate.pc pkgconfigdir = $(libdir)/pkgconfig +$(ENUM_FILE).h: s-enum-types-h + @true +s-enum-types-h: $(indicate_headers) Makefile + ( cd $(srcdir) && glib-mkenums \ + --fhead "#ifndef _INDICATE_ENUM_TYPES_H_\n#define _INDICATE_ENUM_TYPES_H_\n\n#include \n\nG_BEGIN_DECLS\n" \ + --fprod "/* enumerations from \"@filename@\" */\n" \ + --vhead "GType @enum_name@_get_type(void);\n#define INDICATE_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ + --ftail "G_END_DECLS\n\n#endif /* _INDICATE_ENUM_TYPES_H_ */" \ + interests.h ) > tmp-$(ENUM_FILE).h \ + && (cmp -s tmp-$(ENUM_FILE).h $(ENUM_FILE).h || cp tmp-$(ENUM_FILE).h $(ENUM_FILE).h ) \ + && rm -f tmp-$(ENUM_FILE).h \ + && echo timestamp > $(@F) + +$(ENUM_FILE).c: s-enum-types-c + @true +s-enum-types-c: $(indicate_headers) Makefile + ( cd $(srcdir) && glib-mkenums \ + --fhead "#include \n#include " \ + --fprod "\n/* enumerations from \"@filename@\" */" \ + --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \ + --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ + --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \ + interests.h ) > tmp-$(ENUM_FILE).c \ + && (cmp -s tmp-$(ENUM_FILE).c $(ENUM_FILE).c || cp tmp-$(ENUM_FILE).c $(ENUM_FILE).c ) \ + && rm -f tmp-$(ENUM_FILE).c \ + && echo timestamp > $(@F) + +CLEANFILES = \ + $(ENUM_FILE).c \ + $(ENUM_FILE).h \ + s-enum-types-c \ + s-enum-types-h + if USE_GIR gobjectintrospection_gir_DATA = \ diff --git a/libindicate/interests.h b/libindicate/interests.h index 70c52d9..1c6215a 100644 --- a/libindicate/interests.h +++ b/libindicate/interests.h @@ -34,8 +34,7 @@ License version 3 and version 2.1 along with this program. If not, see G_BEGIN_DECLS -typedef enum _IndicateInterests IndicateInterests; -enum _IndicateInterests { +typedef enum { INDICATE_INTEREST_NONE, /**< We're of no interest */ INDICATE_INTEREST_SERVER_DISPLAY, /**< Displays the server's existance to the user */ INDICATE_INTEREST_SERVER_SIGNAL, /**< Will send signals to the server to be displayed */ @@ -43,7 +42,7 @@ enum _IndicateInterests { INDICATE_INTEREST_INDICATOR_SIGNAL, /**< Will return signals based on individual indicators being responded to */ INDICATE_INTEREST_INDICATOR_COUNT, /**< Only displays a count of the indicators */ INDICATE_INTEREST_LAST /**< Makes merges and counting easier */ -}; +} IndicateInterests; G_END_DECLS diff --git a/libindicate/server.h b/libindicate/server.h index cfb4334..5db46f9 100644 --- a/libindicate/server.h +++ b/libindicate/server.h @@ -124,10 +124,6 @@ void indicate_server_remove_indicator (IndicateServer * server, IndicateIndicato IndicateServer * indicate_server_ref_default (void); void indicate_server_set_default (IndicateServer * server); -/* Check to see if there is someone, out there, who likes this */ -gboolean indicate_server_check_interest (IndicateServer * server, IndicateInterests interest); - - /* Signal emission functions for sub-classes of the server */ void indicate_server_emit_indicator_added (IndicateServer *server, guint id, const gchar *type); void indicate_server_emit_indicator_removed (IndicateServer *server, guint id, const gchar *type); -- cgit v1.2.3 From a300f6cd4ed76fbc68c379bcc6729aa71cfc1759 Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Wed, 8 Apr 2009 16:47:46 +0300 Subject: GBoxed IndicateListenerServer --- libindicate/listener.c | 37 +++++++++++++++++++++++++++++++++++++ libindicate/listener.h | 5 +++++ 2 files changed, 42 insertions(+) diff --git a/libindicate/listener.c b/libindicate/listener.c index 381a5f9..aa36d18 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -1024,3 +1024,40 @@ indicate_listener_server_check_interest (IndicateListener * listener, IndicateLi return server->interests[interest]; } +GType +indicate_listener_server_get_gtype (void) +{ + static GType our_type = 0; + + if (our_type == 0) + our_type = g_boxed_type_register_static ("IndicateListenerServer", + (GBoxedCopyFunc) indicate_listener_server_copy, + (GBoxedFreeFunc) indicate_listener_server_free); + + return our_type; +} + +IndicateListenerServer * +indicate_listener_server_copy (const IndicateListenerServer *listener_server) +{ + IndicateListenerServer *retval; + retval = (IndicateListenerServer *)g_memdup ( + listener_server, + sizeof (IndicateListenerServer)); + + g_object_ref (retval->proxy); + dbus_g_connection_ref (retval->connection); + g_stpcpy (retval->name, listener_server->name); + + return retval; +} + +void +indicate_listener_server_free (IndicateListenerServer *listener_server) +{ + g_free (listener_server->name); + g_object_unref (listener_server->proxy); + dbus_g_connection_unref (listener_server->connection); + + g_free (listener_server); +} diff --git a/libindicate/listener.h b/libindicate/listener.h index 0fdaa9b..5a1e991 100644 --- a/libindicate/listener.h +++ b/libindicate/listener.h @@ -59,6 +59,11 @@ G_BEGIN_DECLS #define INDICATE_LISTENER_INDICATOR_ID(indicator) (indicate_listener_indicator_get_id(indicator)) typedef struct _IndicateListenerServer IndicateListenerServer; +#define INDICATE_TYPE_LISTENER_SERVER (indicate_listener_server_get_gtype ()) +GType indicate_listener_server_get_gtype (void) G_GNUC_CONST; +IndicateListenerServer *indicate_listener_server_copy (const IndicateListenerServer *listener_server); +void indicate_listener_server_free (IndicateListenerServer *listener_server); + typedef struct _IndicateListenerIndicator IndicateListenerIndicator; typedef struct _IndicateListener IndicateListener; -- cgit v1.2.3 From 8f4019b3cc4f01cc2f37473c548dc8986d151586 Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Wed, 8 Apr 2009 18:14:27 +0300 Subject: Changed marshallers to GBoxed for IndicatorListenerServer. Make copy/free functions empty for now. --- libindicate/listener-marshal.list | 6 +++--- libindicate/listener.c | 38 ++++++++++++-------------------------- 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/libindicate/listener-marshal.list b/libindicate/listener-marshal.list index a3d20a9..37dade3 100644 --- a/libindicate/listener-marshal.list +++ b/libindicate/listener-marshal.list @@ -28,8 +28,8 @@ # IndicatorAdded, IndicatorRemoved, IndicatorModified VOID:UINT,STRING # Local indicator_added, indicator_removed -VOID:POINTER,POINTER,STRING +VOID:BOXED,POINTER,STRING # Local indicator_modified -VOID:POINTER,POINTER,STRING,STRING +VOID:BOXED,POINTER,STRING,STRING # Local server_added and server_removed -VOID:POINTER,STRING +VOID:BOXED,STRING diff --git a/libindicate/listener.c b/libindicate/listener.c index aa36d18..3a3c34b 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -153,36 +153,36 @@ indicate_listener_class_init (IndicateListenerClass * class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, indicator_added), NULL, NULL, - _indicate_listener_marshal_VOID__POINTER_POINTER_STRING, - G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_STRING); + _indicate_listener_marshal_VOID__BOXED_POINTER_STRING, + G_TYPE_NONE, 3, INDICATE_TYPE_LISTENER_SERVER, G_TYPE_POINTER, G_TYPE_STRING); signals[INDICATOR_REMOVED] = g_signal_new(INDICATE_LISTENER_SIGNAL_INDICATOR_REMOVED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, indicator_removed), NULL, NULL, - _indicate_listener_marshal_VOID__POINTER_POINTER_STRING, - G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_STRING); + _indicate_listener_marshal_VOID__BOXED_POINTER_STRING, + G_TYPE_NONE, 3, INDICATE_TYPE_LISTENER_SERVER, G_TYPE_POINTER, G_TYPE_STRING); signals[INDICATOR_MODIFIED] = g_signal_new(INDICATE_LISTENER_SIGNAL_INDICATOR_MODIFIED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, indicator_modified), NULL, NULL, - _indicate_listener_marshal_VOID__POINTER_POINTER_STRING_STRING, - G_TYPE_NONE, 4, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING); + _indicate_listener_marshal_VOID__BOXED_POINTER_STRING_STRING, + G_TYPE_NONE, 4, INDICATE_TYPE_LISTENER_SERVER, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING); signals[SERVER_ADDED] = g_signal_new(INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, server_added), NULL, NULL, - _indicate_listener_marshal_VOID__POINTER_STRING, - G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_STRING); + _indicate_listener_marshal_VOID__BOXED_STRING, + G_TYPE_NONE, 2, INDICATE_TYPE_LISTENER_SERVER, G_TYPE_STRING); signals[SERVER_REMOVED] = g_signal_new(INDICATE_LISTENER_SIGNAL_SERVER_REMOVED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, server_removed), NULL, NULL, - _indicate_listener_marshal_VOID__POINTER_STRING, - G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_STRING); + _indicate_listener_marshal_VOID__BOXED_STRING, + G_TYPE_NONE, 2, INDICATE_TYPE_LISTENER_SERVER, G_TYPE_STRING); dbus_g_object_register_marshaller(_indicate_listener_marshal_VOID__UINT_STRING, G_TYPE_NONE, @@ -686,7 +686,7 @@ proxy_indicator_modified (DBusGProxy * proxy, guint id, const gchar * property, return; } - g_signal_emit(proxyt->listener, signals[INDICATOR_MODIFIED], 0, &proxyt->server, GUINT_TO_POINTER(id), type, property, TRUE); + g_signal_emit(proxyt->listener, signals[INDICATOR_MODIFIED], 0, proxyt->server, GUINT_TO_POINTER(id), type, property, TRUE); return; } @@ -1040,24 +1040,10 @@ indicate_listener_server_get_gtype (void) IndicateListenerServer * indicate_listener_server_copy (const IndicateListenerServer *listener_server) { - IndicateListenerServer *retval; - retval = (IndicateListenerServer *)g_memdup ( - listener_server, - sizeof (IndicateListenerServer)); - - g_object_ref (retval->proxy); - dbus_g_connection_ref (retval->connection); - g_stpcpy (retval->name, listener_server->name); - - return retval; + return listener_server; } void indicate_listener_server_free (IndicateListenerServer *listener_server) { - g_free (listener_server->name); - g_object_unref (listener_server->proxy); - dbus_g_connection_unref (listener_server->connection); - - g_free (listener_server); } -- cgit v1.2.3 From a3188d21d2682bf371e9e76638c26550d95a84c9 Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Fri, 10 Apr 2009 12:51:16 +0300 Subject: changed IndicateListenerServer to a gtyped pointer instead of a gboxed. --- libindicate/listener-marshal.list | 6 +++--- libindicate/listener.c | 26 +++++++------------------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/libindicate/listener-marshal.list b/libindicate/listener-marshal.list index 37dade3..a3d20a9 100644 --- a/libindicate/listener-marshal.list +++ b/libindicate/listener-marshal.list @@ -28,8 +28,8 @@ # IndicatorAdded, IndicatorRemoved, IndicatorModified VOID:UINT,STRING # Local indicator_added, indicator_removed -VOID:BOXED,POINTER,STRING +VOID:POINTER,POINTER,STRING # Local indicator_modified -VOID:BOXED,POINTER,STRING,STRING +VOID:POINTER,POINTER,STRING,STRING # Local server_added and server_removed -VOID:BOXED,STRING +VOID:POINTER,STRING diff --git a/libindicate/listener.c b/libindicate/listener.c index 3a3c34b..13c9e81 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -153,35 +153,35 @@ indicate_listener_class_init (IndicateListenerClass * class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, indicator_added), NULL, NULL, - _indicate_listener_marshal_VOID__BOXED_POINTER_STRING, + _indicate_listener_marshal_VOID__POINTER_POINTER_STRING, G_TYPE_NONE, 3, INDICATE_TYPE_LISTENER_SERVER, G_TYPE_POINTER, G_TYPE_STRING); signals[INDICATOR_REMOVED] = g_signal_new(INDICATE_LISTENER_SIGNAL_INDICATOR_REMOVED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, indicator_removed), NULL, NULL, - _indicate_listener_marshal_VOID__BOXED_POINTER_STRING, + _indicate_listener_marshal_VOID__POINTER_POINTER_STRING, G_TYPE_NONE, 3, INDICATE_TYPE_LISTENER_SERVER, G_TYPE_POINTER, G_TYPE_STRING); signals[INDICATOR_MODIFIED] = g_signal_new(INDICATE_LISTENER_SIGNAL_INDICATOR_MODIFIED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, indicator_modified), NULL, NULL, - _indicate_listener_marshal_VOID__BOXED_POINTER_STRING_STRING, + _indicate_listener_marshal_VOID__POINTER_POINTER_STRING_STRING, G_TYPE_NONE, 4, INDICATE_TYPE_LISTENER_SERVER, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING); signals[SERVER_ADDED] = g_signal_new(INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, server_added), NULL, NULL, - _indicate_listener_marshal_VOID__BOXED_STRING, + _indicate_listener_marshal_VOID__POINTER_STRING, G_TYPE_NONE, 2, INDICATE_TYPE_LISTENER_SERVER, G_TYPE_STRING); signals[SERVER_REMOVED] = g_signal_new(INDICATE_LISTENER_SIGNAL_SERVER_REMOVED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, server_removed), NULL, NULL, - _indicate_listener_marshal_VOID__BOXED_STRING, + _indicate_listener_marshal_VOID__POINTER_STRING, G_TYPE_NONE, 2, INDICATE_TYPE_LISTENER_SERVER, G_TYPE_STRING); dbus_g_object_register_marshaller(_indicate_listener_marshal_VOID__UINT_STRING, @@ -686,7 +686,7 @@ proxy_indicator_modified (DBusGProxy * proxy, guint id, const gchar * property, return; } - g_signal_emit(proxyt->listener, signals[INDICATOR_MODIFIED], 0, proxyt->server, GUINT_TO_POINTER(id), type, property, TRUE); + g_signal_emit(proxyt->listener, signals[INDICATOR_MODIFIED], 0, &proxyt->server, GUINT_TO_POINTER(id), type, property, TRUE); return; } @@ -1030,20 +1030,8 @@ indicate_listener_server_get_gtype (void) static GType our_type = 0; if (our_type == 0) - our_type = g_boxed_type_register_static ("IndicateListenerServer", - (GBoxedCopyFunc) indicate_listener_server_copy, - (GBoxedFreeFunc) indicate_listener_server_free); + our_type = g_pointer_type_register_static ("IndicateListenerServer"); return our_type; } -IndicateListenerServer * -indicate_listener_server_copy (const IndicateListenerServer *listener_server) -{ - return listener_server; -} - -void -indicate_listener_server_free (IndicateListenerServer *listener_server) -{ -} -- cgit v1.2.3 From bcdeb139acbff6d15d442f2bac3b1bb751413645 Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Fri, 10 Apr 2009 13:16:39 +0300 Subject: gtypify IndicateListenerIndicator --- libindicate/listener.c | 17 ++++++++++++++--- libindicate/listener.h | 4 ++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/libindicate/listener.c b/libindicate/listener.c index 13c9e81..0646e81 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -154,21 +154,21 @@ indicate_listener_class_init (IndicateListenerClass * class) G_STRUCT_OFFSET (IndicateListenerClass, indicator_added), NULL, NULL, _indicate_listener_marshal_VOID__POINTER_POINTER_STRING, - G_TYPE_NONE, 3, INDICATE_TYPE_LISTENER_SERVER, G_TYPE_POINTER, G_TYPE_STRING); + G_TYPE_NONE, 3, INDICATE_TYPE_LISTENER_SERVER, INDICATE_TYPE_LISTENER_INDICATOR, G_TYPE_STRING); signals[INDICATOR_REMOVED] = g_signal_new(INDICATE_LISTENER_SIGNAL_INDICATOR_REMOVED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, indicator_removed), NULL, NULL, _indicate_listener_marshal_VOID__POINTER_POINTER_STRING, - G_TYPE_NONE, 3, INDICATE_TYPE_LISTENER_SERVER, G_TYPE_POINTER, G_TYPE_STRING); + G_TYPE_NONE, 3, INDICATE_TYPE_LISTENER_SERVER, INDICATE_TYPE_LISTENER_INDICATOR, G_TYPE_STRING); signals[INDICATOR_MODIFIED] = g_signal_new(INDICATE_LISTENER_SIGNAL_INDICATOR_MODIFIED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, indicator_modified), NULL, NULL, _indicate_listener_marshal_VOID__POINTER_POINTER_STRING_STRING, - G_TYPE_NONE, 4, INDICATE_TYPE_LISTENER_SERVER, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING); + G_TYPE_NONE, 4, INDICATE_TYPE_LISTENER_SERVER, INDICATE_TYPE_LISTENER_INDICATOR, G_TYPE_STRING, G_TYPE_STRING); signals[SERVER_ADDED] = g_signal_new(INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, @@ -1035,3 +1035,14 @@ indicate_listener_server_get_gtype (void) return our_type; } +GType +indicate_listener_indicator_get_gtype (void) +{ + static GType our_type = 0; + + if (our_type == 0) + our_type = g_pointer_type_register_static ("IndicateListenerIndicator"); + + return our_type; +} + diff --git a/libindicate/listener.h b/libindicate/listener.h index 5a1e991..5bfd298 100644 --- a/libindicate/listener.h +++ b/libindicate/listener.h @@ -61,10 +61,10 @@ G_BEGIN_DECLS typedef struct _IndicateListenerServer IndicateListenerServer; #define INDICATE_TYPE_LISTENER_SERVER (indicate_listener_server_get_gtype ()) GType indicate_listener_server_get_gtype (void) G_GNUC_CONST; -IndicateListenerServer *indicate_listener_server_copy (const IndicateListenerServer *listener_server); -void indicate_listener_server_free (IndicateListenerServer *listener_server); typedef struct _IndicateListenerIndicator IndicateListenerIndicator; +#define INDICATE_TYPE_LISTENER_INDICATOR (indicate_listener_indicator_get_gtype ()) +GType indicate_listener_indicator_get_gtype (void) G_GNUC_CONST; typedef struct _IndicateListener IndicateListener; struct _IndicateListener { -- cgit v1.2.3 From 70697a6c0c3906e4825dadaf4d37ec6f2d0ab557 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 10 Apr 2009 14:07:43 -0500 Subject: Marking the dev branch as such. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b86656d..15e4110 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_INIT(src/applet-main.c) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-applet, 0.1.5) +AM_INIT_AUTOMAKE(indicator-applet, 0.2.0dev) AM_MAINTAINER_MODE -- cgit v1.2.3 From f4bfa1ff71ef925907901dc0c438328891daca1c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 10 Apr 2009 14:32:37 -0500 Subject: Create the virtual function for checking interest. --- libindicate/server.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libindicate/server.c b/libindicate/server.c index 9e33516..1378a0d 100644 --- a/libindicate/server.c +++ b/libindicate/server.c @@ -1202,6 +1202,19 @@ _indicate_server_remove_interest (IndicateServer * server, gchar * interest, DBu return FALSE; } +gboolean +indicate_server_check_interest (IndicateServer * server, IndicateInterests interest) +{ + IndicateServerClass * class = INDICATE_SERVER_GET_CLASS(server); + + if (class != NULL && class->check_interest != NULL) { + return class->check_interest (server, interest); + } + + g_warning("check_interest function not implemented in this server class: %s", G_OBJECT_TYPE_NAME(server)); + return FALSE; +} + /* Signal emission functions for sub-classes of the server */ void indicate_server_emit_indicator_added (IndicateServer *server, guint id, const gchar *type) -- cgit v1.2.3 -- cgit v1.2.3 From 20836b86feb5aad4c938a4af26e57f544e75a69c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 10 Apr 2009 15:51:26 -0500 Subject: Adding in libxml linking --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 15e4110..ca46ff9 100644 --- a/configure.ac +++ b/configure.ac @@ -50,11 +50,13 @@ AM_GCONF_SOURCE_2 GLIB_REQUIRED_VERSION=2.18 GIO_REQUIRED_VERSION=2.18 GDK_PIXBUF_REQUIRED_VERSION=2.12 +XML_REQUIRED_VERSION=2.6 PKG_CHECK_MODULES(LIBINDICATE, glib-2.0 >= $GLIB_REQUIRED_VERSION gio-2.0 >= $GIO_REQUIRED_VERSION gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED_VERSION - dbus-glib-1 >= $DBUS_REQUIRED_VERSION) + dbus-glib-1 >= $DBUS_REQUIRED_VERSION + libxml-2.0 >= $XML_REQUIRED_VERSION) AC_SUBST(LIBINDICATE_CFLAGS) AC_SUBST(LIBINDICATE_LIBS) -- cgit v1.2.3 From ce664599c72dcb80f9e0427a2a49fc3c26fb79c8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sun, 12 Apr 2009 21:41:48 -0500 Subject: Proto-pseudo-code for the introspection functions that are going to be needed --- libindicate/listener.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/libindicate/listener.c b/libindicate/listener.c index 0646e81..8ae3973 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -1046,3 +1046,34 @@ indicate_listener_indicator_get_gtype (void) return our_type; } +static const gchar * _introspector_path[] = ["", "org", "freedesktop", "indicate", NULL]; +static const gchar * _introspector_interface = "org.freedesktop.indicator"; + +void +introspect_this (gchar * xml, IndicateServer * server) +{ + if (xml != NULL) { + /* Parse the XML */ + + /* Check for root being "node" */ + + const gchar * nodename = NULL; + const gchar * nameval = NULL; + if (_introspector_path[server->introspect_level] == NULL) { + /* We're looking for our interface */ + nodename = "interface"; + nameval = _introspector_interface; + } else { + /* We're looking for our next node */ + nodename = "node"; + nameval = _introspector_path[server->introspect_level]; + } + + } else { + server->introspect_level = 0; + } + + dbus_proxy_create(); + dbus_proxy_call(intropsect_this); + +} -- cgit v1.2.3 From bde7e27a7b972017f16ebf40ad173896d22bec25 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 13 Apr 2009 13:30:31 -0500 Subject: Whoa, it like builds and stuff --- libindicate/listener.c | 61 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 6 deletions(-) diff --git a/libindicate/listener.c b/libindicate/listener.c index b647f0a..6613e3d 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -27,6 +27,9 @@ License version 3 and version 2.1 along with this program. If not, see */ +#include +#include + #include "listener.h" #include "listener-marshal.h" #include @@ -89,6 +92,7 @@ typedef struct { gchar * type; IndicateListener * listener; GHashTable * indicators; + guint introspect_level; IndicateListenerServer server; } proxy_t; @@ -1046,17 +1050,29 @@ indicate_listener_indicator_get_gtype (void) return our_type; } -static const gchar * _introspector_path[] = ["", "org", "freedesktop", "indicate", NULL]; +static const gchar * _introspector_path[] = {"", "org", "freedesktop", "indicate", NULL}; +static const gchar * _introspector_fullpath[] = {"/", "/org", "/org/freedesktop", "/org/freedesktop/indicate", NULL}; static const gchar * _introspector_interface = "org.freedesktop.indicator"; -void -introspect_this (gchar * xml, IndicateServer * server) +static void +introspect_this (DBusGProxy * proxy, char * OUT_data, GError * error, gpointer data) { - if (xml != NULL) { + g_debug("Introspect this:\n%s", OUT_data); + proxy_t * server = (proxy_t *)data; + if (OUT_data != NULL) { + xmlDocPtr xmldoc; /* Parse the XML */ + xmldoc = xmlReadMemory(OUT_data, g_utf8_strlen(OUT_data, 16*1024), "introspection.xml", NULL, 0); /* Check for root being "node" */ + xmlNodePtr root = xmlDocGetRootElement(xmldoc); + if (g_strcmp(root->name, "node") != 0) { + xmlFreeDoc(xmldoc); + g_warning("Introspection data from %s is not valid: %s", server->name, OUT_data); + return; + } + server->introspect_level += 1; const gchar * nodename = NULL; const gchar * nameval = NULL; if (_introspector_path[server->introspect_level] == NULL) { @@ -1069,11 +1085,44 @@ introspect_this (gchar * xml, IndicateServer * server) nameval = _introspector_path[server->introspect_level]; } + gboolean found = FALSE; + xmlNodePtr children; + for (children = root->children; children != NULL; children = children->next) { + gchar * xmlnameval = NULL; + if (g_strcmp0(children->name, nodename) == 0) { + xmlAttrPtr attrib; + for (attrib = children->properties; attrib != NULL; attrib = attrib->next) { + if (g_strcmp0(attrib->name, "name") == 0) { + if (attrib->children != NULL) { + xmlnameval = attrib->children->content; + } + break; + } + } + + if (!g_strcmp0(nameval, xmlnameval)) { + found = TRUE; + break; + } + } + } + + xmlFreeDoc(xmldoc); + + if (!found) { + /* Ah, nothing we're interested in */ + return; + } } else { server->introspect_level = 0; } - dbus_proxy_create(); - dbus_proxy_call(intropsect_this); + DBusGProxy * newproxy = dbus_g_proxy_new_for_name(server->connection, + server->name, + _introspector_fullpath[server->introspect_level], + DBUS_INTERFACE_INTROSPECTABLE); + org_freedesktop_DBus_Introspectable_introspect_async(newproxy, introspect_this, server); + + return; } -- cgit v1.2.3 From 24e268d166ef026a3f1c4e7b09ae13d15bf427eb Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 13 Apr 2009 14:07:46 -0500 Subject: Fleshing out some --- libindicate/listener.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libindicate/listener.c b/libindicate/listener.c index 6613e3d..420d8cd 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -1059,6 +1059,16 @@ introspect_this (DBusGProxy * proxy, char * OUT_data, GError * error, gpointer d { g_debug("Introspect this:\n%s", OUT_data); proxy_t * server = (proxy_t *)data; + if (proxy != NULL) { + g_object_unref(proxy); + } + if (error != NULL) { + /* We probably couldn't introspect that far up. That's + life, it happens. */ + g_debug("Introspection error on %s object %s: %s", server->name, _introspector_fullpath[server->introspect_level], error->message); + return; + } + if (OUT_data != NULL) { xmlDocPtr xmldoc; /* Parse the XML */ -- cgit v1.2.3 From dec69be399365590e8bc5140f470aafd805ff17d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 13 Apr 2009 14:15:01 -0500 Subject: Okay, connected into that other there code... let's see what happens. --- libindicate/listener.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/libindicate/listener.c b/libindicate/listener.c index 420d8cd..fd35d66 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -133,6 +133,7 @@ static void proxy_indicator_modified (DBusGProxy * proxy, guint id, const gchar static void proxy_get_indicator_list (DBusGProxy * proxy, GArray * indicators, GError * error, gpointer data); static void proxy_get_indicator_type (DBusGProxy * proxy, gchar * type, GError * error, gpointer data); static void proxy_indicators_free (gpointer data); +static void introspect_this (DBusGProxy * proxy, char * OUT_data, GError * error, gpointer data); /* DBus interface */ gboolean _indicate_listener_get_indicator_servers (IndicateListener * listener, GList * servers); @@ -502,13 +503,9 @@ todo_idle (gpointer data) priv->proxies_possible = g_list_prepend(priv->proxies_possible, proxyt); - /* I think that we need to have this as there is a race - * condition here. If someone comes on the bus and we get - * that message, but before we set up the handler for the ServerShow - * signal it gets sent, we wouldn't get it. So then we would - * miss an indicator server coming on the bus. I'd like to not - * generate a warning in every app with DBus though. */ - indicate_listener_server_get_type(listener, &proxyt->server, get_type_cb, proxyt); + /* Look through the introspection data to see if this + is already a server */ + introspect_this (NULL, NULL, NULL, proxyt); return TRUE; } @@ -1123,6 +1120,13 @@ introspect_this (DBusGProxy * proxy, char * OUT_data, GError * error, gpointer d /* Ah, nothing we're interested in */ return; } + + if (_introspector_path[server->introspect_level] == NULL) { + /* If we've found the interface at the end of the tree, whoo! hoo! */ + /* Now we know it's safe to get the type on it */ + indicate_listener_server_get_type(server->listener, &server->server, get_type_cb, server); + return; + } } else { server->introspect_level = 0; } -- cgit v1.2.3 From 135906b4b250f8c5be3a1a157d77c689313f381a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 13 Apr 2009 14:16:25 -0500 Subject: Ah, a typo. Bother. --- libindicate/listener.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libindicate/listener.c b/libindicate/listener.c index fd35d66..5ae3e09 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -1073,7 +1073,7 @@ introspect_this (DBusGProxy * proxy, char * OUT_data, GError * error, gpointer d /* Check for root being "node" */ xmlNodePtr root = xmlDocGetRootElement(xmldoc); - if (g_strcmp(root->name, "node") != 0) { + if (g_strcmp0(root->name, "node") != 0) { xmlFreeDoc(xmldoc); g_warning("Introspection data from %s is not valid: %s", server->name, OUT_data); return; -- cgit v1.2.3 From 46a050c2eac7bc12566339cbdea6bdb3376ccecf Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 13 Apr 2009 14:41:33 -0500 Subject: Less debug --- libindicate/listener.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libindicate/listener.c b/libindicate/listener.c index 5ae3e09..20a3278 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -1054,7 +1054,7 @@ static const gchar * _introspector_interface = "org.freedesktop.indicator"; static void introspect_this (DBusGProxy * proxy, char * OUT_data, GError * error, gpointer data) { - g_debug("Introspect this:\n%s", OUT_data); + /* g_debug("Introspect this:\n%s", OUT_data); */ proxy_t * server = (proxy_t *)data; if (proxy != NULL) { g_object_unref(proxy); -- cgit v1.2.3 From e32b37d049968231cb19129654fd3be997efb48b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 13 Apr 2009 14:47:35 -0500 Subject: Commenting out some debug messages --- libindicate/listener.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libindicate/listener.c b/libindicate/listener.c index 20a3278..a314ea8 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -1061,8 +1061,9 @@ introspect_this (DBusGProxy * proxy, char * OUT_data, GError * error, gpointer d } if (error != NULL) { /* We probably couldn't introspect that far up. That's - life, it happens. */ - g_debug("Introspection error on %s object %s: %s", server->name, _introspector_fullpath[server->introspect_level], error->message); + life, it happens. Or there's a timeout, that happens + too, I guess some apps are too busy for us. */ + /* g_debug("Introspection error on %s object %s: %s", server->name, _introspector_fullpath[server->introspect_level], error->message); */ return; } -- cgit v1.2.3 From a1ccd1a94e3b2ec2c7ce60c5b6b8824a2bf04076 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 20 Apr 2009 09:34:10 -0500 Subject: Moving tests to examples --- .bzrignore | 7 +++ Makefile.am | 2 +- configure.ac | 2 +- examples/Makefile.am | 72 +++++++++++++++++++++ examples/im-client.c | 111 ++++++++++++++++++++++++++++++++ examples/indicate-alot.c | 45 +++++++++++++ examples/indicate-and-crash.c | 41 ++++++++++++ examples/listen-and-print.c | 143 ++++++++++++++++++++++++++++++++++++++++++ examples/show-hide-server.c | 44 +++++++++++++ examples/test.js | 6 ++ tests/Makefile.am | 72 --------------------- tests/im-client.c | 111 -------------------------------- tests/indicate-alot.c | 45 ------------- tests/indicate-and-crash.c | 41 ------------ tests/listen-and-print.c | 143 ------------------------------------------ tests/show-hide-server.c | 44 ------------- tests/test.js | 6 -- 17 files changed, 471 insertions(+), 464 deletions(-) create mode 100644 examples/Makefile.am create mode 100644 examples/im-client.c create mode 100644 examples/indicate-alot.c create mode 100644 examples/indicate-and-crash.c create mode 100644 examples/listen-and-print.c create mode 100644 examples/show-hide-server.c create mode 100755 examples/test.js delete mode 100644 tests/Makefile.am delete mode 100644 tests/im-client.c delete mode 100644 tests/indicate-alot.c delete mode 100644 tests/indicate-and-crash.c delete mode 100644 tests/listen-and-print.c delete mode 100644 tests/show-hide-server.c delete mode 100755 tests/test.js diff --git a/.bzrignore b/.bzrignore index 2e5dd36..6d29896 100644 --- a/.bzrignore +++ b/.bzrignore @@ -60,3 +60,10 @@ libindicate/indicate-enum-types.h libindicate/libindicate_la-indicate-enum-types.lo libindicate/s-enum-types-c libindicate/s-enum-types-h +examples/.deps +examples/.libs +examples/im-client +examples/indicate-alot +examples/indicate-and-crash +examples/listen-and-print +examples/show-hide-server diff --git a/Makefile.am b/Makefile.am index d4f7ca2..7230246 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,7 @@ SUBDIRS = \ src \ libindicate \ - tests \ + examples \ data \ po \ docs diff --git a/configure.ac b/configure.ac index ca46ff9..bfa784a 100644 --- a/configure.ac +++ b/configure.ac @@ -161,7 +161,7 @@ Makefile src/Makefile libindicate/Makefile libindicate/indicate.pc -tests/Makefile +examples/Makefile data/Makefile po/Makefile.in docs/Makefile diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 0000000..862046e --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,72 @@ + +libexec_PROGRAMS = \ + indicate-and-crash \ + indicate-alot \ + listen-and-print \ + im-client \ + show-hide-server + +indicate_and_crash_SOURCES = \ + indicate-and-crash.c + +indicate_and_crash_CFLAGS = \ + -I $(srcdir)/.. \ + $(LIBINDICATE_CFLAGS) + +indicate_and_crash_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + +indicate_alot_SOURCES = \ + indicate-alot.c + +indicate_alot_CFLAGS = \ + -I $(srcdir)/.. \ + $(LIBINDICATE_CFLAGS) + +indicate_alot_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + +listen_and_print_SOURCES = \ + listen-and-print.c + +listen_and_print_CFLAGS = \ + -I $(srcdir)/.. \ + $(LIBINDICATE_CFLAGS) + +listen_and_print_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + +im_client_SOURCES = \ + im-client.c + +im_client_CFLAGS = \ + -I $(srcdir)/.. \ + $(LIBINDICATE_CFLAGS) + +im_client_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + +show_hide_server_SOURCES = \ + show-hide-server.c + +show_hide_server_CFLAGS = \ + -I $(srcdir)/.. \ + $(LIBINDICATE_CFLAGS) + +show_hide_server_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + +examplesdir = $(docdir)/examples/ + +examples_DATA = \ + $(indicate_and_crash_SOURCES) \ + $(indicate_alot_SOURCES) \ + $(listen_and_print_SOURCES) \ + $(im_client_SOURCES) + +EXTRA_DIST = $(examples_DATA) diff --git a/examples/im-client.c b/examples/im-client.c new file mode 100644 index 0000000..bf2fbb2 --- /dev/null +++ b/examples/im-client.c @@ -0,0 +1,111 @@ +/* +A test for libindicate to ensure its quality. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see . +*/ + +#include +#include "libindicate/server.h" +#include "libindicate/indicator-message.h" + +gchar * patha = "/usr/share/icons/hicolor/16x16/apps/empathy.png"; +gchar * pathb = "/usr/share/icons/hicolor/22x22/apps/empathy.png"; +gchar * lastpath = NULL; + +static gboolean +timeout_cb (gpointer data) +{ + g_debug("Modifying properties"); + + IndicateIndicator * indicator = INDICATE_INDICATOR(data); + + GTimeVal time; + g_get_current_time(&time); + indicate_indicator_set_property_time(INDICATE_INDICATOR(indicator), "time", &time); + + if (lastpath == patha) { + lastpath = pathb; + } else { + lastpath = patha; + } + + GdkPixbuf * pixbuf = gdk_pixbuf_new_from_file(lastpath, NULL); + g_return_val_if_fail(pixbuf != NULL, TRUE); + + indicate_indicator_set_property_icon(INDICATE_INDICATOR(indicator), "icon", pixbuf); + g_object_unref(G_OBJECT(pixbuf)); + + return TRUE; +} + +static void +display (IndicateIndicator * indicator, gpointer data) +{ + g_debug("Ah, my indicator has been displayed"); +} + +static void +server_display (IndicateServer * server, gpointer data) +{ + g_debug("Ah, my server has been displayed"); +} + +static void +interest_added (IndicateServer * server, IndicateInterests interest) +{ + g_debug("Oh, someone is interested in my for: %d", interest); +} + +void +interest_removed (IndicateServer * server, IndicateInterests interest) +{ + g_debug("Someone is no longer interested in my for: %d", interest); +} + +int +main (int argc, char ** argv) +{ + g_type_init(); + + IndicateServer * server = indicate_server_ref_default(); + indicate_server_set_type(server, "message.im"); + indicate_server_set_desktop_file(server, "/usr/share/applications/empathy.desktop"); + g_signal_connect(G_OBJECT(server), INDICATE_SERVER_SIGNAL_SERVER_DISPLAY, G_CALLBACK(server_display), NULL); + g_signal_connect(G_OBJECT(server), INDICATE_SERVER_SIGNAL_INTEREST_ADDED, G_CALLBACK(interest_added), NULL); + g_signal_connect(G_OBJECT(server), INDICATE_SERVER_SIGNAL_INTEREST_REMOVED, G_CALLBACK(interest_removed), NULL); + + IndicateIndicatorMessage * indicator; + + indicator = indicate_indicator_message_new(); + indicate_indicator_set_property(INDICATE_INDICATOR(indicator), "subtype", "im"); + indicate_indicator_set_property(INDICATE_INDICATOR(indicator), "sender", "IM Client Test"); + GTimeVal time; g_get_current_time(&time); + indicate_indicator_set_property_time(INDICATE_INDICATOR(indicator), "time", &time); + indicate_indicator_show(INDICATE_INDICATOR(indicator)); + + g_get_current_time(&time); + indicate_indicator_set_property_time(INDICATE_INDICATOR(indicator), "time", &time); + + g_signal_connect(G_OBJECT(indicator), INDICATE_INDICATOR_SIGNAL_DISPLAY, G_CALLBACK(display), NULL); + + g_timeout_add_seconds(180, timeout_cb, indicator); + + g_main_loop_run(g_main_loop_new(NULL, FALSE)); + + return 0; +} diff --git a/examples/indicate-alot.c b/examples/indicate-alot.c new file mode 100644 index 0000000..479040b --- /dev/null +++ b/examples/indicate-alot.c @@ -0,0 +1,45 @@ +/* +A test for libindicate to ensure its quality. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see . +*/ + + +#include +#include "libindicate/indicator.h" + +#define ALOT 30 + + +int +main (int argc, char ** argv) +{ + g_type_init(); + + IndicateIndicator * indicators[ALOT]; + int i; + + for (i = 0; i < ALOT; i++) { + indicators[i] = indicate_indicator_new(); + indicate_indicator_show(indicators[i]); + } + + g_main_loop_run(g_main_loop_new(NULL, FALSE)); + + return 0; +} diff --git a/examples/indicate-and-crash.c b/examples/indicate-and-crash.c new file mode 100644 index 0000000..c002a54 --- /dev/null +++ b/examples/indicate-and-crash.c @@ -0,0 +1,41 @@ +/* +A test for libindicate to ensure its quality. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see . +*/ + + +#include +#include "libindicate/indicator.h" + +gboolean crashfunc (gpointer data) { *(int *)data = 5; return FALSE;} + +int +main (int argc, char ** argv) +{ + g_type_init(); + + IndicateIndicator * indicator = indicate_indicator_new(); + indicate_indicator_show(indicator); + + g_timeout_add_seconds(15, crashfunc, NULL); + + g_main_loop_run(g_main_loop_new(NULL, FALSE)); + + return 0; +} diff --git a/examples/listen-and-print.c b/examples/listen-and-print.c new file mode 100644 index 0000000..dcad92b --- /dev/null +++ b/examples/listen-and-print.c @@ -0,0 +1,143 @@ +/* +A test for libindicate to ensure its quality. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see . +*/ + +#include +#include "libindicate/listener.h" + +static void +show_property_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gchar * propertydata, gpointer data) +{ + g_debug("Indicator Property: %s %d %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), property, propertydata); + return; +} + +static void +show_property_time_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, GTimeVal * propertydata, gpointer data) +{ + time_t timet; + struct tm * structtm; + + timet = propertydata->tv_sec; + structtm = localtime(&timet); + + gchar timestring[80]; + strftime(timestring, 80, "%I:%M", structtm); + + g_debug("Indicator Property: %s %d %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), property, timestring); + return; +} + +static void +show_property_icon_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, GdkPixbuf * propertydata, gpointer data) +{ + g_debug("Indicator Property: %s %d %s %dx%d", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), property, gdk_pixbuf_get_width(propertydata), gdk_pixbuf_get_height(propertydata)); + g_object_unref(G_OBJECT(propertydata)); + return; +} + +static void +show_property (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property) +{ + if (!strcmp(property, "icon")) { + indicate_listener_get_property_icon(listener, server, indicator, property, show_property_icon_cb, NULL); + } else if (!strcmp(property, "time")) { + indicate_listener_get_property_time(listener, server, indicator, property, show_property_time_cb, NULL); + } else { + indicate_listener_get_property(listener, server, indicator, property, show_property_cb, NULL); + } + + return; +} + +static void +get_properties (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator) +{ + //TODO: Not in API yet. +} + +static void +indicator_added (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data) +{ + g_debug("Indicator Added: %s %d %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), type); + get_properties(listener, server, indicator); +} + +static void +indicator_removed (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data) +{ + g_debug("Indicator Removed: %s %d %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), type); +} + +static void +indicator_modified (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gchar * property, gpointer data) +{ + g_debug("Indicator Modified: %s %d %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), type, property); + show_property(listener, server, indicator, property); +} + +static void +type_cb (IndicateListener * listener, IndicateListenerServer * server, gchar * value, gpointer data) +{ + g_debug("Indicator Server Type: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), value); +} + +static void +desktop_cb (IndicateListener * listener, IndicateListenerServer * server, gchar * value, gpointer data) +{ + g_debug("Indicator Server Desktop: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), value); +} + +static void +server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) +{ + g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); + indicate_listener_server_get_type(listener, server, type_cb, NULL); + indicate_listener_server_get_desktop(listener, server, desktop_cb, NULL); + + indicate_listener_server_show_interest(listener, server, INDICATE_INTEREST_SERVER_DISPLAY); + indicate_listener_server_show_interest(listener, server, INDICATE_INTEREST_INDICATOR_DISPLAY); + + return; +} + +static void +server_removed (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) +{ + g_debug("Indicator Server Removed: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); +} + +int +main (int argc, char ** argv) +{ + g_type_init(); + + IndicateListener * listener = indicate_listener_ref_default(); + + g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED, G_CALLBACK(indicator_added), NULL); + g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_REMOVED, G_CALLBACK(indicator_removed), NULL); + g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_MODIFIED, G_CALLBACK(indicator_modified), NULL); + g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); + g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_REMOVED, G_CALLBACK(server_removed), NULL); + + g_main_loop_run(g_main_loop_new(NULL, FALSE)); + + return 0; +} diff --git a/examples/show-hide-server.c b/examples/show-hide-server.c new file mode 100644 index 0000000..23c1ea1 --- /dev/null +++ b/examples/show-hide-server.c @@ -0,0 +1,44 @@ +/* From LP: #351537 */ + +#include +#include "libindicate/server.h" +#include "libindicate/indicator-message.h" + +gboolean hidden = TRUE; + +static gboolean +timeout_cb (gpointer data) +{ + IndicateServer * server = INDICATE_SERVER(data); + + if (hidden) { + printf("showing... "); + indicate_server_show(server); + printf("ok\n"); + hidden = FALSE; + } else { + printf("hiding... "); + indicate_server_hide(server); + printf("ok\n"); + hidden = TRUE; + } + + return TRUE; +} + + +int +main (int argc, char ** argv) +{ + g_type_init(); + + IndicateServer * server = indicate_server_ref_default(); + indicate_server_set_type(server, "message.im"); + indicate_server_set_desktop_file(server, "/usr/share/applications/empathy.desktop"); + g_timeout_add_seconds(1, timeout_cb, server); + + g_main_loop_run(g_main_loop_new(NULL, FALSE)); + + return 0; +} + diff --git a/examples/test.js b/examples/test.js new file mode 100755 index 0000000..45b0d05 --- /dev/null +++ b/examples/test.js @@ -0,0 +1,6 @@ +#!/usr/local/bin/seed +Seed.import_namespace("Indicate"); + +var indicator = new Indicate.Indicator(); + +indicator.show(); diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index 862046e..0000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,72 +0,0 @@ - -libexec_PROGRAMS = \ - indicate-and-crash \ - indicate-alot \ - listen-and-print \ - im-client \ - show-hide-server - -indicate_and_crash_SOURCES = \ - indicate-and-crash.c - -indicate_and_crash_CFLAGS = \ - -I $(srcdir)/.. \ - $(LIBINDICATE_CFLAGS) - -indicate_and_crash_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -indicate_alot_SOURCES = \ - indicate-alot.c - -indicate_alot_CFLAGS = \ - -I $(srcdir)/.. \ - $(LIBINDICATE_CFLAGS) - -indicate_alot_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -listen_and_print_SOURCES = \ - listen-and-print.c - -listen_and_print_CFLAGS = \ - -I $(srcdir)/.. \ - $(LIBINDICATE_CFLAGS) - -listen_and_print_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -im_client_SOURCES = \ - im-client.c - -im_client_CFLAGS = \ - -I $(srcdir)/.. \ - $(LIBINDICATE_CFLAGS) - -im_client_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -show_hide_server_SOURCES = \ - show-hide-server.c - -show_hide_server_CFLAGS = \ - -I $(srcdir)/.. \ - $(LIBINDICATE_CFLAGS) - -show_hide_server_LDADD = \ - ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) - -examplesdir = $(docdir)/examples/ - -examples_DATA = \ - $(indicate_and_crash_SOURCES) \ - $(indicate_alot_SOURCES) \ - $(listen_and_print_SOURCES) \ - $(im_client_SOURCES) - -EXTRA_DIST = $(examples_DATA) diff --git a/tests/im-client.c b/tests/im-client.c deleted file mode 100644 index bf2fbb2..0000000 --- a/tests/im-client.c +++ /dev/null @@ -1,111 +0,0 @@ -/* -A test for libindicate to ensure its quality. - -Copyright 2009 Canonical Ltd. - -Authors: - Ted Gould - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see . -*/ - -#include -#include "libindicate/server.h" -#include "libindicate/indicator-message.h" - -gchar * patha = "/usr/share/icons/hicolor/16x16/apps/empathy.png"; -gchar * pathb = "/usr/share/icons/hicolor/22x22/apps/empathy.png"; -gchar * lastpath = NULL; - -static gboolean -timeout_cb (gpointer data) -{ - g_debug("Modifying properties"); - - IndicateIndicator * indicator = INDICATE_INDICATOR(data); - - GTimeVal time; - g_get_current_time(&time); - indicate_indicator_set_property_time(INDICATE_INDICATOR(indicator), "time", &time); - - if (lastpath == patha) { - lastpath = pathb; - } else { - lastpath = patha; - } - - GdkPixbuf * pixbuf = gdk_pixbuf_new_from_file(lastpath, NULL); - g_return_val_if_fail(pixbuf != NULL, TRUE); - - indicate_indicator_set_property_icon(INDICATE_INDICATOR(indicator), "icon", pixbuf); - g_object_unref(G_OBJECT(pixbuf)); - - return TRUE; -} - -static void -display (IndicateIndicator * indicator, gpointer data) -{ - g_debug("Ah, my indicator has been displayed"); -} - -static void -server_display (IndicateServer * server, gpointer data) -{ - g_debug("Ah, my server has been displayed"); -} - -static void -interest_added (IndicateServer * server, IndicateInterests interest) -{ - g_debug("Oh, someone is interested in my for: %d", interest); -} - -void -interest_removed (IndicateServer * server, IndicateInterests interest) -{ - g_debug("Someone is no longer interested in my for: %d", interest); -} - -int -main (int argc, char ** argv) -{ - g_type_init(); - - IndicateServer * server = indicate_server_ref_default(); - indicate_server_set_type(server, "message.im"); - indicate_server_set_desktop_file(server, "/usr/share/applications/empathy.desktop"); - g_signal_connect(G_OBJECT(server), INDICATE_SERVER_SIGNAL_SERVER_DISPLAY, G_CALLBACK(server_display), NULL); - g_signal_connect(G_OBJECT(server), INDICATE_SERVER_SIGNAL_INTEREST_ADDED, G_CALLBACK(interest_added), NULL); - g_signal_connect(G_OBJECT(server), INDICATE_SERVER_SIGNAL_INTEREST_REMOVED, G_CALLBACK(interest_removed), NULL); - - IndicateIndicatorMessage * indicator; - - indicator = indicate_indicator_message_new(); - indicate_indicator_set_property(INDICATE_INDICATOR(indicator), "subtype", "im"); - indicate_indicator_set_property(INDICATE_INDICATOR(indicator), "sender", "IM Client Test"); - GTimeVal time; g_get_current_time(&time); - indicate_indicator_set_property_time(INDICATE_INDICATOR(indicator), "time", &time); - indicate_indicator_show(INDICATE_INDICATOR(indicator)); - - g_get_current_time(&time); - indicate_indicator_set_property_time(INDICATE_INDICATOR(indicator), "time", &time); - - g_signal_connect(G_OBJECT(indicator), INDICATE_INDICATOR_SIGNAL_DISPLAY, G_CALLBACK(display), NULL); - - g_timeout_add_seconds(180, timeout_cb, indicator); - - g_main_loop_run(g_main_loop_new(NULL, FALSE)); - - return 0; -} diff --git a/tests/indicate-alot.c b/tests/indicate-alot.c deleted file mode 100644 index 479040b..0000000 --- a/tests/indicate-alot.c +++ /dev/null @@ -1,45 +0,0 @@ -/* -A test for libindicate to ensure its quality. - -Copyright 2009 Canonical Ltd. - -Authors: - Ted Gould - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see . -*/ - - -#include -#include "libindicate/indicator.h" - -#define ALOT 30 - - -int -main (int argc, char ** argv) -{ - g_type_init(); - - IndicateIndicator * indicators[ALOT]; - int i; - - for (i = 0; i < ALOT; i++) { - indicators[i] = indicate_indicator_new(); - indicate_indicator_show(indicators[i]); - } - - g_main_loop_run(g_main_loop_new(NULL, FALSE)); - - return 0; -} diff --git a/tests/indicate-and-crash.c b/tests/indicate-and-crash.c deleted file mode 100644 index c002a54..0000000 --- a/tests/indicate-and-crash.c +++ /dev/null @@ -1,41 +0,0 @@ -/* -A test for libindicate to ensure its quality. - -Copyright 2009 Canonical Ltd. - -Authors: - Ted Gould - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see . -*/ - - -#include -#include "libindicate/indicator.h" - -gboolean crashfunc (gpointer data) { *(int *)data = 5; return FALSE;} - -int -main (int argc, char ** argv) -{ - g_type_init(); - - IndicateIndicator * indicator = indicate_indicator_new(); - indicate_indicator_show(indicator); - - g_timeout_add_seconds(15, crashfunc, NULL); - - g_main_loop_run(g_main_loop_new(NULL, FALSE)); - - return 0; -} diff --git a/tests/listen-and-print.c b/tests/listen-and-print.c deleted file mode 100644 index dcad92b..0000000 --- a/tests/listen-and-print.c +++ /dev/null @@ -1,143 +0,0 @@ -/* -A test for libindicate to ensure its quality. - -Copyright 2009 Canonical Ltd. - -Authors: - Ted Gould - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see . -*/ - -#include -#include "libindicate/listener.h" - -static void -show_property_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gchar * propertydata, gpointer data) -{ - g_debug("Indicator Property: %s %d %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), property, propertydata); - return; -} - -static void -show_property_time_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, GTimeVal * propertydata, gpointer data) -{ - time_t timet; - struct tm * structtm; - - timet = propertydata->tv_sec; - structtm = localtime(&timet); - - gchar timestring[80]; - strftime(timestring, 80, "%I:%M", structtm); - - g_debug("Indicator Property: %s %d %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), property, timestring); - return; -} - -static void -show_property_icon_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, GdkPixbuf * propertydata, gpointer data) -{ - g_debug("Indicator Property: %s %d %s %dx%d", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), property, gdk_pixbuf_get_width(propertydata), gdk_pixbuf_get_height(propertydata)); - g_object_unref(G_OBJECT(propertydata)); - return; -} - -static void -show_property (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property) -{ - if (!strcmp(property, "icon")) { - indicate_listener_get_property_icon(listener, server, indicator, property, show_property_icon_cb, NULL); - } else if (!strcmp(property, "time")) { - indicate_listener_get_property_time(listener, server, indicator, property, show_property_time_cb, NULL); - } else { - indicate_listener_get_property(listener, server, indicator, property, show_property_cb, NULL); - } - - return; -} - -static void -get_properties (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator) -{ - //TODO: Not in API yet. -} - -static void -indicator_added (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data) -{ - g_debug("Indicator Added: %s %d %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), type); - get_properties(listener, server, indicator); -} - -static void -indicator_removed (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data) -{ - g_debug("Indicator Removed: %s %d %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), type); -} - -static void -indicator_modified (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gchar * property, gpointer data) -{ - g_debug("Indicator Modified: %s %d %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), type, property); - show_property(listener, server, indicator, property); -} - -static void -type_cb (IndicateListener * listener, IndicateListenerServer * server, gchar * value, gpointer data) -{ - g_debug("Indicator Server Type: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), value); -} - -static void -desktop_cb (IndicateListener * listener, IndicateListenerServer * server, gchar * value, gpointer data) -{ - g_debug("Indicator Server Desktop: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), value); -} - -static void -server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) -{ - g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); - indicate_listener_server_get_type(listener, server, type_cb, NULL); - indicate_listener_server_get_desktop(listener, server, desktop_cb, NULL); - - indicate_listener_server_show_interest(listener, server, INDICATE_INTEREST_SERVER_DISPLAY); - indicate_listener_server_show_interest(listener, server, INDICATE_INTEREST_INDICATOR_DISPLAY); - - return; -} - -static void -server_removed (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) -{ - g_debug("Indicator Server Removed: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); -} - -int -main (int argc, char ** argv) -{ - g_type_init(); - - IndicateListener * listener = indicate_listener_ref_default(); - - g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED, G_CALLBACK(indicator_added), NULL); - g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_REMOVED, G_CALLBACK(indicator_removed), NULL); - g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_MODIFIED, G_CALLBACK(indicator_modified), NULL); - g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); - g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_REMOVED, G_CALLBACK(server_removed), NULL); - - g_main_loop_run(g_main_loop_new(NULL, FALSE)); - - return 0; -} diff --git a/tests/show-hide-server.c b/tests/show-hide-server.c deleted file mode 100644 index 23c1ea1..0000000 --- a/tests/show-hide-server.c +++ /dev/null @@ -1,44 +0,0 @@ -/* From LP: #351537 */ - -#include -#include "libindicate/server.h" -#include "libindicate/indicator-message.h" - -gboolean hidden = TRUE; - -static gboolean -timeout_cb (gpointer data) -{ - IndicateServer * server = INDICATE_SERVER(data); - - if (hidden) { - printf("showing... "); - indicate_server_show(server); - printf("ok\n"); - hidden = FALSE; - } else { - printf("hiding... "); - indicate_server_hide(server); - printf("ok\n"); - hidden = TRUE; - } - - return TRUE; -} - - -int -main (int argc, char ** argv) -{ - g_type_init(); - - IndicateServer * server = indicate_server_ref_default(); - indicate_server_set_type(server, "message.im"); - indicate_server_set_desktop_file(server, "/usr/share/applications/empathy.desktop"); - g_timeout_add_seconds(1, timeout_cb, server); - - g_main_loop_run(g_main_loop_new(NULL, FALSE)); - - return 0; -} - diff --git a/tests/test.js b/tests/test.js deleted file mode 100755 index 45b0d05..0000000 --- a/tests/test.js +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/local/bin/seed -Seed.import_namespace("Indicate"); - -var indicator = new Indicate.Indicator(); - -indicator.show(); -- cgit v1.2.3 From ecfb1c26cdb0908e552a33ccad288f3224038f97 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 20 Apr 2009 10:57:57 -0500 Subject: Build infrastructure for first test --- Makefile.am | 1 + configure.ac | 1 + tests/Makefile.am | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 tests/Makefile.am diff --git a/Makefile.am b/Makefile.am index 7230246..2f11251 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,6 +3,7 @@ SUBDIRS = \ src \ libindicate \ examples \ + tests \ data \ po \ docs diff --git a/configure.ac b/configure.ac index bfa784a..496ae6a 100644 --- a/configure.ac +++ b/configure.ac @@ -162,6 +162,7 @@ src/Makefile libindicate/Makefile libindicate/indicate.pc examples/Makefile +tests/Makefile data/Makefile po/Makefile.in docs/Makefile diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..8f290f9 --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,29 @@ + +DBUS_RUNNER=/home/ted/Development/dbus-fun/dbus-test-runner --dbus-config /home/ted/Development/dbus-fun/session.conf + +TESTS = \ + test_simple + +test_simple: test_simple_c test_simple_s + $(DBUS_RUNNER) --task ./test_simple_c --task-name Client --task ./test_simple_s --task-name Server + +test_simple_c_SOURCES = \ + test-simple-c.c + +test_simple_c_CFLAGS = \ + $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. + +test_simple_c_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + +test_simple_s_SOURCES = \ + test-simple-s.c + +test_simple_s_CFLAGS = \ + $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. + +test_simple_s_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + -- cgit v1.2.3 From 8162f7196b7be52d014160b7559a98264e5f2b8a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 20 Apr 2009 11:25:33 -0500 Subject: Adding in a simple test --- .bzrignore | 2 ++ tests/Makefile.am | 25 +++++++++++++------------ tests/test-simple-client.c | 30 ++++++++++++++++++++++++++++++ tests/test-simple-server.c | 39 +++++++++++++++++++++++++++++++++++++++ tests/test_simple | 5 +++++ 5 files changed, 89 insertions(+), 12 deletions(-) create mode 100644 tests/test-simple-client.c create mode 100644 tests/test-simple-server.c create mode 100755 tests/test_simple diff --git a/.bzrignore b/.bzrignore index 6d29896..f9d8412 100644 --- a/.bzrignore +++ b/.bzrignore @@ -67,3 +67,5 @@ examples/indicate-alot examples/indicate-and-crash examples/listen-and-print examples/show-hide-server +test-simple-client +test-simple-server diff --git a/tests/Makefile.am b/tests/Makefile.am index 8f290f9..9f1c6d3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,29 +1,30 @@ -DBUS_RUNNER=/home/ted/Development/dbus-fun/dbus-test-runner --dbus-config /home/ted/Development/dbus-fun/session.conf - TESTS = \ test_simple -test_simple: test_simple_c test_simple_s - $(DBUS_RUNNER) --task ./test_simple_c --task-name Client --task ./test_simple_s --task-name Server +libexec_PROGRAMS = \ + test-simple-client \ + test-simple-server + +test_simple: test-simple-client test-simple-server -test_simple_c_SOURCES = \ - test-simple-c.c +test_simple_client_SOURCES = \ + test-simple-client.c -test_simple_c_CFLAGS = \ +test_simple_client_CFLAGS = \ $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. -test_simple_c_LDADD = \ +test_simple_client_LDADD = \ ../libindicate/libindicate.la \ $(LIBINDICATE_LIBS) -test_simple_s_SOURCES = \ - test-simple-s.c +test_simple_server_SOURCES = \ + test-simple-server.c -test_simple_s_CFLAGS = \ +test_simple_server_CFLAGS = \ $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. -test_simple_s_LDADD = \ +test_simple_server_LDADD = \ ../libindicate/libindicate.la \ $(LIBINDICATE_LIBS) diff --git a/tests/test-simple-client.c b/tests/test-simple-client.c new file mode 100644 index 0000000..f8db55a --- /dev/null +++ b/tests/test-simple-client.c @@ -0,0 +1,30 @@ + +#include +#include "libindicate/indicator.h" + +static gboolean passed = TRUE; +static GMainLoop * mainloop = NULL; + +static gboolean +done_timeout_cb (gpointer data) +{ + g_debug("All done."); + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char * argv) +{ + g_type_init(); + + IndicateIndicator * indicator = indicate_indicator_new(); + indicate_indicator_show(indicator); + + g_timeout_add_seconds(2, done_timeout_cb, indicator); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + return !passed; +} diff --git a/tests/test-simple-server.c b/tests/test-simple-server.c new file mode 100644 index 0000000..0a04e85 --- /dev/null +++ b/tests/test-simple-server.c @@ -0,0 +1,39 @@ + +#include +#include "libindicate/listener.h" + +static gboolean passed = TRUE; +static GMainLoop * mainloop = NULL; + +static void +server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) +{ + g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); + g_main_loop_quit(mainloop); +} + +static gboolean +failed_cb (gpointer data) +{ + g_debug("Failed to get a server in 5 seconds."); + passed = FALSE; + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char * argv) +{ + g_type_init(); + + IndicateListener * listener = indicate_listener_ref_default(); + + g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); + + g_timeout_add_seconds(5, failed_cb, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + return !passed; +} diff --git a/tests/test_simple b/tests/test_simple new file mode 100755 index 0000000..8c4263e --- /dev/null +++ b/tests/test_simple @@ -0,0 +1,5 @@ +#!/bin/sh + +DBUS_RUNNER="/home/ted/Development/dbus-play/dbus-test-runner --dbus-config /home/ted/Development/dbus-play/session.conf" + +${DBUS_RUNNER} --task ./test-simple-client --task-name Client --task ./test-simple-server --task-name Server -- cgit v1.2.3 From 43cf92a1e3306bf142f98ebc0cc4b2c636271c0d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 20 Apr 2009 12:10:58 -0500 Subject: Chaning the include so that it works for make distcheck --- libindicate/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libindicate/Makefile.am b/libindicate/Makefile.am index 91072f7..3ad6247 100644 --- a/libindicate/Makefile.am +++ b/libindicate/Makefile.am @@ -121,7 +121,7 @@ $(ENUM_FILE).c: s-enum-types-c @true s-enum-types-c: $(indicate_headers) Makefile ( cd $(srcdir) && glib-mkenums \ - --fhead "#include \n#include " \ + --fhead "#include \"interests.h\"\n#include " \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ -- cgit v1.2.3 From 443c83ab353b818227270aa63f655fb2cbdbeba7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 20 Apr 2009 12:16:33 -0500 Subject: Woot, now we do distcheck too --- tests/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Makefile.am b/tests/Makefile.am index 9f1c6d3..36818b8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -6,6 +6,9 @@ libexec_PROGRAMS = \ test-simple-client \ test-simple-server +EXTRA_DIST = \ + $(TESTS) + test_simple: test-simple-client test-simple-server test_simple_client_SOURCES = \ -- cgit v1.2.3 From 38c6ce2a36d6416016f64e5963deee29bc02f8b3 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 20 Apr 2009 12:36:07 -0500 Subject: Adding an interests test --- .bzrignore | 2 ++ tests/Makefile.am | 27 ++++++++++++++++++- tests/test-interests-client.c | 63 +++++++++++++++++++++++++++++++++++++++++++ tests/test-interests-server.c | 45 +++++++++++++++++++++++++++++++ tests/test_interests | 5 ++++ 5 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 tests/test-interests-client.c create mode 100644 tests/test-interests-server.c create mode 100755 tests/test_interests diff --git a/.bzrignore b/.bzrignore index f9d8412..b7d186d 100644 --- a/.bzrignore +++ b/.bzrignore @@ -69,3 +69,5 @@ examples/listen-and-print examples/show-hide-server test-simple-client test-simple-server +test-interests-client +test-interests-server diff --git a/tests/Makefile.am b/tests/Makefile.am index 36818b8..256a699 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,8 +1,11 @@ TESTS = \ - test_simple + test_simple \ + test_interests libexec_PROGRAMS = \ + test-interests-client \ + test-interests-server \ test-simple-client \ test-simple-server @@ -31,3 +34,25 @@ test_simple_server_LDADD = \ ../libindicate/libindicate.la \ $(LIBINDICATE_LIBS) +test_interests: test-interests-client test-interests-server + +test_interests_client_SOURCES = \ + test-interests-client.c + +test_interests_client_CFLAGS = \ + $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. + +test_interests_client_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + +test_interests_server_SOURCES = \ + test-interests-server.c + +test_interests_server_CFLAGS = \ + $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. + +test_interests_server_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + diff --git a/tests/test-interests-client.c b/tests/test-interests-client.c new file mode 100644 index 0000000..0fe8587 --- /dev/null +++ b/tests/test-interests-client.c @@ -0,0 +1,63 @@ + +#include +#include "libindicate/indicator.h" +#include "libindicate/server.h" +#include "libindicate/interests.h" + +static gboolean passed = TRUE; +static GMainLoop * mainloop = NULL; +static gboolean interests[INDICATE_INTEREST_LAST] = {0}; + +static gboolean +check_interests (void) +{ + guint i; + for (i = INDICATE_INTEREST_NONE; i < INDICATE_INTEREST_LAST; i++) { + if (!interests[i]) { + return FALSE; + } + } + + return TRUE; +} + +static void +interest_added (IndicateServer * server, IndicateInterests interest) +{ + g_debug("Oh, someone is interested in my for: %d", interest); + interests[interest] = TRUE; + + if (check_interests()) { + g_main_loop_quit(mainloop); + } + + return; +} + +static gboolean +done_timeout_cb (gpointer data) +{ + g_debug("All interests not set"); + passed = FALSE; + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char * argv) +{ + g_type_init(); + + IndicateIndicator * indicator = indicate_indicator_new(); + indicate_indicator_show(indicator); + + IndicateServer * server = indicate_server_ref_default(); + g_signal_connect(G_OBJECT(server), INDICATE_SERVER_SIGNAL_INTEREST_ADDED, G_CALLBACK(interest_added), NULL); + + g_timeout_add_seconds(10, done_timeout_cb, indicator); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + return !passed; +} diff --git a/tests/test-interests-server.c b/tests/test-interests-server.c new file mode 100644 index 0000000..82cab3c --- /dev/null +++ b/tests/test-interests-server.c @@ -0,0 +1,45 @@ + +#include +#include "libindicate/listener.h" + +static gboolean passed = TRUE; +static GMainLoop * mainloop = NULL; + +static void +server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) +{ + g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); + + guint i; + for (i = INDICATE_INTEREST_NONE; i < INDICATE_INTEREST_LAST; i++) { + g_debug("Indicating Interests: %d", i); + indicate_listener_server_show_interest(listener, server, i); + } + + return; +} + +static gboolean +failed_cb (gpointer data) +{ + g_debug("Done indicatating interest"); + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char * argv) +{ + g_type_init(); + + IndicateListener * listener = indicate_listener_ref_default(); + + g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); + + g_timeout_add_seconds(2, failed_cb, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + return !passed; +} diff --git a/tests/test_interests b/tests/test_interests new file mode 100755 index 0000000..b37189f --- /dev/null +++ b/tests/test_interests @@ -0,0 +1,5 @@ +#!/bin/sh + +DBUS_RUNNER="/home/ted/Development/dbus-play/dbus-test-runner --dbus-config /home/ted/Development/dbus-play/session.conf" + +${DBUS_RUNNER} --task ./test-interests-client --task-name Client --task ./test-interests-server --task-name Server -- cgit v1.2.3 From 76d5d0d2ad09b22fd49ca49761a12554a1d6383c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 20 Apr 2009 13:13:04 -0500 Subject: Gaurding against setting bad interests --- libindicate/listener.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libindicate/listener.c b/libindicate/listener.c index fddeb71..bd3639d 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -1003,6 +1003,10 @@ interest_cb (DBusGProxy *proxy, GError *error, gpointer userdata) void indicate_listener_server_show_interest (IndicateListener * listener, IndicateListenerServer * server, IndicateInterests interest) { + if (!(interest > INDICATE_INTEREST_NONE && interest < INDICATE_INTEREST_LAST)) { + return; + } + if (!server->interests[interest]) { org_freedesktop_indicator_show_interest_async (server->proxy, interest_to_string(interest), interest_cb, server); server->interests[interest] = TRUE; -- cgit v1.2.3 From c5cc32d7fa7c6abe909f3d19a7e1deb529bcc4a9 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 20 Apr 2009 13:16:14 -0500 Subject: Expanding range of interest test and not checking to see if we got none, we shouldn't get it. --- tests/test-interests-client.c | 4 ++-- tests/test-interests-server.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test-interests-client.c b/tests/test-interests-client.c index 0fe8587..bde3b26 100644 --- a/tests/test-interests-client.c +++ b/tests/test-interests-client.c @@ -12,7 +12,7 @@ static gboolean check_interests (void) { guint i; - for (i = INDICATE_INTEREST_NONE; i < INDICATE_INTEREST_LAST; i++) { + for (i = INDICATE_INTEREST_NONE + 1; i < INDICATE_INTEREST_LAST; i++) { if (!interests[i]) { return FALSE; } @@ -54,7 +54,7 @@ main (int argc, char * argv) IndicateServer * server = indicate_server_ref_default(); g_signal_connect(G_OBJECT(server), INDICATE_SERVER_SIGNAL_INTEREST_ADDED, G_CALLBACK(interest_added), NULL); - g_timeout_add_seconds(10, done_timeout_cb, indicator); + g_timeout_add_seconds(2, done_timeout_cb, indicator); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); diff --git a/tests/test-interests-server.c b/tests/test-interests-server.c index 82cab3c..e1433d8 100644 --- a/tests/test-interests-server.c +++ b/tests/test-interests-server.c @@ -10,8 +10,8 @@ server_added (IndicateListener * listener, IndicateListenerServer * server, gcha { g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); - guint i; - for (i = INDICATE_INTEREST_NONE; i < INDICATE_INTEREST_LAST; i++) { + gint i; + for (i = INDICATE_INTEREST_NONE - 2; i < INDICATE_INTEREST_LAST + 2; i++) { g_debug("Indicating Interests: %d", i); indicate_listener_server_show_interest(listener, server, i); } -- cgit v1.2.3 From ecad1e36dce18875461e76d2a47d8a0e11570ff6 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 20 Apr 2009 14:44:25 -0500 Subject: Adding in multiple servers connecting in to declare interest test --- .bzrignore | 5 ++++ tests/Makefile.am | 60 +++++++++++++++++++++++++++++++++++++++++- tests/test-interests-server1.c | 41 +++++++++++++++++++++++++++++ tests/test-interests-server2.c | 41 +++++++++++++++++++++++++++++ tests/test-interests-server3.c | 41 +++++++++++++++++++++++++++++ tests/test-interests-server4.c | 41 +++++++++++++++++++++++++++++ tests/test-interests-server5.c | 41 +++++++++++++++++++++++++++++ tests/test_interests_multi | 5 ++++ 8 files changed, 274 insertions(+), 1 deletion(-) create mode 100644 tests/test-interests-server1.c create mode 100644 tests/test-interests-server2.c create mode 100644 tests/test-interests-server3.c create mode 100644 tests/test-interests-server4.c create mode 100644 tests/test-interests-server5.c create mode 100755 tests/test_interests_multi diff --git a/.bzrignore b/.bzrignore index b7d186d..13cd507 100644 --- a/.bzrignore +++ b/.bzrignore @@ -71,3 +71,8 @@ test-simple-client test-simple-server test-interests-client test-interests-server +test-interests-server1 +test-interests-server2 +test-interests-server3 +test-interests-server4 +test-interests-server5 diff --git a/tests/Makefile.am b/tests/Makefile.am index 256a699..6117bee 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,11 +1,17 @@ TESTS = \ test_simple \ - test_interests + test_interests \ + test_interests_multi libexec_PROGRAMS = \ test-interests-client \ test-interests-server \ + test-interests-server1 \ + test-interests-server2 \ + test-interests-server3 \ + test-interests-server4 \ + test-interests-server5 \ test-simple-client \ test-simple-server @@ -56,3 +62,55 @@ test_interests_server_LDADD = \ ../libindicate/libindicate.la \ $(LIBINDICATE_LIBS) +test_interests_multi: test-interests-client test-interests-server1 test-interests-server2 test-interests-server3 test-interests-server4 test-interests-server5 + +test_interests_server1_SOURCES = \ + test-interests-server1.c + +test_interests_server1_CFLAGS = \ + $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. + +test_interests_server1_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + +test_interests_server2_SOURCES = \ + test-interests-server2.c + +test_interests_server2_CFLAGS = \ + $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. + +test_interests_server2_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + +test_interests_server3_SOURCES = \ + test-interests-server3.c + +test_interests_server3_CFLAGS = \ + $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. + +test_interests_server3_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + +test_interests_server4_SOURCES = \ + test-interests-server4.c + +test_interests_server4_CFLAGS = \ + $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. + +test_interests_server4_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + +test_interests_server5_SOURCES = \ + test-interests-server5.c + +test_interests_server5_CFLAGS = \ + $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. + +test_interests_server5_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + diff --git a/tests/test-interests-server1.c b/tests/test-interests-server1.c new file mode 100644 index 0000000..e0d77f3 --- /dev/null +++ b/tests/test-interests-server1.c @@ -0,0 +1,41 @@ + +#include +#include "libindicate/listener.h" + +static gboolean passed = TRUE; +static GMainLoop * mainloop = NULL; + +static void +server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) +{ + g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); + #define INTEREST 1 + g_debug("Setting Interest: %d", INTEREST); + indicate_listener_server_show_interest(listener, server, INTEREST); + return; +} + +static gboolean +failed_cb (gpointer data) +{ + g_debug("Done indicatating interest"); + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char * argv) +{ + g_type_init(); + + IndicateListener * listener = indicate_listener_ref_default(); + + g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); + + g_timeout_add_seconds(2, failed_cb, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + return !passed; +} diff --git a/tests/test-interests-server2.c b/tests/test-interests-server2.c new file mode 100644 index 0000000..0416c21 --- /dev/null +++ b/tests/test-interests-server2.c @@ -0,0 +1,41 @@ + +#include +#include "libindicate/listener.h" + +static gboolean passed = TRUE; +static GMainLoop * mainloop = NULL; + +static void +server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) +{ + g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); + #define INTEREST 2 + g_debug("Setting Interest: %d", INTEREST); + indicate_listener_server_show_interest(listener, server, INTEREST); + return; +} + +static gboolean +failed_cb (gpointer data) +{ + g_debug("Done indicatating interest"); + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char * argv) +{ + g_type_init(); + + IndicateListener * listener = indicate_listener_ref_default(); + + g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); + + g_timeout_add_seconds(2, failed_cb, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + return !passed; +} diff --git a/tests/test-interests-server3.c b/tests/test-interests-server3.c new file mode 100644 index 0000000..7d889b1 --- /dev/null +++ b/tests/test-interests-server3.c @@ -0,0 +1,41 @@ + +#include +#include "libindicate/listener.h" + +static gboolean passed = TRUE; +static GMainLoop * mainloop = NULL; + +static void +server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) +{ + g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); + #define INTEREST 3 + g_debug("Setting Interest: %d", INTEREST); + indicate_listener_server_show_interest(listener, server, INTEREST); + return; +} + +static gboolean +failed_cb (gpointer data) +{ + g_debug("Done indicatating interest"); + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char * argv) +{ + g_type_init(); + + IndicateListener * listener = indicate_listener_ref_default(); + + g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); + + g_timeout_add_seconds(2, failed_cb, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + return !passed; +} diff --git a/tests/test-interests-server4.c b/tests/test-interests-server4.c new file mode 100644 index 0000000..50e6db1 --- /dev/null +++ b/tests/test-interests-server4.c @@ -0,0 +1,41 @@ + +#include +#include "libindicate/listener.h" + +static gboolean passed = TRUE; +static GMainLoop * mainloop = NULL; + +static void +server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) +{ + g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); + #define INTEREST 4 + g_debug("Setting Interest: %d", INTEREST); + indicate_listener_server_show_interest(listener, server, INTEREST); + return; +} + +static gboolean +failed_cb (gpointer data) +{ + g_debug("Done indicatating interest"); + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char * argv) +{ + g_type_init(); + + IndicateListener * listener = indicate_listener_ref_default(); + + g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); + + g_timeout_add_seconds(2, failed_cb, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + return !passed; +} diff --git a/tests/test-interests-server5.c b/tests/test-interests-server5.c new file mode 100644 index 0000000..d415716 --- /dev/null +++ b/tests/test-interests-server5.c @@ -0,0 +1,41 @@ + +#include +#include "libindicate/listener.h" + +static gboolean passed = TRUE; +static GMainLoop * mainloop = NULL; + +static void +server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) +{ + g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type); + #define INTEREST 5 + g_debug("Setting Interest: %d", INTEREST); + indicate_listener_server_show_interest(listener, server, INTEREST); + return; +} + +static gboolean +failed_cb (gpointer data) +{ + g_debug("Done indicatating interest"); + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char * argv) +{ + g_type_init(); + + IndicateListener * listener = indicate_listener_ref_default(); + + g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL); + + g_timeout_add_seconds(2, failed_cb, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + return !passed; +} diff --git a/tests/test_interests_multi b/tests/test_interests_multi new file mode 100755 index 0000000..96b23c9 --- /dev/null +++ b/tests/test_interests_multi @@ -0,0 +1,5 @@ +#!/bin/sh + +DBUS_RUNNER="/home/ted/Development/dbus-play/dbus-test-runner --dbus-config /home/ted/Development/dbus-play/session.conf" + +${DBUS_RUNNER} --task ./test-interests-client --task-name Client --task ./test-interests-server1 --task-name Server1 --task ./test-interests-server2 --task-name Server2 --task ./test-interests-server3 --task-name Server3 --task ./test-interests-server4 --task-name Server4 --task ./test-interests-server5 --task-name Server5 -- cgit v1.2.3 From 6f87e9c09f9894db7fd6f42f65c8eb147c42a6e8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 20 Apr 2009 15:39:42 -0500 Subject: Adding a test to build a bunch of indicators --- .bzrignore | 2 ++ tests/Makefile.am | 27 ++++++++++++++++++++- tests/test-thousand-indicators-client.c | 34 ++++++++++++++++++++++++++ tests/test-thousand-indicators-server.c | 43 +++++++++++++++++++++++++++++++++ tests/test_thousand_indicators | 5 ++++ 5 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 tests/test-thousand-indicators-client.c create mode 100644 tests/test-thousand-indicators-server.c create mode 100755 tests/test_thousand_indicators diff --git a/.bzrignore b/.bzrignore index 13cd507..a3a1e57 100644 --- a/.bzrignore +++ b/.bzrignore @@ -76,3 +76,5 @@ test-interests-server2 test-interests-server3 test-interests-server4 test-interests-server5 +test-thousand-indicators-server +test-thousand-indicators-client diff --git a/tests/Makefile.am b/tests/Makefile.am index 6117bee..7d72047 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,7 +2,8 @@ TESTS = \ test_simple \ test_interests \ - test_interests_multi + test_interests_multi \ + test_thousand_indicators libexec_PROGRAMS = \ test-interests-client \ @@ -12,6 +13,8 @@ libexec_PROGRAMS = \ test-interests-server3 \ test-interests-server4 \ test-interests-server5 \ + test-thousand-indicators-client \ + test-thousand-indicators-server test-simple-client \ test-simple-server @@ -114,3 +117,25 @@ test_interests_server5_LDADD = \ ../libindicate/libindicate.la \ $(LIBINDICATE_LIBS) +test_thousand_indicators: test-thousand-indicators-client test-thousand-indicators-server + +test_thousand_indicators_client_SOURCES = \ + test-thousand-indicators-client.c + +test_thousand_indicators_client_CFLAGS = \ + $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. + +test_thousand_indicators_client_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + +test_thousand_indicators_server_SOURCES = \ + test-thousand-indicators-server.c + +test_thousand_indicators_server_CFLAGS = \ + $(LIBINDICATE_CFLAGS) -I$(srcdir)/.. + +test_thousand_indicators_server_LDADD = \ + ../libindicate/libindicate.la \ + $(LIBINDICATE_LIBS) + diff --git a/tests/test-thousand-indicators-client.c b/tests/test-thousand-indicators-client.c new file mode 100644 index 0000000..0ac7305 --- /dev/null +++ b/tests/test-thousand-indicators-client.c @@ -0,0 +1,34 @@ + +#include +#include "libindicate/indicator.h" + +static gboolean passed = TRUE; +static GMainLoop * mainloop = NULL; + +static gboolean +done_timeout_cb (gpointer data) +{ + g_debug("All done."); + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char * argv) +{ + g_type_init(); + + int i; + for (i = 0; i < 1000; i++) { + /* Memory leak :) */ + IndicateIndicator * indicator = indicate_indicator_new(); + indicate_indicator_show(indicator); + } + + g_timeout_add_seconds(2, done_timeout_cb, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + return !passed; +} diff --git a/tests/test-thousand-indicators-server.c b/tests/test-thousand-indicators-server.c new file mode 100644 index 0000000..285e56b --- /dev/null +++ b/tests/test-thousand-indicators-server.c @@ -0,0 +1,43 @@ + +#include +#include "libindicate/listener.h" + +static gboolean passed = TRUE; +static GMainLoop * mainloop = NULL; +static guint indicator_count = 0; + +static void +indicator_added (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data) +{ + g_debug("Indicator Added: %s %d %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), type); + indicator_count++; + if (indicator_count == 1000) { + g_main_loop_quit(mainloop); + } +} + +static gboolean +failed_cb (gpointer data) +{ + g_debug("Failed to get a server in 5 seconds."); + passed = FALSE; + g_main_loop_quit(mainloop); + return FALSE; +} + +int +main (int argc, char * argv) +{ + g_type_init(); + + IndicateListener * listener = indicate_listener_ref_default(); + + g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED, G_CALLBACK(indicator_added), NULL); + + g_timeout_add_seconds(5, failed_cb, NULL); + + mainloop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(mainloop); + + return !passed; +} diff --git a/tests/test_thousand_indicators b/tests/test_thousand_indicators new file mode 100755 index 0000000..4dd7fae --- /dev/null +++ b/tests/test_thousand_indicators @@ -0,0 +1,5 @@ +#!/bin/sh + +DBUS_RUNNER="/home/ted/Development/dbus-play/dbus-test-runner --dbus-config /home/ted/Development/dbus-play/session.conf" + +${DBUS_RUNNER} --task ./test-thousand-indicators-client --task-name Client --task ./test-thousand-indicators-server --task-name Server -- cgit v1.2.3 From 61bc03afdadb206839db4c0eb0631104a1a2ff3b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 21 Apr 2009 14:15:22 -0500 Subject: Creating an indicator lib to make sure we can attach all these things together. --- .bzrignore | 1 + Makefile.am | 1 + configure.ac | 2 ++ libindicator/Makefile.am | 14 ++++++++++++++ libindicator/indicator.h | 17 +++++++++++++++++ libindicator/indicator.pc.in | 16 ++++++++++++++++ 6 files changed, 51 insertions(+) create mode 100644 libindicator/Makefile.am create mode 100644 libindicator/indicator.h create mode 100644 libindicator/indicator.pc.in diff --git a/.bzrignore b/.bzrignore index 2e5dd36..a8561af 100644 --- a/.bzrignore +++ b/.bzrignore @@ -60,3 +60,4 @@ libindicate/indicate-enum-types.h libindicate/libindicate_la-indicate-enum-types.lo libindicate/s-enum-types-c libindicate/s-enum-types-h +indicator.pc diff --git a/Makefile.am b/Makefile.am index d4f7ca2..a523c3a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,6 +2,7 @@ SUBDIRS = \ src \ libindicate \ + libindicator \ tests \ data \ po \ diff --git a/configure.ac b/configure.ac index ca46ff9..3df81f5 100644 --- a/configure.ac +++ b/configure.ac @@ -161,6 +161,8 @@ Makefile src/Makefile libindicate/Makefile libindicate/indicate.pc +libindicator/Makefile +libindicator/indicator.pc tests/Makefile data/Makefile po/Makefile.in diff --git a/libindicator/Makefile.am b/libindicator/Makefile.am new file mode 100644 index 0000000..be68721 --- /dev/null +++ b/libindicator/Makefile.am @@ -0,0 +1,14 @@ +EXTRA_DIST = \ + indicator.pc.in + +libindicatorincludedir=$(includedir)/libindicator-0.1/libindicator + +indicator_headers = \ + indicator.h + +libindicatorinclude_HEADERS = \ + $(indicator_headers) + +pkgconfig_DATA = indicator.pc +pkgconfigdir = $(libdir)/pkgconfig + diff --git a/libindicator/indicator.h b/libindicator/indicator.h new file mode 100644 index 0000000..9afaa4f --- /dev/null +++ b/libindicator/indicator.h @@ -0,0 +1,17 @@ + +#ifndef __LIBINDICATOR_INDICATOR_H_SEEN__ +#define __LIBINDICATOR_INDICATOR_H_SEEN__ 1 + +#include + +#define INDICATOR_GET_LABEL_S "get_label" +GtkLabel * get_label (void); + +#define INDICATOR_GET_ICON_S "get_icon" +GtkImage * get_icon (void); + +#define INDICATOR_GET_MENU_S "get_menu" +GtkMenu * get_menu (void); + +#endif /* __LIBINDICATOR_INDICATOR_H_SEEN__ */ + diff --git a/libindicator/indicator.pc.in b/libindicator/indicator.pc.in new file mode 100644 index 0000000..32f865d --- /dev/null +++ b/libindicator/indicator.pc.in @@ -0,0 +1,16 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +bindir=@bindir@ +includedir=@includedir@ + +indicatordir=@indicatordir@ + +Cflags: -I${includedir}/libindicator-0.1 +Requires: gtk-2.0 +Libs: + +Name: libindicator +Description: libindicator. +Version: @VERSION@ + -- cgit v1.2.3 From 292b04ef54580b79c105a9403f25cd385c2a4c62 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 21 Apr 2009 14:34:19 -0500 Subject: Setting the indicators directory manually --- libindicator/indicator.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libindicator/indicator.pc.in b/libindicator/indicator.pc.in index 32f865d..fa1c697 100644 --- a/libindicator/indicator.pc.in +++ b/libindicator/indicator.pc.in @@ -4,7 +4,7 @@ libdir=@libdir@ bindir=@bindir@ includedir=@includedir@ -indicatordir=@indicatordir@ +indicatordir=${libdir}/indicators/2/ Cflags: -I${includedir}/libindicator-0.1 Requires: gtk-2.0 -- cgit v1.2.3 From b0c9eb5bd9000d8f743c6a72f3312a7df587f264 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 21 Apr 2009 14:35:49 -0500 Subject: Moving the indicators directory to match libindicator --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 818bdd9..02b70c1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,7 +5,7 @@ libexec_PROGRAMS = \ indicator_applet_CFLAGS = \ -DG_LOG_DOMAIN=\""Indicator-Applet"\" \ -DDATADIR=\""$(datadir)"\" \ - -DINDICATOR_DIR=\""$(libdir)/indicators/1"\" \ + -DINDICATOR_DIR=\""$(libdir)/indicators/2"\" \ $(APPLET_CFLAGS) indicator_applet_SOURCES = \ -- cgit v1.2.3 From 4023d350d22120cd8405307f0e0465bdb95fbae6 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 21 Apr 2009 14:49:57 -0500 Subject: Fixing and using the new indicator header. This will help to connect things together and make them actually work in a reasonably type safe way. --- libindicator/indicator.h | 9 ++++++--- src/applet-main.c | 19 ++++++++++++++----- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/libindicator/indicator.h b/libindicator/indicator.h index 9afaa4f..daee3c8 100644 --- a/libindicator/indicator.h +++ b/libindicator/indicator.h @@ -5,13 +5,16 @@ #include #define INDICATOR_GET_LABEL_S "get_label" -GtkLabel * get_label (void); +typedef GtkLabel * (*get_label_t)(void); +get_label_t get_label; #define INDICATOR_GET_ICON_S "get_icon" -GtkImage * get_icon (void); +typedef GtkImage * (*get_icon_t) (void); +get_icon_t get_icon; #define INDICATOR_GET_MENU_S "get_menu" -GtkMenu * get_menu (void); +typedef GtkMenu * (*get_menu_t) (void); +get_menu_t get_menu; #endif /* __LIBINDICATOR_INDICATOR_H_SEEN__ */ diff --git a/src/applet-main.c b/src/applet-main.c index 310cfe9..795c2fb 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -24,7 +24,8 @@ with this program. If not, see . #include #include -#define SYMBOL_NAME "get_menu_item" +#include "libindicator/indicator.h" + #define ICONS_DIR (DATADIR G_DIR_SEPARATOR_S "indicator-applet" G_DIR_SEPARATOR_S "icons") static gboolean applet_fill_cb (PanelApplet * applet, const gchar * iid, gpointer data); @@ -79,11 +80,19 @@ load_module (const gchar * name, GtkWidget * menu) g_free(fullpath); g_return_val_if_fail(module != NULL, FALSE); - GtkWidget * (*make_item)(void); - g_return_val_if_fail(g_module_symbol(module, SYMBOL_NAME, (gpointer *)(&make_item)), FALSE); - g_return_val_if_fail(make_item != NULL, FALSE); + get_label_t lget_label; + g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_LABEL_S, (gpointer *)(&lget_label)), FALSE); + g_return_val_if_fail(lget_label != NULL, FALSE); + + get_icon_t lget_icon; + g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_LABEL_S, (gpointer *)(&lget_icon)), FALSE); + g_return_val_if_fail(lget_icon != NULL, FALSE); + + get_menu_t lget_menu; + g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_LABEL_S, (gpointer *)(&lget_menu)), FALSE); + g_return_val_if_fail(lget_menu != NULL, FALSE); - GtkWidget * menuitem = make_item(); + GtkWidget * menuitem = GTK_WIDGET(lget_menu()); g_return_val_if_fail(GTK_MENU_ITEM(menuitem), FALSE); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); -- cgit v1.2.3 From ae2689289232bb1237f7d37e591fc8c610d069e1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 21 Apr 2009 15:01:19 -0500 Subject: Putting in and checking version information to ensure we all agree about the header version --- libindicator/indicator.h | 5 +++++ src/applet-main.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/libindicator/indicator.h b/libindicator/indicator.h index daee3c8..6940dfb 100644 --- a/libindicator/indicator.h +++ b/libindicator/indicator.h @@ -16,5 +16,10 @@ get_icon_t get_icon; typedef GtkMenu * (*get_menu_t) (void); get_menu_t get_menu; +#define INDICATOR_VERSION "0.2.0" +#define INDICATOR_SET_VERSION static gchar * indicator_version_symbol = INDICATOR_VERSION; +#define INDICATOR_VERSION_S "indicator_version_symbol" +#define INDICATOR_VERSION_CHECK(x) (!g_strcmp0(x, INDICATOR_VERSION)) + #endif /* __LIBINDICATOR_INDICATOR_H_SEEN__ */ diff --git a/src/applet-main.c b/src/applet-main.c index 795c2fb..e28009d 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -80,6 +80,10 @@ load_module (const gchar * name, GtkWidget * menu) g_free(fullpath); g_return_val_if_fail(module != NULL, FALSE); + gchar * version; + g_return_val_if_fail(g_module_symbol(module, INDICATOR_VERSION_S, (gpointer *)(&version)), FALSE); + g_return_val_if_fail(INDICATOR_VERSION_CHECK(version), FALSE); + get_label_t lget_label; g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_LABEL_S, (gpointer *)(&lget_label)), FALSE); g_return_val_if_fail(lget_label != NULL, FALSE); -- cgit v1.2.3 From 8c6656e5d6a05ad14fe41c12bc2d159c5b3e22ca Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 21 Apr 2009 15:14:52 -0500 Subject: Changing to an icon and a lable and building our own item --- src/applet-main.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/applet-main.c b/src/applet-main.c index e28009d..74d948a 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -87,17 +87,36 @@ load_module (const gchar * name, GtkWidget * menu) get_label_t lget_label; g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_LABEL_S, (gpointer *)(&lget_label)), FALSE); g_return_val_if_fail(lget_label != NULL, FALSE); + GtkLabel * label = lget_label(); get_icon_t lget_icon; g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_LABEL_S, (gpointer *)(&lget_icon)), FALSE); g_return_val_if_fail(lget_icon != NULL, FALSE); + GtkImage * icon = lget_icon(); get_menu_t lget_menu; g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_LABEL_S, (gpointer *)(&lget_menu)), FALSE); g_return_val_if_fail(lget_menu != NULL, FALSE); + GtkMenu * lmenu = lget_menu(); - GtkWidget * menuitem = GTK_WIDGET(lget_menu()); - g_return_val_if_fail(GTK_MENU_ITEM(menuitem), FALSE); + if (label == NULL && icon == NULL) { + /* This is the case where there is nothing to display, + kinda odd that we'd have a module with nothing. */ + return FALSE; + } + + GtkWidget * menuitem = gtk_menu_item_new(); + GtkWidget * hbox = gtk_hbox_new(FALSE, 3); + if (icon != NULL) { + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(icon), FALSE, FALSE, 0); + } + if (label != NULL) { + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0); + } + + if (menu != NULL) { + gtk_menu_shell_append(GTK_MENU_SHELL(menuitem), GTK_WIDGET(lmenu)); + } gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); -- cgit v1.2.3 From 6465b8b734bb4ef825b518cc5f1397b6ba1bcf17 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 21 Apr 2009 20:42:26 -0500 Subject: * debian/control: Add in package libindicator-dev * debian/libindicate-dev.install: Add greater specificity on what gets installed to not get confused with files from libindicator * debian/libindicator-dev.install: Specify which files should be put into the development package. --- debian/changelog | 5 +++++ debian/control | 12 ++++++++++++ debian/libindicate-dev.install | 4 ++-- debian/libindicator-dev.install | 2 ++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 debian/libindicator-dev.install diff --git a/debian/changelog b/debian/changelog index 8496552..1a1dc4a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,11 @@ indicator-applet (0.2.0~bzr298-0ubuntu1) UNRELEASED; urgency=low * Upstream snapshot + * debian/control: Add in package libindicator-dev + * debian/libindicate-dev.install: Add greater specificity on what + gets installed to not get confused with files from libindicator + * debian/libindicator-dev.install: Specify which files should be + put into the development package. -- Ted Gould Tue, 21 Apr 2009 17:06:18 -0500 diff --git a/debian/control b/debian/control index d269a2d..9a734c5 100644 --- a/debian/control +++ b/debian/control @@ -54,3 +54,15 @@ Description: GNOME panel indicator applet - shared library various applications consistently in the GNOME panel. . This package contains files that are needed to build applications. + +Package: libindicator-dev +Section: libdevel +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libgtk2.0-dev (>= 2.12.0) +Description: GNOME panel indicator applet - shared library + This library contains information to build indicators to go into + the indicator applet. + . + This package contains files that are needed to build applications. diff --git a/debian/libindicate-dev.install b/debian/libindicate-dev.install index 4623919..ba86036 100644 --- a/debian/libindicate-dev.install +++ b/debian/libindicate-dev.install @@ -1,4 +1,4 @@ -debian/tmp/usr/include/ -debian/tmp/usr/lib/pkgconfig +debian/tmp/usr/include/libindicate* +debian/tmp/usr/lib/pkgconfig/indicate.pc debian/tmp/usr/lib/libindicate.a debian/tmp/usr/lib/libindicate.so diff --git a/debian/libindicator-dev.install b/debian/libindicator-dev.install new file mode 100644 index 0000000..7e7d9db --- /dev/null +++ b/debian/libindicator-dev.install @@ -0,0 +1,2 @@ +debian/tmp/usr/include/libindicator* +debian/tmp/usr/lib/pkgconfig/indicator.pc -- cgit v1.2.3 From 74a29536b81b8aa54f418078b8a4c39489d6bf5f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 21 Apr 2009 20:45:05 -0500 Subject: * debian/control: * Add in package libindicator-dev * Add build depends on libxml2-dev for upstream dep --- debian/changelog | 4 +++- debian/control | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1a1dc4a..3134406 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,9 @@ indicator-applet (0.2.0~bzr298-0ubuntu1) UNRELEASED; urgency=low * Upstream snapshot - * debian/control: Add in package libindicator-dev + * debian/control: + * Add in package libindicator-dev + * Add build depends on libxml2-dev for upstream dep * debian/libindicate-dev.install: Add greater specificity on what gets installed to not get confused with files from libindicator * debian/libindicator-dev.install: Specify which files should be diff --git a/debian/control b/debian/control index 9a734c5..9595fc5 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,8 @@ Build-Depends: debhelper (>= 5.0), gnome-doc-utils, libgnomeui-dev, libtool, - intltool + intltool, + libxml2-dev Standards-Version: 3.8.0 Homepage: https://launchpad.net/indicator-applet Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/indicator-applet/ubuntu -- cgit v1.2.3 From a380678055fe330d8d8b44e247d0b92eb5fc90c2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 21 Apr 2009 22:31:30 -0500 Subject: releasing version 0.2.0~bzr298-0ubuntu1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3134406..80ab70d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -indicator-applet (0.2.0~bzr298-0ubuntu1) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr298-0ubuntu1) jaunty; urgency=low * Upstream snapshot * debian/control: @@ -9,7 +9,7 @@ indicator-applet (0.2.0~bzr298-0ubuntu1) UNRELEASED; urgency=low * debian/libindicator-dev.install: Specify which files should be put into the development package. - -- Ted Gould Tue, 21 Apr 2009 17:06:18 -0500 + -- Ted Gould Tue, 21 Apr 2009 22:31:23 -0500 indicator-applet (0.1.6-0ubuntu1) jaunty; urgency=low -- cgit v1.2.3 From 20cfaa9c1d9fadf63cd4508b550541a71813243e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 22 Apr 2009 14:48:36 -0500 Subject: Forgot a + on gtk --- libindicator/indicator.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libindicator/indicator.pc.in b/libindicator/indicator.pc.in index fa1c697..ba88032 100644 --- a/libindicator/indicator.pc.in +++ b/libindicator/indicator.pc.in @@ -7,7 +7,7 @@ includedir=@includedir@ indicatordir=${libdir}/indicators/2/ Cflags: -I${includedir}/libindicator-0.1 -Requires: gtk-2.0 +Requires: gtk+-2.0 Libs: Name: libindicator -- cgit v1.2.3 From d332ad5b67b7354881895420c6d79a373295dc45 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 22 Apr 2009 14:52:19 -0500 Subject: releasing version 0.2.0~bzr299-0ubuntu1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b0c525c..9900468 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -indicator-applet (0.2.0~bzr299-0ubuntu1) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr299-0ubuntu1) jaunty; urgency=low * Upstream snapshot, forgot a + on GTK - -- Ted Gould Wed, 22 Apr 2009 14:48:56 -0500 + -- Ted Gould Wed, 22 Apr 2009 14:52:11 -0500 indicator-applet (0.2.0~bzr298-0ubuntu1) jaunty; urgency=low -- cgit v1.2.3 From c0b1f48f8ca11d5a74c00ccfd46454217c629e24 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 22 Apr 2009 15:22:14 -0500 Subject: Oops, not what I wanted. These should have been prototypes not global variables. Takes a second to think about it, but yeah, that's what they were. --- libindicator/indicator.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libindicator/indicator.h b/libindicator/indicator.h index 6940dfb..96b6d04 100644 --- a/libindicator/indicator.h +++ b/libindicator/indicator.h @@ -6,15 +6,15 @@ #define INDICATOR_GET_LABEL_S "get_label" typedef GtkLabel * (*get_label_t)(void); -get_label_t get_label; +GtkLabel * get_label (void); #define INDICATOR_GET_ICON_S "get_icon" typedef GtkImage * (*get_icon_t) (void); -get_icon_t get_icon; +GtkImage * get_icon (void); #define INDICATOR_GET_MENU_S "get_menu" typedef GtkMenu * (*get_menu_t) (void); -get_menu_t get_menu; +GtkMenu * get_menu (void); #define INDICATOR_VERSION "0.2.0" #define INDICATOR_SET_VERSION static gchar * indicator_version_symbol = INDICATOR_VERSION; -- cgit v1.2.3 From adfd764df668d34c553d49ad1f277153749ac004 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 22 Apr 2009 15:23:20 -0500 Subject: releasing version 0.2.0~bzr300-0ubuntu1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 94dabc8..c9bf8b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -indicator-applet (0.2.0~bzr300-0ubuntu1) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr300-0ubuntu1) jaunty; urgency=low * Upstream snapshot, fixing indicator.h - -- Ted Gould Wed, 22 Apr 2009 15:22:52 -0500 + -- Ted Gould Wed, 22 Apr 2009 15:23:15 -0500 indicator-applet (0.2.0~bzr299-0ubuntu1) jaunty; urgency=low -- cgit v1.2.3 From ef4bfdebdb12d945e2fca8583657ecb10978deba Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 22 Apr 2009 15:53:30 -0500 Subject: Wow, the genius of making a symbol you want to export static is simply amazing. It's truly a wonder of nature that I can tie my shoes in the morning. --- libindicator/indicator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libindicator/indicator.h b/libindicator/indicator.h index 96b6d04..f2bd51d 100644 --- a/libindicator/indicator.h +++ b/libindicator/indicator.h @@ -17,7 +17,7 @@ typedef GtkMenu * (*get_menu_t) (void); GtkMenu * get_menu (void); #define INDICATOR_VERSION "0.2.0" -#define INDICATOR_SET_VERSION static gchar * indicator_version_symbol = INDICATOR_VERSION; +#define INDICATOR_SET_VERSION gchar * indicator_version_symbol = INDICATOR_VERSION; #define INDICATOR_VERSION_S "indicator_version_symbol" #define INDICATOR_VERSION_CHECK(x) (!g_strcmp0(x, INDICATOR_VERSION)) -- cgit v1.2.3 From f5044ea680421a572394ea8286b538857d491973 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 22 Apr 2009 15:56:02 -0500 Subject: releasing version 0.2.0~bzr301-0ubuntu1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 880d059..5b759b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -indicator-applet (0.2.0~bzr301-0ubuntu1) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr301-0ubuntu1) jaunty; urgency=low * Upstream snapshot, fixing indicator.h - -- Ted Gould Wed, 22 Apr 2009 15:55:33 -0500 + -- Ted Gould Wed, 22 Apr 2009 15:55:55 -0500 indicator-applet (0.2.0~bzr300-0ubuntu1) jaunty; urgency=low -- cgit v1.2.3 From 18397c82725b7cee22bf82b0539a4fb36dd49fe9 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 22 Apr 2009 17:08:17 -0500 Subject: Turning versions into a function and adding a name symbol. Not yet used though. --- libindicator/indicator.h | 13 +++++++++++-- src/applet-main.c | 9 ++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/libindicator/indicator.h b/libindicator/indicator.h index f2bd51d..8947f5b 100644 --- a/libindicator/indicator.h +++ b/libindicator/indicator.h @@ -16,10 +16,19 @@ GtkImage * get_icon (void); typedef GtkMenu * (*get_menu_t) (void); GtkMenu * get_menu (void); +#define INDICATOR_GET_VERSION_S "get_version" +typedef gchar * (*get_version_t) (void); +gchar * get_version (void); + #define INDICATOR_VERSION "0.2.0" -#define INDICATOR_SET_VERSION gchar * indicator_version_symbol = INDICATOR_VERSION; -#define INDICATOR_VERSION_S "indicator_version_symbol" +#define INDICATOR_SET_VERSION gchar * get_version(void) { return INDICATOR_VERSION; } #define INDICATOR_VERSION_CHECK(x) (!g_strcmp0(x, INDICATOR_VERSION)) +#define INDICATOR_GET_NAME_S "get_name" +typedef gchar * (*get_name_t) (void); +gchar * get_name (void); +#define INDICATOR_SET_NAME(x) gchar * get_name(void) {return (x); } + + #endif /* __LIBINDICATOR_INDICATOR_H_SEEN__ */ diff --git a/src/applet-main.c b/src/applet-main.c index 74d948a..f979beb 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -80,9 +80,12 @@ load_module (const gchar * name, GtkWidget * menu) g_free(fullpath); g_return_val_if_fail(module != NULL, FALSE); - gchar * version; - g_return_val_if_fail(g_module_symbol(module, INDICATOR_VERSION_S, (gpointer *)(&version)), FALSE); - g_return_val_if_fail(INDICATOR_VERSION_CHECK(version), FALSE); + get_version_t lget_version; + g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_VERSION_S, (gpointer *)(&lget_version)), FALSE); + if (!INDICATOR_VERSION_CHECK(lget_version())) { + g_warning("Indicator using API version '%s' we're expecting '%s'", lget_version(), INDICATOR_VERSION); + return FALSE; + } get_label_t lget_label; g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_LABEL_S, (gpointer *)(&lget_label)), FALSE); -- cgit v1.2.3 From e1eb7c8f66e217ee7c98c49347cf1d333c96808b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 22 Apr 2009 17:09:11 -0500 Subject: releasing version 0.2.0~bzr302-0ubuntu1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index c1bb92d..33c2405 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -indicator-applet (0.2.0~bzr302-0ubuntu1) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr302-0ubuntu1) jaunty; urgency=low * Upstream snapshot, turning version getting feature into a function and adding a name symbol outline. - -- Ted Gould Wed, 22 Apr 2009 17:08:29 -0500 + -- Ted Gould Wed, 22 Apr 2009 17:09:07 -0500 indicator-applet (0.2.0~bzr301-0ubuntu1) jaunty; urgency=low -- cgit v1.2.3 From d075aeec9ff17ffa5847d06246854689236d3876 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 22 Apr 2009 22:02:05 -0500 Subject: Oops, cut and paste error, pulling up the wrong symbols --- src/applet-main.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/applet-main.c b/src/applet-main.c index f979beb..1f538ae 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -80,31 +80,32 @@ load_module (const gchar * name, GtkWidget * menu) g_free(fullpath); g_return_val_if_fail(module != NULL, FALSE); - get_version_t lget_version; + get_version_t lget_version = NULL; g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_VERSION_S, (gpointer *)(&lget_version)), FALSE); if (!INDICATOR_VERSION_CHECK(lget_version())) { g_warning("Indicator using API version '%s' we're expecting '%s'", lget_version(), INDICATOR_VERSION); return FALSE; } - get_label_t lget_label; + get_label_t lget_label = NULL; g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_LABEL_S, (gpointer *)(&lget_label)), FALSE); g_return_val_if_fail(lget_label != NULL, FALSE); GtkLabel * label = lget_label(); - get_icon_t lget_icon; - g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_LABEL_S, (gpointer *)(&lget_icon)), FALSE); + get_icon_t lget_icon = NULL; + g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_ICON_S, (gpointer *)(&lget_icon)), FALSE); g_return_val_if_fail(lget_icon != NULL, FALSE); GtkImage * icon = lget_icon(); - get_menu_t lget_menu; - g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_LABEL_S, (gpointer *)(&lget_menu)), FALSE); + get_menu_t lget_menu = NULL; + g_return_val_if_fail(g_module_symbol(module, INDICATOR_GET_MENU_S, (gpointer *)(&lget_menu)), FALSE); g_return_val_if_fail(lget_menu != NULL, FALSE); GtkMenu * lmenu = lget_menu(); if (label == NULL && icon == NULL) { /* This is the case where there is nothing to display, kinda odd that we'd have a module with nothing. */ + g_warning("No label or icon. Odd."); return FALSE; } -- cgit v1.2.3 From 2f6ccdfe4ee4d5c30123edcea9fcd4c4d54d8ea7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 22 Apr 2009 22:06:00 -0500 Subject: Slipping in the hbox --- src/applet-main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/applet-main.c b/src/applet-main.c index 1f538ae..7f3a210 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -117,12 +117,15 @@ load_module (const gchar * name, GtkWidget * menu) if (label != NULL) { gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0); } + gtk_container_add(GTK_CONTAINER(menuitem), hbox); + gtk_widget_show(hbox); if (menu != NULL) { gtk_menu_shell_append(GTK_MENU_SHELL(menuitem), GTK_WIDGET(lmenu)); } gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); + gtk_widget_show(menuitem); return TRUE; } -- cgit v1.2.3 From c292100a3d95aac71c7cb943cbd3df9a204c0a70 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 22 Apr 2009 23:44:06 -0500 Subject: Get the submenu set right. --- src/applet-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applet-main.c b/src/applet-main.c index 7f3a210..7c39d6d 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -120,8 +120,8 @@ load_module (const gchar * name, GtkWidget * menu) gtk_container_add(GTK_CONTAINER(menuitem), hbox); gtk_widget_show(hbox); - if (menu != NULL) { - gtk_menu_shell_append(GTK_MENU_SHELL(menuitem), GTK_WIDGET(lmenu)); + if (lmenu != NULL) { + gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), GTK_WIDGET(lmenu)); } gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); -- cgit v1.2.3 From 183d218f7c7d22da792b90c0014d44b088d91008 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 22 Apr 2009 23:46:48 -0500 Subject: releasing version 0.2.0~bzr305-0ubuntu1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1252dc9..b51b603 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -indicator-applet (0.2.0~bzr305-0ubuntu2) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr305-0ubuntu1) jaunty; urgency=low * Upstream snapshot * debian/control: @@ -9,7 +9,7 @@ indicator-applet (0.2.0~bzr305-0ubuntu2) UNRELEASED; urgency=low * debian/libindicator-dev.install: Specify which files should be put into the development package. - -- Ted Gould Wed, 22 Apr 2009 23:45:27 -0500 + -- Ted Gould Wed, 22 Apr 2009 23:46:28 -0500 indicator-applet (0.1.6-0ubuntu1) jaunty; urgency=low -- cgit v1.2.3 From 5899a3f246b8eeac2c820013a27cde0301ad69ee Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 27 Apr 2009 10:39:20 -0500 Subject: Switching to system dbus-test-runner --- tests/test_interests | 2 +- tests/test_interests_multi | 2 +- tests/test_simple | 2 +- tests/test_thousand_indicators | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_interests b/tests/test_interests index b37189f..750a789 100755 --- a/tests/test_interests +++ b/tests/test_interests @@ -1,5 +1,5 @@ #!/bin/sh -DBUS_RUNNER="/home/ted/Development/dbus-play/dbus-test-runner --dbus-config /home/ted/Development/dbus-play/session.conf" +DBUS_RUNNER="dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf" ${DBUS_RUNNER} --task ./test-interests-client --task-name Client --task ./test-interests-server --task-name Server diff --git a/tests/test_interests_multi b/tests/test_interests_multi index 96b23c9..4dbdee8 100755 --- a/tests/test_interests_multi +++ b/tests/test_interests_multi @@ -1,5 +1,5 @@ #!/bin/sh -DBUS_RUNNER="/home/ted/Development/dbus-play/dbus-test-runner --dbus-config /home/ted/Development/dbus-play/session.conf" +DBUS_RUNNER="dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf" ${DBUS_RUNNER} --task ./test-interests-client --task-name Client --task ./test-interests-server1 --task-name Server1 --task ./test-interests-server2 --task-name Server2 --task ./test-interests-server3 --task-name Server3 --task ./test-interests-server4 --task-name Server4 --task ./test-interests-server5 --task-name Server5 diff --git a/tests/test_simple b/tests/test_simple index 8c4263e..1b0dc4c 100755 --- a/tests/test_simple +++ b/tests/test_simple @@ -1,5 +1,5 @@ #!/bin/sh -DBUS_RUNNER="/home/ted/Development/dbus-play/dbus-test-runner --dbus-config /home/ted/Development/dbus-play/session.conf" +DBUS_RUNNER="dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf" ${DBUS_RUNNER} --task ./test-simple-client --task-name Client --task ./test-simple-server --task-name Server diff --git a/tests/test_thousand_indicators b/tests/test_thousand_indicators index 4dd7fae..fb1079d 100755 --- a/tests/test_thousand_indicators +++ b/tests/test_thousand_indicators @@ -1,5 +1,5 @@ #!/bin/sh -DBUS_RUNNER="/home/ted/Development/dbus-play/dbus-test-runner --dbus-config /home/ted/Development/dbus-play/session.conf" +DBUS_RUNNER="dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf" ${DBUS_RUNNER} --task ./test-thousand-indicators-client --task-name Client --task ./test-thousand-indicators-server --task-name Server -- cgit v1.2.3 From 0f174a8a4904e33f912fae70a6345a861306b474 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 27 Apr 2009 10:48:38 -0500 Subject: How important a simple backslash is :) --- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 7d72047..03bd980 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -14,7 +14,7 @@ libexec_PROGRAMS = \ test-interests-server4 \ test-interests-server5 \ test-thousand-indicators-client \ - test-thousand-indicators-server + test-thousand-indicators-server \ test-simple-client \ test-simple-server -- cgit v1.2.3 From 60e4ddeb21827772b883987dc79bfdfda9b78fe6 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 27 Apr 2009 10:51:25 -0500 Subject: debian/control: Adding a build-dep on dbus-test-runner --- debian/changelog | 1 + debian/control | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 11bdc8c..6d3043d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ indicator-applet (0.2.0~bzr307-0ubuntu1) UNRELEASED; urgency=low * Upstream Snapshot: Adding in a test suite. + * debian/control: Adding a build-dep on dbus-test-runner -- Ted Gould Mon, 27 Apr 2009 10:50:10 -0500 diff --git a/debian/control b/debian/control index 9595fc5..f663d47 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,8 @@ Build-Depends: debhelper (>= 5.0), libgnomeui-dev, libtool, intltool, - libxml2-dev + libxml2-dev, + dbus-test-runner Standards-Version: 3.8.0 Homepage: https://launchpad.net/indicator-applet Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/indicator-applet/ubuntu -- cgit v1.2.3 From d8582f740476fdf911e798527b4aec19c75b6a6f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 27 Apr 2009 10:52:33 -0500 Subject: releasing version 0.2.0~bzr307-0ubuntu1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6d3043d..48bb7d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -indicator-applet (0.2.0~bzr307-0ubuntu1) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr307-0ubuntu1) jaunty; urgency=low * Upstream Snapshot: Adding in a test suite. * debian/control: Adding a build-dep on dbus-test-runner - -- Ted Gould Mon, 27 Apr 2009 10:50:10 -0500 + -- Ted Gould Mon, 27 Apr 2009 10:52:28 -0500 indicator-applet (0.2.0~bzr305-0ubuntu1) jaunty; urgency=low -- cgit v1.2.3 From f6f7c27435c75cd775f011792503b7458311ca3e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 27 Apr 2009 11:06:42 -0500 Subject: Increment for PPA. Forgot to autogen.sh --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 48bb7d4..3d8e42a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +indicator-applet (0.2.0~bzr307-0ubuntu2) UNRELEASED; urgency=low + + * Increment for PPA. Forgot to autogen.sh + + -- Ted Gould Mon, 27 Apr 2009 11:06:28 -0500 + indicator-applet (0.2.0~bzr307-0ubuntu1) jaunty; urgency=low * Upstream Snapshot: Adding in a test suite. -- cgit v1.2.3 From f6767c860ee574c964bc7b9bc74affda52f941a1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 27 Apr 2009 11:06:50 -0500 Subject: releasing version 0.2.0~bzr307-0ubuntu2 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3d8e42a..c63e92c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -indicator-applet (0.2.0~bzr307-0ubuntu2) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr307-0ubuntu2) jaunty; urgency=low * Increment for PPA. Forgot to autogen.sh - -- Ted Gould Mon, 27 Apr 2009 11:06:28 -0500 + -- Ted Gould Mon, 27 Apr 2009 11:06:45 -0500 indicator-applet (0.2.0~bzr307-0ubuntu1) jaunty; urgency=low -- cgit v1.2.3 From 89235a43e3b1af7f57d1fdbc87021ea49e1d5d05 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 29 Apr 2009 10:11:21 -0500 Subject: Patch from Niel Patel to close the directory after opening it. --- src/applet-main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/applet-main.c b/src/applet-main.c index 310cfe9..535a6ae 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -251,6 +251,7 @@ applet_fill_cb (PanelApplet * applet, const gchar * iid, gpointer data) if (load_module(name, menubar)) indicators_loaded++; } + g_dir_close (dir); } if (indicators_loaded == 0) { -- cgit v1.2.3 From c73af692f9bd4cab185206ab90b592469e659d77 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 11:40:56 -0500 Subject: First pass at trying to create some function documentation for Indicator --- libindicate/indicator.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++ libindicate/indicator.h | 8 ++++ 2 files changed, 107 insertions(+) diff --git a/libindicate/indicator.c b/libindicate/indicator.c index dfcba67..87b11a7 100644 --- a/libindicate/indicator.c +++ b/libindicate/indicator.c @@ -76,6 +76,12 @@ indicate_indicator_class_init (IndicateIndicatorClass * class) gobj->finalize = indicate_indicator_finalize; + /** IndicateIndicator::dispaly: + + Emitted when the user has clicked on this indicator. In the + messaging indicator this would be when someone clicks on the + menu item for the indicator. + */ signals[USER_DISPLAY] = g_signal_new(INDICATE_INDICATOR_SIGNAL_DISPLAY, G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, @@ -83,6 +89,11 @@ indicate_indicator_class_init (IndicateIndicatorClass * class) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + /** IndicateIndicator::hide: + + Emitted every time this indicator is hidden. This + is mostly used by #IndicateServer. + */ signals[HIDE] = g_signal_new(INDICATE_INDICATOR_SIGNAL_HIDE, G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, @@ -90,6 +101,11 @@ indicate_indicator_class_init (IndicateIndicatorClass * class) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + /** IndicateIndicator::hide: + + Emitted every time this indicator is shown. This + is mostly used by #IndicateServer. + */ signals[SHOW] = g_signal_new(INDICATE_INDICATOR_SIGNAL_SHOW, G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, @@ -97,6 +113,11 @@ indicate_indicator_class_init (IndicateIndicatorClass * class) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + /** IndicateIndicator::modified: + + Emitted every time an indicator property is changed. + This is mostly used by #IndicateServer. + */ signals[MODIFIED] = g_signal_new(INDICATE_INDICATOR_SIGNAL_MODIFIED, G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, @@ -145,6 +166,10 @@ indicate_indicator_finalize (GObject * obj) return; } +/** indicate_indicator_new: + + Builds a new indicator object using #g_object_new. +*/ IndicateIndicator * indicate_indicator_new (void) { @@ -152,6 +177,13 @@ indicate_indicator_new (void) return indicator; } +/** indicate_indicator_show: + @indicator: a #IndicateIndicator to act on + + Shows this indicator on the bus. If the #IndicateServer that it's + connected to is not shown itself this function will show the server + as well using #indicate_server_show. +*/ void indicate_indicator_show (IndicateIndicator * indicator) { @@ -171,6 +203,12 @@ indicate_indicator_show (IndicateIndicator * indicator) return; } +/** indicate_indicator_hide: + @indicator: a #IndicateIndicator to act on + + Hides the indicator from the bus. Does not effect the + indicator's #IndicateServer in any way. +*/ void indicate_indicator_hide (IndicateIndicator * indicator) { @@ -186,6 +224,13 @@ indicate_indicator_hide (IndicateIndicator * indicator) return; } +/** indicate_indicator_is_visible: + @indicator: a #IndicateIndicator to act on + + Checkes the visibility status of @indicator. + + Return value: %TRUE if the indicator is visible else %FALSE. +*/ gboolean indicate_indicator_is_visible (IndicateIndicator * indicator) { @@ -194,6 +239,14 @@ indicate_indicator_is_visible (IndicateIndicator * indicator) return priv->is_visible; } +/** indicate_indicator_get_id: + @indicator: a #IndicateIndicator to act on + + Gets the ID value of the @indicator. + + Return value: The ID of the indicator. Can not be zero. + Zero represents an error. +*/ guint indicate_indicator_get_id (IndicateIndicator * indicator) { @@ -202,6 +255,14 @@ indicate_indicator_get_id (IndicateIndicator * indicator) return priv->id; } +/** indicate_indicator_get_indicator_type: + @indicator: a #IndicateIndicator to act on + + Returns the type of @indicator. This is largely set by the subclass + that the indicator was built with and should not be free'd. + + Return value: A string defining the type or NULL for no type. +*/ const gchar * indicate_indicator_get_indicator_type (IndicateIndicator * indicator) { @@ -215,6 +276,13 @@ indicate_indicator_get_indicator_type (IndicateIndicator * indicator) return NULL; } +/** indicate_indicator_user_display: + @indicator: a #IndicateIndicator to act on + + Emits the #IndicateIndicator::user-display signal simliar to a user + clicking on @indicator over the bus. Signal will not be sent if the + @indicator is not visible. +*/ void indicate_indicator_user_display (IndicateIndicator * indicator) { @@ -227,6 +295,17 @@ indicate_indicator_user_display (IndicateIndicator * indicator) return; } +/** indicate_indicator_set_property: + @indicator: a #IndicateIndicator to act on + @key: name of the property + @data: value of the property + + Sets a simple string property on @indicator. If the property + had previously been set it will replace it with the new value, + otherwise it will create the property. This will include an + emition of #IndicateIndicator::modified if the property value + was changed. +*/ void indicate_indicator_set_property (IndicateIndicator * indicator, const gchar * key, const gchar * data) { @@ -238,6 +317,16 @@ indicate_indicator_set_property (IndicateIndicator * indicator, const gchar * ke return class->set_property(indicator, key, data); } +/** indicate_indicator_set_property_icon: + @indicator: a #IndicateIndicator to act on + @key: name of the property + @data: icon to set property with + + This is a helper function that wraps around #indicate_indicator_set_property + but takes an #GdkPixbuf parameter. It then takes the @data + parameter, turns it into a PNG, base64 encodes it and then + uses that data to call #indicate_indicator_set_property. +*/ void indicate_indicator_set_property_icon (IndicateIndicator * indicator, const gchar * key, const GdkPixbuf * data) { @@ -271,6 +360,16 @@ indicate_indicator_set_property_icon (IndicateIndicator * indicator, const gchar return; } +/** indicate_indicator_set_property_time: + @indicator: a #IndicateIndicator to act on + @key: name of the property + @data: time to set property with + + This is a helper function that wraps around #indicate_indicator_set_property + but takes an #GTimeVal parameter. It then takes the @data + parameter converts it to an ISO 8601 time string and + uses that data to call #indicate_indicator_set_property. +*/ void indicate_indicator_set_property_time (IndicateIndicator * indicator, const gchar * key, GTimeVal * time) { diff --git a/libindicate/indicator.h b/libindicate/indicator.h index 8af5568..4536cf5 100644 --- a/libindicate/indicator.h +++ b/libindicate/indicator.h @@ -56,6 +56,14 @@ G_BEGIN_DECLS typedef struct _IndicateIndicator IndicateIndicator; typedef struct _IndicateIndicatorClass IndicateIndicatorClass; +/** + IndicateInidcator: + + The indicator object represents a single item that is shared over the + indicator bus. This could be something like one IM, one e-mail or + a single system update. It should be accessed only through its + accessors. +*/ struct _IndicateIndicator { GObject parent; }; -- cgit v1.2.3 From f62b8365144946f97e7c6450dcc36c09d746ff31 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 11:51:46 -0500 Subject: Dispaly typo --- libindicate/indicator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libindicate/indicator.c b/libindicate/indicator.c index 87b11a7..b691357 100644 --- a/libindicate/indicator.c +++ b/libindicate/indicator.c @@ -76,7 +76,7 @@ indicate_indicator_class_init (IndicateIndicatorClass * class) gobj->finalize = indicate_indicator_finalize; - /** IndicateIndicator::dispaly: + /** IndicateIndicator::display: Emitted when the user has clicked on this indicator. In the messaging indicator this would be when someone clicks on the -- cgit v1.2.3 From 73a5c9243d9189a3e3285466f59932a02caabd26 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 12:04:20 -0500 Subject: Ignoring the dbus and glib-marshaller generated header files. --- docs/reference/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index 759465e..2589179 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -47,7 +47,7 @@ CFILE_GLOB=$(top_srcdir)/libindicate/*.c # Header files to ignore when scanning. # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h -IGNORE_HFILES= +IGNORE_HFILES=dbus-indicate-client.h dbus-indicate-server.h dbus-listener-client.h dbus-listener-server.h listener-marshal.h # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png -- cgit v1.2.3 From a41eab6f1d9d1316ba5080cb6e8d41cf1f059c4b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 12:08:32 -0500 Subject: Removing symbols that shouldn't be in the docs anyway. --- docs/reference/libindicate-sections.txt | 64 ----- docs/reference/tmpl/libindicate-unused.sgml | 372 ++++++++++++++++++++++++++++ 2 files changed, 372 insertions(+), 64 deletions(-) diff --git a/docs/reference/libindicate-sections.txt b/docs/reference/libindicate-sections.txt index f5f3290..86f6d34 100644 --- a/docs/reference/libindicate-sections.txt +++ b/docs/reference/libindicate-sections.txt @@ -49,31 +49,6 @@ IndicateListenerIndicator IndicateListenerServer IndicateServer IndicateServerClass -dbus_g_proxy_begin_call -dbus_glib_marshal_indicate_server_BOOLEAN__POINTER_POINTER -dbus_glib_marshal_indicate_server_BOOLEAN__STRING_POINTER_POINTER -dbus_glib_marshal_indicate_server_BOOLEAN__UINT_BOXED_POINTER_POINTER -dbus_glib_marshal_indicate_server_BOOLEAN__UINT_POINTER -dbus_glib_marshal_indicate_server_BOOLEAN__UINT_POINTER_POINTER -dbus_glib_marshal_indicate_server_BOOLEAN__UINT_STRING_POINTER_POINTER -g_marshal_value_peek_boolean -g_marshal_value_peek_boxed -g_marshal_value_peek_char -g_marshal_value_peek_double -g_marshal_value_peek_enum -g_marshal_value_peek_flags -g_marshal_value_peek_float -g_marshal_value_peek_int -g_marshal_value_peek_int64 -g_marshal_value_peek_long -g_marshal_value_peek_object -g_marshal_value_peek_param -g_marshal_value_peek_pointer -g_marshal_value_peek_string -g_marshal_value_peek_uchar -g_marshal_value_peek_uint -g_marshal_value_peek_uint64 -g_marshal_value_peek_ulong indicate_indicator_get_id indicate_indicator_get_indicator_type indicate_indicator_get_property @@ -91,22 +66,11 @@ indicate_listener_display indicate_listener_get_property indicate_listener_get_property_cb indicate_listener_get_type -indicate_listener_marshal_VOID__POINTER_POINTER_STRING -indicate_listener_marshal_VOID__POINTER_POINTER_STRING_STRING -indicate_listener_marshal_VOID__UINT_STRING indicate_listener_new indicate_server_add_indicator indicate_server_emit_indicator_added indicate_server_emit_indicator_modified indicate_server_emit_indicator_removed -indicate_server_get_desktop -indicate_server_get_indicator_count -indicate_server_get_indicator_count_by_type -indicate_server_get_indicator_list -indicate_server_get_indicator_list_by_type -indicate_server_get_indicator_properties -indicate_server_get_indicator_property -indicate_server_get_indicator_property_group indicate_server_get_next_id indicate_server_get_type indicate_server_hide @@ -117,33 +81,5 @@ indicate_server_set_dbus_object indicate_server_set_default indicate_server_set_desktop_file indicate_server_show -indicate_server_show_indicator_to_user -org_freedesktop_indicator_get_desktop -org_freedesktop_indicator_get_desktop_async -org_freedesktop_indicator_get_desktop_reply -org_freedesktop_indicator_get_indicator_count -org_freedesktop_indicator_get_indicator_count_async -org_freedesktop_indicator_get_indicator_count_by_type -org_freedesktop_indicator_get_indicator_count_by_type_async -org_freedesktop_indicator_get_indicator_count_by_type_reply -org_freedesktop_indicator_get_indicator_count_reply -org_freedesktop_indicator_get_indicator_list -org_freedesktop_indicator_get_indicator_list_async -org_freedesktop_indicator_get_indicator_list_by_type -org_freedesktop_indicator_get_indicator_list_by_type_async -org_freedesktop_indicator_get_indicator_list_by_type_reply -org_freedesktop_indicator_get_indicator_list_reply -org_freedesktop_indicator_get_indicator_properties -org_freedesktop_indicator_get_indicator_properties_async -org_freedesktop_indicator_get_indicator_properties_reply -org_freedesktop_indicator_get_indicator_property -org_freedesktop_indicator_get_indicator_property_async -org_freedesktop_indicator_get_indicator_property_group -org_freedesktop_indicator_get_indicator_property_group_async -org_freedesktop_indicator_get_indicator_property_group_reply -org_freedesktop_indicator_get_indicator_property_reply -org_freedesktop_indicator_show_indicator_to_user -org_freedesktop_indicator_show_indicator_to_user_async -org_freedesktop_indicator_show_indicator_to_user_reply diff --git a/docs/reference/tmpl/libindicate-unused.sgml b/docs/reference/tmpl/libindicate-unused.sgml index d4e3767..4727625 100644 --- a/docs/reference/tmpl/libindicate-unused.sgml +++ b/docs/reference/tmpl/libindicate-unused.sgml @@ -1,3 +1,11 @@ + + + + + +@Param1: +@Returns: + @@ -70,6 +78,132 @@ @invocation_hint: @marshal_data: + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + @@ -193,3 +327,241 @@ @error: @Returns: + + + + + +@proxy: +@OUT_indicator_count: +@Returns: + + + + + + +@proxy: +@callback: +@Returns: + + + + + + +@proxy: +@IN_type: +@OUT_indicator_count: +@Returns: + + + + + + +@proxy: +@IN_type: +@callback: +@Returns: + + + + + + +@proxy: +@OUT_indicator_count: +@error: +@userdata: + + + + + + +@proxy: +@OUT_indicator_count: +@error: +@userdata: + + + + + + +@proxy: +@OUT_indicators: +@Returns: + + + + + + +@proxy: +@callback: +@Returns: + + + + + + +@proxy: +@IN_type: +@OUT_indicators: +@Returns: + + + + + + +@proxy: +@IN_type: +@callback: +@Returns: + + + + + + +@proxy: +@OUT_indicators: +@error: +@userdata: + + + + + + +@proxy: +@OUT_indicators: +@error: +@userdata: + + + + + + +@proxy: +@IN_id: +@OUT_properties: +@Returns: + + + + + + +@proxy: +@IN_id: +@callback: +@Returns: + + + + + + +@proxy: +@OUT_properties: +@error: +@userdata: + + + + + + +@proxy: +@IN_id: +@IN_property: +@OUT_value: +@Returns: + + + + + + +@proxy: +@IN_id: +@IN_property: +@callback: +@Returns: + + + + + + +@proxy: +@IN_id: +@IN_properties: +@OUT_values: +@Returns: + + + + + + +@proxy: +@IN_id: +@IN_properties: +@callback: +@Returns: + + + + + + +@proxy: +@OUT_values: +@error: +@userdata: + + + + + + +@proxy: +@OUT_value: +@error: +@userdata: + + + + + + +@proxy: +@IN_id: +@Returns: + + + + + + +@proxy: +@IN_id: +@callback: +@Returns: + + + + + + +@proxy: +@error: +@userdata: + -- cgit v1.2.3 From 1c91e431be9a8e9bf706485735efccf0a0c54283 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 13:07:29 -0500 Subject: Turns out that gtk-doc can't have the name of the function on the same line as the start of the comment. How stupid. --- libindicate/indicator.c | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/libindicate/indicator.c b/libindicate/indicator.c index b691357..e40975a 100644 --- a/libindicate/indicator.c +++ b/libindicate/indicator.c @@ -76,7 +76,8 @@ indicate_indicator_class_init (IndicateIndicatorClass * class) gobj->finalize = indicate_indicator_finalize; - /** IndicateIndicator::display: + /** + IndicateIndicator::display: Emitted when the user has clicked on this indicator. In the messaging indicator this would be when someone clicks on the @@ -89,7 +90,8 @@ indicate_indicator_class_init (IndicateIndicatorClass * class) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - /** IndicateIndicator::hide: + /** + IndicateIndicator::hide: Emitted every time this indicator is hidden. This is mostly used by #IndicateServer. @@ -101,7 +103,8 @@ indicate_indicator_class_init (IndicateIndicatorClass * class) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - /** IndicateIndicator::hide: + /** + IndicateIndicator::hide: Emitted every time this indicator is shown. This is mostly used by #IndicateServer. @@ -113,7 +116,8 @@ indicate_indicator_class_init (IndicateIndicatorClass * class) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - /** IndicateIndicator::modified: + /** + IndicateIndicator::modified: Emitted every time an indicator property is changed. This is mostly used by #IndicateServer. @@ -166,9 +170,12 @@ indicate_indicator_finalize (GObject * obj) return; } -/** indicate_indicator_new: +/** + indicate_indicator_new: Builds a new indicator object using #g_object_new. + + Return value: A pointer to a new #IndicateIndicator object. */ IndicateIndicator * indicate_indicator_new (void) @@ -177,7 +184,8 @@ indicate_indicator_new (void) return indicator; } -/** indicate_indicator_show: +/** + indicate_indicator_show: @indicator: a #IndicateIndicator to act on Shows this indicator on the bus. If the #IndicateServer that it's @@ -203,7 +211,8 @@ indicate_indicator_show (IndicateIndicator * indicator) return; } -/** indicate_indicator_hide: +/** + indicate_indicator_hide: @indicator: a #IndicateIndicator to act on Hides the indicator from the bus. Does not effect the @@ -224,7 +233,8 @@ indicate_indicator_hide (IndicateIndicator * indicator) return; } -/** indicate_indicator_is_visible: +/** + indicate_indicator_is_visible: @indicator: a #IndicateIndicator to act on Checkes the visibility status of @indicator. @@ -239,7 +249,8 @@ indicate_indicator_is_visible (IndicateIndicator * indicator) return priv->is_visible; } -/** indicate_indicator_get_id: +/** + indicate_indicator_get_id: @indicator: a #IndicateIndicator to act on Gets the ID value of the @indicator. @@ -255,7 +266,8 @@ indicate_indicator_get_id (IndicateIndicator * indicator) return priv->id; } -/** indicate_indicator_get_indicator_type: +/** + indicate_indicator_get_indicator_type: @indicator: a #IndicateIndicator to act on Returns the type of @indicator. This is largely set by the subclass @@ -276,7 +288,8 @@ indicate_indicator_get_indicator_type (IndicateIndicator * indicator) return NULL; } -/** indicate_indicator_user_display: +/** + indicate_indicator_user_display: @indicator: a #IndicateIndicator to act on Emits the #IndicateIndicator::user-display signal simliar to a user @@ -295,7 +308,8 @@ indicate_indicator_user_display (IndicateIndicator * indicator) return; } -/** indicate_indicator_set_property: +/** + indicate_indicator_set_property: @indicator: a #IndicateIndicator to act on @key: name of the property @data: value of the property @@ -317,7 +331,8 @@ indicate_indicator_set_property (IndicateIndicator * indicator, const gchar * ke return class->set_property(indicator, key, data); } -/** indicate_indicator_set_property_icon: +/** + indicate_indicator_set_property_icon: @indicator: a #IndicateIndicator to act on @key: name of the property @data: icon to set property with @@ -360,7 +375,8 @@ indicate_indicator_set_property_icon (IndicateIndicator * indicator, const gchar return; } -/** indicate_indicator_set_property_time: +/** + indicate_indicator_set_property_time: @indicator: a #IndicateIndicator to act on @key: name of the property @data: time to set property with -- cgit v1.2.3 From 43f575ee79e3f0bd6f69a6ce835d5298053073fb Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 14:06:45 -0500 Subject: Getting most of the indicator documentation in the pool. --- libindicate/indicator.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/libindicate/indicator.c b/libindicate/indicator.c index e40975a..c867a9a 100644 --- a/libindicate/indicator.c +++ b/libindicate/indicator.c @@ -170,6 +170,14 @@ indicate_indicator_finalize (GObject * obj) return; } +/** + indicate_indicator_get_type: + + Gets a unique #GType for the #IndicateIndicator objects. + + Return value: A unique #GType value. +*/ + /** indicate_indicator_new: @@ -397,6 +405,16 @@ indicate_indicator_set_property_time (IndicateIndicator * indicator, const gchar return; } +/** + indicate_indicator_get_property: + @indicator: a #IndicateIndicator to act on + @key: name of the property + + Returns the value that is set for a property or %NULL if that + property is not set. + + Return value: A constant string or NULL. +*/ const gchar * indicate_indicator_get_property (IndicateIndicator * indicator, const gchar * key) { @@ -408,6 +426,17 @@ indicate_indicator_get_property (IndicateIndicator * indicator, const gchar * ke return class->get_property(indicator, key); } +/** + indicate_indicator_list_properties: + @indicator: a #IndicateIndicator to act on + + This function gets a list of all the properties that exist + on a @indicator. The array may have zero entries but almost + always at least has 'type' in it. + + Return value: An array of strings that is the keys of all + the properties on this indicator. +*/ GPtrArray * indicate_indicator_list_properties (IndicateIndicator * indicator) { -- cgit v1.2.3 From 47c4b8e7c3f328da2ec23ddec762c47b329a44da Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 14:10:33 -0500 Subject: Typo --- libindicate/indicator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libindicate/indicator.h b/libindicate/indicator.h index 4536cf5..138a48c 100644 --- a/libindicate/indicator.h +++ b/libindicate/indicator.h @@ -57,7 +57,7 @@ typedef struct _IndicateIndicator IndicateIndicator; typedef struct _IndicateIndicatorClass IndicateIndicatorClass; /** - IndicateInidcator: + IndicateIndicator: The indicator object represents a single item that is shared over the indicator bus. This could be something like one IM, one e-mail or -- cgit v1.2.3 From dd49cd3da4456be72f5aae8ba0900c80b637409c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 14:10:41 -0500 Subject: What is the server --- libindicate/server.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libindicate/server.h b/libindicate/server.h index cfb4334..0c5a83c 100644 --- a/libindicate/server.h +++ b/libindicate/server.h @@ -57,6 +57,16 @@ G_BEGIN_DECLS #define INDICATE_SERVER_SIGNAL_INTEREST_ADDED "interest-added" #define INDICATE_SERVER_SIGNAL_INTEREST_REMOVED "interest-removed" +/** + IndicateServer: + + This is the object that represents the overall connection + between this application and DBus. It acts as the proxy for + incomming DBus calls and also sends the appropriate signals + on DBus for events happening on other objects locally. It + provides some settings that effection how the application as + a whole is perceived by listeners of the indicator protocol. +*/ typedef struct _IndicateServer IndicateServer; struct _IndicateServer { GObject parent; -- cgit v1.2.3 From 877ac7aac626a3c8ce4bdd601eff9fb92fe64911 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 14:29:40 -0500 Subject: Adding in IndicateIndicatorClass documentation. --- libindicate/indicator.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/libindicate/indicator.h b/libindicate/indicator.h index 138a48c..dc057f4 100644 --- a/libindicate/indicator.h +++ b/libindicate/indicator.h @@ -68,6 +68,37 @@ struct _IndicateIndicator { GObject parent; }; +/** + IndicateIndicatorClass: + + All of the functions that are used to modify or change data that is + in the indicator. Typically gets subclassed by other types of + indicators, for example #IndicateIndicatorMessages. + + @hide: #IndicateIndicator::hide + + @show: #IndicateIndicator::show + + @user_display: #IndicateIndicator::user-display + + @modified: #IndicateIndicator::modified + + @get_type: Returns a constant string for the type of this indicator. + Typically gets overridden by subclasses and defines the type of + the indicator. + + @set_property: Called when #indicate_indicator_set_property is called + and should set the value. While typically it is overridden by + subclasses they usually handle special properties themselves and + then call the superclass for storage. + + @get_property: Called when #indicate_indicator_get_property is called + and should return the value requested. Many times this is left alone. + + @list_properties: Called when #indicate_indicator_list_properties is called + and returns a list of the properties available. Again this can be + overridden by subclasses to handle special properties. +*/ struct _IndicateIndicatorClass { GObjectClass parent_class; -- cgit v1.2.3 From 9201eb6ce3b2770038f0c71e89aadb3c55af6157 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 14:35:30 -0500 Subject: Making it more like English and less like a pointer table. --- libindicate/indicator.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libindicate/indicator.h b/libindicate/indicator.h index dc057f4..61cc1d2 100644 --- a/libindicate/indicator.h +++ b/libindicate/indicator.h @@ -75,13 +75,13 @@ struct _IndicateIndicator { in the indicator. Typically gets subclassed by other types of indicators, for example #IndicateIndicatorMessages. - @hide: #IndicateIndicator::hide + @hide: Slot for #IndicateIndicator::hide. - @show: #IndicateIndicator::show + @show: Slot for #IndicateIndicator::show. - @user_display: #IndicateIndicator::user-display + @user_display: Slot for #IndicateIndicator::user-display. - @modified: #IndicateIndicator::modified + @modified: Slot for #IndicateIndicator::modified. @get_type: Returns a constant string for the type of this indicator. Typically gets overridden by subclasses and defines the type of -- cgit v1.2.3 From d73f65f28afe4fc11cec345e4baadf4d934c656d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 15:12:37 -0500 Subject: Reformatting to make gtk-doc happy. --- libindicate/indicator.h | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/libindicate/indicator.h b/libindicate/indicator.h index 61cc1d2..77ffb7d 100644 --- a/libindicate/indicator.h +++ b/libindicate/indicator.h @@ -70,34 +70,28 @@ struct _IndicateIndicator { /** IndicateIndicatorClass: - - All of the functions that are used to modify or change data that is - in the indicator. Typically gets subclassed by other types of - indicators, for example #IndicateIndicatorMessages. - + @parent_class: Parent class #GObjectClass. @hide: Slot for #IndicateIndicator::hide. - @show: Slot for #IndicateIndicator::show. - @user_display: Slot for #IndicateIndicator::user-display. - @modified: Slot for #IndicateIndicator::modified. - @get_type: Returns a constant string for the type of this indicator. Typically gets overridden by subclasses and defines the type of - the indicator. - - @set_property: Called when #indicate_indicator_set_property is called + the indicator. Is called by indicate_indicator_get_indicator_type(). + @set_property: Called when indicate_indicator_set_property() is called and should set the value. While typically it is overridden by subclasses they usually handle special properties themselves and then call the superclass for storage. - - @get_property: Called when #indicate_indicator_get_property is called + @get_property: Called when indicate_indicator_get_property() is called and should return the value requested. Many times this is left alone. - - @list_properties: Called when #indicate_indicator_list_properties is called + @list_properties: Called when indicate_indicator_list_properties() is called and returns a list of the properties available. Again this can be overridden by subclasses to handle special properties. + + All of the functions that are used to modify or change data that is + in the indicator. Typically gets subclassed by other types of + indicators, for example #IndicateIndicatorMessages. + */ struct _IndicateIndicatorClass { GObjectClass parent_class; -- cgit v1.2.3 From 6a4918e6e72f20209a1fbb595a2d900810be984f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 15:16:06 -0500 Subject: Removing the big defines that aren't useful and the boilerplate get_type functions. --- docs/reference/libindicate-sections.txt | 39 --------------------------------- 1 file changed, 39 deletions(-) diff --git a/docs/reference/libindicate-sections.txt b/docs/reference/libindicate-sections.txt index 86f6d34..c647758 100644 --- a/docs/reference/libindicate-sections.txt +++ b/docs/reference/libindicate-sections.txt @@ -4,41 +4,6 @@ indicator Everything -INDICATE_INDICATOR -INDICATE_INDICATOR_CLASS -INDICATE_INDICATOR_GET_CLASS -INDICATE_INDICATOR_MESSAGE -INDICATE_INDICATOR_MESSAGE_CLASS -INDICATE_INDICATOR_MESSAGE_GET_CLASS -INDICATE_INDICATOR_SIGNAL_DISPLAY -INDICATE_INDICATOR_SIGNAL_HIDE -INDICATE_INDICATOR_SIGNAL_MODIFIED -INDICATE_INDICATOR_SIGNAL_SHOW -INDICATE_IS_INDICATOR -INDICATE_IS_INDICATOR_CLASS -INDICATE_IS_INDICATOR_MESSAGE -INDICATE_IS_INDICATOR_MESSAGE_CLASS -INDICATE_IS_LISTENER -INDICATE_IS_LISTENER_CLASS -INDICATE_IS_SERVER -INDICATE_IS_SERVER_CLASS -INDICATE_LISTENER -INDICATE_LISTENER_CLASS -INDICATE_LISTENER_GET_CLASS -INDICATE_LISTENER_INDICATOR_ID -INDICATE_LISTENER_SERVER_DBUS_NAME -INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED -INDICATE_LISTENER_SIGNAL_INDICATOR_MODIFIED -INDICATE_LISTENER_SIGNAL_INDICATOR_REMOVED -INDICATE_LISTENER_SIGNAL_SERVER_ADDED -INDICATE_LISTENER_SIGNAL_SERVER_REMOVED -INDICATE_SERVER -INDICATE_SERVER_CLASS -INDICATE_SERVER_GET_CLASS -INDICATE_TYPE_INDICATOR -INDICATE_TYPE_INDICATOR_MESSAGE -INDICATE_TYPE_LISTENER -INDICATE_TYPE_SERVER IndicateIndicator IndicateIndicatorClass IndicateIndicatorMessage @@ -52,11 +17,9 @@ IndicateServerClass indicate_indicator_get_id indicate_indicator_get_indicator_type indicate_indicator_get_property -indicate_indicator_get_type indicate_indicator_hide indicate_indicator_is_visible indicate_indicator_list_properties -indicate_indicator_message_get_type indicate_indicator_message_new indicate_indicator_new indicate_indicator_set_property @@ -65,14 +28,12 @@ indicate_indicator_user_display indicate_listener_display indicate_listener_get_property indicate_listener_get_property_cb -indicate_listener_get_type indicate_listener_new indicate_server_add_indicator indicate_server_emit_indicator_added indicate_server_emit_indicator_modified indicate_server_emit_indicator_removed indicate_server_get_next_id -indicate_server_get_type indicate_server_hide indicate_server_new indicate_server_ref_default -- cgit v1.2.3 From cd973f18b40532e9a1ec16f2c7db5b24afc2c40d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 15:16:47 -0500 Subject: Adding to the unused side of things. --- docs/reference/tmpl/libindicate-unused.sgml | 260 ++++++++++++++++++++++++++++ 1 file changed, 260 insertions(+) diff --git a/docs/reference/tmpl/libindicate-unused.sgml b/docs/reference/tmpl/libindicate-unused.sgml index 4727625..1f8a20d 100644 --- a/docs/reference/tmpl/libindicate-unused.sgml +++ b/docs/reference/tmpl/libindicate-unused.sgml @@ -1,3 +1,235 @@ + + + + + +@object: + + + + + + +@klass: + + + + + + +@object: + + + + + + +@obj: + + + + + + +@klass: + + + + + + +@obj: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@object: + + + + + + +@klass: + + + + + + +@obj: + + + + + + +@klass: + + + + + + +@object: + + + + + + +@klass: + + + + + + +@object: + + + + + + +@klass: + + + + + + +@object: + + + + + + +@klass: + + + + + + +@object: + + + + + + +@indicator: + + + + + + +@server: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@object: + + + + + + +@klass: + + + + + + +@object: + + + + + + + + + + + + + + + + + + + + + + + + + @@ -204,6 +436,27 @@ @v: + + + + + +@Returns: + + + + + + +@Returns: + + + + + + +@Returns: + @@ -317,6 +570,13 @@ @error: @Returns: + + + + + +@Returns: + -- cgit v1.2.3 From a77a8085c8993dfb3e27952e77c245d6bca86128 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 15:40:06 -0500 Subject: Section information --- libindicate/indicator.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/libindicate/indicator.h b/libindicate/indicator.h index 77ffb7d..3e2a803 100644 --- a/libindicate/indicator.h +++ b/libindicate/indicator.h @@ -133,6 +133,37 @@ void indicate_indicator_set_property_time (IndicateIndicator * indicator, const const gchar * indicate_indicator_get_property (IndicateIndicator * indicator, const gchar * key); GPtrArray * indicate_indicator_list_properties (IndicateIndicator * indicator); +/** + SECTION:indicator + @short_description: A representation of state for applications + @stability: Unstable + @include: libindicate/indicator.h + + An indicator is designed to represent a single instance of something + in your application. So this might be an IM or Email using #IndicateIndicatorMessage + or any other thing that is a small unit of information to pass on + to the user. + + Indicators make no promises about how they are preceived by the + user, it's up to the listener to represent them in an intutive and + visually appealling way. But, what we can do is provide information + on the indicator to provide enough information for the listener + to do that. + + Mostly this is done through properties. The only property that is + defined for the base indicator is the 'type' property. And this + is only available to set by creating a subclass of the + #IndicateIndicator object. It is assumed that you can look at the + definitions of the various subtypes to determine which properties + they support. + + It may be that some users don't want to create objects for every + indicator as it could be a lot of overhead if there are large numbers + and there is already a data structure representing them all. In that + case it is recommended that you ignore the #IndicateIndicator object + tree in general and move to subclassing #IndicateServer directly. +*/ + G_END_DECLS #endif /* INDICATE_INDICATOR_H_INCLUDED__ */ -- cgit v1.2.3 From 0b5e0c1c39778f0c489497d4617b1ecbeaa963d9 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 15:50:27 -0500 Subject: Breaking out into sections. --- docs/reference/libindicate-sections.txt | 44 ++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/docs/reference/libindicate-sections.txt b/docs/reference/libindicate-sections.txt index c647758..161a95f 100644 --- a/docs/reference/libindicate-sections.txt +++ b/docs/reference/libindicate-sections.txt @@ -2,33 +2,34 @@
indicator -Everything - +IndicateIndicator IndicateIndicator IndicateIndicatorClass -IndicateIndicatorMessage -IndicateIndicatorMessageClass -IndicateListener -IndicateListenerClass -IndicateListenerIndicator -IndicateListenerServer -IndicateServer -IndicateServerClass indicate_indicator_get_id indicate_indicator_get_indicator_type indicate_indicator_get_property indicate_indicator_hide indicate_indicator_is_visible indicate_indicator_list_properties -indicate_indicator_message_new indicate_indicator_new indicate_indicator_set_property indicate_indicator_show indicate_indicator_user_display -indicate_listener_display -indicate_listener_get_property -indicate_listener_get_property_cb -indicate_listener_new +
+ +
+indicator-message +IndicateIndicatorMessage +IndicateIndicatorMessage +IndicateIndicatorMessageClass +indicate_indicator_message_new +
+ +
+server +IndicateServer +IndicateServer +IndicateServerClass indicate_server_add_indicator indicate_server_emit_indicator_added indicate_server_emit_indicator_modified @@ -42,5 +43,18 @@ indicate_server_set_dbus_object indicate_server_set_default indicate_server_set_desktop_file indicate_server_show +
+
+listener +IndicateListener +IndicateListener +IndicateListenerClass +IndicateListenerIndicator +IndicateListenerServer +indicate_listener_display +indicate_listener_get_property +indicate_listener_get_property_cb +indicate_listener_new
+ -- cgit v1.2.3 From ef5a4ba64eba307f196a9be629ffc62fb2fb5983 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 16:03:42 -0500 Subject: Doing a better job about defining out the documentation gets created and looks. Much cleaner. --- docs/reference/libindicate-docs.sgml | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/docs/reference/libindicate-docs.sgml b/docs/reference/libindicate-docs.sgml index 0f1ccd1..c3038d3 100644 --- a/docs/reference/libindicate-docs.sgml +++ b/docs/reference/libindicate-docs.sgml @@ -1,24 +1,32 @@ - + + libindicate Reference Manual - - for libindicate [VERSION] - The latest version of this documentation can be found on-line at - http://[SERVER]/libindicate/. - - - [Insert title here] - + + Base Classes for Applications + + + + + + Subclasses for specific indicators + + - - libindicate Indicator - - + + Classes for Listeners + + + + + Index of all Symbols + + -- cgit v1.2.3 From 298abb13418fe50b5c2c5e66fcad5c21c4732d41 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 16:04:09 -0500 Subject: Never understand this file --- docs/reference/tmpl/libindicate-unused.sgml | 827 ---------------------------- 1 file changed, 827 deletions(-) diff --git a/docs/reference/tmpl/libindicate-unused.sgml b/docs/reference/tmpl/libindicate-unused.sgml index 1f8a20d..e69de29 100644 --- a/docs/reference/tmpl/libindicate-unused.sgml +++ b/docs/reference/tmpl/libindicate-unused.sgml @@ -1,827 +0,0 @@ - - - - - -@object: - - - - - - -@klass: - - - - - - -@object: - - - - - - -@obj: - - - - - - -@klass: - - - - - - -@obj: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@object: - - - - - - -@klass: - - - - - - -@obj: - - - - - - -@klass: - - - - - - -@object: - - - - - - -@klass: - - - - - - -@object: - - - - - - -@klass: - - - - - - -@object: - - - - - - -@klass: - - - - - - -@object: - - - - - - -@indicator: - - - - - - -@server: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@object: - - - - - - -@klass: - - - - - - -@object: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@Param1: -@Returns: - - - - - - -@closure: -@return_value: -@n_param_values: -@param_values: -@invocation_hint: -@marshal_data: - - - - - - -@closure: -@return_value: -@n_param_values: -@param_values: -@invocation_hint: -@marshal_data: - - - - - - -@closure: -@return_value: -@n_param_values: -@param_values: -@invocation_hint: -@marshal_data: - - - - - - -@closure: -@return_value: -@n_param_values: -@param_values: -@invocation_hint: -@marshal_data: - - - - - - -@closure: -@return_value: -@n_param_values: -@param_values: -@invocation_hint: -@marshal_data: - - - - - - -@closure: -@return_value: -@n_param_values: -@param_values: -@invocation_hint: -@marshal_data: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@v: - - - - - - -@Returns: - - - - - - -@Returns: - - - - - - -@Returns: - - - - - - -@closure: -@return_value: -@n_param_values: -@param_values: -@invocation_hint: -@marshal_data: - - - - - - -@closure: -@return_value: -@n_param_values: -@param_values: -@invocation_hint: -@marshal_data: - - - - - - -@closure: -@return_value: -@n_param_values: -@param_values: -@invocation_hint: -@marshal_data: - - - - - - -@server: -@count: -@error: -@Returns: - - - - - - -@server: -@type: -@count: -@error: -@Returns: - - - - - - -@server: -@indicators: -@error: -@Returns: - - - - - - -@server: -@type: -@indicators: -@error: -@Returns: - - - - - - -@server: -@id: -@properties: -@error: -@Returns: - - - - - - -@server: -@id: -@property: -@value: -@error: -@Returns: - - - - - - -@server: -@id: -@properties: -@value: -@error: -@Returns: - - - - - - -@Returns: - - - - - - -@server: -@id: -@error: -@Returns: - - - - - - -@proxy: -@OUT_indicator_count: -@Returns: - - - - - - -@proxy: -@callback: -@Returns: - - - - - - -@proxy: -@IN_type: -@OUT_indicator_count: -@Returns: - - - - - - -@proxy: -@IN_type: -@callback: -@Returns: - - - - - - -@proxy: -@OUT_indicator_count: -@error: -@userdata: - - - - - - -@proxy: -@OUT_indicator_count: -@error: -@userdata: - - - - - - -@proxy: -@OUT_indicators: -@Returns: - - - - - - -@proxy: -@callback: -@Returns: - - - - - - -@proxy: -@IN_type: -@OUT_indicators: -@Returns: - - - - - - -@proxy: -@IN_type: -@callback: -@Returns: - - - - - - -@proxy: -@OUT_indicators: -@error: -@userdata: - - - - - - -@proxy: -@OUT_indicators: -@error: -@userdata: - - - - - - -@proxy: -@IN_id: -@OUT_properties: -@Returns: - - - - - - -@proxy: -@IN_id: -@callback: -@Returns: - - - - - - -@proxy: -@OUT_properties: -@error: -@userdata: - - - - - - -@proxy: -@IN_id: -@IN_property: -@OUT_value: -@Returns: - - - - - - -@proxy: -@IN_id: -@IN_property: -@callback: -@Returns: - - - - - - -@proxy: -@IN_id: -@IN_properties: -@OUT_values: -@Returns: - - - - - - -@proxy: -@IN_id: -@IN_properties: -@callback: -@Returns: - - - - - - -@proxy: -@OUT_values: -@error: -@userdata: - - - - - - -@proxy: -@OUT_value: -@error: -@userdata: - - - - - - -@proxy: -@IN_id: -@Returns: - - - - - - -@proxy: -@IN_id: -@callback: -@Returns: - - - - - - -@proxy: -@error: -@userdata: - -- cgit v1.2.3 From 933bcaaa5942e9990e07da32bcde392d0e9a7883 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 16:57:51 -0500 Subject: Adding in message documentation and cleaning up some mistakes as I see them. --- libindicate/indicator-message.c | 7 +++++++ libindicate/indicator-message.h | 38 ++++++++++++++++++++++++++++++++------ libindicate/indicator.c | 2 +- 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/libindicate/indicator-message.c b/libindicate/indicator-message.c index 4e8ef30..9cd735a 100644 --- a/libindicate/indicator-message.c +++ b/libindicate/indicator-message.c @@ -85,6 +85,13 @@ indicate_indicator_message_finalize (GObject *object) G_OBJECT_CLASS (indicate_indicator_message_parent_class)->finalize (object); } +/** + indicate_indicator_message_new: + + Builds a new indicator message object using #g_object_new. + + Return value: A pointer to a new #IndicateIndicatorMessage object. +*/ static const gchar * get_indicator_type (IndicateIndicator * indicator) { diff --git a/libindicate/indicator-message.h b/libindicate/indicator-message.h index 0910477..62a41b7 100644 --- a/libindicate/indicator-message.h +++ b/libindicate/indicator-message.h @@ -47,19 +47,45 @@ G_BEGIN_DECLS typedef struct _IndicateIndicatorMessage IndicateIndicatorMessage; typedef struct _IndicateIndicatorMessageClass IndicateIndicatorMessageClass; -struct _IndicateIndicatorMessageClass -{ -IndicateIndicatorClass parent_class; +/** + IndicateIndicatorMessageClass: + + Subclass of #IndicateIndicator with no new functions or signals. +*/ +struct _IndicateIndicatorMessageClass { + IndicateIndicatorClass parent_class; }; -struct _IndicateIndicatorMessage -{ -IndicateIndicator parent; +/** + IndicateIndicatorMessage: + + A class to represent indicators who's 'type' is "message". These + are basically indicators that represent messages from humans to + humans via computers. Things like instance messages, micro blogging + entries or e-mails. All of these qualify as messages. + + TODO: This should include a list of properties that are supported. +*/ +struct _IndicateIndicatorMessage { + IndicateIndicator parent; }; GType indicate_indicator_message_get_type (void); IndicateIndicatorMessage * indicate_indicator_message_new (void); +/** + SECTION:indicator-message + @short_description: A representation of human generated messages + @stability: Unstable + @include: libindicate/indicator-message.h + + The message indicators represent messages that come from humans + to humans using computers. They come in all different forms with + various different interaction protocols, but they all want the human + at the computer to interact back with the human that sent the + message. +*/ + G_END_DECLS #endif diff --git a/libindicate/indicator.c b/libindicate/indicator.c index c867a9a..15788d4 100644 --- a/libindicate/indicator.c +++ b/libindicate/indicator.c @@ -181,7 +181,7 @@ indicate_indicator_finalize (GObject * obj) /** indicate_indicator_new: - Builds a new indicator object using #g_object_new. + Builds a new indicator object using g_object_new(). Return value: A pointer to a new #IndicateIndicator object. */ -- cgit v1.2.3 From a1ba880a312728fa4973c2d498ea574426a291f9 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 20:17:52 -0500 Subject: Comments for the class, who put all those functions on there... --- libindicate/server.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/libindicate/server.h b/libindicate/server.h index 0c5a83c..c327a13 100644 --- a/libindicate/server.h +++ b/libindicate/server.h @@ -72,6 +72,48 @@ struct _IndicateServer { GObject parent; }; +/** + IndicateServerClass: + @parent: Parent Class + @indicator_added: Slot for #IndicatorServer::indicator-added + @indicator_removed: Slot for #IndicatorServer::indicator-removed + @indicator_modified: Slot for #IndicatorServer::indicator-modified + @server_show: Slot for #IndicatorServer::server-show + @server_hide: Slot for #IndicatorServer::server-hide + @server_display: Slot for #IndicatorServer::server-display + @interest_added: Slot for #IndicatorServer::interest-added + @interest_removed: Slot for #IndicatorServer::interest-removed + @get_indicator_count: Returns the number of indicators that are visible + on the bus. Hidden indicators should not be counted. + @get_indciator_count_by_type: Returns the number of indicators that are + of a given type and visible on the bus. + @get_indicator_list: List all of the indicators that are visible. + @get_indicator_list_by_type: List all of the indicators of a given + type that are visible. + @get_indicator_property: Get a property from a particular indicator. + @get_indicator_property_group: Get the values for a set of properties + as an array of entries, returning an array as well. + @get_indicator_properties: Get a list of all the properties that are + on a particular indicator. + @show_indicator_to_user: Respond to someone on the bus asking to show + a particular indicator to the user. + @get_next_id: Get the next unused indicator ID. + @show_interest: React to someone signifying that they are interested + in this server. + @remove_interest: Someone on the bus is no longer interest in this + server, remove it's interest. + @check_interest: Check to see if anyone on the bus is interested in this + server for a particular feature. + @indicate_server_reserved1: Reserved for future use + @indicate_server_reserved2: Reserved for future use + @indicate_server_reserved3: Reserved for future use + @indicate_server_reserved4: Reserved for future use + + All of the functions and signals that make up the server class + including those that are public API to the application and those + that are public API to all of DBus. Subclasses may need to + implement a large portion of these. +*/ typedef struct _IndicateServerClass IndicateServerClass; struct _IndicateServerClass { GObjectClass parent; -- cgit v1.2.3 From f4a1e4626b061bd26d2a0fea8b44ea37d0b56b7a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 20:24:53 -0500 Subject: Server section documentation. --- libindicate/server.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/libindicate/server.h b/libindicate/server.h index c327a13..f0e1569 100644 --- a/libindicate/server.h +++ b/libindicate/server.h @@ -186,6 +186,35 @@ void indicate_server_emit_indicator_removed (IndicateServer *server, guint id, c void indicate_server_emit_indicator_modified (IndicateServer *server, guint id, const gchar *property); void indicate_server_emit_server_display (IndicateServer *server); +/** + SECTION:server + @short_description: The representation of the application on DBus. + @stability: Unstable + @include: libindicate/server.h + + The server object is the object that provides the functions on + to DBus for other applications to call. It does this by implementing + the DBus indicator spec, but it also allows for subclassing so that + subclasses don't have to worry about the DBus-isms as much as + the functionality that they're trying to express. + + For simple applications there is limited need to set anything + more than the desktop file and the type of the server using + indicate_server_set_desktop_file() and indicate_server_set_type(). + Each of these function sets the respective value and expresses + it in a way that other applications on the bus can read it. + + More advanced applications might find the need to subclass the + #IndicateServer object and make their own. This is likely the + case where applications have complex data stores that they don't + want to turn into a large set of #GObjects that can take up a + significant amount of memory in the program. + + In general, it is recommended that application authors go with + the high memory path first, and then optimize by implementing + their server on a second pass. +*/ + G_END_DECLS #endif /* INDICATE_SERVER_H_INCLUDED__ */ -- cgit v1.2.3 From 15720aae214633691ed4a940dd1b7dcb313ea0ca Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 20:37:52 -0500 Subject: Basic signals docs. --- libindicate/server.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/libindicate/server.c b/libindicate/server.c index d42fe61..e8dad3f 100644 --- a/libindicate/server.c +++ b/libindicate/server.c @@ -163,6 +163,12 @@ indicate_server_class_init (IndicateServerClass * class) gobj->set_property = set_property; gobj->get_property = get_property; + /** + IndicateServer::indicator-added: + + Emitted every time that a new indicator is made visible to + the world. This results in a signal on DBus. + */ signals[INDICATOR_ADDED] = g_signal_new(INDICATE_SERVER_SIGNAL_INDICATOR_ADDED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, @@ -170,6 +176,12 @@ indicate_server_class_init (IndicateServerClass * class) NULL, NULL, g_cclosure_marshal_VOID__UINT_POINTER, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING); + /** + IndicateServer::indicator-removed: + + Emitted every time that a new indicator is made invisible to + the world. This results in a signal on DBus. + */ signals[INDICATOR_REMOVED] = g_signal_new(INDICATE_SERVER_SIGNAL_INDICATOR_REMOVED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, @@ -177,6 +189,12 @@ indicate_server_class_init (IndicateServerClass * class) NULL, NULL, g_cclosure_marshal_VOID__UINT_POINTER, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING); + /** + IndicateServer::indicator-modified: + + Emitted every time that a property on an indicator changes + and it is visible to the world. This results in a signal on DBus. + */ signals[INDICATOR_MODIFIED] = g_signal_new(INDICATE_SERVER_SIGNAL_INDICATOR_MODIFIED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, @@ -184,6 +202,13 @@ indicate_server_class_init (IndicateServerClass * class) NULL, NULL, g_cclosure_marshal_VOID__UINT_POINTER, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING); + /** + IndicateServer::server-show: + + Emitted when a server comes onto DBus by being shown. This + is typically when listeners start reacting to the application's + indicators. This results in a signal on DBus. + */ signals[SERVER_SHOW] = g_signal_new(INDICATE_SERVER_SIGNAL_SERVER_SHOW, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, @@ -191,6 +216,12 @@ indicate_server_class_init (IndicateServerClass * class) NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_STRING); + /** + IndicateServer::server-hide: + + Emitted when a server removes itself from DBus. This results + in a signal on DBus. + */ signals[SERVER_HIDE] = g_signal_new(INDICATE_SERVER_SIGNAL_SERVER_HIDE, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, @@ -198,6 +229,13 @@ indicate_server_class_init (IndicateServerClass * class) NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_STRING); + /** + IndicateServer::server-display: + + Emitted when a listener signals that the server itself should be + displayed. This signal is caused by a user clicking on the application + item in the Messaging Menu. This signal is emitted by DBus. + */ signals[SERVER_DISPLAY] = g_signal_new(INDICATE_SERVER_SIGNAL_SERVER_DISPLAY, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, @@ -205,6 +243,12 @@ indicate_server_class_init (IndicateServerClass * class) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + /** + IndicateServer::interest-added: + + Emitted when a listener signals that they are interested in + this server for a particular reason. This signal is emitted by DBus. + */ signals[INTEREST_ADDED] = g_signal_new(INDICATE_SERVER_SIGNAL_INTEREST_ADDED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, @@ -212,6 +256,12 @@ indicate_server_class_init (IndicateServerClass * class) NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); + /** + IndicateServer::interest-removed: + + Emitted when a listener signals that they are no longer interested in + this server for a particular reason. This signal is emitted by DBus. + */ signals[INTEREST_REMOVED] = g_signal_new(INDICATE_SERVER_SIGNAL_INTEREST_REMOVED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, -- cgit v1.2.3 From dbfd181e1068fdbafd97bf11f5654dc8bc14caa5 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 20:44:43 -0500 Subject: Woot, signal documentation works now. --- libindicate/server.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libindicate/server.h b/libindicate/server.h index f0e1569..820e641 100644 --- a/libindicate/server.h +++ b/libindicate/server.h @@ -75,14 +75,14 @@ struct _IndicateServer { /** IndicateServerClass: @parent: Parent Class - @indicator_added: Slot for #IndicatorServer::indicator-added - @indicator_removed: Slot for #IndicatorServer::indicator-removed - @indicator_modified: Slot for #IndicatorServer::indicator-modified - @server_show: Slot for #IndicatorServer::server-show - @server_hide: Slot for #IndicatorServer::server-hide - @server_display: Slot for #IndicatorServer::server-display - @interest_added: Slot for #IndicatorServer::interest-added - @interest_removed: Slot for #IndicatorServer::interest-removed + @indicator_added: Slot for #IndicateServer::indicator-added. + @indicator_removed: Slot for #IndicateServer::indicator-removed. + @indicator_modified: Slot for #IndicateServer::indicator-modified. + @server_show: Slot for #IndicateServer::server-show. + @server_hide: Slot for #IndicateServer::server-hide. + @server_display: Slot for #IndicateServer::server-display. + @interest_added: Slot for #IndicateServer::interest-added. + @interest_removed: Slot for #IndicateServer::interest-removed. @get_indicator_count: Returns the number of indicators that are visible on the bus. Hidden indicators should not be counted. @get_indciator_count_by_type: Returns the number of indicators that are -- cgit v1.2.3 From f64bd73788470bb55a2a1060b7fea815d769d0d4 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 20:53:10 -0500 Subject: Adding in arguments on the signal docs. --- libindicate/server.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/libindicate/server.c b/libindicate/server.c index e8dad3f..6cc6f34 100644 --- a/libindicate/server.c +++ b/libindicate/server.c @@ -165,9 +165,14 @@ indicate_server_class_init (IndicateServerClass * class) /** IndicateServer::indicator-added: + @arg0: The #IndicateServer object + @arg1: The #IndicateIndicator ID number + @arg2: The type of the indicator Emitted every time that a new indicator is made visible to the world. This results in a signal on DBus. + + Can be emitted by subclasses using indicate_server_emit_indicator_added() */ signals[INDICATOR_ADDED] = g_signal_new(INDICATE_SERVER_SIGNAL_INDICATOR_ADDED, G_TYPE_FROM_CLASS (class), @@ -178,9 +183,14 @@ indicate_server_class_init (IndicateServerClass * class) G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING); /** IndicateServer::indicator-removed: + @arg0: The #IndicateServer object + @arg1: The #IndicateIndicator ID number + @arg2: The type of the indicator Emitted every time that a new indicator is made invisible to the world. This results in a signal on DBus. + + Can be emitted by subclasses using indicate_server_emit_indicator_removed() */ signals[INDICATOR_REMOVED] = g_signal_new(INDICATE_SERVER_SIGNAL_INDICATOR_REMOVED, G_TYPE_FROM_CLASS (class), @@ -191,9 +201,14 @@ indicate_server_class_init (IndicateServerClass * class) G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING); /** IndicateServer::indicator-modified: + @arg0: The #IndicateServer object + @arg1: The #IndicateIndicator ID number + @arg2: The name of the property modified Emitted every time that a property on an indicator changes and it is visible to the world. This results in a signal on DBus. + + Can be emitted by subclasses using indicate_server_emit_indicator_modified() */ signals[INDICATOR_MODIFIED] = g_signal_new(INDICATE_SERVER_SIGNAL_INDICATOR_MODIFIED, G_TYPE_FROM_CLASS (class), @@ -204,6 +219,8 @@ indicate_server_class_init (IndicateServerClass * class) G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING); /** IndicateServer::server-show: + @arg0: The #IndicateServer object + @arg1: The type of the server Emitted when a server comes onto DBus by being shown. This is typically when listeners start reacting to the application's @@ -218,6 +235,8 @@ indicate_server_class_init (IndicateServerClass * class) G_TYPE_NONE, 1, G_TYPE_STRING); /** IndicateServer::server-hide: + @arg0: The #IndicateServer object + @arg1: The type of the server Emitted when a server removes itself from DBus. This results in a signal on DBus. @@ -231,10 +250,13 @@ indicate_server_class_init (IndicateServerClass * class) G_TYPE_NONE, 1, G_TYPE_STRING); /** IndicateServer::server-display: + @arg0: The #IndicateServer object Emitted when a listener signals that the server itself should be displayed. This signal is caused by a user clicking on the application item in the Messaging Menu. This signal is emitted by DBus. + + Can be emitted by subclasses using indicate_server_emit_server_display() */ signals[SERVER_DISPLAY] = g_signal_new(INDICATE_SERVER_SIGNAL_SERVER_DISPLAY, G_TYPE_FROM_CLASS (class), @@ -245,6 +267,8 @@ indicate_server_class_init (IndicateServerClass * class) G_TYPE_NONE, 0); /** IndicateServer::interest-added: + @arg0: The #IndicateServer object + @arg1: The interest that was added from #IndicateInterests Emitted when a listener signals that they are interested in this server for a particular reason. This signal is emitted by DBus. @@ -258,6 +282,8 @@ indicate_server_class_init (IndicateServerClass * class) G_TYPE_NONE, 1, G_TYPE_UINT); /** IndicateServer::interest-removed: + @arg0: The #IndicateServer object + @arg1: The interest that was removed from #IndicateInterests Emitted when a listener signals that they are no longer interested in this server for a particular reason. This signal is emitted by DBus. -- cgit v1.2.3 From 1595ee29749284d0606f4a5524aeefbc728498e4 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 20:58:42 -0500 Subject: Adding in arguments for the signals --- libindicate/indicator.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libindicate/indicator.c b/libindicate/indicator.c index 15788d4..207d975 100644 --- a/libindicate/indicator.c +++ b/libindicate/indicator.c @@ -78,6 +78,7 @@ indicate_indicator_class_init (IndicateIndicatorClass * class) /** IndicateIndicator::display: + @arg0: The #IndicateIndicator object Emitted when the user has clicked on this indicator. In the messaging indicator this would be when someone clicks on the @@ -92,9 +93,12 @@ indicate_indicator_class_init (IndicateIndicatorClass * class) G_TYPE_NONE, 0); /** IndicateIndicator::hide: + @arg0: The #IndicateIndicator object Emitted every time this indicator is hidden. This is mostly used by #IndicateServer. + + Typically this results in an emition of #IndicateServer::indicator-removed. */ signals[HIDE] = g_signal_new(INDICATE_INDICATOR_SIGNAL_HIDE, G_TYPE_FROM_CLASS(class), @@ -104,10 +108,13 @@ indicate_indicator_class_init (IndicateIndicatorClass * class) g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** - IndicateIndicator::hide: + IndicateIndicator::show: + @arg0: The #IndicateIndicator object Emitted every time this indicator is shown. This is mostly used by #IndicateServer. + + Typically this results in an emition of #IndicateServer::indicator-added. */ signals[SHOW] = g_signal_new(INDICATE_INDICATOR_SIGNAL_SHOW, G_TYPE_FROM_CLASS(class), @@ -118,9 +125,13 @@ indicate_indicator_class_init (IndicateIndicatorClass * class) G_TYPE_NONE, 0); /** IndicateIndicator::modified: + @arg0: The #IndicateIndicator object + @arg1: The name of the property that changed. Emitted every time an indicator property is changed. This is mostly used by #IndicateServer. + + Typically this results in an emition of #IndicateServer::indicator-modified. */ signals[MODIFIED] = g_signal_new(INDICATE_INDICATOR_SIGNAL_MODIFIED, G_TYPE_FROM_CLASS(class), -- cgit v1.2.3 From 51f63e11e0e39400d5be18a303a18989a7d67ea3 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 21:42:39 -0500 Subject: Documenting most of the public visible functions --- libindicate/server.c | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 133 insertions(+), 1 deletion(-) diff --git a/libindicate/server.c b/libindicate/server.c index 6cc6f34..cec9bd2 100644 --- a/libindicate/server.c +++ b/libindicate/server.c @@ -442,7 +442,17 @@ indicate_server_error_quark (void) return quark; } - +/** + indicate_server_show: + @server: The #IndicateServer to be shown + + This function exports the object onto DBus and shows it + to the world. This will be the start of it receiving external + signals from DBus. It is likely that, if there are listeners + running, there will several #IndicateServer::interest-added + signals coming shortly after this function. This function + emits the #IndicateServer::server-added signal across the bus. +*/ void indicate_server_show (IndicateServer * server) { @@ -479,6 +489,16 @@ indicate_server_show (IndicateServer * server) return; } +/** + indicate_server_hide: + @server: The #IndicateServer to hide. + + This function hides the server from DBus so that it does + not get signals anymore. This causes the signal #IndicateServer::server-hide + to be sent across the bus for all listeners. Also internally + it will signal #IndicateServer::interest-removed for all the + interests that were currently set for this server. +*/ void indicate_server_hide (IndicateServer * server) { @@ -686,6 +706,16 @@ indicator_modified_cb (IndicateIndicator * indicator, gchar * property, Indicate g_signal_emit(server, signals[INDICATOR_MODIFIED], 0, indicate_indicator_get_id(indicator), property, TRUE); } +/** + indicate_server_add_indicator: + @server: The #IndicateServer to add the #IndicateIndictor to. + @indicator: The #IndicateIndicator to add. + + This function adds an indicator @indicator to the list that are + watched by the server @server. This means that signals that are + emitted by the indicator will be picked up and passed via DBus onto + listeners of the application. +*/ void indicate_server_add_indicator (IndicateServer * server, IndicateIndicator * indicator) { @@ -709,6 +739,14 @@ indicate_server_add_indicator (IndicateServer * server, IndicateIndicator * indi return; } +/** + indicate_server_remove_indicator: + @server: The #IndicateServer to remove the #IndicateIndictor from. + @indicator: The #IndicateIndicator to remove. + + Removes an indicator @indicator from being watched by the server @server + so it's signals are no longer watched and set over DBus. +*/ void indicate_server_remove_indicator (IndicateServer * server, IndicateIndicator * indicator) { @@ -739,6 +777,15 @@ indicate_server_set_dbus_object (const gchar * obj) return; } +/** + indicate_server_set_desktop_file: + @server: The #IndicateServer to set the type of + @type: The new desktop file representing the server + + This is a convience function to set the #IndicateServer:desktop + property of the @server object. The property can also be set + via traditional means, but this one is easier to read. +*/ void indicate_server_set_desktop_file (IndicateServer * server, const gchar * path) { @@ -749,6 +796,15 @@ indicate_server_set_desktop_file (IndicateServer * server, const gchar * path) return; } +/** + indicate_server_set_type: + @server: The #IndicateServer to set the type of + @type: The new type of the server + + This is a convience function to set the #IndicateServer:type + property of the @server object. The property can also be set + via traditional means, but this one is easier to read. +*/ void indicate_server_set_type (IndicateServer * server, const gchar * type) { @@ -761,6 +817,17 @@ indicate_server_set_type (IndicateServer * server, const gchar * type) static IndicateServer * default_indicate_server = NULL; +/** + indicate_server_ref_default: + + This function will return a reference to the default #IndicateServer + reference if there is one, or it will create one if one had not + previously been created. It is recommended that all applications + use this function to create a #IndicateServer as it ensure that there + is only one per application. + + Return value: A reference to the default #IndicateServer instance. +*/ IndicateServer * indicate_server_ref_default (void) { @@ -775,6 +842,16 @@ indicate_server_ref_default (void) return default_indicate_server; } +/** + indicate_server_set_default: + @server: The #IndicateServer that should be used + + This function is used to set the default #IndicateServer that will + be used when creating #IndicateIndicators or for anyone else that + calls indicate_server_ref_default(). Typically this is just an + instance of #IndicateServer but applications that create a subclass + of #IndicateServer should set this as well. +*/ void indicate_server_set_default (IndicateServer * server) { @@ -1179,6 +1256,15 @@ _indicate_server_show_indicator_to_user (IndicateServer * server, guint id, GErr return TRUE; } +/** + indicate_server_get_next_id: + @server: The #IndicateServer the ID will be on + + Returns the next available unused ID that an indicator + can have. + + Return value: A valid indicator ID. +*/ guint indicate_server_get_next_id (IndicateServer * server) { @@ -1283,6 +1369,17 @@ _indicate_server_remove_interest (IndicateServer * server, gchar * interest, DBu return FALSE; } +/** + indicate_server_check_interest: + @server: The #IndicateServer being checked + @interest: Which interest type we're checking for + + This function looks at all the interest that various listeners + have specified that they have for this server and returns whether + there is a listener that has the interest specified in @interest. + + Return value: %TRUE if a listener as the interest otherwise %FALSE +*/ gboolean indicate_server_check_interest (IndicateServer * server, IndicateInterests interest) { @@ -1297,6 +1394,16 @@ indicate_server_check_interest (IndicateServer * server, IndicateInterests inter } /* Signal emission functions for sub-classes of the server */ + +/** + indicate_server_emit_indicator_added: + @server: The #IndicateServer being represented + @id: The ID of the indicator being added + @type: The type of the indicator + + This function emits the #IndicateServer::indicator-added signal and is + used by subclasses. +*/ void indicate_server_emit_indicator_added (IndicateServer *server, guint id, const gchar *type) { @@ -1306,6 +1413,15 @@ indicate_server_emit_indicator_added (IndicateServer *server, guint id, const gc g_signal_emit(server, signals[INDICATOR_ADDED], 0, id, type); } +/** + indicate_server_emit_indicator_removed: + @server: The #IndicateServer being represented + @id: The ID of the indicator being removed + @type: The type of the indicator + + This function emits the #IndicateServer::indicator-removed signal and is + used by subclasses. +*/ void indicate_server_emit_indicator_removed (IndicateServer *server, guint id, const gchar *type) { @@ -1315,6 +1431,15 @@ indicate_server_emit_indicator_removed (IndicateServer *server, guint id, const g_signal_emit(server, signals[INDICATOR_REMOVED], 0, id, type); } +/** + indicate_server_emit_indicator_modified: + @server: The #IndicateServer being represented + @id: The ID of the indicator with the modified property + @proprerty: The name of the property being modified + + This function emits the #IndicateServer::indicator-modified signal and is + used by subclasses. +*/ void indicate_server_emit_indicator_modified (IndicateServer *server, guint id, const gchar *property) { @@ -1324,6 +1449,13 @@ indicate_server_emit_indicator_modified (IndicateServer *server, guint id, const g_signal_emit(server, signals[INDICATOR_MODIFIED], 0, id, property); } +/** + indicate_server_emit_server_display: + @server: The #IndicateServer being displayed + + This function emits the #IndicateServer::server-display signal and is + used by subclasses. +*/ void indicate_server_emit_server_display (IndicateServer *server) { -- cgit v1.2.3 From 3810da4bb215f815f9528e9fa7145de9c99efbff Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 21:45:19 -0500 Subject: Fixing some documentation bugs. --- libindicate/indicator-message.h | 1 + libindicate/server.c | 4 ++-- libindicate/server.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libindicate/indicator-message.h b/libindicate/indicator-message.h index 62a41b7..76273c6 100644 --- a/libindicate/indicator-message.h +++ b/libindicate/indicator-message.h @@ -49,6 +49,7 @@ typedef struct _IndicateIndicatorMessageClass IndicateIndicatorMessageClass; /** IndicateIndicatorMessageClass: + @parent_class: Parent Class Subclass of #IndicateIndicator with no new functions or signals. */ diff --git a/libindicate/server.c b/libindicate/server.c index cec9bd2..cd8b33a 100644 --- a/libindicate/server.c +++ b/libindicate/server.c @@ -780,7 +780,7 @@ indicate_server_set_dbus_object (const gchar * obj) /** indicate_server_set_desktop_file: @server: The #IndicateServer to set the type of - @type: The new desktop file representing the server + @path: The new desktop file representing the server This is a convience function to set the #IndicateServer:desktop property of the @server object. The property can also be set @@ -1435,7 +1435,7 @@ indicate_server_emit_indicator_removed (IndicateServer *server, guint id, const indicate_server_emit_indicator_modified: @server: The #IndicateServer being represented @id: The ID of the indicator with the modified property - @proprerty: The name of the property being modified + @property: The name of the property being modified This function emits the #IndicateServer::indicator-modified signal and is used by subclasses. diff --git a/libindicate/server.h b/libindicate/server.h index 820e641..2a300e2 100644 --- a/libindicate/server.h +++ b/libindicate/server.h @@ -85,7 +85,7 @@ struct _IndicateServer { @interest_removed: Slot for #IndicateServer::interest-removed. @get_indicator_count: Returns the number of indicators that are visible on the bus. Hidden indicators should not be counted. - @get_indciator_count_by_type: Returns the number of indicators that are + @get_indicator_count_by_type: Returns the number of indicators that are of a given type and visible on the bus. @get_indicator_list: List all of the indicators that are visible. @get_indicator_list_by_type: List all of the indicators of a given -- cgit v1.2.3 From c027c7f3d30bc35937a5b900355bd593e2a12a04 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 22:29:44 -0500 Subject: Fixing typo --- libindicate/indicator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libindicate/indicator.c b/libindicate/indicator.c index 207d975..76eb616 100644 --- a/libindicate/indicator.c +++ b/libindicate/indicator.c @@ -398,7 +398,7 @@ indicate_indicator_set_property_icon (IndicateIndicator * indicator, const gchar indicate_indicator_set_property_time: @indicator: a #IndicateIndicator to act on @key: name of the property - @data: time to set property with + @time: time to set property with This is a helper function that wraps around #indicate_indicator_set_property but takes an #GTimeVal parameter. It then takes the @data -- cgit v1.2.3 From 395ae9ad6ba2e6ad679b94a74d1665f59c559daa Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 22:30:04 -0500 Subject: Fixing function listing --- docs/reference/libindicate-sections.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/reference/libindicate-sections.txt b/docs/reference/libindicate-sections.txt index 161a95f..6e2a8cd 100644 --- a/docs/reference/libindicate-sections.txt +++ b/docs/reference/libindicate-sections.txt @@ -13,6 +13,8 @@ indicate_indicator_is_visible indicate_indicator_list_properties indicate_indicator_new indicate_indicator_set_property +indicate_indicator_set_property_icon +indicate_indicator_set_property_time indicate_indicator_show indicate_indicator_user_display @@ -31,17 +33,18 @@ indicate_indicator_message_new IndicateServer IndicateServerClass indicate_server_add_indicator +indicate_server_check_interest indicate_server_emit_indicator_added indicate_server_emit_indicator_modified indicate_server_emit_indicator_removed +indicate_server_emit_server_display indicate_server_get_next_id indicate_server_hide -indicate_server_new indicate_server_ref_default indicate_server_remove_indicator -indicate_server_set_dbus_object indicate_server_set_default indicate_server_set_desktop_file +indicate_server_set_type indicate_server_show -- cgit v1.2.3 From 1b3fd9245f98ac5b13c44f4f9e8ca30ef76ac526 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Apr 2009 22:30:15 -0500 Subject: Never understand this file really. --- docs/reference/tmpl/libindicate-unused.sgml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/reference/tmpl/libindicate-unused.sgml b/docs/reference/tmpl/libindicate-unused.sgml index e69de29..c3152b1 100644 --- a/docs/reference/tmpl/libindicate-unused.sgml +++ b/docs/reference/tmpl/libindicate-unused.sgml @@ -0,0 +1,14 @@ + + + + + +@Returns: + + + + + + +@obj: + -- cgit v1.2.3 From 10e51643f04368de99bebfafc0b995339fceed73 Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Wed, 13 May 2009 13:25:33 -0400 Subject: Added package libindicate-doc and removed dbus-test-runner build requirement --- debian/control | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index f663d47..47b903a 100644 --- a/debian/control +++ b/debian/control @@ -11,8 +11,7 @@ Build-Depends: debhelper (>= 5.0), libgnomeui-dev, libtool, intltool, - libxml2-dev, - dbus-test-runner + libxml2-dev Standards-Version: 3.8.0 Homepage: https://launchpad.net/indicator-applet Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/indicator-applet/ubuntu @@ -68,3 +67,18 @@ Description: GNOME panel indicator applet - shared library the indicator applet. . This package contains files that are needed to build applications. + +Package: libindicate-doc +Section: doc +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libindicate1 (= ${binary:Version}), + libdbus-glib-1-dev (>= 0.76), + libgtk2.0-dev (>= 2.12.0) +Description: GNOME panel indicator applet - shared library + indicator-applet is an applet to display information from + various applications consistently in the GNOME panel.· + . + This package contains files that are needed to build applications. + -- cgit v1.2.3 From f36cc1b4db4ecc24dfa68cef6882c893807c8844 Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Wed, 13 May 2009 14:52:04 -0400 Subject: added debian/libindicate-doc.install --- debian/libindicate-doc.install | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 debian/libindicate-doc.install diff --git a/debian/libindicate-doc.install b/debian/libindicate-doc.install new file mode 100644 index 0000000..55af9eb --- /dev/null +++ b/debian/libindicate-doc.install @@ -0,0 +1,2 @@ +debian/tmp/usr/share/gtk-doc/html/libindicate/* +debian/tmp/usr/share/doc/indicator-applet/examples/* -- cgit v1.2.3 From 63dad6a7ff9cebb6d55d19d8d4233a171100a320 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 8 Jun 2009 09:31:48 -0500 Subject: Patch from Mark Trompell to make suffix checking better. --- src/applet-main.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/applet-main.c b/src/applet-main.c index fca71a7..2aa03ee 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -62,16 +62,10 @@ load_module (const gchar * name, GtkWidget * menu) g_debug("Looking at Module: %s", name); g_return_val_if_fail(name != NULL, FALSE); - guint suffix_len = strlen(G_MODULE_SUFFIX); - guint name_len = strlen(name); - - g_return_val_if_fail(name_len > suffix_len, FALSE); - - int i; - for (i = 0; i < suffix_len; i++) { - if (name[(name_len - suffix_len) + i] != (G_MODULE_SUFFIX)[i]) - return FALSE; + if (!g_str_has_suffix(name, G_MODULE_SUFFIX)) { + return FALSE; } + g_debug("Loading Module: %s", name); gchar * fullpath = g_build_filename(INDICATOR_DIR, name, NULL); -- cgit v1.2.3 From 786788546803ee6e02c3c07dc17827d50bba22e2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 3 Jul 2009 14:41:48 -0500 Subject: A little like mentioned on the GNOME Wiki, but doesn't work until I have a higher version of automake. Doesn't seem to cause problems though. --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 939accd..89bfbd8 100644 --- a/configure.ac +++ b/configure.ac @@ -7,6 +7,7 @@ AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(indicator-applet, 0.2.0dev) AM_MAINTAINER_MODE +m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES]) IT_PROG_INTLTOOL([0.35.0]) AC_ISC_POSIX -- cgit v1.2.3 From c594f600938184e475841a483e5e87ccb0b1e490 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 17 Jul 2009 21:24:00 -0500 Subject: releasing version 0.2.0~bzr309-0ubuntu2 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3689fe6..5913f0b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -indicator-applet (0.2.0~bzr309-0ubuntu2) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr309-0ubuntu2) jaunty; urgency=low * debian/control, debian/libindicate-doc.install: Merging in Ken Vandine's work on making a -doc package for libindicate. - -- Ted Gould Wed, 13 May 2009 15:00:18 -0500 + -- Ted Gould Fri, 17 Jul 2009 21:23:41 -0500 indicator-applet (0.2.0~bzr309-0ubuntu1) jaunty; urgency=low -- cgit v1.2.3 From 61730d0afa4d46e9e85cd1f0795bb891609b4c29 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 17 Jul 2009 21:24:31 -0500 Subject: Now moving on to Karmic --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 5913f0b..f66659c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +indicator-applet (0.2.0~bzr309-0ubuntu3) UNRELEASED; urgency=low + + * Now moving on to Karmic + + -- Ted Gould Fri, 17 Jul 2009 21:24:11 -0500 + indicator-applet (0.2.0~bzr309-0ubuntu2) jaunty; urgency=low * debian/control, debian/libindicate-doc.install: Merging in Ken -- cgit v1.2.3 From 064740bd411abe73a67a9c75f469f04d8259afdb Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 17 Jul 2009 21:24:56 -0500 Subject: releasing version 0.2.0~bzr309-0ubuntu3 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index f66659c..a412e6e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -indicator-applet (0.2.0~bzr309-0ubuntu3) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr309-0ubuntu3) karmic; urgency=low * Now moving on to Karmic - -- Ted Gould Fri, 17 Jul 2009 21:24:11 -0500 + -- Ted Gould Fri, 17 Jul 2009 21:24:41 -0500 indicator-applet (0.2.0~bzr309-0ubuntu2) jaunty; urgency=low -- cgit v1.2.3 From e3a0b5a84b1da2dd632972dccb0dad35859d5957 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 21 Jul 2009 10:42:36 -0500 Subject: Oops, we shouldn't have a prototype for a function that doesn't exist. Thanks to Aurilien. --- libindicate/server.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/libindicate/server.h b/libindicate/server.h index 2a300e2..ef938c3 100644 --- a/libindicate/server.h +++ b/libindicate/server.h @@ -151,9 +151,6 @@ struct _IndicateServerClass { GType indicate_server_get_type (void) G_GNUC_CONST; -/* Create a new server */ -IndicateServer * indicate_server_new (void); - /* Sets the object. By default this is /org/freedesktop/indicators */ void indicate_server_set_dbus_object (const gchar * obj); -- cgit v1.2.3 From 5cbbca20e09a1d7281c566b01b1fc2b50a81d0b5 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 21 Jul 2009 11:37:51 -0500 Subject: Creating the server marshallers that we need --- libindicate/Makefile.am | 15 +++++++++++++++ libindicate/server-marshal.list | 29 +++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 libindicate/server-marshal.list diff --git a/libindicate/Makefile.am b/libindicate/Makefile.am index 3ad6247..a35cf35 100644 --- a/libindicate/Makefile.am +++ b/libindicate/Makefile.am @@ -9,6 +9,7 @@ EXTRA_DIST = \ indicate-interface.xml \ indicate-listener.xml \ listener-marshal.list \ + server-marshal.list \ indicate.pc.in BUILT_SOURCES = \ @@ -18,6 +19,8 @@ BUILT_SOURCES = \ dbus-listener-client.h \ listener-marshal.c \ listener-marshal.h \ + server-marshal.c \ + server-marshal.h \ $(ENUM_FILE).h \ $(ENUM_FILE).c @@ -45,6 +48,8 @@ libindicate_la_SOURCES = \ dbus-listener-client.h \ indicate-enum-types.c \ server.c \ + server-marshal.c \ + server-marshal.h \ listener.c \ listener-marshal.c \ listener-marshal.h \ @@ -101,6 +106,16 @@ listener-marshal.c: $(srcdir)/listener-marshal.list --prefix=_indicate_listener_marshal $(srcdir)/listener-marshal.list \ > listener-marshal.c +server-marshal.h: $(srcdir)/server-marshal.list + glib-genmarshal --header \ + --prefix=_indicate_server_marshal $(srcdir)/server-marshal.list \ + > server-marshal.h + +server-marshal.c: $(srcdir)/server-marshal.list + glib-genmarshal --body \ + --prefix=_indicate_server_marshal $(srcdir)/server-marshal.list \ + > server-marshal.c + pkgconfig_DATA = indicate.pc pkgconfigdir = $(libdir)/pkgconfig diff --git a/libindicate/server-marshal.list b/libindicate/server-marshal.list new file mode 100644 index 0000000..540f0fe --- /dev/null +++ b/libindicate/server-marshal.list @@ -0,0 +1,29 @@ +# A library to allow applictions to provide simple indications of +# information to be displayed to users of the application through the +# interface shell. +# +# Copyright 2009 Canonical Ltd. +# +# Authors: +# Ted Gould +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of either or both of the following licenses: +# +# 1) the GNU Lesser General Public License version 3, as published by the +# Free Software Foundation; and/or +# 2) the GNU Lesser General Public License version 2.1, as published by +# the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranties of +# MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the applicable version of the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of both the GNU Lesser General Public +# License version 3 and version 2.1 along with this program. If not, see +# +# +# IndicatorAdded +VOID:UINT,STRING -- cgit v1.2.3 From b8b2c52d84980f6132e6071dc879ac5e40b90880 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 21 Jul 2009 11:39:26 -0500 Subject: Using the server marshaller --- libindicate/server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libindicate/server.c b/libindicate/server.c index cd8b33a..95a5c3c 100644 --- a/libindicate/server.c +++ b/libindicate/server.c @@ -29,6 +29,7 @@ License version 3 and version 2.1 along with this program. If not, see #include "server.h" #include "interests-priv.h" +#include "server-marshal.h" #include #include @@ -179,7 +180,7 @@ indicate_server_class_init (IndicateServerClass * class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateServerClass, indicator_added), NULL, NULL, - g_cclosure_marshal_VOID__UINT_POINTER, + _indicate_server_marshal_VOID__UINT_STRING, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING); /** IndicateServer::indicator-removed: -- cgit v1.2.3 From 53908231e04a6b04ff07bde18bc737079a83aa4f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 21 Jul 2009 11:41:46 -0500 Subject: Fixing the other signal marshallers --- libindicate/server.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libindicate/server.c b/libindicate/server.c index 95a5c3c..a3d3be8 100644 --- a/libindicate/server.c +++ b/libindicate/server.c @@ -198,7 +198,7 @@ indicate_server_class_init (IndicateServerClass * class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateServerClass, indicator_removed), NULL, NULL, - g_cclosure_marshal_VOID__UINT_POINTER, + _indicate_server_marshal_VOID__UINT_STRING, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING); /** IndicateServer::indicator-modified: @@ -216,7 +216,7 @@ indicate_server_class_init (IndicateServerClass * class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateServerClass, indicator_modified), NULL, NULL, - g_cclosure_marshal_VOID__UINT_POINTER, + _indicate_server_marshal_VOID__UINT_STRING, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING); /** IndicateServer::server-show: @@ -232,7 +232,7 @@ indicate_server_class_init (IndicateServerClass * class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateServerClass, server_show), NULL, NULL, - g_cclosure_marshal_VOID__POINTER, + g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); /** IndicateServer::server-hide: @@ -247,7 +247,7 @@ indicate_server_class_init (IndicateServerClass * class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateServerClass, server_hide), NULL, NULL, - g_cclosure_marshal_VOID__POINTER, + g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); /** IndicateServer::server-display: -- cgit v1.2.3 From 8157a2c4c11e6a15b52b100e5c58ba9d6cd48850 Mon Sep 17 00:00:00 2001 From: Aurelien Gateau Date: Mon, 27 Jul 2009 17:18:41 +0200 Subject: Destroy dbus proxies in listener finalize. Makes it possible to destroy a listener and recreate one without calling the old instance callbacks (useful for unit-tests). --- libindicate/listener.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/libindicate/listener.c b/libindicate/listener.c index bd3639d..5a64c81 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -277,8 +277,19 @@ indicate_listener_init (IndicateListener * listener) static void indicate_listener_finalize (GObject * obj) { - /* IndicateListener * listener = INDICATE_LISTENER(obj); */ - + IndicateListener * listener = INDICATE_LISTENER(obj); + IndicateListenerPrivate * priv = INDICATE_LISTENER_GET_PRIVATE(listener); + + if (priv->todo_idle != 0) { + g_idle_remove_by_data(obj); + } + /* Hack: proxy_struct_destroy() lacks a user_data parameter, but since the + * caller is responsible for handling params on the stack, it works + */ + g_list_foreach(priv->proxies_possible, (GFunc)proxy_struct_destroy, NULL); + g_list_free(priv->proxies_possible); + g_list_foreach(priv->proxies_working, (GFunc)proxy_struct_destroy, NULL); + g_list_free(priv->proxies_working); G_OBJECT_CLASS (indicate_listener_parent_class)->finalize (obj); return; } -- cgit v1.2.3 From 7f379d5d7fb9ddf834be4864324637b12af98750 Mon Sep 17 00:00:00 2001 From: Aurelien Gateau Date: Mon, 27 Jul 2009 17:20:24 +0200 Subject: Removed warning: it's annoying in unittests. --- libindicate/listener.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libindicate/listener.c b/libindicate/listener.c index 5a64c81..501d367 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -297,8 +297,6 @@ indicate_listener_finalize (GObject * obj) IndicateListener * indicate_listener_new (void) { - g_warning("Creating a new listener is generally discouraged, please use indicate_listener_ref_default"); - IndicateListener * listener; listener = g_object_new(INDICATE_TYPE_LISTENER, NULL); return listener; -- cgit v1.2.3 From f344374861267a39d874e67f1fb4967b3f844e82 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 3 Aug 2009 18:08:22 +0100 Subject: Ignoring built files --- .bzrignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.bzrignore b/.bzrignore index 6e10243..47d219c 100644 --- a/.bzrignore +++ b/.bzrignore @@ -79,3 +79,6 @@ test-interests-server4 test-interests-server5 test-thousand-indicators-server test-thousand-indicators-client +libindicate_la-server-marshal.lo +server-marshal.c +server-marshal.h -- cgit v1.2.3 From b3d3f3de3bb73ac8cc77ed5c8bde5aeb76073af2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 3 Aug 2009 18:50:57 +0100 Subject: Adding a function to set the server of the indicator upon creation. indicate_indicator_new_with_server() --- libindicate/indicator.c | 30 ++++++++++++++++++++++++++++++ libindicate/indicator.h | 5 ++++- libindicate/server.h | 3 ++- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/libindicate/indicator.c b/libindicate/indicator.c index 76eb616..92712bd 100644 --- a/libindicate/indicator.c +++ b/libindicate/indicator.c @@ -203,6 +203,36 @@ indicate_indicator_new (void) return indicator; } +/** + indicate_indicator_new_with_server: + @server: The server that should be associated with this indicator. + + Builds a new indicator object using g_object_new() and sets + the server to the specified server. Also, adds a reference + to the server. + + Return value: A pointer to a new #IndicateIndicator object. +*/ +IndicateIndicator * +indicate_indicator_new_with_server (IndicateServer * server) +{ + g_return_val_if_fail(server != NULL, NULL); + + IndicateIndicator * indicator = g_object_new(INDICATE_TYPE_INDICATOR, NULL); + + IndicateIndicatorPrivate * priv = INDICATE_INDICATOR_GET_PRIVATE(indicator); + if (priv->server != NULL) { + g_object_unref(priv->server); + priv->server = NULL; + } + + priv->server = server; + g_object_ref(priv->server); + + return indicator; +} + + /** indicate_indicator_show: @indicator: a #IndicateIndicator to act on diff --git a/libindicate/indicator.h b/libindicate/indicator.h index 3e2a803..118c6c0 100644 --- a/libindicate/indicator.h +++ b/libindicate/indicator.h @@ -68,6 +68,8 @@ struct _IndicateIndicator { GObject parent; }; +#include "server.h" + /** IndicateIndicatorClass: @parent_class: Parent class #GObjectClass. @@ -109,7 +111,9 @@ struct _IndicateIndicatorClass { GType indicate_indicator_get_type(void) G_GNUC_CONST; +/* New Indicator Functions */ IndicateIndicator * indicate_indicator_new (void); +IndicateIndicator * indicate_indicator_new_with_server (IndicateServer * server); /* Show and hide this indicator */ void indicate_indicator_show (IndicateIndicator * indicator); @@ -167,4 +171,3 @@ GPtrArray * indicate_indicator_list_properties (IndicateIndicator * indicator); G_END_DECLS #endif /* INDICATE_INDICATOR_H_INCLUDED__ */ - diff --git a/libindicate/server.h b/libindicate/server.h index ef938c3..cff76c4 100644 --- a/libindicate/server.h +++ b/libindicate/server.h @@ -33,7 +33,6 @@ License version 3 and version 2.1 along with this program. If not, see #include #include -#include "indicator.h" #include "interests.h" G_BEGIN_DECLS @@ -72,6 +71,8 @@ struct _IndicateServer { GObject parent; }; +#include "indicator.h" + /** IndicateServerClass: @parent: Parent Class -- cgit v1.2.3 From ecde85f57823acace986724989fa57daf43799d2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 3 Aug 2009 19:10:34 +0100 Subject: Creating a default little GTK library to move the GTK stuff in --- Makefile.am | 1 + configure.ac | 10 ++++++ libindicate-gtk/Makefile.am | 68 ++++++++++++++++++++++++++++++++++++++ libindicate-gtk/indicate-gtk.pc.in | 14 ++++++++ libindicate-gtk/indicator.c | 5 +++ libindicate-gtk/indicator.h | 0 6 files changed, 98 insertions(+) create mode 100644 libindicate-gtk/Makefile.am create mode 100644 libindicate-gtk/indicate-gtk.pc.in create mode 100644 libindicate-gtk/indicator.c create mode 100644 libindicate-gtk/indicator.h diff --git a/Makefile.am b/Makefile.am index ac6fe90..bdd32f4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,6 +2,7 @@ SUBDIRS = \ src \ libindicate \ + libindicate-gtk \ libindicator \ examples \ tests \ diff --git a/configure.ac b/configure.ac index 89bfbd8..13f4b6c 100644 --- a/configure.ac +++ b/configure.ac @@ -61,6 +61,14 @@ PKG_CHECK_MODULES(LIBINDICATE, glib-2.0 >= $GLIB_REQUIRED_VERSION AC_SUBST(LIBINDICATE_CFLAGS) AC_SUBST(LIBINDICATE_LIBS) +PKG_CHECK_MODULES(LIBINDICATEGTK, glib-2.0 >= $GLIB_REQUIRED_VERSION + gio-2.0 >= $GIO_REQUIRED_VERSION + gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED_VERSION + dbus-glib-1 >= $DBUS_REQUIRED_VERSION + libxml-2.0 >= $XML_REQUIRED_VERSION) +AC_SUBST(LIBINDICATEGTK_CFLAGS) +AC_SUBST(LIBINDICATEGTK_LIBS) + ########################### # GObject Introspection ########################### @@ -162,6 +170,8 @@ Makefile src/Makefile libindicate/Makefile libindicate/indicate.pc +libindicate-gtk/Makefile +libindicate-gtk/indicate-gtk.pc libindicator/Makefile libindicator/indicator.pc examples/Makefile diff --git a/libindicate-gtk/Makefile.am b/libindicate-gtk/Makefile.am new file mode 100644 index 0000000..0e1d08d --- /dev/null +++ b/libindicate-gtk/Makefile.am @@ -0,0 +1,68 @@ + +INCLUDES= \ + -DG_LOG_DOMAIN=\"libindicate-gtk\" + +EXTRA_DIST = \ + indicate-gtk.pc.in + +lib_LTLIBRARIES = \ + libindicate-gtk.la + +libindicate_gtkincludedir=$(includedir)/libindicate-0.1/libindicate-gtk + +indicate_gtk_headers = \ + indicator.h + +libindicate_gtkinclude_HEADERS = \ + $(indicate_headers) + +libindicate_gtk_la_SOURCES = \ + $(indicate_headers) \ + indicator.c + +libindicate_gtk_la_LDFLAGS = \ + -version-info $(LIBINDICATE_CURRENT):$(LIBINDICATE_REVISION):$(LIBINDICATE_AGE) \ + -no-undefined \ + -export-symbols-regex "^[^_d].*" + +libindicate_gtk_la_CFLAGS = \ + $(LIBINDICATEGTK_CFLAGS) + +libindicate_gtk_la_LIBADD = \ + $(LIBINDICATEGTK_LIBS) + +pkgconfig_DATA = indicate-gtk.pc +pkgconfigdir = $(libdir)/pkgconfig + +if USE_GIR + +gobjectintrospection_gir_DATA = \ + Indicate-gtk-0.1.gir +gobjectintrospection_girdir = $(datadir)/gir + +gobjectintrospection_type_DATA = \ + Indicate-gtk-0.1.typelib +gobjectintrospection_typedir = $(libdir)/girepository + +irscanner_headers = $(patsubst %,$(srcdir)/%,$(indicate_headers)) +Indicate-gtk-0.1.gir: $(irscanner_headers) + $(G_IR_SCANNER) \ + -v --namespace IndicateGtk \ + --nsversion=0.1 \ + --add-include-path=$(srcdir) \ + --include=GObject-2.0 \ + --include=GLib-2.0 \ + --include=GdkPixbuf-2.0 \ + --library=indicate --pkg indicate \ + --output Indicate-gtk-0.1.gir $(irscanner_headers) + +Indicate-gtk-0.1.typelib: Indicate-gtk-0.1.gir + $(G_IR_COMPILER) \ + --includedir=$(srcdir) Indicate-gtk-0.1.gir \ + -o Indicate-gtk-0.1.typelib + +DISTCLEANFILES = \ + Indicate-gtk-0.1.gir \ + Indicate-gtk-0.1.typelib + +endif diff --git a/libindicate-gtk/indicate-gtk.pc.in b/libindicate-gtk/indicate-gtk.pc.in new file mode 100644 index 0000000..28e3c81 --- /dev/null +++ b/libindicate-gtk/indicate-gtk.pc.in @@ -0,0 +1,14 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +bindir=@bindir@ +includedir=@includedir@ + +Cflags: -I${includedir}/libindicate-0.1 +Requires: gtk+-2.0 indicate +Libs: -L${libdir} -lindicate-gtk + +Name: libindicate-gtk +Description: libindicate GTK stuff. +Version: @VERSION@ + diff --git a/libindicate-gtk/indicator.c b/libindicate-gtk/indicator.c new file mode 100644 index 0000000..d5f07ef --- /dev/null +++ b/libindicate-gtk/indicator.c @@ -0,0 +1,5 @@ + +void var (void) { + + return; +} diff --git a/libindicate-gtk/indicator.h b/libindicate-gtk/indicator.h new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3 From 840e1c8b34542acf017d3e0caf921062827c280b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 3 Aug 2009 19:25:05 +0100 Subject: Okay, now it is the offending function in it. --- configure.ac | 1 + libindicate-gtk/Makefile.am | 4 +-- libindicate-gtk/indicator.c | 71 ++++++++++++++++++++++++++++++++++++++++++++- libindicate-gtk/indicator.h | 44 ++++++++++++++++++++++++++++ 4 files changed, 117 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 13f4b6c..beed048 100644 --- a/configure.ac +++ b/configure.ac @@ -64,6 +64,7 @@ AC_SUBST(LIBINDICATE_LIBS) PKG_CHECK_MODULES(LIBINDICATEGTK, glib-2.0 >= $GLIB_REQUIRED_VERSION gio-2.0 >= $GIO_REQUIRED_VERSION gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED_VERSION + gtk+-2.0 >= $GTK_REQUIRED_VERSION dbus-glib-1 >= $DBUS_REQUIRED_VERSION libxml-2.0 >= $XML_REQUIRED_VERSION) AC_SUBST(LIBINDICATEGTK_CFLAGS) diff --git a/libindicate-gtk/Makefile.am b/libindicate-gtk/Makefile.am index 0e1d08d..a6a50fa 100644 --- a/libindicate-gtk/Makefile.am +++ b/libindicate-gtk/Makefile.am @@ -14,10 +14,10 @@ indicate_gtk_headers = \ indicator.h libindicate_gtkinclude_HEADERS = \ - $(indicate_headers) + $(indicate_gtk_headers) libindicate_gtk_la_SOURCES = \ - $(indicate_headers) \ + $(indicate_gtk_headers) \ indicator.c libindicate_gtk_la_LDFLAGS = \ diff --git a/libindicate-gtk/indicator.c b/libindicate-gtk/indicator.c index d5f07ef..a575849 100644 --- a/libindicate-gtk/indicator.c +++ b/libindicate-gtk/indicator.c @@ -1,5 +1,74 @@ +/* +A library to allow applictions to provide simple indications of +information to be displayed to users of the application through the +interface shell. -void var (void) { +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +This program is free software: you can redistribute it and/or modify it +under the terms of either or both of the following licenses: + +1) the GNU Lesser General Public License version 3, as published by the +Free Software Foundation; and/or +2) the GNU Lesser General Public License version 2.1, as published by +the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR +PURPOSE. See the applicable version of the GNU Lesser General Public +License for more details. + +You should have received a copy of both the GNU Lesser General Public +License version 3 and version 2.1 along with this program. If not, see + +*/ + +#include "indicator.h" + +/** + indicate_indicator_set_property_icon: + @indicator: a #IndicateIndicator to act on + @key: name of the property + @data: icon to set property with + + This is a helper function that wraps around #indicate_indicator_set_property + but takes an #GdkPixbuf parameter. It then takes the @data + parameter, turns it into a PNG, base64 encodes it and then + uses that data to call #indicate_indicator_set_property. +*/ +void +indicate_indicator_set_property_icon (IndicateIndicator * indicator, const gchar * key, const GdkPixbuf * data) +{ + if (!GDK_IS_PIXBUF(data)) { + g_warning("Invalide GdkPixbuf"); + return; + } + + GError * error = NULL; + gchar * png_data; + gsize png_data_len; + + if (!gdk_pixbuf_save_to_buffer((GdkPixbuf *)data, &png_data, &png_data_len, "png", &error, NULL)) { + if (error == NULL) { + g_warning("Unable to create pixbuf data stream: %d", png_data_len); + } else { + g_warning("Unable to create pixbuf data stream: %s", error->message); + g_error_free(error); + error = NULL; + } + + return; + } + + gchar * prop_str = g_base64_encode((guchar *)png_data, png_data_len); + indicate_indicator_set_property(indicator, key, prop_str); + + g_free(prop_str); + g_free(png_data); return; } diff --git a/libindicate-gtk/indicator.h b/libindicate-gtk/indicator.h index e69de29..43e264f 100644 --- a/libindicate-gtk/indicator.h +++ b/libindicate-gtk/indicator.h @@ -0,0 +1,44 @@ +/* +A library to allow applictions to provide simple indications of +information to be displayed to users of the application through the +interface shell. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +This program is free software: you can redistribute it and/or modify it +under the terms of either or both of the following licenses: + +1) the GNU Lesser General Public License version 3, as published by the +Free Software Foundation; and/or +2) the GNU Lesser General Public License version 2.1, as published by +the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR +PURPOSE. See the applicable version of the GNU Lesser General Public +License for more details. + +You should have received a copy of both the GNU Lesser General Public +License version 3 and version 2.1 along with this program. If not, see + +*/ + +#ifndef INDICATE_GTK_INDICATOR_H_INCLUDED__ +#define INDICATE_GTK_INDICATOR_H_INCLUDED__ 1 + +#include +#include +#include "libindicate/indicator.h" + +G_BEGIN_DECLS + +/* Properties handling */ +void indicate_indicator_set_property_icon (IndicateIndicator * indicator, const gchar * key, const GdkPixbuf * data); + +G_END_DECLS + +#endif /* INDICATE_GTK_INDICATOR_H_INCLUDED__ */ -- cgit v1.2.3 From 78ad4c46f88249a278dc0d86a3241716c0e7f385 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 3 Aug 2009 23:31:00 +0100 Subject: Moving the listener code and some indicator code into libindicate-gtk --- libindicate-gtk/Makefile.am | 6 ++-- libindicate/Makefile.am | 1 + libindicate/indicator.c | 44 ------------------------ libindicate/indicator.h | 3 -- libindicate/listener-private.h | 63 ++++++++++++++++++++++++++++++++++ libindicate/listener.c | 77 ++---------------------------------------- libindicate/listener.h | 7 ---- 7 files changed, 70 insertions(+), 131 deletions(-) create mode 100644 libindicate/listener-private.h diff --git a/libindicate-gtk/Makefile.am b/libindicate-gtk/Makefile.am index a6a50fa..6112b5f 100644 --- a/libindicate-gtk/Makefile.am +++ b/libindicate-gtk/Makefile.am @@ -11,14 +11,16 @@ lib_LTLIBRARIES = \ libindicate_gtkincludedir=$(includedir)/libindicate-0.1/libindicate-gtk indicate_gtk_headers = \ - indicator.h + indicator.h \ + listener.h libindicate_gtkinclude_HEADERS = \ $(indicate_gtk_headers) libindicate_gtk_la_SOURCES = \ $(indicate_gtk_headers) \ - indicator.c + indicator.c \ + listener.c libindicate_gtk_la_LDFLAGS = \ -version-info $(LIBINDICATE_CURRENT):$(LIBINDICATE_REVISION):$(LIBINDICATE_AGE) \ diff --git a/libindicate/Makefile.am b/libindicate/Makefile.am index a35cf35..d4746fb 100644 --- a/libindicate/Makefile.am +++ b/libindicate/Makefile.am @@ -53,6 +53,7 @@ libindicate_la_SOURCES = \ listener.c \ listener-marshal.c \ listener-marshal.h \ + listener-private.h \ indicator.c \ indicator-message.c \ interests-priv.h diff --git a/libindicate/indicator.c b/libindicate/indicator.c index 92712bd..cb257eb 100644 --- a/libindicate/indicator.c +++ b/libindicate/indicator.c @@ -380,50 +380,6 @@ indicate_indicator_set_property (IndicateIndicator * indicator, const gchar * ke return class->set_property(indicator, key, data); } -/** - indicate_indicator_set_property_icon: - @indicator: a #IndicateIndicator to act on - @key: name of the property - @data: icon to set property with - - This is a helper function that wraps around #indicate_indicator_set_property - but takes an #GdkPixbuf parameter. It then takes the @data - parameter, turns it into a PNG, base64 encodes it and then - uses that data to call #indicate_indicator_set_property. -*/ -void -indicate_indicator_set_property_icon (IndicateIndicator * indicator, const gchar * key, const GdkPixbuf * data) -{ - if (!GDK_IS_PIXBUF(data)) { - g_warning("Invalide GdkPixbuf"); - return; - } - - GError * error = NULL; - gchar * png_data; - gsize png_data_len; - - if (!gdk_pixbuf_save_to_buffer((GdkPixbuf *)data, &png_data, &png_data_len, "png", &error, NULL)) { - if (error == NULL) { - g_warning("Unable to create pixbuf data stream: %d", png_data_len); - } else { - g_warning("Unable to create pixbuf data stream: %s", error->message); - g_error_free(error); - error = NULL; - } - - return; - } - - gchar * prop_str = g_base64_encode((guchar *)png_data, png_data_len); - indicate_indicator_set_property(indicator, key, prop_str); - - g_free(prop_str); - g_free(png_data); - - return; -} - /** indicate_indicator_set_property_time: @indicator: a #IndicateIndicator to act on diff --git a/libindicate/indicator.h b/libindicate/indicator.h index 118c6c0..20b998d 100644 --- a/libindicate/indicator.h +++ b/libindicate/indicator.h @@ -33,8 +33,6 @@ License version 3 and version 2.1 along with this program. If not, see #include #include -#include - G_BEGIN_DECLS /* Boilerplate */ @@ -132,7 +130,6 @@ void indicate_indicator_user_display (IndicateIndicator * indicator); /* Properties handling */ void indicate_indicator_set_property (IndicateIndicator * indicator, const gchar * key, const gchar * data); -void indicate_indicator_set_property_icon (IndicateIndicator * indicator, const gchar * key, const GdkPixbuf * data); void indicate_indicator_set_property_time (IndicateIndicator * indicator, const gchar * key, GTimeVal * time); const gchar * indicate_indicator_get_property (IndicateIndicator * indicator, const gchar * key); GPtrArray * indicate_indicator_list_properties (IndicateIndicator * indicator); diff --git a/libindicate/listener-private.h b/libindicate/listener-private.h new file mode 100644 index 0000000..ea1b108 --- /dev/null +++ b/libindicate/listener-private.h @@ -0,0 +1,63 @@ +/* +A library to allow applictions to provide simple indications of +information to be displayed to users of the application through the +interface shell. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +This program is free software: you can redistribute it and/or modify it +under the terms of either or both of the following licenses: + +1) the GNU Lesser General Public License version 3, as published by the +Free Software Foundation; and/or +2) the GNU Lesser General Public License version 2.1, as published by +the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR +PURPOSE. See the applicable version of the GNU Lesser General Public +License for more details. + +You should have received a copy of both the GNU Lesser General Public +License version 3 and version 2.1 along with this program. If not, see + +*/ + +#ifndef INDICATE_LISTENER_PRIVATE_H__ +#define INDICATE_LISTENER_PRIVATE_H__ 1 + +struct _IndicateListenerServer { + gchar * name; + DBusGProxy * proxy; + DBusGConnection * connection; + gboolean interests[INDICATE_INTEREST_LAST]; +}; + +struct _IndicateListenerIndicator { + guint id; +}; + +typedef struct _IndicateListenerPrivate IndicateListenerPrivate; +struct _IndicateListenerPrivate +{ + DBusGConnection * session_bus; + DBusGConnection * system_bus; + + DBusGProxy * dbus_proxy_session; + DBusGProxy * dbus_proxy_system; + + GList * proxies_working; + GList * proxies_possible; + + GArray * proxy_todo; + guint todo_idle; +}; + +#define INDICATE_LISTENER_GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), INDICATE_TYPE_LISTENER, IndicateListenerPrivate)) + +#endif /* INDICATE_LISTENER_PRIVATE_H__ */ diff --git a/libindicate/listener.c b/libindicate/listener.c index 501d367..48ad616 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -54,35 +54,7 @@ enum { static guint signals[LAST_SIGNAL] = { 0 }; -struct _IndicateListenerServer { - gchar * name; - DBusGProxy * proxy; - DBusGConnection * connection; - gboolean interests[INDICATE_INTEREST_LAST]; -}; - -struct _IndicateListenerIndicator { - guint id; -}; - -typedef struct _IndicateListenerPrivate IndicateListenerPrivate; -struct _IndicateListenerPrivate -{ - DBusGConnection * session_bus; - DBusGConnection * system_bus; - - DBusGProxy * dbus_proxy_session; - DBusGProxy * dbus_proxy_system; - - GList * proxies_working; - GList * proxies_possible; - - GArray * proxy_todo; - guint todo_idle; -}; - -#define INDICATE_LISTENER_GET_PRIVATE(o) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((o), INDICATE_TYPE_LISTENER, IndicateListenerPrivate)) +#include "listener-private.h" typedef struct { DBusGProxy * proxy; @@ -718,8 +690,7 @@ proxy_indicators_free (gpointer data) typedef enum _get_property_type get_property_type; enum _get_property_type { PROPERTY_TYPE_STRING, - PROPERTY_TYPE_TIME, - PROPERTY_TYPE_ICON + PROPERTY_TYPE_TIME }; typedef struct _get_property_t get_property_t; @@ -750,44 +721,6 @@ get_property_cb (DBusGProxy *proxy, char * OUT_value, GError *error, gpointer us cb(get_property_data->listener, get_property_data->server, get_property_data->indicator, get_property_data->property, OUT_value, get_property_data->data); break; } - case PROPERTY_TYPE_ICON: { - indicate_listener_get_property_icon_cb cb = (indicate_listener_get_property_icon_cb)get_property_data->cb; - - /* There is no icon */ - if (OUT_value == NULL || OUT_value[0] == '\0') { - break; - } - - gsize length = 0; - guchar * icondata = g_base64_decode(OUT_value, &length); - - GInputStream * input = g_memory_input_stream_new_from_data(icondata, length, NULL); - if (input == NULL) { - g_warning("Cound not create input stream from icon property data"); - g_free(icondata); - break; - } - - GError * error = NULL; - GdkPixbuf * icon = gdk_pixbuf_new_from_stream(input, NULL, &error); - if (icon != NULL) { - cb(get_property_data->listener, get_property_data->server, get_property_data->indicator, get_property_data->property, icon, get_property_data->data); - } - - if (error != NULL) { - g_warning("Unable to build Pixbuf from icon data: %s", error->message); - g_error_free(error); - } - - error = NULL; - g_input_stream_close(input, NULL, &error); - if (error != NULL) { - g_warning("Unable to close input stream: %s", error->message); - g_error_free(error); - } - g_free(icondata); - break; - } case PROPERTY_TYPE_TIME: { indicate_listener_get_property_time_cb cb = (indicate_listener_get_property_time_cb)get_property_data->cb; GTimeVal time; @@ -834,12 +767,6 @@ indicate_listener_get_property_time (IndicateListener * listener, IndicateListen return get_property_helper(listener, server, indicator, property, G_CALLBACK(callback), data, PROPERTY_TYPE_TIME); } -void -indicate_listener_get_property_icon (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, indicate_listener_get_property_icon_cb callback, gpointer data) -{ - return get_property_helper(listener, server, indicator, property, G_CALLBACK(callback), data, PROPERTY_TYPE_ICON); -} - gboolean _indicate_listener_get_indicator_servers (IndicateListener * listener, GList * servers) { diff --git a/libindicate/listener.h b/libindicate/listener.h index 5bfd298..f2ed4b1 100644 --- a/libindicate/listener.h +++ b/libindicate/listener.h @@ -88,7 +88,6 @@ GType indicate_listener_get_type (void) G_GNUC_CONST; typedef void (*indicate_listener_get_property_cb) (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gchar * propertydata, gpointer data); typedef void (*indicate_listener_get_property_time_cb) (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, GTimeVal * propertydata, gpointer data); -typedef void (*indicate_listener_get_property_icon_cb) (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, GdkPixbuf * propertydata, gpointer data); typedef void (*indicate_listener_get_server_property_cb) (IndicateListener * listener, IndicateListenerServer * server, gchar * value, gpointer data); /* Create a new listener */ @@ -106,12 +105,6 @@ void indicate_listener_get_property_time (IndicateListener * l gchar * property, indicate_listener_get_property_time_cb callback, gpointer data); -void indicate_listener_get_property_icon (IndicateListener * listener, - IndicateListenerServer * server, - IndicateListenerIndicator * indicator, - gchar * property, - indicate_listener_get_property_icon_cb callback, - gpointer data); void indicate_listener_display (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator); -- cgit v1.2.3 From 793db0f028b5843428e8d5e7bbdf053c4978cf8e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 3 Aug 2009 23:43:37 +0100 Subject: Oops, forgot the listener stuff --- libindicate-gtk/listener.c | 148 +++++++++++++++++++++++++++++++++++++++++++++ libindicate-gtk/listener.h | 57 +++++++++++++++++ 2 files changed, 205 insertions(+) create mode 100644 libindicate-gtk/listener.c create mode 100644 libindicate-gtk/listener.h diff --git a/libindicate-gtk/listener.c b/libindicate-gtk/listener.c new file mode 100644 index 0000000..dceb05b --- /dev/null +++ b/libindicate-gtk/listener.c @@ -0,0 +1,148 @@ +/* +A library to allow applictions to provide simple indications of +information to be displayed to users of the application through the +interface shell. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +This program is free software: you can redistribute it and/or modify it +under the terms of either or both of the following licenses: + +1) the GNU Lesser General Public License version 3, as published by the +Free Software Foundation; and/or +2) the GNU Lesser General Public License version 2.1, as published by +the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR +PURPOSE. See the applicable version of the GNU Lesser General Public +License for more details. + +You should have received a copy of both the GNU Lesser General Public +License version 3 and version 2.1 along with this program. If not, see + +*/ + +#include "listener.h" +#include + +#include "../libindicate/dbus-indicate-client.h" +#include "../libindicate/listener-private.h" + +typedef enum _get_property_type get_property_type; +enum _get_property_type { + PROPERTY_TYPE_STRING, + PROPERTY_TYPE_TIME, + PROPERTY_TYPE_ICON +}; + +typedef struct _get_property_t get_property_t; +struct _get_property_t { + GCallback cb; + gpointer data; + IndicateListener * listener; + IndicateListenerServer * server; + IndicateListenerIndicator * indicator; + gchar * property; + get_property_type type; +}; + +static void +get_property_cb (DBusGProxy *proxy, char * OUT_value, GError *error, gpointer userdata) +{ + get_property_t * get_property_data = (get_property_t *)userdata; + + if (error != NULL) { + g_warning("Unable to get property data: %s", error->message); + g_error_free(error); + return; + } + + switch (get_property_data->type) { + case PROPERTY_TYPE_STRING: { + indicate_listener_get_property_cb cb = (indicate_listener_get_property_cb)get_property_data->cb; + cb(get_property_data->listener, get_property_data->server, get_property_data->indicator, get_property_data->property, OUT_value, get_property_data->data); + break; + } + case PROPERTY_TYPE_ICON: { + indicate_listener_get_property_icon_cb cb = (indicate_listener_get_property_icon_cb)get_property_data->cb; + + /* There is no icon */ + if (OUT_value == NULL || OUT_value[0] == '\0') { + break; + } + + gsize length = 0; + guchar * icondata = g_base64_decode(OUT_value, &length); + + GInputStream * input = g_memory_input_stream_new_from_data(icondata, length, NULL); + if (input == NULL) { + g_warning("Cound not create input stream from icon property data"); + g_free(icondata); + break; + } + + GError * error = NULL; + GdkPixbuf * icon = gdk_pixbuf_new_from_stream(input, NULL, &error); + if (icon != NULL) { + cb(get_property_data->listener, get_property_data->server, get_property_data->indicator, get_property_data->property, icon, get_property_data->data); + } + + if (error != NULL) { + g_warning("Unable to build Pixbuf from icon data: %s", error->message); + g_error_free(error); + } + + error = NULL; + g_input_stream_close(input, NULL, &error); + if (error != NULL) { + g_warning("Unable to close input stream: %s", error->message); + g_error_free(error); + } + g_free(icondata); + break; + } + case PROPERTY_TYPE_TIME: { + indicate_listener_get_property_time_cb cb = (indicate_listener_get_property_time_cb)get_property_data->cb; + GTimeVal time; + if (g_time_val_from_iso8601(OUT_value, &time)) { + cb(get_property_data->listener, get_property_data->server, get_property_data->indicator, get_property_data->property, &time, get_property_data->data); + } + break; + } + } + + g_free(get_property_data->property); + g_free(get_property_data); + + return; +}; + +static void +get_property_helper (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, GCallback callback, gpointer data, get_property_type prop_type) +{ + /* g_debug("get_property_helper: %s %d", property, prop_type); */ + /* TODO: Do we need to somehow refcount the server/indicator while we're waiting on this? */ + get_property_t * get_property_data = g_new(get_property_t, 1); + get_property_data->cb = callback; + get_property_data->data = data; + get_property_data->listener = listener; + get_property_data->server = server; + get_property_data->indicator = indicator; + get_property_data->property = g_strdup(property); + get_property_data->type = prop_type; + + org_freedesktop_indicator_get_indicator_property_async (server->proxy , INDICATE_LISTENER_INDICATOR_ID(indicator), property, get_property_cb, get_property_data); + return; +} + +void +indicate_listener_get_property_icon (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, indicate_listener_get_property_icon_cb callback, gpointer data) +{ + return get_property_helper(listener, server, indicator, property, G_CALLBACK(callback), data, PROPERTY_TYPE_ICON); +} + diff --git a/libindicate-gtk/listener.h b/libindicate-gtk/listener.h new file mode 100644 index 0000000..cedc9a3 --- /dev/null +++ b/libindicate-gtk/listener.h @@ -0,0 +1,57 @@ +/* +A library to allow applictions to provide simple indications of +information to be displayed to users of the application through the +interface shell. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +This program is free software: you can redistribute it and/or modify it +under the terms of either or both of the following licenses: + +1) the GNU Lesser General Public License version 3, as published by the +Free Software Foundation; and/or +2) the GNU Lesser General Public License version 2.1, as published by +the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR +PURPOSE. See the applicable version of the GNU Lesser General Public +License for more details. + +You should have received a copy of both the GNU Lesser General Public +License version 3 and version 2.1 along with this program. If not, see + +*/ + +#ifndef INDICATE_GTK_LISTENER_H_INCLUDED__ +#define INDICATE_GTK_LISTENER_H_INCLUDED__ 1 + +#include +#include + +#include "libindicate/listener.h" + +G_BEGIN_DECLS + +typedef void (*indicate_listener_get_property_icon_cb) (IndicateListener * listener, + IndicateListenerServer * server, + IndicateListenerIndicator * indicator, + gchar * property, + GdkPixbuf * propertydata, + gpointer data); + +void indicate_listener_get_property_icon (IndicateListener * listener, + IndicateListenerServer * server, + IndicateListenerIndicator * indicator, + gchar * property, + indicate_listener_get_property_icon_cb callback, + gpointer data); + +G_END_DECLS + +#endif /* INDICATE_GTK_LISTENER_H_INCLUDED__ */ + -- cgit v1.2.3 From f6fb98db58787383a890608f8bfae0664528e83d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 3 Aug 2009 23:45:34 +0100 Subject: Some ignore files for fun --- .bzrignore | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.bzrignore b/.bzrignore index 47d219c..58dcc7c 100644 --- a/.bzrignore +++ b/.bzrignore @@ -82,3 +82,11 @@ test-thousand-indicators-client libindicate_la-server-marshal.lo server-marshal.c server-marshal.h +libindicate-gtk.la +libindicate_gtk_la-indicator.lo +libindicate_gtk_la-indicator.o +libindicate_gtk_la-listener.lo +libindicate_gtk_la-listener.o +libindicate-gtk.pc +.deps +.libs -- cgit v1.2.3 From d94f22ad592b9f50898c26f06f7750ab4df686cf Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 3 Aug 2009 23:49:42 +0100 Subject: Fixing these guys to include the -gtk library where needed --- examples/Makefile.am | 14 ++++++++++---- examples/im-client.c | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/examples/Makefile.am b/examples/Makefile.am index 862046e..d6b74c6 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -33,22 +33,28 @@ listen_and_print_SOURCES = \ listen_and_print_CFLAGS = \ -I $(srcdir)/.. \ - $(LIBINDICATE_CFLAGS) + $(LIBINDICATE_CFLAGS) \ + $(LIBINDICATEGTK_CFLAGS) listen_and_print_LDADD = \ ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) + ../libindicate-gtk/libindicate-gtk.la \ + $(LIBINDICATE_LIBS) \ + $(LIBINDICATEGTK_LIBS) im_client_SOURCES = \ im-client.c im_client_CFLAGS = \ -I $(srcdir)/.. \ - $(LIBINDICATE_CFLAGS) + $(LIBINDICATE_CFLAGS) \ + $(LIBINDICATEGTK_CFLAGS) im_client_LDADD = \ ../libindicate/libindicate.la \ - $(LIBINDICATE_LIBS) + ../libindicate-gtk/libindicate-gtk.la \ + $(LIBINDICATE_LIBS) \ + $(LIBINDICATEGTK_LIBS) show_hide_server_SOURCES = \ show-hide-server.c diff --git a/examples/im-client.c b/examples/im-client.c index bf2fbb2..502484d 100644 --- a/examples/im-client.c +++ b/examples/im-client.c @@ -22,6 +22,7 @@ with this program. If not, see . #include #include "libindicate/server.h" #include "libindicate/indicator-message.h" +#include "libindicate-gtk/indicator.h" gchar * patha = "/usr/share/icons/hicolor/16x16/apps/empathy.png"; gchar * pathb = "/usr/share/icons/hicolor/22x22/apps/empathy.png"; -- cgit v1.2.3 From 8c7a1a7b1ea8fbb6b1455a615f4bbcc218308981 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 3 Aug 2009 23:52:48 +0100 Subject: Removing GTK dependencies from the libindicate stuff --- configure.ac | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index beed048..3e65f25 100644 --- a/configure.ac +++ b/configure.ac @@ -50,23 +50,21 @@ AM_GCONF_SOURCE_2 GLIB_REQUIRED_VERSION=2.18 GIO_REQUIRED_VERSION=2.18 -GDK_PIXBUF_REQUIRED_VERSION=2.12 XML_REQUIRED_VERSION=2.6 PKG_CHECK_MODULES(LIBINDICATE, glib-2.0 >= $GLIB_REQUIRED_VERSION gio-2.0 >= $GIO_REQUIRED_VERSION - gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED_VERSION dbus-glib-1 >= $DBUS_REQUIRED_VERSION libxml-2.0 >= $XML_REQUIRED_VERSION) AC_SUBST(LIBINDICATE_CFLAGS) AC_SUBST(LIBINDICATE_LIBS) +GDK_PIXBUF_REQUIRED_VERSION=2.12 + PKG_CHECK_MODULES(LIBINDICATEGTK, glib-2.0 >= $GLIB_REQUIRED_VERSION gio-2.0 >= $GIO_REQUIRED_VERSION gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED_VERSION - gtk+-2.0 >= $GTK_REQUIRED_VERSION - dbus-glib-1 >= $DBUS_REQUIRED_VERSION - libxml-2.0 >= $XML_REQUIRED_VERSION) + gtk+-2.0 >= $GTK_REQUIRED_VERSION) AC_SUBST(LIBINDICATEGTK_CFLAGS) AC_SUBST(LIBINDICATEGTK_LIBS) -- cgit v1.2.3 From 3ec1d88af94c277d43c210f15c0ccded5b67898c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 3 Aug 2009 23:53:17 +0100 Subject: Last libgtk-pixbuf header --- libindicate/listener.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/libindicate/listener.h b/libindicate/listener.h index f2ed4b1..37cda03 100644 --- a/libindicate/listener.h +++ b/libindicate/listener.h @@ -33,8 +33,6 @@ License version 3 and version 2.1 along with this program. If not, see #include #include -#include - #include "indicator.h" #include "server.h" #include "interests.h" -- cgit v1.2.3 From 34975226b63179098c77ad4cacd0609d417c1513 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 3 Aug 2009 23:53:40 +0100 Subject: Some odd change --- docs/reference/tmpl/libindicate-unused.sgml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/reference/tmpl/libindicate-unused.sgml b/docs/reference/tmpl/libindicate-unused.sgml index c3152b1..83a53a7 100644 --- a/docs/reference/tmpl/libindicate-unused.sgml +++ b/docs/reference/tmpl/libindicate-unused.sgml @@ -1,3 +1,12 @@ + + + + + +@indicator: +@key: +@data: + -- cgit v1.2.3 From 8850baa192b65b5b9b4985cab9a08aacb5fed9d1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 00:01:06 +0100 Subject: A bunch of distcheck fixes to clean things up --- configure.ac | 3 ++- examples/listen-and-print.c | 1 + libindicate-gtk/Makefile.am | 1 + src/Makefile.am | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3e65f25..914abb3 100644 --- a/configure.ac +++ b/configure.ac @@ -64,7 +64,8 @@ GDK_PIXBUF_REQUIRED_VERSION=2.12 PKG_CHECK_MODULES(LIBINDICATEGTK, glib-2.0 >= $GLIB_REQUIRED_VERSION gio-2.0 >= $GIO_REQUIRED_VERSION gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED_VERSION - gtk+-2.0 >= $GTK_REQUIRED_VERSION) + gtk+-2.0 >= $GTK_REQUIRED_VERSION + dbus-glib-1 >= $DBUS_REQUIRED_VERSION) AC_SUBST(LIBINDICATEGTK_CFLAGS) AC_SUBST(LIBINDICATEGTK_LIBS) diff --git a/examples/listen-and-print.c b/examples/listen-and-print.c index dcad92b..57cb7be 100644 --- a/examples/listen-and-print.c +++ b/examples/listen-and-print.c @@ -21,6 +21,7 @@ with this program. If not, see . #include #include "libindicate/listener.h" +#include "libindicate-gtk/listener.h" static void show_property_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * property, gchar * propertydata, gpointer data) diff --git a/libindicate-gtk/Makefile.am b/libindicate-gtk/Makefile.am index 6112b5f..d25cee3 100644 --- a/libindicate-gtk/Makefile.am +++ b/libindicate-gtk/Makefile.am @@ -28,6 +28,7 @@ libindicate_gtk_la_LDFLAGS = \ -export-symbols-regex "^[^_d].*" libindicate_gtk_la_CFLAGS = \ + -I $(srcdir)/.. \ $(LIBINDICATEGTK_CFLAGS) libindicate_gtk_la_LIBADD = \ diff --git a/src/Makefile.am b/src/Makefile.am index 02b70c1..97af739 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,6 +6,7 @@ indicator_applet_CFLAGS = \ -DG_LOG_DOMAIN=\""Indicator-Applet"\" \ -DDATADIR=\""$(datadir)"\" \ -DINDICATOR_DIR=\""$(libdir)/indicators/2"\" \ + -I$(srcdir)/.. \ $(APPLET_CFLAGS) indicator_applet_SOURCES = \ -- cgit v1.2.3 From b31efb271abb7d39e8480d1363b7443e7795efbb Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 00:06:00 +0100 Subject: Bumping the version as we removed a function. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 914abb3..17f6489 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ AC_CONFIG_MACRO_DIR([m4]) # Libindicate versioning ########################### -LIBINDICATE_CURRENT=1 +LIBINDICATE_CURRENT=2 LIBINDICATE_REVISION=0 LIBINDICATE_AGE=0 -- cgit v1.2.3 From c3034d9d1946cf136844eb8553f98f1262a73e10 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 00:08:51 +0100 Subject: Making seperate versioning for libindicate-gtk --- configure.ac | 12 ++++++++++++ libindicate-gtk/Makefile.am | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 17f6489..471512f 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,18 @@ AC_SUBST(LIBINDICATE_CURRENT) AC_SUBST(LIBINDICATE_REVISION) AC_SUBST(LIBINDICATE_AGE) +########################### +# Libindicate versioning +########################### + +LIBINDICATEGTK_CURRENT=0 +LIBINDICATEGTK_REVISION=0 +LIBINDICATEGTK_AGE=0 + +AC_SUBST(LIBINDICATEGTK_CURRENT) +AC_SUBST(LIBINDICATEGTK_REVISION) +AC_SUBST(LIBINDICATEGTK_AGE) + ########################### # Dependencies ########################### diff --git a/libindicate-gtk/Makefile.am b/libindicate-gtk/Makefile.am index d25cee3..7d3206d 100644 --- a/libindicate-gtk/Makefile.am +++ b/libindicate-gtk/Makefile.am @@ -23,7 +23,7 @@ libindicate_gtk_la_SOURCES = \ listener.c libindicate_gtk_la_LDFLAGS = \ - -version-info $(LIBINDICATE_CURRENT):$(LIBINDICATE_REVISION):$(LIBINDICATE_AGE) \ + -version-info $(LIBINDICATEGTK_CURRENT):$(LIBINDICATEGTK_REVISION):$(LIBINDICATEGTK_AGE) \ -no-undefined \ -export-symbols-regex "^[^_d].*" -- cgit v1.2.3 From 34baaeca3c1c1700c3ab90f55eeec4fa6fd2c4e5 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 00:10:35 +0100 Subject: Ignoring the right file --- .bzrignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bzrignore b/.bzrignore index 58dcc7c..4c8c4d0 100644 --- a/.bzrignore +++ b/.bzrignore @@ -87,6 +87,6 @@ libindicate_gtk_la-indicator.lo libindicate_gtk_la-indicator.o libindicate_gtk_la-listener.lo libindicate_gtk_la-listener.o -libindicate-gtk.pc +indicate-gtk.pc .deps .libs -- cgit v1.2.3 From 2b415942fbcb3a2f16dfb350c88faaf7dae0d45a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 00:14:37 +0100 Subject: Ignoring the tarball --- .bzrignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.bzrignore b/.bzrignore index 4c8c4d0..738387d 100644 --- a/.bzrignore +++ b/.bzrignore @@ -90,3 +90,4 @@ libindicate_gtk_la-listener.o indicate-gtk.pc .deps .libs +indicator-applet-*.tar.gz -- cgit v1.2.3 From 475cf3d1bc5ede2ba3e9388edf1b12345ebf5986 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 00:18:10 +0100 Subject: Removing some more noise --- .bzrignore | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.bzrignore b/.bzrignore index 738387d..d1781cd 100644 --- a/.bzrignore +++ b/.bzrignore @@ -91,3 +91,11 @@ indicate-gtk.pc .deps .libs indicator-applet-*.tar.gz +docs/reference/tmpl/indicator-message.sgml +docs/reference/tmpl/indicator-message.sgml.bak +docs/reference/tmpl/indicator.sgml.bak +docs/reference/tmpl/libindicate-unused.sgml.bak +docs/reference/tmpl/listener.sgml +docs/reference/tmpl/listener.sgml.bak +docs/reference/tmpl/server.sgml +docs/reference/tmpl/server.sgml.bak -- cgit v1.2.3 From 84f000268db92a3070b223c956f07dac729c4703 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 00:27:09 +0100 Subject: * debian/control: * Changing the version number of libindcate to 2 to match the .so numbering. * Creating packages for libindicate-gtk --- debian/changelog | 8 ++++++-- debian/control | 27 ++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index c05a0c0..a33afbf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,12 @@ -indicator-applet (0.2.0~bzr309-0ubuntu4~ppa1) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr309-0ubuntu4~ppa2) UNRELEASED; urgency=low * Merging in upstream code to split out libindicate-gtk + * debian/control: + * Changing the version number of libindcate to 2 to match + the .so numbering. + * Creating packages for libindicate-gtk - -- Ted Gould Tue, 04 Aug 2009 00:22:33 +0100 + -- Ted Gould Tue, 04 Aug 2009 00:26:22 +0100 indicator-applet (0.2.0~bzr309-0ubuntu3) karmic; urgency=low diff --git a/debian/control b/debian/control index 47b903a..f755f70 100644 --- a/debian/control +++ b/debian/control @@ -29,7 +29,7 @@ Description: GNOME panel indicator applet Currently this includes support for messaging applications in the indicator-messages package. -Package: libindicate1 +Package: libindicate2 Section: libs Conflicts: libindicate Replaces: libindicate @@ -48,6 +48,31 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libindicate1 (= ${binary:Version}), + libdbus-glib-1-dev (>= 0.76) +Description: GNOME panel indicator applet - shared library + indicator-applet is an applet to display information from + various applications consistently in the GNOME panel. + . + This package contains files that are needed to build applications. + +Package: libindicate-gtk0 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends} +Description: GNOME panel indicator applet - shared library + indicator-applet is an applet to display information from + various applications consistently in the GNOME panel. + . + This package contains shared libraries to be used by applications. + +Package: libindicate-gtk-dev +Section: libdevel +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libindicate-gtk (= ${binary:Version}), + libindicate-dev, libdbus-glib-1-dev (>= 0.76), libgtk2.0-dev (>= 2.12.0) Description: GNOME panel indicator applet - shared library -- cgit v1.2.3 From 8bed775cad9602ebdc02384ecb20d72207c3bf51 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 00:32:09 +0100 Subject: * Added libindicate-gtk-dev.install and libindicate-gtk0.install for the new library. * Renamed libindicate1.install to libindicate2.install to match the package name change. * Modified libindicate-dev to be more specific about the header files that it grabs. --- debian/changelog | 12 +++++++++--- debian/libindicate-dev.install | 2 +- debian/libindicate-gtk-dev.install | 4 ++++ debian/libindicate-gtk0.install | 1 + debian/libindicate1.install | 1 - debian/libindicate2.install | 1 + 6 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 debian/libindicate-gtk-dev.install create mode 100644 debian/libindicate-gtk0.install delete mode 100644 debian/libindicate1.install create mode 100644 debian/libindicate2.install diff --git a/debian/changelog b/debian/changelog index a33afbf..361e01a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,12 +1,18 @@ -indicator-applet (0.2.0~bzr309-0ubuntu4~ppa2) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr309-0ubuntu4~ppa3) UNRELEASED; urgency=low * Merging in upstream code to split out libindicate-gtk * debian/control: * Changing the version number of libindcate to 2 to match the .so numbering. * Creating packages for libindicate-gtk - - -- Ted Gould Tue, 04 Aug 2009 00:26:22 +0100 + * Added libindicate-gtk-dev.install and libindicate-gtk0.install + for the new library. + * Renamed libindicate1.install to libindicate2.install to match + the package name change. + * Modified libindicate-dev to be more specific about the header + files that it grabs. + + -- Ted Gould Tue, 04 Aug 2009 00:30:55 +0100 indicator-applet (0.2.0~bzr309-0ubuntu3) karmic; urgency=low diff --git a/debian/libindicate-dev.install b/debian/libindicate-dev.install index ba86036..81e1396 100644 --- a/debian/libindicate-dev.install +++ b/debian/libindicate-dev.install @@ -1,4 +1,4 @@ -debian/tmp/usr/include/libindicate* +debian/tmp/usr/include/libindicate-0.1/libindicate/* debian/tmp/usr/lib/pkgconfig/indicate.pc debian/tmp/usr/lib/libindicate.a debian/tmp/usr/lib/libindicate.so diff --git a/debian/libindicate-gtk-dev.install b/debian/libindicate-gtk-dev.install new file mode 100644 index 0000000..5f0e682 --- /dev/null +++ b/debian/libindicate-gtk-dev.install @@ -0,0 +1,4 @@ +debian/tmp/usr/include/libindicate-0.1/libindicate-gtk/* +debian/tmp/usr/lib/pkgconfig/indicate-gtk.pc +debian/tmp/usr/lib/libindicate-gtk.a +debian/tmp/usr/lib/libindicate-gtk.so diff --git a/debian/libindicate-gtk0.install b/debian/libindicate-gtk0.install new file mode 100644 index 0000000..fc6b412 --- /dev/null +++ b/debian/libindicate-gtk0.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/libindicate-gtk.so.* diff --git a/debian/libindicate1.install b/debian/libindicate1.install deleted file mode 100644 index 0618a58..0000000 --- a/debian/libindicate1.install +++ /dev/null @@ -1 +0,0 @@ -debian/tmp/usr/lib/libindicate.so.* diff --git a/debian/libindicate2.install b/debian/libindicate2.install new file mode 100644 index 0000000..0618a58 --- /dev/null +++ b/debian/libindicate2.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/libindicate.so.* -- cgit v1.2.3 From 16b15aa99180939000a112038b028600d12673f5 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 01:26:10 +0100 Subject: Adding libindicate a build include --- libindicate-gtk/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/libindicate-gtk/Makefile.am b/libindicate-gtk/Makefile.am index 7d3206d..2085b47 100644 --- a/libindicate-gtk/Makefile.am +++ b/libindicate-gtk/Makefile.am @@ -32,6 +32,7 @@ libindicate_gtk_la_CFLAGS = \ $(LIBINDICATEGTK_CFLAGS) libindicate_gtk_la_LIBADD = \ + ../libindicate/libindicate.la \ $(LIBINDICATEGTK_LIBS) pkgconfig_DATA = indicate-gtk.pc -- cgit v1.2.3 From be06bcb9e5e08a03f8455b3ff8b4db04570ed2a0 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 01:31:34 +0100 Subject: releasing version 0.2.0~bzr309-0ubuntu4~ppa1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 361e01a..8e40a75 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -indicator-applet (0.2.0~bzr309-0ubuntu4~ppa3) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr309-0ubuntu4~ppa1) karmic; urgency=low * Merging in upstream code to split out libindicate-gtk * debian/control: @@ -12,7 +12,7 @@ indicator-applet (0.2.0~bzr309-0ubuntu4~ppa3) UNRELEASED; urgency=low * Modified libindicate-dev to be more specific about the header files that it grabs. - -- Ted Gould Tue, 04 Aug 2009 00:30:55 +0100 + -- Ted Gould Tue, 04 Aug 2009 01:31:20 +0100 indicator-applet (0.2.0~bzr309-0ubuntu3) karmic; urgency=low -- cgit v1.2.3 From 54b4e00a4cfb33377a4fcbfa550c2fe9f098697f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 01:36:30 +0100 Subject: debian/control: Fixing some libindicate1's that should be libindicate2 and making everything dependent on the versions that are built here in the package. --- debian/changelog | 8 ++++++++ debian/control | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8e40a75..32fb168 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +indicator-applet (0.2.0~bzr309-0ubuntu4~ppa2) UNRELEASED; urgency=low + + * debian/control: Fixing some libindicate1's that should be + libindicate2 and making everything dependent on the versions + that are built here in the package. + + -- Ted Gould Tue, 04 Aug 2009 01:35:47 +0100 + indicator-applet (0.2.0~bzr309-0ubuntu4~ppa1) karmic; urgency=low * Merging in upstream code to split out libindicate-gtk diff --git a/debian/control b/debian/control index f755f70..92c60a7 100644 --- a/debian/control +++ b/debian/control @@ -47,7 +47,7 @@ Section: libdevel Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, - libindicate1 (= ${binary:Version}), + libindicate2 (= ${binary:Version}), libdbus-glib-1-dev (>= 0.76) Description: GNOME panel indicator applet - shared library indicator-applet is an applet to display information from @@ -72,7 +72,7 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libindicate-gtk (= ${binary:Version}), - libindicate-dev, + libindicate-dev (= ${binary:Version}), libdbus-glib-1-dev (>= 0.76), libgtk2.0-dev (>= 2.12.0) Description: GNOME panel indicator applet - shared library @@ -98,7 +98,8 @@ Section: doc Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, - libindicate1 (= ${binary:Version}), + libindicate2 (= ${binary:Version}), + libindicate-gtk0 (= ${binary:Version}), libdbus-glib-1-dev (>= 0.76), libgtk2.0-dev (>= 2.12.0) Description: GNOME panel indicator applet - shared library -- cgit v1.2.3 From 63ed0ba9f0de5d60f31e5c52849cb6fb7a070cd9 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 01:38:29 +0100 Subject: releasing version 0.2.0~bzr309-0ubuntu4~ppa2 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 32fb168..c1b04d2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -indicator-applet (0.2.0~bzr309-0ubuntu4~ppa2) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr309-0ubuntu4~ppa2) karmic; urgency=low * debian/control: Fixing some libindicate1's that should be libindicate2 and making everything dependent on the versions that are built here in the package. - -- Ted Gould Tue, 04 Aug 2009 01:35:47 +0100 + -- Ted Gould Tue, 04 Aug 2009 01:38:26 +0100 indicator-applet (0.2.0~bzr309-0ubuntu4~ppa1) karmic; urgency=low -- cgit v1.2.3 From 541c9b2a0654978a99f4bad34d68860b7137149a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 10:27:44 +0100 Subject: releasing version 0.2.0~bzr319-0ubuntu1~ppa1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index bb68def..45af68f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -indicator-applet (0.2.0~bzr319-0ubuntu1~ppa1) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr319-0ubuntu1~ppa1) karmic; urgency=low * Merging in upstream code to split out libindicate-gtk * debian/control: @@ -12,7 +12,7 @@ indicator-applet (0.2.0~bzr319-0ubuntu1~ppa1) UNRELEASED; urgency=low * Modified libindicate-dev to be more specific about the header files that it grabs. - -- Ted Gould Tue, 04 Aug 2009 10:26:02 +0100 + -- Ted Gould Tue, 04 Aug 2009 10:27:31 +0100 indicator-applet (0.2.0~bzr309-0ubuntu3) karmic; urgency=low -- cgit v1.2.3 From 64034ddad824b488b2af230eb975339c1bb2b107 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 10:51:33 +0100 Subject: Forgot to autogen.sh --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 45af68f..1d2982b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +indicator-applet (0.2.0~bzr319-0ubuntu1~ppa2) UNRELEASED; urgency=low + + * Forgot to autogen.sh + + -- Ted Gould Tue, 04 Aug 2009 10:51:09 +0100 + indicator-applet (0.2.0~bzr319-0ubuntu1~ppa1) karmic; urgency=low * Merging in upstream code to split out libindicate-gtk -- cgit v1.2.3 From 96ace70f64b79b9e9bba1b2027ef40cf0b235381 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 10:52:00 +0100 Subject: releasing version 0.2.0~bzr319-0ubuntu1~ppa2 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1d2982b..8a58fb5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -indicator-applet (0.2.0~bzr319-0ubuntu1~ppa2) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr319-0ubuntu1~ppa2) karmic; urgency=low * Forgot to autogen.sh - -- Ted Gould Tue, 04 Aug 2009 10:51:09 +0100 + -- Ted Gould Tue, 04 Aug 2009 10:51:47 +0100 indicator-applet (0.2.0~bzr319-0ubuntu1~ppa1) karmic; urgency=low -- cgit v1.2.3 From 41c535b370fe6eb2429cbcdcb4d4ecb83833037c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 10:53:46 +0100 Subject: debian/control: Fixing the library reference of libindicate-gtk-dev --- debian/changelog | 7 +++++++ debian/control | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 8a58fb5..095e35d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +indicator-applet (0.2.0~bzr319-0ubuntu1~ppa3) UNRELEASED; urgency=low + + * debian/control: Fixing the library reference of + libindicate-gtk-dev + + -- Ted Gould Tue, 04 Aug 2009 10:53:19 +0100 + indicator-applet (0.2.0~bzr319-0ubuntu1~ppa2) karmic; urgency=low * Forgot to autogen.sh diff --git a/debian/control b/debian/control index 92c60a7..23e0158 100644 --- a/debian/control +++ b/debian/control @@ -71,7 +71,7 @@ Section: libdevel Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, - libindicate-gtk (= ${binary:Version}), + libindicate-gtk0 (= ${binary:Version}), libindicate-dev (= ${binary:Version}), libdbus-glib-1-dev (>= 0.76), libgtk2.0-dev (>= 2.12.0) -- cgit v1.2.3 From 72093e20ec97eded81ffc84c3cb45fcf9e14acff Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 10:53:52 +0100 Subject: releasing version 0.2.0~bzr319-0ubuntu1~ppa3 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 095e35d..c728881 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -indicator-applet (0.2.0~bzr319-0ubuntu1~ppa3) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr319-0ubuntu1~ppa3) karmic; urgency=low * debian/control: Fixing the library reference of libindicate-gtk-dev - -- Ted Gould Tue, 04 Aug 2009 10:53:19 +0100 + -- Ted Gould Tue, 04 Aug 2009 10:53:48 +0100 indicator-applet (0.2.0~bzr319-0ubuntu1~ppa2) karmic; urgency=low -- cgit v1.2.3 From e4ac1dcf9a7372aa506d0acc773ae6b772ce976c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 12:25:24 +0100 Subject: Update the pc file from the GTK split out. --- libindicate/indicate.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libindicate/indicate.pc.in b/libindicate/indicate.pc.in index cdc79b6..ff17ecb 100644 --- a/libindicate/indicate.pc.in +++ b/libindicate/indicate.pc.in @@ -5,7 +5,7 @@ bindir=@bindir@ includedir=@includedir@ Cflags: -I${includedir}/libindicate-0.1 -Requires: gtk+-2.0 dbus-glib-1 +Requires: gobject-2.0 glib-2.0 dbus-glib-1 Libs: -L${libdir} -lindicate Name: libindicate -- cgit v1.2.3 From 42ba02f7916c1f77f7fb33c4c8cd7c64729312e5 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 4 Aug 2009 12:30:59 +0100 Subject: releasing version 0.2.0~bzr319-0ubuntu1~ppa4 --- debian/changelog | 4 +- docs/reference/tmpl/libindicate-unused.sgml | 632 ++++++++++++++++++++++++++++ 2 files changed, 634 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2fe3a33..d49dfa2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -indicator-applet (0.2.0~bzr319-0ubuntu1~ppa4) UNRELEASED; urgency=low +indicator-applet (0.2.0~bzr319-0ubuntu1~ppa4) karmic; urgency=low * Upstream fix to PC file. - -- Ted Gould Tue, 04 Aug 2009 12:25:47 +0100 + -- Ted Gould Tue, 04 Aug 2009 12:29:39 +0100 indicator-applet (0.2.0~bzr319-0ubuntu1~ppa3) karmic; urgency=low diff --git a/docs/reference/tmpl/libindicate-unused.sgml b/docs/reference/tmpl/libindicate-unused.sgml index 83a53a7..8f457e2 100644 --- a/docs/reference/tmpl/libindicate-unused.sgml +++ b/docs/reference/tmpl/libindicate-unused.sgml @@ -1,3 +1,383 @@ + + + + + +@object: + + + + + + +@klass: + + + + + + +@object: + + + + + + +@obj: + + + + + + +@klass: + + + + + + +@obj: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@object: + + + + + + +@klass: + + + + + + +@obj: + + + + + + +@klass: + + + + + + +@object: + + + + + + +@klass: + + + + + + +@object: + + + + + + +@klass: + + + + + + +@object: + + + + + + +@klass: + + + + + + +@object: + + + + + + +@indicator: + + + + + + +@server: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@object: + + + + + + +@klass: + + + + + + +@object: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@Param1: +@Returns: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@v: + + + + + + +@Returns: + + + + + + +@Returns: + @@ -7,6 +387,20 @@ @key: @data: + + + + + +@Returns: + + + + + + +@Returns: + @@ -21,3 +415,241 @@ @obj: + + + + + +@proxy: +@OUT_indicator_count: +@Returns: + + + + + + +@proxy: +@callback: +@Returns: + + + + + + +@proxy: +@IN_type: +@OUT_indicator_count: +@Returns: + + + + + + +@proxy: +@IN_type: +@callback: +@Returns: + + + + + + +@proxy: +@OUT_indicator_count: +@error: +@userdata: + + + + + + +@proxy: +@OUT_indicator_count: +@error: +@userdata: + + + + + + +@proxy: +@OUT_indicators: +@Returns: + + + + + + +@proxy: +@callback: +@Returns: + + + + + + +@proxy: +@IN_type: +@OUT_indicators: +@Returns: + + + + + + +@proxy: +@IN_type: +@callback: +@Returns: + + + + + + +@proxy: +@OUT_indicators: +@error: +@userdata: + + + + + + +@proxy: +@OUT_indicators: +@error: +@userdata: + + + + + + +@proxy: +@IN_id: +@OUT_properties: +@Returns: + + + + + + +@proxy: +@IN_id: +@callback: +@Returns: + + + + + + +@proxy: +@OUT_properties: +@error: +@userdata: + + + + + + +@proxy: +@IN_id: +@IN_property: +@OUT_value: +@Returns: + + + + + + +@proxy: +@IN_id: +@IN_property: +@callback: +@Returns: + + + + + + +@proxy: +@IN_id: +@IN_properties: +@OUT_values: +@Returns: + + + + + + +@proxy: +@IN_id: +@IN_properties: +@callback: +@Returns: + + + + + + +@proxy: +@OUT_values: +@error: +@userdata: + + + + + + +@proxy: +@OUT_value: +@error: +@userdata: + + + + + + +@proxy: +@IN_id: +@Returns: + + + + + + +@proxy: +@IN_id: +@callback: +@Returns: + + + + + + +@proxy: +@error: +@userdata: + -- cgit v1.2.3