=== removed file 'data/popup.glade'
--- data/popup.glade	2006-03-27 11:07:46 +0000
+++ data/popup.glade	1970-01-01 00:00:00 +0000
@@ -1,173 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkMenu" id="totem_right_click_menu">
-
-  <child>
-    <widget class="GtkImageMenuItem" id="trcm_play">
-      <property name="visible">True</property>
-      <property name="tooltip" translatable="yes">Play or pause the movie</property>
-      <property name="label" translatable="yes">Play / Pa_use</property>
-      <property name="use_underline">True</property>
-      <signal name="activate" handler="on_play_/_pause1_activate" last_modification_time="Fri, 18 Apr 2003 09:56:36 GMT"/>
-
-      <child internal-child="image">
-	<widget class="GtkImage" id="image7">
-	  <property name="visible">True</property>
-	  <property name="stock">gtk-media-play</property>
-	  <property name="icon_size">1</property>
-	  <property name="xalign">0.5</property>
-	  <property name="yalign">0.5</property>
-	  <property name="xpad">0</property>
-	  <property name="ypad">0</property>
-	</widget>
-      </child>
-    </widget>
-  </child>
-
-  <child>
-    <widget class="GtkImageMenuItem" id="trcm_next_chapter">
-      <property name="visible">True</property>
-      <property name="tooltip" translatable="yes">Next chapter or movie</property>
-      <property name="label" translatable="yes">_Next Chapter/Movie</property>
-      <property name="use_underline">True</property>
-      <signal name="activate" handler="on_next_chapter1_activate" last_modification_time="Fri, 18 Apr 2003 09:56:36 GMT"/>
-
-      <child internal-child="image">
-	<widget class="GtkImage" id="image1">
-	  <property name="visible">True</property>
-	  <property name="stock">gtk-media-next</property>
-	  <property name="icon_size">1</property>
-	  <property name="xalign">0.5</property>
-	  <property name="yalign">0.5</property>
-	  <property name="xpad">0</property>
-	  <property name="ypad">0</property>
-	</widget>
-      </child>
-    </widget>
-  </child>
-
-  <child>
-    <widget class="GtkImageMenuItem" id="trcm_previous_chapter">
-      <property name="visible">True</property>
-      <property name="tooltip" translatable="yes">Previous chapter or movie</property>
-      <property name="label" translatable="yes">_Previous Chapter/Movie</property>
-      <property name="use_underline">True</property>
-      <signal name="activate" handler="on_previous_chapter1_activate" last_modification_time="Fri, 18 Apr 2003 09:56:36 GMT"/>
-
-      <child internal-child="image">
-	<widget class="GtkImage" id="image2">
-	  <property name="visible">True</property>
-	  <property name="stock">gtk-media-previous</property>
-	  <property name="icon_size">1</property>
-	  <property name="xalign">0.5</property>
-	  <property name="yalign">0.5</property>
-	  <property name="xpad">0</property>
-	  <property name="ypad">0</property>
-	</widget>
-      </child>
-    </widget>
-  </child>
-
-  <child>
-    <widget class="GtkImageMenuItem" id="trcm_skip_forward">
-      <property name="visible">True</property>
-      <property name="sensitive">False</property>
-      <property name="tooltip" translatable="yes">Skip forward</property>
-      <property name="label" translatable="yes">Skip _Forward</property>
-      <property name="use_underline">True</property>
-      <signal name="activate" handler="on_skip_forward2_activate" last_modification_time="Fri, 18 Apr 2003 09:56:36 GMT"/>
-
-      <child internal-child="image">
-	<widget class="GtkImage" id="image3">
-	  <property name="visible">True</property>
-	  <property name="stock">gtk-media-forward</property>
-	  <property name="icon_size">1</property>
-	  <property name="xalign">0.5</property>
-	  <property name="yalign">0.5</property>
-	  <property name="xpad">0</property>
-	  <property name="ypad">0</property>
-	</widget>
-      </child>
-    </widget>
-  </child>
-
-  <child>
-    <widget class="GtkImageMenuItem" id="trcm_skip_backwards">
-      <property name="visible">True</property>
-      <property name="sensitive">False</property>
-      <property name="tooltip" translatable="yes">Skip backwards</property>
-      <property name="label" translatable="yes">Skip _Backwards</property>
-      <property name="use_underline">True</property>
-      <signal name="activate" handler="on_skip_backwards2_activate" last_modification_time="Fri, 18 Apr 2003 09:56:36 GMT"/>
-
-      <child internal-child="image">
-	<widget class="GtkImage" id="image4">
-	  <property name="visible">True</property>
-	  <property name="stock">gtk-media-rewind</property>
-	  <property name="icon_size">1</property>
-	  <property name="xalign">0.5</property>
-	  <property name="yalign">0.5</property>
-	  <property name="xpad">0</property>
-	  <property name="ypad">0</property>
-	</widget>
-      </child>
-    </widget>
-  </child>
-
-  <child>
-    <widget class="GtkImageMenuItem" id="trcm_volume_up">
-      <property name="visible">True</property>
-      <property name="tooltip" translatable="yes">Volume up</property>
-      <property name="label" translatable="yes">Volume Up</property>
-      <property name="use_underline">True</property>
-      <signal name="activate" handler="on_volume_up2_activate" last_modification_time="Fri, 18 Apr 2003 09:56:36 GMT"/>
-
-      <child internal-child="image">
-	<widget class="GtkImage" id="image5">
-	  <property name="visible">True</property>
-	  <property name="stock">gnome-stock-volume</property>
-	  <property name="icon_size">1</property>
-	  <property name="xalign">0.5</property>
-	  <property name="yalign">0.5</property>
-	  <property name="xpad">0</property>
-	  <property name="ypad">0</property>
-	</widget>
-      </child>
-    </widget>
-  </child>
-
-  <child>
-    <widget class="GtkImageMenuItem" id="trcm_volume_down">
-      <property name="visible">True</property>
-      <property name="label" translatable="yes">Volume Down</property>
-      <property name="use_underline">True</property>
-      <signal name="activate" handler="on_volume_down2_activate" last_modification_time="Fri, 18 Apr 2003 09:56:36 GMT"/>
-
-      <child internal-child="image">
-	<widget class="GtkImage" id="image6">
-	  <property name="visible">True</property>
-	  <property name="stock">gnome-stock-volume</property>
-	  <property name="icon_size">1</property>
-	  <property name="xalign">0.5</property>
-	  <property name="yalign">0.5</property>
-	  <property name="xpad">0</property>
-	  <property name="ypad">0</property>
-	</widget>
-      </child>
-    </widget>
-  </child>
-
-  <child>
-    <widget class="GtkMenuItem" id="trcm_show_controls">
-      <property name="tooltip" translatable="yes">Show controls</property>
-      <property name="label" translatable="yes">Show _Controls</property>
-      <property name="use_underline">True</property>
-    </widget>
-  </child>
-</widget>
-
-</glade-interface>

=== removed file 'src/egg-recent-item.c'
--- src/egg-recent-item.c	2005-08-16 19:06:39 +0000
+++ src/egg-recent-item.c	1970-01-01 00:00:00 +0000
@@ -1,426 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * 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.
- *
- * Authors:
- *   James Willcox <jwillcox@cs.indiana.edu>
- */
-
-
-#include <stdio.h>
-#include <string.h>
-#include <glib.h>
-#include <libgnomevfs/gnome-vfs.h>
-#include <libgnomevfs/gnome-vfs-mime-utils.h>
-#include "egg-recent-item.h"
-
-
-
-EggRecentItem *
-egg_recent_item_new (void)
-{
-	EggRecentItem *item;
-
-	item = g_new (EggRecentItem, 1);
-
-	item->groups = NULL;
-	item->private_data = FALSE;
-	item->uri = NULL;
-	item->mime_type = NULL;
-	item->mime_type_is_explicit = FALSE;
-
-	item->refcount = 1;
-
-	return item;
-}
-
-static void
-egg_recent_item_free (EggRecentItem *item)
-{
-	if (item->uri)
-		g_free (item->uri);
-
-	if (item->mime_type)
-		g_free (item->mime_type);
-
-	if (item->groups) {
-		g_list_foreach (item->groups, (GFunc)g_free, NULL);
-		g_list_free (item->groups);
-		item->groups = NULL;
-	}
-
-	g_free (item);
-}
-
-EggRecentItem *
-egg_recent_item_ref (EggRecentItem *item)
-{
-	item->refcount++;
-	return item;
-}
-
-EggRecentItem *
-egg_recent_item_unref (EggRecentItem *item)
-{
-	item->refcount--;
-
-	if (item->refcount == 0) {
-		egg_recent_item_free (item);
-	}
-
-	return item;
-}
-
-
-EggRecentItem * 
-egg_recent_item_new_from_uri (const gchar *uri)
-{
-	EggRecentItem *item;
-
-	g_return_val_if_fail (uri != NULL, NULL);
-
-	item = egg_recent_item_new ();
-
-	if (!egg_recent_item_set_uri (item ,uri)) {
-		egg_recent_item_free (item);
-		return NULL;
-	}
-	
-	return item;
-}
-
-static void
-egg_recent_item_update_mime_type (EggRecentItem *item)
-{
-	if (!item->mime_type_is_explicit) {
-		g_free (item->mime_type);
-		item->mime_type = NULL;
-
-		if (item->uri)
-			item->mime_type = gnome_vfs_get_mime_type (item->uri);
-
-		if (!item->mime_type)
-			item->mime_type = g_strdup (GNOME_VFS_MIME_TYPE_UNKNOWN);
-	}
-}
-
-gboolean
-egg_recent_item_set_uri (EggRecentItem *item, const gchar *uri)
-{
-	gchar *utf8_uri;
-
-	/* if G_BROKEN_FILENAMES is not set, this should succede */
-	if (g_utf8_validate (uri, -1, NULL)) {
-		item->uri = gnome_vfs_make_uri_from_input (uri);
-	} else {
-		utf8_uri = g_filename_to_utf8 (uri, -1, NULL, NULL, NULL);
-
-		if (utf8_uri == NULL) {
-			g_warning ("Couldn't convert URI to UTF-8");
-			return FALSE;
-		}
-
-		if (g_utf8_validate (utf8_uri, -1, NULL)) {
-			item->uri = gnome_vfs_make_uri_from_input (utf8_uri);
-		} else {
-			g_free (utf8_uri);
-			return FALSE;
-		}
-
-		g_free (utf8_uri);
-	}
-
-	return TRUE;
-}
-
-gchar * 
-egg_recent_item_get_uri (const EggRecentItem *item)
-{
-	return g_strdup (item->uri);
-}
-
-G_CONST_RETURN gchar * 
-egg_recent_item_peek_uri (const EggRecentItem *item)
-{
-	return item->uri;
-}
-
-gchar * 
-egg_recent_item_get_uri_utf8 (const EggRecentItem *item)
-{
-	/* this could fail, but it's not likely, since we've already done it
-	 * once in set_uri()
-	 */
-	return g_filename_to_utf8 (item->uri, -1, NULL, NULL, NULL);
-}
-
-gchar *
-egg_recent_item_get_uri_for_display (const EggRecentItem *item)
-{
-	return gnome_vfs_format_uri_for_display (item->uri);
-}
-
-/* Stolen from gnome_vfs_make_valid_utf8() */
-static char *
-make_valid_utf8 (const char *name)
-{
-	GString *string;
-	const char *remainder, *invalid;
-	int remaining_bytes, valid_bytes;
-
-	string = NULL;
-	remainder = name;
-	remaining_bytes = name ? strlen (name) : 0;
-
-	while (remaining_bytes != 0) {
-		if (g_utf8_validate (remainder, remaining_bytes, &invalid))
-			break;
-
-		valid_bytes = invalid - remainder;
-
-		if (string == NULL)
-			string = g_string_sized_new (remaining_bytes);
-
-		g_string_append_len (string, remainder, valid_bytes);
-		g_string_append_c (string, '?');
-
-		remaining_bytes -= valid_bytes + 1;
-		remainder = invalid + 1;
-	}
-
-	if (string == NULL)
-		return g_strdup (name);
-
-	g_string_append (string, remainder);
-/* 	g_string_append (string, _(" (invalid file name)")); */
-	g_assert (g_utf8_validate (string->str, -1, NULL));
-
-	return g_string_free (string, FALSE);
-}
-
-static gchar *
-get_uri_shortname_for_display (GnomeVFSURI *uri)
-{
-	gchar    *name;	
-	gboolean  validated;
-
-	validated = FALSE;
-	name = gnome_vfs_uri_extract_short_name (uri);
-	
-	if (name == NULL)
-	{
-		name = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_PASSWORD);
-	}
-	else if (g_ascii_strcasecmp (uri->method_string, "file") == 0)
-	{
-		gchar *text_uri;
-		gchar *local_file;
-		text_uri = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_PASSWORD);
-		local_file = gnome_vfs_get_local_path_from_uri (text_uri);
-		
-		if (local_file != NULL)
-		{
-			g_free (name);
-			name = g_filename_display_basename (local_file);
-			validated = TRUE;
-		}
-		
-		g_free (local_file);
-		g_free (text_uri);
-	} 
-	else if (!gnome_vfs_uri_has_parent (uri)) 
-	{
-		const gchar *method;
-		
-		method = uri->method_string;
-		
-		if (name == NULL ||
-		    strcmp (name, GNOME_VFS_URI_PATH_STR) == 0) 
-		{
-			g_free (name);
-			name = g_strdup (method);
-		} 
-		else 
-		{
-			gchar *tmp;
-			
-			tmp = name;
-			name = g_strdup_printf ("%s: %s", method, name);
-			g_free (tmp);
-		}
-	}
-
-	if (!validated && !g_utf8_validate (name, -1, NULL)) 
-	{
-		gchar *utf8_name;
-		
-		utf8_name = make_valid_utf8 (name);
-		g_free (name);
-		name = utf8_name;
-	}
-
-	return name;
-}
-
-/**
- * egg_recent_item_get_short_name:
- * @item: an #EggRecentItem
- *
- * Computes a valid UTF-8 string that can be used as the name of the item in a
- * menu or list.  For example, calling this function on an item that refers to
- * "file:///foo/bar.txt" will yield "bar.txt".
- *
- * Return value: A newly-allocated string in UTF-8 encoding; free it with
- * g_free().
- **/
-gchar *
-egg_recent_item_get_short_name (const EggRecentItem *item)
-{
-	GnomeVFSURI *uri;
-	gchar *short_name;
-
-	g_return_val_if_fail (item != NULL, NULL);
-
-	if (item->uri == NULL)
-		return NULL;
-
-	uri = gnome_vfs_uri_new (item->uri);
-	if (uri == NULL)
-		return NULL;
-
-	short_name = get_uri_shortname_for_display (uri);
-
-	gnome_vfs_uri_unref (uri);
-
-	return short_name;
-}
-
-void 
-egg_recent_item_set_mime_type (EggRecentItem *item, const gchar *mime)
-{
-	g_free (item->mime_type);
-	item->mime_type = NULL;
-
-	if (mime && mime[0]) {
-		item->mime_type_is_explicit = TRUE;
-		item->mime_type             = g_strdup (mime);
-	} else {
-		item->mime_type_is_explicit = FALSE;
-	}
-}
-
-gchar * 
-egg_recent_item_get_mime_type (EggRecentItem *item)
-{
-	egg_recent_item_update_mime_type (item);
-
-	return g_strdup (item->mime_type);
-}
-
-void 
-egg_recent_item_set_timestamp (EggRecentItem *item, time_t timestamp)
-{
-	if (timestamp == (time_t) -1)
-		time (&timestamp);
-
-	item->timestamp = timestamp;
-}
-
-time_t 
-egg_recent_item_get_timestamp (const EggRecentItem *item)
-{
-	return item->timestamp;
-}
-
-G_CONST_RETURN GList *
-egg_recent_item_get_groups (const EggRecentItem *item)
-{
-	return item->groups;
-}
-
-gboolean
-egg_recent_item_in_group (const EggRecentItem *item, const gchar *group_name)
-{
-	GList *tmp;
-
-	tmp = item->groups;
-	while (tmp != NULL) {
-		gchar *val = (gchar *)tmp->data;
-		
-		if (strcmp (group_name, val) == 0)
-			return TRUE;
-
-		tmp = tmp->next;
-	}
-	
-	return FALSE;
-}
-
-void
-egg_recent_item_add_group (EggRecentItem *item, const gchar *group_name)
-{
-	g_return_if_fail (group_name != NULL);
-
-	if (!egg_recent_item_in_group (item, group_name))
-		item->groups = g_list_append (item->groups, g_strdup (group_name));
-}
-
-void
-egg_recent_item_remove_group (EggRecentItem *item, const gchar *group_name)
-{
-	GList *tmp;
-
-	g_return_if_fail (group_name != NULL);
-
-	tmp = item->groups;
-	while (tmp != NULL) {
-		gchar *val = (gchar *)tmp->data;
-		
-		if (strcmp (group_name, val) == 0) {
-			item->groups = g_list_remove (item->groups,
-						      val);
-			g_free (val);
-			break;
-		}
-
-		tmp = tmp->next;
-	}
-}
-
-void
-egg_recent_item_set_private (EggRecentItem *item, gboolean priv)
-{
-	item->private_data = priv;
-}
-
-gboolean
-egg_recent_item_get_private (const EggRecentItem *item)
-{
-	return item->private_data;
-}
-
-GType
-egg_recent_item_get_type (void)
-{
-	static GType boxed_type = 0;
-	
-	if (!boxed_type) {
-		boxed_type = g_boxed_type_register_static ("EggRecentItem",
-					(GBoxedCopyFunc)egg_recent_item_ref,
-					(GBoxedFreeFunc)egg_recent_item_unref);
-	}
-	
-	return boxed_type;
-}

=== removed file 'src/egg-recent-item.h'
--- src/egg-recent-item.h	2005-02-03 17:28:52 +0000
+++ src/egg-recent-item.h	1970-01-01 00:00:00 +0000
@@ -1,80 +0,0 @@
-
-#ifndef __EGG_RECENT_ITEM_H__
-#define __EGG_RECENT_ITEM_H__
-
-#include <time.h>
-#include <glib.h>
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-#define EGG_TYPE_RECENT_ITEM       (egg_recent_item_get_type ())
-
-#define EGG_RECENT_ITEM_LIST_UNREF(list) \
-	g_list_foreach (list, (GFunc)egg_recent_item_unref, NULL); \
-	g_list_free (list);
-
-typedef struct _EggRecentItem EggRecentItem;
-
-struct _EggRecentItem {
-	/* do not access any of these directly */
-	gchar *uri;
-	gchar *mime_type;
-	time_t timestamp;
-
-	gboolean private_data;
-
-	GList *groups;
-	
-	int refcount;
-
-	guint mime_type_is_explicit : 1;
-};
-
-GType		egg_recent_item_get_type (void) G_GNUC_CONST;
-
-/* constructors */
-EggRecentItem * egg_recent_item_new (void);
-
-EggRecentItem *	egg_recent_item_ref (EggRecentItem *item);
-EggRecentItem *	egg_recent_item_unref (EggRecentItem *item);
-
-/* automatically fetches the mime type, etc */
-EggRecentItem * egg_recent_item_new_from_uri (const gchar *uri);
-
-gboolean egg_recent_item_set_uri (EggRecentItem *item, const gchar *uri);
-gchar * egg_recent_item_get_uri (const EggRecentItem *item);
-gchar * egg_recent_item_get_uri_utf8 (const EggRecentItem *item);
-gchar * egg_recent_item_get_uri_for_display (const EggRecentItem *item);
-gchar * egg_recent_item_get_short_name (const EggRecentItem *item);
-
-void egg_recent_item_set_mime_type (EggRecentItem *item, const gchar *mime);
-gchar * egg_recent_item_get_mime_type (EggRecentItem *item);
-
-void egg_recent_item_set_timestamp (EggRecentItem *item, time_t timestamp);
-time_t egg_recent_item_get_timestamp (const EggRecentItem *item);
-
-G_CONST_RETURN gchar *egg_recent_item_peek_uri (const EggRecentItem *item);
-
-
-/* groups */
-G_CONST_RETURN GList *  egg_recent_item_get_groups (const EggRecentItem *item);
-
-gboolean       egg_recent_item_in_group (const EggRecentItem *item,
-					   const gchar *group_name);
-
-void           egg_recent_item_add_group (EggRecentItem *item,
-					    const gchar *group_name);
-
-void           egg_recent_item_remove_group (EggRecentItem *item,
-					       const gchar *group_name);
-
-void           egg_recent_item_set_private (EggRecentItem *item,
-					      gboolean priv);
-
-gboolean       egg_recent_item_get_private (const EggRecentItem *item);
-
-
-G_END_DECLS
-
-#endif /* __EGG_RECENT_ITEM_H__ */

