aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-11-29 20:55:08 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-12-26 16:47:04 +0800
commit9c654275d44e7ad9a1ef8d49fc9d02bcb5a171fe (patch)
tree17228e640300641af2e5fa8d9dfc57b6864fdba2
parenta12c04c8c13170113be43761c326cdb6c6942aad (diff)
downloadgsoc2013-empathy-9c654275d44e7ad9a1ef8d49fc9d02bcb5a171fe.tar
gsoc2013-empathy-9c654275d44e7ad9a1ef8d49fc9d02bcb5a171fe.tar.gz
gsoc2013-empathy-9c654275d44e7ad9a1ef8d49fc9d02bcb5a171fe.tar.bz2
gsoc2013-empathy-9c654275d44e7ad9a1ef8d49fc9d02bcb5a171fe.tar.lz
gsoc2013-empathy-9c654275d44e7ad9a1ef8d49fc9d02bcb5a171fe.tar.xz
gsoc2013-empathy-9c654275d44e7ad9a1ef8d49fc9d02bcb5a171fe.tar.zst
gsoc2013-empathy-9c654275d44e7ad9a1ef8d49fc9d02bcb5a171fe.zip
roster-contact: prefix status msg in case of error
https://bugzilla.gnome.org/show_bug.cgi?id=688860
-rw-r--r--libempathy-gtk/empathy-roster-contact.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-roster-contact.c b/libempathy-gtk/empathy-roster-contact.c
index e72ae4494..918ccdb96 100644
--- a/libempathy-gtk/empathy-roster-contact.c
+++ b/libempathy-gtk/empathy-roster-contact.c
@@ -1,5 +1,7 @@
#include "config.h"
+#include <glib/gi18n-lib.h>
+
#include "empathy-roster-contact.h"
#include <telepathy-glib/telepathy-glib.h>
@@ -204,7 +206,25 @@ update_presence_msg (EmpathyRosterContact *self)
}
else
{
- gtk_label_set_text (GTK_LABEL (self->priv->presence_msg), msg);
+ FolksPresenceType type;
+
+ type = folks_presence_details_get_presence_type (
+ FOLKS_PRESENCE_DETAILS (self->priv->individual));
+ if (type == FOLKS_PRESENCE_TYPE_ERROR)
+ {
+ gchar *tmp;
+
+ /* Add a prefix explaining that something goes wrong when trying to
+ * fetch contact's presence. */
+ tmp = g_strdup_printf (_("Server cannot find contact: %s"), msg);
+ gtk_label_set_text (GTK_LABEL (self->priv->presence_msg), tmp);
+
+ g_free (tmp);
+ }
+ else
+ {
+ gtk_label_set_text (GTK_LABEL (self->priv->presence_msg), msg);
+ }
gtk_alignment_set (GTK_ALIGNMENT (self->priv->first_line_alig),
0, 0.75, 1, 1);