Index: src/gth-viewer-actions-callbacks.h
===================================================================
--- src/gth-viewer-actions-callbacks.h	(revisão 2246)
+++ src/gth-viewer-actions-callbacks.h	(cópia de trabalho)
@@ -36,6 +36,7 @@
 DEFINE_ACTION(gth_viewer_activate_action_view_show_info)
 DEFINE_ACTION(gth_viewer_activate_action_go_refresh)
 DEFINE_ACTION(gth_viewer_activate_action_single_window)
+DEFINE_ACTION(gth_viewer_activate_action_scripts)
 DEFINE_ACTION(gth_viewer_activate_action_upload_flickr)
 
 #endif /* GTH_VIEWER_ACTIONS_CALLBACK_H */
Index: src/gth-viewer-ui.h
===================================================================
--- src/gth-viewer-ui.h	(revisão 2246)
+++ src/gth-viewer-ui.h	(cópia de trabalho)
@@ -121,7 +121,7 @@
 "      <menuitem action='Tools_ChangeDate'/>"
 "    </menu>"
 "    <menu name='Scripts' action='ScriptMenu'>"
-"      <placeholder name='User_Defined_Scripts'>"
+"      <placeholder name='User_Defined_Scripts'/>"
 "      <separator/>"
 "      <menuitem action='External_Scripts'/>"
 "    </menu>"
Index: src/dlg-scripts.c
===================================================================
--- src/dlg-scripts.c	(revisão 2246)
+++ src/dlg-scripts.c	(cópia de trabalho)
@@ -1250,7 +1250,7 @@
 		      GthWindow      *window)
 {
 	static int   number_of_scripts = 0;
-	static guint merge_id = 0;
+	guint merge_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (ui), "script-merge-id"));
 
 	/* Remove the previously-defined menu items and their associated actions.
 	 * Only one of the checks *should* be necessary. */
@@ -1270,6 +1270,9 @@
 
 	/* Identify this batch of menu additions (for later removal, if required) */
 	merge_id = gtk_ui_manager_new_merge_id (ui);                
+	g_object_set_data (G_OBJECT (ui),
+			   "script-merge-id",
+			   GUINT_TO_POINTER (merge_id));
 
 	unsigned int i;
 	number_of_scripts = eel_gconf_get_integer (PREF_HOTKEY_PREFIX "number_of_scripts", 10);
Index: src/gth-viewer-actions-entries.h
===================================================================
--- src/gth-viewer-actions-entries.h	(revisão 2246)
+++ src/gth-viewer-actions-entries.h	(cópia de trabalho)
@@ -38,8 +38,6 @@
 	{ "ViewShowHideMenu", NULL, N_("Show/_Hide") },
 	{ "ViewZoomMenu", NULL, N_("_Zoom") },
 	{ "ImageMenu", NULL, N_("_Image") },
-	{ "ImageTransformMenu", NULL, N_("_Transform") },
-	{ "ImageAutoMenu", NULL, N_("Auto") },
 	{ "ToolsMenu", NULL, N_("_Tools") },
 	{ "ToolsWallpaperMenu", NULL, N_("Set Image as _Wallpaper") },
 	{ "ScriptMenu", NULL, N_("_Scripts") },
@@ -65,6 +63,11 @@
 	  N_("_Reload"), "<control>R",
 	  N_("Reload the current location"),
 	  G_CALLBACK (gth_viewer_activate_action_go_refresh) },
+
+        { "External_Scripts", GTK_STOCK_EDIT,
+          N_("_Edit Scripts"), NULL,
+          N_("Edit external scripts"),
+          G_CALLBACK (gth_viewer_activate_action_scripts) },
 	  
 	 { "Upload_Flickr", NULL,
 	  N_("To _Flickr"), NULL,
Index: src/gth-viewer.c
===================================================================
--- src/gth-viewer.c	(revisão 2246)
+++ src/gth-viewer.c	(cópia de trabalho)
@@ -1524,6 +1524,9 @@
 		g_message ("building menus failed: %s", error->message);
 		g_error_free (error);
 	}
+
+	generate_script_menu (ui, priv->actions, GTH_WINDOW (viewer));
+
 	menubar = gtk_ui_manager_get_widget (ui, "/MenuBar");
 
 	gtk_widget_show (menubar);
@@ -2342,3 +2345,10 @@
 
 	return (GtkWidget*) SingleViewer;
 }
+
+void
+gth_viewer_update_script_menu (GthViewer *viewer)
+{
+	generate_script_menu (viewer->priv->ui, viewer->priv->actions, GTH_WINDOW (viewer));
+}
+
Index: src/gth-viewer.h
===================================================================
--- src/gth-viewer.h	(revisão 2246)
+++ src/gth-viewer.h	(cópia de trabalho)
@@ -60,5 +60,7 @@
 						    gboolean        value);
 
 GtkWidget *    gth_viewer_get_current_viewer       (void);
+void           gth_viewer_update_script_menu       (GthViewer *viewer);
 
+
 #endif /* GTH_VIEWER_H */
Index: src/gth-viewer-actions-callbacks.c
===================================================================
--- src/gth-viewer-actions-callbacks.c	(revisão 2246)
+++ src/gth-viewer-actions-callbacks.c	(cópia de trabalho)
@@ -135,6 +135,13 @@
 	gth_viewer_set_single_window (viewer, gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
 }
 
+void
+gth_viewer_activate_action_scripts (GtkAction *action,
+                                    GthViewer *viewer) {
+	dlg_scripts (GTH_WINDOW (viewer), (DoneFunc) gth_viewer_update_script_menu, viewer);
+}
+
+
 void 
 gth_viewer_activate_action_upload_flickr (GtkAction  *action,
 						 GthBrowser *viewer)