=== removed file 'src/egg-recent-model.c'
--- src/egg-recent-model.c	2006-01-10 11:55:18 +0000
+++ src/egg-recent-model.c	1970-01-01 00:00:00 +0000
@@ -1,1963 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * 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.
- *
- * Authors:
- *   James Willcox <jwillcox@cs.indiana.edu>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <gtk/gtk.h>
-#include <libgnomevfs/gnome-vfs.h>
-#include <libgnomevfs/gnome-vfs-mime-utils.h>
-#include <gconf/gconf-client.h>
-#include "egg-recent-model.h"
-#include "egg-recent-item.h"
-
-#define EGG_RECENT_MODEL_FILE_PATH "/.recently-used"
-#define EGG_RECENT_MODEL_BUFFER_SIZE 8192
-
-#define EGG_RECENT_MODEL_MAX_ITEMS 500
-#define EGG_RECENT_MODEL_DEFAULT_LIMIT 10
-#define EGG_RECENT_MODEL_TIMEOUT_LENGTH 200
-#define EGG_RECENT_MODEL_POLL_TIME 3
-
-/* needed for Darwin */
-#if !HAVE_DECL_LOCKF
-int lockf (int filedes, int function, off_t size);
-#endif
-
-#define EGG_RECENT_MODEL_KEY_DIR "/desktop/gnome/recent_files"
-#define EGG_RECENT_MODEL_DEFAULT_LIMIT_KEY EGG_RECENT_MODEL_KEY_DIR "/default_limit"
-#define EGG_RECENT_MODEL_EXPIRE_KEY EGG_RECENT_MODEL_KEY_DIR "/expire"
-
-struct _EggRecentModelPrivate {
-	GSList *mime_filter_values;	/* list of mime types we allow */
-	GSList *group_filter_values;	/* list of groups we allow */
-	GSList *scheme_filter_values;	/* list of URI schemes we allow */
-
-	EggRecentModelSort sort_type; /* type of sorting to be done */
-
-	int limit;			/* soft limit for length of the list */
-	int expire_days;		/* number of days to hold an item */
-
-	char *path;			/* path to the file we store stuff in */
-
-	GHashTable *monitors;
-
-	GnomeVFSMonitorHandle *monitor;
-
-	GConfClient *client;
-	gboolean use_default_limit;
-
-	guint limit_change_notify_id;
-	guint expiration_change_notify_id;
-
-	guint changed_timeout;
-	guint poll_timeout;
-	time_t last_mtime;
-};
-
-/* signals */
-enum {
-	CHANGED,
-	LAST_SIGNAL
-};
-
-static GType model_signals[LAST_SIGNAL] = { 0 };
-
-/* properties */
-enum {
-	PROP_BOGUS,
-	PROP_MIME_FILTERS,
-	PROP_GROUP_FILTERS,
-	PROP_SCHEME_FILTERS,
-	PROP_SORT_TYPE,
-	PROP_LIMIT
-};
-
-typedef struct {
-	GSList *states;
-	GList *items;
-	EggRecentItem *current_item;
-} ParseInfo;
-
-typedef enum {
-	STATE_START,
-	STATE_RECENT_FILES,
-	STATE_RECENT_ITEM,
-	STATE_URI,
-	STATE_MIME_TYPE,
-	STATE_TIMESTAMP,
-	STATE_PRIVATE,
-	STATE_GROUPS,
-	STATE_GROUP
-} ParseState;
-
-typedef struct {
-	EggRecentModel *model;
-	GList *list;
-} ChangedData;
-
-#define TAG_RECENT_FILES "RecentFiles"
-#define TAG_RECENT_ITEM "RecentItem"
-#define TAG_URI "URI"
-#define TAG_MIME_TYPE "Mime-Type"
-#define TAG_TIMESTAMP "Timestamp"
-#define TAG_PRIVATE "Private"
-#define TAG_GROUPS "Groups"
-#define TAG_GROUP "Group"
-
-static void start_element_handler (GMarkupParseContext *context,
-			      const gchar *element_name,
-			      const gchar **attribute_names,
-			      const gchar **attribute_values,
-			      gpointer user_data,
-			      GError **error);
-
-static void end_element_handler (GMarkupParseContext *context,
-			    const gchar *element_name,
-			    gpointer user_data,
-			    GError **error);
-
-static void text_handler (GMarkupParseContext *context,
-		     const gchar *text,
-		     gsize text_len,
-		     gpointer user_data,
-		     GError **error);
-
-static void error_handler (GMarkupParseContext *context,
-		      GError *error,
-		      gpointer user_data);
-
-static GMarkupParser parser = {start_element_handler, end_element_handler,
-			text_handler,
-			NULL,
-			error_handler};
-
-static GObjectClass *parent_class;
-
-static void egg_recent_model_clear_mime_filter (EggRecentModel *model);
-static void egg_recent_model_clear_group_filter (EggRecentModel *model);
-static void egg_recent_model_clear_scheme_filter (EggRecentModel *model);
-
-static GObjectClass *parent_class;
-
-static gboolean
-egg_recent_model_string_match (const GSList *list, const gchar *str)
-{
-	const GSList *tmp;
-
-	if (list == NULL || str == NULL)
-		return TRUE;
-
-	tmp = list;
-	
-	while (tmp) {
-		if (g_pattern_match_string (tmp->data, str))
-			return TRUE;
-		
-		tmp = tmp->next;
-	}
-
-	return FALSE;
-}
-
-static gboolean
-egg_recent_model_write_raw (EggRecentModel *model, FILE *file,
-			      const gchar *content)
-{
-	int len;
-	int fd;
-	struct stat sbuf;
-
-	rewind (file);
-
-	len = strlen (content);
-	fd = fileno (file);
-
-	if (fstat (fd, &sbuf) < 0)
-		g_warning ("Couldn't stat XML document.");
-
-	if ((off_t)len < sbuf.st_size) {
-		ftruncate (fd, len);
-	}
-
-	if (fputs (content, file) == EOF)
-		return FALSE;
-
-#ifndef G_OS_WIN32
-	fsync (fd);
-#endif
-	rewind (file);
-
-	return TRUE;
-}
-
-static GList *
-egg_recent_model_delete_from_list (GList *list,
-				       const gchar *uri)
-{
-	GList *tmp;
-
-	if (!uri)
-		return list;
-
-	tmp = list;
-
-	while (tmp) {
-		EggRecentItem *item = tmp->data;
-		GList         *next;
-
-		next = tmp->next;
-
-		if (!strcmp (egg_recent_item_peek_uri (item), uri)) {
-			egg_recent_item_unref (item);
-
-			list = g_list_remove_link (list, tmp);
-			g_list_free_1 (tmp);
-		}
-
-		tmp = next;
-	}
-
-	return list;
-}
-
-static void
-egg_recent_model_add_new_groups (EggRecentItem *item,
-				 EggRecentItem *upd_item)
-{
-	const GList *tmp;
-
-	tmp = egg_recent_item_get_groups (upd_item);
-
-	while (tmp) {
-		char *group = tmp->data;
-
-		if (!egg_recent_item_in_group (item, group))
-			egg_recent_item_add_group (item, group);
-
-		tmp = tmp->next;
-	}
-}
-
-static gboolean
-egg_recent_model_update_item (GList *items, EggRecentItem *upd_item)
-{
-	GList      *tmp;
-	const char *uri;
-
-	uri = egg_recent_item_peek_uri (upd_item);
-
-	tmp = items;
-
-	while (tmp) {
-		EggRecentItem *item = tmp->data;
-
-		if (gnome_vfs_uris_match (egg_recent_item_peek_uri (item), uri)) {
-			egg_recent_item_set_timestamp (item, (time_t) -1);
-
-			egg_recent_model_add_new_groups (item, upd_item);
-
-			return TRUE;
-		}
-
-		tmp = tmp->next;
-	}
-
-	return FALSE;
-}
-
-static gchar *
-egg_recent_model_read_raw (EggRecentModel *model, FILE *file)
-{
-	GString *string;
-	char buf[EGG_RECENT_MODEL_BUFFER_SIZE];
-
-	rewind (file);
-
-	string = g_string_new (NULL);
-	while (fgets (buf, EGG_RECENT_MODEL_BUFFER_SIZE, file)) {
-		string = g_string_append (string, buf);
-	}
-
-	rewind (file);
-
-	return g_string_free (string, FALSE);
-}
-
-
-
-static ParseInfo *
-parse_info_init (void)
-{
-	ParseInfo *retval;
-	
-	retval = g_new0 (ParseInfo, 1);
-	retval->states = g_slist_prepend (NULL, STATE_START);
-	retval->items = NULL;
-	
-	return retval;
-}
-
-static void
-parse_info_free (ParseInfo *info)
-{
-	g_slist_free (info->states);
-	g_free (info);
-}
-
-static void
-push_state (ParseInfo  *info,
-            ParseState  state)
-{
-  info->states = g_slist_prepend (info->states, GINT_TO_POINTER (state));
-}
-
-static void
-pop_state (ParseInfo *info)
-{
-  g_return_if_fail (info->states != NULL);
-
-  info->states = g_slist_remove (info->states, info->states->data);
-}
-
-static ParseState
-peek_state (ParseInfo *info)
-{
-  g_return_val_if_fail (info->states != NULL, STATE_START);
-
-  return GPOINTER_TO_INT (info->states->data);
-}
-
-#define ELEMENT_IS(name) (strcmp (element_name, (name)) == 0)
-
-static gboolean
-valid_element (ParseInfo    *info,
-	       int           valid_parent_state,
-	       const gchar  *element_name,
-	       const gchar  *valid_element,
-	       GError      **error)
-{
-	if (peek_state (info) != valid_parent_state) {
-	      g_set_error (error,
-			   G_MARKUP_ERROR,
-			   G_MARKUP_ERROR_INVALID_CONTENT,
-			   "Unexpected tag '%s', tag '%s' expected",
-			   element_name, valid_element);
-	      return FALSE;
-	}
-
-	return TRUE;
-}
-
-static void
-start_element_handler (GMarkupParseContext *context,
-			      const gchar *element_name,
-			      const gchar **attribute_names,
-			      const gchar **attribute_values,
-			      gpointer user_data,
-			      GError **error)
-{
-	ParseInfo *info = (ParseInfo *)user_data;
-
-	if (ELEMENT_IS (TAG_RECENT_FILES))
-		push_state (info, STATE_RECENT_FILES);
-	else if (ELEMENT_IS (TAG_RECENT_ITEM)) {
-		if (valid_element (info, STATE_RECENT_FILES,
-				   TAG_RECENT_ITEM, TAG_RECENT_FILES, error)) {
-			info->current_item = egg_recent_item_new ();
-			push_state (info, STATE_RECENT_ITEM);
-		}
-	} else if (ELEMENT_IS (TAG_URI)) {
-		if (valid_element (info, STATE_RECENT_ITEM,
-				   TAG_URI, TAG_RECENT_ITEM, error)) {
-			push_state (info, STATE_URI);
-		}
-	} else if (ELEMENT_IS (TAG_MIME_TYPE)) {
-		if (valid_element (info, STATE_RECENT_ITEM,
-				   TAG_MIME_TYPE, TAG_RECENT_ITEM, error)) {
-			push_state (info, STATE_MIME_TYPE);
-		}
-	} else if (ELEMENT_IS (TAG_TIMESTAMP)) {
-		if (valid_element (info, STATE_RECENT_ITEM,
-				   TAG_TIMESTAMP, TAG_RECENT_ITEM, error)) {
-			push_state (info, STATE_TIMESTAMP);
-		}
-	} else if (ELEMENT_IS (TAG_PRIVATE)) {
-		if (valid_element (info, STATE_RECENT_ITEM,
-				   TAG_PRIVATE, TAG_RECENT_ITEM, error)) {
-			push_state (info, STATE_PRIVATE);
-			egg_recent_item_set_private (info->current_item, TRUE);
-		}
-	} else if (ELEMENT_IS (TAG_GROUPS)) {
-		if (valid_element (info, STATE_RECENT_ITEM,
-				   TAG_GROUPS, TAG_RECENT_ITEM, error)) {
-			push_state (info, STATE_GROUPS);
-		}
-	} else if (ELEMENT_IS (TAG_GROUP)) {
-		if (valid_element (info, STATE_GROUPS,
-				   TAG_GROUP, TAG_GROUPS, error)) {
-			push_state (info, STATE_GROUP);
-		}
-	}
-}
-
-static gint
-list_compare_func_mru (gpointer a, gpointer b)
-{
-	EggRecentItem *item_a = (EggRecentItem *)a;
-	EggRecentItem *item_b = (EggRecentItem *)b;
-
-	return item_a->timestamp < item_b->timestamp;
-}
-
-static gint
-list_compare_func_lru (gpointer a, gpointer b)
-{
-	EggRecentItem *item_a = (EggRecentItem *)a;
-	EggRecentItem *item_b = (EggRecentItem *)b;
-
-	return item_a->timestamp > item_b->timestamp;
-}
-
-
-
-static void
-end_element_handler (GMarkupParseContext *context,
-			    const gchar *element_name,
-			    gpointer user_data,
-			    GError **error)
-{
-	ParseInfo *info = (ParseInfo *)user_data;
-
-	switch (peek_state (info)) {
-		case STATE_RECENT_ITEM:
-			if (!info->current_item) {
-				g_warning ("No recent item found\n");
-				break;
-			}
-
-			if (!info->current_item->uri) {
-				g_warning ("Invalid item found\n");
-				break;
-			}
-				
-			info->items = g_list_prepend (info->items,
-			                              info->current_item);
-			info->current_item = NULL;
-			break;
-		default:
-			break;
-	}
-
-	pop_state (info);
-}
-
-static void
-text_handler (GMarkupParseContext *context,
-		     const gchar *text,
-		     gsize text_len,
-		     gpointer user_data,
-		     GError **error)
-{
-	ParseInfo *info = (ParseInfo *)user_data;
-	gchar *value;
-
-	value = g_strndup (text, text_len);
-
-	switch (peek_state (info)) {
-		case STATE_START:
-		case STATE_RECENT_FILES:
-		case STATE_RECENT_ITEM:
-		case STATE_PRIVATE:
-		case STATE_GROUPS:
-		break;
-		case STATE_URI:
-			egg_recent_item_set_uri (info->current_item, value);
-		break;
-		case STATE_MIME_TYPE:
-			egg_recent_item_set_mime_type (info->current_item, value);
-		break;
-		case STATE_TIMESTAMP:
-			egg_recent_item_set_timestamp (info->current_item,
-							 (time_t)atoi (value));
-		break;
-		case STATE_GROUP:
-			egg_recent_item_add_group (info->current_item,
-						     text);
-		break;
-	}
-
-	g_free (value);
-}
-
-static void
-error_handler (GMarkupParseContext *context,
-		      GError *error,
-		      gpointer user_data)
-{
-	g_warning ("Error in parse: %s", error->message);
-}
-
-static void
-egg_recent_model_enforce_limit (GList *list, int limit)
-{
-	int len;
-	GList *end;
-
-	/* limit < 0 means unlimited */
-	if (limit <= 0)
-		return;
-
-	len = g_list_length (list);
-
-	if (len > limit) {
-		GList *next;
-
-		end = g_list_nth (list, limit-1);
-		next = end->next;
-
-		end->next = NULL;
-
-		EGG_RECENT_ITEM_LIST_UNREF (next);
-	}
-}
-
-static GList *
-egg_recent_model_sort (EggRecentModel *model, GList *list)
-{
-	switch (model->priv->sort_type) {
-		case EGG_RECENT_MODEL_SORT_MRU:
-			list = g_list_sort (list,
-					(GCompareFunc)list_compare_func_mru);	
-		break;
-		case EGG_RECENT_MODEL_SORT_LRU:
-			list = g_list_sort (list,
-					(GCompareFunc)list_compare_func_lru);
-		break;
-		case EGG_RECENT_MODEL_SORT_NONE:
-		break;
-	}
-
-	return list;
-}
-
-static gboolean
-egg_recent_model_group_match (EggRecentItem *item, GSList *groups)
-{
-	GSList *tmp;
-
-	tmp = groups;
-
-	while (tmp != NULL) {
-		const gchar * group = (const gchar *)tmp->data;
-
-		if (egg_recent_item_in_group (item, group))
-			return TRUE;
-
-		tmp = tmp->next;
-	}
-
-	return FALSE;
-}
-
-static GList *
-egg_recent_model_filter (EggRecentModel *model, GList *list)
-{
-	GList *newlist = NULL;
-	GList *l;
-	gchar *mime_type;
-	gchar *uri;
-
-	g_return_val_if_fail (list != NULL, NULL);
-
-	for (l = list; l != NULL ; l = l->next) {
-		EggRecentItem *item = (EggRecentItem *) l->data;
-		gboolean pass_mime_test = FALSE;
-		gboolean pass_group_test = FALSE;
-		gboolean pass_scheme_test = FALSE;
-
-		g_assert (item != NULL);
-		
-		uri = egg_recent_item_get_uri (item);
-
-		/* filter by mime type */
-		if (model->priv->mime_filter_values != NULL) {
-			mime_type = egg_recent_item_get_mime_type (item);
-
-			if (egg_recent_model_string_match
-					(model->priv->mime_filter_values,
-					 mime_type))
-				pass_mime_test = TRUE;
-
-			g_free (mime_type);
-		} else
-			pass_mime_test = TRUE;
-
-		/* filter by group */
-		if (pass_mime_test && model->priv->group_filter_values != NULL) {
-			if (egg_recent_model_group_match
-					(item, model->priv->group_filter_values))
-				pass_group_test = TRUE;
-		} else if (egg_recent_item_get_private (item)) {
-			pass_group_test = FALSE;
-		} else
-			pass_group_test = TRUE;
-
-		/* filter by URI scheme */
-		if (pass_mime_test && pass_group_test &&
-		    model->priv->scheme_filter_values != NULL) {
-			gchar *scheme;
-			
-			scheme = gnome_vfs_get_uri_scheme (uri);
-
-			if (egg_recent_model_string_match
-				(model->priv->scheme_filter_values, scheme))
-				pass_scheme_test = TRUE;
-
-			g_free (scheme);
-		} else
-			pass_scheme_test = TRUE;
-
-		if (pass_mime_test && pass_group_test && pass_scheme_test)
-			newlist = g_list_prepend (newlist, item);
-		else
-			egg_recent_item_unref (item);
-
-		g_free (uri);
-	}
-
-	g_list_free (list);
-
-	return g_list_reverse (newlist);
-}
-
-
-
-#if 0
-static void
-egg_recent_model_monitor_list_cb (GnomeVFSMonitorHandle *handle,
-			       const gchar *monitor_uri,
-			       const gchar *info_uri,
-			       GnomeVFSMonitorEventType event_type,
-			       gpointer user_data)
-{
-	EggRecentModel *model;
-
-	model = EGG_RECENT_MODEL (user_data);
-
-	if (event_type == GNOME_VFS_MONITOR_EVENT_DELETED) {
-		egg_recent_model_delete (model, monitor_uri);
-		g_hash_table_remove (model->priv->monitors, monitor_uri);
-	}
-}
-
-
-
-static void
-egg_recent_model_monitor_list (EggRecentModel *model, GList *list)
-{
-	GList *tmp;
-
-	tmp = list;
-	while (tmp) {
-		EggRecentItem *item = (EggRecentItem *)tmp->data;
-		GnomeVFSMonitorHandle *handle;
-		GnomeVFSResult res;
-		gchar *uri;
-
-		tmp = tmp->next;
-		
-		uri = egg_recent_item_get_uri (item);
-		if (g_hash_table_lookup (model->priv->monitors, uri)) {
-			/* already monitoring this one */
-			g_free (uri);
-			continue;
-		}
-
-		res = gnome_vfs_monitor_add (&handle, uri,
-					     GNOME_VFS_MONITOR_FILE,
-					     egg_recent_model_monitor_list_cb,
-					     model);
-		
-		if (res == GNOME_VFS_OK)
-			g_hash_table_insert (model->priv->monitors, uri, handle);
-		else
-			g_free (uri);
-	}
-}
-#endif
-
-
-static gboolean
-egg_recent_model_changed_timeout (EggRecentModel *model)
-{
-	model->priv->changed_timeout = 0;
-
-	egg_recent_model_changed (model);
-
-	return FALSE;
-}
-
-static void
-egg_recent_model_monitor_cb (GnomeVFSMonitorHandle *handle,
-			       const gchar *monitor_uri,
-			       const gchar *info_uri,
-			       GnomeVFSMonitorEventType event_type,
-			       gpointer user_data)
-{
-	EggRecentModel *model;
-
-	g_return_if_fail (user_data != NULL);
-	g_return_if_fail (EGG_IS_RECENT_MODEL (user_data));
-	model = EGG_RECENT_MODEL (user_data);
-
-	if (event_type == GNOME_VFS_MONITOR_EVENT_CHANGED ||
-	    event_type == GNOME_VFS_MONITOR_EVENT_CREATED ||
-	    event_type == GNOME_VFS_MONITOR_EVENT_DELETED) {
-		if (model->priv->changed_timeout > 0) {
-			g_source_remove (model->priv->changed_timeout);
-		}
-
-		model->priv->changed_timeout = g_timeout_add (
-			EGG_RECENT_MODEL_TIMEOUT_LENGTH,
-			(GSourceFunc)egg_recent_model_changed_timeout,
-			model);
-	}
-}
-
-static gboolean
-egg_recent_model_poll_timeout (gpointer user_data)
-{
-	EggRecentModel *model;
-	struct stat stat_buf;
-	int stat_res;
-
-	model = EGG_RECENT_MODEL (user_data);
-	stat_res = stat (model->priv->path, &stat_buf);
-
-	if (!stat_res && stat_buf.st_mtime &&  
-	    stat_buf.st_mtime != model->priv->last_mtime) {
-		model->priv->last_mtime = stat_buf.st_mtime;
-		
-		if (model->priv->changed_timeout > 0)
-			g_source_remove (model->priv->changed_timeout);
-		
-		model->priv->changed_timeout = g_timeout_add (
-			EGG_RECENT_MODEL_TIMEOUT_LENGTH,
-			(GSourceFunc)egg_recent_model_changed_timeout,
-			model);
-	}
-	return TRUE;
-}
-
-static void
-egg_recent_model_monitor (EggRecentModel *model, gboolean should_monitor)
-{
-	if (should_monitor && model->priv->monitor == NULL) {
-		char *uri;
-		GnomeVFSResult result;
-
-		uri = gnome_vfs_get_uri_from_local_path (model->priv->path);
-
-		result = gnome_vfs_monitor_add (&model->priv->monitor,
-				       		uri,
-				       		GNOME_VFS_MONITOR_FILE,
-				       		egg_recent_model_monitor_cb,
-				       		model);
-
-		g_free (uri);
-
-		/* if the above fails, don't worry about it.
-		 * local notifications will still happen
-		 */
-		if (result == GNOME_VFS_ERROR_NOT_SUPPORTED) {
-			if (model->priv->poll_timeout > 0)
-				g_source_remove (model->priv->poll_timeout);
-			
-			model->priv->poll_timeout = g_timeout_add (
-				EGG_RECENT_MODEL_POLL_TIME * 1000,
-				egg_recent_model_poll_timeout,
-				model);
-		}
-
-	} else if (!should_monitor && model->priv->monitor != NULL) {
-		gnome_vfs_monitor_cancel (model->priv->monitor);
-		model->priv->monitor = NULL;
-	}
-}
-
-static void
-egg_recent_model_set_limit_internal (EggRecentModel *model, int limit)
-{
-	model->priv->limit = limit;
-
-	if (limit <= 0)
-		egg_recent_model_monitor (model, FALSE);
-	else {
-		egg_recent_model_monitor (model, TRUE);
-		egg_recent_model_changed (model);
-	}
-}
-
-static GList *
-egg_recent_model_read (EggRecentModel *model, FILE *file)
-{
-	GList *list=NULL;
-	gchar *content;
-	GMarkupParseContext *ctx;
-	ParseInfo *info;
-	GError *error;
-
-	content = egg_recent_model_read_raw (model, file);
-
-	if (strlen (content) <= 0) {
-		g_free (content);
-		return NULL;
-	}
-
-	info = parse_info_init ();
-	
-	ctx = g_markup_parse_context_new (&parser, 0, info, NULL);
-	
-	error = NULL;
-	if (!g_markup_parse_context_parse (ctx, content, strlen (content), &error)) {
-		g_warning ("Error while parsing the .recently-used file: %s\n",
-			   error->message);
-		
-		g_error_free (error);
-		parse_info_free (info);
-
-		return NULL;
-	}
-
-	error = NULL;
-	if (!g_markup_parse_context_end_parse (ctx, &error)) {
-		g_warning ("Unable to complete parsing of the .recently-used file: %s\n",
-			   error->message);
-		
-		g_error_free (error);
-		g_markup_parse_context_free (ctx);
-		parse_info_free (info);
-
-		return NULL;
-	}
-	
-	list = g_list_reverse (info->items);
-
-	g_markup_parse_context_free (ctx);
-	parse_info_free (info);
-	g_free (content);
-
-	return list;
-}
-
-
-static gboolean
-egg_recent_model_write (EggRecentModel *model, FILE *file, GList *list)
-{
-	GString *string;
-	gchar *data;
-	EggRecentItem *item;
-	const GList *groups;
-	int i;
-	int ret;
-	
-	string = g_string_new ("<?xml version=\"1.0\"?>\n");
-	string = g_string_append (string, "<" TAG_RECENT_FILES ">\n");
-
-	i=0;
-	while (list) {
-		gchar *uri;
-		gchar *mime_type;
-		gchar *escaped_uri;
-		time_t timestamp;
-		item = (EggRecentItem *)list->data;
-
-
-		uri = egg_recent_item_get_uri_utf8 (item);
-		escaped_uri = g_markup_escape_text (uri,
-						    strlen (uri));
-		g_free (uri);
-
-		mime_type = egg_recent_item_get_mime_type (item);
-		timestamp = egg_recent_item_get_timestamp (item);
-		
-		string = g_string_append (string, "  <" TAG_RECENT_ITEM ">\n");
-
-		g_string_append_printf (string,
-				"    <" TAG_URI ">%s</" TAG_URI ">\n", escaped_uri);
-
-		if (mime_type)
-			g_string_append_printf (string,
-				"    <" TAG_MIME_TYPE ">%s</" TAG_MIME_TYPE ">\n", mime_type);
-		else
-			g_string_append_printf (string,
-				"    <" TAG_MIME_TYPE "></" TAG_MIME_TYPE ">\n");
-
-		
-		g_string_append_printf (string,
-				"    <" TAG_TIMESTAMP ">%d</" TAG_TIMESTAMP ">\n", (int)timestamp);
-
-		if (egg_recent_item_get_private (item))
-			string = g_string_append (string,
-					"    <" TAG_PRIVATE "/>\n");
-
-		/* write the groups */
-		string = g_string_append (string,
-				"    <" TAG_GROUPS ">\n");
-		groups = egg_recent_item_get_groups (item);
-
-		if (groups == NULL && egg_recent_item_get_private (item))
-			g_warning ("Item with URI \"%s\" marked as private, but"
-				   " does not belong to any groups.\n", uri);
-		
-		while (groups) {
-			const gchar *group = (const gchar *)groups->data;
-			gchar *escaped_group;
-
-			escaped_group = g_markup_escape_text (group, strlen(group));
-
-			g_string_append_printf (string,
-					"      <" TAG_GROUP ">%s</" TAG_GROUP ">\n",
-					escaped_group);
-
-			g_free (escaped_group);
-
-			groups = groups->next;
-		}
-		
-		string = g_string_append (string, "    </" TAG_GROUPS ">\n");
-
-		string = g_string_append (string,
-				"  </" TAG_RECENT_ITEM ">\n");
-
-		g_free (mime_type);
-		g_free (escaped_uri);
-
-		list = list->next;
-		i++;
-	}
-
-	string = g_string_append (string, "</" TAG_RECENT_FILES ">");
-
-	data = g_string_free (string, FALSE);
-
-	ret = egg_recent_model_write_raw (model, file, data);
-
-	g_free (data);
-
-	return ret;
-}
-
-static FILE *
-egg_recent_model_open_file (EggRecentModel *model,
-			    gboolean        for_writing)
-{
-	FILE *file;
-	mode_t prev_umask;
-	
-	file = fopen (model->priv->path, "r+");
-	if (file == NULL && for_writing) {
-		/* be paranoid */
-		prev_umask = umask (077);
-
-		file = fopen (model->priv->path, "w+");
-
-		umask (prev_umask);
-
-		g_return_val_if_fail (file != NULL, NULL);
-	}
-
-	return file;
-}
-
-static gboolean
-egg_recent_model_lock_file (FILE *file)
-{
-#ifdef HAVE_LOCKF
-	int fd;
-	gint	try = 5;
-
-	rewind (file);
-	fd = fileno (file);
-
-	/* Attempt to lock the file 5 times,
-	 * waiting a random interval (< 1 second) 
-	 * in between attempts.
-	 * We should really be doing asynchronous
-	 * locking, but requires substantially larger
-	 * changes.
-	 */
-	
-	while (try > 0)
-	{
-		int rand_interval;
-
-		if (lockf (fd, F_TLOCK, 0) == 0)
-			return TRUE;
-
-		rand_interval = 1 + (int) (10.0 * rand()/(RAND_MAX + 1.0));
-			 
-           	g_usleep (100000 * rand_interval);
-
-		--try;
-	}
-
-	return FALSE;
-#else
-	return TRUE;
-#endif /* HAVE_LOCKF */
-}
-
-static gboolean
-egg_recent_model_unlock_file (FILE *file)
-{
-#ifdef HAVE_LOCKF
-	int fd;
-
-	rewind (file);
-	fd = fileno (file);
-
-	return (lockf (fd, F_ULOCK, 0) == 0) ? TRUE : FALSE;
-#else
-	return TRUE;
-#endif /* HAVE_LOCKF */
-}
-
-static void
-egg_recent_model_finalize (GObject *object)
-{
-	EggRecentModel *model = EGG_RECENT_MODEL (object);
-
-	if (model->priv->changed_timeout > 0) {
-		g_source_remove (model->priv->changed_timeout);
-	}
-
-	egg_recent_model_monitor (model, FALSE);
-
-
-	g_slist_foreach (model->priv->mime_filter_values,
-			 (GFunc) g_pattern_spec_free, NULL);
-	g_slist_free (model->priv->mime_filter_values);
-	model->priv->mime_filter_values = NULL;
-
-	g_slist_foreach (model->priv->scheme_filter_values,
-			 (GFunc) g_pattern_spec_free, NULL);
-	g_slist_free (model->priv->scheme_filter_values);
-	model->priv->scheme_filter_values = NULL;
-
-	g_slist_foreach (model->priv->group_filter_values,
-			 (GFunc) g_free, NULL);
-	g_slist_free (model->priv->group_filter_values);
-	model->priv->group_filter_values = NULL;
-
-
-	if (model->priv->limit_change_notify_id)
-		gconf_client_notify_remove (model->priv->client,
-					    model->priv->limit_change_notify_id);
-	model->priv->expiration_change_notify_id = 0;
-
-	if (model->priv->expiration_change_notify_id)
-		gconf_client_notify_remove (model->priv->client,
-					    model->priv->expiration_change_notify_id);
-	model->priv->expiration_change_notify_id = 0;
-
-	g_object_unref (model->priv->client);
-	model->priv->client = NULL;
-
-
-	g_free (model->priv->path);
-	model->priv->path = NULL;
-	
-	g_hash_table_destroy (model->priv->monitors);
-	model->priv->monitors = NULL;
-
-	if (model->priv->poll_timeout > 0)
-		g_source_remove (model->priv->poll_timeout);
-	model->priv->poll_timeout =0;
-
-	g_free (model->priv);
-
-	parent_class->finalize (object);
-}
-
-static void
-egg_recent_model_set_property (GObject *object,
-			       guint prop_id,
-			       const GValue *value,
-			       GParamSpec *pspec)
-{
-	EggRecentModel *model = EGG_RECENT_MODEL (object);
-
-	switch (prop_id)
-	{
-		case PROP_MIME_FILTERS:
-			if (model->priv->mime_filter_values != NULL)
-				egg_recent_model_clear_mime_filter (model);
-			
-			model->priv->mime_filter_values =
-				(GSList *)g_value_get_pointer (value);
-		break;
-
-		case PROP_GROUP_FILTERS:
-			if (model->priv->group_filter_values != NULL)
-				egg_recent_model_clear_group_filter (model);
-			
-			model->priv->group_filter_values =
-				(GSList *)g_value_get_pointer (value);
-		break;
-
-		case PROP_SCHEME_FILTERS:
-			if (model->priv->scheme_filter_values != NULL)
-				egg_recent_model_clear_scheme_filter (model);
-			
-			model->priv->scheme_filter_values =
-				(GSList *)g_value_get_pointer (value);
-		break;
-
-		case PROP_SORT_TYPE:
-			model->priv->sort_type = g_value_get_int (value);
-		break;
-
-		case PROP_LIMIT:
-			egg_recent_model_set_limit (model,
-						g_value_get_int (value));
-		break;
-
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-static void
-egg_recent_model_get_property (GObject *object,
-			       guint prop_id,
-			       GValue *value,
-			       GParamSpec *pspec)
-{
-	EggRecentModel *model = EGG_RECENT_MODEL (object);
-
-	switch (prop_id)
-	{
-		case PROP_MIME_FILTERS:
-			g_value_set_pointer (value, model->priv->mime_filter_values);
-		break;
-
-		case PROP_GROUP_FILTERS:
-			g_value_set_pointer (value, model->priv->group_filter_values);
-		break;
-
-		case PROP_SCHEME_FILTERS:
-			g_value_set_pointer (value, model->priv->scheme_filter_values);
-		break;
-
-		case PROP_SORT_TYPE:
-			g_value_set_int (value, model->priv->sort_type);
-		break;
-
-		case PROP_LIMIT:
-			g_value_set_int (value, model->priv->limit);
-		break;
-
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-static void
-egg_recent_model_class_init (EggRecentModelClass * klass)
-{
-	GObjectClass *object_class;
-
-	parent_class = g_type_class_peek_parent (klass);
-
-	parent_class = g_type_class_peek_parent (klass);
-
-	object_class = G_OBJECT_CLASS (klass);
-	object_class->set_property = egg_recent_model_set_property;
-	object_class->get_property = egg_recent_model_get_property;
-	object_class->finalize     = egg_recent_model_finalize;
-
-	model_signals[CHANGED] = g_signal_new ("changed",
-			G_OBJECT_CLASS_TYPE (object_class),
-			G_SIGNAL_RUN_LAST,
-			G_STRUCT_OFFSET (EggRecentModelClass, changed),
-			NULL, NULL,
-			g_cclosure_marshal_VOID__POINTER,
-			G_TYPE_NONE, 1,
-			G_TYPE_POINTER);
-
-	
-	g_object_class_install_property (object_class,
-					 PROP_MIME_FILTERS,
-					 g_param_spec_pointer ("mime-filters",
-					 "Mime Filters",
-					 "List of mime types to be allowed.",
-					 G_PARAM_READWRITE));
-	
-	g_object_class_install_property (object_class,
-					 PROP_GROUP_FILTERS,
-					 g_param_spec_pointer ("group-filters",
-					 "Group Filters",
-					 "List of groups to be allowed.",
-					 G_PARAM_READWRITE));
-
-	g_object_class_install_property (object_class,
-					 PROP_SCHEME_FILTERS,
-					 g_param_spec_pointer ("scheme-filters",
-					 "Scheme Filters",
-					 "List of URI schemes to be allowed.",
-					 G_PARAM_READWRITE));
-
-	g_object_class_install_property (object_class,
-					 PROP_SORT_TYPE,
-					 g_param_spec_int ("sort-type",
-					 "Sort Type",
-					 "Type of sorting to be done.",
-					 0, EGG_RECENT_MODEL_SORT_NONE,
-					 EGG_RECENT_MODEL_SORT_MRU,
-					 G_PARAM_READWRITE));
-
-	g_object_class_install_property (object_class,
-					 PROP_LIMIT,
-					 g_param_spec_int ("limit",
-					 "Limit",
-					 "Max number of items allowed.",
-					 -1, EGG_RECENT_MODEL_MAX_ITEMS,
-					 EGG_RECENT_MODEL_DEFAULT_LIMIT,
-					 G_PARAM_READWRITE));
-
-	klass->changed = NULL;
-}
-
-
-
-static void
-egg_recent_model_limit_changed (GConfClient *client, guint cnxn_id,
-				GConfEntry *entry, gpointer user_data)
-{
-	EggRecentModel *model;
-	GConfValue *value;
-
-	model = EGG_RECENT_MODEL (user_data);
-
-	g_return_if_fail (model != NULL);
-
-	if (model->priv->use_default_limit == FALSE)
-		return; /* ignore this key */
-
-	/* the key was unset, and the schema has apparently failed */
-	if (entry == NULL)
-		return;
-
-	value = gconf_entry_get_value (entry);
-
-	if (value->type != GCONF_VALUE_INT) {
-		g_warning ("Expected GConfValue of type integer, "
-			   "got something else");
-	}
-
-
-	egg_recent_model_set_limit_internal (model, gconf_value_get_int (value));
-}
-
-static void
-egg_recent_model_expiration_changed (GConfClient *client, guint cnxn_id,
-				     GConfEntry *entry, gpointer user_data)
-{
-
-}
-
-static void
-egg_recent_model_init (EggRecentModel * model)
-{
-	if (!gnome_vfs_init ()) {
-		g_warning ("gnome-vfs initialization failed.");
-		return;
-	}
-	
-
-	model->priv = g_new0 (EggRecentModelPrivate, 1);
-
-	model->priv->path = g_strdup_printf ("%s" EGG_RECENT_MODEL_FILE_PATH,
-					     g_get_home_dir ());
-
-	model->priv->mime_filter_values   = NULL;
-	model->priv->group_filter_values  = NULL;
-	model->priv->scheme_filter_values = NULL;
-	
-	model->priv->client = gconf_client_get_default ();
-	gconf_client_add_dir (model->priv->client, EGG_RECENT_MODEL_KEY_DIR,
-			      GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
-	model->priv->limit_change_notify_id =
-			gconf_client_notify_add (model->priv->client,
-						 EGG_RECENT_MODEL_DEFAULT_LIMIT_KEY,
-						 egg_recent_model_limit_changed,
-						 model, NULL, NULL);
-
-	model->priv->expiration_change_notify_id =
-			gconf_client_notify_add (model->priv->client,
-						 EGG_RECENT_MODEL_EXPIRE_KEY,
-						 egg_recent_model_expiration_changed,
-						 model, NULL, NULL);
-
-	model->priv->expire_days = gconf_client_get_int (
-					model->priv->client,
-					EGG_RECENT_MODEL_EXPIRE_KEY,
-					NULL);
-					
-#if 0
-	/* keep this out, for now */
-	model->priv->limit = gconf_client_get_int (
-					model->priv->client,
-					EGG_RECENT_MODEL_DEFAULT_LIMIT_KEY, NULL);
-	model->priv->use_default_limit = TRUE;
-#endif
-	model->priv->limit = EGG_RECENT_MODEL_DEFAULT_LIMIT;
-	model->priv->use_default_limit = FALSE;
-
-	model->priv->monitors = g_hash_table_new_full (
-					g_str_hash, g_str_equal,
-					(GDestroyNotify) g_free,
-					(GDestroyNotify) gnome_vfs_monitor_cancel);
-
-	model->priv->monitor = NULL;
-	model->priv->poll_timeout = 0;
-	model->priv->last_mtime = 0;
-	egg_recent_model_monitor (model, TRUE);
-}
-
-
-/**
- * egg_recent_model_new:
- * @sort:  the type of sorting to use
- * @limit:  maximum number of items in the list
- *
- * This creates a new EggRecentModel object.
- *
- * Returns: a EggRecentModel object
- */
-EggRecentModel *
-egg_recent_model_new (EggRecentModelSort sort)
-{
-	EggRecentModel *model;
-
-	model = EGG_RECENT_MODEL (g_object_new (egg_recent_model_get_type (),
-				  "sort-type", sort, NULL));
-
-	g_return_val_if_fail (model, NULL);
-
-	return model;
-}
-
-/**
- * egg_recent_model_add_full:
- * @model:  A EggRecentModel object.
- * @item:  A EggRecentItem
- *
- * This function adds an item to the list of recently used URIs.
- *
- * Returns: gboolean
- */
-gboolean
-egg_recent_model_add_full (EggRecentModel * model, EggRecentItem *item)
-{
-	FILE *file;
-	GList *list = NULL;
-	gboolean ret = FALSE;
-	gboolean updated = FALSE;
-	char *uri;
-	time_t t;
-	
-	g_return_val_if_fail (model != NULL, FALSE);
-	g_return_val_if_fail (EGG_IS_RECENT_MODEL (model), FALSE);
-
-	uri = egg_recent_item_get_uri (item);
-	if (strncmp (uri, "recent-files://", strlen ("recent-files://")) == 0) {
-		g_free (uri);
-		return FALSE;
-	} else {
-		g_free (uri);
-	}
-
-	file = egg_recent_model_open_file (model, TRUE);
-	g_return_val_if_fail (file != NULL, FALSE);
-
-	time (&t);
-	egg_recent_item_set_timestamp (item, t);
-
-	if (egg_recent_model_lock_file (file)) {
-
-		/* read existing stuff */
-		list = egg_recent_model_read (model, file);
-
-		/* if it's already there, we just update it */
-		updated = egg_recent_model_update_item (list, item);
-
-		if (!updated) {
-			list = g_list_prepend (list, item);
-
-			egg_recent_model_enforce_limit (list,
-						EGG_RECENT_MODEL_MAX_ITEMS);
-		}
-
-		/* write new stuff */
-		if (!egg_recent_model_write (model, file, list))
-			g_warning ("Write failed: %s", strerror (errno));
-
-		if (!updated)
-			list = g_list_remove (list, item);
-
-		EGG_RECENT_ITEM_LIST_UNREF (list);
-		ret = TRUE;
-	} else {
-		g_warning ("Failed to lock:  %s", strerror (errno));
-		fclose (file);
-		return FALSE;
-	}
-
-	if (!egg_recent_model_unlock_file (file))
-		g_warning ("Failed to unlock: %s", strerror (errno));
-
-	fclose (file);
-
-	if (model->priv->monitor == NULL) {
-		/* since monitoring isn't working, at least give a
-		 * local notification
-		 */
-		egg_recent_model_changed (model);
-	}
-
-	return ret;
-}
-
-/**
- * egg_recent_model_add:
- * @model:  A EggRecentModel object.
- * @uri:  A string URI
- *
- * This function adds an item to the list of recently used URIs.
- *
- * Returns: gboolean
- */
-gboolean
-egg_recent_model_add (EggRecentModel *model, const gchar *uri)
-{
-	EggRecentItem *item;
-	gboolean ret = FALSE;
-
-	g_return_val_if_fail (model != NULL, FALSE);
-	g_return_val_if_fail (uri != NULL, FALSE);
-
-	item = egg_recent_item_new_from_uri (uri);
-
-	g_return_val_if_fail (item != NULL, FALSE);
-
-	ret = egg_recent_model_add_full (model, item);
-
-	egg_recent_item_unref (item);
-
-	return ret;
-}
-
-
-
-/**
- * egg_recent_model_delete:
- * @model:  A EggRecentModel object.
- * @uri: The URI you want to delete.
- *
- * This function deletes a URI from the file of recently used URIs.
- *
- * Returns: gboolean
- */
-gboolean
-egg_recent_model_delete (EggRecentModel * model, const gchar * uri)
-{
-	FILE *file;
-	GList *list;
-	unsigned int length;
-	gboolean ret = FALSE;
-
-	g_return_val_if_fail (model != NULL, FALSE);
-	g_return_val_if_fail (EGG_IS_RECENT_MODEL (model), FALSE);
-	g_return_val_if_fail (uri != NULL, FALSE);
-
-	file = egg_recent_model_open_file (model, TRUE);
-	g_return_val_if_fail (file != NULL, FALSE);
-
-	if (egg_recent_model_lock_file (file)) {
-		list = egg_recent_model_read (model, file);
-
-		if (list == NULL)
-			goto out;
-
-		length = g_list_length (list);
-
-		list = egg_recent_model_delete_from_list (list, uri);
-		
-		if (length == g_list_length (list)) {
-			/* nothing was deleted */
-			EGG_RECENT_ITEM_LIST_UNREF (list);
-		} else {
-			egg_recent_model_write (model, file, list);
-			EGG_RECENT_ITEM_LIST_UNREF (list);
-			ret = TRUE;
-
-		}
-	} else {
-		g_warning ("Failed to lock:  %s", strerror (errno));
-		return FALSE;
-	}
-
-out:
-		
-	if (!egg_recent_model_unlock_file (file))
-		g_warning ("Failed to unlock: %s", strerror (errno));
-
-	fclose (file);
-
-	g_hash_table_remove (model->priv->monitors, uri);
-
-	if (model->priv->monitor == NULL && ret) {
-		/* since monitoring isn't working, at least give a
-		 * local notification
-		 */
-		egg_recent_model_changed (model);
-	}
-
-	return ret;
-}
-
-
-/**
- * egg_recent_model_get_list:
- * @model:  A EggRecentModel object.
- *
- * This function gets the current contents of the file
- *
- * Returns: a GList
- */
-GList *
-egg_recent_model_get_list (EggRecentModel *model)
-{
-	FILE *file;
-	GList *list = NULL;
-
-	file = egg_recent_model_open_file (model, FALSE);
-	if (file == NULL)
-		return NULL;
-	
-	if (egg_recent_model_lock_file (file))
-		list = egg_recent_model_read (model, file);
-	else {
-		g_warning ("Failed to lock:  %s", strerror (errno));
-		fclose (file);
-		return NULL;
-	}
-
-	if (!egg_recent_model_unlock_file (file))
-		g_warning ("Failed to unlock: %s", strerror (errno));
-
-	if (list != NULL) {
-		list = egg_recent_model_filter (model, list);
-		list = egg_recent_model_sort (model, list);
-
-		egg_recent_model_enforce_limit (list, model->priv->limit);
-	}
-
-	fclose (file);
-
-	return list;
-}
-
-
-
-/**
- * egg_recent_model_set_limit:
- * @model:  A EggRecentModel object.
- * @limit:  The maximum length of the list
- *
- * This function sets the maximum length of the list.  Note:  This only affects
- * the length of the list emitted in the "changed" signal, not the list stored
- * on disk.
- *
- * Returns:  void
- */
-void
-egg_recent_model_set_limit (EggRecentModel *model, int limit)
-{
-	model->priv->use_default_limit = FALSE;
-
-	egg_recent_model_set_limit_internal (model, limit);
-}
-
-/**
- * egg_recent_model_get_limit:
- * @model:  A EggRecentModel object.
- *
- * This function gets the maximum length of the list. 
- *
- * Returns:  int
- */
-int
-egg_recent_model_get_limit (EggRecentModel *model)
-{
-	return model->priv->limit;
-}
-
-
-/**
- * egg_recent_model_clear:
- * @model:  A EggRecentModel object.
- *
- * This function clears the contents of the file
- *
- * Returns: void
- */
-void
-egg_recent_model_clear (EggRecentModel *model)
-{
-	FILE *file;
-	int fd;
-
-	file = egg_recent_model_open_file (model, TRUE);
-	g_return_if_fail (file != NULL);
-
-	fd = fileno (file);
-
-	if (egg_recent_model_lock_file (file)) {
-		ftruncate (fd, 0);
-	} else {
-		g_warning ("Failed to lock:  %s", strerror (errno));
-		return;
-	}
-
-	if (!egg_recent_model_unlock_file (file))
-		g_warning ("Failed to unlock: %s", strerror (errno));
-
-	fclose (file);
-	
-	if (model->priv->monitor == NULL) {
-		/* since monitoring isn't working, at least give a
-		 * local notification
-		 */
-		egg_recent_model_changed (model);
-	}
-}
-
-static void
-egg_recent_model_clear_mime_filter (EggRecentModel *model)
-{
-	g_return_if_fail (model != NULL);
-
-	if (model->priv->mime_filter_values != NULL) {
-		g_slist_foreach (model->priv->mime_filter_values,
-				 (GFunc) g_pattern_spec_free, NULL);
-		g_slist_free (model->priv->mime_filter_values);
-		model->priv->mime_filter_values = NULL;
-	}
-}	
-
-/**
- * egg_recent_model_set_filter_mime_types:
- * @model:  A EggRecentModel object.
- *
- * Sets which mime types are allowed in the list.
- *
- * Returns: void
- */
-void
-egg_recent_model_set_filter_mime_types (EggRecentModel *model,
-			       ...)
-{
-	va_list valist;
-	GSList *list = NULL;
-	gchar *str;
-
-	g_return_if_fail (model != NULL);
-
-	egg_recent_model_clear_mime_filter (model);
-
-	va_start (valist, model);
-
-	str = va_arg (valist, gchar*);
-
-	while (str != NULL) {
-		list = g_slist_prepend (list, g_pattern_spec_new (str));
-
-		str = va_arg (valist, gchar*);
-	}
-
-	va_end (valist);
-
-	model->priv->mime_filter_values = list;
-}
-
-static void
-egg_recent_model_clear_group_filter (EggRecentModel *model)
-{
-	g_return_if_fail (model != NULL);
-
-	if (model->priv->group_filter_values != NULL) {
-		g_slist_foreach (model->priv->group_filter_values, (GFunc)g_free, NULL);
-		g_slist_free (model->priv->group_filter_values);
-		model->priv->group_filter_values = NULL;
-	}
-}
-
-/**
- * egg_recent_model_set_filter_groups:
- * @model:  A EggRecentModel object.
- *
- * Sets which groups are allowed in the list.
- *
- * Returns: void
- */
-void
-egg_recent_model_set_filter_groups (EggRecentModel *model,
-			       ...)
-{
-	va_list valist;
-	GSList *list = NULL;
-	gchar *str;
-
-	g_return_if_fail (model != NULL);
-
-	egg_recent_model_clear_group_filter (model);
-	
-	va_start (valist, model);
-
-	str = va_arg (valist, gchar*);
-
-	while (str != NULL) {
-		list = g_slist_prepend (list, g_strdup (str));
-
-		str = va_arg (valist, gchar*);
-	}
-
-	va_end (valist);
-
-	model->priv->group_filter_values = list;
-}
-
-static void
-egg_recent_model_clear_scheme_filter (EggRecentModel *model)
-{
-	g_return_if_fail (model != NULL);
-
-	if (model->priv->scheme_filter_values != NULL) {
-		g_slist_foreach (model->priv->scheme_filter_values,
-				(GFunc) g_pattern_spec_free, NULL);
-		g_slist_free (model->priv->scheme_filter_values);
-		model->priv->scheme_filter_values = NULL;
-	}
-}
-
-/**
- * egg_recent_model_set_filter_uri_schemes:
- * @model:  A EggRecentModel object.
- *
- * Sets which URI schemes (file, http, ftp, etc) are allowed in the list.
- *
- * Returns: void
- */
-void
-egg_recent_model_set_filter_uri_schemes (EggRecentModel *model, ...)
-{
-	va_list valist;
-	GSList *list = NULL;
-	gchar *str;
-
-	g_return_if_fail (model != NULL);
-
-	egg_recent_model_clear_scheme_filter (model);
-	
-	va_start (valist, model);
-
-	str = va_arg (valist, gchar*);
-
-	while (str != NULL) {
-		list = g_slist_prepend (list, g_pattern_spec_new (str));
-
-		str = va_arg (valist, gchar*);
-	}
-
-	va_end (valist);
-
-	model->priv->scheme_filter_values = list;
-}
-
-/**
- * egg_recent_model_set_sort:
- * @model:  A EggRecentModel object.
- * @sort:  A EggRecentModelSort type
- *
- * Sets the type of sorting to be used.
- *
- * Returns: void
- */
-void
-egg_recent_model_set_sort (EggRecentModel *model,
-			     EggRecentModelSort sort)
-{
-	g_return_if_fail (model != NULL);
-	
-	model->priv->sort_type = sort;
-}
-
-/**
- * egg_recent_model_changed:
- * @model:  A EggRecentModel object.
- *
- * This function causes a "changed" signal to be emitted.
- *
- * Returns: void
- */
-void
-egg_recent_model_changed (EggRecentModel *model)
-{
-	GList *list = NULL;
-
-	if (model->priv->limit > 0) {
-		list = egg_recent_model_get_list (model);
-		/* egg_recent_model_monitor_list (model, list); */
-	
-		g_signal_emit (G_OBJECT (model), model_signals[CHANGED], 0,
-			       list);
-	}
-
-	if (list)
-		EGG_RECENT_ITEM_LIST_UNREF (list);
-}
-
-static void
-egg_recent_model_remove_expired_list (EggRecentModel *model, GList *list)
-{
-	time_t current_time;
-	time_t day_seconds;
-
-	time (&current_time);
-	day_seconds = model->priv->expire_days*24*60*60;
-
-	while (list != NULL) {
-		EggRecentItem *item = list->data;
-		time_t timestamp;
-
-		timestamp = egg_recent_item_get_timestamp (item);
-
-		if ((timestamp+day_seconds) < current_time) {
-			gchar *uri = egg_recent_item_get_uri (item);
-			egg_recent_model_delete (model, uri);
-
-			g_strdup (uri);
-		}
-
-		list = list->next;
-	}
-}
-
-
-/**
- * egg_recent_model_remove_expired:
- * @model:  A EggRecentModel object.
- *
- * Goes through the entire list, and removes any items that are older than
- * the user-specified expiration period.
- *
- * Returns: void
- */
-void
-egg_recent_model_remove_expired (EggRecentModel *model)
-{
-	FILE *file;
-	GList *list=NULL;
-
-	g_return_if_fail (model != NULL);
-
-	file = egg_recent_model_open_file (model, FALSE);
-	if (file == NULL)
-		return;
-	
-	if (egg_recent_model_lock_file (file)) {
-		list = egg_recent_model_read (model, file);
-		
-	} else {
-		g_warning ("Failed to lock:  %s", strerror (errno));
-		return;
-	}
-
-	if (!egg_recent_model_unlock_file (file))
-		g_warning ("Failed to unlock: %s", strerror (errno));
-
-	if (list != NULL) {
-		egg_recent_model_remove_expired_list (model, list);
-		EGG_RECENT_ITEM_LIST_UNREF (list);
-	}
-
-	fclose (file);
-}
-
-/**
- * egg_recent_model_get_type:
- *
- * This returns a GType representing a EggRecentModel object.
- *
- * Returns: a GType
- */
-GType
-egg_recent_model_get_type (void)
-{
-	static GType egg_recent_model_type = 0;
-
-	if(!egg_recent_model_type) {
-		static const GTypeInfo egg_recent_model_info = {
-			sizeof (EggRecentModelClass),
-			NULL, /* base init */
-			NULL, /* base finalize */
-			(GClassInitFunc)egg_recent_model_class_init, /* class init */
-			NULL, /* class finalize */
-			NULL, /* class data */
-			sizeof (EggRecentModel),
-			0,
-			(GInstanceInitFunc) egg_recent_model_init
-		};
-
-		egg_recent_model_type = g_type_register_static (G_TYPE_OBJECT,
-							"EggRecentModel",
-							&egg_recent_model_info, 0);
-	}
-
-	return egg_recent_model_type;
-}
-

=== removed file 'src/egg-recent-model.h'
--- src/egg-recent-model.h	2004-02-05 08:58:56 +0000
+++ src/egg-recent-model.h	1970-01-01 00:00:00 +0000
@@ -1,80 +0,0 @@
-/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef __EGG_RECENT_MODEL_H__
-#define __EGG_RECENT_MODEL_H__
-
-#include "egg-recent-item.h"
-
-G_BEGIN_DECLS
-
-#define EGG_TYPE_RECENT_MODEL		(egg_recent_model_get_type ())
-#define EGG_RECENT_MODEL(obj)		G_TYPE_CHECK_INSTANCE_CAST (obj, EGG_TYPE_RECENT_MODEL, EggRecentModel)
-#define EGG_RECENT_MODEL_CLASS(klass) 	G_TYPE_CHECK_CLASS_CAST (klass, EGG_TYPE_RECENT_MODEL, EggRecentModelClass)
-#define EGG_IS_RECENT_MODEL(obj)	G_TYPE_CHECK_INSTANCE_TYPE (obj, egg_recent_model_get_type ())
-
-typedef struct _EggRecentModel        EggRecentModel;
-typedef struct _EggRecentModelPrivate EggRecentModelPrivate;
-typedef struct _EggRecentModelClass   EggRecentModelClass;
-
-struct _EggRecentModel {
-	GObject                parent_instance;
-
-	EggRecentModelPrivate *priv;
-};
-
-struct _EggRecentModelClass {
-	GObjectClass parent_class;
-			
-	void (*changed) (EggRecentModel *model, GList *list);
-};
-
-typedef enum {
-	EGG_RECENT_MODEL_SORT_MRU,
-	EGG_RECENT_MODEL_SORT_LRU,
-	EGG_RECENT_MODEL_SORT_NONE
-} EggRecentModelSort;
-
-
-/* Standard group names */
-#define EGG_RECENT_GROUP_LAUNCHERS "Launchers"
-
-
-GType    egg_recent_model_get_type     (void);
-
-/* constructors */
-EggRecentModel * egg_recent_model_new (EggRecentModelSort sort);
-
-/* public methods */
-void     egg_recent_model_set_filter_mime_types (EggRecentModel *model,
-						   ...);
-
-void     egg_recent_model_set_filter_groups (EggRecentModel *model, ...);
-
-void     egg_recent_model_set_filter_uri_schemes (EggRecentModel *model,
-						   ...);
-
-void     egg_recent_model_set_sort (EggRecentModel *model,
-				      EggRecentModelSort sort);
-
-gboolean egg_recent_model_add_full (EggRecentModel *model,
-				      EggRecentItem *item);
-
-gboolean egg_recent_model_add	     (EggRecentModel *model,
-				      const gchar *uri);
-
-gboolean egg_recent_model_delete   (EggRecentModel *model,
-				      const gchar *uri);
-
-void egg_recent_model_clear        (EggRecentModel *model);
-
-GList * egg_recent_model_get_list  (EggRecentModel *model);
-
-void egg_recent_model_changed      (EggRecentModel *model);
-
-void egg_recent_model_set_limit    (EggRecentModel *model, int limit);
-int  egg_recent_model_get_limit    (EggRecentModel *model);
-
-void egg_recent_model_remove_expired (EggRecentModel *model);
-
-G_END_DECLS
-
-#endif /* __EGG_RECENT_MODEL_H__ */

=== removed file 'src/egg-recent-util.c'
--- src/egg-recent-util.c	2005-10-22 13:10:28 +0000
+++ src/egg-recent-util.c	1970-01-01 00:00:00 +0000
@@ -1,102 +0,0 @@
-#include <config.h>
-#include <stdio.h>
-#include <string.h>
-#include <gtk/gtk.h>
-#ifndef USE_STABLE_LIBGNOMEUI
-#include <libgnomeui/gnome-icon-lookup.h>
-#endif
-#include <time.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <math.h>
-#include "egg-recent-util.h"
-
-#ifdef G_OS_WIN32
-#include <windows.h>
-#endif
-
-#define EGG_RECENT_UTIL_HOSTNAME_SIZE 512
-
-/* ripped out of gedit2 */
-gchar* 
-egg_recent_util_escape_underlines (const gchar* text)
-{
-	GString *str;
-	gint length;
-	const gchar *p;
- 	const gchar *end;
-
-  	g_return_val_if_fail (text != NULL, NULL);
-
-    	length = strlen (text);
-
-	str = g_string_new ("");
-
-	p = text;
-	end = text + length;
-
-	while (p != end)
-	{
-		const gchar *next;
-		next = g_utf8_next_char (p);
-
-		switch (*p)
-		{
-			case '_':
-				g_string_append (str, "__");
-				break;
-			default:
-				g_string_append_len (str, p, next - p);
-			break;
-		}
-
-		p = next;
-	}
-
-	return g_string_free (str, FALSE);
-}
-
-GdkPixbuf *
-egg_recent_util_get_icon (GtkIconTheme *theme, const gchar *uri,
-			  const gchar *mime_type, int size)
-{
-#ifndef USE_STABLE_LIBGNOMEUI
-	gchar *icon;
-	GdkPixbuf *pixbuf;
-	
-	icon = gnome_icon_lookup (theme, NULL, uri, NULL, NULL,
-				  mime_type, 0, NULL);
-
-	g_return_val_if_fail (icon != NULL, NULL);
-
-	pixbuf = gtk_icon_theme_load_icon (theme, icon, size, 0, NULL);
-	g_free (icon);
-
-	return pixbuf;
-#endif
-	return NULL;
-}
-
-gchar *
-egg_recent_util_get_unique_id (void)
-{
-	char hostname[EGG_RECENT_UTIL_HOSTNAME_SIZE];
-	time_t the_time;
-	guint32 rand;
-	int pid;
-	
-#ifndef G_OS_WIN32
-	gethostname (hostname, EGG_RECENT_UTIL_HOSTNAME_SIZE);
-#else
-	{
-		DWORD size = EGG_RECENT_UTIL_HOSTNAME_SIZE;
-		GetComputerName (hostname, &size);
-	}
-#endif
-	
-	time (&the_time);
-	rand = g_random_int ();
-	pid = getpid ();
-
-	return g_strdup_printf ("%s-%d-%d-%d", hostname, (int)time, (int)rand, (int)pid);
-}

=== removed file 'src/egg-recent-util.h'
--- src/egg-recent-util.h	2005-08-16 19:06:39 +0000
+++ src/egg-recent-util.h	1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
-
-#ifndef __EGG_RECENT_UTIL__
-#define __EGG_RECENT_UTIL__
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-
-gchar * egg_recent_util_escape_underlines (const gchar *uri);
-gchar * egg_recent_util_get_unique_id (void);
-GdkPixbuf * egg_recent_util_get_icon (GtkIconTheme *theme,
-				      const gchar *uri,
-				      const gchar *mime_type,
-				      int size);
-
-G_END_DECLS
-
-#endif /* __EGG_RECENT_UTIL__ */

=== removed file 'src/egg-recent-view-gtk.c'
--- src/egg-recent-view-gtk.c	2006-02-15 22:08:39 +0000
+++ src/egg-recent-view-gtk.c	1970-01-01 00:00:00 +0000
@@ -1,945 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * 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.
- *
- * Authors:
- *   James Willcox <jwillcox@cs.indiana.edu>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <gtk/gtk.h>
-#include <libgnomevfs/gnome-vfs.h>
-#ifndef USE_STABLE_LIBGNOMEUI
-#include <libgnomeui/gnome-icon-theme.h>
-#endif
-#include <gconf/gconf-client.h>
-#include "egg-recent-model.h"
-#include "egg-recent-view.h"
-#include "egg-recent-view-gtk.h"
-#include "egg-recent-util.h"
-#include "egg-recent-item.h"
-
-#ifndef EGG_COMPILATION
-#include <glib/gi18n.h>
-#else
-#define _(x) (x)
-#define N_(x) (x)
-#endif
-
-#define DEFAULT_LABEL_WIDTH 30
-
-struct _EggRecentViewGtk {
-	GObject parent_instance;	/* We emit signals */
-
-	GtkWidget *menu;
-	GtkWidget *start_menu_item;
-
-	gboolean leading_sep;
-	gboolean trailing_sep;
-
-	gulong changed_cb_id;
-
-	gchar *uid;
-
-	gboolean show_icons;
-	gboolean show_numbers;
-	GtkIconTheme *theme;
-
-	GtkTooltips *tooltips;
-	EggRecentViewGtkTooltipFunc tooltip_func;
-	gpointer tooltip_func_data;
-
-	EggRecentModel *model;
-	GConfClient *client;
-	GtkIconSize icon_size;
-
-	gint label_width;
-};
-
-
-
-struct _EggRecentViewGtkMenuData {
-	EggRecentViewGtk *view;
-	EggRecentItem *item;
-};
-
-typedef struct _EggRecentViewGtkMenuData EggRecentViewGtkMenuData;
-
-enum {
-	ACTIVATE,
-	LAST_SIGNAL
-};
-
-/* GObject properties */
-enum {
-	PROP_BOGUS,
-	PROP_MENU,
-	PROP_START_MENU_ITEM,
-	PROP_SHOW_ICONS,
-	PROP_SHOW_NUMBERS,
-	PROP_LABEL_WIDTH
-};
-
-static guint view_signals[LAST_SIGNAL] = { 0 };
-
-static GObjectClass *parent_class;
-
-/* mark a menu item, so that we know which ones we own */
-static void
-egg_recent_view_gtk_set_item_tag (EggRecentViewGtk *view,
-				  GtkMenuItem      *menu_item)
-{
-	g_return_if_fail (EGG_IS_RECENT_VIEW_GTK (view));
-	g_return_if_fail (GTK_IS_MENU_ITEM (menu_item));
-
-	g_object_set_data (G_OBJECT (menu_item),
-			   view->uid,
-			   GINT_TO_POINTER (1));
-}
-
-static void
-egg_recent_view_gtk_clear (EggRecentViewGtk *view)
-{
-	GList *menu_children;
-	GList *p;
-	GObject *menu_item;
-	gint *menu_data=NULL;
-
-	if (view->menu == NULL)
-		return;
-
-	menu_children = gtk_container_get_children (GTK_CONTAINER (view->menu));
-
-	p = menu_children;
-	while (p != NULL) {
-		menu_item = G_OBJECT (p->data);
-
-		menu_data = (gint *) g_object_get_data (menu_item,
-						        view->uid);
-	
-		if (menu_data) {
-			gtk_container_remove (GTK_CONTAINER (view->menu),
-					     GTK_WIDGET (menu_item));
-
-		}
-		
-		p = p->next;
-	}
-
-	g_list_free (menu_children);
-}
-
-
-static gint
-egg_recent_view_gtk_find_menu_offset (EggRecentViewGtk *view)
-{
-	gint i;
-	GList *menu_children;
-	GList *p;
-	GtkWidget *menu_item;
-	gint menu_loc=-1;
-
-	g_return_val_if_fail (view, 0);
-
-	menu_children = GTK_MENU_SHELL (view->menu)->children;
-
-	i = 0;
-	p = menu_children;
-	while (p != NULL) {
-		menu_item = (GtkWidget *)p->data;
-
-		if (menu_item == view->start_menu_item) {
-			menu_loc = i;
-			break;
-		}
-
-		p = p->next;
-		i++;
-	}
-
-	return menu_loc;
-}
-
-static void
-egg_recent_view_gtk_menu_cb (GtkWidget *menu, gpointer data)
-{
-	EggRecentViewGtkMenuData *md = (EggRecentViewGtkMenuData *) data;
-	EggRecentItem *item;
-
-	g_return_if_fail (md);
-	g_return_if_fail (md->item);
-	g_return_if_fail (md->view);
-	g_return_if_fail (EGG_IS_RECENT_VIEW_GTK (md->view));
-
-	item = md->item;
-	
-	egg_recent_item_ref (item);
-	
-	g_signal_emit (G_OBJECT(md->view), view_signals[ACTIVATE], 0,
-		       item);
-
-	egg_recent_item_unref (item);
-}
-
-static void
-egg_recent_view_gtk_destroy_cb (gpointer data, GClosure *closure)
-{
-	EggRecentViewGtkMenuData *md = data;
-
-	egg_recent_item_unref (md->item);
-	g_free (md);
-}
-
-static GtkWidget *
-egg_recent_view_gtk_new_separator (EggRecentViewGtk *view)
-{
-	GtkWidget *retval;
-
-	g_return_val_if_fail (view, NULL);
-	
-	retval = gtk_separator_menu_item_new ();
-
-	/*
-	 * this is a tag so we can distinguish our menu items
-	 * from others that may be in the menu.
-	 */
-	egg_recent_view_gtk_set_item_tag (view, GTK_MENU_ITEM (retval));
-
-	gtk_widget_show (retval);
-
-	return retval;
-}
-
-static GtkWidget *
-egg_recent_view_gtk_new_menu_item (EggRecentViewGtk *view,
-				   EggRecentItem *item,
-				   gint index)
-{
-	GtkWidget *menu_item;
-	EggRecentViewGtkMenuData *md;
-	gchar *mime_type;
-	GtkWidget *image;
-	GtkWidget *label;
-	GdkPixbuf *pixbuf;
-	gchar *text;
-	gchar *short_name;
-	gchar *escaped;
-
-	g_return_val_if_fail (view, NULL);
-	g_return_val_if_fail (item, NULL);
-
-	short_name = egg_recent_item_get_short_name (item);
-	if (!short_name)
-		return NULL;
-
-	escaped = egg_recent_util_escape_underlines (short_name);
-	g_free (short_name);
-
-	if (view->show_numbers) {
-		/* avoid having conflicting mnemonics */
-		if (index >= 10)
-			text = g_strdup_printf ("%d.  %s", index,
-						escaped);
-		else
-			text = g_strdup_printf ("_%d.  %s", index,
-						escaped);
-		g_free (escaped);
-	} else {
-		text = escaped;
-	}
-
-	mime_type = egg_recent_item_get_mime_type (item);
-#ifndef USE_STABLE_LIBGNOMEUI
-	{
-		int width, height;
-		gchar *uri;
-
-		gtk_icon_size_lookup_for_settings
-			(gtk_widget_get_settings (view->menu),
-			 view->icon_size,
-			 &width, &height);
-
-		uri = egg_recent_item_get_uri (item);
-		pixbuf = egg_recent_util_get_icon (view->theme, uri,
-						   mime_type,
-						   height);
-		g_free (uri);
-	}
-#else
-	pixbuf = NULL;
-#endif
-	image = gtk_image_new_from_pixbuf (pixbuf);
-	if (pixbuf)
-		g_object_unref (pixbuf);
-
-	if (view->show_icons)
-		gtk_widget_show (image);
-
-	menu_item = gtk_image_menu_item_new_with_mnemonic (text);
-	gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item),
-				       image);
-
-	label = GTK_BIN (menu_item)->child;
-	gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
-	gtk_label_set_max_width_chars (GTK_LABEL (label), view->label_width);
-
-	md = g_new0 (EggRecentViewGtkMenuData, 1);
-	md->view = view;
-	md->item = egg_recent_item_ref (item);
-
-	g_signal_connect_data (G_OBJECT (menu_item), "activate",
-			       G_CALLBACK (egg_recent_view_gtk_menu_cb),
-			       md,
-			       (GClosureNotify)egg_recent_view_gtk_destroy_cb,
-			       0);
-
-	g_free (mime_type);
-	g_free (text);
-
-	/*
-	 * this is a tag so we can distinguish our menu items
-	 * from others that may be in the menu.
-	 */
-	egg_recent_view_gtk_set_item_tag (view, GTK_MENU_ITEM (menu_item));
-
-	gtk_widget_show (menu_item);
-
-	return menu_item;
-}
-
-static void
-egg_recent_view_gtk_create_tooltip (EggRecentViewGtk *view,
-				    GtkWidget        *menu_item,
-				    EggRecentItem    *recent_item)
-{
-	gchar *name, *tip_text;
-	
-	g_return_if_fail (EGG_IS_RECENT_VIEW_GTK (view));
-	g_return_if_fail (GTK_IS_WIDGET (menu_item));
-	g_return_if_fail (recent_item != NULL);
-
-	if (!view->tooltips)
-		return;
-
-	name = egg_recent_item_get_uri_for_display (recent_item);
-	if (!name)
-		return;
-
-	tip_text = g_strdup_printf (_("Open '%s'"), name);
-	if (!tip_text) {
-		g_free (name);
-		return;
-	}
-
-	gtk_tooltips_set_tip (view->tooltips, menu_item,
-			      tip_text,
-			      NULL);
-	
-	g_free (tip_text);
-	g_free (name);
-}
-
-static void
-egg_recent_view_gtk_add_to_menu (EggRecentViewGtk *view,
-				 EggRecentItem *item,
-				 gint display,
-				 gint index)
-{
-	GtkWidget *menu_item;
-	gint menu_offset;
-	
-	g_return_if_fail (view);
-	g_return_if_fail (view->menu);
-
-	menu_offset = egg_recent_view_gtk_find_menu_offset (view);
-
-	if (item) {
-		menu_item = egg_recent_view_gtk_new_menu_item (view, item, display);
-		if (!menu_item)
-			return;
-		
-		/* if present, use the custom tooltip function;
-		 * otherwise, use ours (which has been "borrowed"
-		 * from GEdit)
-		 */
-		if (view->tooltip_func) {
-			view->tooltip_func (view->tooltips,
-					    menu_item,
-					    item,
-					    view->tooltip_func_data);
-		}
-		else {
-			egg_recent_view_gtk_create_tooltip (view, menu_item, item);
-		}
-	}
-	else
-		menu_item = egg_recent_view_gtk_new_separator (view);
-
-	if (menu_item)
-		gtk_menu_shell_insert (GTK_MENU_SHELL (view->menu),
-				       menu_item,
-				       menu_offset + index);
-}
-
-static void
-egg_recent_view_gtk_set_list (EggRecentViewGtk *view, GList *list)
-{
-	EggRecentItem *item;
-	GList *p;
-	gint display=1;
-	gint index=1;
-
-	if (view->menu == NULL)
-		return;
-
-	egg_recent_view_gtk_clear (view);
-
-	if (view->leading_sep) {
-		egg_recent_view_gtk_add_to_menu (view, NULL, display, index);
-		index++;
-	}
-
-	p = list;
-	while (p != NULL) {
-		item = (EggRecentItem *)p->data;
-
-		egg_recent_view_gtk_add_to_menu (view, item, display, index);
-
-		p = p->next;
-		display++;
-		index++;
-	}
-
-	if (view->trailing_sep)
-		egg_recent_view_gtk_add_to_menu (view, NULL, display, index);
-}
-
-static void
-egg_recent_view_gtk_set_empty_list (EggRecentViewGtk *view)
-{
-	gboolean is_menu_embedded = FALSE;
-
-	egg_recent_view_gtk_clear (view);
-	
-	is_menu_embedded = view->trailing_sep || (egg_recent_view_gtk_find_menu_offset (view) > 0);
-	if (!is_menu_embedded) {
-		GtkWidget *dummy_item;
-
-		dummy_item = gtk_menu_item_new_with_label (_("Empty"));
-		gtk_widget_set_sensitive (dummy_item, FALSE);
-		gtk_menu_shell_insert (GTK_MENU_SHELL (view->menu), dummy_item, 0);
-		gtk_widget_show (dummy_item);
-
-		/* we own this item */
-		egg_recent_view_gtk_set_item_tag (view, GTK_MENU_ITEM (dummy_item));
-	}
-}
-
-static void
-model_changed_cb (EggRecentModel *model, GList *list, EggRecentViewGtk *view)
-{
-	if (list != NULL)
-		egg_recent_view_gtk_set_list (view, list);
-	else
-		egg_recent_view_gtk_set_empty_list (view);
-}
-
-static EggRecentModel *
-egg_recent_view_gtk_get_model (EggRecentView *view_parent)
-{
-	EggRecentViewGtk *view;
-	
-	g_return_val_if_fail (view_parent != NULL, NULL);
-	view = EGG_RECENT_VIEW_GTK (view_parent);
-	return view->model;
-}
-
-static void
-egg_recent_view_gtk_set_model (EggRecentView *view_parent,
-				 EggRecentModel *model)
-{
-	EggRecentViewGtk *view;
-	
-	g_return_if_fail (view_parent != NULL);
-	view = EGG_RECENT_VIEW_GTK (view_parent);
-
-	if (view->model != NULL) {
-		g_object_unref (view->model);
-		g_signal_handler_disconnect (G_OBJECT (model),
-					     view->changed_cb_id);
-	}
-	
-	view->model = model;
-	g_object_ref (view->model);
-
-	view->changed_cb_id = g_signal_connect_object (G_OBJECT (model),
-						"changed",
-						G_CALLBACK (model_changed_cb),
-						view, 0);
-
-	egg_recent_model_changed (view->model);
-}
-
-void
-egg_recent_view_gtk_set_leading_sep (EggRecentViewGtk *view, gboolean val)
-{
-	view->leading_sep = val;
-
-	egg_recent_view_gtk_clear (view);
-
-	if (view->model)
-		egg_recent_model_changed (view->model);
-}
-
-void
-egg_recent_view_gtk_set_trailing_sep (EggRecentViewGtk *view, gboolean val)
-{
-	view->trailing_sep = val;
-
-	egg_recent_view_gtk_clear (view);
-
-	if (view->model)
-		egg_recent_model_changed (view->model);
-}
-
-static void
-egg_recent_view_gtk_set_property (GObject *object,
-			   guint prop_id,
-			   const GValue *value,
-			   GParamSpec *pspec)
-{
-	EggRecentViewGtk *view = EGG_RECENT_VIEW_GTK (object);
-
-	switch (prop_id)
-	{
-		case PROP_MENU:
-			egg_recent_view_gtk_set_menu (view,
-					       GTK_WIDGET (g_value_get_object (value)));
-		break;
-		case PROP_START_MENU_ITEM:
-			egg_recent_view_gtk_set_start_menu_item (view,
-					g_value_get_object (value));
-		break;
-		case PROP_SHOW_ICONS:
-			egg_recent_view_gtk_show_icons (view,
-					g_value_get_boolean (value));
-		break;
-		case PROP_SHOW_NUMBERS:
-			egg_recent_view_gtk_show_numbers (view,
-					g_value_get_boolean (value));
-		break;
-		case PROP_LABEL_WIDTH:
-		        egg_recent_view_gtk_set_label_width (view,
-					g_value_get_int (value));
-		break;
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-static void
-egg_recent_view_gtk_get_property (GObject *object,
-			   guint prop_id,
-			   GValue *value,
-			   GParamSpec *pspec)
-{
-	EggRecentViewGtk *view = EGG_RECENT_VIEW_GTK (object);
-
-	switch (prop_id)
-	{
-		case PROP_MENU:
-			g_value_set_object (value, view->menu);
-		break;
-		case PROP_START_MENU_ITEM:
-			g_value_set_object (value, view->start_menu_item);
-		break;
-		case PROP_SHOW_ICONS:
-			g_value_set_boolean (value, view->show_icons);
-		break;
-		case PROP_SHOW_NUMBERS:
-			g_value_set_boolean (value, view->show_numbers);
-		break;
-		case PROP_LABEL_WIDTH:
-			g_value_set_int (value, view->label_width);
-		break;
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-		break;
-	}
-}
-
-static void
-egg_recent_view_gtk_finalize (GObject *object)
-{
-	EggRecentViewGtk *view = EGG_RECENT_VIEW_GTK (object);
-
-	g_signal_handler_disconnect (G_OBJECT (view->model),
-				     view->changed_cb_id);
-
-	egg_recent_view_gtk_clear (view);
-
-	g_free (view->uid);
-
-	g_object_unref (view->model);
-	g_object_unref (view->client);
-
-	g_object_unref (view->tooltips);
-
-	parent_class->finalize (object);
-}
-
-static void
-egg_recent_view_gtk_class_init (EggRecentViewGtkClass * klass)
-{
-	GObjectClass *object_class;
-
-	object_class = G_OBJECT_CLASS (klass);
-
-	parent_class = g_type_class_peek_parent (klass);
-
-	object_class->set_property = egg_recent_view_gtk_set_property;
-	object_class->get_property = egg_recent_view_gtk_get_property;
-	object_class->finalize     = egg_recent_view_gtk_finalize;
-
-	view_signals[ACTIVATE] = g_signal_new ("activate",
-			G_OBJECT_CLASS_TYPE (object_class),
-			G_SIGNAL_RUN_LAST,
-			G_STRUCT_OFFSET (EggRecentViewGtkClass, activate),
-			NULL, NULL,
-			g_cclosure_marshal_VOID__BOXED,
-			G_TYPE_NONE, 1,
-			EGG_TYPE_RECENT_ITEM);
-
-	g_object_class_install_property (object_class,
-					 PROP_MENU,
-					 g_param_spec_object ("menu",
-						 	      "Menu",
-							      "The GtkMenuShell this object will update.",
-							      gtk_menu_get_type(),
-							      G_PARAM_READWRITE));
-	g_object_class_install_property (object_class,
-					 PROP_START_MENU_ITEM,
-					 g_param_spec_object ("start-menu-item",
-						 	      "Start Menu Item",
-							      "The menu item that precedes where are menu items will go",
-							      gtk_menu_item_get_type (),
-							      G_PARAM_READWRITE));
-
-	g_object_class_install_property (object_class,
-					 PROP_SHOW_ICONS,
-					 g_param_spec_boolean ("show-icons",
-					   "Show Icons",
-					   "Whether or not to show icons",
-					   FALSE,
-					   G_PARAM_READWRITE));
-
-	g_object_class_install_property (object_class,
-					 PROP_SHOW_NUMBERS,
-					 g_param_spec_boolean ("show-numbers",
-					   "Show Numbers",
-					   "Whether or not to show numbers",
-					   TRUE,
-					   G_PARAM_READWRITE));
-
-	g_object_class_install_property (object_class,
-					 PROP_LABEL_WIDTH,
-					 g_param_spec_int ("label-width",
-					   "Label Width",
-					   "The desired width of the menu label, in characters",
-					   -1,
-					   G_MAXINT,
-					   DEFAULT_LABEL_WIDTH,
-					   G_PARAM_READWRITE));
-
-	klass->activate = NULL;
-}
-
-static void
-egg_recent_view_init (EggRecentViewClass *iface)
-{
-	iface->do_get_model = egg_recent_view_gtk_get_model;
-	iface->do_set_model = egg_recent_view_gtk_set_model;
-}
-
-static void
-show_menus_changed_cb (GConfClient *client,
-		       guint cnxn_id,
-		       GConfEntry *entry,
-		       EggRecentViewGtk *view)
-{
-	GConfValue *value;
-
-	value = gconf_entry_get_value (entry);
-
-	g_return_if_fail (value->type == GCONF_VALUE_BOOL);
-
-	egg_recent_view_gtk_show_icons (view,
-				gconf_value_get_bool (value));
-
-}
-
-static void
-theme_changed_cb (GtkIconTheme *theme, EggRecentViewGtk *view)
-{
-	if (view->model != NULL)
-		egg_recent_model_changed (view->model);
-}
-
-static void
-egg_recent_view_gtk_init (EggRecentViewGtk * view)
-{
-	view->client = gconf_client_get_default ();
-
-	view->show_icons =
-		gconf_client_get_bool (view->client,
-			"/desktop/gnome/interface/menus_have_icons",
-			NULL);
-
-	gconf_client_add_dir (view->client, "/desktop/gnome/interface",
-			      GCONF_CLIENT_PRELOAD_NONE,
-			      NULL);
-	gconf_client_notify_add (view->client,
-			"/desktop/gnome/interface/menus_have_icons",
-			(GConfClientNotifyFunc)show_menus_changed_cb,
-			view, NULL, NULL);
-
-
-	view->leading_sep = FALSE;
-	view->trailing_sep = FALSE;
-
-	view->uid = egg_recent_util_get_unique_id ();
-	view->theme = gtk_icon_theme_get_default ();
-	g_signal_connect_object (view->theme, "changed",
-				 G_CALLBACK (theme_changed_cb), view, 0);
-	view->tooltips = gtk_tooltips_new ();
-	g_object_ref (view->tooltips);
-	gtk_object_sink (GTK_OBJECT (view->tooltips));
-	view->tooltip_func = NULL;
-	view->tooltip_func_data = NULL;
-
-	view->icon_size = GTK_ICON_SIZE_MENU;
-
-	view->label_width = DEFAULT_LABEL_WIDTH;
-}
-
-void
-egg_recent_view_gtk_set_icon_size (EggRecentViewGtk *view,
-				   GtkIconSize icon_size)
-{
-	if (view->icon_size != icon_size) {
-		view->icon_size = icon_size;
-		egg_recent_model_changed (view->model);
-	} else {
-		view->icon_size = icon_size;
-	}
-}
-
-GtkIconSize
-egg_recent_view_gtk_get_icon_size (EggRecentViewGtk *view)
-{
-	return view->icon_size;
-}
-
-void
-egg_recent_view_gtk_show_icons (EggRecentViewGtk *view, gboolean show)
-{
-	view->show_icons = show;
-
-	if (view->model)
-		egg_recent_model_changed (view->model);
-}
-
-void
-egg_recent_view_gtk_show_numbers (EggRecentViewGtk *view, gboolean show)
-{
-	view->show_numbers = show;
-
-	if (view->model)
-		egg_recent_model_changed (view->model);
-}
-
-void
-egg_recent_view_gtk_set_tooltip_func (EggRecentViewGtk *view,
-				      EggRecentViewGtkTooltipFunc func,
-				      gpointer user_data)
-{
-	view->tooltip_func = func;
-	view->tooltip_func_data = user_data;
-	
-	if (view->model)
-		egg_recent_model_changed (view->model);
-}
-
-void
-egg_recent_view_gtk_set_label_width (EggRecentViewGtk *view,
-				     gint              chars)
-{
-	g_return_if_fail (EGG_IS_RECENT_VIEW_GTK (view));
-
-	view->label_width = chars;
-}
-
-gint
-egg_recent_view_gtk_get_label_width (EggRecentViewGtk *view)
-{
-	g_return_val_if_fail (EGG_IS_RECENT_VIEW_GTK (view), -1);
-
-	return view->label_width;
-}
-
-/**
- * egg_recent_view_gtk_set_menu:
- * @view: A EggRecentViewGtk object.
- * @menu: The GtkMenuShell to put the menu items in.
- *
- * Use this function to change the GtkMenuShell that the recent
- * documents appear in.
- *
- */
-void
-egg_recent_view_gtk_set_menu (EggRecentViewGtk *view,
-				GtkWidget *menu)
-{
-	g_return_if_fail (view);
-	g_return_if_fail (EGG_IS_RECENT_VIEW_GTK (view));
-
-	if (view->menu != NULL)
-		g_object_remove_weak_pointer (G_OBJECT (view->menu),
-					      (gpointer *) &view->menu);
-	
-	view->menu = menu;
-
-	if (view->menu != NULL)
-		g_object_add_weak_pointer (G_OBJECT (view->menu),
-					   (gpointer *) &view->menu);
-}
-
-/**
- * egg_recent_view_gtk_set_start_menu_item:
- * @view: A EggRecentViewGtk object.
- * @start_menu_item: The menu item that appears just before where our menu
- * items should appear
- *
- */
-void
-egg_recent_view_gtk_set_start_menu_item (EggRecentViewGtk *view,
-					 GtkWidget *menu_item)
-{
-	g_return_if_fail (view);
-	g_return_if_fail (EGG_IS_RECENT_VIEW_GTK (view));
-	
-	view->start_menu_item = menu_item;
-}
-
-/**
- * egg_recent_view_gtk_get_menu:
- * @view: A EggRecentViewGtk object.
- *
- */
-GtkWidget *
-egg_recent_view_gtk_get_menu (EggRecentViewGtk *view)
-{
-	return view->menu;
-}
-
-/**
- * egg_recent_view_gtk_get_start_menu_item
- * @view: A EggRecentViewGtk object.
- *
- */
-GtkWidget *
-egg_recent_view_gtk_get_start_menu_item (EggRecentViewGtk *view)
-{
-	return view->start_menu_item;
-}
-
-
-/**
- * egg_recent_view_gtk_new:
- * @appname: The name of your application.
- * @limit:  The maximum number of items allowed.
- *
- * This creates a new EggRecentViewGtk object.
- *
- * Returns: a EggRecentViewGtk object
- */
-EggRecentViewGtk *
-egg_recent_view_gtk_new (GtkWidget *menu, GtkWidget *start_menu_item)
-{
-	EggRecentViewGtk *view;
-
-	g_return_val_if_fail (menu, NULL);
-
-	view = EGG_RECENT_VIEW_GTK (g_object_new (egg_recent_view_gtk_get_type (),
-					   "start-menu-item",
-					   start_menu_item,
-					   "menu", menu,
-					   "show-numbers", TRUE, NULL));
-
-	g_return_val_if_fail (view, NULL);
-	
-	return view;
-}
-
-/**
- * egg_recent_view_gtk_get_type:
- *
- * This returns a GType representing a EggRecentViewGtk object.
- *
- * Returns: a GType
- */
-GType
-egg_recent_view_gtk_get_type (void)
-{
-	static GType egg_recent_view_gtk_type = 0;
-
-	if(!egg_recent_view_gtk_type) {
-		static const GTypeInfo egg_recent_view_gtk_info = {
-			sizeof (EggRecentViewGtkClass),
-			NULL, /* base init */
-			NULL, /* base finalize */
-			(GClassInitFunc)egg_recent_view_gtk_class_init, /* class init */
-			NULL, /* class finalize */
-			NULL, /* class data */
-			sizeof (EggRecentViewGtk),
-			0,
-			(GInstanceInitFunc) egg_recent_view_gtk_init
-		};
-
-		static const GInterfaceInfo view_info =
-		{
-			(GInterfaceInitFunc) egg_recent_view_init,
-			NULL,
-			NULL
-		};
-
-		egg_recent_view_gtk_type = g_type_register_static (G_TYPE_OBJECT,
-							"EggRecentViewGtk",
-							&egg_recent_view_gtk_info, 0);
-		g_type_add_interface_static (egg_recent_view_gtk_type,
-					     EGG_TYPE_RECENT_VIEW,
-					     &view_info);
-	}
-
-	return egg_recent_view_gtk_type;
-}
-

=== removed file 'src/egg-recent-view-gtk.h'
--- src/egg-recent-view-gtk.h	2005-08-16 19:06:39 +0000
+++ src/egg-recent-view-gtk.h	1970-01-01 00:00:00 +0000
@@ -1,68 +0,0 @@
-/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef __EGG_RECENT_VIEW_GTK_H__
-#define __EGG_RECENT_VIEW_GTK_H__
-
-G_BEGIN_DECLS
-
-#include <gtk/gtk.h>
-#include "egg-recent-item.h"
-
-#define EGG_RECENT_VIEW_GTK(obj)		G_TYPE_CHECK_INSTANCE_CAST (obj, egg_recent_view_gtk_get_type (), EggRecentViewGtk)
-#define EGG_RECENT_VIEW_GTK_CLASS(klass) 	G_TYPE_CHECK_CLASS_CAST (klass, egg_recent_view_gtk_get_type (), EggRecentViewGtkClass)
-#define EGG_IS_RECENT_VIEW_GTK(obj)		G_TYPE_CHECK_INSTANCE_TYPE (obj, egg_recent_view_gtk_get_type ())
-
-typedef void (*EggRecentViewGtkTooltipFunc) (GtkTooltips *tooltips,
-					     GtkWidget *menu,
-					     EggRecentItem *item,
-					     gpointer user_data);
-
-typedef struct _EggRecentViewGtk EggRecentViewGtk;
-
-typedef struct _EggRecentViewGtkClass EggRecentViewGtkClass;
-
-struct _EggRecentViewGtkClass {
-	GObjectClass parent_class;
-	
-	void (*activate) (EggRecentViewGtk *view, EggRecentItem *item);
-};
-
-GType        egg_recent_view_gtk_get_type (void);
-
-EggRecentViewGtk * egg_recent_view_gtk_new (GtkWidget *menu,
-					    GtkWidget *start_menu_item);
-
-void egg_recent_view_gtk_set_menu            (EggRecentViewGtk *view,
-						GtkWidget *menu);
-GtkWidget * egg_recent_view_gtk_get_menu     (EggRecentViewGtk *view);
-
-
-void egg_recent_view_gtk_set_start_menu_item (EggRecentViewGtk *view,
-					      GtkWidget *menu_item);
-GtkWidget *egg_recent_view_gtk_get_start_menu_item     (EggRecentViewGtk *view);
-
-void egg_recent_view_gtk_set_leading_sep     (EggRecentViewGtk *view,
-						gboolean val);
-
-void egg_recent_view_gtk_set_trailing_sep    (EggRecentViewGtk *view,
-						gboolean val);
-
-void egg_recent_view_gtk_show_icons          (EggRecentViewGtk *view,
-					      gboolean show);
-void egg_recent_view_gtk_show_numbers        (EggRecentViewGtk *view,
-					      gboolean show);
-
-void egg_recent_view_gtk_set_tooltip_func    (EggRecentViewGtk *view,
-					      EggRecentViewGtkTooltipFunc func,
-					      gpointer user_data);
-
-void egg_recent_view_gtk_set_icon_size       (EggRecentViewGtk *view,
-					      GtkIconSize icon_size);
-GtkIconSize egg_recent_view_gtk_get_icon_size (EggRecentViewGtk *view);
-
-void egg_recent_view_gtk_set_label_width    (EggRecentViewGtk *view,
-					     gint              chars);
-gint egg_recent_view_gtk_get_label_width    (EggRecentViewGtk *view);
-
-G_END_DECLS
-
-#endif /* __EGG_RECENT_VIEW_GTK_H__ */

=== removed file 'src/egg-recent-view.c'
--- src/egg-recent-view.c	2005-04-14 22:03:22 +0000
+++ src/egg-recent-view.c	1970-01-01 00:00:00 +0000
@@ -1,68 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * 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.
- *
- * Authors:
- *   James Willcox <jwillcox@cs.indiana.edu>
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <gtk/gtk.h>
-#include "egg-recent-view.h"
-
-
-GtkType
-egg_recent_view_get_type (void)
-{
-	static GtkType view_type = 0;
-
-	if (!view_type)
-	{
-		static const GTypeInfo view_info =
-		{
-			sizeof (EggRecentViewClass),  /* class_size */
-			NULL,			    /* base_init */
-			NULL,			    /* base_finalize */
-		};
-
-		view_type = g_type_register_static (G_TYPE_INTERFACE,
-						    "EggRecentView",
-						    &view_info, 0);
-	}
-
-	return view_type;
-}
-
-EggRecentModel *
-egg_recent_view_get_model (EggRecentView *view)
-{
-	g_return_val_if_fail (view, NULL);
-
-	return EGG_RECENT_VIEW_GET_CLASS (view)->do_get_model (view);
-}
-
-void
-egg_recent_view_set_model (EggRecentView *view, EggRecentModel *model)
-{
-	g_return_if_fail (view);
-	g_return_if_fail (model);
-
-	EGG_RECENT_VIEW_GET_CLASS (view)->do_set_model (view, model);
-}

=== removed file 'src/egg-recent-view.h'
--- src/egg-recent-view.h	2004-04-10 02:54:07 +0000
+++ src/egg-recent-view.h	1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-#ifndef __EGG_RECENT_VIEW_H__
-#define __EGG_RECENT_VIEW_H__
-
-
-#include <gdk/gdk.h>
-#include <gtk/gtkwidget.h>
-#include "egg-recent-model.h"
-#include "egg-recent-item.h"
-
-G_BEGIN_DECLS
-
-#define EGG_TYPE_RECENT_VIEW             (egg_recent_view_get_type ())
-#define EGG_RECENT_VIEW(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_RECENT_VIEW, EggRecentView))
-#define EGG_RECENT_VIEW_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), EGG_TYPE_RECENT_VIEW, EggRecentViewClass))
-#define EGG_IS_RECENT_VIEW(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_RECENT_VIEW))
-#define EGG_IS_RECENT_VIEW_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), EGG_TYPE_RECENT_VIEW))
-#define EGG_RECENT_VIEW_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EGG_TYPE_RECENT_VIEW, EggRecentViewClass))
-
-
-typedef struct _EggRecentView       EggRecentView;
-typedef struct _EggRecentViewClass  EggRecentViewClass;
-
-struct _EggRecentViewClass
-{
-	GTypeInterface		   base_iface;
-  
-	/* vtable, not signals */
-	void (* do_set_model)			(EggRecentView *view,
-						 EggRecentModel *model);
-	EggRecentModel * (* do_get_model)	(EggRecentView *view);
-};
-
-GtkType	egg_recent_view_get_type		(void) G_GNUC_CONST;
-void	egg_recent_view_set_list		(EggRecentView *view,
-						 GSList *list);
-void	egg_recent_view_clear			(EggRecentView *view);
-EggRecentModel *egg_recent_view_get_model	(EggRecentView *view);
-void	egg_recent_view_set_model		(EggRecentView *view,
-						 EggRecentModel *model);
-
-G_END_DECLS
-
-#endif /* __EGG_RECENT_VIEW_H__ */

=== added file 'data/totem-ui.xml'
--- data/totem-ui.xml	1970-01-01 00:00:00 +0000
+++ data/totem-ui.xml	2006-08-29 21:12:13 +0000
@@ -0,0 +1,89 @@
+<ui>
+	<menubar name="tmw-menubar">
+		<menu name="movie" action="movie-menu">
+			<menuitem name="open" action="open"/>
+			<menuitem name="open-location" action="open-location"/>
+			<placeholder name="devices-placeholder"/>
+			<separator name="recent-separator"/>
+			<placeholder name="recent-placeholder"/>
+			<separator/>
+			<menuitem name="eject" action="eject"/>
+			<separator/>
+			<menuitem name="play" action="play"/>
+			<separator/>
+			<menuitem name="quit" action="quit"/>
+		</menu>
+		<menu name="edit" action="edit-menu">
+			<menuitem name="take-screenshot" action="take-screenshot"/>
+			<separator/>
+			<menuitem name="repeat-mode" action="repeat-mode"/>
+			<menuitem name="shuffle-mode" action="shuffle-mode"/>
+			<separator/>
+			<menuitem name="preferences" action="preferences"/>
+		</menu>
+		<menu name="view" action="view-menu">
+			<menuitem name="fullscreen" action="fullscreen"/>
+			<menu name="zoom-window" action="zoom-window-menu">
+				<menuitem name="zoom-1-2" action="zoom-1-2"/>
+				<menuitem name="zoom-1-1" action="zoom-1-1"/>
+				<menuitem name="zoom-2-1" action="zoom-2-1"/>
+			</menu>
+			<menuitem name="zoom-in" action="zoom-in"/>
+			<menuitem name="zoom-reset" action="zoom-reset"/>
+			<menuitem name="zoom-out" action="zoom-out"/>
+			<separator/>
+			<menu name="aspect-ratio" action="aspect-ratio-menu">
+				<menuitem name="aspect-ratio-auto" action="aspect-ratio-auto"/>
+				<menuitem name="aspect-ratio-square" action="aspect-ratio-square"/>
+				<menuitem name="aspect-ratio-fbt" action="aspect-ratio-fbt"/>
+				<menuitem name="aspect-ratio-anamorphic" action="aspect-ratio-anamorphic"/>
+				<menuitem name="aspect-ratio-dvb" action="aspect-ratio-dvb"/>
+			</menu>
+			<menuitem name="deinterlace" action="deinterlace"/>
+			<menuitem name="next-angle" action="next-angle"/>
+			<menuitem name="always-on-top" action="always-on-top"/>
+			<menuitem name="show-controls" action="show-controls"/>
+			<menu name="subtitles" action="subtitles-menu">
+				<placeholder name="placeholder"/>
+			</menu>
+			<separator/>
+			<menuitem name="sidebar" action="sidebar"/>			
+		</menu>
+		<menu name="go" action="go-menu">
+			<menuitem name="dvd-root-menu" action="dvd-root-menu"/>
+			<menuitem name="dvd-title-menu" action="dvd-title-menu"/>
+			<menuitem name="dvd-audio-menu" action="dvd-audio-menu"/>
+			<menuitem name="dvd-angle-menu" action="dvd-angle-menu"/>
+			<menuitem name="dvd-chapter-menu" action="dvd-chapter-menu"/>
+			<separator/>
+			<menuitem name="next-chapter" action="next-chapter"/>
+			<menuitem name="previous-chapter" action="previous-chapter"/>
+			<separator/>
+			<menuitem name="skip-to" action="skip-to"/>
+			<menuitem name="skip-forward" action="skip-forward"/>
+			<menuitem name="skip-backwards" action="skip-backwards"/>
+		</menu>
+		<menu name="sound" action="sound-menu">
+			<menu name="languages" action="languages-menu">
+				<placeholder name="placeholder"/>
+			</menu>
+			<menuitem name="volume-up" action="volume-up"/>
+			<menuitem name="volume-down" action="volume-down"/>
+		</menu>
+		<menu name="help" action="help-menu">
+			<menuitem name="contents" action="contents"/>
+			<menuitem name="about" action="about"/>
+		</menu>
+	</menubar>
+
+	<popup name="totem-main-popup">
+		<menuitem name="play" action="play"/>
+		<menuitem name="next-chapter" action="next-chapter"/>
+		<menuitem name="previous-chapter" action="previous-chapter"/>
+		<menuitem name="skip-forward" action="skip-forward"/>
+		<menuitem name="skip-backwards" action="skip-backwards"/>
+		<menuitem name="volume-up" action="volume-up"/>
+		<menuitem name="volume-down" action="volume-down"/>
+		<menuitem name="show-controls" action="show-controls"/>
+	</popup>
+</ui>

=== modified file 'configure.in'
--- configure.in	2006-09-03 23:45:58 +0000
+++ configure.in	2006-09-04 17:37:02 +0000
@@ -29,7 +29,7 @@
 
 # Requirements
 GLIB_REQS=2.8.0
-GTK_REQS=2.5.6
+GTK_REQS=2.10.0
 GNOMEVFS_REQS=2.8.2
 GNOMEUI_REQS=2.3.3
 GNOMEICON_REQS=2.9.3

=== modified file 'data/Makefile.am'
--- data/Makefile.am	2006-08-19 10:01:12 +0000
+++ data/Makefile.am	2006-08-29 20:33:21 +0000
@@ -18,11 +18,11 @@
 	totem.glade			\
 	playlist.glade			\
 	mozilla-viewer.glade		\
-	popup.glade			\
 	properties.glade		\
 	skip_to.glade			\
 	uri.glade			\
 	screenshot.glade		\
+	totem-ui.xml			\
 	totem_logo.png			\
 	vanity.glade			\
 	vanity.png

=== modified file 'data/totem.glade'
--- data/totem.glade	2006-07-12 09:50:24 +0000
+++ data/totem.glade	2006-09-01 17:57:13 +0000
@@ -1608,90 +1609,6 @@
 	  <property name="visible">True</property>
 	  <property name="homogeneous">True</property>
 	  <property name="spacing">4</property>
-
-	  <child>
-	    <widget class="GtkButton" id="tcw_previous_button">
-	      <property name="visible">True</property>
-	      <property name="sensitive">False</property>
-	      <property name="tooltip" translatable="yes">Previous</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-
-	      <child>
-		<widget class="GtkImage" id="image124">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-media-previous</property>
-		  <property name="icon_size">4</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="tcw_pp_button">
-	      <property name="visible">True</property>
-	      <property name="sensitive">False</property>
-	      <property name="tooltip" translatable="yes">Play/Pause</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-
-	      <child>
-		<widget class="GtkImage" id="tcw_pp_button_image">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-media-play</property>
-		  <property name="icon_size">4</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="tcw_next_button">
-	      <property name="visible">True</property>
-	      <property name="sensitive">False</property>
-	      <property name="tooltip" translatable="yes">Next</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-
-	      <child>
-		<widget class="GtkImage" id="image123">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-media-next</property>
-		  <property name="icon_size">4</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
 	</widget>
 	<packing>
 	  <property name="padding">0</property>
@@ -1918,907 +1836,13 @@
       <property name="spacing">0</property>
 
       <child>
-	<widget class="GtkMenuBar" id="tmw_menubar">
+	<widget class="GtkVBox" id="tmw_menubar_box">
 	  <property name="visible">True</property>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="tmw_menu_item_movie">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Movie</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="tmw_menu_movie">
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_open_menu_item">
-		      <property name="visible">True</property>
-		      <property name="sensitive">True</property>
-		      <property name="label" translatable="yes">_Open...</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_open1_activate"/>
-		      <accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image177">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-open</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkMenuItem" id="tmw_open_location_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Open a non-local file</property>
-		      <property name="label" translatable="yes">Open _Location...</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_open_location1_activate" last_modification_time="Wed, 12 Mar 2003 17:37:46 GMT"/>
-		      <accelerator key="L" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSeparatorMenuItem" id="tmw_menu_movie_separator_1">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkMenuItem" id="tmw_eject_menu_item">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Eject</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_eject1_activate" last_modification_time="Wed, 09 Apr 2003 18:33:36 GMT"/>
-		      <accelerator key="E" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSeparatorMenuItem" id="tmw_menu_recent_separator">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_play_menu_item">
-		      <property name="visible">True</property>
-		      <property name="sensitive">False</property>
-		      <property name="tooltip" translatable="yes">Play or pause the movie</property>
-		      <property name="label" translatable="yes">Play / Pa_use</property>
-		      <property name="use_underline">True</property>
-		      <accelerator key="P" modifiers="0" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image161">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-media-play</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSeparatorMenuItem" id="tmw_menu_movie_separator_3">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_quit_menu_item">
-		      <property name="visible">True</property>
-		      <property name="sensitive">True</property>
-		      <property name="label" translatable="yes">_Quit</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_quit1_activate"/>
-		      <accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image177">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-quit</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="tmw_menu_item_edit">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Edit</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="tmw_menu_edit">
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_take_screenshot_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Take a screenshot</property>
-		      <property name="label" translatable="yes">Take _Screenshot...</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_take_screenshot1_activate" last_modification_time="Mon, 06 Jan 2003 19:35:01 GMT"/>
-		      <accelerator key="S" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="tmw_take_screenshot_menu_item_image">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-convert</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSeparatorMenuItem" id="tmw_menu_edit_separator">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="tmw_repeat_mode_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Set the repeat mode</property>
-		      <property name="label" translatable="yes">_Repeat Mode</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <signal name="activate" handler="on_repeat_mode1_activate" last_modification_time="Fri, 07 Feb 2003 20:43:43 GMT"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="tmw_shuffle_mode_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Set the shuffle mode</property>
-		      <property name="label" translatable="yes">Shuff_le Mode</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <signal name="activate" handler="on_tmw_shuffle_mode_menu_item_activate" last_modification_time="Thu, 25 Sep 2003 12:08:18 GMT"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSeparatorMenuItem" id="tmw_menu_edit_separator">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_preferences_menu_item">
-		      <property name="visible">True</property>
-		      <property name="sensitive">True</property>
-		      <property name="label" translatable="yes">Prefere_nces</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_preferences1_activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image177">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-preferences</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="tmw_menu_item_view">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_View</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="tmw_menu_view">
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_fullscreen_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Switch to fullscreen</property>
-		      <property name="label" translatable="yes">_Fullscreen</property>
-		      <property name="use_underline">True</property>
-		      <accelerator key="F" modifiers="0" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image163">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-zoom-fit</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkMenuItem" id="fit_window_to_movie1">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Fit Window to Movie</property>
-		      <property name="use_underline">True</property>
-
-		      <child>
-			<widget class="GtkMenu" id="fit_window_to_movie1_menu">
-
-			  <child>
-			    <widget class="GtkMenuItem" id="tmw_resize_1_2_menu_item">
-			      <property name="visible">True</property>
-			      <property name="tooltip" translatable="yes">Resize to half the video size</property>
-			      <property name="label" translatable="yes">_Resize 1:2</property>
-			      <property name="use_underline">True</property>
-			      <signal name="activate" handler="on_zoom_1_2_activate" last_modification_time="Sat, 24 Aug 2002 12:55:50 GMT"/>
-			      <accelerator key="0" modifiers="0" signal="activate"/>
-			    </widget>
-			  </child>
-
-			  <child>
-			    <widget class="GtkMenuItem" id="tmw_resize_1_1_menu_item">
-			      <property name="visible">True</property>
-			      <property name="tooltip" translatable="yes">Resize to video size</property>
-			      <property name="label" translatable="yes">Resize _1:1</property>
-			      <property name="use_underline">True</property>
-			      <signal name="activate" handler="on_zoom_1_1_activate" last_modification_time="Sat, 24 Aug 2002 12:49:15 GMT"/>
-			      <accelerator key="1" modifiers="0" signal="activate"/>
-			    </widget>
-			  </child>
-
-			  <child>
-			    <widget class="GtkMenuItem" id="tmw_resize_2_1_menu_item">
-			      <property name="visible">True</property>
-			      <property name="tooltip" translatable="yes">Resize to twice the video size</property>
-			      <property name="label" translatable="yes">Resize _2:1</property>
-			      <property name="use_underline">True</property>
-			      <signal name="activate" handler="on_zoom_2_1_activate" last_modification_time="Sat, 24 Aug 2002 12:49:15 GMT"/>
-			      <accelerator key="2" modifiers="0" signal="activate"/>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_zoom_in_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Zoom in</property>
-		      <property name="label" translatable="yes">Zoom In</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_zoom_in1_activate" last_modification_time="Fri, 03 Dec 2004 19:37:56 GMT"/>
-		      <accelerator key="R" modifiers="0" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image164">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-zoom-in</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_zoom_reset_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Zoom reset</property>
-		      <property name="label" translatable="yes">Zoom Reset</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_tmw_zoom_reset_menu_item_activate" last_modification_time="Fri, 03 Dec 2004 20:15:06 GMT"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image165">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-zoom-100</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_zoom_out_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Zoom out</property>
-		      <property name="label" translatable="yes">Zoom Out</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_zoom_out1_activate" last_modification_time="Fri, 03 Dec 2004 19:37:56 GMT"/>
-		      <accelerator key="T" modifiers="0" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image166">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-zoom-out</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSeparatorMenuItem" id="tmw_menu_view_separator_1">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkMenuItem" id="tmw_aspect_ratio_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Set the aspect ratio</property>
-		      <property name="label" translatable="yes">_Aspect Ratio</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_aspect_ratio1_activate" last_modification_time="Sun, 07 Mar 2004 22:28:14 GMT"/>
-
-		      <child>
-			<widget class="GtkMenu" id="tmw_menu_aspect">
-
-			  <child>
-			    <widget class="GtkRadioMenuItem" id="tmw_aspect_ratio_auto_menu_item">
-			      <property name="visible">True</property>
-			      <property name="tooltip" translatable="yes">Sets automatic aspect ratio</property>
-			      <property name="label" translatable="yes">Auto</property>
-			      <property name="use_underline">True</property>
-			      <property name="active">True</property>
-			      <signal name="activate" handler="on_aspect_ratio_auto_activate" last_modification_time="Sun, 07 Mar 2004 22:28:14 GMT"/>
-			    </widget>
-			  </child>
-
-			  <child>
-			    <widget class="GtkRadioMenuItem" id="tmw_aspect_ratio_square_menu_item">
-			      <property name="visible">True</property>
-			      <property name="tooltip" translatable="yes">Sets square aspect ratio</property>
-			      <property name="label" translatable="yes">Square</property>
-			      <property name="use_underline">True</property>
-			      <property name="active">False</property>
-			      <property name="group">tmw_aspect_ratio_auto_menu_item</property>
-			      <signal name="activate" handler="on_aspect_ratio_square_activate" last_modification_time="Sun, 07 Mar 2004 22:28:14 GMT"/>
-			    </widget>
-			  </child>
-
-			  <child>
-			    <widget class="GtkRadioMenuItem" id="tmw_aspect_ratio_fbt_menu_item">
-			      <property name="visible">True</property>
-			      <property name="tooltip" translatable="yes">Sets 4:3 (TV) aspect ratio</property>
-			      <property name="label" translatable="yes">4:3 (TV)</property>
-			      <property name="use_underline">True</property>
-			      <property name="active">False</property>
-			      <property name="group">tmw_aspect_ratio_auto_menu_item</property>
-			      <signal name="activate" handler="on_aspect_ratio_fbt_activate" last_modification_time="Sun, 07 Mar 2004 22:28:14 GMT"/>
-			    </widget>
-			  </child>
-
-			  <child>
-			    <widget class="GtkRadioMenuItem" id="tmw_aspect_ratio_anamorphic_menu_item">
-			      <property name="visible">True</property>
-			      <property name="tooltip" translatable="yes">Sets 16:9 (Anamorphic) aspect ratio</property>
-			      <property name="label" translatable="yes">16:9 (Widescreen)</property>
-			      <property name="use_underline">True</property>
-			      <property name="active">False</property>
-			      <property name="group">tmw_aspect_ratio_auto_menu_item</property>
-			      <signal name="activate" handler="on_aspect_anamorphic_activate" last_modification_time="Sun, 07 Mar 2004 22:28:14 GMT"/>
-			    </widget>
-			  </child>
-
-			  <child>
-			    <widget class="GtkRadioMenuItem" id="tmw_aspect_ratio_dvb_menu_item">
-			      <property name="visible">True</property>
-			      <property name="tooltip" translatable="yes">Sets 2.11:1 (DVB) aspect ratio</property>
-			      <property name="label" translatable="yes">2.11:1 (DVB)</property>
-			      <property name="use_underline">True</property>
-			      <property name="active">False</property>
-			      <property name="group">tmw_aspect_ratio_auto_menu_item</property>
-			      <signal name="activate" handler="on_aspect_ratio_dvb_activate" last_modification_time="Sun, 07 Mar 2004 22:28:14 GMT"/>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="tmw_deinterlace_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Deinterlace</property>
-		      <property name="label" translatable="yes">_Deinterlace</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <signal name="activate" handler="on_deinterlace1_activate" last_modification_time="Wed, 05 Mar 2003 20:46:23 GMT"/>
-		      <accelerator key="I" modifiers="0" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkMenuItem" id="tmw_next_angle_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Switch angles</property>
-		      <property name="label" translatable="yes">Switch An_gles</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_next_angle_activate" last_modification_time="Sat, 24 Aug 2002 12:49:15 GMT"/>
-		      <accelerator key="G" modifiers="0" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="tmw_always_on_top_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Always on top</property>
-		      <property name="label" translatable="yes">Always on _Top</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <signal name="activate" handler="on_always_on_top1_activate" last_modification_time="Wed, 05 Mar 2003 20:46:23 GMT"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="tmw_show_controls_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Show controls</property>
-		      <property name="label" translatable="yes">Show _Controls</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">True</property>
-		      <signal name="activate" handler="on_show_controls1_activate" last_modification_time="Fri, 18 Apr 2003 10:50:36 GMT"/>
-		      <accelerator key="H" modifiers="0" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkMenuItem" id="tmw_subtitles_menu_item">
-		      <property name="visible">True</property>
-		      <property name="sensitive">False</property>
-		      <property name="tooltip" translatable="yes">Subtitles</property>
-		      <property name="label" translatable="yes">S_ubtitles</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_subtitles1_activate" last_modification_time="Mon, 24 Mar 2003 19:52:36 GMT"/>
-
-		      <child>
-			<widget class="GtkMenu" id="tmw_menu_subtitles">
-
-			  <child>
-			    <widget class="GtkMenuItem" id="tmw_no_subtitles_selection_available">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">No subtitles selection available</property>
-			      <property name="use_underline">True</property>
-			      <signal name="activate" handler="on_no_subtitles_selection_available1_activate" last_modification_time="Mon, 24 Mar 2003 19:52:36 GMT"/>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSeparatorMenuItem" id="tmw_menu_view_separator_2">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="tmw_sidebar_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Show or hide the sidebar</property>
-		      <property name="label" translatable="yes">_Sidebar</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">True</property>
-		      <signal name="activate" handler="on_show_sidebar1_activate" last_modification_time="Fri, 14 Jun 2002 22:36:54 GMT"/>
-		      <accelerator key="F9" modifiers="0" signal="activate"/>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="tmw_menu_item_dvd">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Go</property>
-	      <property name="use_underline">True</property>
-	      <signal name="activate" handler="on_dvd1_menu_activate" last_modification_time="Sun, 01 Dec 2002 05:35:38 GMT"/>
-
-	      <child>
-		<widget class="GtkMenu" id="tmw_menu_dvd">
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_dvd_root_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Go to the DVD menu</property>
-		      <property name="label" translatable="yes">_DVD Menu</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_dvd_root_menu1_activate" last_modification_time="Sun, 01 Dec 2002 06:37:16 GMT"/>
-		      <accelerator key="m" modifiers="0" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image168">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-index</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkMenuItem" id="tmw_dvd_title_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Go to the title menu</property>
-		      <property name="label" translatable="yes">_Title Menu</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_dvd_title_menu1_activate" last_modification_time="Sun, 01 Dec 2002 06:46:59 GMT"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkMenuItem" id="tmw_dvd_audio_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Go to the audio menu</property>
-		      <property name="label" translatable="yes">A_udio Menu</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_dvd_audio_menu1_activate" last_modification_time="Sun, 01 Dec 2002 06:47:23 GMT"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkMenuItem" id="tmw_dvd_angle_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Go to the angle menu</property>
-		      <property name="label" translatable="yes">_Angle Menu</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_dvd_angle_menu1_activate" last_modification_time="Mon, 02 Dec 2002 16:46:53 GMT"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_dvd_chapter_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Go to the chapter menu</property>
-		      <property name="label" translatable="yes">_Chapter Menu</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_dvd_chapter_menu1_activate" last_modification_time="Sun, 01 Dec 2002 06:48:14 GMT"/>
-		      <accelerator key="c" modifiers="0" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image169">
-			  <property name="visible">True</property>
-			  <property name="stock">gnome-stock-text-numbered-list</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSeparatorMenuItem" id="tmw_menu_dvd_separator_1">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_next_chapter_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Next chapter or movie</property>
-		      <property name="label" translatable="yes">_Next Chapter/Movie</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_next_chapter1_activate" last_modification_time="Sun, 01 Dec 2002 05:37:38 GMT"/>
-		      <accelerator key="n" modifiers="0" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image170">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-media-next</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_previous_chapter_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Previous chapter or movie</property>
-		      <property name="label" translatable="yes">_Previous Chapter/Movie</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_previous_chapter1_activate" last_modification_time="Sun, 01 Dec 2002 05:38:03 GMT"/>
-		      <accelerator key="b" modifiers="0" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image171">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-media-previous</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSeparatorMenuItem" id="tmw_menu_dvd_separator_2">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_skip_to_menu_item">
-		      <property name="visible">True</property>
-		      <property name="sensitive">False</property>
-		      <property name="tooltip" translatable="yes">Skip to a specific time</property>
-		      <property name="label" translatable="yes">_Skip to...</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_skip_to1_activate" last_modification_time="Mon, 20 Jan 2003 13:27:41 GMT"/>
-		      <accelerator key="S" modifiers="0" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image172">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-jump-to</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_skip_forward_menu_item">
-		      <property name="visible">True</property>
-		      <property name="sensitive">False</property>
-		      <property name="tooltip" translatable="yes">Skip forward</property>
-		      <property name="label" translatable="yes">Skip _Forward</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_skip_forward1_activate" last_modification_time="Sun, 09 Jun 2002 02:56:32 GMT"/>
-		      <accelerator key="Right" modifiers="0" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image173">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-media-forward</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_skip_backwards_menu_item">
-		      <property name="visible">True</property>
-		      <property name="sensitive">False</property>
-		      <property name="tooltip" translatable="yes">Skip backwards</property>
-		      <property name="label" translatable="yes">Skip _Backwards</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_skip_backwards1_activate" last_modification_time="Sun, 09 Jun 2002 03:00:00 GMT"/>
-		      <accelerator key="Left" modifiers="0" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image174">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-media-rewind</property>
-			  <property name="icon_size">4</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="tmw_menu_item_sound">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Sound</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="tmw_menu_sound">
-
-		  <child>
-		    <widget class="GtkMenuItem" id="tmw_languages_menu_item">
-		      <property name="visible">True</property>
-		      <property name="sensitive">False</property>
-		      <property name="tooltip" translatable="yes">Languages</property>
-		      <property name="label" translatable="yes">_Languages</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_languages1_activate" last_modification_time="Mon, 24 Mar 2003 19:45:07 GMT"/>
-
-		      <child>
-			<widget class="GtkMenu" id="tmw_menu_languages">
-
-			  <child>
-			    <widget class="GtkMenuItem" id="tmw_no_language_selection_available">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">No Language Selection Available</property>
-			      <property name="use_underline">True</property>
-			      <signal name="activate" handler="on_no_langage_selection_available1_activate" last_modification_time="Mon, 24 Mar 2003 19:50:56 GMT"/>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_volume_up_menu_item">
-		      <property name="visible">True</property>
-		      <property name="sensitive">False</property>
-		      <property name="tooltip" translatable="yes">Volume up</property>
-		      <property name="label" translatable="yes">Volume _Up</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_volume_up1_activate" last_modification_time="Fri, 09 Aug 2002 22:45:55 GMT"/>
-		      <accelerator key="Up" modifiers="0" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image175">
-			  <property name="visible">True</property>
-			  <property name="stock">gnome-stock-volume</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_volume_down_menu_item">
-		      <property name="visible">True</property>
-		      <property name="sensitive">False</property>
-		      <property name="tooltip" translatable="yes">Volume down</property>
-		      <property name="label" translatable="yes">Volume _Down</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_volume_down1_activate" last_modification_time="Fri, 09 Aug 2002 22:45:55 GMT"/>
-		      <accelerator key="Down" modifiers="0" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image176">
-			  <property name="visible">True</property>
-			  <property name="stock">gnome-stock-volume</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="tmw_menu_item_help">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Help</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="tmw_menu_help">
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_contents_menu_item">
-		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Help contents</property>
-		      <property name="label" translatable="yes">_Contents</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_contents1_activate" last_modification_time="Sun, 09 Nov 2003 00:49:26 GMT"/>
-		      <accelerator key="F1" modifiers="0" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image177">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-help</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="tmw_about_menu_item">
-		      <property name="visible">True</property>
-		      <property name="sensitive">True</property>
-		      <property name="label" translatable="yes">_About</property>
-		      <property name="use_underline">True</property>
-		      <signal name="activate" handler="on_about1_activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image177">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-about</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		</widget>
-	      </child>
-	    </widget>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <placeholder/>
 	  </child>
 	</widget>
 	<packing>
@@ -2930,162 +1954,10 @@
 		      <property name="spacing">6</property>
 
 		      <child>
-			<widget class="GtkButton" id="tmw_previous_button">
-			  <property name="visible">True</property>
-			  <property name="sensitive">False</property>
-			  <property name="tooltip" translatable="yes">Previous</property>
-			  <property name="can_focus">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-
-			  <child>
-			    <widget class="GtkImage" id="image121">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-media-previous</property>
-			      <property name="icon_size">4</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="tmw_play_pause_button">
-			  <property name="visible">True</property>
-			  <property name="sensitive">False</property>
-			  <property name="tooltip" translatable="yes">Play/Pause</property>
-			  <property name="can_focus">True</property>
-			  <property name="has_focus">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-
-			  <child>
-			    <widget class="GtkImage" id="tmw_play_pause_button_image">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-media-play</property>
-			      <property name="icon_size">4</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="tmw_next_button">
-			  <property name="visible">True</property>
-			  <property name="sensitive">False</property>
-			  <property name="tooltip" translatable="yes">Next</property>
-			  <property name="can_focus">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-
-			  <child>
-			    <widget class="GtkImage" id="image120">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-media-next</property>
-			      <property name="icon_size">4</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkToggleButton" id="tmw_sidebar_button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-			  <property name="active">False</property>
-			  <property name="inconsistent">False</property>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment1">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">0</property>
-			      <property name="yscale">0</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkHBox" id="hbox25">
-				  <property name="visible">True</property>
-				  <property name="homogeneous">False</property>
-				  <property name="spacing">2</property>
-
-				  <child>
-				    <widget class="GtkArrow" id="arrow1">
-				      <property name="visible">True</property>
-				      <property name="arrow_type">GTK_ARROW_RIGHT</property>
-				      <property name="shadow_type">GTK_SHADOW_OUT</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				    <packing>
-				      <property name="padding">0</property>
-				      <property name="expand">False</property>
-				      <property name="fill">False</property>
-				    </packing>
-				  </child>
-
-				  <child>
-				    <widget class="GtkLabel" id="label33">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Side_bar</property>
-				      <property name="use_underline">True</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				      <property name="width_chars">-1</property>
-				      <property name="single_line_mode">False</property>
-				      <property name="angle">0</property>
-				    </widget>
-				    <packing>
-				      <property name="padding">0</property>
-				      <property name="expand">False</property>
-				      <property name="fill">False</property>
-				    </packing>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
+			<widget class="GtkHBox" id="tmw_sidebar_button_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>

=== modified file 'src/Makefile.am'
--- src/Makefile.am	2006-08-19 10:01:15 +0000
+++ src/Makefile.am	2006-09-01 08:40:55 +0000
@@ -30,18 +30,6 @@
 
 modules_flags = -export_dynamic -avoid-version -module
 
-EGG_RECENT_FILES =                      \
-	egg-recent-model.c              \
-        egg-recent-model.h              \
-	egg-recent-item.c               \
-	egg-recent-item.h               \
-	egg-recent-view.c               \
-	egg-recent-view.h               \
-	egg-recent-view-gtk.c           \
-        egg-recent-view-gtk.h           \
-	egg-recent-util.c               \
-	egg-recent-util.h
-
 BACON_VOLUME = \
 	bacon-volume.c			\
 	bacon-volume.h
@@ -61,7 +49,6 @@
 EGGDIR=$(srcdir)/../../libegg/libegg/recent-files/
 BACONDIR=$(srcdir)/../../libbacon/src
 regenerate-built-sources:
-	EGGFILES="$(EGG_RECENT_FILES)" EGGDIR="$(EGGDIR)" $(srcdir)/update-from-egg.sh || true
 	EGGFILES="$(BACON_MESSAGE_CONNECTION) $(BACON_VOLUME)" EGGDIR="$(BACONDIR)" $(srcdir)/update-from-egg.sh || true
 
 libbaconpropertiespage_la_SOURCES = \
@@ -72,7 +59,6 @@
 
 
 totem_SOURCES = 					\
-	$(EGG_RECENT_FILES)				\
 	totem.c totem.h					\
 	totem-remote.c totem-remote.h			\
 	totem-preferences.c totem-preferences.h		\

=== modified file 'src/totem-menu.c'
--- src/totem-menu.c	2006-06-13 09:21:53 +0000
+++ src/totem-menu.c	2006-09-03 23:44:04 +0000
@@ -29,9 +29,12 @@
 
 #include "totem-menu.h"
 #include "totem.h"
+#include "totem-interface.h"
 #include "totem-private.h"
+#include "totem-sidebar.h"
 #include "bacon-video-widget.h"
-#include "egg-recent-view.h"
+
+#include "debug.h"
 
 /* ISO-639 helpers */
 static GHashTable *lang_table;
@@ -196,111 +199,90 @@
 }
 
 static void
-on_sub_activate (GtkButton *button, Totem *totem)
+subtitles_changed_callback (GtkRadioAction *action, GtkRadioAction *current,
+		Totem *totem)
 {
 	int rank;
-	gboolean is_set;
-
-	rank = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button), "rank"));
-	is_set = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (button));
-
-	if (is_set != FALSE)
-		bacon_video_widget_set_subtitle (totem->bvw, rank);
+
+	rank = gtk_radio_action_get_current_value (current);
+
+	bacon_video_widget_set_subtitle (totem->bvw, rank);
 }
 
