f-spot r3581 - in trunk: . src



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

Log:
2008-01-18  Stephane Delcroix  <sdelcroix novell com>

	* src/Makefile.am:
	* src/Utils/GnomeUtil.cs: move it from Util.cs.

	* src/SmugMugExport.cs:
	* src/CDExport.cs:
	* src/SendEmail.cs:
	* src/FlickrExport.cs:
	* src/InfoDisplay.cs:
	* src/FolderExport.cs:
	* src/PicasaWebExport.cs:
	* src/FlickrRemote.cs:
	* src/MainWindow.cs:
	* src/Util.cs:
	* src/GalleryExport.cs: required ns changes


Modified:
   trunk/ChangeLog
   trunk/src/CDExport.cs
   trunk/src/FlickrExport.cs
   trunk/src/FlickrRemote.cs
   trunk/src/FolderExport.cs
   trunk/src/GalleryExport.cs
   trunk/src/InfoDisplay.cs
   trunk/src/MainWindow.cs
   trunk/src/Makefile.am
   trunk/src/PicasaWebExport.cs
   trunk/src/SendEmail.cs
   trunk/src/SmugMugExport.cs
   trunk/src/Util.cs

Modified: trunk/src/CDExport.cs
==============================================================================
--- trunk/src/CDExport.cs	(original)
+++ trunk/src/CDExport.cs	Fri Jan 18 20:35:47 2008
@@ -2,6 +2,7 @@
 using System.Runtime.InteropServices;
 using Mono.Unix;
 using FSpot.Widgets;
