Index: totem.spec.in
===================================================================
--- totem.spec.in	(revision 4445)
+++ totem.spec.in	(working copy)
@@ -21,7 +21,7 @@
 BuildRequires: gcc-c++, pkgconfig, gettext, scrollkeeper
 BuildRequires: gstreamer-devel >= %gstreamer_version
 BuildRequires: gstreamer-plugins-base-devel >= %gstreamer_plugins_base_version
-BuildRequires: gnome-desktop-devel >= 2.6.0, gnome-vfs2-devel, libglade2-devel
+BuildRequires: gnome-desktop-devel >= 2.6.0, gnome-vfs2-devel
 BuildRequires: nautilus-devel
 BuildRequires: perl-XML-Parser
 BuildRequires: iso-codes-devel
Index: src/plugins/totem-plugin.c
===================================================================
--- src/plugins/totem-plugin.c	(revision 4445)
+++ src/plugins/totem-plugin.c	(working copy)
@@ -275,3 +275,19 @@
 	}
 	return ret;
 }
+
+GtkBuilder *
+totem_plugin_load_interface (TotemPlugin *plugin, const char *name,
+			     gboolean fatal, GtkWindow *parent,
+			     gpointer user_data)
+{
+	GtkBuilder *builder = NULL;
+	char *filename;
+
+	filename = totem_plugin_find_file (plugin, name);
+	builder = totem_interface_load_with_full_path (filename, fatal, parent,
+						       user_data);
+	g_free (filename);
+
+	return builder;
+}
Index: src/plugins/skipto/totem-skipto.c
===================================================================
--- src/plugins/skipto/totem-skipto.c	(revision 4445)
+++ src/plugins/skipto/totem-skipto.c	(working copy)
@@ -38,8 +38,7 @@
 #include <sys/stat.h>
 
 #include "totem-skipto.h"
-#include "totem.h"
-#include "totem-plugin.h"
+#include "totem-skipto-plugin.h"
 #include "totem-uri.h"
 #include "video-utils.h"
 #include "bacon-video-widget.h"
@@ -162,19 +161,17 @@
 }
 
 GtkWidget*
-totem_skipto_new (const char *builder_filename, Totem *totem)
+totem_skipto_new (TotemSkiptoPlugin *plugin)
 {
 	TotemSkipto *skipto;
 	GtkWidget *container;
-	GError *error = NULL;
 
-	g_return_val_if_fail (builder_filename != NULL, NULL);
-
 	skipto = TOTEM_SKIPTO (g_object_new (TOTEM_TYPE_SKIPTO, NULL));
 
-	skipto->priv->totem = totem;
-	skipto->priv->xml = gtk_builder_new ();
-	gtk_builder_add_from_file (skipto->priv->xml, builder_filename, &error);
+	skipto->priv->totem = plugin->totem;
+	skipto->priv->xml = totem_plugin_load_interface (TOTEM_PLUGIN (plugin),
+							 "skipto.ui", TRUE,
+							 NULL, skipto);
 
 	if (skipto->priv->xml == NULL) {
 		g_object_unref (skipto);
@@ -206,7 +203,7 @@
 			0);         /* padding */
 
 	gtk_window_set_transient_for (GTK_WINDOW (skipto),
-			totem_get_main_window (totem));
+				      totem_get_main_window (plugin->totem));
 
 	gtk_widget_show_all (GTK_WIDGET (skipto));
 