+
 static void
-on_lang_activate (GtkButton *button, Totem *totem)
+languages_changed_callback (GtkRadioAction *action, GtkRadioAction *current,
+		Totem *totem)
 {
 	int rank;
-	gboolean is_set;
-
-	rank = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button), "rank"));
-	is_set = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (button));
-
-	if (is_set != FALSE)
-		bacon_video_widget_set_language (totem->bvw, rank);
+
+	rank = gtk_radio_action_get_current_value (current);
+
+	bacon_video_widget_set_language (totem->bvw, rank);
 }
 
-static GSList*
-add_item_to_menu (Totem *totem, GtkWidget *menu, const char *lang,
-		int current_lang, int selection, gboolean is_lang,
-		GSList *group)
+static GtkAction *
+add_lang_action (Totem *totem, GtkActionGroup *action_group, guint ui_id,
+		const char *path, const char *prefix, const char *lang, 
+		int lang_id, GSList **group)
 {
-	GtkWidget *item;
 	const char *full_lang;
+	char *name;
+	GtkAction *action;
 
 	full_lang = totem_lang_get_full (lang);
-	item = gtk_radio_menu_item_new_with_label (group,
-			full_lang ? full_lang : lang);
-
-	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),
-			current_lang == selection ? TRUE : FALSE);
-	gtk_widget_show (item);
-	gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
-
-	g_object_set_data (G_OBJECT (item), "rank",
-			GINT_TO_POINTER (selection));
-
-	if (is_lang == FALSE)
-		g_signal_connect (G_OBJECT (item), "activate",
-				G_CALLBACK (on_sub_activate), totem);
-	else
-		g_signal_connect (G_OBJECT (item), "activate",
-				G_CALLBACK (on_lang_activate), totem);
-
-	return gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item));
+
+	name = g_strdup_printf ("%s-%d", prefix, lang_id);
+
+	action = g_object_new (GTK_TYPE_RADIO_ACTION,
+			"name", name,
+			"label", full_lang ? full_lang : lang,
+			"value", lang_id,
+			NULL);
+
+	gtk_radio_action_set_group (GTK_RADIO_ACTION (action),
+			*group);
+
+	*group = gtk_radio_action_get_group (GTK_RADIO_ACTION (action));
+
+	gtk_action_group_add_action (action_group, action);
+	g_object_unref (action);
+
+	gtk_ui_manager_add_ui (totem->ui_manager, ui_id,
+			path, name, name, GTK_UI_MANAGER_MENUITEM, FALSE);
+	g_free (name);
+
+	return action;
 }
 
