]> git.0d.be Git - empathy.git/commitdiff
Attach account name information along with the chatroom names in main window Room...
authorChandni Verma <chandniverma2112@gmail.com>
Wed, 30 Mar 2011 19:07:00 +0000 (00:37 +0530)
committerChandni Verma <chandniverma2112@gmail.com>
Sat, 7 May 2011 19:57:48 +0000 (01:27 +0530)
src/empathy-main-window.c

index b4c1254dfdbd0365b6e6e88bbc7439b1953b3482..18ae7a0904028a5fbaea8f19993ba07d77038a38 100644 (file)
@@ -1277,14 +1277,20 @@ main_window_favorite_chatroom_menu_add (EmpathyMainWindow *window,
 {
        EmpathyMainWindowPriv *priv = GET_PRIV (window);
        GtkWidget   *menu_item;
-       const gchar *name;
+       const gchar *name, *account_name;
+       gchar *label;
+
 
        if (g_object_get_data (G_OBJECT (chatroom), "menu_item")) {
                return;
        }
 
        name = empathy_chatroom_get_name (chatroom);
-       menu_item = gtk_menu_item_new_with_label (name);
+       account_name = tp_account_get_display_name (
+                       empathy_chatroom_get_account (chatroom));
+       label = g_strdup_printf ("%s (%s)", name, account_name);
+       menu_item = gtk_menu_item_new_with_label (label);
+       g_free (label);
        g_object_set_data (G_OBJECT (menu_item), "is_favorite",
                        GUINT_TO_POINTER (TRUE));