Index: src/plugins/skipto/totem-skipto-plugin.h
===================================================================
--- src/plugins/skipto/totem-skipto-plugin.h	(revision 0)
+++ src/plugins/skipto/totem-skipto-plugin.h	(revision 0)
@@ -0,0 +1,66 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/* 
+ * Copyright (C) 2007 Philip Withnall <philip@tecnocode.co.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Totem project hereby grant permission for non-gpl compatible GStreamer
+ * plugins to be used and distributed together with GStreamer and Totem. This
+ * permission are above and beyond the permissions granted by the GPL license
+ * Totem is covered by.
+ *
+ * Monday 7th February 2005: Christian Schaller: Add excemption clause.
+ * See license_change file for details.
+ *
+ * Author: Bastien Nocera <hadess@hadess.net>, Philip Withnall <philip@tecnocode.co.uk>
+ */
+
+#ifndef TOTEM_SKIPTO_PLUGIN_H
+#define TOTEM_SKIPTO_PLUGIN_H
+
+#include <glib.h>
+
+#include "totem.h"
+#include "totem-plugin.h"
+
+G_BEGIN_DECLS
+
+#define TOTEM_TYPE_SKIPTO_PLUGIN		(totem_skipto_plugin_get_type ())
+#define TOTEM_SKIPTO_PLUGIN(o)			(G_TYPE_CHECK_INSTANCE_CAST ((o), TOTEM_TYPE_SKIPTO_PLUGIN, TotemSkiptoPlugin))
+#define TOTEM_SKIPTO_PLUGIN_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST((k), TOTEM_TYPE_SKIPTO_PLUGIN, TotemSkiptoPluginClass))
+#define TOTEM_IS_SKIPTO_PLUGIN(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), TOTEM_TYPE_SKIPTO_PLUGIN))
+#define TOTEM_IS_SKIPTO_PLUGIN_CLASS(k)		(G_TYPE_CHECK_CLASS_TYPE ((k), TOTEM_TYPE_SKIPTO_PLUGIN))
+#define TOTEM_SKIPTO_PLUGIN_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), TOTEM_TYPE_SKIPTO_PLUGIN, TotemSkiptoPluginClass))
+
+typedef struct TotemSkiptoPluginPrivate         TotemSkiptoPluginPrivate;
+
+typedef struct
+{
+	TotemPlugin	          parent;
+
+	TotemObject              *totem;
+	TotemSkiptoPluginPrivate *priv;
+} TotemSkiptoPlugin;
+
+typedef struct
+{
+	TotemPluginClass parent_class;
+} TotemSkiptoPluginClass;
+
+GType totem_skipto_plugin_get_type			(void) G_GNUC_CONST;
+
+G_END_DECLS
+
+#endif /* TOTEM_SKIPTO_PLUGIN_H */
Index: src/plugins/skipto/totem-skipto.h
===================================================================
--- src/plugins/skipto/totem-skipto.h	(revision 4445)
+++ src/plugins/skipto/totem-skipto.h	(working copy)
@@ -33,6 +33,7 @@
 #include <gtk/gtkdialog.h>
 
 #include "totem.h"
+#include "totem-skipto-plugin.h"
 
 G_BEGIN_DECLS
 
@@ -58,7 +59,7 @@
 };
 
 GtkType totem_skipto_get_type	(void);
-GtkWidget *totem_skipto_new	(const char *glade_filename, Totem *totem);
+GtkWidget *totem_skipto_new	(TotemSkiptoPlugin *plugin);
 gint64 totem_skipto_get_range	(TotemSkipto *skipto);
 void totem_skipto_update_range	(TotemSkipto *skipto, gint64 time);
 void totem_skipto_set_seekable	(TotemSkipto *skipto, gboolean seekable);
Index: src/plugins/skipto/totem-skipto-plugin.c
===================================================================
--- src/plugins/skipto/totem-skipto-plugin.c	(revision 4445)
+++ src/plugins/skipto/totem-skipto-plugin.c	(working copy)
@@ -29,45 +29,25 @@
 
 #include "config.h"
 
-#include <glib.h>
-#include <glib-object.h>
 #include <glib/gi18n-lib.h>
 #include <gmodule.h>
 #include <string.h>
 #include <gdk/gdkkeysyms.h>
 
-#include "totem-plugin.h"
-#include "totem.h"
+#include "totem-skipto-plugin.h"
 #include "totem-skipto.h"
 