-static GtkWidget*
-create_submenu (Totem *totem, GList *list, int current, gboolean is_lang)
+static GtkAction *
+create_lang_actions (Totem *totem, GtkActionGroup *action_group, guint ui_id,
+		const char *path, const char *prefix, GList *list,
+		gboolean is_lang)
 {
-	GtkWidget *menu = NULL;
+	GtkAction *action = NULL;
 	int i;
 	GList *l;
 	GSList *group = NULL;
 
-	if (list == NULL)
-	{
-		menu = gtk_menu_new ();
-		if (is_lang == FALSE)
-		{
-			group = add_item_to_menu (totem, menu, _("None"),
-					current, -2, is_lang, group);
-		}
-
-		group = add_item_to_menu (totem, menu, _("Auto"),
-				current, -1, is_lang, group);
-
-		gtk_widget_show (menu);
-
-		return menu;
+	if (is_lang == FALSE) {
+		add_lang_action (totem, action_group, ui_id, path, prefix,
+				_("None"), -2, &group);
 	}
 
+	action = add_lang_action (totem, action_group, ui_id, path, prefix,
+			_("Auto"), -1, &group);
+
 	i = 0;
 
 	for (l = list; l != NULL; l = l->next)
 	{
-		if (menu == NULL)
-		{
-			menu = gtk_menu_new ();
-			if (is_lang == FALSE)
-			{
-				group = add_item_to_menu (totem, menu,
-						_("None"), current, -2,
-						is_lang, group);
-			}
-			group = add_item_to_menu (totem, menu, _("Auto"),
-					current, -1, is_lang, group);
-		}
-
-		group = add_item_to_menu (totem, menu, l->data, current,
-				i, is_lang, group);
+		add_lang_action (totem, action_group, ui_id, path, prefix,
+				l->data, i, &group);
 		i++;
 	}
 
-	gtk_widget_show (menu);
-
-	return menu;
+	return action;
 }
 
 static gboolean
@@ -334,34 +316,37 @@
 static void
 totem_languages_update (Totem *totem, GList *list)
 {
-	GtkWidget *item, *submenu, *old_submenu;
-	GtkWidget *lang_menu;
+	GtkAction *action;
 	int current;
 
-	lang_menu = NULL;
+	/* Remove old UI */
+	gtk_ui_manager_remove_ui (totem->ui_manager, totem->languages_ui_id);
+	gtk_ui_manager_ensure_update (totem->ui_manager);
+
+	/* Create new ActionGroup */
+	if (totem->languages_action_group) {
+		gtk_ui_manager_remove_action_group (totem->ui_manager,
+				totem->languages_action_group);
+		g_object_unref (totem->languages_action_group);
+	}
+	totem->languages_action_group = gtk_action_group_new ("languages-action-group");
+	gtk_ui_manager_insert_action_group (totem->ui_manager,
+			totem->languages_action_group, -1);
 
 	if (list != NULL)
 	{
+		action = create_lang_actions (totem, totem->languages_action_group,
+				totem->languages_ui_id,
+				"/tmw-menubar/sound/languages/placeholder",
+			       	"languages", list, TRUE);
+		gtk_ui_manager_ensure_update (totem->ui_manager);
+
 		current = bacon_video_widget_get_language (totem->bvw);
-		lang_menu = create_submenu (totem, list, current, TRUE);
-	}
-
-	/* Languages */
-	item = glade_xml_get_widget (totem->xml, "tmw_languages_menu_item");
-
-	old_submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (item));
-	if (old_submenu != NULL)
-		gtk_menu_popdown (GTK_MENU (old_submenu));
-
-	submenu = glade_xml_get_widget (totem->xml, "tmw_menu_languages");
-	if (lang_menu == NULL)
-	{
-		gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), submenu);
-	} else {
-		gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), lang_menu);
-		totem->languages = lang_menu;
-	}
-	gtk_widget_set_sensitive (item, lang_menu != NULL);
+		gtk_radio_action_set_current_value (GTK_RADIO_ACTION (action),
+				current);
+		g_signal_connect (G_OBJECT (action), "changed",
+				G_CALLBACK (languages_changed_callback), totem);
+	}
 
 	totem_g_list_deep_free (totem->language_list);
 	totem->language_list = list;
