]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-new-chatroom-dialog.c
Move chat chandler into the same process than contact list
[empathy.git] / libempathy-gtk / empathy-new-chatroom-dialog.c
index 1c84c70bd3206cc5d48e522ed8c9e76bf938a206..b33439407c6a97ad31e84cb280a216a6ebe18911 100644 (file)
@@ -1,7 +1,7 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
  * Copyright (C) 2006-2007 Imendio AB
- * Copyright (C) 2007 Collabora Ltd.
+ * Copyright (C) 2007-2008 Collabora Ltd.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -73,7 +73,6 @@ typedef struct {
 } EmpathyNewChatroomDialog;
 
 enum {
-       COL_IMAGE,
        COL_NAME,
        COL_ROOM,
        COL_COUNT
@@ -277,13 +276,6 @@ new_chatroom_dialog_model_add_columns (EmpathyNewChatroomDialog *dialog)
        view = GTK_TREE_VIEW (dialog->treeview);
        gtk_tree_view_set_headers_visible (view, FALSE);
 
-       /* Chatroom pointer */
-       column = gtk_tree_view_column_new ();
-       gtk_tree_view_column_set_title (column, _("Chat Rooms"));
-
-       cell = gtk_cell_renderer_pixbuf_new ();
-       gtk_tree_view_column_pack_start (column, cell, FALSE);
-
        cell = gtk_cell_renderer_text_new ();
        g_object_set (cell,
                      "xpad", (guint) 4,
@@ -291,7 +283,10 @@ new_chatroom_dialog_model_add_columns (EmpathyNewChatroomDialog *dialog)
                      "ellipsize", PANGO_ELLIPSIZE_END,
                      NULL);
 
-       gtk_tree_view_column_pack_start (column, cell, TRUE);
+       column = gtk_tree_view_column_new_with_attributes (_("Chat Rooms"),
+                                                          cell,
+                                                          "text", COL_NAME,
+                                                          NULL);
 
        gtk_tree_view_column_set_expand (column, TRUE);
        gtk_tree_view_append_column (view, column);
@@ -319,7 +314,7 @@ new_chatroom_dialog_update_widgets (EmpathyNewChatroomDialog *dialog)
                gtk_widget_show (dialog->vbox_browse);
 
        }
-       else if (strcmp (protocol, "salut") == 0) {
+       else if (strcmp (protocol, "local-xmpp") == 0) {
                gtk_widget_set_sensitive (dialog->entry_server, FALSE);
                gtk_widget_show (dialog->vbox_browse);          
        }
@@ -478,7 +473,6 @@ new_chatroom_dialog_model_selection_changed (GtkTreeSelection         *selection
        gtk_entry_set_text (GTK_ENTRY (dialog->entry_server), server ? server : "");
        gtk_entry_set_text (GTK_ENTRY (dialog->entry_room), room ? room : "");
 
-       g_free (server);
        g_free (room);
 }