-#define TOTEM_TYPE_SKIPTO_PLUGIN		(totem_skipto_plugin_get_type ())
-#define TOTEM_SKIPTO_PLUGIN(o)			(G_TYPE_CHECK_INSTANCE_CAST ((o), TOTEM_TYPE_SKIPTO_PLUGIN, TotemSkiptoPlugin))
-#define TOTEM_SKIPTO_PLUGIN_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST((k), TOTEM_TYPE_SKIPTO_PLUGIN, TotemSkiptoPluginClass))
-#define TOTEM_IS_SKIPTO_PLUGIN(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), TOTEM_TYPE_SKIPTO_PLUGIN))
-#define TOTEM_IS_SKIPTO_PLUGIN_CLASS(k)		(G_TYPE_CHECK_CLASS_TYPE ((k), TOTEM_TYPE_SKIPTO_PLUGIN))
-#define TOTEM_SKIPTO_PLUGIN_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), TOTEM_TYPE_SKIPTO_PLUGIN, TotemSkiptoPluginClass))
-
-typedef struct
+struct TotemSkiptoPluginPrivate
 {
-	TotemPlugin	parent;
-
-	TotemObject	*totem;
 	TotemSkipto	*st;
 	guint		handler_id_stream_length;
 	guint		handler_id_seekable;
 	guint		handler_id_key_press;
 	guint		ui_merge_id;
 	GtkActionGroup	*action_group;
-} TotemSkiptoPlugin;
+};
 
-typedef struct
-{
-	TotemPluginClass parent_class;
-} TotemSkiptoPluginClass;
-
-
 G_MODULE_EXPORT GType register_totem_plugin		(GTypeModule *module);
-GType totem_skipto_plugin_get_type			(void) G_GNUC_CONST;
 
 static void totem_skipto_plugin_init			(TotemSkiptoPlugin *plugin);
 static void totem_skipto_plugin_finalize		(GObject *object);
@@ -82,6 +62,8 @@
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 	TotemPluginClass *plugin_class = TOTEM_PLUGIN_CLASS (klass);
 
+	g_type_class_add_private (klass, sizeof (TotemSkiptoPluginPrivate));
+
 	object_class->finalize = totem_skipto_plugin_finalize;
 
 	plugin_class->activate = impl_activate;