@@ -370,34 +355,38 @@
 static void
 totem_subtitles_update (Totem *totem, GList *list)
 {
-	GtkWidget *item, *submenu, *old_submenu;
-	GtkWidget *sub_menu;
+	GtkAction *action;
 	int current;
 
-	sub_menu = NULL;
+	/* Remove old UI */
+	gtk_ui_manager_remove_ui (totem->ui_manager, totem->subtitles_ui_id);
+	gtk_ui_manager_ensure_update (totem->ui_manager);
+
+	/* Create new ActionGroup */
+	if (totem->subtitles_action_group) {
+		gtk_ui_manager_remove_action_group (totem->ui_manager,
+				totem->subtitles_action_group);
+		g_object_unref (totem->subtitles_action_group);
+	}
+	totem->subtitles_action_group = gtk_action_group_new ("subtitles-action-group");
+	gtk_ui_manager_insert_action_group (totem->ui_manager,
+			totem->subtitles_action_group, -1);
+
 
 	if (list != NULL)
 	{
+		action = create_lang_actions (totem, totem->subtitles_action_group,
+				totem->subtitles_ui_id,
+				"/tmw-menubar/view/subtitles/placeholder",
+			       	"subtitles", list, FALSE);
+		gtk_ui_manager_ensure_update (totem->ui_manager);
+
 		current = bacon_video_widget_get_subtitle (totem->bvw);
-		sub_menu = create_submenu (totem, list, current, FALSE);
-	}
-
-	/* Subtitles */
-	item = glade_xml_get_widget (totem->xml, "tmw_subtitles_menu_item");
-
-	old_submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (item));
-	if (old_submenu != NULL)
-		gtk_menu_popdown (GTK_MENU (old_submenu));
-
-	submenu = glade_xml_get_widget (totem->xml, "tmw_menu_subtitles");
-	if (sub_menu == NULL)
-	{
-		gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), submenu);
-	} else {
-		gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), sub_menu);
-		totem->subtitles = sub_menu;
-	}
-	gtk_widget_set_sensitive (item, sub_menu != NULL);
+		gtk_radio_action_set_current_value (GTK_RADIO_ACTION (action),
+				current);
+		g_signal_connect (G_OBJECT (action), "changed",
+				G_CALLBACK (subtitles_changed_callback), totem);
+	}
 
 	totem_g_list_deep_free (totem->subtitles_list);
 	totem->subtitles_list = list;
@@ -432,20 +421,20 @@
 
 /* Recent files */
 static void
-on_recent_file_activate (EggRecentViewGtk *view, EggRecentItem *item,
-                         Totem *totem)
+on_recent_file_item_activated (GtkAction *action,
+                               Totem *totem)
 {
 	char *uri;
 	gboolean playlist_changed;
 	guint end;
 
-	uri = egg_recent_item_get_uri (item);
+	uri = g_object_get_data (G_OBJECT (action), "recent-uri");
 
 	totem_signal_block_by_data (totem->playlist, totem);
 
 	end = totem_playlist_get_last (totem->playlist);
 	playlist_changed = totem_playlist_add_mrl (totem->playlist, uri, NULL);
-	egg_recent_model_add_full (totem->recent_model, item);
+	gtk_recent_manager_add_item (totem->recent_manager, uri);
 
 	totem_signal_unblock_by_data (totem->playlist, totem);
 
@@ -458,89 +447,157 @@
 		totem_action_set_mrl_and_play (totem, mrl);
 		g_free (mrl);
 	}
-
-	g_free (uri);
+}
+
+static gint
+totem_compare_recent_items (GtkRecentInfo *a, GtkRecentInfo *b)
+{
+	gboolean has_totem_a, has_totem_b;
+
+	has_totem_a = gtk_recent_info_has_group (a, "Totem");
+	has_totem_b = gtk_recent_info_has_group (b, "Totem");
+
+	if (has_totem_a && has_totem_b) {
+		time_t time_a, time_b;
+
+		time_a = gtk_recent_info_get_modified (a);
+		time_b = gtk_recent_info_get_modified (b);
+
+		return (time_b - time_a);
+	} else if (has_totem_a) {
+		return -1;
+	} else if (has_totem_b) {
+		return 1;
+	}
+
+	return 0;
 }
 
 static void
