aboutsummaryrefslogtreecommitdiff
path: root/libindicator
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-01-15 22:16:45 -0600
committerTed Gould <ted@gould.cx>2010-01-15 22:16:45 -0600
commit62d8c1c86b21ab250342900324565f1b95ac2da8 (patch)
tree4bc8f4e30629d78059ad1809e4e79173e01427fb /libindicator
parentdeabfe64bf3b306c1c068665c4d8324dee7f5435 (diff)
downloadlibayatana-indicator-62d8c1c86b21ab250342900324565f1b95ac2da8.tar.gz
libayatana-indicator-62d8c1c86b21ab250342900324565f1b95ac2da8.tar.bz2
libayatana-indicator-62d8c1c86b21ab250342900324565f1b95ac2da8.zip
Handling the connected signal as well, making sure we emit it.
Diffstat (limited to 'libindicator')
-rw-r--r--libindicator/indicator-service-manager.c10
1 files changed, 8 insertions, 2 deletions
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);