#include <stdio.h>
#include <gtk/gtk.h>
-#include <glade/glade.h>
#include <glib.h>
#include <glib/gi18n.h>
empathy_chatrooms_window_show (GtkWindow *parent)
{
static EmpathyChatroomsWindow *window = NULL;
- GladeXML *glade;
+ GtkBuilder *gui;
+ gchar *filename;
if (window) {
gtk_window_present (GTK_WINDOW (window->window));
window = g_new0 (EmpathyChatroomsWindow, 1);
- glade = empathy_glade_get_file ("empathy-chatrooms-window.glade",
- "chatrooms_window",
- NULL,
+ filename = empathy_file_lookup ("empathy-chatrooms-window.ui", "src");
+ gui = empathy_builder_get_file (filename,
"chatrooms_window", &window->window,
"hbox_account", &window->hbox_account,
"label_account", &window->label_account,
"button_remove", &window->button_remove,
"button_close", &window->button_close,
NULL);
+ g_free (filename);
- empathy_glade_connect (glade,
- window,
+ empathy_builder_connect (gui, window,
"chatrooms_window", "destroy", chatrooms_window_destroy_cb,
"button_remove", "clicked", chatrooms_window_button_remove_clicked_cb,
"button_edit", "clicked", chatrooms_window_button_edit_clicked_cb,
"button_close", "clicked", chatrooms_window_button_close_clicked_cb,
NULL);
- g_object_unref (glade);
+ g_object_unref (gui);
g_object_add_weak_pointer (G_OBJECT (window->window), (gpointer) &window);
/* Get the session and chat room manager */
- window->manager = empathy_chatroom_manager_new ();
+ window->manager = empathy_chatroom_manager_dup_singleton (NULL);
g_signal_connect (window->manager, "chatroom-added",
G_CALLBACK (chatrooms_window_chatroom_added_cb),
/* Chatroom auto connect */
cell = gtk_cell_renderer_toggle_new ();
- column = gtk_tree_view_column_new_with_attributes (_("Auto Connect"), cell,
+ column = gtk_tree_view_column_new_with_attributes (_("Auto-Connect"), cell,
"active", COL_AUTO_CONNECT,
NULL);
count = gtk_tree_view_append_column (view, column);
enabled = !enabled;
empathy_chatroom_set_auto_connect (chatroom, enabled);
- empathy_chatroom_manager_store (window->manager);
gtk_list_store_set (store, &iter, COL_AUTO_CONNECT, enabled, -1);
gtk_tree_path_free (path);
chatrooms_window_model_action_selected (EmpathyChatroomsWindow *window)
{
EmpathyChatroom *chatroom;
- GtkTreeView *view;
- GtkTreeModel *model;
-
- view = GTK_TREE_VIEW (window->treeview);
- model = gtk_tree_view_get_model (view);
+ /* FIXME: This is still not implemented since Gossip fork */
chatroom = chatrooms_window_model_get_selected (window);
- if (!chatroom) {
- return;
- }
-
- //empathy_edit_chatroom_dialog_show (GTK_WINDOW (window->window), chatroom);
-
g_object_unref (chatroom);
}
{
EmpathyChatroom *chatroom;
+ /* FIXME: This is still not implemented since Gossip fork */
chatroom = chatrooms_window_model_get_selected (window);
- if (!chatroom) {
- return;
- }
-
- //empathy_edit_chatroom_dialog_show (GTK_WINDOW (window->window), chatroom);
-
g_object_unref (chatroom);
}