-totem_remove_deleted_recent (Totem *totem)
+totem_recent_manager_changed_callback (GtkRecentManager *recent_manager, Totem *totem)
 {
-	GList *files, *l;
-
-	files = egg_recent_model_get_list (totem->recent_model);
-	for (l = files; l != NULL; l = l->next) {
-		EggRecentItem *item = l->data;
-		const char *txturi;
-		GnomeVFSURI *uri;
-
-		txturi = egg_recent_item_peek_uri (item);
-		if (txturi == NULL)
-			continue;
-
-		if (g_str_has_prefix (txturi, "file:") == FALSE)
-			continue;
-
-		uri = gnome_vfs_uri_new (txturi);
-		if (gnome_vfs_uri_exists (uri) == FALSE) {
-			egg_recent_model_delete (totem->recent_model, txturi);
-		}
-		gnome_vfs_uri_unref (uri);
-	}
+	GList *items, *l;
+	guint n_items = 0;
+	static guint i = 0;
+
+	gtk_ui_manager_remove_ui (totem->ui_manager, totem->recent_ui_id);
+	gtk_ui_manager_ensure_update (totem->ui_manager);
+
+	if (totem->recent_action_group) {
+		gtk_ui_manager_remove_action_group (totem->ui_manager,
+				totem->recent_action_group);
+		g_object_unref (totem->recent_action_group);
+	}
+	totem->recent_action_group = gtk_action_group_new ("recent-action-group");
+	gtk_ui_manager_insert_action_group (totem->ui_manager,
+			totem->recent_action_group, -1);
+ 
+	items = gtk_recent_manager_get_items (recent_manager);
+	items = g_list_sort (items, (GCompareFunc) totem_compare_recent_items);
+
+	for (l = items; l && l->data; l = g_list_next (l)) {
+		GtkRecentInfo *info;
+		GtkAction     *action;
+		gchar         *action_name;
+		gchar         *label;
+
+		info = (GtkRecentInfo *) l->data;
+
+		if (!gtk_recent_info_has_group (info, "Totem"))
+			continue;
+
+		action_name = g_strdup_printf ("recent-file%u", i++);
+		label = g_strdup_printf ("_%d.  %s", n_items + 1,
+				gtk_recent_info_get_display_name (info));
+
+		action = g_object_new (GTK_TYPE_ACTION,
+			       "name", action_name,
+			       "label", label,
+			       NULL);
+
+		g_object_set_data_full (G_OBJECT (action), "recent-uri",
+				g_strdup (gtk_recent_info_get_uri (info)),
+				g_free);
+		g_object_set_data_full (G_OBJECT (action), "pixbuf-icon",
+				gtk_recent_info_get_icon (info, GTK_ICON_SIZE_MENU),
+				g_object_unref);
+		g_signal_connect (G_OBJECT (action), "activate",
+			  	G_CALLBACK (on_recent_file_item_activated),
+				totem);
+
+		gtk_action_group_add_action (totem->recent_action_group,
+				action);
+		g_object_unref (action);
+
+		gtk_ui_manager_add_ui (totem->ui_manager, totem->recent_ui_id,
+			       "/tmw-menubar/movie/recent-placeholder",
+			       label, action_name, GTK_UI_MANAGER_MENUITEM,
+			       FALSE);
+
+		g_free (action_name);
+		g_free (label);
+
+		if (++n_items == 5)
+			break;
+	}
+	gtk_ui_manager_ensure_update (totem->ui_manager);
+
+	g_list_foreach (items, (GFunc) gtk_recent_info_unref, NULL);
+	g_list_free (items);
 }
 
 void
 totem_setup_recent (Totem *totem)
 {
-	GtkWidget *menu_item;
-	GtkWidget *menu;
-
-	menu_item = glade_xml_get_widget (totem->xml, "tmw_menu_item_movie");
-	menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (menu_item));
-	menu_item = glade_xml_get_widget (totem->xml,
-			"tmw_menu_recent_separator");
-
-	/* it would be better if we just filtered by mime-type, but there
-	 * doesn't seem to be an easy way to figure out which mime-types we
-	 * can handle */
-	totem->recent_model = egg_recent_model_new (EGG_RECENT_MODEL_SORT_MRU);
-
-	totem->recent_view = egg_recent_view_gtk_new (menu, menu_item);
-	egg_recent_view_gtk_show_icons (EGG_RECENT_VIEW_GTK
-			(totem->recent_view), FALSE);
-	egg_recent_model_set_limit (totem->recent_model, 5);
-	egg_recent_view_set_model (EGG_RECENT_VIEW (totem->recent_view),
-			totem->recent_model);
-	egg_recent_model_set_filter_groups (totem->recent_model,
-			"Totem", NULL);
-	egg_recent_view_gtk_set_trailing_sep (totem->recent_view, TRUE);
-
-	totem_remove_deleted_recent (totem);
-
-	g_signal_connect (totem->recent_view, "activate",
-			G_CALLBACK (on_recent_file_activate), totem);
+	totem->recent_manager = gtk_recent_manager_get_default ();
+	totem->recent_action_group = NULL;
+	totem->recent_ui_id = gtk_ui_manager_new_merge_id
+			(totem->ui_manager);
+
+	g_signal_connect (G_OBJECT (totem->recent_manager), "changed",
+			G_CALLBACK (totem_recent_manager_changed_callback),
+			totem);
+
+	totem_recent_manager_changed_callback (totem->recent_manager, totem);
 }
 
 void
 totem_action_add_recent (Totem *totem, const char *filename)
 {
-	EggRecentItem *item;
+	GtkRecentData data;
+	char *groups[] = { "Totem", NULL };
+	char *display;
 
 	if (strstr (filename, "file:///") == NULL)
 		return;
 
-	item = egg_recent_item_new_from_uri (filename);
-	egg_recent_item_add_group (item, "Totem");
-	egg_recent_model_add_full (totem->recent_model, item);
+	display = g_filename_from_uri (filename, NULL, NULL);
+	if (display) {
+		data.display_name = g_filename_display_basename (display);
+		g_free (display);
+	}
+	data.description = NULL;
+	data.mime_type = gnome_vfs_get_mime_type (filename);
+	data.app_name = g_strdup (g_get_application_name ());
+	data.app_exec = g_strjoin (" ", g_get_prgname (), "%u", NULL);
+	data.groups = groups;
+	gtk_recent_manager_add_full (totem->recent_manager,
+			filename, &data);
+
+	g_free (data.display_name);
+	g_free (data.mime_type);
+	g_free (data.app_name);
+	g_free (data.app_exec);
 }
 
 /* Play Disc menu items */
 
 static void
-on_play_disc_activate (GtkMenuItem *menu_item, Totem *totem)
+on_play_disc_activate (GtkAction *action, Totem *totem)
 {
 	char *device_path;
 
-	device_path = g_object_get_data (G_OBJECT (menu_item), "device_path");
+	device_path = g_object_get_data (G_OBJECT (action), "device_path");
 	totem_action_play_media_device (totem, device_path);
 }
 
@@ -575,10 +632,10 @@
 }
 
 static void
-add_device_to_menu (GObject *device, GtkMenu *menu, gint position, Totem *totem)
+add_device_to_menu (GObject *device, guint position, Totem *totem)
 {
 	char *name, *icon_name, *device_path, *label, *activation_uri;
-	GtkWidget *menu_item, *icon;
+	GtkAction *action;
 	gboolean disabled = FALSE;
 
 	/* Add devices with blank CDs and audio CDs in them, but disable them */
@@ -604,65 +661,54 @@
 	g_strchomp (name);
 	label = g_strdup_printf (_("Play Disc '%s'"), name);
 	g_free (name);
-	menu_item = gtk_image_menu_item_new_with_label (label);
+
+	name = g_strdup_printf (_("device%d"), position);
+	action = gtk_action_new (name, label, NULL, NULL);
+	g_object_set (G_OBJECT (action), "icon-name", icon_name,
+		"sensitive", !disabled, NULL);
+	gtk_action_group_add_action (totem->devices_action_group, action);
+	g_object_unref (action);
+	gtk_ui_manager_add_ui (totem->ui_manager, totem->devices_ui_id,
+		"/tmw-menubar/movie/devices-placeholder", name, name,
+		GTK_UI_MANAGER_MENUITEM, FALSE);
+	g_free (name);
 	g_free (label);
-
-	icon = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
 	g_free (icon_name);
-	gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), icon);
 
-	g_object_set_data_full (G_OBJECT (menu_item), "device_path",
+	g_object_set_data_full (G_OBJECT (action), "device_path",
 			device_path, (GDestroyNotify) g_free);
 	if (GNOME_IS_VFS_VOLUME (device)) {
-		g_object_set_data_full (G_OBJECT (menu_item), "activation_uri",
+		g_object_set_data_full (G_OBJECT (action), "activation_uri",
 				gnome_vfs_volume_get_activation_uri (GNOME_VFS_VOLUME (device)),
 				(GDestroyNotify) g_free);
 	}
 
-	g_signal_connect (G_OBJECT (menu_item), "activate",
+	g_signal_connect (G_OBJECT (action), "activate",
 			G_CALLBACK (on_play_disc_activate), totem);
-
-	gtk_menu_shell_insert (GTK_MENU_SHELL (menu), menu_item, position);
-	if (disabled != FALSE) {
-		gtk_widget_set_sensitive (menu_item, FALSE);
-	}
-	gtk_widget_show (menu_item);
 }
 
 static void
 on_movie_menu_select (GtkMenuItem *movie_menuitem, Totem *totem)
 {
-	GtkMenu *menu;
-	GtkMenuItem *openloc_item;
-	GtkSeparatorMenuItem *sep_item;
-
-	GList *menuitems;
-	gint position;
-
 	GList *devices, *volumes, *drives, *i;
+	guint position;
 
 	if (totem->drives_changed == FALSE)
 		return;
 
-	menu = GTK_MENU (glade_xml_get_widget (totem->xml, "tmw_menu_movie"));
-	g_assert (menu != NULL);
-
-	openloc_item = GTK_MENU_ITEM (glade_xml_get_widget (totem->xml,
-				"tmw_open_location_menu_item"));
-	sep_item = GTK_SEPARATOR_MENU_ITEM (glade_xml_get_widget (totem->xml,
-				"tmw_menu_movie_separator_1"));
-
-	/* remove existing menu entries */
-	menuitems = gtk_container_get_children (GTK_CONTAINER (menu));
-
-	i = g_list_find (menuitems, openloc_item)->next;
-	while (i != g_list_find (menuitems, sep_item))
-	{
-		gtk_container_remove (GTK_CONTAINER (menu), i->data);
-		gtk_widget_destroy (i->data);
-
-		i = i->next;
+	/* Remove old UI */
+	gtk_ui_manager_remove_ui (totem->ui_manager, totem->devices_ui_id);
+	gtk_ui_manager_ensure_update (totem->ui_manager);
+
+	/* Create new ActionGroup */
+	if (totem->devices_action_group) {
+		gtk_ui_manager_remove_action_group (totem->ui_manager,
+				totem->devices_action_group);
+		g_object_unref (totem->devices_action_group);
 	}
+	totem->devices_action_group = gtk_action_group_new ("devices-action-group");
+	gtk_ui_manager_insert_action_group (totem->ui_manager,
+			totem->devices_action_group, -1);
 
 	/* Create a list of suitable devices */
 	devices = NULL;
@@ -691,14 +737,14 @@
 	gnome_vfs_drive_volume_list_free (drives);
 
 	/* Add the devices to the menu */
-	position = g_list_index (menuitems, openloc_item);
-	g_list_free (menuitems);
+	position = 0;
 
 	for (i = devices; i != NULL; i = i->next)
 	{
 		position++;
-		add_device_to_menu (i->data, GTK_MENU (menu), position, totem);
+		add_device_to_menu (i->data, position, totem);
 	}
+	gtk_ui_manager_ensure_update (totem->ui_manager);
 
 	g_list_foreach (devices, (GFunc) g_object_unref, NULL);
 	g_list_free (devices);
@@ -717,7 +763,7 @@
 {
 	GtkWidget *item;
 
-	item = glade_xml_get_widget (totem->xml, "tmw_menu_item_movie");
+	item = gtk_ui_manager_get_widget (totem->ui_manager, "/tmw-menubar/movie");
 	g_signal_connect (G_OBJECT (item), "select",
 			G_CALLBACK (on_movie_menu_select), totem);
 
@@ -737,3 +783,449 @@
 	totem->drives_changed = TRUE;
 }
 
+static void
+open_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_open (totem);
+}
+
+static void
+open_location_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_open_location (totem);
+}
+
+static void
+eject_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_eject (totem);
+}
+
+static void
+play_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_play_pause (totem);
+}
+
+static void
+quit_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_exit (totem);
+}
+
+static void
+take_screenshot_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_take_screenshot (totem);
+}
+
+static void
+preferences_action_callback (GtkAction *action, Totem *totem)
+{
+	gtk_widget_show (totem->prefs);
+}
+
+static void
+fullscreen_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_fullscreen_toggle (totem);
+}
+
+static void
+zoom_1_2_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_set_scale_ratio (totem, 0.5); 
+}
+
+static void
+zoom_1_1_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_set_scale_ratio (totem, 1);
+}
+
+static void
+zoom_2_1_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_set_scale_ratio (totem, 2);
+}
+
+static void
+zoom_in_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_zoom_relative (totem, ZOOM_IN_OFFSET);
+}
+
+static void
+zoom_reset_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_zoom_reset (totem);
+}
+
+static void
+zoom_out_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_zoom_relative (totem, ZOOM_OUT_OFFSET);
+}
+
+static void
+next_angle_action_callback (GtkAction *action, Totem *totem)
+{
+}
+
+static void
+dvd_root_menu_action_callback (GtkAction *action, Totem *totem)
+{
+        bacon_video_widget_dvd_event (totem->bvw, BVW_DVD_ROOT_MENU);
+}
+
+static void
+dvd_title_menu_action_callback (GtkAction *action, Totem *totem)
+{
+        bacon_video_widget_dvd_event (totem->bvw, BVW_DVD_TITLE_MENU);
+}
+
+static void
+dvd_audio_menu_action_callback (GtkAction *action, Totem *totem)
+{
+        bacon_video_widget_dvd_event (totem->bvw, BVW_DVD_AUDIO_MENU);
+}
+
+static void
+dvd_angle_menu_action_callback (GtkAction *action, Totem *totem)
+{
+        bacon_video_widget_dvd_event (totem->bvw, BVW_DVD_ANGLE_MENU);
+}
+
+static void
+dvd_chapter_menu_action_callback (GtkAction *action, Totem *totem)
+{
+        bacon_video_widget_dvd_event (totem->bvw, BVW_DVD_CHAPTER_MENU);
+}
+
+static void
+next_chapter_action_callback (GtkAction *action, Totem *totem)
+{
+	TOTEM_PROFILE (totem_action_next (totem));
+}
+
+static void
+previous_chapter_action_callback (GtkAction *action, Totem *totem)
+{
+	TOTEM_PROFILE (totem_action_previous (totem));
+}
+
+static void
+skip_to_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_skip_to (totem);
+}
+
+static void
+skip_forward_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_seek_relative (totem, SEEK_FORWARD_OFFSET);
+}
+
+static void
+skip_backwards_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_seek_relative (totem, SEEK_BACKWARD_OFFSET);
+}
+
+static void
+volume_up_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_volume_relative (totem, VOLUME_UP_OFFSET);
+}
+
+static void
+volume_down_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_volume_relative (totem, VOLUME_DOWN_OFFSET);
+}
+
+static void
+contents_action_callback (GtkAction *action, Totem *totem)
+{
+	totem_action_show_help (totem);
+}
+
+static void
+about_action_callback (GtkAction *action, Totem *totem)
+{
+	char *backend_version, *description;
+	const char *frontend_type;
+
+	const char *authors[] =
+	{
+		"Bastien Nocera <hadess@hadess.net>",
+		"Ronald Bultje <rbultje@ronald.bitfreak.net>",
+		"Julien Moutte <julien@moutte.net> (GStreamer backend)",
+		NULL
+	};
+	const char *artists[] = { "Jakub Steiner <jimmac@ximian.com>", NULL };
+	const char *documenters[] =
+	{
+		"Chee Bin Hoh <cbhoh@gnome.org>",
+		NULL
+	};
+
+	if (totem->about != NULL)
+	{
+		gtk_window_present (GTK_WINDOW (totem->about));
+		return;
+	}
+
+#ifdef HAVE_GTK_ONLY
+	frontend_type = N_("GTK+");
+#else
+	frontend_type = N_("GNOME");
+#endif
+
+	backend_version = bacon_video_widget_get_backend_name (totem->bvw);
+	/* This lists the back-end and front-end types and versions, such as
+	 * Movie Player using GStreamer 0.10.1 and GNOME */
+	description = g_strdup_printf (_("Movie Player using %s and %s"),
+				       backend_version, _(frontend_type));
+
+	totem->about = g_object_new (GTK_TYPE_ABOUT_DIALOG,
+				     "version", VERSION,
+				     "copyright", _("Copyright \xc2\xa9 2002-2006 Bastien Nocera"),
+				     "comments", description,
+				     "authors", authors,
+				     "documenters", documenters,
+				     "artists", artists,
+				     "translator-credits", _("translator-credits"),
+				     "logo-icon-name", "totem",
+				     NULL);
+
+	g_free (backend_version);
+	g_free (description);
+
+	g_object_add_weak_pointer (G_OBJECT (totem->about),
+			(gpointer *)&totem->about);
+	gtk_window_set_transient_for (GTK_WINDOW (totem->about),
+			GTK_WINDOW (totem->win));
+	g_signal_connect (G_OBJECT (totem->about), "response",
+			G_CALLBACK (gtk_widget_destroy), NULL);
+
+	gtk_widget_show(totem->about);
+}
+
+static void
+repeat_mode_action_callback (GtkToggleAction *action, Totem *totem)
+{
+	totem_playlist_set_repeat (totem->playlist,
+			gtk_toggle_action_get_active (action));
+}
+
+static void
+shuffle_mode_action_callback (GtkToggleAction *action, Totem *totem)
+{
+	totem_playlist_set_shuffle (totem->playlist,
+			gtk_toggle_action_get_active (action));
+}
+
+static void
+deinterlace_action_callback (GtkToggleAction *action, Totem *totem)
+{
+	gboolean value;
+
+	value = gtk_toggle_action_get_active (action);
+	bacon_video_widget_set_deinterlacing (totem->bvw, value);
+	gconf_client_set_bool (totem->gc, GCONF_PREFIX"/deinterlace",
+			value, NULL);
+}
+
+static void
+always_on_top_action_callback (GtkToggleAction *action, Totem *totem)
+{
+	gtk_window_set_keep_above (GTK_WINDOW (totem->win),
+			gtk_toggle_action_get_active (action));
+	gconf_client_set_bool (totem->gc,
+			GCONF_PREFIX"/window_on_top",
+			gtk_toggle_action_get_active (action), NULL);
+}
+
+static void
+show_controls_action_callback (GtkToggleAction *action, Totem *totem)
+{
+	gboolean show;
+
+	show = gtk_toggle_action_get_active (action);
+
+	/* Let's update our controls visibility */
+	if (show)
+		totem->controls_visibility = TOTEM_CONTROLS_VISIBLE;
+	else
+		totem->controls_visibility = TOTEM_CONTROLS_HIDDEN;
+
+	show_controls (totem, FALSE);
+}
+
+static void
+show_sidebar_action_callback (GtkToggleAction *action, Totem *totem)
+{
+	if (totem_is_fullscreen (totem))
+		return;
+
+	totem_sidebar_toggle (totem, gtk_toggle_action_get_active (action));
+}
+
+static void
+aspect_ratio_changed_callback (GtkRadioAction *action, GtkRadioAction *current, Totem *totem)
+{
+	totem_action_set_aspect_ratio (totem, gtk_radio_action_get_current_value (current));
+}
+
+static const GtkActionEntry entries[] = {
+	{ "movie-menu", NULL, "_Movie" },
+	{ "open", GTK_STOCK_OPEN, "_Open...", "<control>O", "Open a file", G_CALLBACK (open_action_callback) },
+	{ "open-location", NULL, "Open _Location...", "<control>L", "Open a non-local file", G_CALLBACK (open_location_action_callback) },
+	{ "eject", NULL, "_Eject", "<control>E", NULL, G_CALLBACK (eject_action_callback) },
+	{ "play", GTK_STOCK_MEDIA_PLAY, "Play / Pa_use", "P", "Play or pause the movie", G_CALLBACK (play_action_callback) },
+	{ "quit", GTK_STOCK_QUIT, "_Quit", "<control>Q", "Quit the program", G_CALLBACK (quit_action_callback) },
+
+	{ "edit-menu", NULL, "_Edit" },
+	{ "take-screenshot", GTK_STOCK_CONVERT, "Take _Screenshot...", "<control>S", "Take a screenshot", G_CALLBACK (take_screenshot_action_callback) },
+	{ "preferences", GTK_STOCK_PREFERENCES, "Prefere_nces", NULL, NULL, G_CALLBACK (preferences_action_callback) },
+
+	{ "view-menu", NULL, "_View" },
+	{ "fullscreen", GTK_STOCK_ZOOM_FIT, "_Fullscreen", "F", "Switch to fullscreen", G_CALLBACK (fullscreen_action_callback) },
+	{ "zoom-window-menu", NULL, "Fit Window to Movie" },
+	{ "zoom-1-2", NULL, "_Resize 1:2", "0", "Resize to half the video size", G_CALLBACK (zoom_1_2_action_callback) },
+	{ "zoom-1-1", NULL, "Resize _1:1", "1", "Resize to video size", G_CALLBACK (zoom_1_1_action_callback) },
+	{ "zoom-2-1", NULL, "Resize _2:1", "2", "Resize to twice the video size", G_CALLBACK (zoom_2_1_action_callback) },
+	{ "aspect-ratio-menu", NULL, "_Aspect Ratio" },
+	{ "next-angle", NULL, "Switch An_gles", "G", "Switch angles", G_CALLBACK (next_angle_action_callback) },
+/*	{ "subtitles-menu", NULL, "S_ubtitles" },*/
+
+	{ "go-menu", NULL, "_Go" },
+	{ "dvd-root-menu", GTK_STOCK_INDEX, "_DVD Menu", "m", "Go to the DVD menu", G_CALLBACK (dvd_root_menu_action_callback) },
+	{ "dvd-title-menu", NULL, "_Title Menu", NULL, "Go to the title menu", G_CALLBACK (dvd_title_menu_action_callback) },
+	{ "dvd-audio-menu", NULL, "A_udio Menu", NULL, "Go to the audio menu", G_CALLBACK (dvd_audio_menu_action_callback) },
+	{ "dvd-angle-menu", NULL, "_Angle Menu", NULL, "Go to the angle menu", G_CALLBACK (dvd_angle_menu_action_callback) },
+	{ "dvd-chapter-menu", GTK_STOCK_INDEX, "_Chapter Menu", "c", "Go to the chapter menu", G_CALLBACK (dvd_chapter_menu_action_callback) },
+	{ "next-chapter", GTK_STOCK_MEDIA_NEXT, "_Next Chapter/Movie", "n", "Next chapter or movie", G_CALLBACK (next_chapter_action_callback) },
+	{ "previous-chapter", GTK_STOCK_MEDIA_PREVIOUS, "_Previous Chapter/Movie", "b", "Previous chapter or movie", G_CALLBACK (previous_chapter_action_callback) },
+	{ "skip-to", GTK_STOCK_JUMP_TO, "_Skip to...", "S", "Skip to a specific time", G_CALLBACK (skip_to_action_callback) },
+	{ "skip-forward", GTK_STOCK_MEDIA_FORWARD, "Skip _Forward", "Right", "Skip forward", G_CALLBACK (skip_forward_action_callback) },
+	{ "skip-backwards", GTK_STOCK_MEDIA_REWIND, "Skip _Backwards", "Left", "Skip backwards", G_CALLBACK (skip_backwards_action_callback) },
+
+	{ "sound-menu", NULL, "_Sound" },
+/*	{ "languages-menu", NULL, "_Languages" }, */
+	{ "volume-up", NULL, "Volume _Up", "Up", "Volume up", G_CALLBACK (volume_up_action_callback) },
+	{ "volume-down", NULL, "Volume _Down", "Down", "Volume down", G_CALLBACK (volume_down_action_callback) },
+
+	{ "help-menu", NULL, "_Help" },
+	{ "contents", GTK_STOCK_HELP, "_Contents", "F1", "Help contents", G_CALLBACK (contents_action_callback) },
+	{ "about", GTK_STOCK_ABOUT, "_About", NULL, NULL, G_CALLBACK (about_action_callback) }
+};
+
+static const GtkActionEntry zoom_entries[] = {
+	{ "zoom-in", GTK_STOCK_ZOOM_IN, "Zoom In", "R", "Zoom in", G_CALLBACK (zoom_in_action_callback) },
+	{ "zoom-reset", GTK_STOCK_ZOOM_100, "Zoom Reset", NULL, "Zoom reset", G_CALLBACK (zoom_reset_action_callback) },
+	{ "zoom-out", GTK_STOCK_ZOOM_OUT, "Zoom Out", "T", "Zoom out", G_CALLBACK (zoom_out_action_callback) }
+};
+
+static const GtkToggleActionEntry toggle_entries[] = {
+	{ "repeat-mode", NULL, "_Repeat Mode", NULL, "Set the repeat mode", G_CALLBACK (repeat_mode_action_callback), FALSE },
+	{ "shuffle-mode", NULL, "Shuff_le Mode", NULL, "Set the shuffle mode", G_CALLBACK (shuffle_mode_action_callback), FALSE },
+	{ "deinterlace", NULL, "_Deinterlace", "I", "Deinterlace", G_CALLBACK (deinterlace_action_callback), FALSE },
+	{ "always-on-top", NULL, "Always on _Top", NULL, "Always on top", G_CALLBACK (always_on_top_action_callback), FALSE },
+	{ "show-controls", NULL, "Show _Controls", "H", "Show controls", G_CALLBACK (show_controls_action_callback), TRUE },
+	{ "sidebar", NULL, "_Sidebar", "F9", "Show or hide the sidebar", G_CALLBACK (show_sidebar_action_callback), TRUE }
+};
+
+static const GtkRadioActionEntry aspect_ratio_entries[] = {
+	{ "aspect-ratio-auto", NULL, "Auto", NULL, "Sets automatic aspect ratio", BVW_RATIO_AUTO },
+	{ "aspect-ratio-square", NULL, "Square", NULL, "Sets square aspect ratio", BVW_RATIO_SQUARE },
+	{ "aspect-ratio-fbt", NULL, "4:3 (TV)", NULL, "Sets 4:3 (TV) aspect ratio", BVW_RATIO_FOURBYTHREE },
+	{ "aspect-ratio-anamorphic", NULL, "16:9 (Widescreen)", NULL, "Sets 16:9 (Anamorphic) aspect ratio", BVW_RATIO_ANAMORPHIC },
+	{ "aspect-ratio-dvb", NULL, "2.11:1 (DVB)", NULL, "Sets 2.11:1 (DVB) aspect ratio", BVW_RATIO_DVB }
+};
+
+static void
+totem_ui_manager_connect_proxy_callback (GtkUIManager *ui_manager,
+		GtkAction *action, GtkWidget *widget, Totem *totem)
+{
+	GdkPixbuf *icon;
+	GtkWidget *image;
+
+	icon = g_object_get_data (G_OBJECT (action), "pixbuf-icon");
+	if (icon != NULL && GTK_IS_IMAGE_MENU_ITEM (widget)) {
+		image = gtk_image_new_from_pixbuf (icon);
+		gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (widget),
+				image);
+	}
+}
+
+void
+totem_ui_manager_setup (Totem *totem)
+{
+	char *filename;
+	GtkWidget *menubar;
+	GtkWidget *menubar_box;
+	GtkAction *action;
+
+	totem->main_action_group = gtk_action_group_new ("main-action-group");
+	gtk_action_group_set_translation_domain (totem->main_action_group, GETTEXT_PACKAGE);
+	gtk_action_group_add_actions (totem->main_action_group, entries,
+		G_N_ELEMENTS (entries), totem);
+	gtk_action_group_add_toggle_actions (totem->main_action_group, 
+		toggle_entries, G_N_ELEMENTS (toggle_entries), totem);
+	gtk_action_group_add_radio_actions (totem->main_action_group, 
+		aspect_ratio_entries, G_N_ELEMENTS (aspect_ratio_entries), 0,
+		G_CALLBACK (aspect_ratio_changed_callback), totem);
+
+	action = g_object_new (GTK_TYPE_ACTION,
+			"name", "subtitles-menu",
+			"label", "S_ubtitles",
+			"hide-if-empty", FALSE, NULL);
+	gtk_action_group_add_action (totem->main_action_group, action);
+	g_object_unref (action);
+	action = g_object_new (GTK_TYPE_ACTION,
+			"name", "languages-menu",
+			"label", "_Languages",
+			"hide-if-empty", FALSE, NULL);
+	gtk_action_group_add_action (totem->main_action_group, action);
+	g_object_unref (action);
+
+	totem->zoom_action_group = gtk_action_group_new ("zoom-action-group");
+	gtk_action_group_set_translation_domain (totem->zoom_action_group, GETTEXT_PACKAGE);
+	gtk_action_group_add_actions (totem->zoom_action_group, zoom_entries,
+		G_N_ELEMENTS (zoom_entries), totem);
+
+	totem->ui_manager = gtk_ui_manager_new ();
+	g_signal_connect (G_OBJECT (totem->ui_manager), "connect-proxy",
+			G_CALLBACK (totem_ui_manager_connect_proxy_callback), totem);
+	gtk_ui_manager_insert_action_group (totem->ui_manager,
+		totem->main_action_group, 0);
+	gtk_ui_manager_insert_action_group (totem->ui_manager,
+		totem->zoom_action_group, -1);
+
+	totem->devices_action_group = NULL;
+	totem->devices_ui_id = gtk_ui_manager_new_merge_id (totem->ui_manager);
+	totem->languages_action_group = NULL;
+	totem->languages_ui_id = gtk_ui_manager_new_merge_id (totem->ui_manager);
+	totem->subtitles_action_group = NULL;
+	totem->subtitles_ui_id = gtk_ui_manager_new_merge_id (totem->ui_manager);
+
+	gtk_window_add_accel_group (GTK_WINDOW (totem->win),
+		gtk_ui_manager_get_accel_group (totem->ui_manager));
+
+	filename = totem_interface_get_full_path ("totem-ui.xml");
+	if (!gtk_ui_manager_add_ui_from_file (totem->ui_manager, filename, NULL)) {
+		totem_interface_error_blocking (
+			_("Couldn't load the 'ui description' file"),
+			_("Make sure that Totem is properly installed."),
+			GTK_WINDOW (totem->win));
+		totem_action_exit (NULL);
+	}
+	g_free (filename);
+
+	menubar = gtk_ui_manager_get_widget (totem->ui_manager, "/tmw-menubar");
+	menubar_box = glade_xml_get_widget (totem->xml, "tmw_menubar_box");
+	gtk_box_pack_start (GTK_BOX (menubar_box), menubar, FALSE, FALSE, 0);
+}
+

=== modified file 'src/totem-menu.h'
--- src/totem-menu.h	2005-07-04 19:03:58 +0000
+++ src/totem-menu.h	2006-09-03 23:05:42 +0000
@@ -27,6 +27,8 @@
 
 G_BEGIN_DECLS
 
+void totem_ui_manager_setup (Totem *totem);
+
 void totem_sublang_update (Totem *totem);
 void totem_sublang_exit (Totem *totem);
 

=== modified file 'src/totem-preferences.c'
--- src/totem-preferences.c	2006-06-17 13:00:53 +0000
+++ src/totem-preferences.c	2006-08-29 09:33:55 +0000
@@ -185,32 +185,23 @@
 }
 
 static void
-on_deinterlace1_activate (GtkCheckMenuItem *checkmenuitem, Totem *totem)
-{
-	gboolean value;
-
-	value = gtk_check_menu_item_get_active (checkmenuitem);
-	bacon_video_widget_set_deinterlacing (totem->bvw, value);
-	gconf_client_set_bool (totem->gc, GCONF_PREFIX"/deinterlace",
-			value, NULL);
-}
-
-static void
 deinterlace_changed_cb (GConfClient *client, guint cnxn_id,
 		GConfEntry *entry, Totem *totem)
 {
-	GtkWidget *item;
-
-	item = glade_xml_get_widget (totem->xml, "tmw_deinterlace_menu_item");
-	g_signal_handlers_disconnect_by_func (G_OBJECT (item),
-			on_deinterlace1_activate, totem);
-
-	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),
+	GtkAction *action;
+
+	action = gtk_action_group_get_action (totem->main_action_group,
+			"deinterlace");
+
+	g_signal_handlers_block_matched (G_OBJECT (action),
+			G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, totem);
+
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
 			gconf_client_get_bool (totem->gc,
 				GCONF_PREFIX"/deinterlace", NULL));
 
