]> git.0d.be Git - empathy.git/commitdiff
Do not set "new message" in the title of conversation windows, it's
authorXavier Claessens <xclaesse@gmail.com>
Fri, 21 Sep 2007 12:58:20 +0000 (12:58 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Fri, 21 Sep 2007 12:58:20 +0000 (12:58 +0000)
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

ChangeLog
libempathy-gtk/empathy-chat-window.c

index 8bf030565d1a10600225ae66ea91179a6a272315..3b91ca5a9ca39b5ba4e9dd681059ea79cf521ca0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
 2007-09-21  Xavier Claessens  <xclaesse@gmail.com>
 
        * libempathy/empathy-tp-contact-list.c: Fix warnings when finalizing.
index 7a18070890cd84538a466e9ec8a4e64376cc11ce..468c3236e48717fa85f83a7abd8ec63561311170 100644 (file)
@@ -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),