@@ -91,16 +73,22 @@
 static void
 totem_skipto_plugin_init (TotemSkiptoPlugin *plugin)
 {
-	plugin->st = NULL;
+	plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin,
+						    TOTEM_TYPE_SKIPTO_PLUGIN,
+						    TotemSkiptoPluginPrivate);
+	plugin->priv->st = NULL;
 }
 
 static void
 destroy_dialog (TotemSkiptoPlugin *plugin)
 {
-	if (plugin->st != NULL) {
-		g_object_remove_weak_pointer (G_OBJECT (plugin->st), (gpointer *)&(plugin->st));
-		gtk_widget_destroy (GTK_WIDGET (plugin->st));
-		plugin->st = NULL;
+	TotemSkiptoPluginPrivate *priv = plugin->priv;
+
+	if (priv->st != NULL) {
+		g_object_remove_weak_pointer (G_OBJECT (priv->st),
+					      (gpointer *)&(priv->st));
+		gtk_widget_destroy (GTK_WIDGET (priv->st));
+		priv->st = NULL;
 	}
 }
 
@@ -121,19 +109,20 @@
 	gint64 time;
 	gboolean seekable;
 	GtkAction *action;
+	TotemSkiptoPluginPrivate *priv = plugin->priv;
 
 	g_object_get (G_OBJECT (totem),
 				"stream-length", &time,
 				"seekable", &seekable,
 				NULL);
 
-	if (plugin->st != NULL) {
-		totem_skipto_update_range (plugin->st, time);
-		totem_skipto_set_seekable (plugin->st, seekable);
+	if (priv->st != NULL) {
+		totem_skipto_update_range (priv->st, time);
+		totem_skipto_set_seekable (priv->st, seekable);
 	}
 
 	/* Update the action's sensitivity */
-	action = gtk_action_group_get_action (plugin->action_group, "skip-to");
+	action = gtk_action_group_get_action (priv->action_group, "skip-to");
 	gtk_action_set_sensitive (action, seekable);
 }
 
@@ -155,34 +144,36 @@
 
 	gtk_widget_hide (GTK_WIDGET (dialog));
 
-	totem_action_seek_time (plugin->totem, totem_skipto_get_range (plugin->st));
+	totem_action_seek_time (plugin->totem,
+				totem_skipto_get_range (plugin->priv->st));
 	destroy_dialog (plugin);
 }
 
 static void
 run_skip_to_dialog (TotemSkiptoPlugin *plugin)
 {
-	char *builder_path;
+	TotemSkiptoPluginPrivate *priv = plugin->priv;
 
 	if (totem_is_seekable (plugin->totem) == FALSE)
 		return;
 
-	if (plugin->st != NULL) {
-		gtk_window_present (GTK_WINDOW (plugin->st));
-		totem_skipto_set_current (plugin->st, totem_get_current_time (plugin->totem));
+	if (priv->st != NULL) {
+		gtk_window_present (GTK_WINDOW (priv->st));
+		totem_skipto_set_current (priv->st, totem_get_current_time
+					  (plugin->totem));
 		return;
 	}
 
-	builder_path = totem_plugin_find_file (TOTEM_PLUGIN (plugin), "skipto.ui");
-	plugin->st = TOTEM_SKIPTO (totem_skipto_new (builder_path, plugin->totem));
-	g_free (builder_path);
-	g_signal_connect (G_OBJECT (plugin->st), "delete-event",
-				G_CALLBACK (gtk_widget_destroy), NULL);
-	g_signal_connect (G_OBJECT (plugin->st), "response",
-				G_CALLBACK (skip_to_response_callback), plugin);
-	g_object_add_weak_pointer (G_OBJECT (plugin->st), (gpointer *)&(plugin->st));
+	priv->st = TOTEM_SKIPTO (totem_skipto_new (plugin));
+	g_signal_connect (G_OBJECT (priv->st), "delete-event",
+			  G_CALLBACK (gtk_widget_destroy), NULL);
+	g_signal_connect (G_OBJECT (priv->st), "response",
+			  G_CALLBACK (skip_to_response_callback), plugin);
+	g_object_add_weak_pointer (G_OBJECT (priv->st),
+				   (gpointer *)&(priv->st));
 	totem_skipto_update_from_state (plugin->totem, plugin);
-	totem_skipto_set_current (plugin->st, totem_get_current_time (plugin->totem));
+	totem_skipto_set_current (priv->st,
+				  totem_get_current_time (plugin->totem));
 }
 
 static void
@@ -223,12 +214,14 @@
 	GtkWindow *window;
 	GtkUIManager *manager;
 	TotemSkiptoPlugin *pi = TOTEM_SKIPTO_PLUGIN (plugin);
+	TotemSkiptoPluginPrivate *priv = pi->priv;
+
 	char *builder_path;
 	const GtkActionEntry menu_entries[] = {
 		{ "skip-to", GTK_STOCK_JUMP_TO, N_("_Skip to..."), "s", N_("Skip to a specific time"), G_CALLBACK (skip_to_action_callback) }
 	};
 
-	builder_path = totem_plugin_find_file (TOTEM_PLUGIN (plugin), "skip_to.glade");
+	builder_path = totem_plugin_find_file (TOTEM_PLUGIN (plugin), "skipto.ui");
 	if (builder_path == NULL) {
 		g_set_error (error, TOTEM_PLUGIN_ERROR, TOTEM_PLUGIN_ERROR_ACTIVATION,
 				_("Could not load the \"Skip to\" dialogue interface."));
@@ -237,36 +230,37 @@
 	g_free (builder_path);
 
 	pi->totem = totem;
-	pi->handler_id_stream_length = g_signal_connect (G_OBJECT (totem),
+	priv->handler_id_stream_length = g_signal_connect (G_OBJECT (totem),
 				"notify::stream-length",
 				G_CALLBACK (property_notify_cb),
 				pi);
-	pi->handler_id_seekable = g_signal_connect (G_OBJECT (totem),
+	priv->handler_id_seekable = g_signal_connect (G_OBJECT (totem),
 				"notify::seekable",
 				G_CALLBACK (property_notify_cb),
 				pi);
 
 	/* Key press handler */
 	window = totem_get_main_window (totem);
-	pi->handler_id_key_press = g_signal_connect (G_OBJECT(window),
+	priv->handler_id_key_press = g_signal_connect (G_OBJECT(window),
 				"key-press-event", 
 				G_CALLBACK (on_window_key_press_event),
 				pi);
 	g_object_unref (window);
 
 	/* Install the menu */
-	pi->action_group = gtk_action_group_new ("skip-to_group");
-	gtk_action_group_add_actions (pi->action_group, menu_entries,
+	priv->action_group = gtk_action_group_new ("skip-to_group");
+	gtk_action_group_add_actions (priv->action_group, menu_entries,
 				G_N_ELEMENTS (menu_entries), pi);
 
 	manager = totem_get_ui_manager (totem);
 
-	gtk_ui_manager_insert_action_group (manager, pi->action_group, -1);
-	g_object_unref (pi->action_group);
+	gtk_ui_manager_insert_action_group (manager, priv->action_group, -1);
+	g_object_unref (priv->action_group);
 
-	pi->ui_merge_id = gtk_ui_manager_new_merge_id (manager);
-	gtk_ui_manager_add_ui (manager, pi->ui_merge_id, "/ui/tmw-menubar/go/skip-forward", "skip-to", "skip-to",
-				GTK_UI_MANAGER_AUTO, TRUE);
+	priv->ui_merge_id = gtk_ui_manager_new_merge_id (manager);
+	gtk_ui_manager_add_ui (manager, priv->ui_merge_id,
+			       "/ui/tmw-menubar/go/skip-forward", "skip-to",
+			       "skip-to", GTK_UI_MANAGER_AUTO, TRUE);
 
 	totem_skipto_update_from_state (totem, pi);
 
@@ -279,20 +273,23 @@
 {
 	GtkWindow *window;
 	GtkUIManager *manager;
-	TotemSkiptoPlugin *pi = TOTEM_SKIPTO_PLUGIN (plugin);
+	TotemSkiptoPluginPrivate *priv = TOTEM_SKIPTO_PLUGIN (plugin)->priv;
 
-	g_signal_handler_disconnect (G_OBJECT (totem), pi->handler_id_stream_length);
-	g_signal_handler_disconnect (G_OBJECT (totem), pi->handler_id_seekable);
+	g_signal_handler_disconnect (G_OBJECT (totem),
+				     priv->handler_id_stream_length);
+	g_signal_handler_disconnect (G_OBJECT (totem),
+				     priv->handler_id_seekable);
 
-	if (pi->handler_id_key_press != 0) {
+	if (priv->handler_id_key_press != 0) {
 		window = totem_get_main_window (totem);
-		g_signal_handler_disconnect (G_OBJECT(window), pi->handler_id_key_press);
-		pi->handler_id_key_press = 0;
+		g_signal_handler_disconnect (G_OBJECT(window),
+					     priv->handler_id_key_press);
+		priv->handler_id_key_press = 0;
 		g_object_unref (window);
 	}
 
 	/* Remove the menu */
 	manager = totem_get_ui_manager (totem);
-	gtk_ui_manager_remove_ui (manager, pi->ui_merge_id);
-	gtk_ui_manager_remove_action_group (manager, pi->action_group);
+	gtk_ui_manager_remove_ui (manager, priv->ui_merge_id);
+	gtk_ui_manager_remove_action_group (manager, priv->action_group);
 }
Index: src/plugins/totem-plugin.h
===================================================================
--- src/plugins/totem-plugin.h	(revision 4445)
+++ src/plugins/totem-plugin.h	(working copy)
@@ -106,6 +106,12 @@
 char *		 totem_plugin_find_file		(TotemPlugin *plugin,
 						 const char *file);
 
+GtkBuilder *     totem_plugin_load_interface    (TotemPlugin *plugin,
+						 const char *name,
+						 gboolean fatal,
+						 GtkWindow *parent,
+						 gpointer user_data);
+
 GList *          totem_get_plugin_paths            (void);
 
 /*
Index: src/totem-statusbar.h
===================================================================
--- src/totem-statusbar.h	(revision 4445)
+++ src/totem-statusbar.h	(working copy)
@@ -78,10 +78,6 @@
 						 guint percentage);
 void       totem_statusbar_pop			(TotemStatusbar *statusbar);
 
-GtkWidget *totem_statusbar_new_from_glade	(gchar *widget_name,
-						 gchar *string1, gchar *string2,
-						 gint int1, gint int2);
-
 G_END_DECLS
 
 #endif /* __TOTEM_STATUSBAR_H__ */
Index: src/totem-time-label.h
===================================================================
--- src/totem-time-label.h	(revision 4445)
+++ src/totem-time-label.h	(working copy)
@@ -29,9 +29,5 @@
 					 gint64 time, gint64 length);
 void       totem_time_label_set_seeking (TotemTimeLabel *label,
            gboolean seeking);
-GtkWidget *totem_time_label_new_from_glade
-					(gchar *widget_name,
-					 gchar *string1, gchar *string2,
-					 gint int1, gint int2);
 
 #endif /* TOTEM_TIME_LABEL_H */
Index: src/totem-interface.c
===================================================================
--- src/totem-interface.c	(revision 4445)
+++ src/totem-interface.c	(working copy)
@@ -101,10 +101,22 @@
 {
 	GtkBuilder *builder = NULL;
 	char *filename;
-	GError *error = NULL;
 
 	filename = totem_interface_get_full_path (name);
+	builder = totem_interface_load_with_full_path (filename, fatal, parent,
+						       user_data);
+	g_free (filename);
 
+	return builder;
+}
+
+GtkBuilder *
+totem_interface_load_with_full_path (const char *filename, gboolean fatal, 
+				     GtkWindow *parent, gpointer user_data)
+{
+	GtkBuilder *builder = NULL;
+	GError *error = NULL;
+
 	if (filename != NULL) {
 		builder = gtk_builder_new ();
 		gtk_builder_set_translation_domain (builder, GETTEXT_PACKAGE);
@@ -114,19 +126,17 @@
 	{
 		char *msg;
 
-		msg = g_strdup_printf (_("Couldn't load the '%s' interface. %s"), name, error->message);
+		msg = g_strdup_printf (_("Couldn't load the '%s' interface. %s"), filename, error->message);
 		if (fatal == FALSE)
 			totem_interface_error (msg, _("Make sure that Totem is properly installed."), parent);
 		else
 			totem_interface_error_blocking (msg, _("Make sure that Totem is properly installed."), parent);
 
 		g_free (msg);
-		g_free (filename);
 		g_error_free (error);
 
 		return NULL;
 	}
-	g_free (filename);
 
 	gtk_builder_connect_signals (builder, user_data);
 
Index: src/totem-interface.h
===================================================================
--- src/totem-interface.h	(revision 4445)
+++ src/totem-interface.h	(working copy)
@@ -33,6 +33,10 @@
 						 gboolean fatal,
 						 GtkWindow *parent,
 						 gpointer user_data);
+GtkBuilder      *totem_interface_load_with_full_path (const char *filename, 
+						      gboolean fatal, 
+						      GtkWindow *parent,
+						      gpointer user_data);
 void		 totem_interface_error		(const char *title,
 						 const char *reason,
 						 GtkWindow *parent);
