diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2007-09-21 20:58:20 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-09-21 20:58:20 +0800 |
commit | 944d3f383305b6cf50ee8a7995a1daf9a72ece20 (patch) | |
tree | 7a376d6d9e243cdf7328d245d985d94ad43ed0a2 /libempathy-gtk | |
parent | c657583832cbf675516a105c1f7bbc6bebea6e34 (diff) | |
download | gsoc2013-empathy-944d3f383305b6cf50ee8a7995a1daf9a72ece20.tar gsoc2013-empathy-944d3f383305b6cf50ee8a7995a1daf9a72ece20.tar.gz gsoc2013-empathy-944d3f383305b6cf50ee8a7995a1daf9a72ece20.tar.bz2 gsoc2013-empathy-944d3f383305b6cf50ee8a7995a1daf9a72ece20.tar.lz gsoc2013-empathy-944d3f383305b6cf50ee8a7995a1daf9a72ece20.tar.xz gsoc2013-empathy-944d3f383305b6cf50ee8a7995a1daf9a72ece20.tar.zst gsoc2013-empathy-944d3f383305b6cf50ee8a7995a1daf9a72ece20.zip |
Do not set "new message" in the title of conversation windows, it's
2007-09-21 Xavier Claessens <xclaesse@gmail.com>
* libempathy-gtk/empathy-chat-window.c: Do not set "new message" in
the title of conversation windows, it's useless. Fixes bug #459523.
svn path=/trunk/; revision=305
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-chat-window.c | 56 |
1 files changed, 9 insertions, 47 deletions
diff --git a/libempathy-gtk/empathy-chat-window.c b/libempathy-gtk/empathy-chat-window.c index 7a1807089..468c3236e 100644 --- a/libempathy-gtk/empathy-chat-window.c +++ b/libempathy-gtk/empathy-chat-window.c @@ -694,60 +694,22 @@ static void chat_window_update_title (EmpathyChatWindow *window, EmpathyChat *chat) { - EmpathyChatWindowPriv *priv; - const gchar *str; - gchar *title; - gint n_chats; + EmpathyChatWindowPriv *priv; + gint n_chats; priv = GET_PRIV (window); n_chats = g_list_length (priv->chats); if (n_chats == 1) { - if (priv->chats_new_msg) { - title = g_strdup_printf ( - "%s - %s", - empathy_chat_get_name (priv->current_chat), - _("New Message")); - } - else if (empathy_chat_is_group_chat (priv->current_chat)) { - title = g_strdup_printf ( - "%s - %s", - empathy_chat_get_name (priv->current_chat), - _("Chat Room")); - } else { - title = g_strdup_printf ( - "%s - %s", - empathy_chat_get_name (priv->current_chat), - _("Conversation")); - } + gtk_window_set_title (GTK_WINDOW (priv->dialog), + empathy_chat_get_name (priv->current_chat)); } else { - if (priv->chats_new_msg) { - GString *names; - GList *l; - gint n_messages = 0; - - names = g_string_new (NULL); - - for (l = priv->chats_new_msg; l; l = l->next) { - n_messages++; - g_string_append (names, - empathy_chat_get_name (l->data)); - if (l->next) { - g_string_append (names, ", "); - } - } - - str = ngettext ("New Message", "New Messages", n_messages); - title = g_strdup_printf ("%s - %s", names->str, str); - g_string_free (names, TRUE); - } else { - str = ngettext ("Conversation", "Conversations (%d)", n_chats); - title = g_strdup_printf (str, n_chats); - } - } + gchar *title; - gtk_window_set_title (GTK_WINDOW (priv->dialog), title); - g_free (title); + title = g_strdup_printf (_("Conversations (%d)"), n_chats); + gtk_window_set_title (GTK_WINDOW (priv->dialog), title); + g_free (title); + } if (priv->chats_new_msg) { gtk_window_set_icon_name (GTK_WINDOW (priv->dialog), |