empathy r813 - in trunk: libempathy libempathy-gtk src



Author: xclaesse
Date: Sun Mar 16 22:10:34 2008
New Revision: 813
URL: http://svn.gnome.org/viewvc/empathy?rev=813&view=rev

Log:
Use empathy_file_lookup for glade files since some are in libempathy-gtk/ and others in src/


Modified:
   trunk/libempathy-gtk/empathy-account-widget-irc.c
   trunk/libempathy-gtk/empathy-account-widget.c
   trunk/libempathy-gtk/empathy-accounts-dialog.c
   trunk/libempathy-gtk/empathy-contact-dialogs.c
   trunk/libempathy-gtk/empathy-contact-widget.c
   trunk/libempathy-gtk/empathy-group-chat.c
   trunk/libempathy-gtk/empathy-irc-network-dialog.c
   trunk/libempathy-gtk/empathy-log-window.c
   trunk/libempathy-gtk/empathy-new-message-dialog.c
   trunk/libempathy-gtk/empathy-presence-chooser.c
   trunk/libempathy-gtk/empathy-private-chat.c
   trunk/libempathy-gtk/empathy-spell-dialog.c
   trunk/libempathy-gtk/empathy-ui-utils.c
   trunk/libempathy/empathy-utils.c
   trunk/libempathy/empathy-utils.h
   trunk/src/empathy-call-window.c
   trunk/src/empathy-chat-window.c
   trunk/src/empathy-chatrooms-window.c
   trunk/src/empathy-main-window.c
   trunk/src/empathy-new-chatroom-dialog.c
   trunk/src/empathy-preferences.c
   trunk/src/empathy-status-icon.c

Modified: trunk/libempathy-gtk/empathy-account-widget-irc.c
==============================================================================
--- trunk/libempathy-gtk/empathy-account-widget-irc.c	(original)
+++ trunk/libempathy-gtk/empathy-account-widget-irc.c	Sun Mar 16 22:10:34 2008
@@ -433,6 +433,7 @@
   GladeXML *glade;
   GtkListStore *store;
   GtkCellRenderer *renderer;
+  gchar *filename;
 
   settings = g_slice_new0 (EmpathyAccountWidgetIrc);
   settings->account = g_object_ref (account);
@@ -458,7 +459,9 @@
   g_free (global_file_with_path);
   g_free (user_file_with_path);
 
