diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/configure nautilus-2.26.2/configure
--- nautilus-2.26.2.orig/configure	2009-04-06 10:28:45.000000000 +0200
+++ nautilus-2.26.2/configure	2009-07-18 22:26:40.000000000 +0200
@@ -28738,7 +28738,7 @@
 
 
 
-ac_config_files="$ac_config_files Makefile cut-n-paste-code/Makefile cut-n-paste-code/libegg/Makefile data/Makefile data/icons/Makefile data/patterns/Makefile docs/Makefile docs/reference/Makefile docs/reference/libnautilus-extension/Makefile docs/reference/libnautilus-extension/version.xml eel/Makefile icons/Makefile libnautilus-private/Makefile libnautilus-extension/Makefile libnautilus-extension/libnautilus-extension.pc libnautilus-extension/libnautilus-extension-uninstalled.pc nautilus-computer.desktop.in nautilus-file-management-properties.desktop.in nautilus-home.desktop.in nautilus.desktop.in nautilus-folder-handler.desktop.in nautilus-browser.desktop.in nautilus-autorun-software.desktop.in po/Makefile.in src/Makefile src/file-manager/Makefile test/Makefile"
+ac_config_files="$ac_config_files Makefile cut-n-paste-code/Makefile cut-n-paste-code/libegg/Makefile cut-n-paste-code/toolbar-editor/Makefile data/Makefile data/icons/Makefile data/patterns/Makefile docs/Makefile docs/reference/Makefile docs/reference/libnautilus-extension/Makefile docs/reference/libnautilus-extension/version.xml eel/Makefile icons/Makefile libnautilus-private/Makefile libnautilus-extension/Makefile libnautilus-extension/libnautilus-extension.pc libnautilus-extension/libnautilus-extension-uninstalled.pc nautilus-computer.desktop.in nautilus-file-management-properties.desktop.in nautilus-home.desktop.in nautilus.desktop.in nautilus-folder-handler.desktop.in nautilus-browser.desktop.in nautilus-autorun-software.desktop.in po/Makefile.in src/Makefile src/file-manager/Makefile test/Makefile"
 
 
 cat >confcache <<\_ACEOF
@@ -29582,6 +29582,7 @@
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "cut-n-paste-code/Makefile") CONFIG_FILES="$CONFIG_FILES cut-n-paste-code/Makefile" ;;
     "cut-n-paste-code/libegg/Makefile") CONFIG_FILES="$CONFIG_FILES cut-n-paste-code/libegg/Makefile" ;;
+    "cut-n-paste-code/toolbar-editor/Makefile") CONFIG_FILES="$CONFIG_FILES cut-n-paste-code/toolbar-editor/Makefile" ;;
     "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;;
     "data/icons/Makefile") CONFIG_FILES="$CONFIG_FILES data/icons/Makefile" ;;
     "data/patterns/Makefile") CONFIG_FILES="$CONFIG_FILES data/patterns/Makefile" ;;
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/configure.in nautilus-2.26.2/configure.in
--- nautilus-2.26.2.orig/configure.in	2009-04-06 10:28:21.000000000 +0200
+++ nautilus-2.26.2/configure.in	2009-07-18 22:19:53.000000000 +0200
@@ -108,6 +108,7 @@
 
 AC_CHECK_PROGS(PERL, perl5 perl)
 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
+AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
 
 dnl ==========================================================================
 
@@ -476,6 +477,7 @@
 Makefile
 cut-n-paste-code/Makefile
 cut-n-paste-code/libegg/Makefile