+using FSpot.Utils;
 
 namespace FSpot {
 	public class CDExport : GladeDialog, FSpot.Extensions.IExporter {

Modified: trunk/src/FlickrExport.cs
==============================================================================
--- trunk/src/FlickrExport.cs	(original)
+++ trunk/src/FlickrExport.cs	Fri Jan 18 20:35:47 2008
@@ -5,6 +5,7 @@
 using Mono.Unix;
 using FSpot.Filters;
 using FSpot.Widgets;
+using FSpot.Utils;
 
 namespace FSpot {
 	public class TwentyThreeHQExport : FlickrExport

Modified: trunk/src/FlickrRemote.cs
==============================================================================
--- trunk/src/FlickrRemote.cs	(original)
+++ trunk/src/FlickrRemote.cs	Fri Jan 18 20:35:47 2008
@@ -15,6 +15,7 @@
 using System.Collections;
 using FlickrNet;
 using FSpot;
+using FSpot.Utils;
 using FSpot.Filters;
 
 public class FlickrRemote {

Modified: trunk/src/FolderExport.cs
==============================================================================
--- trunk/src/FolderExport.cs	(original)
+++ trunk/src/FolderExport.cs	Fri Jan 18 20:35:47 2008
@@ -30,6 +30,7 @@
 using ICSharpCode.SharpZipLib.GZip;
 
 using FSpot.Widgets;
+using FSpot.Utils;
 
 namespace FSpot {
 	public class FolderExport : GladeDialog, FSpot.Extensions.IExporter {

Modified: trunk/src/GalleryExport.cs
==============================================================================
--- trunk/src/GalleryExport.cs	(original)
+++ trunk/src/GalleryExport.cs	Fri Jan 18 20:35:47 2008
@@ -9,6 +9,7 @@
 
 using FSpot.Filters;
 using FSpot.Widgets;
+using FSpot.Utils;
 
 using GalleryRemote;
 

Modified: trunk/src/InfoDisplay.cs
==============================================================================
--- trunk/src/InfoDisplay.cs	(original)
+++ trunk/src/InfoDisplay.cs	Fri Jan 18 20:35:47 2008
@@ -1,7 +1,7 @@
 using System;
 using SemWeb;
 using System.IO;
-
+using FSpot.Utils;
 using Mono.Unix;
 
 namespace FSpot {

Modified: trunk/src/MainWindow.cs
==============================================================================
--- trunk/src/MainWindow.cs	(original)
+++ trunk/src/MainWindow.cs	Fri Jan 18 20:35:47 2008
@@ -1610,7 +1610,7 @@
 
 	public static void HandleHelp (object sender, EventArgs args)
 	{
-		GnomeUtil.ShowHelp ("f-spot.xml", null, Toplevel.Window.Screen, null);
+		GnomeUtil.ShowHelp ("f-spot.xml", null, FSpot.Global.HelpDirectory, Toplevel.Window.Screen, null);
 	}
 
 	public static void HandleAbout (object sender, EventArgs args)

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Fri Jan 18 20:35:47 2008
@@ -2,6 +2,7 @@
 EXTRAFLAGS = -unsafe -nowarn:0169 -nowarn:0612 -nowarn:0414 -d:TEST_METADATA -d:BROKEN_RSVG $(NUNIT_DEFINES) $(BEAGLE_DEFINES) $(CSC_DEFINES)
 
 UTILS_CSDISTFILES =				\
+	$(srcdir)/Utils/GnomeUtil.cs		\
 	$(srcdir)/Utils/GtkUtil.cs		\
 	$(srcdir)/Utils/ScreenSaver.cs
 
@@ -260,6 +261,8 @@
 
 UTILS_ASSEMBLIES =				\
 	-pkg:gtk-sharp-2.0			\
+	-pkg:gnome-sharp-2.0			\
+	-r:Mono.Posix				\
 	$(LINK_DBUS)
 
 CMS_ASSEMBLIES = 				\

Modified: trunk/src/PicasaWebExport.cs
==============================================================================
--- trunk/src/PicasaWebExport.cs	(original)
+++ trunk/src/PicasaWebExport.cs	Fri Jan 18 20:35:47 2008
@@ -18,6 +18,7 @@
 
 using FSpot.Filters;
 using FSpot.Widgets;
+using FSpot.Utils;
 
 using Gnome.Keyring;
 

Modified: trunk/src/SendEmail.cs
==============================================================================
--- trunk/src/SendEmail.cs	(original)
+++ trunk/src/SendEmail.cs	Fri Jan 18 20:35:47 2008
@@ -14,6 +14,8 @@
 
 using FSpot.Widgets;
 using FSpot.Filters;
+using FSpot.Utils;
+
 using Mono.Unix;
 
 namespace FSpot {

Modified: trunk/src/SmugMugExport.cs
==============================================================================
--- trunk/src/SmugMugExport.cs	(original)
+++ trunk/src/SmugMugExport.cs	Fri Jan 18 20:35:47 2008
@@ -22,6 +22,7 @@
 
 using FSpot.Filters;
 using FSpot.Widgets;
+using FSpot.Utils;
 
 using Gnome.Keyring;
 using SmugMugNet;

Modified: trunk/src/Util.cs
==============================================================================
--- trunk/src/Util.cs	(original)
+++ trunk/src/Util.cs	Fri Jan 18 20:35:47 2008
@@ -14,57 +14,6 @@
 using System.Text;
 using System;
 
-class Semaphore {
-	int count = 0;
-	
-	public Semaphore ()
-	{ }
-
-	public void Down ()
-	{
-		lock (this){
-			while (count <= 0){
-				Monitor.Wait (this, Timeout.Infinite);
-			}
-			count--;
-		}
-	}
-
-	public void Up ()
-	{
-		lock (this){
-			count++;
-			Monitor.Pulse (this);
-		}
-	}
-}
-
-class Timer : IDisposable {
-	System.DateTime start;
-	string label;
-
-	public Timer (string label) {
-		this.label = label;
-		start = System.DateTime.Now;
-	}
-
-	public System.TimeSpan ElapsedTime {
-		get {
-			return System.DateTime.Now - start;
-		}
-	}
-
-	public void WriteElapsed (string message)
-	{
-		System.Console.WriteLine ("{0} {1} {2}", label, message, ElapsedTime);
-	}
-
-	public void Dispose ()
-	{
-		WriteElapsed ("timer stopped:");
-	}
-}
-
 public class UriList : ArrayList {
 	public UriList (FSpot.IBrowsableItem [] photos) {
 		foreach (FSpot.IBrowsableItem p in photos) {
@@ -307,62 +256,4 @@
 	}
 }
 
-public class GnomeUtil {
-	Gtk.Window window;
-	string url;
-	
-	private GnomeUtil (Gtk.Window window, string url)
-	{
-		this.window = window;
-		this.url = url;
-	}
-		
-	public void Show () 
-	{
-		try {
-			Gnome.Url.Show (url);
-		} catch (Exception ge) {
-	       		System.Console.WriteLine (ge.ToString ());
-	       		HigMessageDialog md = new HigMessageDialog (window, Gtk.DialogFlags.DestroyWithParent, 
-	       			Gtk.MessageType.Error, Gtk.ButtonsType.Ok, 
-	       			Mono.Unix.Catalog.GetString ("There was an error invoking the external handler"),
-	       			String.Format (Mono.Unix.Catalog.GetString ("Received error:{1}\"{0}\"{1}"), 
-	       			ge.Message, Environment.NewLine));
-
-	       		md.Run ();
-	       		md.Destroy ();
-	       	}
-	}
-
-	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, Gdk.Screen screen, Gtk.Window parent)
-	{
-		try {
-			Gnome.Help.DisplayDesktopOnScreen (
-			Gnome.Program.Get (),
-			FSpot.Global.HelpDirectory,
-			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.");
-			HigMessageDialog dialog = new HigMessageDialog (parent,
-					Gtk.DialogFlags.DestroyWithParent,
-					Gtk.MessageType.Error,
-					Gtk.ButtonsType.Ok,
-					Mono.Unix.Catalog.GetString ("Help not found"),
-					message);
-			dialog.Run ();
-			dialog.Destroy ();
-		}
-	}
 
-}



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