-  glade = empathy_glade_get_file ("empathy-account-widget-irc.glade",
+  filename = empathy_file_lookup ("empathy-account-widget-irc.glade",
+      "libempathy-gtk");
+  glade = empathy_glade_get_file (filename,
       "vbox_irc_settings",
       NULL,
       "vbox_irc_settings", &settings->vbox_settings,
@@ -467,6 +470,7 @@
       "button_add_network", &settings->button_add_network,
       "button_remove", &settings->button_remove,
       NULL);
+  g_free (filename);
 
   /* Fill the networks combobox */
   store = gtk_list_store_new (2, G_TYPE_OBJECT, G_TYPE_STRING);

Modified: trunk/libempathy-gtk/empathy-account-widget.c
==============================================================================
--- trunk/libempathy-gtk/empathy-account-widget.c	(original)
+++ trunk/libempathy-gtk/empathy-account-widget.c	Sun Mar 16 22:10:34 2008
@@ -33,6 +33,7 @@
 #include <libmissioncontrol/mc-protocol.h>
 
 #include <libempathy/empathy-debug.h>
+#include <libempathy/empathy-utils.h>
 
 #include "empathy-account-widget.h"
 #include "empathy-ui-utils.h"
@@ -446,16 +447,20 @@
 	GtkWidget *widget;
 	GtkWidget *table_common_settings;
 	GtkWidget *table_advanced_settings;
+	gchar     *filename;
 
 	g_return_val_if_fail (MC_IS_ACCOUNT (account), NULL);
 
-	glade = empathy_glade_get_file ("empathy-account-widget-generic.glade",
+	filename = empathy_file_lookup ("empathy-account-widget-generic.glade",
+					"libempathy-gtk");
+	glade = empathy_glade_get_file (filename,
 					"vbox_generic_settings",
 					NULL,
 					"vbox_generic_settings", &widget,
 					"table_common_settings", &table_common_settings,
 					"table_advanced_settings", &table_advanced_settings,
 					NULL);
+	g_free (filename);
 
 	accounts_widget_generic_setup (account, table_common_settings, table_advanced_settings);
 
@@ -471,12 +476,16 @@
 {
 	GladeXML  *glade;
 	GtkWidget *widget;
+	gchar     *filename;
 
-	glade = empathy_glade_get_file ("empathy-account-widget-salut.glade",
+	filename = empathy_file_lookup ("empathy-account-widget-salut.glade",
+					"libempathy-gtk");
+	glade = empathy_glade_get_file (filename,
 					"vbox_salut_settings",
 					NULL,
 					"vbox_salut_settings", &widget,
 					NULL);
+	g_free (filename);
 
 	empathy_account_widget_handle_params (account, glade,
 			"entry_published", "published-name",
@@ -499,12 +508,16 @@
 {
 	GladeXML  *glade;
 	GtkWidget *widget;
+	gchar     *filename;
 
-	glade = empathy_glade_get_file ("empathy-account-widget-msn.glade",
+	filename = empathy_file_lookup ("empathy-account-widget-msn.glade",
+					"libempathy-gtk");
+	glade = empathy_glade_get_file (filename,
 					"vbox_msn_settings",
 					NULL,
 					"vbox_msn_settings", &widget,
 					NULL);
+	g_free (filename);
 
 	empathy_account_widget_handle_params (account, glade,
 			"entry_id", "account",
@@ -531,14 +544,18 @@
 	GtkWidget *widget;
 	GtkWidget *spinbutton_port;
 	GtkWidget *checkbutton_ssl;
+	gchar     *filename;
 
-	glade = empathy_glade_get_file ("empathy-account-widget-jabber.glade",
+	filename = empathy_file_lookup ("empathy-account-widget-jabber.glade",
+					"libempathy-gtk");
+	glade = empathy_glade_get_file (filename,
 				        "vbox_jabber_settings",
 				        NULL,
 				        "vbox_jabber_settings", &widget,
 				        "spinbutton_port", &spinbutton_port,
 				        "checkbutton_ssl", &checkbutton_ssl,
 				        NULL);
+	g_free (filename);
 
 	empathy_account_widget_handle_params (account, glade,
 			"entry_id", "account",
@@ -573,13 +590,17 @@
 	GladeXML  *glade;
 	GtkWidget *widget;
 	GtkWidget *spinbutton_port;
+	gchar     *filename;
 
-	glade = empathy_glade_get_file ("empathy-account-widget-icq.glade",
+	filename = empathy_file_lookup ("empathy-account-widget-icq.glade",
+					"libempathy-gtk");
+	glade = empathy_glade_get_file (filename,
 				        "vbox_icq_settings",
 				        NULL,
 				        "vbox_icq_settings", &widget,
 				        "spinbutton_port", &spinbutton_port,
 				        NULL);
+	g_free (filename);
 
 	empathy_account_widget_handle_params (account, glade,
 			"entry_uin", "account",
@@ -605,12 +626,16 @@
 {
 	GladeXML  *glade;
 	GtkWidget *widget;
+	gchar     *filename;
 
-	glade = empathy_glade_get_file ("empathy-account-widget-yahoo.glade",
+	filename = empathy_file_lookup ("empathy-account-widget-yahoo.glade",
+					"libempathy-gtk");
+	glade = empathy_glade_get_file (filename,
 					"vbox_yahoo_settings",
 					NULL,
 					"vbox_yahoo_settings", &widget,
 					NULL);
+	g_free (filename);
 
 	empathy_account_widget_handle_params (account, glade,
 			"entry_id", "account",

Modified: trunk/libempathy-gtk/empathy-accounts-dialog.c
==============================================================================
--- trunk/libempathy-gtk/empathy-accounts-dialog.c	(original)
+++ trunk/libempathy-gtk/empathy-accounts-dialog.c	Sun Mar 16 22:10:34 2008
@@ -986,6 +986,7 @@
 {
 	static EmpathyAccountsDialog *dialog = NULL;
 	GladeXML                    *glade;
+	gchar                       *filename;
 	GtkWidget                   *bbox;
 	GtkWidget                   *button_close;
 
@@ -996,7 +997,9 @@
 
 	dialog = g_new0 (EmpathyAccountsDialog, 1);
 
-	glade = empathy_glade_get_file ("empathy-accounts-dialog.glade",
+	filename = empathy_file_lookup ("empathy-accounts-dialog.glade",
+					"libempathy-gtk");
+	glade = empathy_glade_get_file (filename,
 				       "accounts_dialog",
 				       NULL,
 				       "accounts_dialog", &dialog->window,
@@ -1017,6 +1020,7 @@
 				       "button_remove", &dialog->button_remove,
 				       "button_close", &button_close,
 				       NULL);
+	g_free (filename);
 
 	empathy_glade_connect (glade,
 			      dialog,

Modified: trunk/libempathy-gtk/empathy-contact-dialogs.c
==============================================================================
--- trunk/libempathy-gtk/empathy-contact-dialogs.c	(original)
+++ trunk/libempathy-gtk/empathy-contact-dialogs.c	Sun Mar 16 22:10:34 2008
@@ -93,6 +93,7 @@
 	GtkWidget *hbox_subscription;
 	GtkWidget *contact_widget;
 	GList     *l;
+	gchar     *filename;
 
 	g_return_if_fail (EMPATHY_IS_CONTACT (contact));
 
@@ -104,12 +105,15 @@
 		return;
 	}
 
-	empathy_glade_get_file_simple ("empathy-contact-dialogs.glade",
+	filename = empathy_file_lookup ("empathy-contact-dialogs.glade",
+					"libempathy-gtk");
+	empathy_glade_get_file_simple (filename,
 				      "subscription_request_dialog",
 				      NULL,
 				      "subscription_request_dialog", &dialog,
 				      "hbox_subscription", &hbox_subscription,
 				      NULL);
+	g_free (filename);
 
 	contact_widget = empathy_contact_widget_new (contact,
 						     EMPATHY_CONTACT_WIDGET_EDIT_ALIAS |

Modified: trunk/libempathy-gtk/empathy-contact-widget.c
==============================================================================
--- trunk/libempathy-gtk/empathy-contact-widget.c	(original)
+++ trunk/libempathy-gtk/empathy-contact-widget.c	Sun Mar 16 22:10:34 2008
@@ -153,12 +153,15 @@
 {
 	EmpathyContactWidget *information;
 	GladeXML             *glade;
+	gchar                *filename;
 
 	information = g_slice_new0 (EmpathyContactWidget);
 	information->flags = flags;
 	information->factory = empathy_contact_factory_new ();
 
-	glade = empathy_glade_get_file ("empathy-contact-widget.glade",
+	filename = empathy_file_lookup ("empathy-contact-widget.glade",
+					"libempathy-gtk");
+	glade = empathy_glade_get_file (filename,
 				       "vbox_contact_widget",
 				       NULL,
 				       "vbox_contact_widget", &information->vbox_contact_widget,
@@ -180,6 +183,7 @@
 				       "table_client", &information->table_client,
 				       "hbox_client_requested", &information->hbow_client_requested,
 				       NULL);
+	g_free (filename);
 
 	empathy_glade_connect (glade,
 			      information,

Modified: trunk/libempathy-gtk/empathy-group-chat.c
==============================================================================
--- trunk/libempathy-gtk/empathy-group-chat.c	(original)
+++ trunk/libempathy-gtk/empathy-group-chat.c	Sun Mar 16 22:10:34 2008
@@ -306,10 +306,13 @@
 	EmpathyGroupChatPriv *priv;
 	GladeXML            *glade;
  	GList               *list = NULL; 
+	gchar               *filename;
 
 	priv = GET_PRIV (chat);
 
-	glade = empathy_glade_get_file ("empathy-group-chat.glade",
+	filename = empathy_file_lookup ("empathy-group-chat.glade",
+					"libempathy-gtk");
+	glade = empathy_glade_get_file (filename,
 				       "group_chat_widget",
 				       NULL,
 				       "group_chat_widget", &priv->widget,
@@ -321,6 +324,7 @@
 				       "label_topic", &priv->label_topic,
 				       "scrolled_window_contacts", &priv->scrolled_window_contacts,
 				       NULL);
+	g_free (filename);
 
 	empathy_glade_connect (glade,
 			      chat,

Modified: trunk/libempathy-gtk/empathy-irc-network-dialog.c
==============================================================================
--- trunk/libempathy-gtk/empathy-irc-network-dialog.c	(original)
+++ trunk/libempathy-gtk/empathy-irc-network-dialog.c	Sun Mar 16 22:10:34 2008
@@ -466,6 +466,7 @@
   GtkAdjustment *adjustment;
   GtkTreeSelection *selection;
   GtkTreeViewColumn *column;
+  gchar *filename;
 
   g_return_val_if_fail (network != NULL, NULL);
 
@@ -482,7 +483,9 @@
   dialog->network = network;
   g_object_ref (dialog->network);
 
-  glade = empathy_glade_get_file ("empathy-account-widget-irc.glade",
+  filename = empathy_file_lookup ("empathy-account-widget-irc.glade",
+      "libempathy-gtk");
+  glade = empathy_glade_get_file (filename,
       "irc_network_dialog",
       NULL,
       "irc_network_dialog", &dialog->dialog,
@@ -495,6 +498,7 @@
       "button_up", &dialog->button_up,
       "button_down", &dialog->button_down,
       NULL);
+  g_free (filename);
 
   store = gtk_list_store_new (4, G_TYPE_OBJECT, G_TYPE_STRING,
       G_TYPE_UINT, G_TYPE_BOOLEAN);

Modified: trunk/libempathy-gtk/empathy-log-window.c
==============================================================================
--- trunk/libempathy-gtk/empathy-log-window.c	(original)
+++ trunk/libempathy-gtk/empathy-log-window.c	Sun Mar 16 22:10:34 2008
@@ -147,6 +147,7 @@
 	GList                  *accounts;
 	gint                    account_num;
 	GladeXML               *glade;
+	gchar                  *filename;
 
 	if (window) {
 		gtk_window_present (GTK_WINDOW (window->window));
@@ -163,7 +164,9 @@
 	window = g_new0 (EmpathyLogWindow, 1);
 	window->log_manager = empathy_log_manager_new ();
 
-	glade = empathy_glade_get_file ("empathy-log-window.glade",
+	filename = empathy_file_lookup ("empathy-log-window.glade",
+					"libempathy-gtk");
+	glade = empathy_glade_get_file (filename,
 				       "log_window",
 				       NULL,
 				       "log_window", &window->window,
@@ -180,6 +183,8 @@
 				       "treeview_chats", &window->treeview_chats,
 				       "scrolledwindow_chats", &window->scrolledwindow_chats,
 				       NULL);
+	g_free (filename);
+
 	empathy_glade_connect (glade,
 			      window,
 			      "log_window", "destroy", log_window_destroy_cb,

Modified: trunk/libempathy-gtk/empathy-new-message-dialog.c
==============================================================================
--- trunk/libempathy-gtk/empathy-new-message-dialog.c	(original)
+++ trunk/libempathy-gtk/empathy-new-message-dialog.c	Sun Mar 16 22:10:34 2008
@@ -106,6 +106,7 @@
 {
 	static EmpathyNewMessageDialog *dialog = NULL;
 	GladeXML                       *glade;
+	gchar                          *filename;
 
 	if (dialog) {
 		gtk_window_present (GTK_WINDOW (dialog->dialog));
@@ -114,7 +115,9 @@
 
 	dialog = g_new0 (EmpathyNewMessageDialog, 1);
 
-	glade = empathy_glade_get_file ("empathy-new-message-dialog.glade",
+	filename = empathy_file_lookup ("empathy-new-message-dialog.glade",
+					"libempathy-gtk");
+	glade = empathy_glade_get_file (filename,
 				        "new_message_dialog",
 				        NULL,
 				        "new_message_dialog", &dialog->dialog,
@@ -123,6 +126,7 @@
 					"button_chat", &dialog->button_chat,
 					"button_call",&dialog->button_call,
 				        NULL);
+	g_free (filename);
 
 	empathy_glade_connect (glade,
 			       dialog,

Modified: trunk/libempathy-gtk/empathy-presence-chooser.c
==============================================================================
--- trunk/libempathy-gtk/empathy-presence-chooser.c	(original)
+++ trunk/libempathy-gtk/empathy-presence-chooser.c	Sun Mar 16 22:10:34 2008
@@ -930,6 +930,7 @@
 presence_chooser_dialog_show (void)
 {
 	GladeXML *glade;
+	gchar    *filename;
 
 	if (message_dialog) {
 		gtk_window_present (GTK_WINDOW (message_dialog->dialog));
@@ -937,7 +938,10 @@
 	}
 
 	message_dialog = g_new0 (CustomMessageDialog, 1);
-	glade = empathy_glade_get_file ("empathy-presence-chooser.glade",
+
+	filename = empathy_file_lookup ("empathy-presence-chooser.glade",
+					"libempathy-gtk");
+	glade = empathy_glade_get_file (filename,
 				       "custom_message_dialog",
 				       NULL,
 				       "custom_message_dialog", &message_dialog->dialog,
@@ -945,6 +949,8 @@
 				       "comboboxentry_message", &message_dialog->comboboxentry_message,
 				       "combobox_status", &message_dialog->combobox_status,
 				       NULL);
+	g_free (filename);
+
 	empathy_glade_connect (glade,
 			       message_dialog,
 			       "custom_message_dialog", "destroy", presence_chooser_dialog_destroy_cb,

Modified: trunk/libempathy-gtk/empathy-private-chat.c
==============================================================================
--- trunk/libempathy-gtk/empathy-private-chat.c	(original)
+++ trunk/libempathy-gtk/empathy-private-chat.c	Sun Mar 16 22:10:34 2008
@@ -181,16 +181,19 @@
 	GladeXML              *glade;
 	EmpathyPrivateChatPriv *priv;
 	GtkWidget             *input_text_view_sw;
+	gchar                 *filename;
 
 	priv = GET_PRIV (chat);
 
-	glade = empathy_glade_get_file ("empathy-chat.glade",
+	filename = empathy_file_lookup ("empathy-chat.glade", "libempathy-gtk");
+	glade = empathy_glade_get_file (filename,
 				       "chat_widget",
 				       NULL,
 				      "chat_widget", &priv->widget,
 				      "chat_view_sw", &priv->text_view_sw,
 				      "input_text_view_sw", &input_text_view_sw,
 				       NULL);
+	g_free (filename);
 
 	empathy_glade_connect (glade,
 			      chat,

Modified: trunk/libempathy-gtk/empathy-spell-dialog.c
==============================================================================
--- trunk/libempathy-gtk/empathy-spell-dialog.c	(original)
+++ trunk/libempathy-gtk/empathy-spell-dialog.c	Sun Mar 16 22:10:34 2008
@@ -32,6 +32,8 @@
 #include <gtk/gtksizegroup.h>
 #include <glade/glade.h>
 
+#include <libempathy/empathy-utils.h>
+
 #include "empathy-chat.h"
 #include "empathy-spell-dialog.h"
 #include "empathy-ui-utils.h"
@@ -224,6 +226,7 @@
 	EmpathySpellDialog *dialog;
 	GladeXML          *gui;
 	gchar             *str;
+	gchar             *filename;
 
 	g_return_if_fail (chat != NULL);
 	g_return_if_fail (word != NULL);
@@ -237,7 +240,9 @@
 	dialog->start = start;
 	dialog->end = end;
 
-	gui = empathy_glade_get_file ("empathy-spell-dialog.glade",
+	filename = empathy_file_lookup ("empathy-spell-dialog.glade",
+					"libempathy-gtk");
+	gui = empathy_glade_get_file (filename,
 				     "spell_dialog",
 				     NULL,
 				     "spell_dialog", &dialog->window,
@@ -245,6 +250,7 @@
 				     "label_word", &dialog->label_word,
 				     "treeview_words", &dialog->treeview_words,
 				     NULL);
+	g_free (filename);
 
 	empathy_glade_connect (gui,
 			      dialog,

Modified: trunk/libempathy-gtk/empathy-ui-utils.c
==============================================================================
--- trunk/libempathy-gtk/empathy-ui-utils.c	(original)
+++ trunk/libempathy-gtk/empathy-ui-utils.c	Sun Mar 16 22:10:34 2008
@@ -61,20 +61,12 @@
 		va_list      args)
 {
 	GladeXML   *gui;
-	gchar      *path;
 	const char *name;
 	GtkWidget **widget_ptr;
 
-	path = g_build_filename (g_getenv ("EMPATHY_SRCDIR"), "libempathy-gtk",
-				 filename, NULL);
-	if (!g_file_test (path, G_FILE_TEST_EXISTS)) {
-		g_free (path);
-		path = g_build_filename (DATADIR, "empathy", filename, NULL);
-	}
-	empathy_debug (DEBUG_DOMAIN, "Loading glade file %s", path);
+	empathy_debug (DEBUG_DOMAIN, "Loading glade file %s", filename);
 
-	gui = glade_xml_new (path, root, domain);
-	g_free (path);
+	gui = glade_xml_new (filename, root, domain);
 
 	if (!gui) {
 		g_warning ("Couldn't find necessary glade file '%s'", filename);

Modified: trunk/libempathy/empathy-utils.c
==============================================================================
--- trunk/libempathy/empathy-utils.c	(original)
+++ trunk/libempathy/empathy-utils.c	Sun Mar 16 22:10:34 2008
@@ -587,3 +587,22 @@
 	return MC_PRESENCE_AVAILABLE;
 }
 
+gchar *
+empathy_file_lookup (const gchar *filename, const gchar *subdir)
+{
+	gchar *path;
+
+	if (!subdir) {
+		subdir = ".";
+	}
+
+	path = g_build_filename (g_getenv ("EMPATHY_SRCDIR"), subdir, filename, NULL);
+	if (!g_file_test (path, G_FILE_TEST_EXISTS)) {
+		g_free (path);
+		path = g_build_filename (DATADIR, "empathy", filename, NULL);
+	}
+
+	return path;
+}
+
+

Modified: trunk/libempathy/empathy-utils.h
==============================================================================
--- trunk/libempathy/empathy-utils.h	(original)
+++ trunk/libempathy/empathy-utils.h	Sun Mar 16 22:10:34 2008
@@ -97,7 +97,8 @@
 const gchar * empathy_presence_get_default_message  (McPresence       presence);
 const gchar * empathy_presence_to_str               (McPresence       presence);
 McPresence    empathy_presence_from_str             (const gchar     *str);
-
+gchar *       empathy_file_lookup                   (const gchar     *filename,
+						     const gchar     *subdir);
 G_END_DECLS
 
 #endif /*  __EMPATHY_UTILS_H__ */

Modified: trunk/src/empathy-call-window.c
==============================================================================
--- trunk/src/empathy-call-window.c	(original)
+++ trunk/src/empathy-call-window.c	Sun Mar 16 22:10:34 2008
@@ -450,13 +450,15 @@
   EmpathyCallWindow *window;
   GladeXML *glade;
   guint status;
+  gchar *filename;
 
   g_return_val_if_fail (EMPATHY_IS_TP_CALL (call), NULL);
 
   window = g_slice_new0 (EmpathyCallWindow);
   window->call = g_object_ref (call);
 
-  glade = empathy_glade_get_file ("empathy-call-window.glade",
+  filename = empathy_file_lookup ("empathy-call-window.glade", "src");
+  glade = empathy_glade_get_file (filename,
       "window",
       NULL,
       "window", &window->window,
@@ -471,6 +473,7 @@
       "output_video_frame", &window->output_video_frame,
       "video_button", &window->video_button,
       NULL);
+  g_free (filename);
 
   empathy_glade_connect (glade,
       window,

Modified: trunk/src/empathy-chat-window.c
==============================================================================
--- trunk/src/empathy-chat-window.c	(original)
+++ trunk/src/empathy-chat-window.c	Sun Mar 16 22:10:34 2008
@@ -280,10 +280,12 @@
 	GtkWidget            *menu;
 	gint                  i;
 	GtkWidget            *chat_vbox;
+	gchar                *filename;
 
 	priv = GET_PRIV (window);
 
-	glade = empathy_glade_get_file ("empathy-chat.glade",
+	filename = empathy_file_lookup ("empathy-chat.glade", "libempathy-gtk");
+	glade = empathy_glade_get_file (filename,
 				       "chat_window",
 				       NULL,
 				       "chat_window", &priv->dialog,
@@ -315,6 +317,7 @@
 				       "menu_help_contents", &priv->menu_help_contents,
 				       "menu_help_about", &priv->menu_help_about,
 				       NULL);
+	g_free (filename);
 
 	empathy_glade_connect (glade,
 			      window,

Modified: trunk/src/empathy-chatrooms-window.c
==============================================================================
--- trunk/src/empathy-chatrooms-window.c	(original)
+++ trunk/src/empathy-chatrooms-window.c	Sun Mar 16 22:10:34 2008
@@ -108,6 +108,7 @@
 {
 	static EmpathyChatroomsWindow *window = NULL;
 	GladeXML                     *glade;
+	gchar                        *filename;
 
 	if (window) {
 		gtk_window_present (GTK_WINDOW (window->window));
@@ -116,7 +117,8 @@
 
 	window = g_new0 (EmpathyChatroomsWindow, 1);
 
-	glade = empathy_glade_get_file ("empathy-chatrooms-window.glade",
+	filename = empathy_file_lookup ("empathy-chatrooms-window.glade", "src");
+	glade = empathy_glade_get_file (filename,
 				       "chatrooms_window",
 				       NULL,
 				       "chatrooms_window", &window->window,
@@ -127,6 +129,7 @@
 				       "button_remove", &window->button_remove,
 				       "button_close", &window->button_close,
 				       NULL);
+	g_free (filename);
 
 	empathy_glade_connect (glade,
 			      window,

Modified: trunk/src/empathy-main-window.c
==============================================================================
--- trunk/src/empathy-main-window.c	(original)
+++ trunk/src/empathy-main-window.c	Sun Mar 16 22:10:34 2008
@@ -186,6 +186,7 @@
 	gboolean                  show_avatars;
 	gboolean                  compact_contact_list;
 	gint                      x, y, w, h;
+	gchar                    *filename;
 
 	if (window) {
 		empathy_window_present (GTK_WINDOW (window->window), TRUE);
@@ -195,7 +196,8 @@
 	window = g_new0 (EmpathyMainWindow, 1);
 
 	/* Set up interface */
-	glade = empathy_glade_get_file ("empathy-main-window.glade",
+	filename = empathy_file_lookup ("empathy-main-window.glade", "src");
+	glade = empathy_glade_get_file (filename,
 				       "main_window",
 				       NULL,
 				       "main_window", &window->window,
@@ -210,6 +212,7 @@
 				       "presence_toolbar", &window->presence_toolbar,
 				       "roster_scrolledwindow", &sw,
 				       NULL);
+	g_free (filename);
 
 	empathy_glade_connect (glade,
 			      window,

Modified: trunk/src/empathy-new-chatroom-dialog.c
==============================================================================
--- trunk/src/empathy-new-chatroom-dialog.c	(original)
+++ trunk/src/empathy-new-chatroom-dialog.c	Sun Mar 16 22:10:34 2008
@@ -122,6 +122,7 @@
 	EmpathyNewChatroomDialog *dialog;
 	GladeXML                 *glade;
 	GtkSizeGroup             *size_group;
+	gchar                    *filename;
 
 	if (dialog_p) {
 		gtk_window_present (GTK_WINDOW (dialog_p->window));
@@ -130,7 +131,8 @@
 
 	dialog_p = dialog = g_new0 (EmpathyNewChatroomDialog, 1);
 
-	glade = empathy_glade_get_file ("empathy-new-chatroom-dialog.glade",
+	filename = empathy_file_lookup ("empathy-new-chatroom-dialog.glade", "src");
+	glade = empathy_glade_get_file (filename,
 				       "new_chatroom_dialog",
 				       NULL,
 				       "new_chatroom_dialog", &dialog->window,
@@ -148,6 +150,7 @@
 				       "treeview", &dialog->treeview,
 				       "button_join", &dialog->button_join,
 				       NULL);
+	g_free (filename);
 
 	empathy_glade_connect (glade,
 			      dialog,

Modified: trunk/src/empathy-preferences.c
==============================================================================
--- trunk/src/empathy-preferences.c	(original)
+++ trunk/src/empathy-preferences.c	Sun Mar 16 22:10:34 2008
@@ -30,6 +30,8 @@
 #include <glade/glade.h>
 #include <glib/gi18n.h>
 
+#include <libempathy/empathy-utils.h>
+
 #include <libempathy-gtk/empathy-conf.h>
 #include <libempathy-gtk/empathy-ui-utils.h>
 #include <libempathy-gtk/empathy-theme-manager.h>
@@ -951,6 +953,7 @@
 {
 	static EmpathyPreferences *preferences;
 	GladeXML                 *glade;
+	gchar                    *filename;
 
 	if (preferences) {
 		gtk_window_present (GTK_WINDOW (preferences->dialog));
@@ -959,8 +962,8 @@
 
 	preferences = g_new0 (EmpathyPreferences, 1);
 
-	glade = empathy_glade_get_file (
-		"empathy-preferences.glade",
+	filename = empathy_file_lookup ("empathy-preferences.glade", "src");
+	glade = empathy_glade_get_file (filename,
 		"preferences_dialog",
 		NULL,
 		"preferences_dialog", &preferences->dialog,
@@ -980,6 +983,7 @@
 		"checkbutton_popups_when_available", &preferences->checkbutton_popups_when_available,
 		"treeview_spell_checker", &preferences->treeview_spell_checker,
 		NULL);
+	g_free (filename);
 
 	empathy_glade_connect (glade,
 			      preferences,

Modified: trunk/src/empathy-status-icon.c
==============================================================================
--- trunk/src/empathy-status-icon.c	(original)
+++ trunk/src/empathy-status-icon.c	Sun Mar 16 22:10:34 2008
@@ -651,10 +651,12 @@
 {
 	EmpathyStatusIconPriv *priv;
 	GladeXML              *glade;
+	gchar                 *filename;
 
 	priv = GET_PRIV (icon);
 
-	glade = empathy_glade_get_file ("empathy-status-icon.glade",
+	filename = empathy_file_lookup ("empathy-status-icon.glade", "src");
+	glade = empathy_glade_get_file (filename,
 				       "tray_menu",
 				       NULL,
 				       "tray_menu", &priv->popup_menu,
@@ -662,6 +664,7 @@
 				       "tray_new_message", &priv->message_item,
 				       "tray_status", &priv->status_item,
 				       NULL);
+	g_free (filename);
 
 	empathy_glade_connect (glade,
 			      icon,



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