aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFelix Kaser <f.kaser@gmx.net>2009-12-10 07:22:35 +0800
committerFelix Kaser <f.kaser@gmx.net>2009-12-15 20:52:45 +0800
commitb54fd8c9d094ff6fc162b1d30b118185207d9f04 (patch)
treec2da4ad1beb0db19a6b75c6881d3ccfd0da993e7 /src
parentfbce68e65c37e7f004bdfd6cfeb59e7ea2a67b07 (diff)
downloadgsoc2013-empathy-b54fd8c9d094ff6fc162b1d30b118185207d9f04.tar
gsoc2013-empathy-b54fd8c9d094ff6fc162b1d30b118185207d9f04.tar.gz
gsoc2013-empathy-b54fd8c9d094ff6fc162b1d30b118185207d9f04.tar.bz2
gsoc2013-empathy-b54fd8c9d094ff6fc162b1d30b118185207d9f04.tar.lz
gsoc2013-empathy-b54fd8c9d094ff6fc162b1d30b118185207d9f04.tar.xz
gsoc2013-empathy-b54fd8c9d094ff6fc162b1d30b118185207d9f04.tar.zst
gsoc2013-empathy-b54fd8c9d094ff6fc162b1d30b118185207d9f04.zip
updated status messages
small updates on the status messages
Diffstat (limited to 'src')
-rw-r--r--src/empathy-accounts-dialog.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index dbdbd92d1..97ec23b20 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -179,13 +179,14 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
{
EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
const gchar *message;
+ gchar *status_message;
guint status;
guint reason;
guint presence;
EmpathyConnectivity *connectivity;
status = tp_account_get_connection_status (account, &reason);
- presence = tp_account_get_current_presence (account, NULL, NULL);
+ presence = tp_account_get_current_presence (account, NULL, &status_message);
connectivity = empathy_connectivity_dup_singleton ();
@@ -206,9 +207,17 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
gtk_widget_hide (priv->image_status);
break;
case TP_CONNECTION_STATUS_CONNECTED:
- message = g_strdup_printf (_("Connected with status %s"),
- empathy_presence_get_default_message (presence));
-
+ if (g_strcmp0 (status_message, "") == 0)
+ {
+ message = g_strdup_printf ("%s",
+ empathy_presence_get_default_message (presence));
+ }
+ else
+ {
+ message = g_strdup_printf ("%s - %s",
+ empathy_presence_get_default_message (presence),
+ status_message);
+ }
gtk_info_bar_set_message_type (GTK_INFO_BAR (priv->infobar),
GTK_MESSAGE_INFO);
@@ -216,11 +225,13 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
gtk_widget_hide (priv->throbber);
break;
case TP_CONNECTION_STATUS_DISCONNECTED:
- message = g_strdup_printf (_("Offline - %s"),
+ message = g_strdup_printf (_("Disconnected - %s"),
empathy_status_reason_get_default_message (reason));
if (reason == TP_CONNECTION_STATUS_REASON_REQUESTED)
{
+ message = g_strdup_printf (_("Offline - %s"),
+ empathy_status_reason_get_default_message (reason));
gtk_info_bar_set_message_type (GTK_INFO_BAR (priv->infobar),
GTK_MESSAGE_WARNING);
}
@@ -262,6 +273,7 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog,
gtk_widget_show (priv->infobar);
g_object_unref (connectivity);
+ g_free (status_message);
}
static void
@@ -1230,7 +1242,7 @@ accounts_dialog_connection_changed_cb (TpAccount *account,
gboolean found;
EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
- /* Update the status-infobar in the details view*/
+ /* Update the status-infobar in the details view */
accounts_dialog_update_status_infobar (dialog, account);
/* Update the status in the model */