diff -urN --exclude CVS f-spot/src/FullScreenView.cs f-spot-open-with-vfs/src/FullScreenView.cs
--- f-spot/src/FullScreenView.cs	2004-12-15 08:32:55.000000000 +0000
+++ f-spot-open-with-vfs/src/FullScreenView.cs	2005-01-26 22:58:02.867688264 +0000
@@ -1,8 +1,9 @@
 namespace FSpot {
 	public class FullScreenView : Gtk.Window {
-		public FullScreenView (PhotoQuery query) : base ("Full Screen Mode")
+		public FullScreenView (PhotoQuery query, OpenWithMenu open_with_menu) : base ("Full Screen Mode")
 		{
 			try {
+				this.open_with_menu = open_with_menu;
 				scroll = new Gtk.ScrolledWindow (null, null);
 				view = new PhotoImageView (query);
 				view.ModifyBg (Gtk.StateType.Normal, this.Style.Black);
@@ -19,6 +20,7 @@
 		}
 
 		private Gtk.ScrolledWindow scroll;
+		private OpenWithMenu open_with_menu;
 		private PhotoImageView view;
 		public PhotoImageView View {
 			get {
@@ -33,7 +35,7 @@
 		{
 			if (args.Event.Type == Gdk.EventType.ButtonPress
 			    && args.Event.Button == 3) {
-				PhotoPopup popup = new PhotoPopup ();
+				PhotoPopup popup = new PhotoPopup (open_with_menu);
 				popup.Activate (args.Event);
 			}
 		}
diff -urN --exclude CVS f-spot/src/IconView.cs f-spot-open-with-vfs/src/IconView.cs
--- f-spot/src/IconView.cs	2005-01-22 19:59:52.000000000 +0000
+++ f-spot-open-with-vfs/src/IconView.cs	2005-01-26 22:20:22.403193885 +0000
@@ -921,7 +921,7 @@
 
 	void ContextMenu (ButtonPressEventArgs args, int cell_num)
 	{
-		PhotoPopup popup = new PhotoPopup ();
+		PhotoPopup popup = new PhotoPopup (MainWindow.Toplevel.OpenWithMenu);
 		popup.Activate (args.Event);
 	}
 	
diff -urN --exclude CVS f-spot/src/main.cs f-spot-open-with-vfs/src/main.cs
--- f-spot/src/main.cs	2005-01-12 21:12:46.000000000 +0000
+++ f-spot-open-with-vfs/src/main.cs	2005-01-26 22:27:30.377459657 +0000
@@ -22,11 +22,18 @@
 		
 		Gtk.Window.DefaultIconList = new Gdk.Pixbuf [] {PixbufUtils.LoadFromAssembly ("f-spot-logo.png")};
 
-		new MainWindow (db);
+ 		Gnome.Vfs.Vfs.Initialize();
+ 		try {
+ 			OpenWithMenu open_with_menu = new OpenWithMenu("image/jpeg");
+ 			MainWindow main_window = new MainWindow (db);
+ 			main_window.OpenWithMenu = open_with_menu;
+ 			ParseCommands (args);
+  
+ 			program.Run ();
+ 		} finally {
+ 			Gnome.Vfs.Vfs.Shutdown();
+ 		}
 		
-		ParseCommands (args);
-
-		program.Run ();
 	}
 
 	private static void  ParseCommands (string [] args) 
diff -urN --exclude CVS f-spot/src/MainWindow.cs f-spot-open-with-vfs/src/MainWindow.cs
--- f-spot/src/MainWindow.cs	2005-01-25 22:06:43.000000000 +0000
+++ f-spot-open-with-vfs/src/MainWindow.cs	2005-01-26 23:46:30.302964241 +0000
@@ -19,6 +19,16 @@
 			return db;
 		}
 	}
+	
+	OpenWithMenu open_with_menu;
+	public OpenWithMenu OpenWithMenu {
+		get {
+			return open_with_menu;
+		}
+		set {
+			open_with_menu = value;
+		}
+	}
 
 	TagSelectionWidget tag_selection_widget;
 	[Glade.Widget] Gtk.Window main_window;
@@ -1248,7 +1258,7 @@
 	{
 		int active = Math.Max (ActiveIndex (), 0);
 		if (fsview == null) {
-			fsview = new FSpot.FullScreenView (query);
+			fsview = new FSpot.FullScreenView (query, open_with_menu);
 			fsview.Destroyed += HandleFullScreenViewDestroy;
 		}
 		// FIXME this needs to be another mode like PhotoView and IconView mode.
@@ -1468,6 +1478,22 @@
 		query.Range = null;
 	}
 
+	public void HandleOpenWith(Gnome.Vfs.MimeApplication mime_application) {
+		Photo[] selected = SelectedPhotos();
+		if (selected.Length > 0) {
+		    GLib.List uri_list = new GLib.List(typeof(string));
+		    foreach (Photo photo in selected) {
+		    	// What exception handling? Out of space, blah, blah
+				uint version = photo.CreateDefaultModifiedVersion (photo.DefaultVersionId, true);
+				photo.DefaultVersionId = version;
+				//query.MarkChanged (ActiveIndex ());
+				UpdateForVersionIdChange(version);
+	            uri_list.Append(photo.GetVersionUri(version));
+		    }
+		    mime_application.Launch(uri_list);
+		}
+	}
+
 	// Version Id updates.
 
 	void UpdateForVersionIdChange (uint version_id)
diff -urN --exclude CVS f-spot/src/Makefile.am f-spot-open-with-vfs/src/Makefile.am
--- f-spot/src/Makefile.am	2005-01-25 09:37:55.000000000 +0000
+++ f-spot-open-with-vfs/src/Makefile.am	2005-01-26 22:36:33.336795645 +0000
@@ -39,6 +39,7 @@
 	$(srcdir)/JpegUtils.cs			\
 	$(srcdir)/Cms.cs			\
 	$(srcdir)/MainWindow.cs			\
+	$(srcdir)/OpenWithMenu.cs		\
 	$(srcdir)/OriginalExport.cs		\
 	$(srcdir)/PhotoImageView.cs		\
 	$(srcdir)/PhotoLoader.cs		\
diff -urN --exclude CVS f-spot/src/OpenWithMenu.cs f-spot-open-with-vfs/src/OpenWithMenu.cs
--- f-spot/src/OpenWithMenu.cs	1970-01-01 01:00:00.000000000 +0100
+++ f-spot-open-with-vfs/src/OpenWithMenu.cs	2005-01-26 23:04:00.884237019 +0000
@@ -0,0 +1,64 @@
+// created on 11/01/2004 at 19:25
+using System;
+using System.Runtime.InteropServices;
+using Gtk;
+using Gnome.Vfs;
+
+public class OpenWithMenu: IDisposable {
+
+	public delegate void OpenWithHandler(MimeApplication mime_application);
+	
+	private GLib.List mime_applications;
+
+	// This should be in gnome vfs bindings somewhere
+	[DllImport("gnomevfs-2")]
+	private static extern IntPtr gnome_vfs_mime_get_all_applications(string mime_type);
+	
+	private static GLib.List GetAllApplications(string mime_type) {
+		IntPtr list_ptr = gnome_vfs_mime_get_all_applications(mime_type);
+		return new GLib.List (list_ptr, typeof (MimeApplication));
+	}
+		
+	public OpenWithMenu(string mime_type) {
+		mime_applications = GetAllApplications(mime_type);
+	}
+	
+	~OpenWithMenu() {
+		Dispose();
+	}
+	
+	public void Dispose() {
+		if (mime_applications != null) {
+			MimeApplication.ListFree(mime_applications);
+			mime_applications = null;
+		}
+		GC.SuppressFinalize(this);
+	}
+	
+	private class OpenWithMenuItem : MenuItem {
+		public MimeApplication Value;
+		public event OpenWithHandler OpenWith;
+
+		public OpenWithMenuItem (MimeApplication mime_application) : base (mime_application.Name) {
+		    Value = mime_application;
+		}
+		// FIXME I copied this from TagMenu, I really should figure out if it is needed
+		protected OpenWithMenuItem (IntPtr raw) : base (raw) {}
+
+		protected override void OnActivated() {
+		    if (OpenWith != null)
+		            OpenWith(Value);
+		}
+	}
+
+	public Gtk.Menu GetMenu() {
+		Menu menu = new Menu();
+		foreach (MimeApplication mime_application in mime_applications) {
+		    OpenWithMenuItem item = new OpenWithMenuItem(mime_application);
+		    item.OpenWith += MainWindow.Toplevel.HandleOpenWith;
+		    menu.Append(item);
+		}
+		return menu;
+	}
+	
+}
diff -urN --exclude CVS f-spot/src/PhotoPopup.cs f-spot-open-with-vfs/src/PhotoPopup.cs
--- f-spot/src/PhotoPopup.cs	2005-01-12 21:12:46.000000000 +0000
+++ f-spot-open-with-vfs/src/PhotoPopup.cs	2005-01-26 23:00:20.220384349 +0000
@@ -16,6 +16,12 @@
 using Gdk;
 
 public class PhotoPopup {
+
+	private OpenWithMenu open_with_menu;
+	public PhotoPopup (OpenWithMenu open_with_menu) {
+		this.open_with_menu = open_with_menu;
+	}
+	
 	public void Activate (Gdk.EventButton eb) 
 	{
 		int count = MainWindow.Toplevel.SelectedIds ().Length;
@@ -63,6 +69,15 @@
 		remove_item.ShowAll ();
 		popup_menu.Append (remove_item);
 
+
+		if (open_with_menu != null) {
+		    MenuItem open_with_item = new MenuItem("Edit With");
+		    // f-spot currently only supports image/jpeg as a mime type
+		    open_with_item.Submenu = open_with_menu.GetMenu();
+		    open_with_item.ShowAll();
+		    popup_menu.Append (open_with_item);
+		}
+		
 		popup_menu.Popup (null, null, null, IntPtr.Zero, eb.Button, eb.Time);
 	}   
 }
diff -urN --exclude CVS f-spot/src/PhotoStore.cs f-spot-open-with-vfs/src/PhotoStore.cs
--- f-spot/src/PhotoStore.cs	2005-01-22 06:23:09.000000000 +0000
+++ f-spot-open-with-vfs/src/PhotoStore.cs	2005-01-26 23:21:22.094060068 +0000
@@ -206,6 +206,11 @@
 		else
 			return GetPathForVersionName (GetVersionName (version_id));
 	}
+	
+	public string GetVersionUri (uint version_id)
+	{
+		return "file://" + GetVersionPath(version_id);
+	}
 
 	public string DefaultVersionPath {
 		get {
diff -urN --exclude CVS f-spot/src/PhotoView.cs f-spot-open-with-vfs/src/PhotoView.cs
--- f-spot/src/PhotoView.cs	2005-01-22 03:10:08.000000000 +0000
+++ f-spot-open-with-vfs/src/PhotoView.cs	2005-01-26 22:20:22.409193101 +0000
@@ -200,7 +200,7 @@
 	{
 		if (args.Event.Type == EventType.ButtonPress
 		    && args.Event.Button == 3) {
-			PhotoPopup popup = new PhotoPopup ();
+			PhotoPopup popup = new PhotoPopup (MainWindow.Toplevel.OpenWithMenu);
 			popup.Activate (args.Event);
 		}
 	}