-	g_signal_connect (G_OBJECT (item),  "activate",
-			G_CALLBACK (on_deinterlace1_activate), totem);
+	g_signal_handlers_unblock_matched (G_OBJECT (action),
+			G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, totem);
 }
 
 static void
@@ -436,6 +427,7 @@
 totem_setup_preferences (Totem *totem)
 {
 	GtkWidget *item, *menu;
+	GtkAction *action;
 	gboolean show_visuals, auto_resize, is_local, deinterlace;
 	int connection_speed, i;
 	char *visual, *font, *encoding;
@@ -600,28 +592,28 @@
 
 	/* This one is for the deinterlacing menu, not really our dialog
 	 * but we do it anyway */
-	item = glade_xml_get_widget (totem->xml, "tmw_deinterlace_menu_item");
+	action = gtk_action_group_get_action (totem->main_action_group,
+			"deinterlace");
 	deinterlace = gconf_client_get_bool (totem->gc,
 			GCONF_PREFIX"/deinterlace", NULL);
-	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),
-				deinterlace);
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
+			deinterlace);
 	bacon_video_widget_set_deinterlacing (totem->bvw, deinterlace);
 	gconf_client_notify_add (totem->gc, GCONF_PREFIX"/deinterlace",
 			(GConfClientNotifyFunc) deinterlace_changed_cb,
 			totem, NULL, NULL);
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_deinterlace1_activate), totem);
 
 	/* Always On Top */
-	item = glade_xml_get_widget (totem->xml, "tmw_always_on_top_menu_item");
-	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),
+	action = gtk_action_group_get_action (totem->main_action_group,
+			"always-on-top");
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
 			gconf_client_get_bool (totem->gc,
 				GCONF_PREFIX"/window_on_top", NULL));
 
 	/* Save to disk Lockdown */
-	item = glade_xml_get_widget
-		(totem->xml, "tmw_take_screenshot_menu_item");
-	gtk_widget_set_sensitive (item,
+	action = gtk_action_group_get_action (totem->main_action_group,
+			"take-screenshot");
+	gtk_action_set_sensitive (action,
 			!gconf_client_get_bool (totem->gc,
 				"/desktop/gnome/lockdown/disable_save_to_disk",
 				NULL));

=== modified file 'src/totem-private.h'
--- src/totem-private.h	2006-08-19 10:01:15 +0000
+++ src/totem-private.h	2006-09-03 23:41:19 +0000
@@ -30,12 +30,11 @@
 
 #include <glade/glade.h>
 #include <gconf/gconf-client.h>
+#include <gtk/gtk.h>
 #include <libgnomevfs/gnome-vfs.h>
 
 #include "totem-remote.h"
 #include "totem-scrsaver.h"
-#include "egg-recent-model.h"
-#include "egg-recent-view-gtk.h"
 #include "totem-playlist.h"
 #include "bacon-message-connection.h"
 #include "bacon-video-widget.h"
@@ -51,7 +50,13 @@
 		gtk_widget_set_sensitive (widget, state);	\
 	}
 #define totem_main_set_sensitivity(name, state) totem_set_sensitivity (totem->xml, name, state)
-#define totem_popup_set_sensitivity(name, state) totem_set_sensitivity (totem->xml_popup, name, state)
+
+#define totem_action_set_sensitivity(name, state)					\
+	{										\
+		GtkAction *action;							\
+		action = gtk_action_group_get_action (totem->main_action_group, name);	\
+		gtk_action_set_sensitive (action, state);				\
+	}
 
 typedef enum {
 	TOTEM_CONTROLS_VISIBLE,
@@ -68,12 +73,25 @@
 struct Totem {
 	/* Control window */
 	GladeXML *xml;
-	GladeXML *xml_popup;
 	GtkWidget *win;
 	BaconVideoWidget *bvw;
 	GtkWidget *prefs;
 	GtkWidget *statusbar;
 
+	/* UI manager */
+	GtkActionGroup *main_action_group;
+	GtkActionGroup *zoom_action_group;
+	GtkUIManager *ui_manager;
+
+	GtkActionGroup *devices_action_group;
+	guint devices_ui_id;
+
+	GtkActionGroup *languages_action_group;
+	guint languages_ui_id;
+
+	GtkActionGroup *subtitles_action_group;
+	guint subtitles_ui_id;
+
 	/* Sidebar */
 	GtkWidget *sidebar;
 	gboolean sidebar_shown;
@@ -132,8 +150,9 @@
 	TotemScrsaver *scr;
 
 	/* recent file stuff */
-	EggRecentModel *recent_model;
-	EggRecentViewGtk *recent_view;
+	GtkRecentManager *recent_manager;
+	GtkActionGroup *recent_action_group;
+	guint recent_ui_id;
 
 	/* Monitor for playlist unmounts and drives/volumes monitoring */
 	GnomeVFSVolumeMonitor *monitor;
@@ -160,4 +179,28 @@
 
 GtkWidget *totem_volume_create (void);
 
+#define SEEK_FORWARD_OFFSET 60
+#define SEEK_BACKWARD_OFFSET -15
+
+#define VOLUME_DOWN_OFFSET -8
+#define VOLUME_UP_OFFSET 8
+
+#define ZOOM_IN_OFFSET 1
+#define ZOOM_OUT_OFFSET -1
+
+void	totem_action_open			(Totem *totem);
+void	totem_action_open_location		(Totem *totem);
+void	totem_action_eject			(Totem *totem);
+void	totem_action_take_screenshot		(Totem *totem);
+void	totem_action_zoom_relative		(Totem *totem, int off_pct);
+void	totem_action_zoom_reset			(Totem *totem);
+void	totem_action_show_help			(Totem *totem);
+void	totem_action_skip_to			(Totem *totem);
+
+void	show_controls				(Totem *totem, gboolean was_fullscreen);
+
+gboolean totem_is_fullscreen			(Totem *totem);
+
+
+
 #endif /* __TOTEM_PRIVATE_H__ */

=== modified file 'src/totem-sidebar.c'
--- src/totem-sidebar.c	2006-08-19 10:01:15 +0000
+++ src/totem-sidebar.c	2006-09-01 17:44:47 +0000
@@ -29,18 +29,6 @@
 #include "totem-private.h"
 #include "ev-sidebar.h"
 
-void
-totem_sidebar_toggle (Totem *totem)
-{
-	GtkWidget *toggle;
-	gboolean state;
-
-	toggle = glade_xml_get_widget (totem->xml, "tmw_sidebar_button");
-
-	state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle));
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), !state);
-}
-
 static void
 cb_resize (Totem * totem)
 {
@@ -66,22 +54,20 @@
 	gtk_window_resize (GTK_WINDOW (totem->win), w, h);
 }
 
-static void
-on_sidebar_button_toggled (GtkToggleButton *button, Totem *totem)
+void
+totem_sidebar_toggle (Totem *totem, gboolean state)
 {
-	GtkWidget *item;
-	gboolean state;
+	GtkAction *action;
 
-	state = gtk_toggle_button_get_active (button);
 	if (state != FALSE)
 		gtk_widget_show (GTK_WIDGET (totem->sidebar));
 	else
 		gtk_widget_hide (GTK_WIDGET (totem->sidebar));
 
-	item = glade_xml_get_widget (totem->xml, "tmw_sidebar_menu_item");
-	totem_signal_block_by_data (G_OBJECT (item), totem);
-	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), state);
-	totem_signal_unblock_by_data (G_OBJECT (item), totem);
+	action = gtk_action_group_get_action (totem->main_action_group, "sidebar");
+	totem_signal_block_by_data (G_OBJECT (action), totem);
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), state);
+	totem_signal_unblock_by_data (G_OBJECT (action), totem);
 
 	gconf_client_set_bool (totem->gc,
 				GCONF_PREFIX"/sidebar_shown",
@@ -94,10 +80,7 @@
 static void
 toggle_sidebar_from_sidebar (GtkWidget *playlist, Totem *totem)
 {
-	GtkWidget *button;
-
-	button = glade_xml_get_widget (totem->xml, "tmw_sidebar_button");
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), FALSE);
+	totem_sidebar_toggle (totem, FALSE);
 }
 
 gboolean
@@ -109,7 +92,8 @@
 void
 totem_sidebar_setup (Totem *totem, gboolean visible, const char *page_id)
 {
-	GtkWidget *item, *item2;
+	GtkWidget *item;
+	GtkAction *action;
 
 	item = glade_xml_get_widget (totem->xml, "tmw_main_pane");
 	totem->sidebar = ev_sidebar_new ();
@@ -131,19 +115,14 @@
 
 	totem->sidebar_shown = visible;
 
-	item = glade_xml_get_widget (totem->xml, "tmw_sidebar_button");
-	item2 = glade_xml_get_widget (totem->xml, "tmw_sidebar_menu_item");
+	action = gtk_action_group_get_action (totem->main_action_group,
+			"sidebar");
 
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (item), visible);
-	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item2), visible);
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), visible);
 
 	/* Signals */
-	g_signal_connect (G_OBJECT (item), "clicked",
-			G_CALLBACK (on_sidebar_button_toggled), totem);
 	g_signal_connect (G_OBJECT (totem->sidebar), "closed",
 			G_CALLBACK (toggle_sidebar_from_sidebar), totem);
-	g_signal_connect_swapped (G_OBJECT (item2), "activate",
-			G_CALLBACK (totem_sidebar_toggle), totem);
 
 	gtk_widget_show_all (totem->sidebar);
 	gtk_widget_realize (totem->sidebar);

=== modified file 'src/totem-sidebar.h'
--- src/totem-sidebar.h	2006-08-19 10:01:15 +0000
+++ src/totem-sidebar.h	2006-09-01 17:43:47 +0000
@@ -27,7 +27,7 @@
 
 void totem_sidebar_setup (Totem *totem, gboolean visible,
 			  const char *page_id);
-void totem_sidebar_toggle (Totem *totem);
+void totem_sidebar_toggle (Totem *totem, gboolean state);
 void totem_sidebar_set_visibility (Totem *totem, gboolean visible);
 gboolean totem_sidebar_is_visible (Totem *totem);
 const char *totem_sidebar_get_current_page (Totem *totem);

=== modified file 'src/totem-stock-icons.c'
--- src/totem-stock-icons.c	2005-07-04 19:03:58 +0000
+++ src/totem-stock-icons.c	2006-08-30 18:02:34 +0000
@@ -97,13 +97,20 @@
 void
 totem_set_default_icons (Totem *totem)
 {
+	GtkAction *action;
+	GSList *proxies, *p;
 	GtkWidget *item;
 
 	/* Screenshot button */
-	item = glade_xml_get_widget (totem->xml,
-			"tmw_take_screenshot_menu_item_image");
-	gtk_image_set_from_pixbuf (GTK_IMAGE (item),
+	action = gtk_action_group_get_action (totem->main_action_group,
+			"take-screenshot");
+
+	g_object_set_data (G_OBJECT (action), "pixbuf-icon",
 			PIXBUF_FOR_ID("panel-screenshot"));
+	proxies = gtk_action_get_proxies (action);
+	for (p = proxies; p != NULL; p = p->next) {
+		gtk_action_connect_proxy (action, GTK_WIDGET (p->data));
+	}
 
 	/* Leave fullscreen button */
 	item = glade_xml_get_widget (totem->xml,

=== modified file 'src/totem.c'
--- src/totem.c	2006-08-24 09:20:02 +0000
+++ src/totem.c	2006-09-03 23:42:43 +0000
@@ -71,20 +71,12 @@
 
 #define REWIND_OR_PREVIOUS 4000
 
-#define SEEK_FORWARD_OFFSET 60
-#define SEEK_BACKWARD_OFFSET -15
-
 #define SEEK_FORWARD_SHORT_OFFSET 15
 #define SEEK_BACKWARD_SHORT_OFFSET -5
 
 #define SEEK_FORWARD_LONG_OFFSET 10*60
 #define SEEK_BACKWARD_LONG_OFFSET -3*60
 
-#define VOLUME_DOWN_OFFSET -8
-#define VOLUME_UP_OFFSET 8
-
-#define ZOOM_IN_OFFSET 1
-#define ZOOM_OUT_OFFSET -1
 #define ZOOM_UPPER 200
 #define ZOOM_RESET 100
 #define ZOOM_LOWER 10
@@ -109,11 +101,7 @@
 static void update_buttons (Totem *totem);
 static void update_media_menu_items (Totem *totem);
 static void update_seekable (Totem *totem, gboolean force_false);
-static void on_play_pause_button_clicked (GtkToggleButton *button,
-		Totem *totem);
 static void playlist_changed_cb (GtkWidget *playlist, Totem *totem);
-static void show_controls (Totem *totem, gboolean was_fullscreen);
-static gboolean totem_is_fullscreen (Totem *totem);
 static void play_pause_set_label (Totem *totem, TotemStates state);
 static gboolean on_video_motion_notify_event (GtkWidget *widget, GdkEventMotion *event, Totem *totem);
 static void popup_timeout_remove (Totem *totem);
@@ -259,8 +247,8 @@
 {
 	GtkWidget *menu;
 
-	menu = glade_xml_get_widget (totem->xml_popup,
-			"totem_right_click_menu");
+	menu = gtk_ui_manager_get_widget (totem->ui_manager,
+			"/totem-main-popup");
 	gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
 			button, gtk_get_current_event_time ());
 	gtk_menu_shell_select_first (GTK_MENU_SHELL (menu), FALSE);
@@ -277,7 +265,7 @@
 static void
 play_pause_set_label (Totem *totem, TotemStates state)
 {
-	GtkWidget *image;
+	GtkAction *action;
 	const char *id, *tip;
 
 	if (state == totem->state)
@@ -309,21 +297,15 @@
 		return;
 	}
 
-	gtk_tooltips_set_tip (GTK_TOOLTIPS (totem->tooltip),
-			totem->pp_button, _(tip), NULL);
-	gtk_tooltips_set_tip (GTK_TOOLTIPS (totem->tooltip),
-			totem->fs_pp_button, _(tip), NULL);
-
-	image = glade_xml_get_widget (totem->xml,
-			"tmw_play_pause_button_image");
-	gtk_image_set_from_stock (GTK_IMAGE (image), id, GTK_ICON_SIZE_BUTTON);
-	image = glade_xml_get_widget (totem->xml, "tcw_pp_button_image");
-	gtk_image_set_from_stock (GTK_IMAGE (image), id, GTK_ICON_SIZE_BUTTON);
+	action = gtk_action_group_get_action (totem->main_action_group, "play");	
+	g_object_set (G_OBJECT (action), 
+			"tooltip", _(tip),
+			"stock-id", id, NULL);
 
 	totem->state = state;
 }
 
-static void
+void
 totem_action_eject (Totem *totem)
 {
 	GError *err = NULL;
@@ -610,7 +592,7 @@
 		totem->controls_visibility = TOTEM_CONTROLS_FULLSCREEN;
 		show_controls (totem, FALSE);
 	} else {
-		GtkWidget *item;
+		GtkAction *action;
 
 		popup_hide (totem);
 		bacon_video_widget_set_fullscreen (totem->bvw, FALSE);
@@ -618,11 +600,10 @@
 
 		totem_scrsaver_enable (totem->scr);
 
-		item = glade_xml_get_widget
-			(totem->xml, "tmw_show_controls_menu_item");
+		action = gtk_action_group_get_action (totem->main_action_group,
+			"show-controls");
 
-		if (gtk_check_menu_item_get_active
-				(GTK_CHECK_MENU_ITEM (item)))
+		if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)))
 		{
 			totem->controls_visibility = TOTEM_CONTROLS_VISIBLE;
 			show_controls (totem, TRUE);
@@ -630,6 +611,8 @@
 			totem->controls_visibility = TOTEM_CONTROLS_HIDDEN;
 			show_controls (totem, TRUE);
 		}
+
+		g_object_unref (action);
 	}
 
 	return FALSE;
@@ -654,6 +637,103 @@
 	totem_action_fullscreen_toggle (totem);
 }
 
+void
+totem_action_open (Totem *totem)
+{
+	static char *path = NULL;
+	char *new_path;
+
+	new_path = totem_action_open_dialog (totem, path, TRUE);
+	if (new_path != NULL) {
+		g_free (path);
+		path = new_path;
+	}
+}
+
+//FIXME move the URI to a separate widget
+void
+totem_action_open_location (Totem *totem)
+{
+	GladeXML *glade;
+	char *mrl;
+	GtkWidget *dialog, *entry, *gentry;
+	int response;
+	const char *filenames[2];
+
+	glade = totem_interface_load ("uri.glade", _("Open Location..."),
+			FALSE, GTK_WINDOW (totem->win));
+	if (glade == NULL)
+		return;
+
+	dialog = glade_xml_get_widget (glade, "open_uri_dialog");
+	entry = glade_xml_get_widget (glade, "uri");
+	gentry = glade_xml_get_widget (glade, "uri_list");
+
+	response = gtk_dialog_run (GTK_DIALOG (dialog));
+
+	if (response == GTK_RESPONSE_OK)
+	{
+		const char *uri;
+
+		uri = gtk_entry_get_text (GTK_ENTRY (entry));
+		if (uri != NULL && strcmp (uri, "") != 0)
+		{
+			filenames[0] = uri;
+			filenames[1] = NULL;
+			totem_action_open_files (totem, (char **) filenames);
+
+			mrl = totem_playlist_get_current_mrl (totem->playlist);
+			totem_action_set_mrl_and_play (totem, mrl);
+			g_free (mrl);
+#ifndef HAVE_GTK_ONLY
+			gnome_entry_append_history (GNOME_ENTRY (gentry),
+					TRUE, uri);
+#endif /* !HAVE_GTK_ONLY */
+		}
+	}
+
+	gtk_widget_destroy (dialog);
+	g_object_unref (glade);
+}
+
+void
+totem_action_take_screenshot (Totem *totem)
+{
+	GdkPixbuf *pixbuf;
+	GtkWidget *dialog;
+	char *filename;
+	GError *err = NULL;
+
+	if (bacon_video_widget_get_logo_mode (totem->bvw) != FALSE)
+		return;
+
+	if (bacon_video_widget_can_get_frames (totem->bvw, &err) == FALSE)
+	{
+		if (err == NULL)
+			return;
+
+		totem_action_error (_("Totem could not get a screenshot of that film."), err->message, totem);
+		g_error_free (err);
+		return;
+	}
+
+	pixbuf = bacon_video_widget_get_current_frame (totem->bvw);
+	if (pixbuf == NULL)
+	{
+		totem_action_error (_("Totem could not get a screenshot of that film."), _("This is not supposed to happen; please file a bug report."), totem);
+		return;
+	}
+
+	filename = g_build_filename (DATADIR,
+			"totem", "screenshot.glade", NULL);
+	dialog = totem_screenshot_new (filename, pixbuf);
+	g_free (filename);
+
+	gtk_dialog_run (GTK_DIALOG (dialog));
+	gtk_widget_destroy (dialog);
+	gdk_pixbuf_unref (pixbuf);
+}
+
 static char *
 totem_get_nice_name_for_stream (Totem *totem)
 {
@@ -773,32 +853,24 @@
 		retval = FALSE;
 
 		/* Play/Pause */
-		gtk_widget_set_sensitive (totem->pp_button, FALSE);
-
-		totem_main_set_sensitivity ("tmw_play_menu_item", FALSE);
-		totem_popup_set_sensitivity ("trcm_play", FALSE);
+		totem_action_set_sensitivity ("play", FALSE);
 
 		/* Seek bar and seek buttons */
 		update_seekable (totem, FALSE);
 
 		/* Volume */
 		totem_main_set_sensitivity ("tcw_volume_button", FALSE);
-		totem_main_set_sensitivity ("tmw_volume_up_menu_item", FALSE);
-		totem_main_set_sensitivity ("tmw_volume_down_menu_item", FALSE);
-		totem_popup_set_sensitivity ("trcm_volume_up", FALSE);
-		totem_popup_set_sensitivity ("trcm_volume_down", FALSE);
+		totem_action_set_sensitivity ("volume-up", FALSE);
+		totem_action_set_sensitivity ("volume-down", FALSE);
 
 		/* Control popup */
 		gtk_widget_set_sensitive (totem->fs_seek, FALSE);
-		gtk_widget_set_sensitive (totem->fs_pp_button, FALSE);
-		totem_main_set_sensitivity ("tcw_previous_button", FALSE);
-		totem_main_set_sensitivity ("tcw_next_button", FALSE);
-		totem_popup_set_sensitivity ("trcm_next_chapter", FALSE);
-		totem_popup_set_sensitivity ("trcm_previous_chapter", FALSE);
+		totem_action_set_sensitivity ("next-chapter", FALSE);
+		totem_action_set_sensitivity ("previous-chapter", FALSE);
 		totem_main_set_sensitivity ("tcw_volume_hbox", FALSE);
 
 		/* Take a screenshot */
-		totem_main_set_sensitivity ("tmw_take_screenshot_menu_item", FALSE);
+		totem_action_set_sensitivity ("take-screenshot", FALSE);
 
 		/* Set the logo */
 		bacon_video_widget_set_logo_mode (totem->bvw, TRUE);
@@ -820,10 +892,7 @@
 		totem->mrl = g_strdup (mrl);
 
 		/* Play/Pause */
-		totem_main_set_sensitivity ("tmw_play_menu_item", TRUE);
-		gtk_widget_set_sensitive (totem->pp_button, TRUE);
-		totem_popup_set_sensitivity ("trcm_play", TRUE);
-		gtk_widget_set_sensitive (totem->fs_pp_button, TRUE);
+		totem_action_set_sensitivity ("play", TRUE);
 
 		/* Seek bar */
 		update_seekable (totem,
@@ -833,14 +902,11 @@
 		caps = bacon_video_widget_can_set_volume (totem->bvw);
 		totem_main_set_sensitivity ("tcw_volume_button", caps);
 		totem_main_set_sensitivity ("tcw_volume_hbox", caps);
-		totem_popup_set_sensitivity ("trcm_volume_up", caps);
-		totem_popup_set_sensitivity ("trcm_volume_down", caps);
-		totem_main_set_sensitivity ("tmw_volume_up_menu_item", caps);
-		totem_main_set_sensitivity ("tmw_volume_down_menu_item", caps);
+		totem_action_set_sensitivity ("volume-up", caps);
+		totem_action_set_sensitivity ("volume-down", caps);
 
 		/* Take a screenshot */
-		totem_main_set_sensitivity ("tmw_take_screenshot_menu_item",
-				retval);
+		totem_action_set_sensitivity ("take-screenshot", retval);
 		gtk_widget_set_sensitive
 			(GTK_WIDGET (totem->properties), retval);
 
@@ -976,27 +1042,27 @@
 static void
 totem_action_zoom (Totem *totem, int zoom)
 {
+	GtkAction *action;
+
 	if (zoom < ZOOM_LOWER || zoom > ZOOM_UPPER)
 		return;
 
 	bacon_video_widget_set_zoom (totem->bvw, zoom);
 
-	if (zoom == ZOOM_UPPER) {
-		totem_main_set_sensitivity ("tmw_zoom_in_menu_item", FALSE);
-	} else if (zoom == ZOOM_LOWER) {
-		totem_main_set_sensitivity ("tmw_zoom_out_menu_item", FALSE);
-	} else if (zoom == ZOOM_RESET) {
-		totem_main_set_sensitivity ("tmw_zoom_reset_menu_item", FALSE);
-		totem_main_set_sensitivity ("tmw_zoom_in_menu_item", TRUE);
-		totem_main_set_sensitivity ("tmw_zoom_out_menu_item", TRUE);
-	} else {
-		totem_main_set_sensitivity ("tmw_zoom_in_menu_item", TRUE);
-		totem_main_set_sensitivity ("tmw_zoom_out_menu_item", TRUE);
-		totem_main_set_sensitivity ("tmw_zoom_reset_menu_item", TRUE);
-	}
+	action = gtk_action_group_get_action (totem->zoom_action_group,
+			"zoom-in");
+	gtk_action_set_sensitive (action, zoom != ZOOM_UPPER);
+
+	action = gtk_action_group_get_action (totem->zoom_action_group,
+			"zoom-out");
+	gtk_action_set_sensitive (action, zoom != ZOOM_LOWER);
+
+	action = gtk_action_group_get_action (totem->zoom_action_group,
+			"zoom-reset");
+	gtk_action_set_sensitive (action, zoom != ZOOM_RESET);
 }
 
-static void
+void
 totem_action_zoom_relative (Totem *totem, int off_pct)
 {
 	int zoom;
@@ -1005,7 +1071,7 @@
 	totem_action_zoom (totem, zoom + off_pct);
 }
 
-static void
+void
 totem_action_zoom_reset (Totem *totem)
 {
 	totem_action_zoom (totem, 100);
@@ -1026,23 +1092,16 @@
 void
 totem_action_toggle_aspect_ratio (Totem *totem)
 {		
-	GtkWidget  *item;
-	int  tmp;
-	const char const *widgets[] = {
-		"tmw_aspect_ratio_auto_menu_item",
-		"tmw_aspect_ratio_square_menu_item",
-		"tmw_aspect_ratio_fbt_menu_item",
-		"tmw_aspect_ratio_anamorphic_menu_item",
-		"tmw_aspect_ratio_dvb_menu_item",
-	};
+	GtkAction *action;
+	int tmp;
 
 	tmp = totem_action_get_aspect_ratio (totem);
 	tmp++;
 	if (tmp > 4)
 		tmp = 0;
 
-	item = glade_xml_get_widget (totem->xml, widgets[tmp]);
-	gtk_check_menu_item_set_active ((GtkCheckMenuItem *) item, TRUE);
+	action = gtk_action_group_get_action (totem->main_action_group, "aspect-ratio-auto");
+	gtk_radio_action_set_current_value (GTK_RADIO_ACTION (action), tmp);
 }
 
 void
@@ -1063,6 +1122,20 @@
 	bacon_video_widget_set_scale_ratio (totem->bvw, ratio);
 }
 
+void
+totem_action_show_help (Totem *totem)
+{
+#ifndef HAVE_GTK_ONLY
+	GError *err = NULL;
+
+	if (gnome_help_display ("totem.xml", NULL, &err) == FALSE)
+	{
+		totem_action_error (_("Totem could not display the help contents."), err->message, totem);
+		g_error_free (err);
+	}
+#endif /* !HAVE_GTK_ONLY */
+}
+
 static gboolean
 totem_action_drop_files (Totem *totem, GtkSelectionData *data,
 		int drop_type, gboolean empty_pl)
@@ -1220,24 +1293,6 @@
 }
 
 static void
-on_play_pause_button_clicked (GtkToggleButton *button, Totem *totem)
-{
-	TOTEM_PROFILE (totem_action_play_pause (totem));
-}
-
-static void
-on_previous_button_clicked (GtkButton *button, Totem *totem)
-{
-	TOTEM_PROFILE (totem_action_previous (totem));
-}
-
-static void
-on_next_button_clicked (GtkButton *button, Totem *totem)
-{
-	TOTEM_PROFILE (totem_action_next (totem));
-}
-
-static void
 on_got_redirect (BaconVideoWidget *bvw, const char *mrl, Totem *totem)
 {
 	gchar *old_mrl, *new_mrl;
@@ -1355,11 +1410,9 @@
 
 	totem_main_set_sensitivity ("tcw_time_hbox", seekable);
 
-	totem_main_set_sensitivity ("tmw_skip_forward_menu_item", seekable);
-	totem_main_set_sensitivity ("tmw_skip_backwards_menu_item", seekable);
-	totem_popup_set_sensitivity ("trcm_skip_forward", seekable);
-	totem_popup_set_sensitivity ("trcm_skip_backwards", seekable);
-	totem_main_set_sensitivity ("tmw_skip_to_menu_item", seekable);
+	totem_action_set_sensitivity ("skip-forward", seekable);
+	totem_action_set_sensitivity ("skip-backwards", seekable);
+	totem_action_set_sensitivity ("skip-to", seekable);
 	if (totem->skipto)
 		totem_skipto_set_seekable (totem->skipto, seekable);
 }
@@ -1671,146 +1724,65 @@
 }
 
 static void
-on_open1_activate (GtkButton *button, Totem *totem)
-{
-	static char *path = NULL;
-	char *new_path;
-
-	new_path = totem_action_open_dialog (totem, path, TRUE);
-	if (new_path != NULL) {
-		g_free (path);
-		path = new_path;
-	}
-}
-
-//FIXME move the URI to a separate widget
-static void
-on_open_location1_activate (GtkButton *button, Totem *totem)
-{
-	GladeXML *glade;
-	char *mrl;
-	GtkWidget *dialog, *entry, *gentry;
-	int response;
-	const char *filenames[2];
-
-	glade = totem_interface_load ("uri.glade", _("Open Location..."),
-			FALSE, GTK_WINDOW (totem->win));
-	if (glade == NULL)
-		return;
-
-	dialog = glade_xml_get_widget (glade, "open_uri_dialog");
-	entry = glade_xml_get_widget (glade, "uri");
-	gentry = glade_xml_get_widget (glade, "uri_list");
-
-	response = gtk_dialog_run (GTK_DIALOG (dialog));
-
-	if (response == GTK_RESPONSE_OK)
-	{
-		const char *uri;
-
-		uri = gtk_entry_get_text (GTK_ENTRY (entry));
-		if (uri != NULL && strcmp (uri, "") != 0)
-		{
-			filenames[0] = uri;
-			filenames[1] = NULL;
-			totem_action_open_files (totem, (char **) filenames);
-
-			mrl = totem_playlist_get_current_mrl (totem->playlist);
-			totem_action_set_mrl_and_play (totem, mrl);
-			g_free (mrl);
-#ifndef HAVE_GTK_ONLY
-			gnome_entry_append_history (GNOME_ENTRY (gentry),
-					TRUE, uri);
-#endif /* !HAVE_GTK_ONLY */
-		}
-	}
-
-	gtk_widget_destroy (dialog);
-	g_object_unref (glade);
-}
-
-static void
-on_eject1_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_eject (totem);
-}
-
-static void
-on_play1_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_play_pause (totem);
-}
-
-static void
-on_full_screen1_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_fullscreen_toggle (totem);
-}
-
-static void
-on_resize_1_2_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_set_scale_ratio (totem, 0.5); 
-}
-
-static void
-on_resize_1_1_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_set_scale_ratio (totem, 1);
-}
-
-static void
-on_resize_2_1_activate (GtkButton *button, Totem *totem)
-{                       
-	totem_action_set_scale_ratio (totem, 2);
-}
-
-static void
-on_zoom_in_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_zoom_relative (totem, ZOOM_IN_OFFSET);
-}
-
-static void
-on_zoom_reset_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_zoom_reset (totem);
-}
-
-static void
-on_zoom_out_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_zoom_relative (totem, ZOOM_OUT_OFFSET);
-}
-
-static void
-on_aspect_ratio_auto_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_set_aspect_ratio (totem, BVW_RATIO_AUTO);
-}
-
-static void
-on_aspect_ratio_square_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_set_aspect_ratio (totem, BVW_RATIO_SQUARE);
-}
-
-static void
-on_aspect_ratio_fbt_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_set_aspect_ratio (totem, BVW_RATIO_FOURBYTHREE);
-}
-
-static void
-on_aspect_anamorphic_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_set_aspect_ratio (totem, BVW_RATIO_ANAMORPHIC);
-}
-
-static void
-on_aspect_ratio_dvb_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_set_aspect_ratio (totem, BVW_RATIO_DVB);
+commit_hide_skip_to (GtkDialog *dialog, gint response, Totem *totem)
+{
+	GError *err = NULL;
+
+	if (response != GTK_RESPONSE_OK)
+	{
+		gtk_widget_destroy (GTK_WIDGET (totem->skipto));
+		return;
+	}
+
+	gtk_widget_hide (GTK_WIDGET (dialog));
+
+	bacon_video_widget_seek_time (totem->bvw,
+			totem_skipto_get_range (totem->skipto), &err);
+
+	gtk_widget_destroy (GTK_WIDGET (totem->skipto));
+
+	if (err != NULL)
+	{
+		char *msg, *disp;
+
+		disp = totem_uri_escape_for_display (totem->mrl);
+		msg = g_strdup_printf(_("Totem could not seek in '%s'."), disp);
+		g_free (disp);
+		totem_action_stop (totem);
+		totem_playlist_set_playing (totem->playlist, FALSE);
+		totem_action_error (msg, err->message, totem);
+		g_free (msg);
+		g_error_free (err);
+	}
+}
+
+void
+totem_action_skip_to (Totem *totem)
+{
+	char *filename;
+
+	if (totem->seekable == FALSE)
+		return;
+
+	if (totem->skipto != NULL)
+	{
+		gtk_window_present (GTK_WINDOW (totem->skipto));
+		return;
+	}
+
+	filename = totem_interface_get_full_path ("skip_to.glade");
+	totem->skipto = TOTEM_SKIPTO (totem_skipto_new (filename));
+	g_free (filename);
+
+	g_signal_connect (G_OBJECT (totem->skipto), "delete-event",
+			G_CALLBACK (gtk_widget_destroy), NULL);
+	g_signal_connect (G_OBJECT (totem->skipto), "response",
+			G_CALLBACK (commit_hide_skip_to), totem);
+	g_object_add_weak_pointer (G_OBJECT (totem->skipto),
+			(gpointer *)&totem->skipto);
+	gtk_window_set_transient_for (GTK_WINDOW (totem->skipto),
+			GTK_WINDOW (totem->win));
+	gtk_widget_show (GTK_WIDGET (totem->skipto));
 }
 
 static void
