empathy r2857 - trunk/src



Author: xclaesse
Date: Thu Apr 16 12:28:44 2009
New Revision: 2857
URL: http://svn.gnome.org/viewvc/empathy?rev=2857&view=rev

Log:
Port EmpathyChatroomsWindow to new API

From: Xavier Claessens <xclaesse gmail com>

Modified:
   trunk/src/empathy-chatrooms-window.c

Modified: trunk/src/empathy-chatrooms-window.c
==============================================================================
--- trunk/src/empathy-chatrooms-window.c	(original)
+++ trunk/src/empathy-chatrooms-window.c	Thu Apr 16 12:28:44 2009
@@ -29,7 +29,6 @@
 #include <stdio.h>
 
 #include <gtk/gtk.h>
-#include <glade/glade.h>
 #include <glib.h>
 #include <glib/gi18n.h>
 
@@ -107,8 +106,8 @@
 empathy_chatrooms_window_show (GtkWindow *parent)
 {
 	static EmpathyChatroomsWindow *window = NULL;
-	GladeXML                     *glade;
-	gchar                        *filename;
+	GtkBuilder                    *gui;
+	gchar                         *filename;
 
 	if (window) {
 		gtk_window_present (GTK_WINDOW (window->window));
@@ -117,10 +116,8 @@
 
 	window = g_new0 (EmpathyChatroomsWindow, 1);
 
-	filename = empathy_file_lookup ("empathy-chatrooms-window.glade", "src");
-	glade = empathy_glade_get_file (filename,
-				       "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,
@@ -131,15 +128,14 @@
 				       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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]