+cut-n-paste-code/toolbar-editor/Makefile
 data/Makefile
 data/icons/Makefile
 data/patterns/Makefile
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/cut-n-paste-code/Makefile.am nautilus-2.26.2/cut-n-paste-code/Makefile.am
--- nautilus-2.26.2.orig/cut-n-paste-code/Makefile.am	2008-09-14 14:14:27.000000000 +0200
+++ nautilus-2.26.2/cut-n-paste-code/Makefile.am	2009-07-20 21:56:23.000000000 +0200
@@ -1,2 +1,5 @@
-SUBDIRS = libegg
+SUBDIRS = libegg	\
+	toolbar-editor	\
+	$(NULL)
+
 
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/cut-n-paste-code/Makefile.in nautilus-2.26.2/cut-n-paste-code/Makefile.in
--- nautilus-2.26.2.orig/cut-n-paste-code/Makefile.in	2009-04-13 19:55:00.000000000 +0200
+++ nautilus-2.26.2/cut-n-paste-code/Makefile.in	2009-07-20 21:49:07.000000000 +0200
@@ -256,7 +256,10 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-SUBDIRS = libegg
+SUBDIRS = libegg \
+	toolbar-editor		\
+	$(NULL)
+
 all: all-recursive
 
 .SUFFIXES:
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/egg-editable-toolbar.c nautilus-2.26.2/cut-n-paste-code/toolbar-editor/egg-editable-toolbar.c
--- nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/egg-editable-toolbar.c	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/cut-n-paste-code/toolbar-editor/egg-editable-toolbar.c	2009-04-15 22:10:58.000000000 +0200
@@ -0,0 +1,1853 @@
+/*
+ *  Copyright (C) 2003, 2004  Marco Pesenti Gritti
+ *  Copyright (C) 2003, 2004, 2005  Christian Persch
+ *
+ *  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, 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.
+ *
+ *  $Id: egg-editable-toolbar.c 3377 2009-01-23 23:32:40Z nshmyrev $
+ */
+
+#include "config.h"
+
+#include "egg-editable-toolbar.h"
+#include "egg-toolbars-model.h"
+#include "egg-toolbar-editor.h"
+
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
+#include <string.h>
+
+static GdkPixbuf * new_separator_pixbuf         (void);
+
+#define MIN_TOOLBAR_HEIGHT 20
+#define EGG_ITEM_NAME      "egg-item-name"
+#define STOCK_DRAG_MODE    "stock_drag-mode"
+
+static const GtkTargetEntry dest_drag_types[] = {
+  {EGG_TOOLBAR_ITEM_TYPE, GTK_TARGET_SAME_APP, 0},
+};
+
+enum
+{
+  PROP_0,
+  PROP_TOOLBARS_MODEL,
+  PROP_UI_MANAGER,
+  PROP_POPUP_PATH,
+  PROP_SELECTED,
+  PROP_EDIT_MODE
+};
+
+enum
+{
+  ACTION_REQUEST,
+  LAST_SIGNAL
+};
+
+static guint egg_editable_toolbar_signals[LAST_SIGNAL] = { 0 };
+
+#define EGG_EDITABLE_TOOLBAR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarPrivate))
+
+struct _EggEditableToolbarPrivate
+{
+  GtkUIManager *manager;
+  EggToolbarsModel *model;
+  guint edit_mode;
+  gboolean save_hidden;
+  GtkWidget *fixed_toolbar;
+  
+  GtkWidget *selected;
+  GtkActionGroup *actions;
+  
+  guint visibility_id;
+  GList *visibility_paths;
+  GPtrArray *visibility_actions;
+
+  char *popup_path;
+
+  guint        dnd_pending;
+  GtkToolbar  *dnd_toolbar;
+  GtkToolItem *dnd_toolitem;
+};
+
+G_DEFINE_TYPE (EggEditableToolbar, egg_editable_toolbar, GTK_TYPE_VBOX);
+
+static int
+get_dock_position (EggEditableToolbar *etoolbar,
+                   GtkWidget *dock)
+{
+  GList *l;
+  int result;
+
+  l = gtk_container_get_children (GTK_CONTAINER (etoolbar));
+  result = g_list_index (l, dock);
+  g_list_free (l);
+
+  return result;
+}
+
+static int
+get_toolbar_position (EggEditableToolbar *etoolbar, GtkWidget *toolbar)
+{
+  return get_dock_position (etoolbar, toolbar->parent);
+}
+
+static int
+get_n_toolbars (EggEditableToolbar *etoolbar)
+{
+  GList *l;
+  int result;
+
+  l = gtk_container_get_children (GTK_CONTAINER (etoolbar));
+  result = g_list_length (l);
+  g_list_free (l);
+
+  return result;
+}
+
+static GtkWidget *
+get_dock_nth (EggEditableToolbar *etoolbar,
+	      int                 position)
+{
+  GList *l;
+  GtkWidget *result;
+
+  l = gtk_container_get_children (GTK_CONTAINER (etoolbar));
+  result = g_list_nth_data (l, position);
+  g_list_free (l);
+
+  return result;
+}
+
+static GtkWidget *
+get_toolbar_nth (EggEditableToolbar *etoolbar,
+		 int                 position)
+{
+  GList *l;
+  GtkWidget *dock;
+  GtkWidget *result;
+
+  dock = get_dock_nth (etoolbar, position);
+  g_return_val_if_fail (dock != NULL, NULL);
+
+  l = gtk_container_get_children (GTK_CONTAINER (dock));
+  result = GTK_WIDGET (l->data);
+  g_list_free (l);
+
+  return result;
+}
+
+static GtkAction *
+find_action (EggEditableToolbar *etoolbar,
+	     const char         *name)
+{
+  GList *l;
+  GtkAction *action = NULL;
+
+  l = gtk_ui_manager_get_action_groups (etoolbar->priv->manager);
+
+  g_return_val_if_fail (name != NULL, NULL);
+
+  for (; l != NULL; l = l->next)
+    {
+      GtkAction *tmp;
+
+      tmp = gtk_action_group_get_action (GTK_ACTION_GROUP (l->data), name);
+      if (tmp)
+	action = tmp;
+    }
+
+  return action;
+}
+
+static void
+drag_data_delete_cb (GtkWidget          *widget,
+		     GdkDragContext     *context,
+		     EggEditableToolbar *etoolbar)
+{
+  int pos, toolbar_pos;
+
+  widget = gtk_widget_get_ancestor (widget, GTK_TYPE_TOOL_ITEM);
+  g_return_if_fail (widget != NULL);
+  g_return_if_fail (EGG_IS_EDITABLE_TOOLBAR (etoolbar));
+
+  pos = gtk_toolbar_get_item_index (GTK_TOOLBAR (widget->parent),
+				    GTK_TOOL_ITEM (widget));
+  toolbar_pos = get_toolbar_position (etoolbar, widget->parent);
+
+  egg_toolbars_model_remove_item (etoolbar->priv->model,
+				  toolbar_pos, pos);
+}
+
+static void
+drag_begin_cb (GtkWidget          *widget,
+	       GdkDragContext     *context,
+	       EggEditableToolbar *etoolbar)
+{
+  GtkAction *action;
+  gint flags;
+  
+  gtk_widget_hide (widget);
+
+  action = gtk_widget_get_action (widget);
+  if (action == NULL) return;
+  
+  flags = egg_toolbars_model_get_name_flags (etoolbar->priv->model,
+					     gtk_action_get_name (action));
+  if (!(flags & EGG_TB_MODEL_NAME_INFINITE))
+    {
+      flags &= ~EGG_TB_MODEL_NAME_USED;
+      egg_toolbars_model_set_name_flags (etoolbar->priv->model,
+					 gtk_action_get_name (action),
+					 flags);
+    }
+}
+
+static void
+drag_end_cb (GtkWidget          *widget,
+	     GdkDragContext     *context,
+	     EggEditableToolbar *etoolbar)
+{
+  GtkAction *action;
+  gint flags;
+ 
+  if (gtk_widget_get_parent (widget) != NULL)
+    {
+      gtk_widget_show (widget);
+
+      action = gtk_widget_get_action (widget);
+      if (action == NULL) return;
+      
+      flags = egg_toolbars_model_get_name_flags (etoolbar->priv->model,
+						 gtk_action_get_name (action));
+      if (!(flags & EGG_TB_MODEL_NAME_INFINITE))
+        {
+	  flags |= EGG_TB_MODEL_NAME_USED;
+	  egg_toolbars_model_set_name_flags (etoolbar->priv->model,
+					     gtk_action_get_name (action),
+					     flags);
+	}
+    }
+}
+
+static void
+drag_data_get_cb (GtkWidget          *widget,
+		  GdkDragContext     *context,
+		  GtkSelectionData   *selection_data,
+		  guint               info,
+		  guint32             time,
+		  EggEditableToolbar *etoolbar)
+{
+  EggToolbarsModel *model;
+  const char *name;
+  char *data;
+
+  g_return_if_fail (EGG_IS_EDITABLE_TOOLBAR (etoolbar));
+  model = egg_editable_toolbar_get_model (etoolbar);
+  
+  name = g_object_get_data (G_OBJECT (widget), EGG_ITEM_NAME);
+  if (name == NULL)
+    {
+      name = g_object_get_data (G_OBJECT (gtk_widget_get_parent (widget)), EGG_ITEM_NAME);
+      g_return_if_fail (name != NULL);
+    }
+  
+  data = egg_toolbars_model_get_data (model, selection_data->target, name);
+  if (data != NULL)
+    {
+      gtk_selection_data_set (selection_data, selection_data->target, 8, (unsigned char *)data, strlen (data));
+      g_free (data);
+    }
+}
+
+static void
+move_item_cb (GtkAction          *action,
+              EggEditableToolbar *etoolbar)
+{
+  GtkWidget *toolitem = gtk_widget_get_ancestor (egg_editable_toolbar_get_selected (etoolbar), GTK_TYPE_TOOL_ITEM);
+  GtkTargetList *list = gtk_target_list_new (dest_drag_types, G_N_ELEMENTS (dest_drag_types));
+
+  GdkEvent *realevent = gtk_get_current_event();
+  GdkEventMotion event;
+  event.type = GDK_MOTION_NOTIFY;
+  event.window = realevent->any.window;
+  event.send_event = FALSE;
+  event.axes = NULL;
+  event.time = gdk_event_get_time (realevent);
+  gdk_event_get_state (realevent, &event.state);
+  gdk_event_get_coords (realevent, &event.x, &event.y);
+  gdk_event_get_root_coords (realevent, &event.x_root, &event.y_root);
+    
+  gtk_drag_begin (toolitem, list, GDK_ACTION_MOVE, 1, (GdkEvent *)&event);
+  gtk_target_list_unref (list);
+}
+
+static void
+remove_item_cb (GtkAction          *action,
+                EggEditableToolbar *etoolbar)
+{
+  GtkWidget *toolitem = gtk_widget_get_ancestor (egg_editable_toolbar_get_selected (etoolbar), GTK_TYPE_TOOL_ITEM);
+  int pos, toolbar_pos;
+      
+  toolbar_pos = get_toolbar_position (etoolbar, toolitem->parent);
+  pos = gtk_toolbar_get_item_index (GTK_TOOLBAR (toolitem->parent), 
+				    GTK_TOOL_ITEM (toolitem));
+
+  egg_toolbars_model_remove_item (etoolbar->priv->model,
+			          toolbar_pos, pos);
+
+  if (egg_toolbars_model_n_items (etoolbar->priv->model, toolbar_pos) == 0)
+    {
+      egg_toolbars_model_remove_toolbar (etoolbar->priv->model, toolbar_pos);
+    }
+}
+
+static void
+remove_toolbar_cb (GtkAction          *action,
+		   EggEditableToolbar *etoolbar)
+{
+  GtkWidget *selected = egg_editable_toolbar_get_selected (etoolbar);
+  GtkWidget *toolbar = gtk_widget_get_ancestor (selected, GTK_TYPE_TOOLBAR);
+  int toolbar_pos;
+
+  toolbar_pos = get_toolbar_position (etoolbar, toolbar);
+  egg_toolbars_model_remove_toolbar (etoolbar->priv->model, toolbar_pos);
+}
+
+static void
+popup_context_deactivate (GtkMenuShell *menu,
+			  EggEditableToolbar *etoolbar)
+{
+  egg_editable_toolbar_set_selected (etoolbar, NULL);
+  g_object_notify (G_OBJECT (etoolbar), "selected");
+}
+
+static void
+popup_context_menu_cb (GtkWidget          *toolbar,
+                       gint		   x,
+                       gint		   y,
+                       gint                button_number,
+                       EggEditableToolbar *etoolbar)
+{
+  if (etoolbar->priv->popup_path != NULL)
+    {
+      GtkMenu *menu;
+      
+      egg_editable_toolbar_set_selected (etoolbar, toolbar);
+      g_object_notify (G_OBJECT (etoolbar), "selected");
+      
+      menu = GTK_MENU (gtk_ui_manager_get_widget (etoolbar->priv->manager, 
+						  etoolbar->priv->popup_path));
+      g_return_if_fail (menu != NULL);
+      gtk_menu_popup (menu, NULL, NULL, NULL, NULL, button_number, gtk_get_current_event_time ());
+      g_signal_connect_object (menu, "selection-done",
+			       G_CALLBACK (popup_context_deactivate),
+			       etoolbar, 0);
+    }
+}
+
+static gboolean
+button_press_event_cb (GtkWidget *widget,
+                       GdkEventButton *event,
+                       EggEditableToolbar *etoolbar)
+{
+  if (event->button == 3 && etoolbar->priv->popup_path != NULL)
+    {
+      GtkMenu *menu;
+      
+      egg_editable_toolbar_set_selected (etoolbar, widget);
+      g_object_notify (G_OBJECT (etoolbar), "selected");
+	
+      menu = GTK_MENU (gtk_ui_manager_get_widget (etoolbar->priv->manager, 
+						  etoolbar->priv->popup_path));
+      g_return_val_if_fail (menu != NULL, FALSE);
+      gtk_menu_popup (menu, NULL, NULL, NULL, NULL, event->button, event->time);
+      g_signal_connect_object (menu, "selection-done",
+			       G_CALLBACK (popup_context_deactivate),
+			       etoolbar, 0);
+      
+      return TRUE;
+    }
+    
+  return FALSE;
+}
+
+static void
+configure_item_sensitivity (GtkToolItem *item, EggEditableToolbar *etoolbar)
+{
+  GtkAction *action;
+  char *name;
+  
+  name = g_object_get_data (G_OBJECT (item), EGG_ITEM_NAME);
+  action = name ? find_action (etoolbar, name) : NULL;
+  
+  if (action)
+    {
+      g_object_notify (G_OBJECT (action), "sensitive");
+    }
+
+  gtk_tool_item_set_use_drag_window (item,
+				     (etoolbar->priv->edit_mode > 0) || 
+				     GTK_IS_SEPARATOR_TOOL_ITEM (item));
+  
+}
+
+static void
+configure_item_cursor (GtkToolItem *item,
+		       EggEditableToolbar *etoolbar)
+{
+  EggEditableToolbarPrivate *priv = etoolbar->priv;
+  GtkWidget *widget = GTK_WIDGET (item);
+
+  if (widget->window != NULL)
+    {
+      if (priv->edit_mode > 0)
+        {
+          GdkCursor *cursor;
+	  GdkScreen *screen;
+          GdkPixbuf *pixbuf = NULL;
+
+	  screen = gtk_widget_get_screen (GTK_WIDGET (etoolbar));
+	  
+          cursor = gdk_cursor_new_for_display (gdk_screen_get_display (screen),
+					       GDK_HAND2);
+          gdk_window_set_cursor (widget->window, cursor);
+          gdk_cursor_unref (cursor);
+
+          gtk_drag_source_set (widget, GDK_BUTTON1_MASK, dest_drag_types,
+                               G_N_ELEMENTS (dest_drag_types), GDK_ACTION_MOVE);
+          if (GTK_IS_SEPARATOR_TOOL_ITEM (item))
+            {
+              pixbuf = new_separator_pixbuf ();
+            }
+          else
+            {
+              char *icon_name=NULL;
+              char *stock_id=NULL;
+              GtkAction *action;
+              char *name;
+
+              name = g_object_get_data (G_OBJECT (widget), EGG_ITEM_NAME);
+              action = name ? find_action (etoolbar, name) : NULL;
+
+              if (action)
+                {
+                   g_object_get (action,
+                                 "icon-name", &icon_name,
+                                 "stock-id", &stock_id,
+                                 NULL);
+                }
+              if (icon_name)
+                {
+                  GdkScreen *screen;
+                  GtkIconTheme *icon_theme;
+                  GtkSettings *settings;
+                  gint width, height;
+
+                  screen = gtk_widget_get_screen (widget);
+                  icon_theme = gtk_icon_theme_get_for_screen (screen);
+                  settings = gtk_settings_get_for_screen (screen);
+
+                  if (!gtk_icon_size_lookup_for_settings (settings,
+                                                          GTK_ICON_SIZE_LARGE_TOOLBAR,
+                                                          &width, &height))
+                    {
+                      width = height = 24;
+                    }
+
+                  pixbuf = gtk_icon_theme_load_icon (icon_theme, icon_name,
+                                                     MIN (width, height), 0, NULL);
+                }
+              else if (stock_id)
+                {		 
+                  pixbuf = gtk_widget_render_icon (widget, stock_id,
+	                                           GTK_ICON_SIZE_LARGE_TOOLBAR, NULL);
+                }
+              g_free (icon_name);
+              g_free (stock_id);
+            }
+
+          if (G_UNLIKELY (!pixbuf))
+            {
+              return;
+            }
+          gtk_drag_source_set_icon_pixbuf (widget, pixbuf);
+          g_object_unref (pixbuf);
+
+        }
+      else
+        {
+          gdk_window_set_cursor (GTK_WIDGET(item)->window, NULL);
+        }
+    }
+}
+
+
+static void
+configure_item_tooltip (GtkToolItem *item)
+{
+  GtkAction *action = gtk_widget_get_action (GTK_WIDGET (item));
+  
+  if (action != NULL)
+    {
+      g_object_notify (G_OBJECT (action), "tooltip");
+    }
+}
+
+
+static void
+connect_widget_signals (GtkWidget *proxy, EggEditableToolbar *etoolbar)
+{
+  if (GTK_IS_CONTAINER (proxy))
+    {
+       gtk_container_forall (GTK_CONTAINER (proxy),
+			     (GtkCallback) connect_widget_signals,
+			     (gpointer) etoolbar);
+    }
+
+  if (GTK_IS_TOOL_ITEM (proxy))
+    {
+      g_signal_connect_object (proxy, "drag_begin",
+			       G_CALLBACK (drag_begin_cb), 
+			       etoolbar, 0);
+      g_signal_connect_object (proxy, "drag_end",
+			       G_CALLBACK (drag_end_cb),
+			       etoolbar, 0);
+      g_signal_connect_object (proxy, "drag_data_get",
+			       G_CALLBACK (drag_data_get_cb), 
+			       etoolbar, 0);
+      g_signal_connect_object (proxy, "drag_data_delete",
+			       G_CALLBACK (drag_data_delete_cb),
+			       etoolbar, 0);
+    }
+    
+  if (GTK_IS_BUTTON (proxy) || GTK_IS_TOOL_ITEM (proxy))
+    {
+      g_signal_connect_object (proxy, "button-press-event",
+			       G_CALLBACK (button_press_event_cb),
+			       etoolbar, 0);
+    }
+}
+
+static void
+action_sensitive_cb (GtkAction   *action, 
+                     GParamSpec  *pspec,
+                     GtkToolItem *item)
+{
+  EggEditableToolbar *etoolbar = EGG_EDITABLE_TOOLBAR
+    (gtk_widget_get_ancestor (GTK_WIDGET (item), EGG_TYPE_EDITABLE_TOOLBAR));
+
+  if (etoolbar->priv->edit_mode > 0)
+    {
+      gtk_widget_set_sensitive (GTK_WIDGET (item), TRUE);
+    }
+}
+
+static GtkToolItem *
+create_item_from_action (EggEditableToolbar *etoolbar,
+			 const char *name)
+{
+  GtkToolItem *item;
+
+  g_return_val_if_fail (name != NULL, NULL);
+  
+  if (strcmp (name, "_separator") == 0)
+    {
+      item = gtk_separator_tool_item_new ();
+    }
+  else
+    {
+      GtkAction *action = find_action (etoolbar, name);
+      if (action == NULL) return NULL;
+	
+      item = GTK_TOOL_ITEM (gtk_action_create_tool_item (action));
+
+      /* Normally done on-demand by the GtkUIManager, but no
+       * such demand may have been made yet, so do it ourselves.
+       */
+      gtk_action_set_accel_group
+        (action, gtk_ui_manager_get_accel_group(etoolbar->priv->manager));
+     
+      g_signal_connect_object (action, "notify::sensitive",
+                               G_CALLBACK (action_sensitive_cb), item, 0);
+    }
+
+  gtk_widget_show (GTK_WIDGET (item));
+
+  g_object_set_data_full (G_OBJECT (item), EGG_ITEM_NAME,
+                          g_strdup (name), g_free);  
+  
+  return item;
+}
+
+static GtkToolItem *
+create_item_from_position (EggEditableToolbar *etoolbar,
+                           int                 toolbar_position,
+                           int                 position)
+{
+  GtkToolItem *item;
+  const char *name;
+
+  name = egg_toolbars_model_item_nth (etoolbar->priv->model, toolbar_position, position);
+  item = create_item_from_action (etoolbar, name);
+
+  return item;
+}
+
+static void
+toolbar_drag_data_received_cb (GtkToolbar         *toolbar,
+                               GdkDragContext     *context,
+                               gint                x,
+                               gint                y,
+                               GtkSelectionData   *selection_data,
+                               guint               info,
+                               guint               time,
+                               EggEditableToolbar *etoolbar)
+{
+  /* This function can be called for two reasons
+   *
+   *  (1) drag_motion() needs an item to pass to
+   *      gtk_toolbar_set_drop_highlight_item(). We can
+   *      recognize this case by etoolbar->priv->pending being TRUE
+   *      We should just create an item and return.
+   *
+   *  (2) The drag has finished, and drag_drop() wants us to
+   *      actually add a new item to the toolbar.
+   */
+
+  GdkAtom type = selection_data->type;
+  const char *data = (char *)selection_data->data;
+  
+  int ipos = -1;
+  char *name = NULL;
+  gboolean used = FALSE;
+  
+  /* Find out where the drop is occuring, and the name of what is being dropped. */
+  if (selection_data->length >= 0)
+    {
+      ipos = gtk_toolbar_get_drop_index (toolbar, x, y);
+      name = egg_toolbars_model_get_name (etoolbar->priv->model, type, data, FALSE);
+      if (name != NULL)
+	{
+	  used = ((egg_toolbars_model_get_name_flags (etoolbar->priv->model, name) & EGG_TB_MODEL_NAME_USED) != 0);
+        }
+    }
+
+  /* If we just want a highlight item, then . */
+  if (etoolbar->priv->dnd_pending > 0)
+    {
+      etoolbar->priv->dnd_pending--;
+      
+      if (name != NULL && etoolbar->priv->dnd_toolbar == toolbar && !used)
+        {
+          etoolbar->priv->dnd_toolitem = create_item_from_action (etoolbar, name);
+          gtk_toolbar_set_drop_highlight_item (etoolbar->priv->dnd_toolbar,
+                                               etoolbar->priv->dnd_toolitem, ipos);
+        }
+    }
+  else
+    {
+      gtk_toolbar_set_drop_highlight_item (toolbar, NULL, 0);
+      etoolbar->priv->dnd_toolbar = NULL;
+      etoolbar->priv->dnd_toolitem = NULL;
+  
+      /* If we don't have a name to use yet, try to create one. */
+      if (name == NULL && selection_data->length >= 0)
+        {
+          name = egg_toolbars_model_get_name (etoolbar->priv->model, type, data, TRUE);
+        }
+  
+      if (name != NULL && !used)
+        {
+          gint tpos = get_toolbar_position (etoolbar, GTK_WIDGET (toolbar));
+          egg_toolbars_model_add_item (etoolbar->priv->model, tpos, ipos, name);
+          gtk_drag_finish (context, TRUE, context->action == GDK_ACTION_MOVE, time);
+        }
+      else
+        {  
+          gtk_drag_finish (context, FALSE, context->action == GDK_ACTION_MOVE, time);
+        }
+    }
+        
+  g_free (name);
+}
+
+static gboolean
+toolbar_drag_drop_cb (GtkToolbar         *toolbar,
+		      GdkDragContext     *context,
+		      gint                x,
+		      gint                y,
+		      guint               time,
+		      EggEditableToolbar *etoolbar)
+{
+  GdkAtom target;
+
+  target = gtk_drag_dest_find_target (GTK_WIDGET (toolbar), context, NULL);
+  if (target != GDK_NONE)
+    {
+      gtk_drag_get_data (GTK_WIDGET (toolbar), context, target, time);
+      return TRUE;
+    }
+  
+  return FALSE;
+}
+
+static gboolean
+toolbar_drag_motion_cb (GtkToolbar         *toolbar,
+		        GdkDragContext     *context,
+		        gint                x,
+		        gint                y,
+		        guint               time,
+		        EggEditableToolbar *etoolbar)
+{
+  GdkAtom target = gtk_drag_dest_find_target (GTK_WIDGET (toolbar), context, NULL);
+  if (target == GDK_NONE)
+    {
+      gdk_drag_status (context, 0, time);
+      return FALSE;
+    }
+
+  /* Make ourselves the current dnd toolbar, and request a highlight item. */
+  if (etoolbar->priv->dnd_toolbar != toolbar)
+    {
+      etoolbar->priv->dnd_toolbar = toolbar;
+      etoolbar->priv->dnd_toolitem = NULL;
+      etoolbar->priv->dnd_pending++;
+      gtk_drag_get_data (GTK_WIDGET (toolbar), context, target, time);
+    }
+  
+  /* If a highlight item is available, use it. */
+  else if (etoolbar->priv->dnd_toolitem)
+    {
+      gint ipos = gtk_toolbar_get_drop_index (etoolbar->priv->dnd_toolbar, x, y);
+      gtk_toolbar_set_drop_highlight_item (etoolbar->priv->dnd_toolbar,
+                                           etoolbar->priv->dnd_toolitem, ipos);
+    }
+
+  gdk_drag_status (context, context->suggested_action, time);
+
+  return TRUE;
+}
+
+static void
+toolbar_drag_leave_cb (GtkToolbar         *toolbar,
+		       GdkDragContext     *context,
+		       guint               time,
+		       EggEditableToolbar *etoolbar)
+{
+  gtk_toolbar_set_drop_highlight_item (toolbar, NULL, 0);
+
+  /* If we were the current dnd toolbar target, remove the item. */
+  if (etoolbar->priv->dnd_toolbar == toolbar)
+    {
+      etoolbar->priv->dnd_toolbar = NULL;
+      etoolbar->priv->dnd_toolitem = NULL;
+    }
+}
+
+static void
+configure_drag_dest (EggEditableToolbar *etoolbar,
+                     GtkToolbar         *toolbar)
+{
+  EggToolbarsItemType *type;
+  GtkTargetList *targets;
+  GList *list;
+
+  /* Make every toolbar able to receive drag-drops. */
+  gtk_drag_dest_set (GTK_WIDGET (toolbar), 0,
+		     dest_drag_types, G_N_ELEMENTS (dest_drag_types),
+		     GDK_ACTION_MOVE | GDK_ACTION_COPY);
+ 
+  /* Add any specialist drag-drop abilities. */
+  targets = gtk_drag_dest_get_target_list (GTK_WIDGET (toolbar));
+  list = egg_toolbars_model_get_types (etoolbar->priv->model);
+  while (list)
+  {
+    type = list->data;
+    if (type->new_name != NULL || type->get_name != NULL)
+      gtk_target_list_add (targets, type->type, 0, 0);
+    list = list->next;
+  }
+}
+
+static void
+toggled_visibility_cb (GtkToggleAction *action,
+		       EggEditableToolbar *etoolbar)
+{
+  EggEditableToolbarPrivate *priv = etoolbar->priv;
+  GtkWidget *dock;
+  EggTbModelFlags flags;
+  gboolean visible;
+  gint i;
+  
+  visible = gtk_toggle_action_get_active (action);
+  for (i = 0; i < priv->visibility_actions->len; i++)
+    if (g_ptr_array_index (priv->visibility_actions, i) == action)
+      break;
+  
+  g_return_if_fail (i < priv->visibility_actions->len);
+  
+  dock = get_dock_nth (etoolbar, i);  
+  if (visible)
+    {
+      gtk_widget_show (dock);
+    }
+  else
+    {
+      gtk_widget_hide (dock);
+    }
+  
+  if (priv->save_hidden)
+    {      
+      flags = egg_toolbars_model_get_flags (priv->model, i);
+      
+      if (visible)
+        {
+	  flags &= ~(EGG_TB_MODEL_HIDDEN);
+	}
+      else
+	{
+	  flags |=  (EGG_TB_MODEL_HIDDEN);
+	}
+      
+      egg_toolbars_model_set_flags (priv->model, i, flags);
+    }
+}
+
+static void
+toolbar_visibility_refresh (EggEditableToolbar *etoolbar)
+{
+  EggEditableToolbarPrivate *priv = etoolbar->priv;
+  gint n_toolbars, n_items, i, j, k;
+  GtkToggleAction *action;
+  GList *list;
+  GString *string;
+  gboolean showing;
+  char action_name[40];
+  char *action_label;
+  char *tmp;    	
+  
+  if (priv == NULL || priv->model == NULL || priv->manager == NULL ||
+      priv->visibility_paths == NULL || priv->actions == NULL)
+    {
+      return;
+    }
+
+  if (priv->visibility_actions == NULL)
+    {
+      priv->visibility_actions = g_ptr_array_new ();
+    }
+  
+  if (priv->visibility_id != 0)
+    {
+      gtk_ui_manager_remove_ui (priv->manager, priv->visibility_id);
+    }  
+  
+  priv->visibility_id = gtk_ui_manager_new_merge_id (priv->manager);
+  
+  showing = GTK_WIDGET_VISIBLE (etoolbar);
+  
+  n_toolbars = egg_toolbars_model_n_toolbars (priv->model);
+  for (i = 0; i < n_toolbars; i++)
+    {
+      string = g_string_sized_new (0);
+      n_items = egg_toolbars_model_n_items (priv->model, i);
+      for (k = 0, j = 0; j < n_items; j++)
+        {
+          GValue value = { 0, };
+          GtkAction *action;
+          const char *name;
+
+          name = egg_toolbars_model_item_nth (priv->model, i, j);
+          if (name == NULL) continue;
+          action = find_action (etoolbar, name);
+          if (action == NULL) continue;
+
+          g_value_init (&value, G_TYPE_STRING);
+          g_object_get_property (G_OBJECT (action), "label", &value);
+          name = g_value_get_string (&value);
+          if (name == NULL)
+	    {
+		g_value_unset (&value);
+		continue;
+	    }
+	  k += g_utf8_strlen (name, -1) + 2;
+	  if (j > 0)
+	    {
+	      g_string_append (string, ", ");
+	      if (j > 1 && k > 25)
+		{
+		  g_value_unset (&value);
+		  break;
+		}
+	    }
+	  g_string_append (string, name);
+	  g_value_unset (&value);
+	}
+      if (j < n_items)
+        {
+	  g_string_append (string, " ...");
+        }
+      
+      tmp = g_string_free (string, FALSE);
+      for (j = 0, k = 0; tmp[j]; j++)
+      {
+	if (tmp[j] == '_') continue;
+	tmp[k] = tmp[j];
+	k++;
+      }
+      tmp[k] = 0;
+      /* Translaters: This string is for a toggle to display a toolbar.
+       * The name of the toolbar is automatically computed from the widgets
+       * on the toolbar, and is placed at the %s. Note the _ before the %s
+       * which is used to add mnemonics. We know that this is likely to
+       * produce duplicates, but don't worry about it. If your language
+       * normally has a mnemonic at the start, please use the _. If not,
+       * please remove. */
+      action_label = g_strdup_printf (_("Show “_%s”"), tmp);
+      g_free (tmp);
+      
+      sprintf(action_name, "ToolbarToggle%d", i);
+      
+      if (i >= priv->visibility_actions->len)
+        {
+	  action = gtk_toggle_action_new (action_name, action_label, NULL, NULL);
+	  g_ptr_array_add (priv->visibility_actions, action);
+	  g_signal_connect_object (action, "toggled",
+				   G_CALLBACK (toggled_visibility_cb),
+				   etoolbar, 0);
+	  gtk_action_group_add_action (priv->actions, GTK_ACTION (action));
+	}
+      else
+        {
+	  action = g_ptr_array_index (priv->visibility_actions, i);
+	  g_object_set (action, "label", action_label, NULL);
+        }
+
+      gtk_action_set_visible (GTK_ACTION (action), (egg_toolbars_model_get_flags (priv->model, i) 
+						    & EGG_TB_MODEL_NOT_REMOVABLE) == 0);
+      gtk_action_set_sensitive (GTK_ACTION (action), showing);
+      gtk_toggle_action_set_active (action, GTK_WIDGET_VISIBLE
+				    (get_dock_nth (etoolbar, i)));
+      
+      for (list = priv->visibility_paths; list != NULL; list = g_list_next (list))
+        {
+	  gtk_ui_manager_add_ui (priv->manager, priv->visibility_id,
+				 (const char *)list->data, action_name, action_name,
+				 GTK_UI_MANAGER_MENUITEM, FALSE);
+	}
+	    
+      g_free (action_label);
+    }
+  
+  gtk_ui_manager_ensure_update (priv->manager);
+  
+  while (i < priv->visibility_actions->len)
+    {
+      action = g_ptr_array_index (priv->visibility_actions, i);
+      g_ptr_array_remove_index_fast (priv->visibility_actions, i);
+      gtk_action_group_remove_action (priv->actions, GTK_ACTION (action));
+      i++;
+    }
+}
+
+static GtkWidget *
+create_dock (EggEditableToolbar *etoolbar)
+{
+  GtkWidget *toolbar, *hbox;
+
+  hbox = gtk_hbox_new (0, FALSE);
+
+  toolbar = gtk_toolbar_new ();
+  gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), TRUE);
+  gtk_widget_show (toolbar);
+  gtk_box_pack_start (GTK_BOX (hbox), toolbar, TRUE, TRUE, 0);
+
+  g_signal_connect (toolbar, "drag_drop",
+		    G_CALLBACK (toolbar_drag_drop_cb), etoolbar); 
+  g_signal_connect (toolbar, "drag_motion",
+		    G_CALLBACK (toolbar_drag_motion_cb), etoolbar);
+  g_signal_connect (toolbar, "drag_leave",
+		    G_CALLBACK (toolbar_drag_leave_cb), etoolbar);
+
+  g_signal_connect (toolbar, "drag_data_received",
+		    G_CALLBACK (toolbar_drag_data_received_cb), etoolbar);
+  g_signal_connect (toolbar, "popup_context_menu",
+		    G_CALLBACK (popup_context_menu_cb), etoolbar);
+
+  configure_drag_dest (etoolbar, GTK_TOOLBAR (toolbar));
+  
+  return hbox;
+}
+
+static void
+set_fixed_style (EggEditableToolbar *t, GtkToolbarStyle style)
+{
+  g_return_if_fail (GTK_IS_TOOLBAR (t->priv->fixed_toolbar));
+  gtk_toolbar_set_style (GTK_TOOLBAR (t->priv->fixed_toolbar),
+  			 style == GTK_TOOLBAR_ICONS ? GTK_TOOLBAR_BOTH_HORIZ : style);
+}
+
+static void
+unset_fixed_style (EggEditableToolbar *t)
+{
+  g_return_if_fail (GTK_IS_TOOLBAR (t->priv->fixed_toolbar));
+  gtk_toolbar_unset_style (GTK_TOOLBAR (t->priv->fixed_toolbar));
+}
+
+static void
+toolbar_changed_cb (EggToolbarsModel   *model,
+	            int                 position,
+	            EggEditableToolbar *etoolbar)
+{
+  GtkWidget *toolbar;
+  EggTbModelFlags flags;
+  GtkToolbarStyle style;
+
+  flags = egg_toolbars_model_get_flags (model, position);
+  toolbar = get_toolbar_nth (etoolbar, position);
+
+  if (flags & EGG_TB_MODEL_ICONS)
+  {
+    style = GTK_TOOLBAR_ICONS;
+  }
+  else if (flags & EGG_TB_MODEL_TEXT)
+  {
+    style = GTK_TOOLBAR_TEXT;
+  }
+  else if (flags & EGG_TB_MODEL_BOTH)
+  {
+    style = GTK_TOOLBAR_BOTH;
+  }
+  else if (flags & EGG_TB_MODEL_BOTH_HORIZ)
+  {
+    style = GTK_TOOLBAR_BOTH_HORIZ;
+  }
+  else
+  {
+    gtk_toolbar_unset_style (GTK_TOOLBAR (toolbar));
+    if (position == 0 && etoolbar->priv->fixed_toolbar)
+      {
+        unset_fixed_style (etoolbar);
+      }
+    return;
+  }
+
+  gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), style);
+  if (position == 0 && etoolbar->priv->fixed_toolbar)
+    {
+      set_fixed_style (etoolbar, style);
+    }
+
+  toolbar_visibility_refresh (etoolbar);
+}
+
+static void
+unparent_fixed (EggEditableToolbar *etoolbar)
+{
+  GtkWidget *toolbar, *dock;
+  g_return_if_fail (GTK_IS_TOOLBAR (etoolbar->priv->fixed_toolbar));
+
+  toolbar = etoolbar->priv->fixed_toolbar;
+  dock = get_dock_nth (etoolbar, 0);
+
+  if (dock && toolbar->parent != NULL)
+    {
+      gtk_container_remove (GTK_CONTAINER (dock), toolbar);
+    }
+}
+
+static void
+update_fixed (EggEditableToolbar *etoolbar)
+{
+  GtkWidget *toolbar, *dock;
+  if (!etoolbar->priv->fixed_toolbar) return;
+
+  toolbar = etoolbar->priv->fixed_toolbar;
+  dock = get_dock_nth (etoolbar, 0);
+
+  if (dock && toolbar && toolbar->parent == NULL)
+    {
+      gtk_box_pack_end (GTK_BOX (dock), toolbar, FALSE, TRUE, 0);
+
+      gtk_widget_show (toolbar);
+  
+      gtk_widget_set_size_request (dock, -1, -1);
+      gtk_widget_queue_resize_no_redraw (dock);
+    }
+}
+
+static void
+toolbar_added_cb (EggToolbarsModel   *model,
+	          int                 position,
+	          EggEditableToolbar *etoolbar)
+{
+  GtkWidget *dock;
+
+  dock = create_dock (etoolbar);
+  if ((egg_toolbars_model_get_flags (model, position) & EGG_TB_MODEL_HIDDEN) == 0)
+    gtk_widget_show (dock);
+
+  gtk_widget_set_size_request (dock, -1, MIN_TOOLBAR_HEIGHT);
+
+  gtk_box_pack_start (GTK_BOX (etoolbar), dock, TRUE, TRUE, 0);
+
+  gtk_box_reorder_child (GTK_BOX (etoolbar), dock, position);
+
+  gtk_widget_show_all (dock);
+  
+  update_fixed (etoolbar);
+
+  toolbar_visibility_refresh (etoolbar);
+}
+
+static void
+toolbar_removed_cb (EggToolbarsModel   *model,
+	            int                 position,
+	            EggEditableToolbar *etoolbar)
+{
+  GtkWidget *dock;
+
+  if (position == 0 && etoolbar->priv->fixed_toolbar != NULL)
+    {
+      unparent_fixed (etoolbar);
+    }
+
+  dock = get_dock_nth (etoolbar, position);
+  gtk_widget_destroy (dock);
+
+  update_fixed (etoolbar);
+  
+  toolbar_visibility_refresh (etoolbar);
+}
+
+static void
+item_added_cb (EggToolbarsModel   *model,
+	       int                 tpos,
+	       int                 ipos,
+	       EggEditableToolbar *etoolbar)
+{
+  GtkWidget *dock;
+  GtkWidget *toolbar;
+  GtkToolItem *item;
+
+  toolbar = get_toolbar_nth (etoolbar, tpos);
+  item = create_item_from_position (etoolbar, tpos, ipos);
+  if (item == NULL) return;
+    
+  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, ipos);
+  
+  connect_widget_signals (GTK_WIDGET (item), etoolbar);
+  configure_item_tooltip (item);
+  configure_item_cursor (item, etoolbar);
+  configure_item_sensitivity (item, etoolbar);
+  
+  dock = get_dock_nth (etoolbar, tpos);
+  gtk_widget_set_size_request (dock, -1, -1);
+  gtk_widget_queue_resize_no_redraw (dock);
+
+  toolbar_visibility_refresh (etoolbar);
+}
+
+static void
+item_removed_cb (EggToolbarsModel   *model,
+	         int                 toolbar_position,
+	         int                 position,
+	         EggEditableToolbar *etoolbar)
+{
+  EggEditableToolbarPrivate *priv = etoolbar->priv;
+  
+  GtkWidget *toolbar;
+  GtkWidget *item;
+
+  toolbar = get_toolbar_nth (etoolbar, toolbar_position);
+  item = GTK_WIDGET (gtk_toolbar_get_nth_item
+	(GTK_TOOLBAR (toolbar), position));
+  g_return_if_fail (item != NULL);
+
+  if (item == priv->selected)
+    {
+      /* FIXME */
+    }
+
+  gtk_container_remove (GTK_CONTAINER (toolbar), item);
+
+  toolbar_visibility_refresh (etoolbar);
+}
+
+static void
+egg_editable_toolbar_build (EggEditableToolbar *etoolbar)
+{
+  int i, l, n_items, n_toolbars;
+  EggToolbarsModel *model = etoolbar->priv->model;
+
+  g_return_if_fail (model != NULL);
+  g_return_if_fail (etoolbar->priv->manager != NULL);
+
+  n_toolbars = egg_toolbars_model_n_toolbars (model);
+
+  for (i = 0; i < n_toolbars; i++)
+    {
+      GtkWidget *toolbar, *dock;
+
+      dock = create_dock (etoolbar);
+      if ((egg_toolbars_model_get_flags (model, i) & EGG_TB_MODEL_HIDDEN) == 0)
+        gtk_widget_show (dock);
+      gtk_box_pack_start (GTK_BOX (etoolbar), dock, TRUE, TRUE, 0);
+      toolbar = get_toolbar_nth (etoolbar, i);
+
+      n_items = egg_toolbars_model_n_items (model, i);
+      for (l = 0; l < n_items; l++)
+        {
+          GtkToolItem *item;
+
+          item = create_item_from_position (etoolbar, i, l);
+          if (item)
+            {
+	      gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, l);
+              
+              connect_widget_signals (GTK_WIDGET (item), etoolbar);
+	      configure_item_tooltip (item);
+              configure_item_sensitivity (item, etoolbar);
+            }
+          else
+            {
+              egg_toolbars_model_remove_item (model, i, l);
+              l--;
+              n_items--;
+            }
+        }
+
+      if (n_items == 0)
+        {
+            gtk_widget_set_size_request (dock, -1, MIN_TOOLBAR_HEIGHT);
+        }
+    }
+
+  update_fixed (etoolbar);
+
+  /* apply styles */
+  for (i = 0; i < n_toolbars; i ++)
+    {
+      toolbar_changed_cb (model, i, etoolbar);
+    }
+}
+
+static void
+egg_editable_toolbar_disconnect_model (EggEditableToolbar *toolbar)
+{
+  EggToolbarsModel *model = toolbar->priv->model;
+
+  g_signal_handlers_disconnect_by_func
+    (model, G_CALLBACK (item_added_cb), toolbar);
+  g_signal_handlers_disconnect_by_func
+    (model, G_CALLBACK (item_removed_cb), toolbar);
+  g_signal_handlers_disconnect_by_func
+    (model, G_CALLBACK (toolbar_added_cb), toolbar);
+  g_signal_handlers_disconnect_by_func
+    (model, G_CALLBACK (toolbar_removed_cb), toolbar);
+  g_signal_handlers_disconnect_by_func
+    (model, G_CALLBACK (toolbar_changed_cb), toolbar);
+}
+
+static void
+egg_editable_toolbar_deconstruct (EggEditableToolbar *toolbar)
+{
+  EggToolbarsModel *model = toolbar->priv->model;
+  GList *children;
+
+  g_return_if_fail (model != NULL);
+
+  if (toolbar->priv->fixed_toolbar)
+    {
+       unset_fixed_style (toolbar);
+       unparent_fixed (toolbar);
+    }
+
+  children = gtk_container_get_children (GTK_CONTAINER (toolbar));
+  g_list_foreach (children, (GFunc) gtk_widget_destroy, NULL);
+  g_list_free (children);
+}
+
+void
+egg_editable_toolbar_set_model (EggEditableToolbar *etoolbar,
+				EggToolbarsModel   *model)
+{
+  EggEditableToolbarPrivate *priv = etoolbar->priv;
+
+  if (priv->model == model) return;
+
+  if (priv->model)
+    {
+      egg_editable_toolbar_disconnect_model (etoolbar);
+      egg_editable_toolbar_deconstruct (etoolbar);
+
+      g_object_unref (priv->model);
+    }
+
+  priv->model = g_object_ref (model);
+
+  egg_editable_toolbar_build (etoolbar);
+
+  toolbar_visibility_refresh (etoolbar);
+
+  g_signal_connect (model, "item_added",
+		    G_CALLBACK (item_added_cb), etoolbar);
+  g_signal_connect (model, "item_removed",
+		    G_CALLBACK (item_removed_cb), etoolbar);
+  g_signal_connect (model, "toolbar_added",
+		    G_CALLBACK (toolbar_added_cb), etoolbar);
+  g_signal_connect (model, "toolbar_removed",
+		    G_CALLBACK (toolbar_removed_cb), etoolbar);
+  g_signal_connect (model, "toolbar_changed",
+		    G_CALLBACK (toolbar_changed_cb), etoolbar);
+}
+
+static void
+egg_editable_toolbar_init (EggEditableToolbar *etoolbar)
+{
+  EggEditableToolbarPrivate *priv;
+
+  priv = etoolbar->priv = EGG_EDITABLE_TOOLBAR_GET_PRIVATE (etoolbar);
+
+  priv->save_hidden = TRUE;
+  
+  g_signal_connect (etoolbar, "notify::visible",
+		    G_CALLBACK (toolbar_visibility_refresh), NULL);
+}
+
+static void
+egg_editable_toolbar_dispose (GObject *object)
+{
+  EggEditableToolbar *etoolbar = EGG_EDITABLE_TOOLBAR (object);
+  EggEditableToolbarPrivate *priv = etoolbar->priv;
+  GList *children;
+
+  if (priv->fixed_toolbar != NULL)
+    {
+      g_object_unref (priv->fixed_toolbar);
+      priv->fixed_toolbar = NULL;
+    }
+
+  if (priv->visibility_paths)
+    {
+      children = priv->visibility_paths;
+      g_list_foreach (children, (GFunc) g_free, NULL);
+      g_list_free (children);
+      priv->visibility_paths = NULL;
+    }
+
+  g_free (priv->popup_path);
+  priv->popup_path = NULL;
+
+  if (priv->manager != NULL)
+    {
+      if (priv->visibility_id)
+        {
+	  gtk_ui_manager_remove_ui (priv->manager, priv->visibility_id);
+	  priv->visibility_id = 0;
+	}
+
+      g_object_unref (priv->manager);
+      priv->manager = NULL;
+    }
+
+  if (priv->model)
+    {
+      egg_editable_toolbar_disconnect_model (etoolbar);
+      g_object_unref (priv->model);
+      priv->model = NULL;
+    }
+
+  G_OBJECT_CLASS (egg_editable_toolbar_parent_class)->dispose (object);
+}
+
+static void
+egg_editable_toolbar_set_ui_manager (EggEditableToolbar *etoolbar,
+				     GtkUIManager       *manager)
+{
+  static const GtkActionEntry actions[] = {
+    { "MoveToolItem", STOCK_DRAG_MODE, N_("_Move on Toolbar"), NULL,
+      N_("Move the selected item on the toolbar"), G_CALLBACK (move_item_cb) },
+    { "RemoveToolItem", GTK_STOCK_REMOVE, N_("_Remove from Toolbar"), NULL,
+      N_("Remove the selected item from the toolbar"), G_CALLBACK (remove_item_cb) },
+    { "RemoveToolbar", GTK_STOCK_DELETE, N_("_Delete Toolbar"), NULL,
+      N_("Remove the selected toolbar"), G_CALLBACK (remove_toolbar_cb) },
+  };
+  
+  etoolbar->priv->manager = g_object_ref (manager);
+
+  etoolbar->priv->actions = gtk_action_group_new ("ToolbarActions");
+  gtk_action_group_set_translation_domain (etoolbar->priv->actions, GETTEXT_PACKAGE);
+  gtk_action_group_add_actions (etoolbar->priv->actions, actions,
+		 		G_N_ELEMENTS (actions), etoolbar);
+  gtk_ui_manager_insert_action_group (manager, etoolbar->priv->actions, -1);
+  g_object_unref (etoolbar->priv->actions);
+
+  toolbar_visibility_refresh (etoolbar);
+}
+
+GtkWidget * egg_editable_toolbar_get_selected (EggEditableToolbar   *etoolbar)
+{
+  return etoolbar->priv->selected;
+}
+
+void
+egg_editable_toolbar_set_selected (EggEditableToolbar *etoolbar,
+				   GtkWidget          *widget)
+{
+  GtkWidget *toolbar, *toolitem;
+  gboolean editable;
+
+  etoolbar->priv->selected = widget;
+  
+  toolbar = (widget != NULL) ? gtk_widget_get_ancestor (widget, GTK_TYPE_TOOLBAR) : NULL;
+  toolitem = (widget != NULL) ? gtk_widget_get_ancestor (widget, GTK_TYPE_TOOL_ITEM) : NULL;
+  
+  if(toolbar != NULL)
+    {
+      gint tpos = get_toolbar_position (etoolbar, toolbar);
+      editable = ((egg_toolbars_model_get_flags (etoolbar->priv->model, tpos) & EGG_TB_MODEL_NOT_EDITABLE) == 0);
+    }
+  else
+    {
+      editable = FALSE;
+    }
+  
+  gtk_action_set_visible (find_action (etoolbar, "RemoveToolbar"), (toolbar != NULL) && (etoolbar->priv->edit_mode > 0));
+  gtk_action_set_visible (find_action (etoolbar, "RemoveToolItem"), (toolitem != NULL) && editable);
+  gtk_action_set_visible (find_action (etoolbar, "MoveToolItem"), (toolitem != NULL) && editable);
+}
+
+static void
+set_edit_mode (EggEditableToolbar *etoolbar,
+	       gboolean mode)
+{
+  EggEditableToolbarPrivate *priv = etoolbar->priv;
+  int i, l, n_items;
+
+  i = priv->edit_mode;
+  if (mode)
+    {
+      priv->edit_mode++;
+    }
+  else
+    {
+      g_return_if_fail (priv->edit_mode > 0);
+      priv->edit_mode--;
+    }
+  i *= priv->edit_mode;
+  
+  if (i == 0)
+    {
+      for (i = get_n_toolbars (etoolbar)-1; i >= 0; i--)
+        {
+          GtkWidget *toolbar;
+          
+          toolbar = get_toolbar_nth (etoolbar, i);
+          n_items = gtk_toolbar_get_n_items (GTK_TOOLBAR (toolbar));
+
+          if (n_items == 0 && priv->edit_mode == 0)
+            {
+              egg_toolbars_model_remove_toolbar (priv->model, i);
+            }
+          else
+            {          
+              for (l = 0; l < n_items; l++)
+                {
+                  GtkToolItem *item;
+              
+                  item = gtk_toolbar_get_nth_item (GTK_TOOLBAR (toolbar), l);
+                  
+                  configure_item_cursor (item, etoolbar);
+                  configure_item_sensitivity (item, etoolbar);
+                }
+            }
+        }
+    }
+}
+
+static void
+egg_editable_toolbar_set_property (GObject      *object,
+				   guint         prop_id,
+				   const GValue *value,
+				   GParamSpec   *pspec)
+{
+  EggEditableToolbar *etoolbar = EGG_EDITABLE_TOOLBAR (object);
+
+  switch (prop_id)
+    {
+    case PROP_UI_MANAGER:
+      egg_editable_toolbar_set_ui_manager (etoolbar, g_value_get_object (value));
+      break;
+    case PROP_TOOLBARS_MODEL:
+      egg_editable_toolbar_set_model (etoolbar, g_value_get_object (value));
+      break;
+    case PROP_SELECTED:
+      egg_editable_toolbar_set_selected (etoolbar, g_value_get_object (value));
+      break;
+    case PROP_POPUP_PATH:
+      etoolbar->priv->popup_path = g_strdup (g_value_get_string (value));
+      break;
+    case PROP_EDIT_MODE:
+      set_edit_mode (etoolbar, g_value_get_boolean (value));
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+static void
+egg_editable_toolbar_get_property (GObject    *object,
+				   guint       prop_id,
+				   GValue     *value,
+				   GParamSpec *pspec)
+{
+  EggEditableToolbar *etoolbar = EGG_EDITABLE_TOOLBAR (object);
+
+  switch (prop_id)
+    {
+    case PROP_UI_MANAGER:
+      g_value_set_object (value, etoolbar->priv->manager);
+      break;
+    case PROP_TOOLBARS_MODEL:
+      g_value_set_object (value, etoolbar->priv->model);
+      break;
+    case PROP_SELECTED:
+      g_value_set_object (value, etoolbar->priv->selected);
+      break;
+    case PROP_EDIT_MODE:
+      g_value_set_boolean (value, etoolbar->priv->edit_mode>0);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+static void
+egg_editable_toolbar_class_init (EggEditableToolbarClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->dispose = egg_editable_toolbar_dispose;
+  object_class->set_property = egg_editable_toolbar_set_property;
+  object_class->get_property = egg_editable_toolbar_get_property;
+
+  egg_editable_toolbar_signals[ACTION_REQUEST] =
+    g_signal_new ("action_request",
+		  G_OBJECT_CLASS_TYPE (object_class),
+		  G_SIGNAL_RUN_LAST,
+		  G_STRUCT_OFFSET (EggEditableToolbarClass, action_request),
+		  NULL, NULL, g_cclosure_marshal_VOID__STRING,
+		  G_TYPE_NONE, 1, G_TYPE_STRING);
+
+  g_object_class_install_property (object_class,
+				   PROP_UI_MANAGER,
+				   g_param_spec_object ("ui-manager",
+							"UI-Mmanager",
+							"UI Manager",
+							GTK_TYPE_UI_MANAGER,
+							G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+  g_object_class_install_property (object_class,
+				   PROP_TOOLBARS_MODEL,
+				   g_param_spec_object ("model",
+							"Model",
+							"Toolbars Model",
+							EGG_TYPE_TOOLBARS_MODEL,
+							G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+  g_object_class_install_property (object_class,
+				   PROP_SELECTED,
+				   g_param_spec_object ("selected",
+							"Selected",
+							"Selected toolitem",
+							GTK_TYPE_TOOL_ITEM,
+							G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+
+  g_object_class_install_property (object_class,
+				   PROP_POPUP_PATH,
+				   g_param_spec_string ("popup-path",
+							"popup-path",
+							"popup-path",
+							NULL,
+							G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+
+  g_object_class_install_property (object_class,
+				   PROP_EDIT_MODE,
+				   g_param_spec_boolean ("edit-mode",
+							 "Edit-Mode",
+							 "Edit Mode",
+							 FALSE,
+							 G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+
+  g_type_class_add_private (object_class, sizeof (EggEditableToolbarPrivate));
+}
+
+GtkWidget *
+egg_editable_toolbar_new (GtkUIManager *manager,
+                          const char *popup_path)
+{
+    return GTK_WIDGET (g_object_new (EGG_TYPE_EDITABLE_TOOLBAR,
+                                     "ui-manager", manager,
+                                     "popup-path", popup_path,
+                                     NULL));
+}
+
+GtkWidget *
+egg_editable_toolbar_new_with_model (GtkUIManager *manager,
+ 				     EggToolbarsModel *model,
+                                     const char *popup_path)
+{
+  return GTK_WIDGET (g_object_new (EGG_TYPE_EDITABLE_TOOLBAR,
+                                   "ui-manager", manager,
+                                   "model", model,
+                                   "popup-path", popup_path,
+				   NULL));
+}
+
+gboolean
+egg_editable_toolbar_get_edit_mode (EggEditableToolbar *etoolbar)
+{
+  EggEditableToolbarPrivate *priv = etoolbar->priv;
+
+  return priv->edit_mode > 0;
+}
+
+void
+egg_editable_toolbar_set_edit_mode (EggEditableToolbar *etoolbar,
+				    gboolean mode)
+{
+  set_edit_mode (etoolbar, mode);
+  g_object_notify (G_OBJECT (etoolbar), "edit-mode");
+}
+
+void
+egg_editable_toolbar_add_visibility (EggEditableToolbar *etoolbar,
+				     const char *path)
+{
+  etoolbar->priv->visibility_paths = g_list_prepend
+	  (etoolbar->priv->visibility_paths, g_strdup (path));
+}
+
+void
+egg_editable_toolbar_show (EggEditableToolbar *etoolbar,
+			   const char *name)
+{
+  EggEditableToolbarPrivate *priv = etoolbar->priv;
+  EggToolbarsModel *model = priv->model;
+  int i, n_toolbars;
+
+  n_toolbars = egg_toolbars_model_n_toolbars (model);
+  for (i = 0; i < n_toolbars; i++)
+    {
+      const char *toolbar_name;
+
+      toolbar_name = egg_toolbars_model_toolbar_nth (model, i);
+      if (strcmp (toolbar_name, name) == 0)
+        {
+          gtk_widget_show (get_dock_nth (etoolbar, i));
+        }
+    }
+}
+
+void
+egg_editable_toolbar_hide (EggEditableToolbar *etoolbar,
+			   const char *name)
+{
+  EggEditableToolbarPrivate *priv = etoolbar->priv;
+  EggToolbarsModel *model = priv->model;
+  int i, n_toolbars;
+
+  n_toolbars = egg_toolbars_model_n_toolbars (model);
+  for (i = 0; i < n_toolbars; i++)
+    {
+      const char *toolbar_name;
+
+      toolbar_name = egg_toolbars_model_toolbar_nth (model, i);
+      if (strcmp (toolbar_name, name) == 0)
+      {
+        gtk_widget_hide (get_dock_nth (etoolbar, i));
+      }
+    }
+}
+
+void
+egg_editable_toolbar_set_fixed (EggEditableToolbar *etoolbar,
+				GtkToolbar *toolbar)
+{
+  EggEditableToolbarPrivate *priv = etoolbar->priv;
+
+  g_return_if_fail (!toolbar || GTK_IS_TOOLBAR (toolbar));
+
+  if (priv->fixed_toolbar)
+    {
+      unparent_fixed (etoolbar);
+      g_object_unref (priv->fixed_toolbar);
+      priv->fixed_toolbar = NULL;
+    }
+
+  if (toolbar)
+    {
+      priv->fixed_toolbar = GTK_WIDGET (toolbar);
+      gtk_toolbar_set_show_arrow (toolbar, FALSE);
+      g_object_ref_sink (toolbar);
+    }
+
+  update_fixed (etoolbar);
+}
+
+#define DEFAULT_ICON_HEIGHT 20
+#define DEFAULT_ICON_WIDTH 0
+
+static void
+fake_expose_widget (GtkWidget *widget,
+		    GdkPixmap *pixmap)
+{
+  GdkWindow *tmp_window;
+  GdkEventExpose event;
+
+  event.type = GDK_EXPOSE;
+  event.window = pixmap;
+  event.send_event = FALSE;
+  event.area = widget->allocation;
+  event.region = NULL;
+  event.count = 0;
+
+  tmp_window = widget->window;
+  widget->window = pixmap;
+  gtk_widget_send_expose (widget, (GdkEvent *) &event);
+  widget->window = tmp_window;
+}
+
+/* We should probably experiment some more with this.
+ * Right now the rendered icon is pretty good for most
+ * themes. However, the icon is slightly large for themes
+ * with large toolbar icons.
+ */
+static GdkPixbuf *
+new_pixbuf_from_widget (GtkWidget *widget)
+{
+  GtkWidget *window;
+  GdkPixbuf *pixbuf;
+  GtkRequisition requisition;
+  GtkAllocation allocation;
+  GdkPixmap *pixmap;
+  GdkVisual *visual;
+  gint icon_width;
+  gint icon_height;
+  GdkScreen *screen;
+
+  icon_width = DEFAULT_ICON_WIDTH;
+
+  screen = gtk_widget_get_screen (widget);
+
+  if (!gtk_icon_size_lookup_for_settings (gtk_settings_get_for_screen (screen),
+					  GTK_ICON_SIZE_LARGE_TOOLBAR,
+					  NULL, 
+					  &icon_height))
+    {
+      icon_height = DEFAULT_ICON_HEIGHT;
+    }
+
+  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  
+  gtk_container_add (GTK_CONTAINER (window), widget);
+  gtk_widget_realize (window);
+  gtk_widget_show (widget);
+  gtk_widget_realize (widget);
+  gtk_widget_map (widget);
+
+  /* Gtk will never set the width or height of a window to 0. So setting the width to
+   * 0 and than getting it will provide us with the minimum width needed to render
+   * the icon correctly, without any additional window background noise.
+   * This is needed mostly for pixmap based themes.
+   */
+  gtk_window_set_default_size (GTK_WINDOW (window), icon_width, icon_height);
+  gtk_window_get_size (GTK_WINDOW (window),&icon_width, &icon_height);
+
+  gtk_widget_size_request (window, &requisition);
+  allocation.x = 0;
+  allocation.y = 0;
+  allocation.width = icon_width;
+  allocation.height = icon_height;
+  gtk_widget_size_allocate (window, &allocation);
+  gtk_widget_size_request (window, &requisition);
+  
+  /* Create a pixmap */
+  visual = gtk_widget_get_visual (window);
+  pixmap = gdk_pixmap_new (NULL, icon_width, icon_height, visual->depth);
+  gdk_drawable_set_colormap (GDK_DRAWABLE (pixmap), gtk_widget_get_colormap (window));
+
+  /* Draw the window */
+  gtk_widget_ensure_style (window);
+  g_assert (window->style);
+  g_assert (window->style->font_desc);
+  
+  fake_expose_widget (window, pixmap);
+  fake_expose_widget (widget, pixmap);
+  
+  pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, icon_width, icon_height);
+  gdk_pixbuf_get_from_drawable (pixbuf, pixmap, NULL, 0, 0, 0, 0, icon_width, icon_height);
+
+  gtk_widget_destroy (window);
+
+  return pixbuf;
+}
+
+static GdkPixbuf *
+new_separator_pixbuf (void)
+{
+  GtkWidget *separator;
+  GdkPixbuf *pixbuf;
+
+  separator = gtk_vseparator_new ();
+  pixbuf = new_pixbuf_from_widget (separator);
+  return pixbuf;
+}
+
+static void
+update_separator_image (GtkImage *image)
+{
+  GdkPixbuf *pixbuf = new_separator_pixbuf ();
+  gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf);
+  g_object_unref (pixbuf);
+}
+
+static gboolean
+style_set_cb (GtkWidget *widget,
+              GtkStyle *previous_style,
+              GtkImage *image)
+{
+
+  update_separator_image (image);
+  return FALSE;
+}
+
+GtkWidget *
+_egg_editable_toolbar_new_separator_image (void)
+{
+  GtkWidget *image = gtk_image_new ();
+  update_separator_image (GTK_IMAGE (image));
+  g_signal_connect (G_OBJECT (image), "style_set",
+		    G_CALLBACK (style_set_cb), GTK_IMAGE (image));
+
+  return image;
+}
+
+EggToolbarsModel *
+egg_editable_toolbar_get_model (EggEditableToolbar *etoolbar)
+{
+  return etoolbar->priv->model;
+}
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/egg-editable-toolbar.h nautilus-2.26.2/cut-n-paste-code/toolbar-editor/egg-editable-toolbar.h
--- nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/egg-editable-toolbar.h	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/cut-n-paste-code/toolbar-editor/egg-editable-toolbar.h	2009-04-15 22:10:58.000000000 +0200
@@ -0,0 +1,91 @@
+/*
+ *  Copyright (C) 2003, 2004  Marco Pesenti Gritti
+ *  Copyright (C) 2003, 2004, 2005  Christian Persch
+ *
+ *  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, 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.
+ *
+ *  $Id: egg-editable-toolbar.h 3240 2008-10-27 12:17:08Z chpe $
+ */
+
+#ifndef EGG_EDITABLE_TOOLBAR_H
+#define EGG_EDITABLE_TOOLBAR_H
+
+#include "egg-toolbars-model.h"
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define EGG_TYPE_EDITABLE_TOOLBAR             (egg_editable_toolbar_get_type ())
+#define EGG_EDITABLE_TOOLBAR(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbar))
+#define EGG_EDITABLE_TOOLBAR_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarClass))
+#define EGG_IS_EDITABLE_TOOLBAR(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_EDITABLE_TOOLBAR))
+#define EGG_IS_EDITABLE_TOOLBAR_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_EDITABLE_TOOLBAR))
+#define EGG_EDITABLE_TOOLBAR_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarClass))
+
+typedef struct _EggEditableToolbar        EggEditableToolbar;
+typedef struct _EggEditableToolbarPrivate EggEditableToolbarPrivate;
+typedef struct _EggEditableToolbarClass   EggEditableToolbarClass;
+
+struct _EggEditableToolbar
+{
+  GtkVBox parent_object;
+
+  /*< private >*/
+  EggEditableToolbarPrivate *priv;
+};
+
+struct _EggEditableToolbarClass
+{
+  GtkVBoxClass parent_class;
+
+  void (* action_request) (EggEditableToolbar *etoolbar,
+			   const char *action_name);
+};
+
+GType               egg_editable_toolbar_get_type        (void);
+GtkWidget	   *egg_editable_toolbar_new		 (GtkUIManager         *manager,
+							  const char           *visibility_path);
+GtkWidget	   *egg_editable_toolbar_new_with_model	 (GtkUIManager         *manager,
+							  EggToolbarsModel     *model,
+							  const char           *visibility_path);
+void		    egg_editable_toolbar_set_model       (EggEditableToolbar   *etoolbar,
+							  EggToolbarsModel     *model);
+EggToolbarsModel   *egg_editable_toolbar_get_model       (EggEditableToolbar   *etoolbar);
+GtkUIManager       *egg_editable_toolbar_get_manager     (EggEditableToolbar   *etoolbar);
+void		    egg_editable_toolbar_set_edit_mode	 (EggEditableToolbar   *etoolbar,
+							  gboolean              mode);
+gboolean	    egg_editable_toolbar_get_edit_mode	 (EggEditableToolbar   *etoolbar);
+void		    egg_editable_toolbar_show		 (EggEditableToolbar   *etoolbar,
+							  const char           *name);
+void		    egg_editable_toolbar_hide		 (EggEditableToolbar   *etoolbar,
+							  const char           *name);
+void		    egg_editable_toolbar_set_fixed       (EggEditableToolbar   *etoolbar,
+							  GtkToolbar           *fixed_toolbar);
+
+GtkWidget *         egg_editable_toolbar_get_selected    (EggEditableToolbar   *etoolbar);
+void                egg_editable_toolbar_set_selected    (EggEditableToolbar   *etoolbar,
+							  GtkWidget            *widget);
+
+void              egg_editable_toolbar_add_visibility    (EggEditableToolbar   *etoolbar,
+							  const char           *path);
+
+/* Private Functions */
+
+GtkWidget 	   *_egg_editable_toolbar_new_separator_image (void);
+
+G_END_DECLS
+
+#endif
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/egg-toolbar-editor.c nautilus-2.26.2/cut-n-paste-code/toolbar-editor/egg-toolbar-editor.c
--- nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/egg-toolbar-editor.c	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/cut-n-paste-code/toolbar-editor/egg-toolbar-editor.c	2009-04-15 22:10:58.000000000 +0200
@@ -0,0 +1,671 @@
+/*
+ *  Copyright (C) 2003 Marco Pesenti Gritti
+ *
+ *  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, 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.
+ *
+ *  $Id: egg-toolbar-editor.c 3377 2009-01-23 23:32:40Z nshmyrev $
+ */
+
+#include "config.h"
+
+#include "egg-toolbar-editor.h"
+#include "egg-editable-toolbar.h"
+
+#include <string.h>
+#include <libxml/tree.h>
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
+
+static const GtkTargetEntry dest_drag_types[] = {
+  {EGG_TOOLBAR_ITEM_TYPE, GTK_TARGET_SAME_APP, 0},
+};
+
+static const GtkTargetEntry source_drag_types[] = {
+  {EGG_TOOLBAR_ITEM_TYPE, GTK_TARGET_SAME_APP, 0},
+};
+
+
+static void egg_toolbar_editor_finalize         (GObject *object);
+static void update_editor_sheet                 (EggToolbarEditor *editor);
+
+enum
+{
+  PROP_0,
+  PROP_UI_MANAGER,
+  PROP_TOOLBARS_MODEL
+};
+
+enum
+{
+  SIGNAL_HANDLER_ITEM_ADDED,
+  SIGNAL_HANDLER_ITEM_REMOVED,
+  SIGNAL_HANDLER_TOOLBAR_REMOVED,
+  SIGNAL_HANDLER_LIST_SIZE  /* Array size */
+};
+
+#define EGG_TOOLBAR_EDITOR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EGG_TYPE_TOOLBAR_EDITOR, EggToolbarEditorPrivate))
+
+struct EggToolbarEditorPrivate
+{
+  GtkUIManager *manager;
+  EggToolbarsModel *model;
+
+  GtkWidget *table;
+  GtkWidget *scrolled_window;
+  GList     *actions_list;
+  GList     *factory_list;
+
+  /* These handlers need to be sanely disconnected when switching models */
+  gulong     sig_handlers[SIGNAL_HANDLER_LIST_SIZE];
+};
+
+G_DEFINE_TYPE (EggToolbarEditor, egg_toolbar_editor, GTK_TYPE_VBOX);
+
+static gint
+compare_items (gconstpointer a,
+               gconstpointer b)
+{
+  const GtkWidget *item1 = a;
+  const GtkWidget *item2 = b;
+
+  char *key1 = g_object_get_data (G_OBJECT (item1),
+                                  "egg-collate-key");
+  char *key2 = g_object_get_data (G_OBJECT (item2),
+                                  "egg-collate-key");
+  
+  return strcmp (key1, key2);
+}
+
+static GtkAction *
+find_action (EggToolbarEditor *t,
+	     const char       *name)
+{
+  GList *l;
+  GtkAction *action = NULL;
+
+  l = gtk_ui_manager_get_action_groups (t->priv->manager);
+
+  g_return_val_if_fail (EGG_IS_TOOLBAR_EDITOR (t), NULL);
+  g_return_val_if_fail (name != NULL, NULL);
+
+  for (; l != NULL; l = l->next)
+    {
+      GtkAction *tmp;
+
+      tmp = gtk_action_group_get_action (GTK_ACTION_GROUP (l->data), name);
+      if (tmp)
+	action = tmp;
+    }
+
+  return action;
+}
+
+static void
+egg_toolbar_editor_set_ui_manager (EggToolbarEditor *t,
+				   GtkUIManager     *manager)
+{
+  g_return_if_fail (GTK_IS_UI_MANAGER (manager));
+
+  t->priv->manager = g_object_ref (manager);
+}
+
+static void
+item_added_or_removed_cb (EggToolbarsModel   *model,
+                          int                 tpos,
+                          int                 ipos,
+                          EggToolbarEditor   *editor)
+{
+  update_editor_sheet (editor);
+}
+
+static void
+toolbar_removed_cb (EggToolbarsModel   *model,
+	            int                 position,
+	            EggToolbarEditor   *editor)
+{
+  update_editor_sheet (editor);
+}
+
+static void
+egg_toolbar_editor_disconnect_model (EggToolbarEditor *t)
+{
+  EggToolbarEditorPrivate *priv = t->priv;
+  EggToolbarsModel *model = priv->model;
+  gulong handler;
+  int i;
+
+  for (i = 0; i < SIGNAL_HANDLER_LIST_SIZE; i++)
+    {
+      handler = priv->sig_handlers[i];
+
+      if (handler != 0)
+        {
+	  if (g_signal_handler_is_connected (model, handler))
+	    {
+	      g_signal_handler_disconnect (model, handler);
+	    }
+
+	  priv->sig_handlers[i] = 0;
+        }
+    }
+}
+
+void
+egg_toolbar_editor_set_model (EggToolbarEditor *t,
+			      EggToolbarsModel *model)
+{
+  EggToolbarEditorPrivate *priv;
+
+  g_return_if_fail (EGG_IS_TOOLBAR_EDITOR (t));
+  g_return_if_fail (model != NULL);
+
+  priv = t->priv;
+
+  if (priv->model)
+    {
+      if (G_UNLIKELY (priv->model == model)) return;
+
+      egg_toolbar_editor_disconnect_model (t);
+      g_object_unref (priv->model); 
+    }
+
+  priv->model = g_object_ref (model);
+
+  update_editor_sheet (t);
+  
+  priv->sig_handlers[SIGNAL_HANDLER_ITEM_ADDED] = 
+    g_signal_connect_object (model, "item_added",
+			     G_CALLBACK (item_added_or_removed_cb), t, 0);
+  priv->sig_handlers[SIGNAL_HANDLER_ITEM_REMOVED] =
+    g_signal_connect_object (model, "item_removed",
+			     G_CALLBACK (item_added_or_removed_cb), t, 0);
+  priv->sig_handlers[SIGNAL_HANDLER_TOOLBAR_REMOVED] =
+    g_signal_connect_object (model, "toolbar_removed",
+			     G_CALLBACK (toolbar_removed_cb), t, 0);
+}
+
+static void
+egg_toolbar_editor_set_property (GObject      *object,
+				 guint         prop_id,
+				 const GValue *value,
+				 GParamSpec   *pspec)
+{
+  EggToolbarEditor *t = EGG_TOOLBAR_EDITOR (object);
+
+  switch (prop_id)
+    {
+    case PROP_UI_MANAGER:
+      egg_toolbar_editor_set_ui_manager (t, g_value_get_object (value));
+      break;
+    case PROP_TOOLBARS_MODEL:
+      egg_toolbar_editor_set_model (t, g_value_get_object (value));
+      break;
+    }
+}
+
+static void
+egg_toolbar_editor_get_property (GObject    *object,
+				 guint       prop_id,
+				 GValue     *value,
+				 GParamSpec *pspec)
+{
+  EggToolbarEditor *t = EGG_TOOLBAR_EDITOR (object);
+
+  switch (prop_id)
+    {
+    case PROP_UI_MANAGER:
+      g_value_set_object (value, t->priv->manager);
+      break;
+    case PROP_TOOLBARS_MODEL:
+      g_value_set_object (value, t->priv->model);
+      break;
+    }
+}
+
+static void
+egg_toolbar_editor_class_init (EggToolbarEditorClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->finalize = egg_toolbar_editor_finalize;
+  object_class->set_property = egg_toolbar_editor_set_property;
+  object_class->get_property = egg_toolbar_editor_get_property;
+
+  g_object_class_install_property (object_class,
+				   PROP_UI_MANAGER,
+				   g_param_spec_object ("ui-manager",
+							"UI-Manager",
+							"UI Manager",
+							GTK_TYPE_UI_MANAGER,
+							G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB |
+							G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (object_class,
+				  PROP_TOOLBARS_MODEL,
+				  g_param_spec_object ("model",
+						       "Model",
+						       "Toolbars Model",
+						       EGG_TYPE_TOOLBARS_MODEL,
+						       G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB |
+						       G_PARAM_CONSTRUCT));
+
+  g_type_class_add_private (object_class, sizeof (EggToolbarEditorPrivate));
+}
+
+static void
+egg_toolbar_editor_finalize (GObject *object)
+{
+  EggToolbarEditor *editor = EGG_TOOLBAR_EDITOR (object);
+
+  if (editor->priv->manager)
+    {
+      g_object_unref (editor->priv->manager);
+    }
+
+  if (editor->priv->model)
+    {
+      egg_toolbar_editor_disconnect_model (editor);
+      g_object_unref (editor->priv->model);
+    }
+
+  g_list_free (editor->priv->actions_list);
+  g_list_free (editor->priv->factory_list);
+
+  G_OBJECT_CLASS (egg_toolbar_editor_parent_class)->finalize (object);
+}
+
+GtkWidget *
+egg_toolbar_editor_new (GtkUIManager *manager,
+			EggToolbarsModel *model)
+{
+  return GTK_WIDGET (g_object_new (EGG_TYPE_TOOLBAR_EDITOR,
+				   "ui-manager", manager,
+				   "model", model,
+				   NULL));
+}
+
+static void
+drag_begin_cb (GtkWidget          *widget,
+	       GdkDragContext     *context)
+{
+  gtk_widget_hide (widget);
+}
+
+static void
+drag_end_cb (GtkWidget          *widget,
+	     GdkDragContext     *context)
+{
+  gtk_widget_show (widget);
+}
+
+static void
+drag_data_get_cb (GtkWidget          *widget,
+		  GdkDragContext     *context,
+		  GtkSelectionData   *selection_data,
+		  guint               info,
+		  guint32             time,
+		  EggToolbarEditor   *editor)
+{
+  const char *target;
+
+  target = g_object_get_data (G_OBJECT (widget), "egg-item-name");
+  g_return_if_fail (target != NULL);
+  
+  gtk_selection_data_set (selection_data, selection_data->target, 8,
+			  (const guchar *) target, strlen (target));
+}
+
+static gchar *
+elide_underscores (const gchar *original)
+{
+  gchar *q, *result;
+  const gchar *p;
+  gboolean last_underscore;
+
+  q = result = g_malloc (strlen (original) + 1);
+  last_underscore = FALSE;
+
+  for (p = original; *p; p++)
+    {
+      if (!last_underscore && *p == '_')
+	last_underscore = TRUE;
+      else
+	{
+	  last_underscore = FALSE;
+	  *q++ = *p;
+	}
+    }
+
+  *q = '\0';
+
+  return result;
+}
+
+static void
+set_drag_cursor (GtkWidget *widget)
+{
+  GdkCursor *cursor;
+  GdkScreen *screen;
+  
+  screen = gtk_widget_get_screen (widget);
+  
+  cursor = gdk_cursor_new_for_display (gdk_screen_get_display (screen),
+				       GDK_HAND2);
+  gdk_window_set_cursor (widget->window, cursor);
+  gdk_cursor_unref (cursor);
+}
+
+static void
+event_box_realize_cb (GtkWidget *widget, GtkImage *icon)
+{
+  GtkImageType type;
+
+  set_drag_cursor (widget);
+
+  type = gtk_image_get_storage_type (icon);
+  if (type == GTK_IMAGE_STOCK)
+    {
+      gchar *stock_id;
+      GdkPixbuf *pixbuf;
+
+      gtk_image_get_stock (icon, &stock_id, NULL);
+      pixbuf = gtk_widget_render_icon (widget, stock_id,
+	                               GTK_ICON_SIZE_LARGE_TOOLBAR, NULL);
+      gtk_drag_source_set_icon_pixbuf (widget, pixbuf);
+      g_object_unref (pixbuf);
+    }
+  else if (type == GTK_IMAGE_ICON_NAME)
+    {
+      const gchar *icon_name;
+      GdkScreen *screen;
+      GtkIconTheme *icon_theme;
+      GtkSettings *settings;
+      gint width, height;
+      GdkPixbuf *pixbuf;
+
+      gtk_image_get_icon_name (icon, &icon_name, NULL);
+      screen = gtk_widget_get_screen (widget);
+      icon_theme = gtk_icon_theme_get_for_screen (screen);
+      settings = gtk_settings_get_for_screen (screen);
+
+      if (!gtk_icon_size_lookup_for_settings (settings,
+                                              GTK_ICON_SIZE_LARGE_TOOLBAR,
+					      &width, &height))
+        {
+	  width = height = 24;
+	}
+
+      pixbuf = gtk_icon_theme_load_icon (icon_theme, icon_name,
+                                         MIN (width, height), 0, NULL);
+      if (G_UNLIKELY (!pixbuf))
+        return;
+
+      gtk_drag_source_set_icon_pixbuf (widget, pixbuf);
+      g_object_unref (pixbuf);
+
+    }
+  else if (type == GTK_IMAGE_PIXBUF)
+    {
+      GdkPixbuf *pixbuf = gtk_image_get_pixbuf (icon);
+      gtk_drag_source_set_icon_pixbuf (widget, pixbuf);
+    }
+}
+
+static GtkWidget *
+editor_create_item (EggToolbarEditor *editor,
+		    GtkImage	     *icon,
+		    const char       *label_text,
+		    GdkDragAction     action)
+{
+  GtkWidget *event_box;
+  GtkWidget *vbox;
+  GtkWidget *label;
+  gchar *label_no_mnemonic = NULL;
+
+  event_box = gtk_event_box_new ();
+  gtk_event_box_set_visible_window (GTK_EVENT_BOX (event_box), FALSE);
+  gtk_widget_show (event_box);
+  gtk_drag_source_set (event_box,
+		       GDK_BUTTON1_MASK,
+		       source_drag_types, G_N_ELEMENTS (source_drag_types), action);
+  g_signal_connect (event_box, "drag_data_get",
+		    G_CALLBACK (drag_data_get_cb), editor);
+  g_signal_connect_after (event_box, "realize",
+		          G_CALLBACK (event_box_realize_cb), icon);
+
+  if (action == GDK_ACTION_MOVE)
+    {
+      g_signal_connect (event_box, "drag_begin",
+		        G_CALLBACK (drag_begin_cb), NULL);
+      g_signal_connect (event_box, "drag_end",
+		        G_CALLBACK (drag_end_cb), NULL);
+    }
+
+  vbox = gtk_vbox_new (0, FALSE);
+  gtk_widget_show (vbox);
+  gtk_container_add (GTK_CONTAINER (event_box), vbox);
+
+  gtk_widget_show (GTK_WIDGET (icon));
+  gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (icon), FALSE, TRUE, 0);
+  label_no_mnemonic = elide_underscores (label_text);
+  label = gtk_label_new (label_no_mnemonic);
+  g_free (label_no_mnemonic);
+  gtk_widget_show (label);
+  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
+
+  return event_box;
+}
+
+static GtkWidget *
+editor_create_item_from_name (EggToolbarEditor *editor,
+                              const char *      name,
+                              GdkDragAction     drag_action)
+{
+  GtkWidget *item;
+  const char *item_name;
+  char *short_label;
+  const char *collate_key;
+  
+  if (strcmp (name, "_separator") == 0)
+    {
+      GtkWidget *icon;
+      
+      icon = _egg_editable_toolbar_new_separator_image ();
+      short_label = _("Separator");
+      item_name = g_strdup (name);
+      collate_key = g_utf8_collate_key (short_label, -1);
+      item = editor_create_item (editor, GTK_IMAGE (icon), 
+                                 short_label, drag_action);
+    }
+  else
+    {
+      GtkAction *action;
+      GtkWidget *icon;
+      char *stock_id, *icon_name = NULL;
+      
+      action = find_action (editor, name);
+      g_return_val_if_fail (action != NULL, NULL);
+
+      g_object_get (action,
+                    "icon-name", &icon_name,
+                    "stock-id", &stock_id,
+		    "short-label", &short_label,
+		    NULL);
+
+      /* This is a workaround to catch named icons. */
+      if (icon_name)
+        icon = gtk_image_new_from_icon_name (icon_name,
+	                                     GTK_ICON_SIZE_LARGE_TOOLBAR);
+      else
+        icon = gtk_image_new_from_stock (stock_id ? stock_id : GTK_STOCK_DND,
+                                         GTK_ICON_SIZE_LARGE_TOOLBAR);
+
+      item_name = g_strdup (name);
+      collate_key = g_utf8_collate_key (short_label, -1);
+      item = editor_create_item (editor, GTK_IMAGE (icon),
+                                 short_label, drag_action);
+
+      g_free (short_label);
+      g_free (stock_id);
+      g_free (icon_name);
+    }
+  
+  g_object_set_data_full (G_OBJECT (item), "egg-collate-key",
+                          (gpointer) collate_key, g_free);
+  g_object_set_data_full (G_OBJECT (item), "egg-item-name",
+                          (gpointer) item_name, g_free);
+  
+  return item;
+}
+
+static gint
+append_table (GtkTable *table, GList *items, gint y, gint width)
+{
+  if (items != NULL)
+    {
+      gint x = 0, height;
+      GtkWidget *alignment;
+      GtkWidget *item;
+  
+      height = g_list_length (items) / width + 1;
+      gtk_table_resize (table, height, width);
+      
+      if (y > 0)
+        {
+          item = gtk_hseparator_new ();
+          alignment = gtk_alignment_new (0.5, 0.5, 1.0, 0.0);
+          gtk_container_add (GTK_CONTAINER (alignment), item);
+          gtk_widget_show (alignment);
+          gtk_widget_show (item);
+          
+          gtk_table_attach_defaults (table, alignment, 0, width, y-1, y+1);
+        }
+      
+      for (; items != NULL; items = items->next)
+        {
+          item = items->data;
+          alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
+          gtk_container_add (GTK_CONTAINER (alignment), item);
+          gtk_widget_show (alignment);
+          gtk_widget_show (item);
+          
+          if (x >= width)
+            {
+              x = 0;
+              y++;
+            }
+          gtk_table_attach_defaults (table, alignment, x, x+1, y, y+1);
+          x++;
+        }
+      
+      y++;
+    }
+  return y;
+}
+
+static void
+update_editor_sheet (EggToolbarEditor *editor)
+{
+  gint y;
+  GPtrArray *items;
+  GList *to_move = NULL, *to_copy = NULL;
+  GtkWidget *table;
+  GtkWidget *viewport;
+
+  g_return_if_fail (EGG_IS_TOOLBAR_EDITOR (editor));
+  
+  /* Create new table. */
+  table = gtk_table_new (0, 0, TRUE);
+  editor->priv->table = table;
+  gtk_container_set_border_width (GTK_CONTAINER (table), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (table), 24);
+  gtk_widget_show (table);
+  gtk_drag_dest_set (table, GTK_DEST_DEFAULT_ALL,
+		     dest_drag_types, G_N_ELEMENTS (dest_drag_types),
+                     GDK_ACTION_MOVE | GDK_ACTION_COPY);
+  
+  /* Build two lists of items (one for copying, one for moving). */
+  items = egg_toolbars_model_get_name_avail (editor->priv->model);
+  while (items->len > 0)
+    {
+      GtkWidget *item;
+      const char *name;
+      gint flags;
+      
+      name = g_ptr_array_index (items, 0);
+      g_ptr_array_remove_index_fast (items, 0);
+      
+      flags = egg_toolbars_model_get_name_flags (editor->priv->model, name);
+      if ((flags & EGG_TB_MODEL_NAME_INFINITE) == 0)
+        {
+          item = editor_create_item_from_name (editor, name, GDK_ACTION_MOVE);
+          if (item != NULL)
+            to_move = g_list_insert_sorted (to_move, item, compare_items);
+        }
+      else
+        {
+          item = editor_create_item_from_name (editor, name, GDK_ACTION_COPY);
+          if (item != NULL)
+            to_copy = g_list_insert_sorted (to_copy, item, compare_items);
+        }
+    }
+
+  /* Add them to the sheet. */
+  y = 0;
+  y = append_table (GTK_TABLE (table), to_move, y, 4);
+  y = append_table (GTK_TABLE (table), to_copy, y, 4);
+  
+  g_list_free (to_move);
+  g_list_free (to_copy);
+  g_ptr_array_free (items, TRUE);
+  
+  /* Delete old table. */
+  viewport = GTK_BIN (editor->priv->scrolled_window)->child;
+  if (viewport)
+    {
+      gtk_container_remove (GTK_CONTAINER (viewport),
+                            GTK_BIN (viewport)->child);
+    }
+  
+  /* Add table to window. */
+  gtk_scrolled_window_add_with_viewport
+    (GTK_SCROLLED_WINDOW (editor->priv->scrolled_window), table);
+
+}
+
+static void
+setup_editor (EggToolbarEditor *editor)
+{
+  GtkWidget *scrolled_window;
+
+  gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
+  scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+  editor->priv->scrolled_window = scrolled_window;
+  gtk_widget_show (scrolled_window);
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
+				  GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+  gtk_box_pack_start (GTK_BOX (editor), scrolled_window, TRUE, TRUE, 0);
+}
+
+static void
+egg_toolbar_editor_init (EggToolbarEditor *t)
+{
+  t->priv = EGG_TOOLBAR_EDITOR_GET_PRIVATE (t);
+
+  t->priv->manager = NULL;
+  t->priv->actions_list = NULL;
+
+  setup_editor (t);
+}
+
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/egg-toolbar-editor.h nautilus-2.26.2/cut-n-paste-code/toolbar-editor/egg-toolbar-editor.h
--- nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/egg-toolbar-editor.h	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/cut-n-paste-code/toolbar-editor/egg-toolbar-editor.h	2009-04-15 22:10:58.000000000 +0200
@@ -0,0 +1,63 @@
+/*
+ *  Copyright (C) 2003 Marco Pesenti Gritti
+ *
+ *  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, 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.
+ */
+
+#ifndef EGG_TOOLBAR_EDITOR_H
+#define EGG_TOOLBAR_EDITOR_H
+
+#include <gtk/gtk.h>
+
+#include "egg-toolbars-model.h"
+
+G_BEGIN_DECLS
+
+typedef struct EggToolbarEditorClass EggToolbarEditorClass;
+
+#define EGG_TYPE_TOOLBAR_EDITOR             (egg_toolbar_editor_get_type ())
+#define EGG_TOOLBAR_EDITOR(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TOOLBAR_EDITOR, EggToolbarEditor))
+#define EGG_TOOLBAR_EDITOR_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TOOLBAR_EDITOR, EggToolbarEditorClass))
+#define EGG_IS_TOOLBAR_EDITOR(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TOOLBAR_EDITOR))
+#define EGG_IS_TOOLBAR_EDITOR_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TOOLBAR_EDITOR))
+#define EGG_TOOLBAR_EDITOR_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TOOLBAR_EDITOR, EggToolbarEditorClass))
+
+
+typedef struct EggToolbarEditor EggToolbarEditor;
+typedef struct EggToolbarEditorPrivate EggToolbarEditorPrivate;
+
+struct EggToolbarEditor
+{
+  GtkVBox parent_object;
+
+  /*< private >*/
+  EggToolbarEditorPrivate *priv;
+};
+
+struct EggToolbarEditorClass
+{
+  GtkVBoxClass parent_class;
+};
+
+
+GType             egg_toolbar_editor_get_type     (void);
+GtkWidget        *egg_toolbar_editor_new          (GtkUIManager *manager,
+						   EggToolbarsModel *model);
+void		  egg_toolbar_editor_set_model	  (EggToolbarEditor *t,
+						   EggToolbarsModel *model);
+
+G_END_DECLS
+
+#endif
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/egg-toolbars-model.c nautilus-2.26.2/cut-n-paste-code/toolbar-editor/egg-toolbars-model.c
--- nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/egg-toolbars-model.c	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/cut-n-paste-code/toolbar-editor/egg-toolbars-model.c	2009-04-15 22:10:58.000000000 +0200
@@ -0,0 +1,987 @@
+/*
+ *  Copyright (C) 2002-2004 Marco Pesenti Gritti
+ *  Copyright (C) 2004 Christian Persch
+ *
+ *  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, 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.
+ *
+ *  $Id: egg-toolbars-model.c 3240 2008-10-27 12:17:08Z chpe $
+ */
+
+#include "config.h"
+
+#include "egg-toolbars-model.h"
+#include "eggtypebuiltins.h"
+#include "eggmarshalers.h"
+
+#include <unistd.h>
+#include <string.h>
+#include <libxml/tree.h>
+#include <gdk/gdk.h>
+
+static void egg_toolbars_model_finalize   (GObject               *object);
+
+enum
+{
+  ITEM_ADDED,
+  ITEM_REMOVED,
+  TOOLBAR_ADDED,
+  TOOLBAR_CHANGED,
+  TOOLBAR_REMOVED,
+  LAST_SIGNAL
+};
+
+typedef struct
+{
+  char *name;
+  EggTbModelFlags flags;
+} EggToolbarsToolbar;
+
+typedef struct
+{
+  char *name;
+} EggToolbarsItem;
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+#define EGG_TOOLBARS_MODEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EGG_TYPE_TOOLBARS_MODEL, EggToolbarsModelPrivate))
+
+struct EggToolbarsModelPrivate
+{
+  GNode *toolbars;
+  GList *types;
+  GHashTable *flags;
+};
+
+G_DEFINE_TYPE (EggToolbarsModel, egg_toolbars_model, G_TYPE_OBJECT)
+
+static xmlDocPtr
+egg_toolbars_model_to_xml (EggToolbarsModel *model)
+{
+  GNode *l1, *l2, *tl;
+  GList *l3;
+  xmlDocPtr doc;
+
+  g_return_val_if_fail (EGG_IS_TOOLBARS_MODEL (model), NULL);
+
+  tl = model->priv->toolbars;
+
+  xmlIndentTreeOutput = TRUE;
+  doc = xmlNewDoc ((const xmlChar*) "1.0");
+  doc->children = xmlNewDocNode (doc, NULL, (const xmlChar*) "toolbars", NULL);
+
+  for (l1 = tl->children; l1 != NULL; l1 = l1->next)
+    {
+      xmlNodePtr tnode;
+      EggToolbarsToolbar *toolbar = l1->data;
+
+      tnode = xmlNewChild (doc->children, NULL, (const xmlChar*) "toolbar", NULL);
+      xmlSetProp (tnode, (const xmlChar*) "name", (const xmlChar*) toolbar->name);
+      xmlSetProp (tnode, (const xmlChar*) "hidden",
+		  (toolbar->flags&EGG_TB_MODEL_HIDDEN) ? (const xmlChar*) "true" : (const xmlChar*) "false");
+      xmlSetProp (tnode, (const xmlChar*) "editable",
+		  (toolbar->flags&EGG_TB_MODEL_NOT_EDITABLE) ? (const xmlChar*) "false" : (const xmlChar*) "true");
+
+      for (l2 = l1->children; l2 != NULL; l2 = l2->next)
+	{
+	  xmlNodePtr node;
+	  EggToolbarsItem *item = l2->data;
+
+          if (strcmp (item->name, "_separator") == 0)
+            {
+              node = xmlNewChild (tnode, NULL, (const xmlChar*) "separator", NULL);
+              continue;
+            }
+          
+          node = xmlNewChild (tnode, NULL, (const xmlChar*) "toolitem", NULL);
+          xmlSetProp (node, (const xmlChar*) "name", (const xmlChar*) item->name);
+
+          /* Add 'data' nodes for each data type which can be written out for this
+           * item. Only write types which can be used to restore the data. */
+          for (l3 = model->priv->types; l3 != NULL; l3 = l3->next)
+            {
+              EggToolbarsItemType *type = l3->data;
+              if (type->get_name != NULL && type->get_data != NULL)
+                {
+                  xmlNodePtr dnode;
+                  char *tmp;
+                  
+                  tmp = type->get_data (type, item->name);
+                  if (tmp != NULL)
+                    {
+                      dnode = xmlNewTextChild (node, NULL, (const xmlChar*) "data", (const xmlChar*) tmp);
+                      g_free (tmp);
+                      
+                      tmp = gdk_atom_name (type->type);
+                      xmlSetProp (dnode, (const xmlChar*) "type", (const xmlChar*) tmp);
+                      g_free (tmp);
+                    }
+                }
+	    }
+	}
+    }
+
+  return doc;
+}
+
+static gboolean
+safe_save_xml (const char *xml_file, xmlDocPtr doc)
+{
+	char *tmp_file;
+	char *old_file;
+	gboolean old_exist;
+	gboolean retval = TRUE;
+
+	tmp_file = g_strconcat (xml_file, ".tmp", NULL);
+	old_file = g_strconcat (xml_file, ".old", NULL);
+
+	if (xmlSaveFormatFile (tmp_file, doc, 1) <= 0)
+	{
+		g_warning ("Failed to write XML data to %s", tmp_file);
+		goto failed;
+	}
+
+	old_exist = g_file_test (xml_file, G_FILE_TEST_EXISTS);
+
+	if (old_exist)
+	{
+		if (rename (xml_file, old_file) < 0)
+		{
+			g_warning ("Failed to rename %s to %s", xml_file, old_file);
+			retval = FALSE;
+			goto failed;
+		}
+	}
+
+	if (rename (tmp_file, xml_file) < 0)
+	{
+		g_warning ("Failed to rename %s to %s", tmp_file, xml_file);
+
+		if (rename (old_file, xml_file) < 0)
+		{
+			g_warning ("Failed to restore %s from %s", xml_file, tmp_file);
+		}
+		retval = FALSE;
+		goto failed;
+	}
+
+	if (old_exist)
+	{
+		if (unlink (old_file) < 0)
+		{
+			g_warning ("Failed to delete old file %s", old_file);
+		}
+	}
+
+	failed:
+	g_free (old_file);
+	g_free (tmp_file);
+
+	return retval;
+}
+
+void
+egg_toolbars_model_save_toolbars (EggToolbarsModel *model,
+				  const char *xml_file,
+				  const char *version)
+{
+  xmlDocPtr doc;
+  xmlNodePtr root;
+
+  g_return_if_fail (EGG_IS_TOOLBARS_MODEL (model));
+
+  doc = egg_toolbars_model_to_xml (model);
+  root = xmlDocGetRootElement (doc);
+  xmlSetProp (root, (const xmlChar*) "version", (const xmlChar*) version);
+  safe_save_xml (xml_file, doc);
+  xmlFreeDoc (doc);
+}
+
+static gboolean
+is_unique (EggToolbarsModel *model,
+	   EggToolbarsItem *idata)
+{
+  EggToolbarsItem *idata2;
+  GNode *toolbar, *item;
+  
+   
+  for(toolbar = g_node_first_child (model->priv->toolbars);
+      toolbar != NULL; toolbar = g_node_next_sibling (toolbar))
+    {
+      for(item = g_node_first_child (toolbar);
+	  item != NULL; item = g_node_next_sibling (item))
+        {
+	  idata2 = item->data;
+	  
+	  if (idata != idata2 && strcmp (idata->name, idata2->name) == 0)
+	    {
+	      return FALSE;
+	    }
+	}
+    }
+  
+  return TRUE;
+}
+
+static GNode *
+toolbar_node_new (const char *name)
+{
+  EggToolbarsToolbar *toolbar;
+
+  toolbar = g_new (EggToolbarsToolbar, 1);
+  toolbar->name = g_strdup (name);
+  toolbar->flags = 0;
+
+  return g_node_new (toolbar);
+}
+
+static GNode *
+item_node_new (const char *name, EggToolbarsModel *model)
+{
+  EggToolbarsItem *item;
+  int flags;
+
+  g_return_val_if_fail (name != NULL, NULL);
+
+  item = g_new (EggToolbarsItem, 1);
+  item->name = g_strdup (name);
+
+  flags = GPOINTER_TO_INT (g_hash_table_lookup (model->priv->flags, item->name));
+  if ((flags & EGG_TB_MODEL_NAME_INFINITE) == 0)
+    g_hash_table_insert (model->priv->flags,
+			 g_strdup (item->name),
+			 GINT_TO_POINTER (flags | EGG_TB_MODEL_NAME_USED));
+
+  return g_node_new (item);
+}
+
+static void
+item_node_free (GNode *item_node, EggToolbarsModel *model)
+{
+  EggToolbarsItem *item = item_node->data;
+  int flags;
+
+  flags = GPOINTER_TO_INT (g_hash_table_lookup (model->priv->flags, item->name));
+  if ((flags & EGG_TB_MODEL_NAME_INFINITE) == 0 && is_unique (model, item))
+    g_hash_table_insert (model->priv->flags,
+			 g_strdup (item->name),
+			 GINT_TO_POINTER (flags & ~EGG_TB_MODEL_NAME_USED));
+
+  g_free (item->name);
+  g_free (item);
+
+  g_node_destroy (item_node);
+}
+
+static void
+toolbar_node_free (GNode *toolbar_node, EggToolbarsModel *model)
+{
+  EggToolbarsToolbar *toolbar = toolbar_node->data;
+
+  g_node_children_foreach (toolbar_node, G_TRAVERSE_ALL,
+    			   (GNodeForeachFunc) item_node_free, model);
+    
+  g_free (toolbar->name);
+  g_free (toolbar);
+
+  g_node_destroy (toolbar_node);
+}
+
+EggTbModelFlags
+egg_toolbars_model_get_flags (EggToolbarsModel *model,
+			      int               toolbar_position)
+{
+  GNode *toolbar_node;
+  EggToolbarsToolbar *toolbar;
+
+  toolbar_node = g_node_nth_child (model->priv->toolbars, toolbar_position);
+  g_return_val_if_fail (toolbar_node != NULL, 0);
+
+  toolbar = toolbar_node->data;
+
+  return toolbar->flags;
+}
+
+void
+egg_toolbars_model_set_flags (EggToolbarsModel *model,
+			      int               toolbar_position,
+			      EggTbModelFlags   flags)
+{
+  GNode *toolbar_node;
+  EggToolbarsToolbar *toolbar;
+
+  toolbar_node = g_node_nth_child (model->priv->toolbars, toolbar_position);
+  g_return_if_fail (toolbar_node != NULL);
+
+  toolbar = toolbar_node->data;
+
+  toolbar->flags = flags;
+
+  g_signal_emit (G_OBJECT (model), signals[TOOLBAR_CHANGED],
+		 0, toolbar_position);
+}
+
+
+char *
+egg_toolbars_model_get_data (EggToolbarsModel *model,
+                             GdkAtom           type,
+                             const char       *name)
+{
+  EggToolbarsItemType *t;
+  char *data = NULL;
+  GList *l;
+  
+  if (type == GDK_NONE || type == gdk_atom_intern (EGG_TOOLBAR_ITEM_TYPE, FALSE))
+    {
+      g_return_val_if_fail (name != NULL, NULL);
+      g_return_val_if_fail (*name != 0,   NULL);
+      return strdup (name);
+    }
+  
+  for (l = model->priv->types; l != NULL; l = l->next)
+    {
+      t = l->data;
+      if (t->type == type && t->get_data != NULL)
+        {
+          data = t->get_data (t, name);
+	  if (data != NULL) break;
+        }
+    }
+  
+  return data;
+}
+
+char *
+egg_toolbars_model_get_name (EggToolbarsModel *model,
+                             GdkAtom           type,
+                             const char       *data,
+                             gboolean          create)
+{
+  EggToolbarsItemType *t;
+  char *name = NULL;
+  GList *l;
+  
+  if (type == GDK_NONE || type == gdk_atom_intern (EGG_TOOLBAR_ITEM_TYPE, FALSE))
+    {
+      g_return_val_if_fail (data, NULL);
+      g_return_val_if_fail (*data, NULL);
+      return strdup (data);
+    }
+  
+  if (create)
+    {
+      for (l = model->priv->types; name == NULL && l != NULL; l = l->next)
+        {
+          t = l->data;
+          if (t->type == type && t->new_name != NULL)
+            name = t->new_name (t, data);
+        }
+      
+      return name;
+    }
+  else
+    {
+      for (l = model->priv->types; name == NULL && l != NULL; l = l->next)
+        {
+          t = l->data;
+          if (t->type == type && t->get_name != NULL)
+            name = t->get_name (t, data);
+        }
+      
+      return name;
+    }  
+}
+
+static gboolean
+impl_add_item (EggToolbarsModel    *model,
+	       int		    toolbar_position,
+	       int		    position,
+	       const char          *name)
+{
+  GNode *parent_node;
+  GNode *child_node;
+  int real_position;
+
+  g_return_val_if_fail (EGG_IS_TOOLBARS_MODEL (model), FALSE);
+  g_return_val_if_fail (name != NULL, FALSE);
+
+  parent_node = g_node_nth_child (model->priv->toolbars, toolbar_position);
+  child_node = item_node_new (name, model);
+  g_node_insert (parent_node, position, child_node);
+
+  real_position = g_node_child_position (parent_node, child_node);
+
+  g_signal_emit (G_OBJECT (model), signals[ITEM_ADDED], 0,
+		 toolbar_position, real_position);
+
+  return TRUE;
+}
+
+gboolean
+egg_toolbars_model_add_item (EggToolbarsModel *model,
+			     int	       toolbar_position,
+			     int               position,
+			     const char       *name)
+{
+  EggToolbarsModelClass *klass = EGG_TOOLBARS_MODEL_GET_CLASS (model);
+  return klass->add_item (model, toolbar_position, position, name);
+}
+
+int
+egg_toolbars_model_add_toolbar (EggToolbarsModel *model,
+				int               position,
+				const char       *name)
+{
+  GNode *node;
+  int real_position;
+
+  g_return_val_if_fail (EGG_IS_TOOLBARS_MODEL (model), -1);
+
+  node = toolbar_node_new (name);
+  g_node_insert (model->priv->toolbars, position, node);
+
+  real_position = g_node_child_position (model->priv->toolbars, node);
+
+  g_signal_emit (G_OBJECT (model), signals[TOOLBAR_ADDED],
+		 0, real_position);
+
+  return g_node_child_position (model->priv->toolbars, node);
+}
+
+static char *
+parse_data_list (EggToolbarsModel *model,
+		 xmlNodePtr        child,
+                 gboolean          create)
+{
+  char *name = NULL;
+  while (child && name == NULL)
+    {
+      if (xmlStrEqual (child->name, (const xmlChar*) "data"))
+        {
+          xmlChar *type = xmlGetProp (child, (const xmlChar*) "type");
+          xmlChar *data = xmlNodeGetContent (child);
+  
+          if (type != NULL)
+            {
+              GdkAtom atom = gdk_atom_intern ((const char*) type, TRUE);
+              name = egg_toolbars_model_get_name (model, atom, (const char*) data, create);
+            }
+          
+          xmlFree (type);
+          xmlFree (data);
+        }
+      
+      child = child->next;
+    }
+  
+  return name;
+}
+
+static void
+parse_item_list (EggToolbarsModel *model,
+		 xmlNodePtr        child,
+		 int               position)
+{
+  while (child)
+    {
+      if (xmlStrEqual (child->name, (const xmlChar*) "toolitem"))
+	{
+          char *name;
+
+          /* Try to get the name using the data elements first,
+             as they are more 'portable' or 'persistent'. */
+          name = parse_data_list (model, child->children, FALSE);
+          if (name == NULL)
+            {
+              name = parse_data_list (model, child->children, TRUE);
+            }
+          
+          /* If that fails, try to use the name. */
+          if (name == NULL)
+            {
+              xmlChar *type = xmlGetProp (child, (const xmlChar*) "type");
+              xmlChar *data = xmlGetProp (child, (const xmlChar*) "name");
+              GdkAtom  atom = type ? gdk_atom_intern ((const char*) type, TRUE) : GDK_NONE;
+              
+              /* If an old format, try to use it. */
+              name = egg_toolbars_model_get_name (model, atom, (const char*) data, FALSE);
+              if (name == NULL)
+                {
+                  name = egg_toolbars_model_get_name (model, atom, (const char*) data, TRUE);
+                }
+              
+              xmlFree (type);
+              xmlFree (data);
+            }
+          
+          if (name != NULL)
+            {
+              egg_toolbars_model_add_item (model, position, -1, name);
+              g_free (name);
+            }
+	}
+      else if (xmlStrEqual (child->name, (const xmlChar*) "separator"))
+	{
+          egg_toolbars_model_add_item (model, position, -1, "_separator");
+	}
+
+      child = child->next;
+    }
+}
+
+static void
+parse_toolbars (EggToolbarsModel *model,
+		xmlNodePtr        child)
+{
+  while (child)
+    {
+      if (xmlStrEqual (child->name, (const xmlChar*) "toolbar"))
+	{
+	  xmlChar *string;
+	  int position;
+          EggTbModelFlags flags;
+
+	  string = xmlGetProp (child, (const xmlChar*) "name");
+	  position = egg_toolbars_model_add_toolbar (model, -1, (const char*) string);
+          flags = egg_toolbars_model_get_flags (model, position);
+	  xmlFree (string);
+
+	  string = xmlGetProp (child, (const xmlChar*) "editable");
+          if (string && xmlStrEqual (string, (const xmlChar*) "false"))
+            flags |= EGG_TB_MODEL_NOT_EDITABLE;
+	  xmlFree (string);
+
+	  string = xmlGetProp (child, (const xmlChar*) "hidden");
+          if (string && xmlStrEqual (string, (const xmlChar*) "true"))
+            flags |= EGG_TB_MODEL_HIDDEN;
+	  xmlFree (string);
+
+	  string = xmlGetProp (child, (const xmlChar*) "style");
+	  if (string && xmlStrEqual (string, (const xmlChar*) "icons-only"))
+            flags |= EGG_TB_MODEL_ICONS;
+	  xmlFree (string);
+
+          egg_toolbars_model_set_flags (model, position, flags);
+          
+	  parse_item_list (model, child->children, position);
+	}
+
+      child = child->next;
+    }
+}
+
+gboolean
+egg_toolbars_model_load_toolbars (EggToolbarsModel *model,
+				  const char *xml_file)
+{
+  xmlDocPtr doc;
+  xmlNodePtr root;
+
+  g_return_val_if_fail (EGG_IS_TOOLBARS_MODEL (model), FALSE);
+
+  if (!xml_file || !g_file_test (xml_file, G_FILE_TEST_EXISTS)) return FALSE;
+
+  doc = xmlParseFile (xml_file);
+  if (doc == NULL)
+  {
+    g_warning ("Failed to load XML data from %s", xml_file);
+    return FALSE;
+  }
+  root = xmlDocGetRootElement (doc);
+
+  parse_toolbars (model, root->children);
+
+  xmlFreeDoc (doc);
+
+  return TRUE;
+}
+
+static void
+parse_available_list (EggToolbarsModel *model,
+		      xmlNodePtr        child)
+{
+  gint flags;
+  
+  while (child)
+    {
+      if (xmlStrEqual (child->name, (const xmlChar*) "toolitem"))
+	{
+	  xmlChar *name;
+
+	  name = xmlGetProp (child, (const xmlChar*) "name");
+	  flags = egg_toolbars_model_get_name_flags
+	    (model, (const char*)name);
+	  egg_toolbars_model_set_name_flags
+	    (model, (const char*)name, flags | EGG_TB_MODEL_NAME_KNOWN);
+	  xmlFree (name);
+	}
+      child = child->next;
+    }
+}
+
+static void
+parse_names (EggToolbarsModel *model,
+	     xmlNodePtr        child)
+{
+  while (child)
+    {
+      if (xmlStrEqual (child->name, (const xmlChar*) "available"))
+	{
+	  parse_available_list (model, child->children);
+	}
+
+      child = child->next;
+    }
+}
+
+gboolean
+egg_toolbars_model_load_names (EggToolbarsModel *model,
+			       const char *xml_file)
+{
+  xmlDocPtr doc;
+  xmlNodePtr root;
+
+  g_return_val_if_fail (EGG_IS_TOOLBARS_MODEL (model), FALSE);
+
+  if (!xml_file || !g_file_test (xml_file, G_FILE_TEST_EXISTS)) return FALSE;
+
+  doc = xmlParseFile (xml_file);
+  if (doc == NULL)
+  {
+    g_warning ("Failed to load XML data from %s", xml_file);
+    return FALSE;
+  }
+  root = xmlDocGetRootElement (doc);
+
+  parse_names (model, root->children);
+
+  xmlFreeDoc (doc);
+
+  return TRUE;
+}
+
+static void
+egg_toolbars_model_class_init (EggToolbarsModelClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+  volatile GType flags_type; /* work around gcc's optimiser */
+
+  /* make sure the flags type is known */
+  flags_type = EGG_TYPE_TB_MODEL_FLAGS;
+
+  object_class->finalize = egg_toolbars_model_finalize;
+
+  klass->add_item = impl_add_item;
+
+  signals[ITEM_ADDED] =
+    g_signal_new ("item_added",
+		  G_OBJECT_CLASS_TYPE (object_class),
+		  G_SIGNAL_RUN_LAST,
+		  G_STRUCT_OFFSET (EggToolbarsModelClass, item_added),
+		  NULL, NULL, _egg_marshal_VOID__INT_INT,
+		  G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
+  signals[TOOLBAR_ADDED] =
+    g_signal_new ("toolbar_added",
+		  G_OBJECT_CLASS_TYPE (object_class),
+		  G_SIGNAL_RUN_LAST,
+		  G_STRUCT_OFFSET (EggToolbarsModelClass, toolbar_added),
+		  NULL, NULL, g_cclosure_marshal_VOID__INT,
+		  G_TYPE_NONE, 1, G_TYPE_INT);
+  signals[ITEM_REMOVED] =
+    g_signal_new ("item_removed",
+		  G_OBJECT_CLASS_TYPE (object_class),
+		  G_SIGNAL_RUN_LAST,
+		  G_STRUCT_OFFSET (EggToolbarsModelClass, item_removed),
+		  NULL, NULL, _egg_marshal_VOID__INT_INT,
+		  G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
+  signals[TOOLBAR_REMOVED] =
+    g_signal_new ("toolbar_removed",
+		  G_OBJECT_CLASS_TYPE (object_class),
+		  G_SIGNAL_RUN_LAST,
+		  G_STRUCT_OFFSET (EggToolbarsModelClass, toolbar_removed),
+		  NULL, NULL, g_cclosure_marshal_VOID__INT,
+		  G_TYPE_NONE, 1, G_TYPE_INT);
+  signals[TOOLBAR_CHANGED] =
+    g_signal_new ("toolbar_changed",
+		  G_OBJECT_CLASS_TYPE (object_class),
+		  G_SIGNAL_RUN_LAST,
+		  G_STRUCT_OFFSET (EggToolbarsModelClass, toolbar_changed),
+		  NULL, NULL, g_cclosure_marshal_VOID__INT,
+		  G_TYPE_NONE, 1, G_TYPE_INT);
+
+  g_type_class_add_private (object_class, sizeof (EggToolbarsModelPrivate));
+}
+
+static void
+egg_toolbars_model_init (EggToolbarsModel *model)
+{
+  model->priv =EGG_TOOLBARS_MODEL_GET_PRIVATE (model);
+
+  model->priv->toolbars = g_node_new (NULL);
+  model->priv->flags = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+  egg_toolbars_model_set_name_flags (model, "_separator", 
+				     EGG_TB_MODEL_NAME_KNOWN |
+				     EGG_TB_MODEL_NAME_INFINITE);
+}
+
+static void
+egg_toolbars_model_finalize (GObject *object)
+{
+  EggToolbarsModel *model = EGG_TOOLBARS_MODEL (object);
+
+  g_node_children_foreach (model->priv->toolbars, G_TRAVERSE_ALL,
+    			   (GNodeForeachFunc) toolbar_node_free, model);
+  g_node_destroy (model->priv->toolbars);
+  g_hash_table_destroy (model->priv->flags);
+
+  G_OBJECT_CLASS (egg_toolbars_model_parent_class)->finalize (object);
+}
+
+EggToolbarsModel *
+egg_toolbars_model_new (void)
+{
+  return EGG_TOOLBARS_MODEL (g_object_new (EGG_TYPE_TOOLBARS_MODEL, NULL));
+}
+
+void
+egg_toolbars_model_remove_toolbar (EggToolbarsModel   *model,
+				   int                 position)
+{
+  GNode *node;
+  EggTbModelFlags flags;
+
+  g_return_if_fail (EGG_IS_TOOLBARS_MODEL (model));
+
+  flags = egg_toolbars_model_get_flags (model, position);
+
+  if (!(flags & EGG_TB_MODEL_NOT_REMOVABLE))
+    {
+      node = g_node_nth_child (model->priv->toolbars, position);
+      g_return_if_fail (node != NULL);
+
+      toolbar_node_free (node, model);
+
+      g_signal_emit (G_OBJECT (model), signals[TOOLBAR_REMOVED],
+		     0, position);
+    }
+}
+
+void
+egg_toolbars_model_remove_item (EggToolbarsModel *model,
+				int               toolbar_position,
+				int               position)
+{
+  GNode *node, *toolbar;
+
+  g_return_if_fail (EGG_IS_TOOLBARS_MODEL (model));
+
+  toolbar = g_node_nth_child (model->priv->toolbars, toolbar_position);
+  g_return_if_fail (toolbar != NULL);
+
+  node = g_node_nth_child (toolbar, position);
+  g_return_if_fail (node != NULL);
+
+  item_node_free (node, model);
+
+  g_signal_emit (G_OBJECT (model), signals[ITEM_REMOVED], 0,
+		 toolbar_position, position);
+}
+
+void
+egg_toolbars_model_move_item (EggToolbarsModel *model,
+			      int               toolbar_position,
+			      int               position,
+			      int		new_toolbar_position,
+			      int		new_position)
+{
+  GNode *node, *toolbar, *new_toolbar;
+
+  g_return_if_fail (EGG_IS_TOOLBARS_MODEL (model));
+
+  toolbar = g_node_nth_child (model->priv->toolbars, toolbar_position);
+  g_return_if_fail (toolbar != NULL);
+
+  new_toolbar = g_node_nth_child (model->priv->toolbars, new_toolbar_position);
+  g_return_if_fail (new_toolbar != NULL);
+
+  node = g_node_nth_child (toolbar, position);
+  g_return_if_fail (node != NULL);
+
+  g_node_unlink (node);
+
+  g_signal_emit (G_OBJECT (model), signals[ITEM_REMOVED], 0,
+		 toolbar_position, position);
+
+  g_node_insert (new_toolbar, new_position, node);
+
+  g_signal_emit (G_OBJECT (model), signals[ITEM_ADDED], 0,
+		 new_toolbar_position, new_position);
+}
+
+void
+egg_toolbars_model_delete_item (EggToolbarsModel *model,
+				const char       *name)
+{
+  EggToolbarsItem *idata;
+  EggToolbarsToolbar *tdata;
+  GNode *toolbar, *item, *next;
+  int tpos, ipos;
+
+  g_return_if_fail (EGG_IS_TOOLBARS_MODEL (model));
+  
+  toolbar = g_node_first_child (model->priv->toolbars);
+  tpos = 0;
+  
+  while (toolbar != NULL)
+    {
+      item = g_node_first_child (toolbar);
+      ipos = 0;
+      
+      /* Don't delete toolbars that were already empty */
+      if (item == NULL)
+        {
+	  toolbar = g_node_next_sibling (toolbar);
+	  continue;
+        }
+      
+      while (item != NULL)
+        {
+	  next = g_node_next_sibling (item);
+	  idata = item->data;
+	  if (strcmp (idata->name, name) == 0)
+	    {
+	      item_node_free (item, model);
+	      g_signal_emit (G_OBJECT (model),
+			     signals[ITEM_REMOVED],
+			     0, tpos, ipos);
+	    }
+	  else
+	    {
+	      ipos++;
+	    }
+	  
+	  item = next;
+        }
+      
+      next = g_node_next_sibling (toolbar);
+      tdata = toolbar->data;
+      if (!(tdata->flags & EGG_TB_MODEL_NOT_REMOVABLE) &&
+	  g_node_first_child (toolbar) == NULL)
+        {
+	  toolbar_node_free (toolbar, model);
+
+	  g_signal_emit (G_OBJECT (model),
+			 signals[TOOLBAR_REMOVED],
+			 0, tpos);
+        }
+      else
+        {
+	  tpos++;
+        }
+      
+      toolbar = next;
+    }
+}
+
+int
+egg_toolbars_model_n_items (EggToolbarsModel *model,
+			    int               toolbar_position)
+{
+  GNode *toolbar;
+
+  toolbar = g_node_nth_child (model->priv->toolbars, toolbar_position);
+  g_return_val_if_fail (toolbar != NULL, -1);
+
+  return g_node_n_children (toolbar);
+}
+
+const char *
+egg_toolbars_model_item_nth (EggToolbarsModel *model,
+			     int	       toolbar_position,
+			     int               position)
+{
+  GNode *toolbar;
+  GNode *item;
+  EggToolbarsItem *idata;
+
+  toolbar = g_node_nth_child (model->priv->toolbars, toolbar_position);
+  g_return_val_if_fail (toolbar != NULL, NULL);
+
+  item = g_node_nth_child (toolbar, position);
+  g_return_val_if_fail (item != NULL, NULL);
+
+  idata = item->data;
+  return idata->name;
+}
+
+int
+egg_toolbars_model_n_toolbars (EggToolbarsModel *model)
+{
+  return g_node_n_children (model->priv->toolbars);
+}
+
+const char *
+egg_toolbars_model_toolbar_nth (EggToolbarsModel *model,
+				int               position)
+{
+  GNode *toolbar;
+  EggToolbarsToolbar *tdata;
+
+  toolbar = g_node_nth_child (model->priv->toolbars, position);
+  g_return_val_if_fail (toolbar != NULL, NULL);
+
+  tdata = toolbar->data;
+
+  return tdata->name;
+}
+
+GList *
+egg_toolbars_model_get_types (EggToolbarsModel *model)
+{
+  return model->priv->types;
+}
+
+void
+egg_toolbars_model_set_types (EggToolbarsModel *model, GList *types)
+{
+  model->priv->types = types;
+}
+
+static void
+fill_avail_array (gpointer key, gpointer value, GPtrArray *array)
+{
+  int flags = GPOINTER_TO_INT (value);
+  if ((flags & EGG_TB_MODEL_NAME_KNOWN) && !(flags & EGG_TB_MODEL_NAME_USED))
+      g_ptr_array_add (array, key);
+}
+
+GPtrArray *
+egg_toolbars_model_get_name_avail (EggToolbarsModel *model)
+{
+  GPtrArray *array = g_ptr_array_new ();
+  g_hash_table_foreach (model->priv->flags, (GHFunc) fill_avail_array, array);
+  return array;
+}
+
+gint
+egg_toolbars_model_get_name_flags (EggToolbarsModel *model, const char *name)
+{
+  return GPOINTER_TO_INT (g_hash_table_lookup (model->priv->flags, name));
+}
+
+void
+egg_toolbars_model_set_name_flags (EggToolbarsModel *model, const char *name, gint flags)
+{
+  g_hash_table_insert (model->priv->flags, g_strdup (name), GINT_TO_POINTER (flags));
+}
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/egg-toolbars-model.h nautilus-2.26.2/cut-n-paste-code/toolbar-editor/egg-toolbars-model.h
--- nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/egg-toolbars-model.h	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/cut-n-paste-code/toolbar-editor/egg-toolbars-model.h	2009-04-15 22:10:58.000000000 +0200
@@ -0,0 +1,190 @@
+/*
+ *  Copyright (C) 2003-2004 Marco Pesenti Gritti
+ *
+ *  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, 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.
+ * 
+ *  $Id: egg-toolbars-model.h 3240 2008-10-27 12:17:08Z chpe $
+ */
+
+#ifndef EGG_TOOLBARS_MODEL_H
+#define EGG_TOOLBARS_MODEL_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define EGG_TYPE_TOOLBARS_MODEL             (egg_toolbars_model_get_type ())
+#define EGG_TOOLBARS_MODEL(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TOOLBARS_MODEL, EggToolbarsModel))
+#define EGG_TOOLBARS_MODEL_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TOOLBARS_MODEL, EggToolbarsModelClass))
+#define EGG_IS_TOOLBARS_MODEL(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TOOLBARS_MODEL))
+#define EGG_IS_TOOLBARS_MODEL_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TOOLBARS_MODEL))
+#define EGG_TOOLBARS_MODEL_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TOOLBARS_MODEL, EggToolbarsModelClass))
+
+typedef struct EggToolbarsModel		EggToolbarsModel;
+typedef struct EggToolbarsModelPrivate	EggToolbarsModelPrivate;
+typedef struct EggToolbarsModelClass	EggToolbarsModelClass;
+
+#define EGG_TOOLBAR_ITEM_TYPE "application/x-toolbar-item"
+
+typedef enum
+{
+  EGG_TB_MODEL_NOT_REMOVABLE	 = 1 << 0,
+  EGG_TB_MODEL_NOT_EDITABLE	 = 1 << 1,
+  EGG_TB_MODEL_BOTH		 = 1 << 2,
+  EGG_TB_MODEL_BOTH_HORIZ	 = 1 << 3,
+  EGG_TB_MODEL_ICONS		 = 1 << 4,
+  EGG_TB_MODEL_TEXT		 = 1 << 5,
+  EGG_TB_MODEL_STYLES_MASK	 = 0x3C,
+  EGG_TB_MODEL_ACCEPT_ITEMS_ONLY = 1 << 6,
+  EGG_TB_MODEL_HIDDEN            = 1 << 7
+} EggTbModelFlags;
+
+typedef enum
+{
+  EGG_TB_MODEL_NAME_USED         = 1 << 0,
+  EGG_TB_MODEL_NAME_INFINITE     = 1 << 1,
+  EGG_TB_MODEL_NAME_KNOWN        = 1 << 2
+} EggTbModelNameFlags;
+
+struct EggToolbarsModel
+{
+  GObject parent_object;
+
+  /*< private >*/
+  EggToolbarsModelPrivate *priv;
+};
+
+struct EggToolbarsModelClass
+{
+  GObjectClass parent_class;
+
+  /* Signals */
+  void (* item_added)      (EggToolbarsModel *model,
+			    int toolbar_position,
+			    int position);
+  void (* item_removed)    (EggToolbarsModel *model,
+			    int toolbar_position,
+			    int position);
+  void (* toolbar_added)   (EggToolbarsModel *model,
+			    int position);
+  void (* toolbar_changed) (EggToolbarsModel *model,
+			    int position);
+  void (* toolbar_removed) (EggToolbarsModel *model,
+			    int position);
+
+  /* Virtual Table */
+  gboolean (* add_item)    (EggToolbarsModel *t,
+			    int	              toolbar_position,
+			    int               position,
+			    const char       *name);
+};
+
+typedef struct EggToolbarsItemType EggToolbarsItemType;
+
+struct EggToolbarsItemType
+{
+  GdkAtom type;
+        
+  gboolean (* has_data) (EggToolbarsItemType *type,
+                         const char          *name);
+  char *   (* get_data) (EggToolbarsItemType *type,
+                         const char          *name);
+  
+  char *   (* new_name) (EggToolbarsItemType *type,
+                         const char          *data);
+  char *   (* get_name) (EggToolbarsItemType *type,
+                         const char          *data);
+};
+
+GType		  egg_toolbars_model_flags_get_type (void);
+GType		  egg_toolbars_model_get_type       (void);
+EggToolbarsModel *egg_toolbars_model_new	    (void);
+gboolean          egg_toolbars_model_load_names     (EggToolbarsModel *model,
+						     const char *xml_file);
+gboolean          egg_toolbars_model_load_toolbars  (EggToolbarsModel *model,
+						     const char *xml_file);
+void              egg_toolbars_model_save_toolbars  (EggToolbarsModel *model,
+						     const char *xml_file,
+						     const char *version);
+
+/* Functions for manipulating the types of portable data this toolbar understands. */
+GList *           egg_toolbars_model_get_types      (EggToolbarsModel *model);
+void              egg_toolbars_model_set_types      (EggToolbarsModel *model,
+                                                     GList            *types);
+
+/* Functions for converting between name and portable data. */
+char *            egg_toolbars_model_get_name       (EggToolbarsModel *model,
+                                                     GdkAtom           type,
+                                                     const char       *data,
+                                                     gboolean          create);
+char *            egg_toolbars_model_get_data       (EggToolbarsModel *model,
+                                                     GdkAtom           type,
+                                                     const char       *name);
+
+/* Functions for retrieving what items are available for adding to the toolbars. */
+GPtrArray *       egg_toolbars_model_get_name_avail (EggToolbarsModel *model);
+gint              egg_toolbars_model_get_name_flags (EggToolbarsModel *model,
+						     const char *name);
+void              egg_toolbars_model_set_name_flags (EggToolbarsModel *model,
+						     const char *name,
+						     gint flags);
+
+/* Functions for manipulating flags on individual toolbars. */
+EggTbModelFlags   egg_toolbars_model_get_flags      (EggToolbarsModel *model,
+						     int               toolbar_position);
+void              egg_toolbars_model_set_flags      (EggToolbarsModel *model,
+						     int	       toolbar_position,
+						     EggTbModelFlags   flags);
+
+/* Functions for adding and removing toolbars. */
+int               egg_toolbars_model_add_toolbar    (EggToolbarsModel *model,
+						     int               position,
+						     const char       *name);
+void		  egg_toolbars_model_remove_toolbar (EggToolbarsModel *model,
+						     int               position);
+
+/* Functions for adding, removing and moving items. */
+gboolean	  egg_toolbars_model_add_item       (EggToolbarsModel *model,
+						     int	       toolbar_position,
+				                     int               position,
+						     const char       *name);
+void		  egg_toolbars_model_remove_item    (EggToolbarsModel *model,
+						     int               toolbar_position,
+						     int               position);
+void		  egg_toolbars_model_move_item      (EggToolbarsModel *model,
+						     int               toolbar_position,
+						     int               position,
+						     int	       new_toolbar_position,
+						     int               new_position);
+void		  egg_toolbars_model_delete_item    (EggToolbarsModel *model,
+						     const char       *name);
+
+/* Functions for accessing the names of items. */
+int		  egg_toolbars_model_n_items	    (EggToolbarsModel *model,
+						     int               toolbar_position);
+const char *      egg_toolbars_model_item_nth	    (EggToolbarsModel *model,
+						     int	       toolbar_position,
+						     int               position);
+
+/* Functions for accessing the names of toolbars. */
+int		  egg_toolbars_model_n_toolbars	    (EggToolbarsModel *model);
+const char	 *egg_toolbars_model_toolbar_nth    (EggToolbarsModel *model,
+						     int               position);
+
+G_END_DECLS
+
+#endif
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/eggtypebuiltins.c nautilus-2.26.2/cut-n-paste-code/toolbar-editor/eggtypebuiltins.c
--- nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/eggtypebuiltins.c	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/cut-n-paste-code/toolbar-editor/eggtypebuiltins.c	2009-04-15 22:13:23.000000000 +0200
@@ -0,0 +1,55 @@
+
+/* Generated data (by glib-mkenums) */
+
+#include <config.h>
+
+#include "eggtypebuiltins.h"
+
+
+/* enumerations from "egg-toolbars-model.h" */
+#include "egg-toolbars-model.h"
+static const GFlagsValue _egg_tb_model_flags_values[] = {
+  { EGG_TB_MODEL_NOT_REMOVABLE, "EGG_TB_MODEL_NOT_REMOVABLE", "not-removable" },
+  { EGG_TB_MODEL_NOT_EDITABLE, "EGG_TB_MODEL_NOT_EDITABLE", "not-editable" },
+  { EGG_TB_MODEL_BOTH, "EGG_TB_MODEL_BOTH", "both" },
+  { EGG_TB_MODEL_BOTH_HORIZ, "EGG_TB_MODEL_BOTH_HORIZ", "both-horiz" },
+  { EGG_TB_MODEL_ICONS, "EGG_TB_MODEL_ICONS", "icons" },
+  { EGG_TB_MODEL_TEXT, "EGG_TB_MODEL_TEXT", "text" },
+  { EGG_TB_MODEL_STYLES_MASK, "EGG_TB_MODEL_STYLES_MASK", "styles-mask" },
+  { EGG_TB_MODEL_ACCEPT_ITEMS_ONLY, "EGG_TB_MODEL_ACCEPT_ITEMS_ONLY", "accept-items-only" },
+  { EGG_TB_MODEL_HIDDEN, "EGG_TB_MODEL_HIDDEN", "hidden" },
+  { 0, NULL, NULL }
+};
+
+GType
+egg_tb_model_flags_get_type (void)
+{
+  static GType type = 0;
+
+  if (G_UNLIKELY (type == 0))
+    type = g_flags_register_static ("EggTbModelFlags", _egg_tb_model_flags_values);
+
+  return type;
+}
+
+static const GFlagsValue _egg_tb_model_name_flags_values[] = {
+  { EGG_TB_MODEL_NAME_USED, "EGG_TB_MODEL_NAME_USED", "used" },
+  { EGG_TB_MODEL_NAME_INFINITE, "EGG_TB_MODEL_NAME_INFINITE", "infinite" },
+  { EGG_TB_MODEL_NAME_KNOWN, "EGG_TB_MODEL_NAME_KNOWN", "known" },
+  { 0, NULL, NULL }
+};
+
+GType
+egg_tb_model_name_flags_get_type (void)
+{
+  static GType type = 0;
+
+  if (G_UNLIKELY (type == 0))
+    type = g_flags_register_static ("EggTbModelNameFlags", _egg_tb_model_name_flags_values);
+
+  return type;
+}
+
+
+/* Generated data ends here */
+
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/eggtypebuiltins.h nautilus-2.26.2/cut-n-paste-code/toolbar-editor/eggtypebuiltins.h
--- nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/eggtypebuiltins.h	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/cut-n-paste-code/toolbar-editor/eggtypebuiltins.h	2009-04-15 22:13:23.000000000 +0200
@@ -0,0 +1,22 @@
+
+/* Generated data (by glib-mkenums) */
+
+#ifndef __EGGTYPEBUILTINS_H__
+#define __EGGTYPEBUILTINS_H__ 1
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+
+/* --- egg-toolbars-model.h --- */
+#define EGG_TYPE_TB_MODEL_FLAGS egg_tb_model_flags_get_type()
+GType egg_tb_model_flags_get_type (void);
+#define EGG_TYPE_TB_MODEL_NAME_FLAGS egg_tb_model_name_flags_get_type()
+GType egg_tb_model_name_flags_get_type (void);
+G_END_DECLS
+
+#endif /* __EGGTYPEBUILTINS_H__ */
+
+/* Generated data ends here */
+
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/Makefile.am nautilus-2.26.2/cut-n-paste-code/toolbar-editor/Makefile.am
--- nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/Makefile.am	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/cut-n-paste-code/toolbar-editor/Makefile.am	2009-04-15 22:10:58.000000000 +0200
@@ -0,0 +1,106 @@
+EGGSOURCES = \
+	egg-editable-toolbar.c \
+	egg-toolbars-model.c \
+	egg-toolbar-editor.c
+
+EGGHEADERS = \
+	egg-editable-toolbar.h \
+	egg-toolbars-model.h \
+	egg-toolbar-editor.h
+
+noinst_HEADERS = \
+	$(EGGHEADERS) \
+	eggmarshalers.h
+
+noinst_LTLIBRARIES = libtoolbareditor.la
+
+libtoolbareditor_la_SOURCES = 	\
+	$(BUILT_SOURCES) 	\
+	$(EGGSOURCES)		\
+	$(EGGHEADERS) 
+
+libtoolbareditor_la_CPPFLAGS = \
+	$(AM_CPPFLAGS)
+
+libtoolbareditor_la_CFLAGS = \
+	$(SHELL_CORE_CFLAGS)			\
+	$(WARN_CFLAGS)				\
+	$(DISABLE_DEPRECATED)			\
+	-DCURSOR_DIR=\"$(pkgdatadir)\"		\
+	$(AM_CFLAGS)
+
+BUILT_SOURCES = \
+	eggmarshalers.c \
+	eggmarshalers.h \
+	eggtypebuiltins.c \
+	eggtypebuiltins.h
+
+stamp_files = \
+	stamp-eggmarshalers.c \
+	stamp-eggmarshalers.h \
+	stamp-eggtypebuiltins.c \
+	stamp-eggtypebuiltins.h
+
+eggmarshalers.h: stamp-eggmarshalers.h
+	@true
+stamp-eggmarshalers.h: eggmarshalers.list
+	$(GLIB_GENMARSHAL) --prefix=_egg_marshal $(srcdir)/eggmarshalers.list --header > eggmarshalers.h \
+	&& echo timestamp > $(@F)
+
+eggmarshalers.c: stamp-eggmarshalers.c
+	@true
+stamp-eggmarshalers.c: eggmarshalers.list
+	$(GLIB_GENMARSHAL) --prefix=_egg_marshal $(srcdir)/eggmarshalers.list --header --body > eggmarshalers.c \
+	&& echo timestamp > $(@F)
+
+eggtypebuiltins.c: stamp-eggtypebuiltins.c
+	@true
+stamp-eggtypebuiltins.c: $(EGGHEADERS)
+	( cd $(srcdir) && $(GLIB_MKENUMS) \
+		--fhead "#include <config.h>\n\n" \
+		--fhead "#include \"eggtypebuiltins.h\"\n\n" \
+		--fprod "\n/* enumerations from \"@filename@\" */" \
+		--fprod "\n#include \"@filename@\"" \
+		--vhead "static const G@Type@Value _@enum_name@_values[] = {" \
+		--vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
+		--vtail "  { 0, NULL, NULL }\n};\n\n" \
+		--vtail "GType\n@enum_name@_get_type (void)\n{\n" \
+		--vtail "  static GType type = 0;\n\n" \
+		--vtail "  if (G_UNLIKELY (type == 0))\n" \
+		--vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
+		--vtail "  return type;\n}\n\n" \
+		$(^F) ) > xgen-$(@F) \
+	&& ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
+	&& rm -f xgen-$(@F) \
+	&& echo timestamp > $(@F)
+
+eggtypebuiltins.h: stamp-eggtypebuiltins.h
+	@true
+stamp-eggtypebuiltins.h: $(EGGHEADERS)
+	( cd $(srcdir) && $(GLIB_MKENUMS) \
+		--fhead "#ifndef __EGGTYPEBUILTINS_H__\n" \
+		--fhead "#define __EGGTYPEBUILTINS_H__ 1\n\n" \
+		--fhead "#include <glib-object.h>\n\n" \
+		--fhead "G_BEGIN_DECLS\n\n" \
+		--ftail "G_END_DECLS\n\n" \
+		--ftail "#endif /* __EGGTYPEBUILTINS_H__ */\n" \
+		--fprod "\n/* --- @filename@ --- */" \
+		--eprod "#define EGG_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
+		--eprod "GType @enum_name@_get_type (void);\n" \
+		$(^F) ) > xgen-$(@F) \
+	&& ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
+	&& rm -f xgen-$(@F) \
+	&& echo timestamp > $(@F)
+
+EXTRA_DIST = \
+	eggmarshalers.list
+
+EGGFILES=$(EGGSOURCES) $(EGGHEADERS)
+EGGDIR=$(srcdir)/../../../libegg/libegg
+
+regenerate-built-sources:
+	EGGFILES="$(EGGFILES) eggmarshalers.list" EGGDIR="$(EGGDIR)" $(top_srcdir)/cut-n-paste/update-from-egg.sh
+
+CLEANFILES = $(stamp_files) $(BUILT_SOURCES)
+DISTCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
+MAINTAINERCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/Makefile.in nautilus-2.26.2/cut-n-paste-code/toolbar-editor/Makefile.in
--- nautilus-2.26.2.orig/cut-n-paste-code/toolbar-editor/Makefile.in	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/cut-n-paste-code/toolbar-editor/Makefile.in	2009-07-20 22:13:33.000000000 +0200
@@ -0,0 +1,712 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = cut-n-paste/toolbar-editor
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libtoolbareditor_la_LIBADD =
+am__objects_1 = libtoolbareditor_la-eggmarshalers.lo \
+	libtoolbareditor_la-eggtypebuiltins.lo
+am__objects_2 = libtoolbareditor_la-egg-editable-toolbar.lo \
+	libtoolbareditor_la-egg-toolbars-model.lo \
+	libtoolbareditor_la-egg-toolbar-editor.lo
+am__objects_3 =
+am_libtoolbareditor_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
+	$(am__objects_3)
+libtoolbareditor_la_OBJECTS = $(am_libtoolbareditor_la_OBJECTS)
+libtoolbareditor_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(libtoolbareditor_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libtoolbareditor_la_SOURCES)
+DIST_SOURCES = $(libtoolbareditor_la_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BACKEND_CFLAGS = @BACKEND_CFLAGS@
+BACKEND_LIBS = @BACKEND_LIBS@
+BACKEND_LIBTOOL_FLAGS = @BACKEND_LIBTOOL_FLAGS@
+CAIRO_PDF_CFLAGS = @CAIRO_PDF_CFLAGS@
+CAIRO_PDF_LIBS = @CAIRO_PDF_LIBS@
+CAIRO_PS_CFLAGS = @CAIRO_PS_CFLAGS@
+CAIRO_PS_LIBS = @CAIRO_PS_LIBS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_BINDING_TOOL = @DBUS_BINDING_TOOL@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISABLE_DEPRECATED = 
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
+DJVU_CFLAGS = @DJVU_CFLAGS@
+DJVU_LIBS = @DJVU_LIBS@
+DOC_USER_FORMATS = @DOC_USER_FORMATS@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EVINCE_MIME_TYPES = @EVINCE_MIME_TYPES@
+EV_API_VERSION = @EV_API_VERSION@
+EV_BINARY_VERSION = @EV_BINARY_VERSION@
+EV_DOCUMENT_LT_CURRENT_MINUS_AGE = @EV_DOCUMENT_LT_CURRENT_MINUS_AGE@
+EV_DOCUMENT_LT_VERSION_INFO = @EV_DOCUMENT_LT_VERSION_INFO@
+EV_MAJOR_VERSION = @EV_MAJOR_VERSION@
+EV_MICRO_VERSION = @EV_MICRO_VERSION@
+EV_MINOR_VERSION = @EV_MINOR_VERSION@
+EV_VIEW_LT_CURRENT_MINUS_AGE = @EV_VIEW_LT_CURRENT_MINUS_AGE@
+EV_VIEW_LT_VERSION_INFO = @EV_VIEW_LT_VERSION_INFO@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FRONTEND_CFLAGS = @FRONTEND_CFLAGS@
+FRONTEND_CORE_CFLAGS = @FRONTEND_CORE_CFLAGS@
+FRONTEND_CORE_LIBS = @FRONTEND_CORE_LIBS@
+FRONTEND_LIBS = @FRONTEND_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIRDIR = @GIRDIR@
+GIRTYPELIBDIR = @GIRTYPELIBDIR@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_MKENUMS = glib-mkenums
+GLIB_REQUIRED = @GLIB_REQUIRED@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GOBJECT_INTROSPECTION_CFLAGS = @GOBJECT_INTROSPECTION_CFLAGS@
+GOBJECT_INTROSPECTION_LIBS = @GOBJECT_INTROSPECTION_LIBS@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+GTK_REQUIRED = @GTK_REQUIRED@
+G_IR_COMPILER = @G_IR_COMPILER@
+G_IR_GENERATE = @G_IR_GENERATE@
+G_IR_SCANNER = @G_IR_SCANNER@
+HELP_DIR = @HELP_DIR@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+KEYRING_CFLAGS = @KEYRING_CFLAGS@
+KEYRING_LIBS = @KEYRING_LIBS@
+LDFLAGS = @LDFLAGS@
+LIBDOCUMENT_CFLAGS = @LIBDOCUMENT_CFLAGS@
+LIBDOCUMENT_LIBS = @LIBDOCUMENT_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBVIEW_CFLAGS = @LIBVIEW_CFLAGS@
+LIBVIEW_LIBS = @LIBVIEW_LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NAUTILUS_CFLAGS = @NAUTILUS_CFLAGS@
+NAUTILUS_EXTENSION_DIR = @NAUTILUS_EXTENSION_DIR@
+NAUTILUS_LIBS = @NAUTILUS_LIBS@
+NMEDIT = @NMEDIT@
+OBJEXT = @OBJEXT@
+OMF_DIR = @OMF_DIR@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POPPLER_CFLAGS = @POPPLER_CFLAGS@
+POPPLER_LIBS = @POPPLER_LIBS@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SHELL_CFLAGS = @SHELL_CFLAGS@
+SHELL_CORE_CFLAGS = @CORE_CFLAGS@
+SHELL_CORE_LIBS = @CORE_LIBS@
+SHELL_LIBS = @LIBS@
+SMCLIENT_CFLAGS = @SMCLIENT_CFLAGS@
+SMCLIENT_LIBS = @SMCLIENT_LIBS@
+SPECTRE_CFLAGS = @SPECTRE_CFLAGS@
+SPECTRE_LIBS = @SPECTRE_LIBS@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_CFLAGS = -Wall
+WARN_CXXFLAGS = @WARN_CXXFLAGS@
+WINDRES = @WINDRES@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+backenddir = @backenddir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EGGSOURCES = \
+	egg-editable-toolbar.c \
+	egg-toolbars-model.c \
+	egg-toolbar-editor.c
+
+EGGHEADERS = \
+	egg-editable-toolbar.h \
+	egg-toolbars-model.h \
+	egg-toolbar-editor.h
+
+noinst_HEADERS = \
+	$(EGGHEADERS) \
+	eggmarshalers.h
+
+noinst_LTLIBRARIES = libtoolbareditor.la
+libtoolbareditor_la_SOURCES = \
+	$(BUILT_SOURCES) 	\
+	$(EGGSOURCES)		\
+	$(EGGHEADERS) 
+
+libtoolbareditor_la_CPPFLAGS = \
+	$(AM_CPPFLAGS)
+
+libtoolbareditor_la_CFLAGS = \
+	$(SHELL_CORE_CFLAGS)			\
+	$(WARN_CFLAGS)				\
+	$(DISABLE_DEPRECATED)			\
+	-DCURSOR_DIR=\"$(pkgdatadir)\"		\
+	$(AM_CFLAGS)
+
+BUILT_SOURCES = \
+	eggmarshalers.c \
+	eggmarshalers.h \
+	eggtypebuiltins.c \
+	eggtypebuiltins.h
+
+stamp_files = \
+	stamp-eggmarshalers.c \
+	stamp-eggmarshalers.h \
+	stamp-eggtypebuiltins.c \
+	stamp-eggtypebuiltins.h
+
+EXTRA_DIST = \
+	eggmarshalers.list
+
+EGGFILES = $(EGGSOURCES) $(EGGHEADERS)
+EGGDIR = $(srcdir)/../../../libegg/libegg
+CLEANFILES = $(stamp_files) $(BUILT_SOURCES)
+DISTCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
+MAINTAINERCLEANFILES = $(stamp_files) $(BUILT_SOURCES)
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  cut-n-paste/toolbar-editor/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  cut-n-paste/toolbar-editor/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libtoolbareditor.la: $(libtoolbareditor_la_OBJECTS) $(libtoolbareditor_la_DEPENDENCIES) 
+	$(libtoolbareditor_la_LINK)  $(libtoolbareditor_la_OBJECTS) $(libtoolbareditor_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolbareditor_la-egg-editable-toolbar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolbareditor_la-egg-toolbar-editor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolbareditor_la-egg-toolbars-model.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolbareditor_la-eggmarshalers.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolbareditor_la-eggtypebuiltins.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+libtoolbareditor_la-eggmarshalers.lo: eggmarshalers.c
+@am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolbareditor_la_CPPFLAGS) $(CPPFLAGS) $(libtoolbareditor_la_CFLAGS) $(CFLAGS) -MT libtoolbareditor_la-eggmarshalers.lo -MD -MP -MF $(DEPDIR)/libtoolbareditor_la-eggmarshalers.Tpo -c -o libtoolbareditor_la-eggmarshalers.lo `test -f 'eggmarshalers.c' || echo '$(srcdir)/'`eggmarshalers.c
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libtoolbareditor_la-eggmarshalers.Tpo $(DEPDIR)/libtoolbareditor_la-eggmarshalers.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='eggmarshalers.c' object='libtoolbareditor_la-eggmarshalers.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolbareditor_la_CPPFLAGS) $(CPPFLAGS) $(libtoolbareditor_la_CFLAGS) $(CFLAGS) -c -o libtoolbareditor_la-eggmarshalers.lo `test -f 'eggmarshalers.c' || echo '$(srcdir)/'`eggmarshalers.c
+
+libtoolbareditor_la-eggtypebuiltins.lo: eggtypebuiltins.c
+@am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolbareditor_la_CPPFLAGS) $(CPPFLAGS) $(libtoolbareditor_la_CFLAGS) $(CFLAGS) -MT libtoolbareditor_la-eggtypebuiltins.lo -MD -MP -MF $(DEPDIR)/libtoolbareditor_la-eggtypebuiltins.Tpo -c -o libtoolbareditor_la-eggtypebuiltins.lo `test -f 'eggtypebuiltins.c' || echo '$(srcdir)/'`eggtypebuiltins.c
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libtoolbareditor_la-eggtypebuiltins.Tpo $(DEPDIR)/libtoolbareditor_la-eggtypebuiltins.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='eggtypebuiltins.c' object='libtoolbareditor_la-eggtypebuiltins.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolbareditor_la_CPPFLAGS) $(CPPFLAGS) $(libtoolbareditor_la_CFLAGS) $(CFLAGS) -c -o libtoolbareditor_la-eggtypebuiltins.lo `test -f 'eggtypebuiltins.c' || echo '$(srcdir)/'`eggtypebuiltins.c
+
+libtoolbareditor_la-egg-editable-toolbar.lo: egg-editable-toolbar.c
+@am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolbareditor_la_CPPFLAGS) $(CPPFLAGS) $(libtoolbareditor_la_CFLAGS) $(CFLAGS) -MT libtoolbareditor_la-egg-editable-toolbar.lo -MD -MP -MF $(DEPDIR)/libtoolbareditor_la-egg-editable-toolbar.Tpo -c -o libtoolbareditor_la-egg-editable-toolbar.lo `test -f 'egg-editable-toolbar.c' || echo '$(srcdir)/'`egg-editable-toolbar.c
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libtoolbareditor_la-egg-editable-toolbar.Tpo $(DEPDIR)/libtoolbareditor_la-egg-editable-toolbar.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='egg-editable-toolbar.c' object='libtoolbareditor_la-egg-editable-toolbar.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolbareditor_la_CPPFLAGS) $(CPPFLAGS) $(libtoolbareditor_la_CFLAGS) $(CFLAGS) -c -o libtoolbareditor_la-egg-editable-toolbar.lo `test -f 'egg-editable-toolbar.c' || echo '$(srcdir)/'`egg-editable-toolbar.c
+
+libtoolbareditor_la-egg-toolbars-model.lo: egg-toolbars-model.c
+@am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolbareditor_la_CPPFLAGS) $(CPPFLAGS) $(libtoolbareditor_la_CFLAGS) $(CFLAGS) -MT libtoolbareditor_la-egg-toolbars-model.lo -MD -MP -MF $(DEPDIR)/libtoolbareditor_la-egg-toolbars-model.Tpo -c -o libtoolbareditor_la-egg-toolbars-model.lo `test -f 'egg-toolbars-model.c' || echo '$(srcdir)/'`egg-toolbars-model.c
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libtoolbareditor_la-egg-toolbars-model.Tpo $(DEPDIR)/libtoolbareditor_la-egg-toolbars-model.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='egg-toolbars-model.c' object='libtoolbareditor_la-egg-toolbars-model.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolbareditor_la_CPPFLAGS) $(CPPFLAGS) $(libtoolbareditor_la_CFLAGS) $(CFLAGS) -c -o libtoolbareditor_la-egg-toolbars-model.lo `test -f 'egg-toolbars-model.c' || echo '$(srcdir)/'`egg-toolbars-model.c
+
+libtoolbareditor_la-egg-toolbar-editor.lo: egg-toolbar-editor.c
+@am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolbareditor_la_CPPFLAGS) $(CPPFLAGS) $(libtoolbareditor_la_CFLAGS) $(CFLAGS) -MT libtoolbareditor_la-egg-toolbar-editor.lo -MD -MP -MF $(DEPDIR)/libtoolbareditor_la-egg-toolbar-editor.Tpo -c -o libtoolbareditor_la-egg-toolbar-editor.lo `test -f 'egg-toolbar-editor.c' || echo '$(srcdir)/'`egg-toolbar-editor.c
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libtoolbareditor_la-egg-toolbar-editor.Tpo $(DEPDIR)/libtoolbareditor_la-egg-toolbar-editor.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='egg-toolbar-editor.c' object='libtoolbareditor_la-egg-toolbar-editor.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolbareditor_la_CPPFLAGS) $(CPPFLAGS) $(libtoolbareditor_la_CFLAGS) $(CFLAGS) -c -o libtoolbareditor_la-egg-toolbar-editor.lo `test -f 'egg-toolbar-editor.c' || echo '$(srcdir)/'`egg-toolbar-editor.c
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+eggmarshalers.h: stamp-eggmarshalers.h
+	@true
+stamp-eggmarshalers.h: eggmarshalers.list
+	$(GLIB_GENMARSHAL) --prefix=_egg_marshal $(srcdir)/eggmarshalers.list --header > eggmarshalers.h \
+	&& echo timestamp > $(@F)
+
+eggmarshalers.c: stamp-eggmarshalers.c
+	@true
+stamp-eggmarshalers.c: eggmarshalers.list
+	$(GLIB_GENMARSHAL) --prefix=_egg_marshal $(srcdir)/eggmarshalers.list --header --body > eggmarshalers.c \
+	&& echo timestamp > $(@F)
+
+eggtypebuiltins.c: stamp-eggtypebuiltins.c
+	@true
+stamp-eggtypebuiltins.c: $(EGGHEADERS)
+	( cd $(srcdir) && $(GLIB_MKENUMS) \
+		--fhead "#include <config.h>\n\n" \
+		--fhead "#include \"eggtypebuiltins.h\"\n\n" \
+		--fprod "\n/* enumerations from \"@filename@\" */" \
+		--fprod "\n#include \"@filename@\"" \
+		--vhead "static const G@Type@Value _@enum_name@_values[] = {" \
+		--vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
+		--vtail "  { 0, NULL, NULL }\n};\n\n" \
+		--vtail "GType\n@enum_name@_get_type (void)\n{\n" \
+		--vtail "  static GType type = 0;\n\n" \
+		--vtail "  if (G_UNLIKELY (type == 0))\n" \
+		--vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
+		--vtail "  return type;\n}\n\n" \
+		$(^F) ) > xgen-$(@F) \
+	&& ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
+	&& rm -f xgen-$(@F) \
+	&& echo timestamp > $(@F)
+
+eggtypebuiltins.h: stamp-eggtypebuiltins.h
+	@true
+stamp-eggtypebuiltins.h: $(EGGHEADERS)
+	( cd $(srcdir) && $(GLIB_MKENUMS) \
+		--fhead "#ifndef __EGGTYPEBUILTINS_H__\n" \
+		--fhead "#define __EGGTYPEBUILTINS_H__ 1\n\n" \
+		--fhead "#include <glib-object.h>\n\n" \
+		--fhead "G_BEGIN_DECLS\n\n" \
+		--ftail "G_END_DECLS\n\n" \
+		--ftail "#endif /* __EGGTYPEBUILTINS_H__ */\n" \
+		--fprod "\n/* --- @filename@ --- */" \
+		--eprod "#define EGG_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \
+		--eprod "GType @enum_name@_get_type (void);\n" \
+		$(^F) ) > xgen-$(@F) \
+	&& ( cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%) ) \
+	&& rm -f xgen-$(@F) \
+	&& echo timestamp > $(@F)
+
+regenerate-built-sources:
+	EGGFILES="$(EGGFILES) eggmarshalers.list" EGGDIR="$(EGGDIR)" $(top_srcdir)/cut-n-paste/update-from-egg.sh
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/Makefile.am nautilus-2.26.2/src/Makefile.am
--- nautilus-2.26.2.orig/src/Makefile.am	2008-10-07 21:37:07.000000000 +0200
+++ nautilus-2.26.2/src/Makefile.am	2009-07-20 22:23:45.000000000 +0200
@@ -12,6 +12,7 @@
 INCLUDES =							\
 	-I$(top_srcdir) 					\
 	-I$(top_srcdir)/cut-n-paste-code			\
+	-I$(top_srcdir)/cut-n-paste-code/toolbar-editor		\
 	-I$(top_builddir)/libnautilus-private 			\
 	$(CORE_CFLAGS) 						\
 	$(EXIF_CFLAGS)						\
@@ -30,6 +31,7 @@
 LDADD =\
 	$(top_builddir)/src/file-manager/libnautilus-file-manager.la \
 	$(top_builddir)/libnautilus-private/libnautilus-private.la  \
+	$(top_builddir)/cut-n-paste-code/toolbar-editor/libtoolbareditor.la  \
 	$(CORE_LIBS) \
 	$(EXIF_LIBS) \
 	$(EXEMPI_LIBS) \
@@ -78,6 +80,14 @@
 	nautilus-location-entry.h               \
 	nautilus-main.c 			\
 	nautilus-main.h				\
+        nautilus-zoom-action.c                  \
+        nautilus-zoom-action.h                  \
+        nautilus-view-chooser-action.c          \
+        nautilus-view-chooser-action.h          \
+        nautilus-location-bar-action.c          \
+        nautilus-location-bar-action.h          \
+	nautilus-navigation-action.c		\
+	nautilus-navigation-action.h		\
 	nautilus-navigation-action.c		\
 	nautilus-navigation-action.h		\
 	nautilus-navigation-bar.c         	\
@@ -107,10 +117,14 @@
 	nautilus-side-pane.h			\
 	nautilus-sidebar-title.c		\
 	nautilus-sidebar-title.h		\
+ 	nautilus-singleton-action.c		\
+ 	nautilus-singleton-action.h		\
 	nautilus-spatial-window.c               \
 	nautilus-spatial-window.h               \
 	nautilus-throbber.c			\
 	nautilus-throbber.h			\
+ 	nautilus-toolbars-model.c               \
+ 	nautilus-toolbars-model.h               \
 	nautilus-trash-bar.c			\
 	nautilus-trash-bar.h			\
 	nautilus-window-bookmarks.c		\
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/Makefile.in nautilus-2.26.2/src/Makefile.in
--- nautilus-2.26.2.orig/src/Makefile.in	2009-04-13 19:55:01.000000000 +0200
+++ nautilus-2.26.2/src/Makefile.in	2009-07-20 22:22:37.000000000 +0200
@@ -67,17 +67,21 @@
 	nautilus-location-bar.$(OBJEXT) \
 	nautilus-location-dialog.$(OBJEXT) \
 	nautilus-location-entry.$(OBJEXT) nautilus-main.$(OBJEXT) \
+        nautilus-zoom-action.$(OBJEXT) \
+        nautilus-view-chooser-action.$(OBJEXT) \
 	nautilus-navigation-action.$(OBJEXT) \
 	nautilus-navigation-bar.$(OBJEXT) \
 	nautilus-navigation-window-menus.$(OBJEXT) \
 	nautilus-navigation-window.$(OBJEXT) \
 	nautilus-navigation-window-slot.$(OBJEXT) \
+	nautilus-location-bar-action.$(OBJEXT) \
 	nautilus-notebook.$(OBJEXT) nautilus-notes-viewer.$(OBJEXT) \
 	nautilus-pathbar.$(OBJEXT) nautilus-places-sidebar.$(OBJEXT) \
 	nautilus-property-browser.$(OBJEXT) \
 	nautilus-query-editor.$(OBJEXT) nautilus-search-bar.$(OBJEXT) \
 	nautilus-self-check-functions.$(OBJEXT) \
 	nautilus-side-pane.$(OBJEXT) nautilus-sidebar-title.$(OBJEXT) \
+	nautilus-toolbars-model.$(OBJEXT) \
 	nautilus-spatial-window.$(OBJEXT) nautilus-throbber.$(OBJEXT) \
 	nautilus-trash-bar.$(OBJEXT) \
 	nautilus-window-bookmarks.$(OBJEXT) \
@@ -375,6 +379,7 @@
 INCLUDES = \
 	-I$(top_srcdir) 					\
 	-I$(top_srcdir)/cut-n-paste-code			\
+	-I$(top_srcdir)/cut-n-paste-code/toolbar-editor		\
 	-I$(top_builddir)/libnautilus-private 			\
 	$(CORE_CFLAGS) 						\
 	$(EXIF_CFLAGS)						\
@@ -393,6 +398,7 @@
 LDADD = \
 	$(top_builddir)/src/file-manager/libnautilus-file-manager.la \
 	$(top_builddir)/libnautilus-private/libnautilus-private.la  \
+	$(top_builddir)/cut-n-paste-code/toolbar-editor/libtoolbareditor.la  \
 	$(CORE_LIBS) \
 	$(EXIF_LIBS) \
 	$(EXEMPI_LIBS) \
@@ -437,6 +443,12 @@
 	nautilus-location-entry.h               \
 	nautilus-main.c 			\
 	nautilus-main.h				\
+        nautilus-zoom-action.c                  \
+        nautilus-zoom-action.h                  \
+        nautilus-view-chooser-action.c          \
+        nautilus-view-chooser-action.h          \
+        nautilus-location-bar-action.c          \
+        nautilus-location-bar-action.h          \
 	nautilus-navigation-action.c		\
 	nautilus-navigation-action.h		\
 	nautilus-navigation-bar.c         	\
@@ -466,12 +478,16 @@
 	nautilus-side-pane.h			\
 	nautilus-sidebar-title.c		\
 	nautilus-sidebar-title.h		\
+ 	nautilus-singleton-action.c		\
+ 	nautilus-singleton-action.h		\
 	nautilus-spatial-window.c               \
 	nautilus-spatial-window.h               \
 	nautilus-throbber.c			\
 	nautilus-throbber.h			\
 	nautilus-trash-bar.c			\
 	nautilus-trash-bar.h			\
+ 	nautilus-toolbars-model.c               \
+ 	nautilus-toolbars-model.h               \
 	nautilus-window-bookmarks.c		\
 	nautilus-window-bookmarks.h		\
 	nautilus-window-manage-views.c		\
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-actions.h nautilus-2.26.2/src/nautilus-actions.h
--- nautilus-2.26.2.orig/src/nautilus-actions.h	2008-09-14 14:14:22.000000000 +0200
+++ nautilus-2.26.2/src/nautilus-actions.h	2009-07-18 20:53:17.000000000 +0200
@@ -36,7 +36,6 @@
 #define NAUTILUS_ACTION_SHOW_HIDE_TOOLBAR "Show Hide Toolbar"
 #define NAUTILUS_ACTION_SHOW_HIDE_SIDEBAR "Show Hide Sidebar"
 #define NAUTILUS_ACTION_SHOW_HIDE_STATUSBAR "Show Hide Statusbar"
-#define NAUTILUS_ACTION_SHOW_HIDE_LOCATION_BAR "Show Hide Location Bar"
 #define NAUTILUS_ACTION_GO_TO_BURN_CD "Go to Burn CD"
 #define NAUTILUS_ACTION_GO_TO_LOCATION "Go to Location"
 #define NAUTILUS_ACTION_GO_HOME "Home"
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-location-bar-action.c nautilus-2.26.2/src/nautilus-location-bar-action.c
--- nautilus-2.26.2.orig/src/nautilus-location-bar-action.c	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/src/nautilus-location-bar-action.c	2009-07-19 17:07:29.000000000 +0200
@@ -0,0 +1,414 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
+/*
+ *  Nautilus
+ *
+ *  Copyright (C) 2004 Red Hat, Inc.
+ *  Copyright (C) 2003 Marco Pesenti Gritti
+ *
+ *  Nautilus 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.
+ *
+ *  Nautilus 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Based on ephy-navigation-action.h from Epiphany
+ *
+ *  Authors: Alexander Larsson <alexl@redhat.com>
+ *           Marco Pesenti Gritti //XXXMARCUS TODO
+ *
+ */
+
+#include <config.h>
+
+#include "nautilus-location-bar-action.h"
+#include "nautilus-location-bar.h"
+#include "nautilus-navigation-window.h"
+#include "nautilus-window-private.h"
+#include "nautilus-navigation-window-slot.h"
+#include <gtk/gtk.h>
+#include <eel/eel-gtk-extensions.h>
+
+static void nautilus_location_bar_action_init       (NautilusLocationBarAction *action);
+static void nautilus_location_bar_action_class_init (NautilusLocationBarActionClass *class);
+
+static GObjectClass *parent_class = NULL;
+
+#define NAUTILUS_LOCATION_BAR_ACTION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), NAUTILUS_TYPE_LOCATION_BAR_ACTION, NautilusLocationBarActionPrivate))
+
+struct NautilusLocationBarActionPrivate
+{
+	NautilusNavigationWindow *window;
+        //GtkWidget *singleton;
+        //TODO: ?
+};
+
+enum
+{
+	PROP_0,
+	PROP_WINDOW
+};
+
+GType
+nautilus_location_bar_action_get_type (void)
+{
+	static GType type = 0;
+
+	if (type == 0) {
+		const GTypeInfo type_info = {
+			sizeof (NautilusLocationBarActionClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) nautilus_location_bar_action_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,
+			sizeof (NautilusLocationBarAction),
+			0, /* n_preallocs */
+			(GInstanceInitFunc) nautilus_location_bar_action_init,
+		};
+		
+		type = g_type_register_static (GTK_TYPE_ACTION,
+					       "NautilusLocationBarAction",
+					       &type_info, 0);
+	}
+
+	return type;
+}
+
+
+
+static GtkWidget *
+create_tool_item (GtkAction *action)
+{
+	NautilusNavigationWindow *window;
+        NautilusLocationBarAction *laction;
+        laction = NAUTILUS_LOCATION_BAR_ACTION (action);
+
+	window = laction->priv->window;
+        //if (laction->priv->singleton) {
+        //        gtk_widget_unparent (laction->priv->singleton); //Hackish?
+        //        return laction->priv->singleton;
+        //}
+        
+        fprintf(stderr, "Creating LocationBar Tool Item\n");
+
+        GtkToolItem *proxy;
+	GtkWidget *hbox;
+        GtkWidget *item;
+
+        hbox = gtk_hbox_new (FALSE, 12); //nautilus_location_bar_control_new (); 12?
+
+        gtk_widget_show (hbox);
+
+	//window->details->location_button; // = location_button_create (window);
+
+        if (!window->path_bar)
+                fprintf(stderr, "PATH DOESNT EXISTS\n");
+        else
+                fprintf(stderr, "PATH EXISTS!!\n");
+
+	gtk_box_pack_start (GTK_BOX (hbox), window->details->location_button, FALSE, FALSE, 0);
+	gtk_widget_show (window->details->location_button);
+
+	//window->path_bar = g_object_new (NAUTILUS_TYPE_PATH_BAR, NULL);
+ 	gtk_widget_show (window->path_bar);
+	
+	/*g_signal_connect_object (window->path_bar, "path_clicked",
+				 G_CALLBACK (path_bar_location_changed_callback), window, 0);
+	g_signal_connect_object (window->path_bar, "path_set",
+				 G_CALLBACK (path_bar_path_set_callback), window, 0);*/
+	
+	gtk_box_pack_start (GTK_BOX (hbox),
+			    window->path_bar,
+			    TRUE, TRUE, 0);
+
+        //GtkWidget *navigation_bar = nautilus_location_bar_new (window); 
+	/*g_signal_connect_object (window->navigation_bar, "location_changed",
+				 G_CALLBACK (navigation_bar_location_changed_callback), window, 0);
+	g_signal_connect_object (window->navigation_bar, "cancel",
+				 G_CALLBACK (navigation_bar_cancel_callback), window, 0);*/
+
+	gtk_box_pack_start (GTK_BOX (hbox),
+			    window->navigation_bar,
+			    TRUE, TRUE, 0);
+
+	//GtkWidget *search_bar = wind nautilus_search_bar_new ();
+
+
+	gtk_box_pack_start (GTK_BOX (hbox),
+			    window->search_bar,
+			    TRUE, TRUE, 0);
+
+
+        proxy = gtk_tool_item_new ();
+	gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
+	gtk_widget_show (GTK_WIDGET (proxy));
+	gtk_container_add (GTK_CONTAINER (proxy), hbox);
+
+        //laction->priv->singleton = proxy;
+	 //g_object_new (nautilus_action_widget_get_type (), NULL);
+	//gtk_widget_show (GTK_WIDGET (proxy));
+        return proxy;
+	//gtk_container_set_border_width (GTK_CONTAINER (proxy), 6); 
+	//gtk_widget_show (GTK_WIDGET (proxy));
+
+	//hbox = gtk_hbox_new (FALSE, 0);
+	//gtk_box_set_spacing (GTK_BOX (hbox), 6);
+
+	//proxy->entry = gtk_entry_new ();
+	//obj = gtk_widget_get_accessible (proxy->entry);
+        //atk_object_set_name (obj, "page-label-entry");
+	         
+	//g_signal_connect(proxy->entry, "scroll-event",G_CALLBACK(page_scroll_cb),action);
+	//gtk_widget_add_events(GTK_WIDGET(proxy->entry),GDK_BUTTON_MOTION_MASK);
+	//gtk_entry_set_width_chars (GTK_ENTRY (proxy->entry), 5);
+	//gtk_box_pack_start (GTK_BOX (hbox), proxy, FALSE, FALSE, 0);
+	//gtk_widget_show (proxy->entry);
+	/*g_signal_connect (proxy->entry, "activate",
+			  G_CALLBACK (activate_cb),
+			  action);
+
+	proxy->label = gtk_label_new (NULL);
+	gtk_box_pack_start (GTK_BOX (hbox), proxy->label, FALSE, FALSE, 0);
+	gtk_widget_show (proxy->label);*/
+
+	//gtk_container_add (GTK_CONTAINER (proxy), hbox);
+	//gtk_widget_show (hbox);
+
+	//return GTK_WIDGET (proxy);
+
+
+}
+/*static void
+activate_back_menu_item_callback (GtkMenuItem *menu_item, NautilusNavigationWindow *window)
+{
+	activate_back_or_forward_menu_item (menu_item, window, TRUE);
+}
+
+static void
+activate_forward_menu_item_callback (GtkMenuItem *menu_item, NautilusNavigationWindow *window)
+{
+	activate_back_or_forward_menu_item (menu_item, window, FALSE);
+}
+
+static void
+fill_menu (NautilusNavigationWindow *window,
+	   GtkWidget *menu,
+	   gboolean back)
+{
+	NautilusNavigationWindowSlot *slot;
+	GtkWidget *menu_item;
+	int index;
+	GList *list;
+
+	g_assert (NAUTILUS_IS_NAVIGATION_WINDOW (window));
+
+	slot = NAUTILUS_NAVIGATION_WINDOW_SLOT (NAUTILUS_WINDOW (window)->details->active_slot);
+	
+	list = back ? slot->back_list : slot->forward_list;
+	index = 0;
+	while (list != NULL) {
+		menu_item = nautilus_bookmark_menu_item_new (NAUTILUS_BOOKMARK (list->data));
+		g_object_set_data (G_OBJECT (menu_item), "user_data", GINT_TO_POINTER (index));
+		gtk_widget_show (GTK_WIDGET (menu_item));
+  		g_signal_connect_object (menu_item, "activate",
+					 back
+					 ? G_CALLBACK (activate_back_menu_item_callback)
+					 : G_CALLBACK (activate_forward_menu_item_callback),
+					 window, 0);
+		
+		gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+		list = g_list_next (list);
+		++index;
+	}
+}
+
+static void
+show_menu_callback (GtkMenuToolButton *button,
+		    NautilusNavigationAction *action)
+{
+	NautilusNavigationActionPrivate *p;
+	NautilusNavigationWindow *window;
+	GtkWidget *menu;
+	GList *children;
+	GList *li;
+
+	p = action->priv;
+	window = action->priv->window;
+	
+	menu = gtk_menu_tool_button_get_menu (button);
+	
+	children = gtk_container_get_children (GTK_CONTAINER (menu));
+	for (li = children; li; li = li->next) {
+		gtk_container_remove (GTK_CONTAINER (menu), li->data);
+	}
+	g_list_free (children);
+
+	switch (p->direction) {
+	case NAUTILUS_NAVIGATION_DIRECTION_FORWARD:
+		fill_menu (window, menu, FALSE);
+		break;
+	case NAUTILUS_NAVIGATION_DIRECTION_BACK:
+		fill_menu (window, menu, TRUE);
+		break;
+	default:
+		g_assert_not_reached ();
+		break;
+	}
+}
+
+static gboolean
+proxy_button_press_event_cb (GtkButton *button,
+			     GdkEventButton *event,
+			     gpointer user_data)
+{
+	if (event->button == 2) {
+		gtk_button_pressed (button);
+	}
+
+	return FALSE;
+}
+
+static gboolean
+proxy_button_release_event_cb (GtkButton *button,
+			       GdkEventButton *event,
+			       gpointer user_data)
+{
+	if (event->button == 2) {
+		gtk_button_released (button);
+	}
+
+	return FALSE;
+}
+*/
+static void
+connect_proxy (GtkAction *action, GtkWidget *proxy)
+{
+	if (GTK_IS_MENU_TOOL_BUTTON (proxy)) {
+		NautilusLocationBarAction *naction = NAUTILUS_LOCATION_BAR_ACTION (action);
+		//GtkMenuToolButton *button = GTK_MENU_TOOL_BUTTON (proxy);
+		//GtkWidget *child;
+
+		/* set an empty menu, so the arrow button becomes sensitive */
+		//menu = gtk_menu_new ();
+		//gtk_menu_tool_button_set_menu (button, menu);
+
+		//gtk_menu_tool_button_set_arrow_tooltip_text (button,
+		//					     naction->priv->arrow_tooltip);
+		
+		/*g_signal_connect (proxy, "show-menu",
+				  G_CALLBACK (show_menu_callback), action);*/
+
+		/* Make sure that middle click works. Note that there is some code duplication
+		 * between here and nautilus-window-menus.c */
+		//child = eel_gtk_menu_tool_button_get_button (button);
+		//g_signal_connect (child, "button-press-event", G_CALLBACK (proxy_button_press_event_cb), NULL);
+		//g_signal_connect (child, "button-release-event", G_CALLBACK (proxy_button_release_event_cb), NULL);
+	}
+
+	(* GTK_ACTION_CLASS (parent_class)->connect_proxy) (action, proxy);
+}
+
+static void
+disconnect_proxy (GtkAction *action, GtkWidget *proxy)
+{
+	if (GTK_IS_MENU_TOOL_BUTTON (proxy)) {
+		GtkWidget *child;
+		
+		//g_signal_handlers_disconnect_by_func (proxy, G_CALLBACK (show_menu_callback), action);
+
+		//child = eel_gtk_menu_tool_button_get_button (GTK_MENU_TOOL_BUTTON (proxy));
+		//g_signal_handlers_disconnect_by_func (child, G_CALLBACK (proxy_button_press_event_cb), NULL);
+		//g_signal_handlers_disconnect_by_func (child, G_CALLBACK (proxy_button_release_event_cb), NULL);
+	}
+
+	(* GTK_ACTION_CLASS (parent_class)->disconnect_proxy) (action, proxy);
+}
+
+static void
+nautilus_location_bar_action_finalize (GObject *object)
+{
+	NautilusLocationBarAction *action = NAUTILUS_LOCATION_BAR_ACTION (object);
+
+	//g_free (action->priv->arrow_tooltip);
+
+	(* G_OBJECT_CLASS (parent_class)->finalize) (object);
+}
+
+static void
+nautilus_location_bar_action_set_property (GObject *object,
+					 guint prop_id,
+					 const GValue *value,
+					 GParamSpec *pspec)
+{
+	NautilusLocationBarAction *nav;
+
+	nav = NAUTILUS_LOCATION_BAR_ACTION (object);
+
+	switch (prop_id)
+	{
+		case PROP_WINDOW:
+			nav->priv->window = NAUTILUS_NAVIGATION_WINDOW (g_value_get_object (value));
+			break;
+	}
+}
+
+static void
+nautilus_location_bar_action_get_property (GObject *object,
+					 guint prop_id,
+					 GValue *value,
+					 GParamSpec *pspec)
+{
+	NautilusLocationBarAction *nav;
+
+	nav = NAUTILUS_LOCATION_BAR_ACTION (object);
+
+	switch (prop_id)
+	{
+		case PROP_WINDOW:
+			g_value_set_object (value, nav->priv->window);
+			break;
+	}
+}
+
+static void
+nautilus_location_bar_action_class_init (NautilusLocationBarActionClass *class)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (class);
+	GtkActionClass *action_class = GTK_ACTION_CLASS (class);
+
+	object_class->finalize = nautilus_location_bar_action_finalize;
+	object_class->set_property = nautilus_location_bar_action_set_property;
+	object_class->get_property = nautilus_location_bar_action_get_property;
+
+	parent_class = g_type_class_peek_parent (class);
+
+	action_class->toolbar_item_type = GTK_TYPE_MENU_TOOL_BUTTON;
+	//action_class->connect_proxy = connect_proxy;
+	//action_class->disconnect_proxy = disconnect_proxy;
+	action_class->create_tool_item = create_tool_item;
+
+	g_object_class_install_property (object_class,
+                                         PROP_WINDOW,
+                                         g_param_spec_object ("window",
+                                                              "Window",
+                                                              "The navigation window",
+                                                              G_TYPE_OBJECT,
+                                                              G_PARAM_READWRITE));
+
+	g_type_class_add_private (object_class, sizeof(NautilusLocationBarActionPrivate));
+}
+
+static void
+nautilus_location_bar_action_init (NautilusLocationBarAction *action)
+{
+        action->priv = NAUTILUS_LOCATION_BAR_ACTION_GET_PRIVATE (action);
+}
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-location-bar-action.h nautilus-2.26.2/src/nautilus-location-bar-action.h
--- nautilus-2.26.2.orig/src/nautilus-location-bar-action.h	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/src/nautilus-location-bar-action.h	2009-07-19 16:11:42.000000000 +0200
@@ -0,0 +1,62 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
+/*
+ *  Nautilus
+ *
+ *  Copyright (C) 2004 Red Hat, Inc.
+ *  Copyright (C) 2003 Marco Pesenti Gritti
+ *
+ *  Nautilus 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.
+ *
+ *  Nautilus 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *
+ *  Based on nautilus-navigation-action.h
+ *
+ *  Authors: Alexander Larsson <alexl@redhat.com>
+ *           Marco Pesenti Gritti //XXXMARCUS TODO
+ *
+ */
+
+#ifndef NAUTILUS_LOCATION_BAR_ACTION_H
+#define NAUTILUS_LOCATION_BAR_ACTION_H
+
+#include <gtk/gtk.h>
+
+#define NAUTILUS_TYPE_LOCATION_BAR_ACTION            (nautilus_location_bar_action_get_type ())
+#define NAUTILUS_LOCATION_BAR_ACTION(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_LOCATION_BAR_ACTION, NautilusLocationBarAction))
+#define NAUTILUS_LOCATION_BAR_ACTION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_LOCATION_BAR_ACTION, NautilusLocationBarActionClass))
+#define NAUTILUS_IS_LOCATION_BAR_ACTION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_LOCATION_BAR_ACTION))
+#define NAUTILUS_IS_LOCATION_BAR_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NAUTILUS_TYPE_LOCATION_BAR_ACTION))
+#define NAUTILUS_LOCATION_BAR_ACTION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), NAUTILUS_TYPE_LOCATION_BAR_ACTION, NautilusLocationBarActionClass))
+
+typedef struct _NautilusLocationBarAction       NautilusLocationBarAction;
+typedef struct _NautilusLocationBarActionClass  NautilusLocationBarActionClass;
+typedef struct NautilusLocationBarActionPrivate NautilusLocationBarActionPrivate;
+
+struct _NautilusLocationBarAction
+{
+	GtkAction parent;
+	
+	/*< private >*/
+	NautilusLocationBarActionPrivate *priv;
+};
+
+struct _NautilusLocationBarActionClass
+{
+	GtkActionClass parent_class;
+};
+
+GType    nautilus_location_bar_action_get_type   (void);
+
+#endif
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-navigation-window.c nautilus-2.26.2/src/nautilus-navigation-window.c
--- nautilus-2.26.2.orig/src/nautilus-navigation-window.c	2009-03-20 11:16:01.000000000 +0100
+++ nautilus-2.26.2/src/nautilus-navigation-window.c	2009-07-21 23:19:06.000000000 +0200
@@ -30,7 +30,6 @@
 
 #include <config.h>
 #include "nautilus-window-private.h"
-
 #include "nautilus-actions.h"
 #include "nautilus-application.h"
 #include "nautilus-bookmarks-window.h"
@@ -119,7 +118,7 @@
 
 static void nautilus_navigation_window_show_location_bar_temporarily (NautilusNavigationWindow *window);
 
-static void view_as_menu_switch_views_callback	     (GtkComboBox              *combo_box,
+static void view_as_menu_switch_views_callback	     (GtkAction             *action,
 						      NautilusWindow           *window);
 
 G_DEFINE_TYPE (NautilusNavigationWindow, nautilus_navigation_window, NAUTILUS_TYPE_WINDOW)
@@ -337,12 +336,7 @@
 static void
 nautilus_navigation_window_init (NautilusNavigationWindow *window)
 {
-	GtkUIManager *ui_manager;
-	GtkWidget *toolbar;
-	GtkWidget *location_bar;
-	GtkWidget *view_as_menu_vbox;
-	GtkToolItem *item;
-	GtkWidget *hbox;
+	//GtkWidget *view_as_menu_vbox;
 
 	window->details = G_TYPE_INSTANCE_GET_PRIVATE (window, NAUTILUS_TYPE_NAVIGATION_WINDOW, NautilusNavigationWindowDetails);
 
@@ -354,7 +348,8 @@
 			  GTK_EXPAND | GTK_FILL | GTK_SHRINK, GTK_EXPAND | GTK_FILL | GTK_SHRINK,
 			  0,                                  0);
 	gtk_widget_show (window->details->content_paned);
-
+	
+	/* Create notebook (aka file area?) */
 	window->notebook = g_object_new (NAUTILUS_TYPE_NOTEBOOK, NULL);
 	g_signal_connect (window->notebook,
 			  "tab-close-request",
@@ -364,6 +359,7 @@
 				"button_press_event",
 				G_CALLBACK (notebook_button_press_cb),
 				window);
+
 	g_signal_connect (window->notebook, "popup-menu",
 			  G_CALLBACK (notebook_popup_menu_cb),
 			  window);
@@ -377,132 +373,81 @@
 	gtk_notebook_set_show_tabs (GTK_NOTEBOOK (window->notebook), FALSE);
 	gtk_notebook_set_show_border (GTK_NOTEBOOK (window->notebook), FALSE);
 	gtk_widget_show (window->notebook);
-	
-	nautilus_navigation_window_initialize_actions (window);
-	nautilus_navigation_window_initialize_menus (window);
-	
-	ui_manager = nautilus_window_get_ui_manager (NAUTILUS_WINDOW (window));
-	toolbar = gtk_ui_manager_get_widget (ui_manager, "/Toolbar");
-	window->details->toolbar = toolbar;
-	gtk_table_attach (GTK_TABLE (NAUTILUS_WINDOW (window)->details->table),
-			  toolbar,
-			  /* X direction */                   /* Y direction */
-			  0, 1,                               1, 2,
-			  GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0,
-			  0,                                  0);
-	gtk_widget_show (toolbar);
-
-	nautilus_navigation_window_initialize_toolbars (window);
 
-	/* Set initial sensitivity of some buttons & menu items 
-	 * now that they're all created.
-	 */
-	nautilus_navigation_window_allow_back (window, FALSE);
-	nautilus_navigation_window_allow_forward (window, FALSE);
+	/* Crate zoom control */
+	window->zoom_control = nautilus_zoom_control_new ();
+	gtk_container_set_border_width (GTK_CONTAINER (window->zoom_control), 4);
 
-	/* set up location bar */
-	location_bar = gtk_toolbar_new ();
-	window->details->location_bar = location_bar;
-
-	hbox = gtk_hbox_new (FALSE, 12);
-	gtk_widget_show (hbox);
-
-	item = gtk_tool_item_new ();
-	gtk_container_set_border_width (GTK_CONTAINER (item), 4);
-	gtk_widget_show (GTK_WIDGET (item));
-	gtk_tool_item_set_expand (item, TRUE);
-	gtk_container_add (GTK_CONTAINER (item),  hbox);
-	gtk_toolbar_insert (GTK_TOOLBAR (location_bar),
-			    item, -1);
+	g_signal_connect_object (window->zoom_control, "zoom_in",
+				 G_CALLBACK (nautilus_window_zoom_in),
+				 window, G_CONNECT_SWAPPED);
+	g_signal_connect_object (window->zoom_control, "zoom_out",
+				 G_CALLBACK (nautilus_window_zoom_out),
+				 window, G_CONNECT_SWAPPED);
+	g_signal_connect_object (window->zoom_control, "zoom_to_level",
+				 G_CALLBACK (nautilus_window_zoom_to_level),
+				 window, G_CONNECT_SWAPPED);
+	g_signal_connect_object (window->zoom_control, "zoom_to_default",
+				 G_CALLBACK (nautilus_window_zoom_to_default),
+				 window, G_CONNECT_SWAPPED);
 
+	/* Create location button */
 	window->details->location_button = location_button_create (window);
-	gtk_box_pack_start (GTK_BOX (hbox), window->details->location_button, FALSE, FALSE, 0);
-	gtk_widget_show (window->details->location_button);
 
-	window->path_bar = g_object_new (NAUTILUS_TYPE_PATH_BAR, NULL);
- 	gtk_widget_show (window->path_bar);
-	
-	g_signal_connect_object (window->path_bar, "path_clicked",
-				 G_CALLBACK (path_bar_location_changed_callback), window, 0);
-	g_signal_connect_object (window->path_bar, "path_set",
-				 G_CALLBACK (path_bar_path_set_callback), window, 0);
-	
-	gtk_box_pack_start (GTK_BOX (hbox),
-			    window->path_bar,
-			    TRUE, TRUE, 0);
-
-	window->navigation_bar = nautilus_location_bar_new (window);
+	window->navigation_bar = nautilus_location_bar_new (window); 
 	g_signal_connect_object (window->navigation_bar, "location_changed",
 				 G_CALLBACK (navigation_bar_location_changed_callback), window, 0);
 	g_signal_connect_object (window->navigation_bar, "cancel",
 				 G_CALLBACK (navigation_bar_cancel_callback), window, 0);
 
-	gtk_box_pack_start (GTK_BOX (hbox),
-			    window->navigation_bar,
-			    TRUE, TRUE, 0);
+	/* Create View As combo box */
+	//window->view_as_combo_box = gtk_combo_box_new_text (); //XXXMARCUS FIXME: temp remarked (?)
+	//gtk_container_set_border_width (GTK_CONTAINER (window->view_as_combo_box), 4); //???
+	//gtk_combo_box_set_focus_on_click (GTK_COMBO_BOX (window->view_as_combo_box), FALSE);
+
+
 
+	//g_object_ref (window->view_as_combo_box); //XXXMARCUS HACK: hack to not allow gtk_container_remove not remove this - not working
+	//gtk_box_pack_end (GTK_BOX (view_as_menu_vbox), window->view_as_combo_box, TRUE, FALSE, 0);
+	//gtk_widget_show (window->view_as_combo_box);
+
+	/* Create search bar */
 	window->search_bar = nautilus_search_bar_new ();
 	g_signal_connect_object (window->search_bar, "activate",
 				 G_CALLBACK (search_bar_activate_callback), window, 0);
 	g_signal_connect_object (window->search_bar, "cancel",
 				 G_CALLBACK (search_bar_cancel_callback), window, 0);
-	gtk_box_pack_start (GTK_BOX (hbox),
-			    window->search_bar,
-			    TRUE, TRUE, 0);
 
-	/* Option menu for content view types; it's empty here, filled in when a uri is set.
-	 * Pack it into vbox so it doesn't grow vertically when location bar does. 
-	 */
-	view_as_menu_vbox = gtk_vbox_new (FALSE, 4);
-	gtk_widget_show (view_as_menu_vbox);
+	/* Create path bar */
+	window->path_bar = g_object_new (NAUTILUS_TYPE_PATH_BAR, NULL);
 
-	item = gtk_tool_item_new ();
-	gtk_container_set_border_width (GTK_CONTAINER (item), 4);
-	gtk_widget_show (GTK_WIDGET (item));
-	gtk_container_add (GTK_CONTAINER (item), view_as_menu_vbox);
-	gtk_toolbar_insert (GTK_TOOLBAR (location_bar),
-			    item, -1);
-	
-	window->view_as_combo_box = gtk_combo_box_new_text ();
-	gtk_combo_box_set_focus_on_click (GTK_COMBO_BOX (window->view_as_combo_box), FALSE);
-	gtk_box_pack_end (GTK_BOX (view_as_menu_vbox), window->view_as_combo_box, TRUE, FALSE, 0);
-	gtk_widget_show (window->view_as_combo_box);
-	g_signal_connect_object (window->view_as_combo_box, "changed",
-				 G_CALLBACK (view_as_menu_switch_views_callback), window, 0);
+	g_signal_connect_object (window->path_bar, "path_clicked",
+				 G_CALLBACK (path_bar_location_changed_callback), window, 0);
+	g_signal_connect_object (window->path_bar, "path_set",
+				 G_CALLBACK (path_bar_path_set_callback), window, 0);
 
-	/* Allocate the zoom control and place on the right next to the menu.
-	 * It gets shown later, if the view-frame contains something zoomable.
-	 */
-	window->zoom_control = nautilus_zoom_control_new ();
-	g_signal_connect_object (window->zoom_control, "zoom_in",
-				 G_CALLBACK (nautilus_window_zoom_in),
-				 window, G_CONNECT_SWAPPED);
-	g_signal_connect_object (window->zoom_control, "zoom_out",
-				 G_CALLBACK (nautilus_window_zoom_out),
-				 window, G_CONNECT_SWAPPED);
-	g_signal_connect_object (window->zoom_control, "zoom_to_level",
-				 G_CALLBACK (nautilus_window_zoom_to_level),
-				 window, G_CONNECT_SWAPPED);
-	g_signal_connect_object (window->zoom_control, "zoom_to_default",
-				 G_CALLBACK (nautilus_window_zoom_to_default),
-				 window, G_CONNECT_SWAPPED);
-	
-	item = gtk_tool_item_new ();
-	gtk_container_set_border_width (GTK_CONTAINER (item), 4);
-	gtk_widget_show (GTK_WIDGET (item));
-	gtk_container_add (GTK_CONTAINER (item),  window->zoom_control);
-	gtk_toolbar_insert (GTK_TOOLBAR (location_bar),
-			    item, 1);
+	nautilus_navigation_window_initialize_actions (window);
+	nautilus_navigation_window_initialize_menus (window);
+	nautilus_navigation_window_initialize_toolbars (window);
 
-	gtk_widget_show (location_bar);
 
-	gtk_table_attach (GTK_TABLE (NAUTILUS_WINDOW (window)->details->table),
-			  location_bar,
-			  /* X direction */                    /* Y direction */
-			  0, 1,                                2, 3,
-			  GTK_EXPAND | GTK_FILL | GTK_SHRINK,  0,
-			  0,                                   0);
+	//g_signal_connect_object (window->view_as_combo_box, "changed",
+	//			 G_CALLBACK (view_as_menu_switch_views_callback), window, 0);
+
+	GtkAction *action;
+	action = gtk_action_group_get_action (window->details->navigation_action_group, "ViewChooser");
 
+	g_signal_connect_object (action, "changed",
+				 G_CALLBACK (view_as_menu_switch_views_callback), window, 0);
+
+	/* add the toolbar to the main interface */
+	gtk_table_attach (GTK_TABLE (NAUTILUS_WINDOW (window)->details->table),
+			  window->details->toolbar,
+			  /* X direction */                   /* Y direction */
+			  0, 1,                               1, 2,
+			  GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0,
+			  0,                                  0);
+	
 	eel_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_ALWAYS_USE_LOCATION_ENTRY,
 						  always_use_location_entry_changed,
 						  window, G_OBJECT (window));
@@ -948,7 +893,7 @@
 	g_list_free (window->sidebar_panels);
 	window->sidebar_panels = NULL;
 
-	window->view_as_combo_box = NULL;
+	//window->view_as_combo_box = NULL; //XXXMARCUS FIXME: clean up?
 	window->navigation_bar = NULL;
 	window->path_bar = NULL;
 	window->zoom_control = NULL;
@@ -1103,13 +1048,17 @@
 }
 
 static void
-view_as_menu_switch_views_callback (GtkComboBox *combo_box, NautilusWindow *window)
+view_as_menu_switch_views_callback (GtkAction *action, NautilusWindow *window)
 {         
 	int active;
-	g_assert (GTK_IS_COMBO_BOX (combo_box));
+	GtkWidget *combo_box;	
+	
+	g_assert (GTK_IS_ACTION (action));
 	g_assert (NAUTILUS_IS_WINDOW (window));
 
-	active = gtk_combo_box_get_active (combo_box);
+	combo_box = GTK_COMBO_BOX (g_object_get_data (G_OBJECT (action), "combo"));
+
+	active = gtk_combo_box_get_active (GTK_COMBO_BOX (combo_box));
 
 	if (active < 0) {
 		return;
@@ -1131,8 +1080,22 @@
 	GtkListStore *store;
 	const NautilusViewInfo *info;
 	GtkComboBox* combo_box;
-	
-    	combo_box = GTK_COMBO_BOX (NAUTILUS_NAVIGATION_WINDOW (window)->view_as_combo_box);
+	NautilusNavigationWindow *navwindow;
+	GtkAction *action;
+
+	navwindow = NAUTILUS_NAVIGATION_WINDOW (window);
+
+	action = gtk_action_group_get_action (navwindow->details->navigation_action_group, "ViewChooser");
+	if (!action) {
+		g_warning ("Missing action\n");
+		return;
+	}
+		
+    	combo_box = g_object_get_data (G_OBJECT (action), "combo"); //XXXMARCUS FIXME: Will crash NAUTILUS_NAVIGATION_WINDOW (window)->view_as_combo_box);
+	if (combo_box == NULL) {
+		g_warning ("combo is null\n");
+		return;
+	}
 	/* Clear the contents of ComboBox in a wacky way because there
 	 * is no function to clear all items and also no function to obtain
 	 * the number of items in a combobox.
@@ -1162,12 +1125,11 @@
 
 		id = nautilus_window_slot_get_content_view_id (slot);
 		info = nautilus_view_factory_lookup (id);
-		gtk_combo_box_append_text (GTK_COMBO_BOX (NAUTILUS_NAVIGATION_WINDOW (window)->view_as_combo_box),
-					   _(info->view_combo_label));
+		gtk_combo_box_append_text (combo_box, _(info->view_combo_label));
 		selected_index = index;
 	}
 
-	gtk_combo_box_set_active (GTK_COMBO_BOX (NAUTILUS_NAVIGATION_WINDOW (window)->view_as_combo_box), selected_index);
+	gtk_combo_box_set_active (combo_box, selected_index);
 }
 
 static void
@@ -1729,22 +1691,26 @@
 
 
 void 
-nautilus_navigation_window_hide_toolbar (NautilusNavigationWindow *window)
+nautilus_navigation_window_hide_toolbar (NautilusNavigationWindow *window,
+					 gboolean save_preference)
 {
 	gtk_widget_hide (window->details->toolbar);
 	nautilus_navigation_window_update_show_hide_menu_items (window);
-	if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR) &&
+	if (save_preference &&
+	    eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR) &&
 	    eel_preferences_get_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR)) {
 		eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, FALSE);
 	}
 }
 
 void 
-nautilus_navigation_window_show_toolbar (NautilusNavigationWindow *window)
+nautilus_navigation_window_show_toolbar (NautilusNavigationWindow *window,
+					 gboolean save_preference)
 {
 	gtk_widget_show (window->details->toolbar);
 	nautilus_navigation_window_update_show_hide_menu_items (window);
-	if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR) &&
+	if (save_preference &&
+	    eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR) &&
 	    !eel_preferences_get_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR)) {
 		eel_preferences_set_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR, TRUE);
 	}
@@ -1841,15 +1807,9 @@
 	 */
 
 	if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_START_WITH_TOOLBAR)) {
-		nautilus_navigation_window_show_toolbar (window);
-	} else {
-		nautilus_navigation_window_hide_toolbar (window);
-	}
-
-	if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_START_WITH_LOCATION_BAR)) {
-		nautilus_navigation_window_show_location_bar (window, FALSE);
+		nautilus_navigation_window_show_toolbar (window, FALSE);
 	} else {
-		nautilus_navigation_window_hide_location_bar (window, FALSE);
+		nautilus_navigation_window_hide_toolbar (window, FALSE);
 	}
 
 	if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ALWAYS_USE_LOCATION_ENTRY)) {
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-navigation-window.h nautilus-2.26.2/src/nautilus-navigation-window.h
--- nautilus-2.26.2.orig/src/nautilus-navigation-window.h	2008-10-07 11:38:52.000000000 +0200
+++ nautilus-2.26.2/src/nautilus-navigation-window.h	2009-07-21 18:24:36.000000000 +0200
@@ -57,7 +57,7 @@
         
         /** UI stuff **/
         NautilusSidePane *sidebar;
-        GtkWidget *view_as_combo_box;
+        //GtkWidget *view_as_combo_box; //XXXMARCUS
         GtkWidget *navigation_bar;
 	GtkWidget *path_bar;
         GtkWidget *search_bar;
@@ -96,8 +96,10 @@
 gboolean nautilus_navigation_window_search_bar_showing 	 (NautilusNavigationWindow *window);
 
 gboolean nautilus_navigation_window_location_bar_showing (NautilusNavigationWindow *window);
-void     nautilus_navigation_window_hide_toolbar         (NautilusNavigationWindow *window);
-void     nautilus_navigation_window_show_toolbar         (NautilusNavigationWindow *window);
+void     nautilus_navigation_window_hide_toolbar         (NautilusNavigationWindow *window,
+                                                          gboolean                  save_preference);
+void     nautilus_navigation_window_show_toolbar         (NautilusNavigationWindow *window,
+                                                          gboolean                  save_preference);
 gboolean nautilus_navigation_window_toolbar_showing      (NautilusNavigationWindow *window);
 void     nautilus_navigation_window_hide_sidebar         (NautilusNavigationWindow *window);
 void     nautilus_navigation_window_show_sidebar         (NautilusNavigationWindow *window);
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-navigation-window-menus.c nautilus-2.26.2/src/nautilus-navigation-window-menus.c
--- nautilus-2.26.2.orig/src/nautilus-navigation-window-menus.c	2008-10-06 12:49:08.000000000 +0200
+++ nautilus-2.26.2/src/nautilus-navigation-window-menus.c	2009-07-21 00:15:52.000000000 +0200
@@ -40,6 +40,8 @@
 #include "nautilus-window-manage-views.h"
 #include "nautilus-window-private.h"
 #include "nautilus-window-bookmarks.h"
+#include <cut-n-paste-code/toolbar-editor/egg-toolbar-editor.h>
+#include <cut-n-paste-code/toolbar-editor/eggtypebuiltins.h>
 #include <eel/eel-glib-extensions.h>
 #include <eel/eel-gnome-extensions.h>
 #include <eel/eel-stock-dialogs.h>
@@ -69,6 +71,33 @@
 {
 	nautilus_application_close_all_navigation_windows ();
 }
+enum
+{
+	COL_TEXT,
+	COL_FLAGS,
+	COL_IS_SEP
+};
+enum
+{
+	RESPONSE_ADD_TOOLBAR = 1
+};
+static const struct
+{
+	const char *text;
+	EggTbModelFlags flags;
+	gboolean cc_domain;
+}
+toolbar_styles [] =
+{
+	{ /* Translators: The text before the "|" is context to help you decide on
+	   * the correct translation. You MUST OMIT it in the translated string. */
+	  N_("toolbar style|Default"), 0, FALSE },
+	{ NULL /* separator row */, 0, FALSE },
+	{ N_("Text below icons"), EGG_TB_MODEL_BOTH, TRUE },
+	{ N_("Text beside icons"), EGG_TB_MODEL_BOTH_HORIZ, TRUE },
+	{ N_("Icons only"), EGG_TB_MODEL_ICONS, TRUE },
+	{ N_("Text only"), EGG_TB_MODEL_TEXT, TRUE }
+};
 
 static gboolean
 should_open_in_new_tab (void)
@@ -147,9 +176,9 @@
 	window = NAUTILUS_NAVIGATION_WINDOW (user_data);
 
 	if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) {
-		nautilus_navigation_window_show_toolbar (window);
+		nautilus_navigation_window_show_toolbar (window, TRUE);
 	} else {
-		nautilus_navigation_window_hide_toolbar (window);
+		nautilus_navigation_window_hide_toolbar (window, TRUE);
 	}
 }
 
@@ -171,21 +200,6 @@
 }
 
 static void
-action_show_hide_location_bar_callback (GtkAction *action, 
-					gpointer user_data)
-{
-	NautilusNavigationWindow *window;
-
-	window = NAUTILUS_NAVIGATION_WINDOW (user_data);
-
-	if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) {
-		nautilus_navigation_window_show_location_bar (window, TRUE);
-	} else {
-		nautilus_navigation_window_hide_location_bar (window, TRUE);
-	}
-}
-
-static void
 action_show_hide_statusbar_callback (GtkAction *action,
 				     gpointer user_data)
 {
@@ -216,11 +230,6 @@
 					      NAUTILUS_ACTION_SHOW_HIDE_SIDEBAR);
 	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
 				      nautilus_navigation_window_sidebar_showing (window));
-	
-	action = gtk_action_group_get_action (window->details->navigation_action_group,
-					      NAUTILUS_ACTION_SHOW_HIDE_LOCATION_BAR);
-	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
-				      nautilus_navigation_window_location_bar_showing (window));
 
 	action = gtk_action_group_get_action (window->details->navigation_action_group,
 					      NAUTILUS_ACTION_SHOW_HIDE_STATUSBAR);
@@ -272,6 +281,213 @@
         nautilus_window_edit_bookmarks (NAUTILUS_WINDOW (user_data));
 }
 
+static void
+ev_window_cmd_edit_toolbar_callback (GtkDialog *dialog,
+				     int response,
+				     NautilusNavigationWindow *window)
+{
+	switch (response) {
+		case RESPONSE_ADD_TOOLBAR:
+			egg_toolbars_model_add_toolbar (window->details->toolbars_model, -1, "UserCreated");
+			break;
+		case GTK_RESPONSE_REJECT:
+			nautilus_toolbars_model_load_default (window->details->toolbars_model);
+			break;
+		default:
+		        egg_editable_toolbar_set_edit_mode
+                	        (EGG_EDITABLE_TOOLBAR (window->details->toolbar), FALSE);
+		        gtk_widget_destroy (GTK_WIDGET (dialog));
+			break;
+	}
+}
+static gboolean
+row_is_separator (GtkTreeModel *model,
+		  GtkTreeIter *iter,
+		  gpointer data)
+{
+	gboolean is_sep;
+	gtk_tree_model_get (model, iter, COL_IS_SEP, &is_sep, -1);
+	return is_sep;
+}
+
+static void
+combo_changed_cb (GtkComboBox *combo,
+		  NautilusNavigationWindow *window)
+{
+	GtkTreeIter iter;
+	EggTbModelFlags flags;
+	GFlagsClass *flags_class;
+	const GFlagsValue *value;
+	const char *pref = "";
+	GtkListStore *store;
+
+	store =  gtk_combo_box_get_model (combo);	
+
+	if  (!gtk_combo_box_get_active_iter (combo, &iter)) return;
+
+	gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, COL_FLAGS, &flags, -1);
+
+	flags_class = g_type_class_ref (EGG_TYPE_TB_MODEL_FLAGS);
+	value = g_flags_get_first_value (flags_class, flags);
+	if (value != NULL)
+	{
+		pref = value->value_nick;
+	}
+	//XXXMARCUS FIXME: store setting in gconf
+	//XXXMARCUS FIXME: stuff below seems to be duplicate from nautilus-toolbars-model.c
+	int i, n_toolbars;
+
+	n_toolbars = egg_toolbars_model_n_toolbars (window->details->toolbars_model);
+
+	for (i = 0; i < n_toolbars; i++)
+	{
+		const char *t_name;
+		EggTbModelFlags eflags;
+
+		t_name = egg_toolbars_model_toolbar_nth (window->details->toolbars_model, i);
+		g_return_if_fail (t_name != NULL);
+
+		eflags = egg_toolbars_model_get_flags (window->details->toolbars_model, i);
+		eflags &= EGG_TB_MODEL_STYLES_MASK;
+
+		if (value != NULL)
+			eflags = value->value; //XXXMARCUS FIXME: NOT WORKING
+		
+		egg_toolbars_model_set_flags (window->details->toolbars_model, i, eflags);
+	}
+
+
+	g_type_class_unref (flags_class);
+}
+
+
+static void
+action_edit_toolbar_callback (GtkAction *action, 
+			      NautilusNavigationWindow *window)
+{
+	GtkWidget *dialog;
+	GtkWidget *editor;
+	
+
+        dialog = gtk_dialog_new_with_buttons (_("Toolbar Editor"),
+                                              GTK_WINDOW (window),
+                                              GTK_DIALOG_DESTROY_WITH_PARENT,
+                                              NULL);
+        gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
+        gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)), 5);
+        gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
+        gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+        gtk_window_set_default_size (GTK_WINDOW (dialog), 500, 400);
+	gtk_dialog_add_button (GTK_DIALOG (dialog),
+			       GTK_STOCK_REVERT_TO_SAVED, GTK_RESPONSE_REJECT); //XXXMARCUS FIXME: better response code
+
+	gtk_dialog_add_button (GTK_DIALOG (dialog),
+			       _("_Add a New Toolbar"), RESPONSE_ADD_TOOLBAR);
+
+	gtk_dialog_add_button (GTK_DIALOG (dialog),
+			       GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
+
+        editor = egg_toolbar_editor_new (
+		nautilus_window_get_ui_manager (NAUTILUS_WINDOW (window)),
+		window->details->toolbars_model);
+	gtk_widget_show (editor);
+	//--------------------- COPIED FROM EPHIPHANY -----------------------------
+
+	GtkWidget *hbox, *label, *combo;
+	GtkListStore *store;
+	GtkTreeIter iter;
+	GtkCellRenderer *renderer;
+	GFlagsClass *flags_class;
+	const GFlagsValue *value;
+	EggTbModelFlags flags = 0;
+	int i;
+	char *pref;
+
+	hbox = gtk_hbox_new (FALSE, 12);
+	gtk_box_set_spacing (GTK_BOX (editor), 18);
+	gtk_box_pack_start (GTK_BOX (editor), hbox, FALSE, FALSE, 0);
+
+	/* translators: translate the same as in gnome-control-center */
+	label = gtk_label_new_with_mnemonic (_("Toolbar _button labels:"));
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+
+	store = gtk_list_store_new (3, G_TYPE_STRING, EGG_TYPE_TB_MODEL_FLAGS,
+				    G_TYPE_BOOLEAN);
+
+	for (i = 0; i < G_N_ELEMENTS (toolbar_styles); i++)
+	{
+		const char *text = toolbar_styles[i].text;
+		const char *tr_text = NULL;
+
+		if (text != NULL)
+		{
+			tr_text= Q_(text);
+		}
+
+		gtk_list_store_append (store, &iter);
+		gtk_list_store_set (store, &iter,
+				    COL_TEXT, tr_text,
+				    COL_FLAGS, toolbar_styles[i].flags,
+				    COL_IS_SEP, toolbar_styles[i].text == NULL,
+				    -1);
+	}
+
+	combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store));
+	g_object_unref (store);
+
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
+	gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer,
+					"text", COL_TEXT, NULL);
+	gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (combo),
+					      (GtkTreeViewRowSeparatorFunc) row_is_separator,
+					      NULL, NULL);
+
+	gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0);
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
+	gtk_widget_show_all (hbox);
+
+	/* get active from pref */
+	pref = NULL; //XXXMARCUS TODO: get preference from gconf
+	if (pref != NULL)
+	{
+		flags_class = g_type_class_ref (EGG_TYPE_TB_MODEL_FLAGS);
+		value = g_flags_get_value_by_nick (flags_class, pref);
+		if (value != NULL)
+		{
+			flags = value->value;
+		}
+		g_type_class_unref (flags_class);
+	}
+	g_free (pref);
+
+	/* this will set i to 0 if the style is unknown or default */
+	for (i = G_N_ELEMENTS (toolbar_styles) - 1; i > 0; i--)
+	{
+		if (flags & toolbar_styles[i].flags) break;
+	}
+
+	gtk_combo_box_set_active (GTK_COMBO_BOX (combo), i);
+	g_signal_connect (combo, "changed",
+			G_CALLBACK (combo_changed_cb), window);
+
+
+
+
+	//--------------------------------------------------------------------------
+	/* FIXME error handling */
+        gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), editor);
+
+        egg_editable_toolbar_set_edit_mode
+                (EGG_EDITABLE_TOOLBAR (window->details->toolbar), TRUE);
+
+        g_signal_connect (dialog, "response",
+                          G_CALLBACK (ev_window_cmd_edit_toolbar_callback),
+			  window);
+        gtk_widget_show_all (dialog);
+}
+
+
 void
 nautilus_navigation_window_remove_go_menu_callback (NautilusNavigationWindow *window)
 {
@@ -791,6 +1007,9 @@
   /* name, stock id, label */  { "Edit Bookmarks", NULL, N_("_Edit Bookmarks..."),
                                  "<control>b", N_("Display a window that allows editing the bookmarks in this menu"),
                                  G_CALLBACK (action_edit_bookmarks_callback) },
+  /* name, stock id, label */  { "Edit Toolbar", NULL, N_("_Toolbar"), 
+				  NULL, N_("Display a window that allows editing the toolbars"),
+				  G_CALLBACK (action_edit_toolbar_callback) },
   /* name, stock id, label */  { "Search", "gtk-find", N_("_Search for Files..."),
                                  "<control>F", N_("Locate documents and folders on this computer by name or content"),
                                  G_CALLBACK (action_search_callback) },
@@ -821,11 +1040,6 @@
   /* tooltip */              N_("Change the visibility of this window's side pane"),
                              G_CALLBACK (action_show_hide_sidebar_callback),
   /* is_active */            TRUE }, 
