aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-08 10:54:56 -0400
committerTed Gould <ted@canonical.com>2009-10-08 10:54:56 -0400
commit69960ed469a9907deb10801f13f77f6b333c8163 (patch)
tree06bf0c866f89990eae7013fbd1b9d47132bcb3bc /src
parent9ace1e376aac193ba04bcfb0365af774bf96a4e5 (diff)
parent69c44b63c492193ea74df9ff48e82be5526b7b5f (diff)
downloadayatana-indicator-session-69960ed469a9907deb10801f13f77f6b333c8163.tar.gz
ayatana-indicator-session-69960ed469a9907deb10801f13f77f6b333c8163.tar.bz2
ayatana-indicator-session-69960ed469a9907deb10801f13f77f6b333c8163.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. (LP: #432635)
Diffstat (limited to 'src')
-rw-r--r--src/indicator-session.c4
-rw-r--r--src/status-provider-mc5.c7
-rw-r--r--src/status-service.c2
3 files changed, 6 insertions, 7 deletions
diff --git a/src/indicator-session.c b/src/indicator-session.c
index c367e3a..c22aa1c 100644
--- a/src/indicator-session.c
+++ b/src/indicator-session.c
@@ -76,8 +76,8 @@ get_label (void)
GtkImage *
get_icon (void)
{
- g_debug("Changing status icon: '%s'", "user-offline");
- status_image = GTK_IMAGE(gtk_image_new_from_icon_name("user-offline", GTK_ICON_SIZE_MENU));
+ g_debug("Changing status icon: '%s'", "system-shutdown-panel");
+ status_image = GTK_IMAGE(gtk_image_new_from_icon_name("system-shutdown-panel", GTK_ICON_SIZE_MENU));
gtk_widget_show(GTK_WIDGET(status_image));
return status_image;
}
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], "");
diff --git a/src/status-service.c b/src/status-service.c
index a448ada..e3a9684 100644
--- a/src/status-service.c
+++ b/src/status-service.c
@@ -68,7 +68,7 @@ static const gchar * status_icons[STATUS_PROVIDER_STATUS_LAST] = {
/* STATUS_PROVIDER_STATUS_DND, */ "user-busy",
/* STATUS_PROVIDER_STATUS_INVISIBLE, */ "user-invisible",
/* STATUS_PROVIDER_STATUS_OFFLINE */ "user-offline",
- /* STATUS_PROVIDER_STATUS_DISCONNECTED */"user-offline"
+ /* STATUS_PROVIDER_STATUS_DISCONNECTED */"system-shutdown-panel"
};