[empathy] Don't repeat a tooltip format string
- From: Will Thompson <wjt src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] Don't repeat a tooltip format string
- Date: Mon, 8 Jun 2009 04:42:43 -0400 (EDT)
commit cc548789733a60b077718c022b6b0e03fc793857
Author: Will Thompson <will thompson collabora co uk>
Date: Sun Jun 7 21:08:43 2009 +0100
Don't repeat a tooltip format string
---
src/empathy-chat-window.c | 27 +++++++++++++--------------
1 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 41bd20e..9c2dbc4 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -405,9 +405,10 @@ chat_window_update_chat_tab (EmpathyChat *chat)
EmpathyChatWindowPriv *priv;
EmpathyContact *remote_contact;
const gchar *name;
+ const gchar *id;
McAccount *account;
const gchar *subject;
- const gchar *status;
+ const gchar *status = NULL;
GtkWidget *widget;
GString *tooltip;
gchar *markup;
@@ -449,21 +450,19 @@ chat_window_update_chat_tab (EmpathyChat *chat)
tooltip = g_string_new (NULL);
if (remote_contact) {
- append_markup_printf (tooltip,
- "<b>%s</b><small> (%s)</small>",
- empathy_contact_get_id (remote_contact),
- mc_account_get_display_name (account));
-
+ id = empathy_contact_get_id (remote_contact);
status = empathy_contact_get_presence_message (remote_contact);
-
- if (!EMP_STR_EMPTY (status)) {
- append_markup_printf (tooltip, "\n<i>%s</i>", status);
- }
+ } else {
+ id = name;
}
- else {
- append_markup_printf (tooltip,
- "<b>%s</b><small> (%s)</small>", name,
- mc_account_get_display_name (account));
+
+ append_markup_printf (tooltip,
+ "<b>%s</b><small> (%s)</small>",
+ id,
+ mc_account_get_display_name (account));
+
+ if (!EMP_STR_EMPTY (status)) {
+ append_markup_printf (tooltip, "\n<i>%s</i>", status);
}
if (subject) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]