f-spot r3582 - trunk/src/Utils



Author: sdelcroix
Date: Fri Jan 18 20:36:48 2008
New Revision: 3582
URL: http://svn.gnome.org/viewvc/f-spot?rev=3582&view=rev

Log:
missing file

Added:
   trunk/src/Utils/GnomeUtil.cs

Added: trunk/src/Utils/GnomeUtil.cs
==============================================================================
--- (empty file)
+++ trunk/src/Utils/GnomeUtil.cs	Fri Jan 18 20:36:48 2008
@@ -0,0 +1,57 @@
+/*
+ * FSpot.Utils.GnomeUtil.cs
+ *
+ * Author(s):
+ *
+ *
+ * This is free software. See COPYING for details
+ */
+
+using System;
+
+namespace FSpot.Utils
+{
+	public class GnomeUtil {
+		Gtk.Window window;
+		string url;
+		
+		private GnomeUtil (Gtk.Window window, string url)
+		{
+			this.window = window;
+			this.url = url;
+		}
+			
+		private void Show () 
+		{
+			try {
+				Gnome.Url.Show (url);
+			} catch (Exception ge) {
+		       		System.Console.WriteLine (ge.ToString ());
+		       	}
+		}
+	
+		public static void UrlShow (Gtk.Window owner_window, string url)
+		{
+			GnomeUtil disp = new GnomeUtil (owner_window, url);
+			Gtk.Application.Invoke (disp, null, delegate (object sender, EventArgs args) { ((GnomeUtil) disp).Show (); });
+		}
+	
+		public static void ShowHelp (string filename, string link_id, string help_directory, Gdk.Screen screen, Gtk.Window parent)
+		{
+			try {
+				Gnome.Help.DisplayDesktopOnScreen (
+						Gnome.Program.Get (),
+						help_directory,
+						filename,
+						link_id,
+						screen);
+			} catch {
+				string message = Mono.Unix.Catalog.GetString ("The \"F-Spot Manual\" could " +
+						"not be found.  Please verify " +
+						"that your installation has been " +
+						"completed successfully.");
+			}
+		}
+	
+	}
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]