From 293f1f77d2fa67a2eb77fdacb10d5b4bf5e82663 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Tue, 11 Jan 2011 04:08:47 -0600 Subject: handle disconnection gracefully --- .bzrignore | 5 +++++ src/indicator-sound.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.bzrignore b/.bzrignore index 8468f00..5e59c90 100644 --- a/.bzrignore +++ b/.bzrignore @@ -76,3 +76,8 @@ src/playlists-menu-item.c src/settings-manager.c src/title-menu-item.c src/transport-menu-item.c +modified: +src/indicator-sound.c +data/com.canonical.indicators.sound.gschema.valid +tests/libmockpulse.la +tests/libmockpulse_la-mockpulse.lo diff --git a/src/indicator-sound.c b/src/indicator-sound.c index 9d108d8..1ca3447 100644 --- a/src/indicator-sound.c +++ b/src/indicator-sound.c @@ -7,7 +7,6 @@ Copyright 2010 Canonical Ltd. Authors: Conor Curran Ted Gould - Cody Russell 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 @@ -386,6 +385,7 @@ connection_changed (IndicatorServiceManager * sm, GError *error = NULL; if (connected == FALSE){ + update_state (STATE_SINKS_NONE); return; //TODO: Gracefully handle disconnection // do a timeout to wait for reconnection @@ -396,7 +396,7 @@ connection_changed (IndicatorServiceManager * sm, // we don't need to anything, gdbus takes care of the rest - bless. // just fetch the state. if (priv->dbus_proxy != NULL){ - fetch_state (indicator); + fetch_state (indicator); return; } -- cgit v1.2.3