-  /* name, stock id */     { "Show Hide Location Bar", NULL,
-  /* label, accelerator */   N_("Location _Bar"), NULL,
-  /* tooltip */              N_("Change the visibility of this window's location bar"),
-                             G_CALLBACK (action_show_hide_location_bar_callback),
-  /* is_active */            TRUE }, 
   /* name, stock id */     { "Show Hide Statusbar", NULL,
   /* label, accelerator */   N_("St_atusbar"), NULL,
   /* tooltip */              N_("Change the visibility of this window's statusbar"),
@@ -839,9 +1053,10 @@
 	GtkActionGroup *action_group;
 	GtkUIManager *ui_manager;
 	GtkAction *action;
-	
+
 	action_group = gtk_action_group_new ("NavigationActions");
 	gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
+
 	window->details->navigation_action_group = action_group;
 	gtk_action_group_add_actions (action_group, 
 				      navigation_entries, G_N_ELEMENTS (navigation_entries),
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-navigation-window-ui.xml nautilus-2.26.2/src/nautilus-navigation-window-ui.xml
--- nautilus-2.26.2.orig/src/nautilus-navigation-window-ui.xml	2009-01-13 14:45:57.000000000 +0100
+++ nautilus-2.26.2/src/nautilus-navigation-window-ui.xml	2009-07-18 20:53:29.000000000 +0200
@@ -12,11 +12,15 @@
 			<menuitem name="Close All Windows" action="Close All Windows"/>
 		</placeholder>
 	</menu>
+	<menu action="Edit">
+		<placeholder name="Before Preferences Actions">
+			<menuitem name="Edit Toolbar" action="Edit Toolbar"/>
+		</placeholder>
+	</menu>
 	<menu action="View">
 		<placeholder name="Show Hide Placeholder">
 			<menuitem name="Show Hide Toolbar" action="Show Hide Toolbar"/>
 			<menuitem name="Show Hide Sidebar" action="Show Hide Sidebar"/>
-			<menuitem name="Show Hide Location Bar" action="Show Hide Location Bar"/>
 			<menuitem name="Show Hide Statusbar" action="Show Hide Statusbar"/>
 		</placeholder>
 	</menu>
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-shell-ui.xml nautilus-2.26.2/src/nautilus-shell-ui.xml
--- nautilus-2.26.2.orig/src/nautilus-shell-ui.xml	2008-09-14 14:14:22.000000000 +0200
+++ nautilus-2.26.2/src/nautilus-shell-ui.xml	2009-07-18 20:53:35.000000000 +0200
@@ -36,6 +36,7 @@
 		<placeholder name="Extension Actions"/>
 		<separator/>
 		<menuitem name="Backgrounds and Emblems" action="Backgrounds and Emblems"/>
+		<placeholder name="Before Preferences Placeholder"/>
 		<menuitem name="Preferences" action="Preferences"/>
 	</menu>
 	<menu action="View">
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-toolbars-model.c nautilus-2.26.2/src/nautilus-toolbars-model.c
--- nautilus-2.26.2.orig/src/nautilus-toolbars-model.c	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/src/nautilus-toolbars-model.c	2009-07-21 00:10:23.000000000 +0200
@@ -0,0 +1,267 @@
+/*
+ *  Copyright (C) 2002-2004 Marco Pesenti Gritti
+ *  Copyright (C) 2003, 2004 Christian Persch
+ *  Copyright (C) 2005 Christian Neumair
+ *
+ *  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, 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.
+ *
+ *  $Id: nautilus-toolbars-model.c,v 1.36 2005/02/09 21:08:03 chpe Exp $
+ */
+
+#include "config.h"
+
+#include "nautilus-toolbars-model.h"
+//#include "eel-gconf-extensions.h"
+#include <nautilus-file-utilities.h>
+#include <cut-n-paste-code/toolbar-editor/eggtypebuiltins.h>
+#include <cut-n-paste-code/toolbar-editor/egg-toolbars-model.h>
+#include <string.h>
+
+#define NAUTILUS_TOOLBARS_XML_FILE	"toolbars.xml"
+
+#define NAUTILUS_TOOLBARS_MODEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), NAUTILUS_TYPE_TOOLBARS_MODEL, NautilusToolbarsModelDetails))
+
+struct _NautilusToolbarsModelDetails
+{
+	char *xml_file;
+	EggTbModelFlags style;
+	guint timeout;
+	guint style_notifier_id;
+};
+
+static void nautilus_toolbars_model_class_init (NautilusToolbarsModelClass *klass);
+static void nautilus_toolbars_model_init       (NautilusToolbarsModel *model);
+
+static GObjectClass *parent_class = NULL;
+
+GType
+nautilus_toolbars_model_get_type (void)
+{
+	static GType type = 0;
+
+	if (G_UNLIKELY (type == 0))
+	{
+		static const GTypeInfo our_info = {
+		sizeof (NautilusToolbarsModelClass),
+		NULL,			/* base_init */
+		NULL,			/* base_finalize */
+		(GClassInitFunc) nautilus_toolbars_model_class_init,
+		NULL,
+		NULL,			/* class_data */
+		sizeof (NautilusToolbarsModel),
+		0,			/* n_preallocs */
+		(GInstanceInitFunc) nautilus_toolbars_model_init
+	};
+
+	type = g_type_register_static (EGG_TYPE_TOOLBARS_MODEL,
+				       "NautilusToolbarsModel",
+				       &our_info, 0);
+	}
+
+	return type;
+}
+
+static gboolean
+save_changes_idle (NautilusToolbarsModel *model)
+{
+	egg_toolbars_model_save_toolbars
+		(EGG_TOOLBARS_MODEL (model),
+		 model->details->xml_file,
+		 "1.0");
+
+	model->details->timeout = 0;
+
+	/* don't run again */
+	return FALSE;
+}
+
+static void
+save_changes (NautilusToolbarsModel *model)
+{
+	if (model->details->timeout == 0)
+	{
+		model->details->timeout =
+			g_idle_add ((GSourceFunc) save_changes_idle, model);
+	}
+}
+
+static void
+update_flags (NautilusToolbarsModel *model)
+{
+	EggToolbarsModel *eggmodel = EGG_TOOLBARS_MODEL (model);
+	int i, n_toolbars;
+	int flag = EGG_TB_MODEL_ACCEPT_ITEMS_ONLY;
+
+	n_toolbars = egg_toolbars_model_n_toolbars (eggmodel);
+
+	if (n_toolbars <= 1)
+	{
+		flag |= EGG_TB_MODEL_NOT_REMOVABLE;
+	}
+
+	for (i = 0; i < n_toolbars; i++)
+	{
+		const char *t_name;
+		EggTbModelFlags flags;
+
+		t_name = egg_toolbars_model_toolbar_nth (eggmodel, i);
+		g_return_if_fail (t_name != NULL);
+
+		flags = egg_toolbars_model_get_flags (eggmodel, i);
+		flags &= ~(EGG_TB_MODEL_NOT_REMOVABLE | EGG_TB_MODEL_STYLES_MASK);
+		flags |= flag;
+		flags |= model->details->style;
+		egg_toolbars_model_set_flags (eggmodel, i, flags);
+	}
+}
+
+static void
+update_flags_and_save_changes (NautilusToolbarsModel *model)
+{
+	update_flags (model);
+	save_changes (model);
+}
+
+//XXXMARCUS FIXME: Not working; this kills the spinner and does not add a default toolbar
+void
+nautilus_toolbars_model_load_default (NautilusToolbarsModel *model)
+{
+	EggToolbarsModel *eggmodel = EGG_TOOLBARS_MODEL (model);
+	int n_toolbars, i;
+	
+	n_toolbars = egg_toolbars_model_n_toolbars (eggmodel);
+
+	for (i = 0; i < n_toolbars; i++)
+		egg_toolbars_model_remove_toolbar (eggmodel, 0);
+
+	/* Ensure we have at least 1 toolbar */
+	if (egg_toolbars_model_n_toolbars (eggmodel) < 1)
+		egg_toolbars_model_add_toolbar (eggmodel, 0, "DefaultToolbar");
+}
+
+
+
+void
+nautilus_toolbars_model_load (NautilusToolbarsModel *model)
+{
+	EggToolbarsModel *eggmodel = EGG_TOOLBARS_MODEL (model);
+	gboolean success;
+	char *path;
+	/* File with default toolbar and available items */
+	path = g_build_filename (NAUTILUS_DATADIR, NAUTILUS_TOOLBARS_XML_FILE, NULL);
+
+	/* Load available items */
+	egg_toolbars_model_load_names (eggmodel, path);
+
+	/* Load personal toolbar */
+	success = egg_toolbars_model_load_toolbars (eggmodel, model->details->xml_file);
+	if (!success) {
+		/* Load default toolbar */
+		success = egg_toolbars_model_load_toolbars (eggmodel, path);
+	}
+
+	g_free (path);
+
+	if (!success) {
+		g_warning ("could not load toolbar model from \"%s/%s\"", NAUTILUS_DATADIR, NAUTILUS_TOOLBARS_XML_FILE);
+	}
+
+	/* Ensure we have at least 1 toolbar */
+	if (egg_toolbars_model_n_toolbars (eggmodel) < 1) {
+		egg_toolbars_model_add_toolbar (eggmodel, 0, "DefaultToolbar");
+	}
+}
+
+static void
+nautilus_toolbars_model_init (NautilusToolbarsModel *model)
+{
+	NautilusToolbarsModelDetails *details;
+	char *user_directory;
+
+	details = model->details = NAUTILUS_TOOLBARS_MODEL_GET_PRIVATE (model);
+
+	user_directory = nautilus_get_user_directory ();
+	details->xml_file = g_build_filename (user_directory,
+					      NAUTILUS_TOOLBARS_XML_FILE,
+					      NULL);
+	g_free (user_directory);
+
+	/* XXXMARCUS FIXME: some gconf stuff?
+	details->style = get_toolbar_style ();
+	details->style_notifier_id = eel_gconf_notification_add
+		(CONF_INTERFACE_TOOLBAR_STYLE,
+		 (GConfClientNotifyFunc) toolbar_style_notifier, model);
+		 */
+	
+	g_signal_connect_after (model, "item_added",
+				G_CALLBACK (save_changes), NULL);
+	g_signal_connect_after (model, "item_removed",
+				G_CALLBACK (save_changes), NULL);
+	g_signal_connect_after (model, "toolbar_added",
+				G_CALLBACK (update_flags_and_save_changes), NULL);
+	g_signal_connect_after (model, "toolbar_removed",
+				G_CALLBACK (update_flags_and_save_changes), NULL);
+}
+
+static void
+nautilus_toolbars_model_dispose (GObject *object)
+{
+	NautilusToolbarsModel *model = NAUTILUS_TOOLBARS_MODEL (object);
+
+	save_changes_idle (model);
+
+	G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
+nautilus_toolbars_model_finalize (GObject *object)
+{
+	NautilusToolbarsModel *model = NAUTILUS_TOOLBARS_MODEL (object);
+	NautilusToolbarsModelDetails *details = model->details;
+
+	if (details->style_notifier_id != 0)
+	{
+		//XXXMARCUS FIXME:
+//		eel_gconf_notification_remove (details->style_notifier_id);
+	}
+
+	if (details->timeout != 0)
+	{
+		g_source_remove (details->timeout);
+	}
+
+	g_free (details->xml_file);
+
+	G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+nautilus_toolbars_model_class_init (NautilusToolbarsModelClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	parent_class = g_type_class_peek_parent (klass);
+
+	object_class->dispose = nautilus_toolbars_model_dispose;
+	object_class->finalize = nautilus_toolbars_model_finalize;
+
+	g_type_class_add_private (object_class, sizeof (NautilusToolbarsModelDetails));
+}
+
+EggToolbarsModel *
+nautilus_toolbars_model_new (void)
+{
+	return EGG_TOOLBARS_MODEL (g_object_new (NAUTILUS_TYPE_TOOLBARS_MODEL, NULL));
+}
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-toolbars-model.h nautilus-2.26.2/src/nautilus-toolbars-model.h
--- nautilus-2.26.2.orig/src/nautilus-toolbars-model.h	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/src/nautilus-toolbars-model.h	2009-07-18 21:45:52.000000000 +0200
@@ -0,0 +1,61 @@
+/*
+ *  Copyright (C) 2003, 2004 Marco Pesenti Gritti
+ *  Copyright (C) 2003, 2004 Christian Persch
+ *  Copyright (C) 2005 Christian Neumair
+ *
+ *  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, 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.
+ *
+ *  $Id: nautilus-toolbars-model.h,v 1.15 2005/01/08 16:40:45 chpe Exp $
+ */
+
+#ifndef NAUTILUS_TOOLBARS_MODEL_H
+#define NAUTILUS_TOOLBARS_MODEL_H
+
+#include <cut-n-paste-code/toolbar-editor/egg-toolbars-model.h>
+
+G_BEGIN_DECLS
+
+#define NAUTILUS_TYPE_TOOLBARS_MODEL	     (nautilus_toolbars_model_get_type ())
+#define NAUTILUS_TOOLBARS_MODEL(o)	     (G_TYPE_CHECK_INSTANCE_CAST ((o), NAUTILUS_TYPE_TOOLBARS_MODEL, NautilusToolbarsModel))
+#define NAUTILUS_TOOLBARS_MODEL_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), NAUTILUS_TYPE_TOOLBARS_MODEL, NautilusToolbarsModelClass))
+#define NAUTILUS_IS_TOOLBARS_MODEL(o)	     (G_TYPE_CHECK_INSTANCE_TYPE ((o), NAUTILUS_TYPE_TOOLBARS_MODEL))
+#define NAUTILUS_IS_TOOLBARS_MODEL_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), NAUTILUS_TYPE_TOOLBARS_MODEL))
+#define NAUTILUS_TOOLBARS_MODEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NAUTILUS_TYPE_TOOLBARS_MODEL, NautilusToolbarsModelClass))
+
+typedef struct _NautilusToolbarsModelClass	NautilusToolbarsModelClass;
+typedef struct _NautilusToolbarsModel		NautilusToolbarsModel;
+typedef struct _NautilusToolbarsModelDetails	NautilusToolbarsModelDetails;
+
+struct _NautilusToolbarsModel
+{
+	EggToolbarsModel parent_object;
+
+	NautilusToolbarsModelDetails *details;
+};
+
+struct _NautilusToolbarsModelClass
+{
+	EggToolbarsModelClass parent_class;
+};
+
+GType		  nautilus_toolbars_model_get_type	(void);
+
+EggToolbarsModel *nautilus_toolbars_model_new	(void);
+
+void		  nautilus_toolbars_model_load	(NautilusToolbarsModel *model);
+
+G_END_DECLS
+
+#endif
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-view-chooser-action.c nautilus-2.26.2/src/nautilus-view-chooser-action.c
--- nautilus-2.26.2.orig/src/nautilus-view-chooser-action.c	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/src/nautilus-view-chooser-action.c	2009-07-21 23:10:37.000000000 +0200
@@ -0,0 +1,283 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
+/*
+ *  Nautilus
+ *
+ *  Copyright (C) 2004 Red Hat, Inc.
+ *  Copyright (C) 2003 Marco Pesenti Gritti
+ *
+ *  Nautilus 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.
+ *
+ *  Nautilus 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Based on ephy-navigation-action.h from Epiphany
+ *
+ *  Authors: Alexander Larsson <alexl@redhat.com>
+ *           Marco Pesenti Gritti //XXXMARCUS TODO
+ *
+ */
+
+#include <config.h>
+
+#include "nautilus-view-chooser-action.h"
+#include "nautilus-navigation-window.h"
+#include "nautilus-window-private.h"
+#include "nautilus-window.h"
+#include "nautilus-navigation-window-slot.h"
+#include <gtk/gtk.h>
+#include <eel/eel-gtk-extensions.h>
+
+static void nautilus_view_chooser_action_init       (NautilusViewChooserAction *action);
+static void nautilus_view_chooser_action_class_init (NautilusViewChooserActionClass *class);
+
+static GObjectClass *parent_class = NULL;
+
+#define NAUTILUS_VIEW_CHOOSER_ACTION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), NAUTILUS_TYPE_VIEW_CHOOSER_ACTION, NautilusViewChooserActionPrivate))
+
+struct NautilusViewChooserActionPrivate
+{
+	NautilusNavigationWindow *window;
+        GtkComboBox *combo_box;
+};
+
+enum
+{
+	PROP_0,
+	PROP_WINDOW,
+        PROP_COMBO
+};
+enum
+{
+	CHANGED,
+	LAST_SIGNAL
+};
+static guint signals[LAST_SIGNAL];
+
+GType
+nautilus_view_chooser_action_get_type (void)
+{
+	static GType type = 0;
+
+	if (type == 0) {
+		const GTypeInfo type_info = {
+			sizeof (NautilusViewChooserActionClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) nautilus_view_chooser_action_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,
+			sizeof (NautilusViewChooserAction),
+			0, /* n_preallocs */
+			(GInstanceInitFunc) nautilus_view_chooser_action_init,
+		};
+		
+		type = g_type_register_static (GTK_TYPE_ACTION,
+					       "NautilusViewChooserAction",
+					       &type_info, 0);
+	}
+
+	return type;
+}
+
+static void
+changed_cb (GtkWidget *proxy,
+            NautilusViewChooserAction *action)
+{
+       //g_signal_emit (action, signals[CHANGED], 0);//, G_TYPE_NONE);
+}
+
+static GtkWidget *
+create_tool_item (GtkAction *action)
+{
+        fprintf(stderr, "Creating View Chooser Tool Item\n");
+	NautilusNavigationWindow *window;
+        NautilusViewChooserAction *laction;
+        GtkToolItem *proxy;
+        GtkWidget *parent;
+	GtkComboBox *combo;
+
+        laction = NAUTILUS_VIEW_CHOOSER_ACTION (action);
+
+	window = laction->priv->window;
+
+        combo = GTK_COMBO_BOX (gtk_combo_box_new_text ());
+        g_signal_connect (combo, "changed",
+			  G_CALLBACK (changed_cb),
+			  action);
+
+        gtk_container_set_border_width (GTK_CONTAINER (combo), 4); //XXXMARCUS FIXME: doesn't seem to work
+	gtk_combo_box_set_focus_on_click (GTK_COMBO_BOX (combo), FALSE);
+
+        g_object_set_data (G_OBJECT (action), "combo", combo);
+        gtk_widget_show (GTK_WIDGET (combo));
+        
+        proxy = gtk_tool_item_new ();
+
+	gtk_widget_show (GTK_WIDGET (proxy));
+
+        gtk_container_add (GTK_CONTAINER (proxy), GTK_WIDGET (combo));
+
+        NautilusWindowClass *class = NAUTILUS_WINDOW_GET_CLASS (window);
+        //class->load_view_as_menu (window);
+ 
+        return GTK_WIDGET (proxy);
+}
+
+static void
+connect_proxy (GtkAction *action, GtkWidget *proxy)
+{
+	//if (IS_NAUTILUS_VIEW_CHOOSER_ACTION (proxy)) {
+		NautilusViewChooserAction *naction = NAUTILUS_VIEW_CHOOSER_ACTION (action);
+  		//GtkMenuToolButton *button = GTK_MENU_TOOL_BUTTON (proxy);
+		//GtkWidget *child;
+
+		/* set an empty menu, so the arrow button becomes sensitive */
+		//menu = gtk_menu_new ();
+		//gtk_menu_tool_button_set_menu (button, menu);
+
+		//gtk_menu_tool_button_set_arrow_tooltip_text (button,
+		//					     naction->priv->arrow_tooltip);
+		
+		/*g_signal_connect (proxy, "show-menu",
+				  G_CALLBACK (show_menu_callback), action);*/
+
+		/* Make sure that middle click works. Note that there is some code duplication
+		 * between here and nautilus-window-menus.c */
+		//child = eel_gtk_menu_tool_button_get_button (button);
+		//g_signal_connect (child, "button-press-event", G_CALLBACK (proxy_button_press_event_cb), NULL);
+		//g_signal_connect (child, "button-release-event", G_CALLBACK (proxy_button_release_event_cb), NULL);
+	//}
+
+	(* GTK_ACTION_CLASS (parent_class)->connect_proxy) (action, proxy);
+}
+
+static void
+disconnect_proxy (GtkAction *action, GtkWidget *proxy)
+{
+	//if (GTK_IS_MENU_TOOL_BUTTON (proxy)) {
+		//GtkWidget *child;
+                //g_object_unref (proxy);
+                //NautilusViewChooserAction *naction = NAUTILUS_VIEW_CHOOSER_ACTION (action);
+		//g_object_ref (naction->priv->window->view_as_combo_box);
+		//g_signal_handlers_disconnect_by_func (proxy, G_CALLBACK (show_menu_callback), action);
+
+		//child = eel_gtk_menu_tool_button_get_button (GTK_MENU_TOOL_BUTTON (proxy));
+		//g_signal_handlers_disconnect_by_func (child, G_CALLBACK (proxy_button_press_event_cb), NULL);
+		//g_signal_handlers_disconnect_by_func (child, G_CALLBACK (proxy_button_release_event_cb), NULL);
+	//}
+
+	(* GTK_ACTION_CLASS (parent_class)->disconnect_proxy) (action, proxy);
+}
+
+static void
+nautilus_view_chooser_action_finalize (GObject *object)
+{
+	NautilusViewChooserAction *action = NAUTILUS_VIEW_CHOOSER_ACTION (object);
+
+	//g_free (action->priv->arrow_tooltip);
+
+	(* G_OBJECT_CLASS (parent_class)->finalize) (object);
+}
+
+static void
+nautilus_view_chooser_action_set_property (GObject *object,
+					 guint prop_id,
+					 const GValue *value,
+					 GParamSpec *pspec)
+{
+	NautilusViewChooserAction *nav;
+
+	nav = NAUTILUS_VIEW_CHOOSER_ACTION (object);
+
+	switch (prop_id)
+	{
+		case PROP_WINDOW:
+			nav->priv->window = NAUTILUS_NAVIGATION_WINDOW (g_value_get_object (value));
+			break;
+                case PROP_COMBO:
+                        nav->priv->combo_box = GTK_COMBO_BOX (g_value_get_object (value));
+                        break;
+	}
+}
+
+static void
+nautilus_view_chooser_action_get_property (GObject *object,
+					 guint prop_id,
+					 GValue *value,
+					 GParamSpec *pspec)
+{
+	NautilusViewChooserAction *nav;
+
+	nav = NAUTILUS_VIEW_CHOOSER_ACTION (object);
+
+	switch (prop_id)
+	{
+		case PROP_WINDOW:
+			g_value_set_object (value, nav->priv->window);
+			break;
+                case PROP_COMBO:
+                        g_value_set_object (value, nav->priv->window);
+                        break;
+	}
+}
+
+static void
+nautilus_view_chooser_action_class_init (NautilusViewChooserActionClass *class)
+{
+        fprintf(stderr, "nautilus_view_chooser_action_class_init!!\n");
+	GObjectClass *object_class = G_OBJECT_CLASS (class);
+	GtkActionClass *action_class = GTK_ACTION_CLASS (class);
+
+	object_class->finalize = nautilus_view_chooser_action_finalize;
+	object_class->set_property = nautilus_view_chooser_action_set_property;
+	object_class->get_property = nautilus_view_chooser_action_get_property;
+
+	parent_class = g_type_class_peek_parent (class);
+
+	action_class->toolbar_item_type = GTK_TYPE_COMBO_BOX; //NAUTILUS_TYPE_VIEW_CHOOSER_ACTION; //GTK_TYPE_MENU_TOOL_BUTTON;
+	action_class->connect_proxy = connect_proxy;
+	action_class->disconnect_proxy = disconnect_proxy;
+	action_class->create_tool_item = create_tool_item;
+
+	g_object_class_install_property (object_class,
+                                         PROP_WINDOW,
+                                         g_param_spec_object ("window",
+                                                              "Window",
+                                                              "The navigation window",
+                                                              G_TYPE_OBJECT,
+                                                              G_PARAM_READWRITE));
+	g_object_class_install_property (object_class,
+                                         PROP_COMBO,
+                                         g_param_spec_object ("combo",
+                                                              "Combo",
+                                                              "The combo box",
+                                                              G_TYPE_OBJECT,
+                                                              G_PARAM_READWRITE));
+	signals[CHANGED] = g_signal_new (
+		"changed",
+		NAUTILUS_TYPE_VIEW_CHOOSER_ACTION,
+		G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST,
+		G_STRUCT_OFFSET (NautilusViewChooserActionClass, changed),
+		NULL, NULL,
+		g_cclosure_marshal_VOID__VOID,
+		G_TYPE_NONE,
+		0);
+
+	g_type_class_add_private (object_class, sizeof(NautilusViewChooserActionPrivate));
+}
+
+static void
+nautilus_view_chooser_action_init (NautilusViewChooserAction *action)
+{
+        action->priv = NAUTILUS_VIEW_CHOOSER_ACTION_GET_PRIVATE (action);
+}
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-view-chooser-action.h nautilus-2.26.2/src/nautilus-view-chooser-action.h
--- nautilus-2.26.2.orig/src/nautilus-view-chooser-action.h	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/src/nautilus-view-chooser-action.h	2009-07-21 21:10:29.000000000 +0200
@@ -0,0 +1,66 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
+/*
+ *  Nautilus
+ *
+ *  Copyright (C) 2004 Red Hat, Inc.
+ *  Copyright (C) 2003 Marco Pesenti Gritti
+ *
+ *  Nautilus 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.
+ *
+ *  Nautilus 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *
+ *  Based on nautilus-navigation-action.h
+ *
+ *  Authors: Alexander Larsson <alexl@redhat.com>
+ *           Marco Pesenti Gritti //XXXMARCUS TODO
+ *
+ */
+
+#ifndef NAUTILUS_VIEW_CHOOSER_ACTION_H
+#define NAUTILUS_VIEW_CHOOSER_ACTION_H
+
+#include <gtk/gtk.h>
+
+#define NAUTILUS_TYPE_VIEW_CHOOSER_ACTION            (nautilus_view_chooser_action_get_type ())
+#define NAUTILUS_VIEW_CHOOSER_ACTION(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_VIEW_CHOOSER_ACTION, NautilusViewChooserAction))
+#define NAUTILUS_VIEW_CHOOSER_ACTION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_VIEW_CHOOSER_ACTION, NautilusViewChooserActionClass))
+#define NAUTILUS_IS_VIEW_CHOOSER_ACTION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_VIEW_CHOOSER_ACTION))
+#define NAUTILUS_IS_VIEW_CHOOSER_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NAUTILUS_TYPE_VIEW_CHOOSER_ACTION))
+#define NAUTILUS_VIEW_CHOOSER_ACTION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), NAUTILUS_TYPE_VIEW_CHOOSER_ACTION, NautilusViewChooserActionClass))
+
+typedef struct _NautilusViewChooserAction       NautilusViewChooserAction;
+typedef struct _NautilusViewChooserActionClass  NautilusViewChooserActionClass;
+typedef struct NautilusViewChooserActionPrivate NautilusViewChooserActionPrivate;
+
+struct _NautilusViewChooserAction
+{
+	GtkAction parent;
+	
+	/*< private >*/
+	NautilusViewChooserActionPrivate *priv;
+};
+
+struct _NautilusViewChooserActionClass
+{
+	GtkActionClass parent_class;
+
+	/* Signals */
+	void (* changed)	(NautilusViewChooserAction *action);//XXXMARCUS FIXME: , NautilusWindow *window);
+
+};
+
+GType    nautilus_view_chooser_action_get_type   (void);
+
+#endif
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-window.c nautilus-2.26.2/src/nautilus-window.c
--- nautilus-2.26.2.orig/src/nautilus-window.c	2009-03-20 11:16:01.000000000 +0100
+++ nautilus-2.26.2/src/nautilus-window.c	2009-07-20 23:35:49.000000000 +0200
@@ -155,6 +155,7 @@
 
 	table = gtk_table_new (1, 6, FALSE);
 	window->details->table = table;
+
 	gtk_widget_show (table);
 	gtk_container_add (GTK_CONTAINER (window), table);
 
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-window-private.h nautilus-2.26.2/src/nautilus-window-private.h
--- nautilus-2.26.2.orig/src/nautilus-window-private.h	2009-03-20 11:16:01.000000000 +0100
+++ nautilus-2.26.2/src/nautilus-window-private.h	2009-07-18 21:20:10.000000000 +0200
@@ -32,7 +32,7 @@
 #include "nautilus-window-slot.h"
 #include "nautilus-spatial-window.h"
 #include "nautilus-navigation-window.h"
-
+#include <cut-n-paste-code/toolbar-editor/egg-editable-toolbar.h>
 #include <libnautilus-private/nautilus-directory.h>
 
 /* FIXME bugzilla.gnome.org 42575: Migrate more fields into here. */
@@ -111,6 +111,7 @@
         /* Toolbar */
         GtkWidget *toolbar;
         GtkWidget *location_bar;
+ 	EggToolbarsModel *toolbars_model;
 
         guint extensions_toolbar_merge_id;
         GtkActionGroup *extensions_toolbar_action_group;
@@ -238,7 +239,6 @@
 void               nautilus_navigation_window_remove_go_menu_items       (NautilusNavigationWindow    *window);
 
 /* Navigation window toolbar */
-void               nautilus_navigation_window_activate_throbber                     (NautilusNavigationWindow    *window);
 void               nautilus_navigation_window_initialize_toolbars                   (NautilusNavigationWindow    *window);
 void               nautilus_navigation_window_load_extension_toolbar_items          (NautilusNavigationWindow    *window);
 void               nautilus_navigation_window_set_throbber_active                   (NautilusNavigationWindow    *window, 
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-window-toolbars.c nautilus-2.26.2/src/nautilus-window-toolbars.c
--- nautilus-2.26.2.orig/src/nautilus-window-toolbars.c	2008-10-06 12:49:08.000000000 +0200
+++ nautilus-2.26.2/src/nautilus-window-toolbars.c	2009-07-20 23:21:50.000000000 +0200
@@ -34,6 +34,12 @@
 #include "nautilus-window-private.h"
 #include "nautilus-window.h"
 #include "nautilus-throbber.h"
+#include "nautilus-pathbar.h"
+#include "nautilus-zoom-action.h"
+#include "nautilus-view-chooser-action.h"
+#include "nautilus-location-bar-action.h"
+#include <cut-n-paste-code/toolbar-editor/egg-editable-toolbar.h>
+#include <nautilus-toolbars-model.h>
 #include <eel/eel-gnome-extensions.h>
 #include <eel/eel-gtk-extensions.h>
 #include <eel/eel-string.h>
@@ -93,9 +99,10 @@
 	nautilus_throbber_set_size (throbber, size);
 }
 
-void
+static void
 nautilus_navigation_window_activate_throbber (NautilusNavigationWindow *window)
 {
+ 	GtkToolbar *fixed_toolbar;
 	GtkToolItem *item;
 	GtkWidget *throbber;
 
@@ -103,12 +110,15 @@
 		return;
 	}
 
+ 	fixed_toolbar = GTK_TOOLBAR (gtk_toolbar_new ());
+
+	/* Add expander */
 	item = gtk_tool_item_new ();
 	gtk_widget_show (GTK_WIDGET (item));
 	gtk_tool_item_set_expand (item, TRUE);
-	gtk_toolbar_insert (GTK_TOOLBAR (window->details->toolbar),
-			    item, -1);
+ 	gtk_toolbar_insert (fixed_toolbar, item, -1);
 
+	/* Create throbber */
 	throbber = nautilus_throbber_new ();
 	gtk_widget_show (GTK_WIDGET (throbber));
 
@@ -119,16 +129,91 @@
 	g_signal_connect (item, "toolbar-reconfigured",
 			  G_CALLBACK (toolbar_reconfigured_cb), throbber);
 
-	gtk_toolbar_insert (GTK_TOOLBAR (window->details->toolbar),
-			    item, -1);
+ 	gtk_toolbar_insert (fixed_toolbar, item, -1);
+
+ 	egg_editable_toolbar_set_fixed (EGG_EDITABLE_TOOLBAR (window->details->toolbar),
+ 					fixed_toolbar);
 
 	window->details->throbber = throbber;
 }
 
+/* XXXMARCUS FIXME: Actually this function only adds the custom action to the action group so it might 
+be good to change the name */
+static void
+nautilus_navigation_window_initialize_navigation_bar (NautilusNavigationWindow *window)
+{
+	GtkToolItem *item;
+	GtkWidget *hbox, *view_as_menu_vbox;
+	GtkAction *action;
+
+	/* Location action */
+	if (!window->path_bar) //XXXMARCUS FIXME: this maybe should be in nautilus_navigation_window_init instead?
+		window->path_bar = g_object_new (NAUTILUS_TYPE_PATH_BAR, NULL);
+
+	action = g_object_new (NAUTILUS_TYPE_LOCATION_BAR_ACTION,
+			       "name", "Location",
+			       "label", _("_Location"),
+			       "stock_id", GTK_STOCK_EDIT,
+			       "tooltip", _("Location"), //XXXMARCUS FIXME
+			       "window", window,
+			       "visible-overflown", FALSE,
+			       "is_important", TRUE, //XXXMARCUS ??
+			       NULL);
+
+	gtk_action_group_add_action (window->details->navigation_action_group, 
+				     action);
+
+	g_object_unref (action); ///XXMARCUS Should this be here?
+
+	/* Zoom action */
+	action = g_object_new (NAUTILUS_TYPE_ZOOM_ACTION,
+			       "name", "Zoom",
+			       "label", _("_Zoom"),
+			       "stock_id", GTK_STOCK_ZOOM_IN,
+			       "tooltip", _("Zoooom"), //XXXMARCUS FIXME
+			       "window", window,
+			       "is_important", FALSE, //XXXMARCUS ??
+			       NULL);
+
+	gtk_action_group_add_action (
+		window->details->navigation_action_group, action);
+
+	g_object_unref (action);
+
+	/* View Chooser action */
+	action = g_object_new (NAUTILUS_TYPE_VIEW_CHOOSER_ACTION,
+			       "name", "ViewChooser",
+			       "label", _("_View Chooser"),
+			       "stock_id", GTK_STOCK_FIND,
+			       "tooltip", _("Viewchooser"), //XXXMARCUS FIXME
+			       "window", window,
+			       "is_important", FALSE, //XXXMARCUS ??
+			       NULL);
+
+	gtk_action_group_add_action (
+		window->details->navigation_action_group, action);
+}
+
+
 void
 nautilus_navigation_window_initialize_toolbars (NautilusNavigationWindow *window)
 {
+	const char *ui;
+
+ 	window->details->toolbars_model = nautilus_toolbars_model_new ();
+ 
+	/* Creates the toolbar and specifiying the popup menu /editor from file editor.xml */ 
+	window->details->toolbar = egg_editable_toolbar_new_with_model (
+ 		nautilus_window_get_ui_manager (NAUTILUS_WINDOW (window)),
+ 		window->details->toolbars_model, "/editor");
+
+	ui = nautilus_ui_string_get ("editor.xml");
+	gtk_ui_manager_add_ui_from_string (nautilus_window_get_ui_manager (NAUTILUS_WINDOW (window)), ui, -1, NULL);
+
 	nautilus_navigation_window_activate_throbber (window);
+	nautilus_navigation_window_initialize_navigation_bar (window);
+
+ 	nautilus_toolbars_model_load (NAUTILUS_TOOLBARS_MODEL (window->details->toolbars_model));
 }
 
 
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-zoom-action.c nautilus-2.26.2/src/nautilus-zoom-action.c
--- nautilus-2.26.2.orig/src/nautilus-zoom-action.c	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/src/nautilus-zoom-action.c	2009-07-19 22:42:12.000000000 +0200
@@ -0,0 +1,361 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
+/*
+ *  Nautilus
+ *
+ *  Copyright (C) 2004 Red Hat, Inc.
+ *  Copyright (C) 2003 Marco Pesenti Gritti
+ *
+ *  Nautilus 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.
+ *
+ *  Nautilus 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Based on ephy-navigation-action.h from Epiphany
+ *
+ *  Authors: Alexander Larsson <alexl@redhat.com>
+ *           Marco Pesenti Gritti //XXXMARCUS TODO
+ *
+ */
+
+#include <config.h>
+
+#include "nautilus-zoom-action.h"
+#include "nautilus-navigation-window.h"
+#include "nautilus-window-private.h"
+#include "nautilus-navigation-window-slot.h"
+#include <gtk/gtk.h>
+#include <eel/eel-gtk-extensions.h>
+
+static void nautilus_zoom_action_init       (NautilusZoomAction *action);
+static void nautilus_zoom_action_class_init (NautilusZoomActionClass *class);
+
+static GObjectClass *parent_class = NULL;
+
+#define NAUTILUS_ZOOM_ACTION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), NAUTILUS_TYPE_ZOOM_ACTION, NautilusZoomActionPrivate))
+
+struct NautilusZoomActionPrivate
+{
+	NautilusNavigationWindow *window;
+        //TODO: current zoom level?
+};
+
+enum
+{
+	PROP_0,
+	PROP_WINDOW
+};
+
+GType
+nautilus_zoom_action_get_type (void)
+{
+	static GType type = 0;
+
+	if (type == 0) {
+		const GTypeInfo type_info = {
+			sizeof (NautilusZoomActionClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) nautilus_zoom_action_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL,
+			sizeof (NautilusZoomAction),
+			0, /* n_preallocs */
+			(GInstanceInitFunc) nautilus_zoom_action_init,
+		};
+		
+		type = g_type_register_static (GTK_TYPE_ACTION,
+					       "NautilusZoomAction",
+					       &type_info, 0);
+	}
+
+	return type;
+}
+static GtkWidget *
+create_tool_item (GtkAction *action)
+{
+        fprintf(stderr, "Creating Zoom Tool Item\n");
+
+        GtkToolItem *proxy;
+	GtkWidget *hbox;
+        NautilusNavigationWindow *window;
+        NautilusZoomAction *laction;
+        
+        laction = NAUTILUS_ZOOM_ACTION (action);
+
+	window = laction->priv->window;
+        hbox = window->zoom_control; //nautilus_zoom_control_new ();
+
+        gtk_widget_show (hbox);
+
+        proxy = gtk_tool_item_new ();
+	gtk_widget_show (GTK_WIDGET (proxy));
+	gtk_container_add (GTK_CONTAINER (proxy), hbox);
+
+	 //g_object_new (nautilus_action_widget_get_type (), NULL);
+	//gtk_widget_show (GTK_WIDGET (proxy));
+        return proxy;
+	//gtk_container_set_border_width (GTK_CONTAINER (proxy), 6); 
+	//gtk_widget_show (GTK_WIDGET (proxy));
+
+	//hbox = gtk_hbox_new (FALSE, 0);
+	//gtk_box_set_spacing (GTK_BOX (hbox), 6);
+
+	//proxy->entry = gtk_entry_new ();
+	//obj = gtk_widget_get_accessible (proxy->entry);
+        //atk_object_set_name (obj, "page-label-entry");
+	         
+	//g_signal_connect(proxy->entry, "scroll-event",G_CALLBACK(page_scroll_cb),action);
+	//gtk_widget_add_events(GTK_WIDGET(proxy->entry),GDK_BUTTON_MOTION_MASK);
+	//gtk_entry_set_width_chars (GTK_ENTRY (proxy->entry), 5);
+	//gtk_box_pack_start (GTK_BOX (hbox), proxy, FALSE, FALSE, 0);
+	//gtk_widget_show (proxy->entry);
+	/*g_signal_connect (proxy->entry, "activate",
+			  G_CALLBACK (activate_cb),
+			  action);
+
+	proxy->label = gtk_label_new (NULL);
+	gtk_box_pack_start (GTK_BOX (hbox), proxy->label, FALSE, FALSE, 0);
+	gtk_widget_show (proxy->label);*/
+
+	//gtk_container_add (GTK_CONTAINER (proxy), hbox);
+	//gtk_widget_show (hbox);
+
+	//return GTK_WIDGET (proxy);
+
+        //return NULL;
+}
+/*static void
+activate_back_menu_item_callback (GtkMenuItem *menu_item, NautilusNavigationWindow *window)
+{
+	activate_back_or_forward_menu_item (menu_item, window, TRUE);
+}
+
+static void
+activate_forward_menu_item_callback (GtkMenuItem *menu_item, NautilusNavigationWindow *window)
+{
+	activate_back_or_forward_menu_item (menu_item, window, FALSE);
+}
+
+static void
+fill_menu (NautilusNavigationWindow *window,
+	   GtkWidget *menu,
+	   gboolean back)
+{
+	NautilusNavigationWindowSlot *slot;
+	GtkWidget *menu_item;
+	int index;
+	GList *list;
+
+	g_assert (NAUTILUS_IS_NAVIGATION_WINDOW (window));
+
+	slot = NAUTILUS_NAVIGATION_WINDOW_SLOT (NAUTILUS_WINDOW (window)->details->active_slot);
+	
+	list = back ? slot->back_list : slot->forward_list;
+	index = 0;
+	while (list != NULL) {
+		menu_item = nautilus_bookmark_menu_item_new (NAUTILUS_BOOKMARK (list->data));
+		g_object_set_data (G_OBJECT (menu_item), "user_data", GINT_TO_POINTER (index));
+		gtk_widget_show (GTK_WIDGET (menu_item));
+  		g_signal_connect_object (menu_item, "activate",
+					 back
+					 ? G_CALLBACK (activate_back_menu_item_callback)
+					 : G_CALLBACK (activate_forward_menu_item_callback),
+					 window, 0);
+		
+		gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+		list = g_list_next (list);
+		++index;
+	}
+}
+
+static void
+show_menu_callback (GtkMenuToolButton *button,
+		    NautilusNavigationAction *action)
+{
+	NautilusNavigationActionPrivate *p;
+	NautilusNavigationWindow *window;
+	GtkWidget *menu;
+	GList *children;
+	GList *li;
+
+	p = action->priv;
+	window = action->priv->window;
+	
+	menu = gtk_menu_tool_button_get_menu (button);
+	
+	children = gtk_container_get_children (GTK_CONTAINER (menu));
+	for (li = children; li; li = li->next) {
+		gtk_container_remove (GTK_CONTAINER (menu), li->data);
+	}
+	g_list_free (children);
+
+	switch (p->direction) {
+	case NAUTILUS_NAVIGATION_DIRECTION_FORWARD:
+		fill_menu (window, menu, FALSE);
+		break;
+	case NAUTILUS_NAVIGATION_DIRECTION_BACK:
+		fill_menu (window, menu, TRUE);
+		break;
+	default:
+		g_assert_not_reached ();
+		break;
+	}
+}
+
+static gboolean
+proxy_button_press_event_cb (GtkButton *button,
+			     GdkEventButton *event,
+			     gpointer user_data)
+{
+	if (event->button == 2) {
+		gtk_button_pressed (button);
+	}
+
+	return FALSE;
+}
+
+static gboolean
+proxy_button_release_event_cb (GtkButton *button,
+			       GdkEventButton *event,
+			       gpointer user_data)
+{
+	if (event->button == 2) {
+		gtk_button_released (button);
+	}
+
+	return FALSE;
+}
+*/
+static void
+connect_proxy (GtkAction *action, GtkWidget *proxy)
+{
+	if (GTK_IS_MENU_TOOL_BUTTON (proxy)) {
+		NautilusZoomAction *naction = NAUTILUS_ZOOM_ACTION (action);
+		//GtkMenuToolButton *button = GTK_MENU_TOOL_BUTTON (proxy);
+		//GtkWidget *child;
+
+		/* set an empty menu, so the arrow button becomes sensitive */
+		//menu = gtk_menu_new ();
+		//gtk_menu_tool_button_set_menu (button, menu);
+
+		//gtk_menu_tool_button_set_arrow_tooltip_text (button,
+		//					     naction->priv->arrow_tooltip);
+		
+		/*g_signal_connect (proxy, "show-menu",
+				  G_CALLBACK (show_menu_callback), action);*/
+
+		/* Make sure that middle click works. Note that there is some code duplication
+		 * between here and nautilus-window-menus.c */
+		//child = eel_gtk_menu_tool_button_get_button (button);
+		//g_signal_connect (child, "button-press-event", G_CALLBACK (proxy_button_press_event_cb), NULL);
+		//g_signal_connect (child, "button-release-event", G_CALLBACK (proxy_button_release_event_cb), NULL);
+	}
+
+	(* GTK_ACTION_CLASS (parent_class)->connect_proxy) (action, proxy);
+}
+
+static void
+disconnect_proxy (GtkAction *action, GtkWidget *proxy)
+{
+	if (GTK_IS_MENU_TOOL_BUTTON (proxy)) {
+		GtkWidget *child;
+		
+		//g_signal_handlers_disconnect_by_func (proxy, G_CALLBACK (show_menu_callback), action);
+
+		//child = eel_gtk_menu_tool_button_get_button (GTK_MENU_TOOL_BUTTON (proxy));
+		//g_signal_handlers_disconnect_by_func (child, G_CALLBACK (proxy_button_press_event_cb), NULL);
+		//g_signal_handlers_disconnect_by_func (child, G_CALLBACK (proxy_button_release_event_cb), NULL);
+	}
+
+	(* GTK_ACTION_CLASS (parent_class)->disconnect_proxy) (action, proxy);
+}
+
+static void
+nautilus_zoom_action_finalize (GObject *object)
+{
+	NautilusZoomAction *action = NAUTILUS_ZOOM_ACTION (object);
+
+	//g_free (action->priv->arrow_tooltip);
+
+	(* G_OBJECT_CLASS (parent_class)->finalize) (object);
+}
+
+static void
+nautilus_zoom_action_set_property (GObject *object,
+					 guint prop_id,
+					 const GValue *value,
+					 GParamSpec *pspec)
+{
+	NautilusZoomAction *nav;
+
+	nav = NAUTILUS_ZOOM_ACTION (object);
+
+	switch (prop_id)
+	{
+		case PROP_WINDOW:
+			nav->priv->window = NAUTILUS_NAVIGATION_WINDOW (g_value_get_object (value));
+			break;
+	}
+}
+
+static void
+nautilus_zoom_action_get_property (GObject *object,
+					 guint prop_id,
+					 GValue *value,
+					 GParamSpec *pspec)
+{
+	NautilusZoomAction *nav;
+
+	nav = NAUTILUS_ZOOM_ACTION (object);
+
+	switch (prop_id)
+	{
+		case PROP_WINDOW:
+			g_value_set_object (value, nav->priv->window);
+			break;
+	}
+}
+
+static void
+nautilus_zoom_action_class_init (NautilusZoomActionClass *class)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (class);
+	GtkActionClass *action_class = GTK_ACTION_CLASS (class);
+
+	object_class->finalize = nautilus_zoom_action_finalize;
+	object_class->set_property = nautilus_zoom_action_set_property;
+	object_class->get_property = nautilus_zoom_action_get_property;
+
+	parent_class = g_type_class_peek_parent (class);
+
+	action_class->toolbar_item_type = GTK_TYPE_MENU_TOOL_BUTTON;
+	//action_class->connect_proxy = connect_proxy;
+	//action_class->disconnect_proxy = disconnect_proxy;
+	action_class->create_tool_item = create_tool_item;
+
+	g_object_class_install_property (object_class,
+                                         PROP_WINDOW,
+                                         g_param_spec_object ("window",
+                                                              "Window",
+                                                              "The navigation window",
+                                                              G_TYPE_OBJECT,
+                                                              G_PARAM_READWRITE));
+
+	g_type_class_add_private (object_class, sizeof(NautilusZoomActionPrivate));
+}
+
+static void
+nautilus_zoom_action_init (NautilusZoomAction *action)
+{
+        action->priv = NAUTILUS_ZOOM_ACTION_GET_PRIVATE (action);
+}
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/src/nautilus-zoom-action.h nautilus-2.26.2/src/nautilus-zoom-action.h
--- nautilus-2.26.2.orig/src/nautilus-zoom-action.h	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/src/nautilus-zoom-action.h	2009-07-19 13:35:27.000000000 +0200
@@ -0,0 +1,62 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
+/*
+ *  Nautilus
+ *
+ *  Copyright (C) 2004 Red Hat, Inc.
+ *  Copyright (C) 2003 Marco Pesenti Gritti
+ *
+ *  Nautilus 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.
+ *
+ *  Nautilus 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *
+ *  Based on nautilus-navigation-action.h
+ *
+ *  Authors: Alexander Larsson <alexl@redhat.com>
+ *           Marco Pesenti Gritti //XXXMARCUS TODO
+ *
+ */
+
+#ifndef NAUTILUS_ZOOM_ACTION_H
+#define NAUTILUS_ZOOM_ACTION_H
+
+#include <gtk/gtk.h>
+
+#define NAUTILUS_TYPE_ZOOM_ACTION            (nautilus_zoom_action_get_type ())
+#define NAUTILUS_ZOOM_ACTION(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_ZOOM_ACTION, NautilusZoomAction))
+#define NAUTILUS_ZOOM_ACTION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_ZOOM_ACTION, NautilusZoomActionClass))
+#define NAUTILUS_IS_ZOOM_ACTION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_ZOOM_ACTION))
+#define NAUTILUS_IS_ZOOM_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NAUTILUS_TYPE_ZOOM_ACTION))
+#define NAUTILUS_ZOOM_ACTION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), NAUTILUS_TYPE_ZOOM_ACTION, NautilusZoomActionClass))
+
+typedef struct _NautilusZoomAction       NautilusZoomAction;
+typedef struct _NautilusZoomActionClass  NautilusZoomActionClass;
+typedef struct NautilusZoomActionPrivate NautilusZoomActionPrivate;
+
+struct _NautilusZoomAction
+{
+	GtkAction parent;
+	
+	/*< private >*/
+	NautilusZoomActionPrivate *priv;
+};
+
+struct _NautilusZoomActionClass
+{
+	GtkActionClass parent_class;
+};
+
+GType    nautilus_zoom_action_get_type   (void);
+
+#endif
diff -N -r -u -x '*.o' -x 'config.*' -x '*~' -x '*.orig' -x '*.rej' -x '*.Plo' -x '*.la' -x '*.lo' -x Makefile -x '*.desktop' -x '*.schemas' -x nautilus.xml -x '*.lai' -x 'po/*' -x '.*' -x 'test-*' -x libtool -x nautilus-connect-server -x nautilus-autorun-software -x nautilus -x POTFILES -x nautilus-file-management-properties -x '*.pc' -x 'eel-*' -x 'stamp-*' -x '*marshal*' -x po/Makefile.in nautilus-2.26.2.orig/toolbars.xml nautilus-2.26.2/toolbars.xml
--- nautilus-2.26.2.orig/toolbars.xml	1970-01-01 01:00:00.000000000 +0100
+++ nautilus-2.26.2/toolbars.xml	2009-07-18 20:54:24.000000000 +0200
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<toolbars version="1.0">
+<available>
+	<toolitem name="Back"/>
+	<toolitem name="Forward"/>
+	<toolitem name="Up"/>
+	<toolitem name="Stop"/>
+	<toolitem name="Reload"/>
+	<toolitem name="Home"/>
+	<toolitem name="Go to Computer"/>
+	<toolitem name="Location"/>
+	<toolitem name="Zoom"/>
+	<toolitem name="ViewChooser"/>
+</available>
+<toolbar name="DefaultToolbar">
+	<toolitem name="Back"/>
+	<toolitem name="Forward"/>
+	<toolitem name="Up"/>
+	<toolitem name="Stop"/>
+	<toolitem name="Reload"/>
+	<separator/>
+	<toolitem name="Home"/>	
+	<toolitem name="Go to Computer"/>
+</toolbar>
+<toolbar name="EntryToolbar">
+	<toolitem name="Location"/>
+	<toolitem name="Zoom"/>
+	<toolitem name="ViewChooser"/>
+</toolbar>
+</toolbars>
