From 4098f740513bcf736fc75f86d7245f49499c90dc Mon Sep 17 00:00:00 2001 From: Michael Terry Date: Thu, 13 Jan 2011 16:04:53 -0600 Subject: fix basename issue when make is given full path --- libindicator/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libindicator/Makefile.am b/libindicator/Makefile.am index 5c70345..47a902a 100644 --- a/libindicator/Makefile.am +++ b/libindicator/Makefile.am @@ -104,11 +104,11 @@ DBUS_SPECS = \ gen-%.xml.h: %.xml @echo "Building $@ from $<" - @echo "extern const char * _$(subst -,_,$(subst .,_,$(basename $<)));" > $@ + @echo "extern const char * _$(subst -,_,$(subst .,_,$(basename $(notdir $<))));" > $@ gen-%.xml.c: %.xml @echo "Building $@ from $<" - @echo "const char * _$(subst -,_,$(subst .,_,$(basename $<))) = " > $@ + echo "const char * _$(subst -,_,$(subst .,_,$(basename $(notdir $<)))) = " > $@ @sed -e "s:\":\\\\\":g" -e s:^:\": -e s:\$$:\\\\n\": $< >> $@ @echo ";" >> $@ -- cgit v1.2.3 From 084d3e8ce7252629d9714179246ebb1b4b9af0ad Mon Sep 17 00:00:00 2001 From: Michael Terry Date: Thu, 13 Jan 2011 16:05:26 -0600 Subject: use actual DBus NameOwnerChanged interface rather than GDBus's higher level signal because that one only works for well-known names --- libindicator/indicator-service-manager.c | 43 +++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/libindicator/indicator-service-manager.c b/libindicator/indicator-service-manager.c index 34b6baa..f3a29d0 100644 --- a/libindicator/indicator-service-manager.c +++ b/libindicator/indicator-service-manager.c @@ -46,6 +46,7 @@ struct _IndicatorServiceManagerPrivate { gchar * name; GDBusProxy * service_proxy; GCancellable * service_proxy_cancel; + guint name_watcher; gboolean connected; guint this_service_version; guint restart_count; @@ -102,7 +103,7 @@ static void start_service (IndicatorServiceManager * service); static void start_service_again (IndicatorServiceManager * manager); static void unwatch (GDBusProxy * proxy); static void service_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data); -static void service_proxy_name_change (GObject * object, GParamSpec * pspec, gpointer user_data); +static void service_proxy_name_changed (GDBusConnection * connection, const gchar * sender_name, const gchar * object_path, const gchar * interface_name, const gchar * signal_name, GVariant * parameters, gpointer user_data); G_DEFINE_TYPE (IndicatorServiceManager, indicator_service_manager, G_TYPE_OBJECT); @@ -186,6 +187,7 @@ indicator_service_manager_init (IndicatorServiceManager *self) priv->name = NULL; priv->service_proxy = NULL; priv->service_proxy_cancel = NULL; + priv->name_watcher = 0; priv->connected = FALSE; priv->this_service_version = 0; priv->restart_count = 0; @@ -218,6 +220,12 @@ indicator_service_manager_dispose (GObject *object) g_signal_emit(object, signals[CONNECTION_CHANGE], 0, FALSE, TRUE); } + if (priv->name_watcher != 0) { + g_dbus_connection_signal_unsubscribe(g_dbus_proxy_get_connection(priv->service_proxy), + priv->name_watcher); + priv->name_watcher = 0; + } + /* If we're still getting the proxy, stop looking so we can then clean up some more. */ if (priv->service_proxy_cancel != NULL) { @@ -442,7 +450,7 @@ start_service (IndicatorServiceManager * service) return; } -/* Callback from trying to create the proxy for the serivce, this +/* Callback from trying to create the proxy for the service, this could include starting the service. Sometime it'll fail and we'll try to start that dang service again! */ static void @@ -486,7 +494,17 @@ service_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data) priv->service_proxy = proxy; /* Signal for drop */ - g_signal_connect(G_OBJECT(priv->service_proxy), "notify::g-name-owner", G_CALLBACK(service_proxy_name_change), user_data); + priv->name_watcher = g_dbus_connection_signal_subscribe( + g_dbus_proxy_get_connection(proxy), + "org.freedesktop.DBus", + "org.freedesktop.DBus", + "NameOwnerChanged", + "/org/freedesktop/DBus", + g_dbus_proxy_get_name(proxy), + G_DBUS_SIGNAL_FLAGS_NONE, + service_proxy_name_changed, + user_data, + NULL); /* Build cancelable if we need it */ if (priv->watch_cancel == NULL) { @@ -510,12 +528,18 @@ service_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data) usually means the service died. We're dropping the proxy and recreating it so that it'll restart the service. */ static void -service_proxy_name_change (GObject * object, GParamSpec * pspec, gpointer user_data) +service_proxy_name_changed (GDBusConnection * connection, const gchar * sender_name, + const gchar * object_path, const gchar * interface_name, + const gchar * signal_name, GVariant * parameters, + gpointer user_data) + { IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(user_data); - gchar * name = g_dbus_proxy_get_name_owner(priv->service_proxy); - if (name == NULL) { + const gchar * new_name; + g_variant_get(parameters, "(&s&s&s)", NULL, NULL, &new_name); + + if (new_name == NULL || new_name[0] == 0) { if (priv->connected) { priv->connected = FALSE; g_signal_emit(G_OBJECT(user_data), signals[CONNECTION_CHANGE], 0, FALSE, TRUE); @@ -523,9 +547,10 @@ service_proxy_name_change (GObject * object, GParamSpec * pspec, gpointer user_d start_service_again(INDICATOR_SERVICE_MANAGER(user_data)); } else { - /* This case is an oddity, and really can only be a weird race - condition. So we're going to ignore it for now. */ - g_free(name); + if (!priv->connected) { + priv->connected = TRUE; + g_signal_emit(G_OBJECT(user_data), signals[CONNECTION_CHANGE], 0, TRUE, TRUE); + } } return; -- cgit v1.2.3 From ab0f0abc3571f801ffff8c42ad87d1e53d6a8ccf Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 14 Jan 2011 10:55:39 -0600 Subject: 0.3.17 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index d78af70..6396bd3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,10 @@ -AC_INIT(libindicator, 0.3.16, ted@canonical.com) +AC_INIT(libindicator, 0.3.17, ted@canonical.com) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libindicator, 0.3.16) +AM_INIT_AUTOMAKE(libindicator, 0.3.17) AM_MAINTAINER_MODE m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES]) -- cgit v1.2.3 From 7f4196b9052c27bda6ab407ad894b49ee52594ba Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 14 Jan 2011 11:09:38 -0600 Subject: releasing version 0.3.17-0ubuntu1~ppa1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 461d173..b6d6421 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -libindicator (0.3.17-0ubuntu1~ppa1) UNRELEASED; urgency=low +libindicator (0.3.17-0ubuntu1~ppa1) natty; urgency=low * New upstream release. * Fixing catching services dropping off - -- Ted Gould Fri, 14 Jan 2011 11:03:58 -0600 + -- Ted Gould Fri, 14 Jan 2011 11:09:36 -0600 libindicator (0.3.16-0ubuntu1) natty; urgency=low -- cgit v1.2.3 From 5873fe77cd5961991c4f1d86001cf41f3414a2d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 27 Jan 2011 00:12:42 +0100 Subject: Added support for "signal-entry" signal libindicator support the new "scroll-entry" signal (which get called using the target entry as parameter too) I think that maybe we could simply rewrite the "scroll" signal, but I kept it there for compatibility reasons; however, actually just the indicator-sound should be fixed in case of switch... --- libindicator/indicator-object-marshal.list | 3 ++- libindicator/indicator-object.c | 25 +++++++++++++++++++++++-- libindicator/indicator-object.h | 6 ++++-- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/libindicator/indicator-object-marshal.list b/libindicator/indicator-object-marshal.list index 4ea1e8b..73f1fac 100644 --- a/libindicator/indicator-object-marshal.list +++ b/libindicator/indicator-object-marshal.list @@ -1,4 +1,5 @@ VOID: POINTER, UINT, UINT -VOID: UINT,ENUM +VOID: UINT, ENUM +VOID: POINTER, UINT, ENUM VOID: POINTER, UINT VOID: POINTER, BOOLEAN diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c index 988a8ae..95ab08a 100644 --- a/libindicator/indicator-object.c +++ b/libindicator/indicator-object.c @@ -58,6 +58,7 @@ enum { ENTRY_REMOVED, ENTRY_MOVED, SCROLL, + SCROLL_ENTRY, MENU_SHOW, SHOW_NOW_CHANGED, LAST_SIGNAL @@ -146,7 +147,6 @@ indicator_object_class_init (IndicatorObjectClass *klass) _indicator_object_marshal_VOID__POINTER_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_NONE); - /** IndicatorObject::scroll: @arg0: The #IndicatorObject object @@ -162,7 +162,28 @@ indicator_object_class_init (IndicatorObjectClass *klass) G_STRUCT_OFFSET (IndicatorObjectClass, scroll), NULL, NULL, _indicator_object_marshal_VOID__UINT_ENUM, - G_TYPE_NONE, 2, G_TYPE_UINT, INDICATOR_OBJECT_TYPE_SCROLL_DIRECTION); + G_TYPE_NONE, 2, G_TYPE_UINT, + INDICATOR_OBJECT_TYPE_SCROLL_DIRECTION); + +/** + IndicatorObject::scroll-entry: + @arg0: The #IndicatorObject object + @arg1: A pointer to the #IndicatorObjectEntry that + receives the scroll event. + @arg2: The delta of the scroll event + @arg3: The orientation of the scroll event. + + When the indicator receives a mouse scroll wheel event + from the user, this signal is emitted. + */ + signals[SCROLL_ENTRY] = g_signal_new (INDICATOR_OBJECT_SIGNAL_SCROLL_ENTRY, + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IndicatorObjectClass, scroll_entry), + NULL, NULL, + _indicator_object_marshal_VOID__POINTER_UINT_ENUM, + G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_UINT, + INDICATOR_OBJECT_TYPE_SCROLL_DIRECTION); /** IndicatorObject::menu-show: diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h index 9ad1366..f1669ab 100644 --- a/libindicator/indicator-object.h +++ b/libindicator/indicator-object.h @@ -43,7 +43,7 @@ typedef enum #define INDICATOR_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_OBJECT_TYPE)) #define INDICATOR_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_OBJECT_TYPE, IndicatorObjectClass)) -#define INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED "entry-added" +#define INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED SCROLL "entry-added" #define INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED, INDICATOR_OBJECT_TYPE)) #define INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED "entry-removed" #define INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED, INDICATOR_OBJECT_TYPE)) @@ -51,6 +51,8 @@ typedef enum #define INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED, INDICATOR_OBJECT_TYPE)) #define INDICATOR_OBJECT_SIGNAL_SCROLL "scroll" #define INDICATOR_OBJECT_SIGNAL_SCROLL_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_SCROLL, INDICATOR_OBJECT_TYPE)) +#define INDICATOR_OBJECT_SIGNAL_SCROLL_ENTRY "scroll-entry" +#define INDICATOR_OBJECT_SIGNAL_SCROLL_ENTRY_ID (g_signal_lookup(#define INDICATOR_OBJECT_SIGNAL_SCROLL_ENTRY, INDICATOR_OBJECT_TYPE)) #define INDICATOR_OBJECT_SIGNAL_MENU_SHOW "menu-show" #define INDICATOR_OBJECT_SIGNAL_MENU_SHOW_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_MENU_SHOW, INDICATOR_OBJECT_TYPE)) #define INDICATOR_OBJECT_SIGNAL_SHOW_NOW_CHANGED "show-now-changed" @@ -114,6 +116,7 @@ struct _IndicatorObjectClass { void (*scroll) (IndicatorObject * io, gint delta, IndicatorScrollDirection direction); void (*menu_show) (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp, gpointer user_data); void (*show_now_changed) (IndicatorObject * io, IndicatorObjectEntry * entry, gboolean show_now_state, gpointer user_data); + void (*scroll_entry) (IndicatorObject * io, IndicatorObjectEntry * entry, gint delta, IndicatorScrollDirection direction); /* Reserved */ void (*reserved1) (void); @@ -121,7 +124,6 @@ struct _IndicatorObjectClass { void (*reserved3) (void); void (*reserved4) (void); void (*reserved5) (void); - void (*reserved6) (void); }; /** -- cgit v1.2.3 From d903523d9f89042b865a3aa6f0dd523d404848f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 27 Jan 2011 12:24:00 +0100 Subject: Removed typo in code. Pasted a more SCROLL value :P --- libindicator/indicator-object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h index f1669ab..4b3ce0b 100644 --- a/libindicator/indicator-object.h +++ b/libindicator/indicator-object.h @@ -43,7 +43,7 @@ typedef enum #define INDICATOR_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_OBJECT_TYPE)) #define INDICATOR_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_OBJECT_TYPE, IndicatorObjectClass)) -#define INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED SCROLL "entry-added" +#define INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED "entry-added" #define INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED, INDICATOR_OBJECT_TYPE)) #define INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED "entry-removed" #define INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED, INDICATOR_OBJECT_TYPE)) -- cgit v1.2.3 From 9ac551998017804c2e9024d22d809e22a63987ce Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 27 Jan 2011 15:14:17 -0600 Subject: 0.3.18 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 6396bd3..839cff1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,10 @@ -AC_INIT(libindicator, 0.3.17, ted@canonical.com) +AC_INIT(libindicator, 0.3.18, ted@canonical.com) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libindicator, 0.3.17) +AM_INIT_AUTOMAKE(libindicator, 0.3.18) AM_MAINTAINER_MODE m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES]) -- cgit v1.2.3 From 4a4ca1e84dab55c11301277ebc820dc3f9f7c9de Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 27 Jan 2011 15:29:13 -0600 Subject: debian/rules: Updating shlibs --- debian/changelog | 3 ++- debian/rules | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index c10fc4e..a4dc996 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ libindicator (0.3.18-0ubuntu1~ppa1) UNRELEASED; urgency=low * New upstream release. * Adding a signal for scrolling that includes the entry + * debian/rules: Updating shlibs - -- Ted Gould Thu, 27 Jan 2011 15:28:23 -0600 + -- Ted Gould Thu, 27 Jan 2011 15:29:02 -0600 libindicator (0.3.17-0ubuntu1~ppa1) natty; urgency=low diff --git a/debian/rules b/debian/rules index e4f4f04..de71b0a 100755 --- a/debian/rules +++ b/debian/rules @@ -9,8 +9,8 @@ DEB_BUILDDIR = $(DEB_SRCDIR)/build LDFLAGS += -Wl,-z,defs -Wl,--as-needed -DEB_DH_MAKESHLIBS_ARGS_libindicator1 += -V 'libindicator1 (>= 0.3.15)' -DEB_DH_MAKESHLIBS_ARGS_libindicator3 += -V 'libindicator3-1 (>= 0.3.15)' +DEB_DH_MAKESHLIBS_ARGS_libindicator1 += -V 'libindicator1 (>= 0.3.18)' +DEB_DH_MAKESHLIBS_ARGS_libindicator3 += -V 'libindicator3-1 (>= 0.3.18)' configure/libindicator3-1:: stamp-configure-gtk3 stamp-configure-gtk3: -- cgit v1.2.3 From 1246174af6fb0750bf72455fd3d10f30425562d5 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 27 Jan 2011 15:31:07 -0600 Subject: releasing version 0.3.18-0ubuntu1~ppa1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index a4dc996..fbc5f7a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -libindicator (0.3.18-0ubuntu1~ppa1) UNRELEASED; urgency=low +libindicator (0.3.18-0ubuntu1~ppa1) natty; urgency=low * New upstream release. * Adding a signal for scrolling that includes the entry * debian/rules: Updating shlibs - -- Ted Gould Thu, 27 Jan 2011 15:29:02 -0600 + -- Ted Gould Thu, 27 Jan 2011 15:31:04 -0600 libindicator (0.3.17-0ubuntu1~ppa1) natty; urgency=low -- cgit v1.2.3