aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-26 00:33:35 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-27 23:24:59 +0800
commit8b5eb07207e7aa74a0e9081a73502f71d1be58c1 (patch)
tree826bebacf3a32b7462f88e20e099bf23432966a7
parentc09471eb2c996367eb023f430b4fa3e599c9df09 (diff)
downloadgsoc2013-empathy-8b5eb07207e7aa74a0e9081a73502f71d1be58c1.tar
gsoc2013-empathy-8b5eb07207e7aa74a0e9081a73502f71d1be58c1.tar.gz
gsoc2013-empathy-8b5eb07207e7aa74a0e9081a73502f71d1be58c1.tar.bz2
gsoc2013-empathy-8b5eb07207e7aa74a0e9081a73502f71d1be58c1.tar.lz
gsoc2013-empathy-8b5eb07207e7aa74a0e9081a73502f71d1be58c1.tar.xz
gsoc2013-empathy-8b5eb07207e7aa74a0e9081a73502f71d1be58c1.tar.zst
gsoc2013-empathy-8b5eb07207e7aa74a0e9081a73502f71d1be58c1.zip
display the number of other tabs
-rw-r--r--src/empathy-chat-window.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index ca509a8d6..e33092af7 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -359,7 +359,25 @@ chat_window_contact_menu_update (EmpathyChatWindowPriv *priv,
static gchar *
get_window_title_name (EmpathyChatWindowPriv *priv)
{
- return g_strdup (empathy_chat_get_name (priv->current_chat));
+ const gchar *active_name;
+ guint nb_chats;
+
+ nb_chats = g_list_length (priv->chats);
+ g_assert (nb_chats > 0);
+
+ active_name = empathy_chat_get_name (priv->current_chat);
+
+ if (nb_chats == 1) {
+ /* only one tab */
+ return g_strdup (active_name);
+ } else {
+ guint nb_others = nb_chats - 1;
+
+ return g_strdup_printf (ngettext (
+ "%s (and %u other)",
+ "%s (and %u others)", nb_others),
+ active_name, nb_others);
+ }
}
static void