diff options
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | libindicator/indicator-service-manager.c | 10 |
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); |