@@ -1819,52 +1791,25 @@
 	totem_action_fullscreen_toggle (totem);
 }
 
-static void
-on_quit1_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_exit (totem);
-}
-
-static void
-on_repeat_mode1_toggled (GtkCheckMenuItem *checkmenuitem, Totem *totem)
-{
-	totem_playlist_set_repeat (totem->playlist,
-			gtk_check_menu_item_get_active (checkmenuitem));
-}
-
-static void
-on_shuffle_mode1_toggled (GtkCheckMenuItem *checkmenuitem, Totem *totem)
-{
-	totem_playlist_set_shuffle (totem->playlist,
-			gtk_check_menu_item_get_active (checkmenuitem));
-}
-
-static void
-on_always_on_top1_activate (GtkCheckMenuItem *checkmenuitem, Totem *totem)
-{
-	gtk_window_set_keep_above (GTK_WINDOW (totem->win),
-			gtk_check_menu_item_get_active (checkmenuitem));
-	gconf_client_set_bool (totem->gc,
-			GCONF_PREFIX"/window_on_top",
-			gtk_check_menu_item_get_active (checkmenuitem), NULL);
-}
-
-static void
+void
 show_controls (Totem *totem, gboolean was_fullscreen)
 {
-	GtkWidget *menubar, *controlbar, *statusbar, *item, *bvw_vbox, *widget;
+	GtkAction *action;
+	GtkWidget *menubar, *controlbar, *statusbar, *bvw_vbox, *widget;
 	int width = 0, height = 0;
 
 	if (totem->bvw == NULL)
 		return;
 
-	menubar = glade_xml_get_widget (totem->xml, "tmw_menubar");
+	menubar = glade_xml_get_widget (totem->xml, "tmw_menubar_box");
 	controlbar = glade_xml_get_widget (totem->xml, "tmw_controls_vbox");
 	statusbar = glade_xml_get_widget (totem->xml, "tmw_statusbar");
-	item = glade_xml_get_widget (totem->xml_popup, "trcm_show_controls");
 	bvw_vbox = glade_xml_get_widget (totem->xml, "tmw_bvw_vbox");
 	widget = GTK_WIDGET (totem->bvw);
 
+	action = gtk_action_group_get_action (totem->main_action_group, "show-controls");
+	gtk_action_set_sensitive (action, !totem_is_fullscreen (totem));
+
 	if (totem->controls_visibility == TOTEM_CONTROLS_VISIBLE)
 	{
 		if (was_fullscreen == FALSE)
@@ -1882,7 +1827,6 @@
 		else
 			gtk_widget_hide (totem->sidebar);
 
-		gtk_widget_hide (item);
 		gtk_container_set_border_width (GTK_CONTAINER (bvw_vbox),
 				BVW_VBOX_BORDER_WIDTH);
 
@@ -1907,10 +1851,6 @@
 		gtk_widget_hide (totem->sidebar);
 
 		 /* We won't show controls in fullscreen */
-		if (totem_is_fullscreen (totem) != FALSE)
-			gtk_widget_hide (item);
-		else
-			gtk_widget_show (item);
 		gtk_container_set_border_width (GTK_CONTAINER (bvw_vbox), 0);
 
 		if (totem->controls_visibility == TOTEM_CONTROLS_HIDDEN)
@@ -1921,277 +1861,19 @@
 	}
 }
 
-static void
-on_show_controls1_activate (GtkCheckMenuItem *checkmenuitem, Totem *totem)
-{
-	gboolean show;
-
-	show = gtk_check_menu_item_get_active (checkmenuitem);
-
-	/* Let's update our controls visibility */
-	if (show)
-		totem->controls_visibility = TOTEM_CONTROLS_VISIBLE;
-	else
-		totem->controls_visibility = TOTEM_CONTROLS_HIDDEN;
-
-	show_controls (totem, FALSE);
-}
-
-static void
-on_show_controls2_activate (GtkMenuItem *menuitem, Totem *totem)
-{
-	totem_action_toggle_controls (totem);
-}
-
 void
 totem_action_toggle_controls (Totem *totem)
 {
-	GtkWidget *item;
+	GtkAction *action;
 	gboolean state;
 
 	if (totem_is_fullscreen (totem) != FALSE)
 		return;
 
-	item = glade_xml_get_widget (totem->xml,
-			"tmw_show_controls_menu_item");
-	state = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (item));
-	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), !state);
-}
-
-#ifndef HAVE_GTK_ONLY
-static void
-on_help_activate (GtkButton *button, Totem *totem)
-{
-	GError *err = NULL;
-
-	if (gnome_help_display ("totem.xml", NULL, &err) == FALSE)
-	{
-		totem_action_error (_("Totem could not display the help contents."), err->message, totem);
-		g_error_free (err);
-	}
-}
-#endif /* !HAVE_GTK_ONLY */
-
-static void
-on_about1_activate (GtkButton *button, Totem *totem)
-{
-	char *backend_version, *description;
-	const char *frontend_type;
-
-	const char *authors[] =
-	{
-		"Bastien Nocera <hadess@hadess.net>",
-		"Ronald Bultje <rbultje@ronald.bitfreak.net>",
-		"Julien Moutte <julien@moutte.net> (GStreamer backend)",
-		NULL
-	};
-	const char *artists[] = { "Jakub Steiner <jimmac@ximian.com>", NULL };
-	const char *documenters[] =
-	{
-		"Chee Bin Hoh <cbhoh@gnome.org>",
-		NULL
-	};
-
-	if (totem->about != NULL)
-	{
-		gtk_window_present (GTK_WINDOW (totem->about));
-		return;
-	}
-
-#ifdef HAVE_GTK_ONLY
-	frontend_type = N_("GTK+");
-#else
-	frontend_type = N_("GNOME");
-#endif
-
-	backend_version = bacon_video_widget_get_backend_name (totem->bvw);
-	/* This lists the back-end and front-end types and versions, such as
-	 * Movie Player using GStreamer 0.10.1 and GNOME */
-	description = g_strdup_printf (_("Movie Player using %s and %s"),
-				       backend_version, _(frontend_type));
-
-	totem->about = g_object_new (GTK_TYPE_ABOUT_DIALOG,
-				     "version", VERSION,
-				     "copyright", _("Copyright \xc2\xa9 2002-2006 Bastien Nocera"),
-				     "comments", description,
-				     "authors", authors,
-				     "documenters", documenters,
-				     "artists", artists,
-				     "translator-credits", _("translator-credits"),
-				     "logo-icon-name", "totem",
-				     NULL);
-
-	g_free (backend_version);
-	g_free (description);
-
-	g_object_add_weak_pointer (G_OBJECT (totem->about),
-			(gpointer *)&totem->about);
-	gtk_window_set_transient_for (GTK_WINDOW (totem->about),
-			GTK_WINDOW (totem->win));
-	g_signal_connect (G_OBJECT (totem->about), "response",
-			G_CALLBACK (gtk_widget_destroy), NULL);
-
-	gtk_widget_show(totem->about);
-}
-
-static void
-on_take_screenshot1_activate (GtkButton *button, Totem *totem)
-{
-	GdkPixbuf *pixbuf;
-	GtkWidget *dialog;
-	char *filename;
-	GError *err = NULL;
-
-	if (bacon_video_widget_get_logo_mode (totem->bvw) != FALSE)
-		return;
-
-	if (bacon_video_widget_can_get_frames (totem->bvw, &err) == FALSE)
-	{
-		if (err == NULL)
-			return;
-
-		totem_action_error (_("Totem could not get a screenshot of that film."), err->message, totem);
-		g_error_free (err);
-		return;
-	}
-
-	pixbuf = bacon_video_widget_get_current_frame (totem->bvw);
-	if (pixbuf == NULL)
-	{
-		totem_action_error (_("Totem could not get a screenshot of that film."), _("This is not supposed to happen; please file a bug report."), totem);
-		return;
-	}
-
-	filename = g_build_filename (DATADIR,
-			"totem", "screenshot.glade", NULL);
-	dialog = totem_screenshot_new (filename, pixbuf);
-	g_free (filename);
-
-	gtk_dialog_run (GTK_DIALOG (dialog));
-	gtk_widget_destroy (dialog);
-	gdk_pixbuf_unref (pixbuf);
-}
-
-static void
-on_preferences1_activate (GtkButton *button, Totem *totem)
-{
-	gtk_widget_show (totem->prefs);
-}
-
-static void
-on_dvd_root_menu1_activate (GtkButton *button, Totem *totem)
-{
-        bacon_video_widget_dvd_event (totem->bvw, BVW_DVD_ROOT_MENU);
-}
-
-static void
-on_dvd_title_menu1_activate (GtkButton *button, Totem *totem)
-{
-        bacon_video_widget_dvd_event (totem->bvw, BVW_DVD_TITLE_MENU);
-}
-
-static void
-on_dvd_audio_menu1_activate (GtkButton *button, Totem *totem)
-{
-        bacon_video_widget_dvd_event (totem->bvw, BVW_DVD_AUDIO_MENU);
-}
-
-static void
-on_dvd_angle_menu1_activate (GtkButton *button, Totem *totem)
-{
-        bacon_video_widget_dvd_event (totem->bvw, BVW_DVD_ANGLE_MENU);
-}
-
-static void
-on_dvd_chapter_menu1_activate (GtkButton *button, Totem *totem)
-{
-        bacon_video_widget_dvd_event (totem->bvw, BVW_DVD_CHAPTER_MENU);
-}
-
-static void
-commit_hide_skip_to (GtkDialog *dialog, gint response, Totem *totem)
-{
-	GError *err = NULL;
-
-	if (response != GTK_RESPONSE_OK)
-	{
-		gtk_widget_destroy (GTK_WIDGET (totem->skipto));
-		return;
-	}
-
-	gtk_widget_hide (GTK_WIDGET (dialog));
-
-	bacon_video_widget_seek_time (totem->bvw,
-			totem_skipto_get_range (totem->skipto), &err);
-
-	gtk_widget_destroy (GTK_WIDGET (totem->skipto));
-
-	if (err != NULL)
-	{
-		char *msg, *disp;
-
-		disp = totem_uri_escape_for_display (totem->mrl);
-		msg = g_strdup_printf(_("Totem could not seek in '%s'."), disp);
-		g_free (disp);
-		totem_action_stop (totem);
-		totem_playlist_set_playing (totem->playlist, FALSE);
-		totem_action_error (msg, err->message, totem);
-		g_free (msg);
-		g_error_free (err);
-	}
-}
-
-static void
-on_skip_to1_activate (GtkButton *button, Totem *totem)
-{
-	char *filename;
-
-	if (totem->seekable == FALSE)
-		return;
-
-	if (totem->skipto != NULL)
-	{
-		gtk_window_present (GTK_WINDOW (totem->skipto));
-		return;
-	}
-
-	filename = totem_interface_get_full_path ("skip_to.glade");
-	totem->skipto = TOTEM_SKIPTO (totem_skipto_new (filename));
-	g_free (filename);
-
-	g_signal_connect (G_OBJECT (totem->skipto), "delete-event",
-			G_CALLBACK (gtk_widget_destroy), NULL);
-	g_signal_connect (G_OBJECT (totem->skipto), "response",
-			G_CALLBACK (commit_hide_skip_to), totem);
-	g_object_add_weak_pointer (G_OBJECT (totem->skipto),
-			(gpointer *)&totem->skipto);
-	gtk_window_set_transient_for (GTK_WINDOW (totem->skipto),
-			GTK_WINDOW (totem->win));
-	gtk_widget_show (GTK_WIDGET (totem->skipto));
-}
-
-static void
-on_skip_forward1_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_seek_relative (totem, SEEK_FORWARD_OFFSET);
-}
-
-static void
-on_skip_backwards1_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_seek_relative (totem, SEEK_BACKWARD_OFFSET);
-}
-
-static void
-on_volume_up1_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_volume_relative (totem, VOLUME_UP_OFFSET);
-}
-
-static void
-on_volume_down1_activate (GtkButton *button, Totem *totem)
-{
-	totem_action_volume_relative (totem, VOLUME_DOWN_OFFSET);
+	action = gtk_action_group_get_action (totem->main_action_group,
+		"show-controls");
+	state = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), !state);
 }
 
 static void
@@ -2409,33 +2091,33 @@
 static void
 playlist_repeat_toggle_cb (TotemPlaylist *playlist, gboolean repeat, Totem *totem)
 {
-	GtkWidget *item;
-
-	item = glade_xml_get_widget (totem->xml, "tmw_repeat_mode_menu_item");
-
-	g_signal_handlers_disconnect_by_func (G_OBJECT (item),
-			on_repeat_mode1_toggled, totem);
-
-	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), repeat);
-
-	g_signal_connect (G_OBJECT (item), "toggled",
-			G_CALLBACK (on_repeat_mode1_toggled), totem);
+	GtkAction *action;
+
+	action = gtk_action_group_get_action (totem->main_action_group, "repeat-mode");
+
+	g_signal_handlers_block_matched (G_OBJECT (action), G_SIGNAL_MATCH_DATA, 0, 0,
+			NULL, NULL, totem);
+
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), repeat);
+
+	g_signal_handlers_unblock_matched (G_OBJECT (action), G_SIGNAL_MATCH_DATA, 0, 0,
+			NULL, NULL, totem);
 }
 
 static void
 playlist_shuffle_toggle_cb (TotemPlaylist *playlist, gboolean shuffle, Totem *totem)
 {
-	GtkWidget *item;
-
-	item = glade_xml_get_widget (totem->xml, "tmw_shuffle_mode_menu_item");
-
-	g_signal_handlers_disconnect_by_func (G_OBJECT (item),
-			on_shuffle_mode1_toggled, totem);
-
-	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), shuffle);
-
-	g_signal_connect (G_OBJECT (item), "toggled",
-			G_CALLBACK (on_shuffle_mode1_toggled), totem);
+	GtkAction *action;
+
+	action = gtk_action_group_get_action (totem->main_action_group, "shuffle-mode");
+
+	g_signal_handlers_block_matched (G_OBJECT (action), G_SIGNAL_MATCH_DATA, 0, 0,
+			NULL, NULL, totem);
+
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), shuffle);
+
+	g_signal_handlers_unblock_matched (G_OBJECT (action), G_SIGNAL_MATCH_DATA, 0, 0,
+			NULL, NULL, totem);
 }
 
 static void
@@ -2450,7 +2132,7 @@
 			&totem->fullscreen_rect);
 }
 
-static gboolean
+gboolean
 totem_is_fullscreen (Totem *totem)
 {
 	return (totem->controls_visibility == TOTEM_CONTROLS_FULLSCREEN);
@@ -2717,7 +2399,7 @@
 	case GDK_O:
 	case GDK_o:
 		totem_action_fullscreen (totem, FALSE);
-		on_open1_activate (NULL, totem);
+		totem_action_open (totem);
 		break;
 #ifdef HAVE_XFREE
 	case XF86XK_AudioPlay:
@@ -2738,9 +2420,9 @@
 	case GDK_s:
 	case GDK_S:
 		if (event->state & GDK_CONTROL_MASK) {
-			on_take_screenshot1_activate (NULL, totem);
+			totem_action_take_screenshot (totem);
 		} else {
-			on_skip_to1_activate (NULL, totem);
+			totem_action_skip_to (totem);
 		}
 		break;
 	case GDK_t:
@@ -2993,17 +2675,17 @@
 
 	playing = totem_playing_dvd (totem->mrl);
 
-	totem_main_set_sensitivity ("tmw_dvd_root_menu_item", playing);
-	totem_main_set_sensitivity ("tmw_dvd_title_menu_item", playing);
-	totem_main_set_sensitivity ("tmw_dvd_audio_menu_item", playing);
-	totem_main_set_sensitivity ("tmw_dvd_angle_menu_item", playing);
-	totem_main_set_sensitivity ("tmw_dvd_chapter_menu_item", playing);
+	totem_action_set_sensitivity ("dvd-root-menu", playing);
+	totem_action_set_sensitivity ("dvd-title-menu", playing);
+	totem_action_set_sensitivity ("dvd-audio-menu", playing);
+	totem_action_set_sensitivity ("dvd-angle-menu", playing);
+	totem_action_set_sensitivity ("dvd-chapter-menu", playing);
 	/* FIXME we should only show that if we have multiple angles */
-	totem_main_set_sensitivity ("tmw_next_angle_menu_item", playing);
+	totem_action_set_sensitivity ("next-angle", playing);
 
 	playing = totem_is_media (totem->mrl);
 
-	totem_main_set_sensitivity ("tmw_eject_menu_item", playing);
+	totem_action_set_sensitivity ("eject", playing);
 }
 
 static void
@@ -3020,10 +2702,7 @@
 		has_item = totem_playlist_has_previous_mrl (totem->playlist);
 	}
 
-	totem_main_set_sensitivity ("tmw_previous_button", has_item);
-	totem_main_set_sensitivity ("tcw_previous_button", has_item);
-	totem_main_set_sensitivity ("tmw_previous_chapter_menu_item", has_item);
-	totem_popup_set_sensitivity ("trcm_previous_chapter", has_item);
+	totem_action_set_sensitivity ("previous-chapter", has_item);
 
 	/* Next */
 	/* FIXME Need way to detect if DVD Title has no more chapters */
@@ -3034,10 +2713,7 @@
 		has_item = totem_playlist_has_next_mrl (totem->playlist);
 	}
 
-	totem_main_set_sensitivity ("tmw_next_button", has_item);
-	totem_main_set_sensitivity ("tcw_next_button", has_item);
-	totem_main_set_sensitivity ("tmw_next_chapter_menu_item", has_item);
-	totem_popup_set_sensitivity ("trcm_next_chapter", has_item);
+	totem_action_set_sensitivity ("next-chapter", has_item);
 }
 
 static void
@@ -3131,170 +2807,46 @@
 static void
 totem_callback_connect (Totem *totem)
 {
-	GtkWidget *item;
+	GtkWidget *item, *box;
+	GtkAction *action;
 
 	/* Menu items */
-	item = glade_xml_get_widget (totem->xml, "tmw_open_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_open1_activate), totem);
-	item = glade_xml_get_widget (totem->xml,
-			"tmw_open_location_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_open_location1_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_eject_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_eject1_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_play_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_play1_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_fullscreen_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_full_screen1_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_resize_1_2_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_resize_1_2_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_resize_1_1_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_resize_1_1_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_resize_2_1_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_resize_2_1_activate), totem);
-	if (bacon_video_widget_can_set_zoom (totem->bvw) != FALSE)
-	{
-		item = glade_xml_get_widget
-			(totem->xml, "tmw_zoom_in_menu_item");
-		g_signal_connect (G_OBJECT (item), "activate",
-				G_CALLBACK (on_zoom_in_activate), totem);
-		item = glade_xml_get_widget
-			(totem->xml, "tmw_zoom_reset_menu_item");
-		g_signal_connect (G_OBJECT (item), "activate",
-				G_CALLBACK (on_zoom_reset_activate), totem);
-		item = glade_xml_get_widget
-			(totem->xml, "tmw_zoom_out_menu_item");
-		g_signal_connect (G_OBJECT (item), "activate",
-				G_CALLBACK (on_zoom_out_activate), totem);
-	} else {
-		item = glade_xml_get_widget
-			(totem->xml, "tmw_zoom_in_menu_item");
-		gtk_widget_hide (item);
-		item = glade_xml_get_widget
-			(totem->xml, "tmw_zoom_reset_menu_item");
-		gtk_widget_hide (item);
-		item = glade_xml_get_widget
-			(totem->xml, "tmw_zoom_out_menu_item");
-		gtk_widget_hide (item);
-	}
-
-	item = glade_xml_get_widget (totem->xml,
-			"tmw_aspect_ratio_auto_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_aspect_ratio_auto_activate), totem);
-	item = glade_xml_get_widget (totem->xml,
-			"tmw_aspect_ratio_square_menu_item");
-        g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_aspect_ratio_square_activate), totem);
-	item = glade_xml_get_widget (totem->xml,
-			"tmw_aspect_ratio_fbt_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_aspect_ratio_fbt_activate), totem);
-	item = glade_xml_get_widget (totem->xml,
-			"tmw_aspect_ratio_anamorphic_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_aspect_anamorphic_activate), totem);
-	item = glade_xml_get_widget (totem->xml,
-			"tmw_aspect_ratio_dvb_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_aspect_ratio_dvb_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_repeat_mode_menu_item");
-	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),
-			totem_playlist_get_repeat (totem->playlist));
-	g_signal_connect (G_OBJECT (item), "toggled",
-			G_CALLBACK (on_repeat_mode1_toggled), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_shuffle_mode_menu_item");
-	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),
-			totem_playlist_get_shuffle (totem->playlist));
-	g_signal_connect (G_OBJECT (item), "toggled",
-			G_CALLBACK (on_shuffle_mode1_toggled), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_quit_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_quit1_activate), totem);
-
-	/* Help */
-	item = glade_xml_get_widget (totem->xml, "tmw_about_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_about1_activate), totem);
-
-#ifndef HAVE_GTK_ONLY
-	item = glade_xml_get_widget (totem->xml, "tmw_contents_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_help_activate), totem);
-#else
-	item = glade_xml_get_widget (totem->xml, "tmw_contents_menu_item");
-	gtk_widget_hide (item);
-#endif /* !HAVE_GTK_ONLY */
-
-	item = glade_xml_get_widget (totem->xml,
-			"tmw_take_screenshot_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_take_screenshot1_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_preferences_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_preferences1_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_volume_up_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_volume_up1_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_volume_down_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_volume_down1_activate), totem);
-	item = glade_xml_get_widget (totem->xml,
-			"tmw_always_on_top_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_always_on_top1_activate), totem);
-	item = glade_xml_get_widget (totem->xml,
-			"tmw_show_controls_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_show_controls1_activate), totem);
-
-	/* Popup menu */
-	item = glade_xml_get_widget (totem->xml_popup, "trcm_play");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_play1_activate), totem);
-	item = glade_xml_get_widget (totem->xml_popup, "trcm_next_chapter");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_next_button_clicked), totem);
-	item = glade_xml_get_widget (totem->xml_popup, "trcm_previous_chapter");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_previous_button_clicked), totem);
-	item = glade_xml_get_widget (totem->xml_popup, "trcm_skip_forward");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_skip_forward1_activate), totem);
-	item = glade_xml_get_widget (totem->xml_popup, "trcm_skip_backwards");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_skip_backwards1_activate), totem);
-	item = glade_xml_get_widget (totem->xml_popup, "trcm_volume_up");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_volume_up1_activate), totem);
-	item = glade_xml_get_widget (totem->xml_popup, "trcm_volume_down");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_volume_down1_activate), totem);
-	item = glade_xml_get_widget (totem->xml_popup, "trcm_show_controls");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_show_controls2_activate), totem);
+	gtk_action_group_set_visible (totem->zoom_action_group,
+		bacon_video_widget_can_set_zoom (totem->bvw));
+
+	action = gtk_action_group_get_action (totem->main_action_group, "repeat-mode");
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
+		totem_playlist_get_repeat (totem->playlist));
+	action = gtk_action_group_get_action (totem->main_action_group, "shuffle-mode");
+	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
+		totem_playlist_get_shuffle (totem->playlist));
+
+#ifdef HAVE_GTK_ONLY
+	action = gtk_action_group_get_action (totem->main_action_group, "contents");
+	gtk_action_set_visible (action, FALSE)
+#endif /* HAVE_GTK_ONLY */
 
 	/* Controls */
-	totem->pp_button = glade_xml_get_widget
-		(totem->xml, "tmw_play_pause_button");
-	g_signal_connect (G_OBJECT (totem->pp_button), "clicked",
-			G_CALLBACK (on_play_pause_button_clicked), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_previous_button");
-	g_signal_connect (G_OBJECT (item), "clicked",
-			G_CALLBACK (on_previous_button_clicked), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_next_button");
-	g_signal_connect (G_OBJECT (item), "clicked", 
-			  G_CALLBACK (on_next_button_clicked), totem);
-
-	/* Drag'n'Drop */
-	item = glade_xml_get_widget (totem->xml, "tmw_sidebar_button");
+	box = glade_xml_get_widget (totem->xml, "tmw_buttons_hbox");
+
+	action = gtk_action_group_get_action (totem->main_action_group, "previous-chapter");
+	item = gtk_action_create_tool_item (action);
+	gtk_box_pack_start (GTK_BOX (box), item, FALSE, FALSE, 0);
+
+	action = gtk_action_group_get_action (totem->main_action_group, "play");
+	item = gtk_action_create_tool_item (action);
+	gtk_box_pack_start (GTK_BOX (box), item, FALSE, FALSE, 0);
+
+	action = gtk_action_group_get_action (totem->main_action_group, "next-chapter");
+	item = gtk_action_create_tool_item (action);
+	gtk_box_pack_start (GTK_BOX (box), item, FALSE, FALSE, 0);
+
+
+	/* Sidebar button (Drag'n'Drop) */
+	box = glade_xml_get_widget (totem->xml, "tmw_sidebar_button_hbox");
+	action = gtk_action_group_get_action (totem->main_action_group, "sidebar");
+	item = gtk_action_create_tool_item (action);
+	gtk_box_pack_start (GTK_BOX (box), item, FALSE, FALSE, 0);
 	g_signal_connect (G_OBJECT (item), "drag_data_received",
 			G_CALLBACK (drop_playlist_cb), totem);
 	gtk_drag_dest_set (item, GTK_DEST_DEFAULT_ALL,
@@ -3335,22 +2887,26 @@
 			G_CALLBACK (on_video_motion_notify_event), totem);
 
 	/* Control Popup */
-	g_signal_connect (G_OBJECT (totem->fs_pp_button), "clicked",
-			G_CALLBACK (on_play_pause_button_clicked), totem);
-	g_signal_connect (G_OBJECT (totem->fs_pp_button), "clicked",
-			G_CALLBACK (on_mouse_click_fullscreen), totem);
-
-	item = glade_xml_get_widget (totem->xml, "tcw_previous_button");
-	g_signal_connect (G_OBJECT (item), "clicked",
-			G_CALLBACK (on_previous_button_clicked), totem);
-	g_signal_connect (G_OBJECT (item), "clicked",
-			G_CALLBACK (on_mouse_click_fullscreen), totem);
-
-	item = glade_xml_get_widget (totem->xml, "tcw_next_button");
-	g_signal_connect (G_OBJECT (item), "clicked", 
-			G_CALLBACK (on_next_button_clicked), totem);
-	g_signal_connect (G_OBJECT (item), "clicked",
-			G_CALLBACK (on_mouse_click_fullscreen), totem);
+	box = glade_xml_get_widget (totem->xml, "tcw_buttons_hbox");
+
+	action = gtk_action_group_get_action (totem->main_action_group, "previous-chapter");
+	item = gtk_action_create_tool_item (action);
+	gtk_box_pack_start (GTK_BOX (box), item, FALSE, FALSE, 0);
+	g_signal_connect (G_OBJECT (item), "clicked",
+			G_CALLBACK (on_mouse_click_fullscreen), totem);
+
+	action = gtk_action_group_get_action (totem->main_action_group, "play");
+	item = gtk_action_create_tool_item (action);
+	gtk_box_pack_start (GTK_BOX (box), item, FALSE, FALSE, 0);
+	g_signal_connect (G_OBJECT (item), "clicked",
+			G_CALLBACK (on_mouse_click_fullscreen), totem);
+
+	action = gtk_action_group_get_action (totem->main_action_group, "next-chapter");
+	item = gtk_action_create_tool_item (action);
+	gtk_box_pack_start (GTK_BOX (box), item, FALSE, FALSE, 0);
+	g_signal_connect (G_OBJECT (item), "clicked",
+			G_CALLBACK (on_mouse_click_fullscreen), totem);
+
 
 	item = glade_xml_get_widget (totem->xml, "tcw_volume_mute_button");
 	g_signal_connect (G_OBJECT (item), "clicked",
@@ -3407,48 +2963,6 @@
 	g_signal_connect (G_OBJECT (totem->volume), "value-changed",
 			G_CALLBACK (vol_cb), totem);
 
-	/* Playlist */
-
-	/* DVD menu callbacks */
-	item = glade_xml_get_widget (totem->xml, "tmw_dvd_root_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_dvd_root_menu1_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_dvd_title_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_dvd_title_menu1_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_dvd_audio_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_dvd_audio_menu1_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_dvd_angle_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_dvd_angle_menu1_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_dvd_chapter_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_dvd_chapter_menu1_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_skip_to_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_skip_to1_activate), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_next_chapter_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_next_button_clicked), totem);
-	item = glade_xml_get_widget (totem->xml,
-			"tmw_previous_chapter_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_previous_button_clicked), totem);
-	item = glade_xml_get_widget (totem->xml, "tmw_skip_forward_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_skip_forward1_activate), totem);
-	item = glade_xml_get_widget (totem->xml,
-			"tmw_skip_backwards_menu_item");
-	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_skip_backwards1_activate), totem);
-
-	/* Subtitle and Languages submenu */
-	item = glade_xml_get_widget (totem->xml, "tmw_menu_languages");
-	g_object_ref (item);
-	item = glade_xml_get_widget (totem->xml, "tmw_menu_subtitles");
-	g_object_ref (item);
-
 	/* Named icon support */
 	totem_set_default_icons (totem);
 
@@ -3703,16 +3217,14 @@
 			TRUE, NULL);
 	if (totem->xml == NULL)
 		totem_action_exit (NULL);
-	totem->xml_popup = totem_interface_load ("popup.glade",
-			_("video popup menu"),
-			TRUE, NULL);
-	if (totem->xml_popup == NULL)
-		totem_action_exit (NULL);
 
 	totem->win = glade_xml_get_widget (totem->xml, "totem_main_window");
 	
 	totem_named_icons_init (totem, FALSE);
 
+	/* Menubar */
+	totem_ui_manager_setup (totem);
+
 	/* The sidebar */
 	playlist_widget_setup (totem);
 	totem->properties = bacon_video_widget_properties_new ();
@@ -3739,8 +3251,6 @@
 	totem->tooltip = gtk_tooltips_new ();
 	g_object_set_data (G_OBJECT (totem->fs_volume), "fs", GINT_TO_POINTER (1));
 	totem->volume_first_time = 1;
-	totem->fs_pp_button = glade_xml_get_widget
-		(totem->xml, "tcw_pp_button");
 	totem->statusbar = glade_xml_get_widget (totem->xml, "tmw_statusbar");
 	totem->tcw_time_label = glade_xml_get_widget (totem->xml,
 			"tcw_time_display_label");

