diff options
author | Ted Gould <ted@canonical.com> | 2009-10-08 10:51:20 -0400 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-08 10:51:20 -0400 |
commit | e0043aefb0c0366ee26452df2b0ef6d8d3e5a526 (patch) | |
tree | 8384b9fb90492c6bbaf87393c732de7012b5e3a2 /src/status-provider-mc5.c | |
parent | 8ec71fe8283925d4fb4dd0f59767d1c2eba75451 (diff) | |
parent | 7bb2c92d05bac11fecb30d744632f4d581903fbb (diff) | |
download | ayatana-indicator-session-e0043aefb0c0366ee26452df2b0ef6d8d3e5a526.tar.gz ayatana-indicator-session-e0043aefb0c0366ee26452df2b0ef6d8d3e5a526.tar.bz2 ayatana-indicator-session-e0043aefb0c0366ee26452df2b0ef6d8d3e5a526.zip |
Changing the icon so that if you are disconnected it is 'system-shutdown-panel' and making sure that we see it sometimes by not allocating the EmpathyAccountManager isn't allocated until status is set.
Diffstat (limited to 'src/status-provider-mc5.c')
-rw-r--r-- | src/status-provider-mc5.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/status-provider-mc5.c b/src/status-provider-mc5.c index 813ce3e..671e459 100644 --- a/src/status-provider-mc5.c +++ b/src/status-provider-mc5.c @@ -113,8 +113,8 @@ status_provider_mc5_init (StatusProviderMC5 *self) { StatusProviderMC5Private * priv = STATUS_PROVIDER_MC5_GET_PRIVATE(self); - priv->status = STATUS_PROVIDER_STATUS_OFFLINE; - priv->manager = EMPATHY_ACCOUNT_MANAGER(g_object_new(EMPATHY_TYPE_ACCOUNT_MANAGER, NULL)); + priv->status = STATUS_PROVIDER_STATUS_DISCONNECTED; + priv->manager = NULL; g_signal_connect(G_OBJECT(priv->manager), "global-presence-changed", G_CALLBACK(presence_changed), self); @@ -169,8 +169,7 @@ set_status (StatusProvider * sp, StatusProviderStatus status) { StatusProviderMC5Private * priv = STATUS_PROVIDER_MC5_GET_PRIVATE(sp); if (priv->manager == NULL) { - priv->status = STATUS_PROVIDER_STATUS_DISCONNECTED; - return; + priv->manager = EMPATHY_ACCOUNT_MANAGER(g_object_new(EMPATHY_TYPE_ACCOUNT_MANAGER, NULL)); } empathy_account_manager_request_global_presence(priv->manager, sp_to_tp_map[status], sp_to_mc_map[status], ""); |