aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-01-15 22:17:57 -0600
committerTed Gould <ted@gould.cx>2010-01-15 22:17:57 -0600
commit08192cc3e94593829bbf7dbc718d934bf0f158bc (patch)
tree8883ee31990e84777bc7ec4528efac08bfeb89e0
parentf8d47e919d46d5daccb76958bb27064cea0f337c (diff)
parent62d8c1c86b21ab250342900324565f1b95ac2da8 (diff)
downloadlibayatana-indicator-08192cc3e94593829bbf7dbc718d934bf0f158bc.tar.gz
libayatana-indicator-08192cc3e94593829bbf7dbc718d934bf0f158bc.tar.bz2
libayatana-indicator-08192cc3e94593829bbf7dbc718d934bf0f158bc.zip
* Upstream Merge
* Emitting the connection changed signal better.
-rw-r--r--debian/changelog7
-rw-r--r--libindicator/indicator-service-manager.c10
2 files changed, 15 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 1a58ef8..132367f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libindicator (0.3.0-0ubuntu2~ppa1~restart2) UNRELEASED; urgency=low
+
+ * Upstream Merge
+ * Emitting the connection changed signal better.
+
+ -- Ted Gould <ted@ubuntu.com> Fri, 15 Jan 2010 22:17:01 -0600
+
libindicator (0.3.0-0ubuntu2~ppa1~restart1) karmic; urgency=low
* Upstream Merge
diff --git a/libindicator/indicator-service-manager.c b/libindicator/indicator-service-manager.c
index 42160ee..9d56a9f 100644
--- a/libindicator/indicator-service-manager.c
+++ b/libindicator/indicator-service-manager.c
@@ -455,18 +455,24 @@ start_service_again_cb (gpointer data)
static void
start_service_again (IndicatorServiceManager * manager)
{
+ IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(manager);
+
/* Allow the restarting to be disabled */
if (g_getenv(TIMEOUT_ENV_NAME)) {
+ priv->connected = FALSE;
+ g_signal_emit(manager, signals[CONNECTION_CHANGE], 0, FALSE, TRUE);
return;
}
- IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(manager);
-
if (priv->restart_count == 0) {
/* First time, do it in idle */
g_idle_add(start_service_again_cb, manager);
} else {
/* Not our first time 'round the block. Let's slow this down. */
+ if (priv->connected) {
+ priv->connected = FALSE;
+ g_signal_emit(manager, signals[CONNECTION_CHANGE], 0, FALSE, TRUE);
+ }
if (priv->restart_count > 16)
priv->restart_count = 16; /* Not more than 1024x */
g_timeout_add((1 << priv->restart_count) * TIMEOUT_MULTIPLIER, start_service_again_cb, manager);