Index: src/IconView.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/IconView.cs,v
retrieving revision 1.51
diff -u -r1.51 IconView.cs
--- src/IconView.cs	27 Oct 2004 21:31:20 -0000	1.51
+++ src/IconView.cs	2 Nov 2004 20:37:29 -0000
@@ -857,7 +857,7 @@
 
 	void ContextMenu (ButtonPressEventArgs args, int cell_num)
 	{
-		PhotoPopup popup = new PhotoPopup ();
+		PhotoPopup popup = new PhotoPopup (MainWindow.Toplevel.OpenWithMenu);
 		popup.Activate (args.Event);
 	}
 	
Index: src/MainWindow.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/MainWindow.cs,v
retrieving revision 1.102
diff -u -r1.102 MainWindow.cs
--- src/MainWindow.cs	13 Oct 2004 06:01:55 -0000	1.102
+++ src/MainWindow.cs	2 Nov 2004 20:37:29 -0000
@@ -20,6 +20,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;
@@ -1185,6 +1195,17 @@
 
 	void HandleClearDateRange (object sender, EventArgs args) {
 		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) {
+	            uri_list.Append(photo.Uri);
+		    }
+		    mime_application.Launch(uri_list);
+		}
 	}
 
 	// Version Id updates.
Index: src/PhotoPopup.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/PhotoPopup.cs,v
retrieving revision 1.3
diff -u -r1.3 PhotoPopup.cs
--- src/PhotoPopup.cs	12 Oct 2004 01:02:30 -0000	1.3
+++ src/PhotoPopup.cs	2 Nov 2004 20:37:29 -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;
@@ -64,6 +70,15 @@
 		remove_item.ShowAll ();
 		popup_menu.Append (remove_item);
 
+
+		if (open_with_menu != null) {
+		    MenuItem open_with_item = new MenuItem("Open 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);
 	}   
 }
Index: src/PhotoStore.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/PhotoStore.cs,v
retrieving revision 1.40
diff -u -r1.40 PhotoStore.cs
--- src/PhotoStore.cs	24 Aug 2004 15:56:04 -0000	1.40
+++ src/PhotoStore.cs	2 Nov 2004 20:37:30 -0000
@@ -96,6 +96,12 @@
 		}
 	}
 
+	public string Uri {
+		get {
+			return "file://" + Path;
+		}
+	}
+
 	private ArrayList tags = new ArrayList ();
 	public Tag [] Tags {
 		get {
Index: src/PhotoView.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/PhotoView.cs,v
retrieving revision 1.31
diff -u -r1.31 PhotoView.cs
--- src/PhotoView.cs	29 Oct 2004 01:54:17 -0000	1.31
+++ src/PhotoView.cs	2 Nov 2004 20:37:30 -0000
@@ -280,7 +280,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);
 		}
 	}
Index: src/main.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/main.cs,v
retrieving revision 1.5
diff -u -r1.5 main.cs
--- src/main.cs	4 Oct 2004 16:12:52 -0000	1.5
+++ src/main.cs	2 Nov 2004 20:37:30 -0000
@@ -25,11 +25,17 @@
 		
 		Gtk.Window.DefaultIconList = new Gdk.Pixbuf [] {PixbufUtils.LoadFromAssembly ("f-spot-camera.png")};
 
-		MainWindow main_window = new MainWindow (db);
-		
-		ParseCommands (args);
+		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 ();
+			program.Run ();
+		} finally {
+			Gnome.Vfs.Vfs.Shutdown();
+		}
 	}
 
 	private static void  ParseCommands (string [] args) 
Index: src/makefile.am
===================================================================
RCS file: /cvs/gnome/f-spot/src/makefile.am,v
retrieving revision 1.47
diff -u -r1.47 makefile.am
--- src/makefile.am	29 Oct 2004 01:54:17 -0000	1.47
+++ src/makefile.am	2 Nov 2004 20:37:30 -0000
@@ -32,6 +32,7 @@
 	$(srcdir)/JpegUtils.cs			\
 	$(srcdir)/Cms.cs			\
 	$(srcdir)/MainWindow.cs			\
+	$(srcdir)/OpenWithMenu.cs		\
 	$(srcdir)/PhotoLoader.cs		\
 	$(srcdir)/PhotoPopup.cs			\
 	$(srcdir)/PhotoQuery.cs			\
@@ -69,6 +70,7 @@
 	/r:Mono.Data.SqliteClient		\
 	/pkg:gtkhtml-sharp			\
 	/pkg:glade-sharp			\
+	/pkg:gnome-vfs-sharp-2.0		\
 	/pkg:gconf-sharp
 
 RESOURCES =										\
