f-spot r4705 - in trunk: . GKeyFile/generated extensions/Exporters/CDExport extensions/Exporters/ZipExport extensions/Tools/DevelopInUFraw extensions/Tools/RawPlusJpeg src src/Core src/Extensions src/UI.Dialog src/Widgets



Author: sdelcroix
Date: Wed Feb 11 20:09:01 2009
New Revision: 4705
URL: http://svn.gnome.org/viewvc/f-spot?rev=4705&view=rev

Log:
2009-02-11  Stephane Delcroix  <sdelcroix novell com>

	* no longer bundle gio-sharp, depend on gtk# SVN

Modified:
   trunk/ChangeLog
   trunk/GKeyFile/generated/GKeyFile.cs
   trunk/Makefile.am
   trunk/configure.in
   trunk/extensions/Exporters/CDExport/CDExport.cs
   trunk/extensions/Exporters/CDExport/Makefile.am
   trunk/extensions/Exporters/ZipExport/Makefile.am
   trunk/extensions/Tools/DevelopInUFraw/Makefile.am
   trunk/extensions/Tools/RawPlusJpeg/Makefile.am
   trunk/src/Core/Global.cs
   trunk/src/Extensions/PopupCommands.cs
   trunk/src/GroupSelector.cs
   trunk/src/MainWindow.cs
   trunk/src/Makefile.am
   trunk/src/SendEmail.cs
   trunk/src/UI.Dialog/AboutDialog.cs
   trunk/src/UI.Dialog/PreferenceDialog.cs
   trunk/src/Util.cs
   trunk/src/Widgets/InfoBox.cs
   trunk/src/Widgets/OpenWithMenu.cs
   trunk/src/f-spot.in
   trunk/src/main.cs

Modified: trunk/GKeyFile/generated/GKeyFile.cs
==============================================================================
--- trunk/GKeyFile/generated/GKeyFile.cs	(original)
+++ trunk/GKeyFile/generated/GKeyFile.cs	Wed Feb 11 20:09:01 2009
@@ -526,6 +526,29 @@
 			g_key_file_free (raw);
 		}
 
+		class FinalizerInfo {
+			IntPtr handle;
+
+			public FinalizerInfo (IntPtr handle)
+			{
+				this.handle = handle;
+			}
+
+			public bool Handler ()
+			{
+				g_key_file_free (handle);
+				return false;
+			}
+		}
+
+		~GKeyFile ()
+		{
+			if (!Owned)
+				return;
+			FinalizerInfo info = new FinalizerInfo (Handle);
+			GLib.Timeout.Add (50, new GLib.TimeoutHandler (info.Handler));
+		}
+
 #endregion
 #region Customized extensions
 #line 1 "GKeyFile.custom"

Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am	(original)
+++ trunk/Makefile.am	Wed Feb 11 20:09:01 2009
@@ -20,7 +20,6 @@
 	GKeyFile
 
 DIST_SUBDIRS = 		\
-	gio-sharp	\
 	semweb		\
 	dbus-sharp	\
 	dbus-sharp-glib	\
@@ -91,13 +90,6 @@
 
 install-data-hook: 
 	$(UPDATE_DESKTOP)
-	if [ "x$(DIR_GIO)" != "x" ] ; then \
-		$(install_sh_DATA) $(top_builddir)/gio-sharp/gio/gio-sharp.dll $(DESTDIR)$(libdir)/f-spot/; \
-		$(install_sh_DATA) $(top_builddir)/gio-sharp/gio/gio-sharp.dll.config $(DESTDIR)$(libdir)/f-spot/; \
-	fi
 
 uninstall-hook: 
 	$(UPDATE_DESKTOP)
-	if [ "x$(DIR_GIO)" != "x" ] ; then \
-		rm -f $(DESTDIR)$(libdir)/f-spot/gio-sharp.dll $(DESTDIR)$(libdir)/f-spot/gio-sharp.dll.config; \
-	fi

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Wed Feb 11 20:09:01 2009
@@ -59,7 +59,7 @@
 LIBEXIF_REQUIRED_MIN=0.5.7
 LIBEXIF_REQUIRED_MAX=0.7.0
 GIO_REQUIRED=2.16.0
-GTKSHARP_REQUIRED=2.10
+GTKSHARP_REQUIRED=2.13.90
 MONO_REQUIRED=1.2.4
 GTK_REQUIRED=2.10
 BEAGLE_REQUIRED=0.3.0
@@ -70,7 +70,7 @@
 LCMS_REQUIRED=1.12
 dnl -- LIBGPHOTO2_REQUIRED=2.1.4
 
-PKG_CHECK_MODULES(F, libgnome-2.0 >= $LIBGNOME_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libexif >= $LIBEXIF_REQUIRED_MIN libexif < $LIBEXIF_REQUIRED_MAX glade-sharp-2.0 >= $GTKSHARP_REQUIRED gnome-vfs-sharp-2.0 >= $GTKSHARP_REQUIRED gtk+-2.0 >= $GTK_REQUIRED mono >= $MONO_REQUIRED mono-cairo >= $MONO_CAIRO_REQUIRED)
+PKG_CHECK_MODULES(F, libgnome-2.0 >= $LIBGNOME_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libexif >= $LIBEXIF_REQUIRED_MIN libexif < $LIBEXIF_REQUIRED_MAX gtk-sharp-2.0 >= $GTKSHARP_REQUIRED glib-sharp-2.0 >= $GTKSHARP_REQUIRED gio-sharp-2.0 >= $GTKSHARP_REQUIRED glade-sharp-2.0 >= $GTKSHARP_REQUIRED gnome-vfs-sharp-2.0 >= $GTKSHARP_REQUIRED gtk+-2.0 >= $GTK_REQUIRED mono >= $MONO_REQUIRED mono-cairo >= $MONO_CAIRO_REQUIRED)
 AC_SUBST(F_CFLAGS)
 AC_SUBST(F_LIBS)
 
@@ -81,38 +81,6 @@
 CSC_DEFINES=""
 PKG_CHECK_MODULES(GNOME_SHARP, gnome-sharp-2.0 >= 2.8)
 
-dnl -- gio-sharp: link or bundle ?
-if pkg-config --atleast-version=2.13.90 gio-sharp-2.0; then
-	LINK_GIO="-pkg:gio-sharp-2.0"
-	DIR_GIO=""
-	PATH_GIO=""
-else
-	LINK_GIO='-r:$(top_builddir)/gio-sharp/gio/gio-sharp.dll'
-	DIR_GIO="gio-sharp"
-	AC_CONFIG_SUBDIRS([gio-sharp])
-	PATH_GIO='../gio-sharp/gio:'
-fi
-CSC_DEFINES="$CSC_DEFINES -d:GIO_2_16"
-
-AC_SUBST(LINK_GIO)
-AC_SUBST(DIR_GIO)
-AC_SUBST(PATH_GIO)
-
-if pkg-config --atleast-version=2.10.3 gtk-sharp-2.0; then
-   CSC_DEFINES="$CSC_DEFINES -d:GTK_2_10_3"
-fi
-if pkg-config --atleast-version=2.11 gtk-sharp-2.0; then
-   CSC_DEFINES="$CSC_DEFINES -d:GTK_2_11"
-fi
-if pkg-config --atleast-version=2.12.2 gtk-sharp-2.0; then
-   CSC_DEFINES="$CSC_DEFINES -d:GTK_2_12_2"
-fi
-if pkg-config --atleast-version=2.12.6 gtk-sharp-2.0; then
-   CSC_DEFINES="$CSC_DEFINES -d:GTK_SHARP_2_12_6"
-fi
-if pkg-config --atleast-version=2.14.0 gtk-sharp-2.0; then
-   CSC_DEFINES="$CSC_DEFINES -d:GTK_SHARP_2_14_0"
-fi
 if pkg-config --atleast-version=1.2.5 mono; then
    CSC_DEFINES="$CSC_DEFINES -d:MONO_1_2_5"
 fi

Modified: trunk/extensions/Exporters/CDExport/CDExport.cs
==============================================================================
--- trunk/extensions/Exporters/CDExport/CDExport.cs	(original)
+++ trunk/extensions/Exporters/CDExport/CDExport.cs	Wed Feb 11 20:09:01 2009
@@ -7,9 +7,7 @@
 using FSpot.Widgets;
 using FSpot.Utils;
 using FSpot.UI.Dialog;
-#if GIO_2_16
 using GLib;
-#endif
 
 namespace FSpotCDExport {
 	public class CDExport : FSpot.Extensions.IExporter {
@@ -22,12 +20,8 @@
 		[Glade.Widget] Gtk.Label size_label;
 		[Glade.Widget] Gtk.Frame previous_frame;
 
-#if GIO_2_16
 		Gtk.Window listwindow;
 		System.Uri dest = new System.Uri ("burn:///");
-#else
-		Gnome.Vfs.Uri dest = new Gnome.Vfs.Uri ("burn:///");
-#endif
 
 		int photo_index;
 		bool clean;
@@ -84,7 +78,6 @@
 
 		void HandleBrowseExisting (object sender, System.EventArgs args)
 		{
-#if GIO_2_16
 			if (listwindow == null) {
 				listwindow = new Gtk.Window ("Pending files to write");
 				listwindow.SetDefaultSize (400, 200);
@@ -99,12 +92,8 @@
 			}
 			ListAll (((listwindow.Child as Gtk.ScrolledWindow).Child as Gtk.TextView).Buffer, dest);
 			listwindow.ShowAll ();
-#else
-			GnomeUtil.UrlShow (dest.ToString ());
-#endif
 		}
 
-#if GIO_2_16
 		void ListAll (Gtk.TextBuffer t, System.Uri path)
 		{
 			GLib.File f = FileFactory.NewForUri (path);
@@ -114,41 +103,27 @@
 					ListAll (t, new System.Uri (path, info.Name + "/"));
 			}
 		}
-#endif
+
 		[DllImport ("libc")]
 		extern static int system (string program);
 
 //		//FIXME: rewrite this as a Filter
-#if GIO_2_16
 	        public static GLib.File UniqueName (System.Uri path, string shortname)
-#else
-	        public static Gnome.Vfs.Uri UniqueName (Gnome.Vfs.Uri path, string shortname)
-#endif
 	        {
 	                int i = 1;
-#if GIO_2_16
 			GLib.File dest = FileFactory.NewForUri (new System.Uri (path, shortname));
-#else
-			Gnome.Vfs.Uri target = path.Clone();
-	                Gnome.Vfs.Uri dest = target.AppendFileName(shortname);
-#endif
 	                while (dest.Exists) {
 	                        string numbered_name = System.String.Format ("{0}-{1}{2}",
 	                                                              System.IO.Path.GetFileNameWithoutExtension (shortname),
 	                                                              i++,
 	                                                              System.IO.Path.GetExtension (shortname));
 
-#if GIO_2_16
 				dest = FileFactory.NewForUri (new System.Uri (path, numbered_name));
-#else
-				dest = target.AppendFileName(numbered_name);
-#endif
 	                }
 
 	                return dest;
 	        }
 
-#if GIO_2_16
 		void Clean (System.Uri path)
 		{
 			GLib.File source = FileFactory.NewForUri (path);
@@ -158,43 +133,20 @@
 				FileFactory.NewForUri (new System.Uri (path, info.Name)).Delete ();
 			}
 		}
-#else
-		void Clean ()
-		{
-			Gnome.Vfs.Uri target = dest.Clone ();
-			Gnome.Vfs.XferProgressCallback cb = new Gnome.Vfs.XferProgressCallback (Progress);
-			Gnome.Vfs.Xfer.XferDeleteList (new Gnome.Vfs.Uri [] {target}, Gnome.Vfs.XferErrorMode.Query, Gnome.Vfs.XferOptions.Recursive, cb);
-		}
-#endif
 
-#if GIO_2_16
 		bool IsEmpty (System.Uri path)
 		{
 			foreach (GLib.FileInfo fi in FileFactory.NewForUri (path).EnumerateChildren ("*", FileQueryInfoFlags.None, null))
 				return true;
 			return false;
 		}
-#else
-		bool IsEmpty (Gnome.Vfs.Uri path)
-		{
-			return Gnome.Vfs.Directory.GetEntries (path).Length != 0;
-		}
-#endif
 
 		public void Transfer () {
 			try {
-#if GIO_2_16
 				bool result = true;
-#else
-				Gnome.Vfs.Result result = Gnome.Vfs.Result.Ok;
-#endif
 
 				if (clean)
-#if GIO_2_16
 					Clean (dest);
-#else
-					Clean ();
-#endif
 
 				foreach (IBrowsableItem photo in selection.Items) {
 
@@ -203,47 +155,25 @@
 						if (rotate)
 							new OrientationFilter ().Convert (request);
 
-#if GIO_2_16
 						GLib.File source = FileFactory.NewForUri (request.Current.ToString ());
-#else
-						Gnome.Vfs.Uri source = new Gnome.Vfs.Uri (request.Current.ToString ());
-						Gnome.Vfs.Uri target = dest.Clone ();
-#endif
-#if GIO_2_16
 						GLib.File target = UniqueName (dest, photo.Name);
 						FileProgressCallback cb = Progress;
-#else
-						target = UniqueName (target, photo.Name);
-						Gnome.Vfs.XferProgressCallback cb = new Gnome.Vfs.XferProgressCallback (Progress);
-#endif
 
 						progress_dialog.Message = System.String.Format (Catalog.GetString ("Transferring picture \"{0}\" To CD"), photo.Name);
 						progress_dialog.Fraction = photo_index / (double) selection.Count;
 						progress_dialog.ProgressText = System.String.Format (Catalog.GetString ("{0} of {1}"),
 											     photo_index, selection.Count);
 
-#if GIO_2_16
 						result &= source.Copy (target,
 									FileCopyFlags.None,
 									null,
 									cb);
-#else
-						result = Gnome.Vfs.Xfer.XferUri (source, target,
-										 Gnome.Vfs.XferOptions.Default,
-										 Gnome.Vfs.XferErrorMode.Abort,
-										 Gnome.Vfs.XferOverwriteMode.Replace,
-										 cb);
-#endif
 					}
 					photo_index++;
 				}
 
 				// FIXME the error dialog here is ugly and needs improvement when strings are not frozen.
-#if GIO_2_16
 				if (result) {
-#else
-				if (result == Gnome.Vfs.Result.Ok) {
-#endif
 					progress_dialog.Message = Catalog.GetString ("Done Sending Photos");
 					progress_dialog.Fraction = 1.0;
 					progress_dialog.ProgressText = Catalog.GetString ("Transfer Complete");
@@ -271,38 +201,13 @@
 			progress_dialog.Destroy ();
 		}
 
-#if GIO_2_16
 		private void Progress (long current_num_bytes, long total_num_bytes)
-#else
-		private int Progress (Gnome.Vfs.XferProgressInfo info)
-#endif
 		{
-#if GIO_2_16
 			progress_dialog.ProgressText = Catalog.GetString ("copying...");
-#else
-			progress_dialog.ProgressText = info.Phase.ToString ();
-#endif
 
-#if GIO_2_16
 			if (total_num_bytes > 0)
 				progress_dialog.Fraction = current_num_bytes / (double)total_num_bytes;
-#else
-			if (info.BytesTotal > 0)
-				progress_dialog.Fraction = info.BytesCopied / (double)info.BytesTotal;
-#endif
-
-#if !GIO_2_16
-			switch (info.Status) {
-			case Gnome.Vfs.XferProgressStatus.Vfserror:
-				progress_dialog.Message = Catalog.GetString ("Error: Error while transferring; Aborting");
-				return (int)Gnome.Vfs.XferErrorAction.Abort;
-			case Gnome.Vfs.XferProgressStatus.Overwrite:
-				progress_dialog.ProgressText = Catalog.GetString ("Error: File Already Exists; Aborting");
-				return (int)Gnome.Vfs.XferOverwriteAction.Abort;
-			default:
-				return 1;
-			}
-#endif
+
 		}
 
 		private void HandleMsg (Gnome.Vfs.ModuleCallback cb)
@@ -326,10 +231,8 @@
 
 		private void HandleResponse (object sender, Gtk.ResponseArgs args)
 		{
-#if GIO_2_16
 			if (listwindow != null)
 				listwindow.Destroy ();
-#endif
 			if (args.ResponseId != Gtk.ResponseType.Ok) {
 				Dialog.Destroy ();
 				return;

Modified: trunk/extensions/Exporters/CDExport/Makefile.am
==============================================================================
--- trunk/extensions/Exporters/CDExport/Makefile.am	(original)
+++ trunk/extensions/Exporters/CDExport/Makefile.am	Wed Feb 11 20:09:01 2009
@@ -14,12 +14,12 @@
 	-r:$(top_builddir)/src/FSpot.Core.dll	\
 	-r:$(top_builddir)/src/FSpot.Utils.dll	\
 	$(LINK_SEMWEB)			\
-	$(LINK_GIO)			\
 	-r:Mono.Posix
 
 PKGS =					\
 	-pkg:gnome-vfs-sharp-2.0	\
 	-pkg:gtk-sharp-2.0		\
+	-pkg:gio-sharp-2.0		\
 	-pkg:glade-sharp-2.0
 
 RESOURCES =				\

Modified: trunk/extensions/Exporters/ZipExport/Makefile.am
==============================================================================
--- trunk/extensions/Exporters/ZipExport/Makefile.am	(original)
+++ trunk/extensions/Exporters/ZipExport/Makefile.am	Wed Feb 11 20:09:01 2009
@@ -15,7 +15,6 @@
 	-r:$(top_builddir)/src/FSpot.Utils.dll	\
 	$(LINK_SEMWEB)			\
 	$(LINK_MONO_ADDINS)		\
-	$(LINK_GIO)			\
 	-r:System.Web			\
 	-r:ICSharpCode.SharpZipLib	\
 	-r:Mono.Posix
@@ -23,6 +22,7 @@
 PKGS =					\
 	-pkg:gnome-vfs-sharp-2.0	\
 	-pkg:gtk-sharp-2.0		\
+	-pkg:gio-sharp-2.0		\
 	-pkg:glade-sharp-2.0
 
 RESOURCES =				\

Modified: trunk/extensions/Tools/DevelopInUFraw/Makefile.am
==============================================================================
--- trunk/extensions/Tools/DevelopInUFraw/Makefile.am	(original)
+++ trunk/extensions/Tools/DevelopInUFraw/Makefile.am	Wed Feb 11 20:09:01 2009
@@ -15,12 +15,12 @@
 	-r:$(top_builddir)/src/FSpot.Core.dll	\
 	-r:$(top_builddir)/src/FSpot.Utils.dll	\
 	-r:$(top_builddir)/src/FSpot.Query.dll	\
-	$(LINK_GIO)				\
 	$(LINK_MONO_ADDINS)			\
 	$(LINK_SEMWEB)
 
 PKGS =					\
 	-pkg:gnome-vfs-sharp-2.0	\
+	-pkg:gio-sharp-2.0		\
 	-pkg:gtk-sharp-2.0
 
 RESOURCES =				\

Modified: trunk/extensions/Tools/RawPlusJpeg/Makefile.am
==============================================================================
--- trunk/extensions/Tools/RawPlusJpeg/Makefile.am	(original)
+++ trunk/extensions/Tools/RawPlusJpeg/Makefile.am	Wed Feb 11 20:09:01 2009
@@ -15,11 +15,11 @@
 	-r:$(top_builddir)/src/FSpot.Core.dll	\
 	-r:$(top_builddir)/src/FSpot.Utils.dll	\
 	-r:$(top_builddir)/src/FSpot.Query.dll	\
-	$(LINK_GIO)				\
 	$(LINK_MONO_ADDINS)			\
 	$(LINK_SEMWEB)
 
 PKGS =					\
+	-pkg:gio-sharp-2.0		\
 	-pkg:gtk-sharp-2.0		\
 	-pkg:glade-sharp-2.0
 

Modified: trunk/src/Core/Global.cs
==============================================================================
--- trunk/src/Core/Global.cs	(original)
+++ trunk/src/Core/Global.cs	Wed Feb 11 20:09:01 2009
@@ -56,7 +56,6 @@
 			}
 		}
 
-#if GTK_2_12_2
 		private static string [] default_rc_files;
 		public static string [] DefaultRcFiles {
 			get {
@@ -66,7 +65,6 @@
 			}
 			set { default_rc_files = value; }
 		}
-#endif
 
 		private static Gtk.PageSetup page_setup;
 		public static Gtk.PageSetup PageSetup {

Modified: trunk/src/Extensions/PopupCommands.cs
==============================================================================
--- trunk/src/Extensions/PopupCommands.cs	(original)
+++ trunk/src/Extensions/PopupCommands.cs	Wed Feb 11 20:09:01 2009
@@ -61,11 +61,7 @@
 		public Gtk.Menu GetMenu ()
 		{
 			owm = new Widgets.OpenWithMenu (MainWindow.Toplevel.SelectedMimeTypes, "f-spot");
-#if GTK_SHARP_2_12_6
 			owm.ApplicationActivated += delegate (AppInfo app) { MainWindow.Toplevel.HandleOpenWith (this, app); };
-#else
-			owm.ApplicationActivated += delegate (Gnome.Vfs.MimeApplication app) { MainWindow.Toplevel.HandleOpenWith (this, app); };
-#endif
 			return (Gtk.Menu) owm;
 		}
 

Modified: trunk/src/GroupSelector.cs
==============================================================================
--- trunk/src/GroupSelector.cs	(original)
+++ trunk/src/GroupSelector.cs	Wed Feb 11 20:09:01 2009
@@ -931,13 +931,8 @@
 					active.X = min_x;
 					active.Width = max_x - min_x;
 					
-#if GTK_2_10_3 && !GTK_2_12_2 //workaround for buggy code
-					active.Intersect (area);
-					GdkWindow.DrawRectangle (Style.BaseGC (State), true, active);
-#else
 					if (active.Intersect (area, out active))
 						GdkWindow.DrawRectangle (Style.BaseGC (State), true, active);
-#endif
 					
 					int i;
 					BoxXHit (area.X, out i);

Modified: trunk/src/MainWindow.cs
==============================================================================
--- trunk/src/MainWindow.cs	(original)
+++ trunk/src/MainWindow.cs	Wed Feb 11 20:09:01 2009
@@ -3061,11 +3061,7 @@
 		}
 	}
 
-#if GTK_SHARP_2_12_6
 	public void HandleOpenWith (object sender, GLib.AppInfo application)
-#else
-	public void HandleOpenWith (object sender, Gnome.Vfs.MimeApplication application)
-#endif
 	{
 		Photo[] selected = SelectedPhotos ();
 
@@ -3126,11 +3122,7 @@
 			db.Photos.Commit (selected);
 
 		try {
-#if GTK_SHARP_2_12_6
 			application.LaunchUris (uri_list, null);
-#else
-			application.Launch (uri_list);
-#endif
 		} catch (System.Exception) {
 			Log.ErrorFormat ("Failed to lauch {0}", application.Name);
 		}

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Wed Feb 11 20:09:01 2009
@@ -314,7 +314,7 @@
 
 WIDGETS_ASSEMBLIES =				\
 	$(LINK_MONO_ADDINS)			\
-	$(LINK_GIO)				\
+	-pkg:gio-sharp-2.0			\
 	-pkg:gtk-sharp-2.0			\
 	-pkg:gnome-sharp-2.0			\
 	-r:Mono.Posix				\
@@ -322,7 +322,7 @@
 	-r:FSpot.Utils.dll
 
 GNOME_PLATFORM_ASSEMBLIES =			\
-	$(LINK_GIO)				\
+	-pkg:gio-sharp-2.0			\
 	-pkg:gnome-sharp-2.0			\
 	-pkg:gtk-sharp-2.0			\
 	-pkg:gconf-sharp-2.0			\
@@ -342,7 +342,6 @@
 	$(LINK_SMUGMUG)				\
 	$(LINK_TAO)				\
 	$(LINK_SEMWEB)				\
-	$(LINK_GIO)				\
 	-r:System.Data				\
 	-r:System.Web				\
 	-r:Mono.Data.SqliteClient		\
@@ -360,6 +359,7 @@
 	$(NUNIT_PKG)				\
 	$(GCONF_PKG)				\
 	$(GTKHTML_SHARP_PKG)			\
+	-pkg:gio-sharp-2.0			\
 	-pkg:glade-sharp-2.0			\
 	-pkg:gnome-sharp-2.0			\
 	-pkg:gnome-vfs-sharp-2.0

Modified: trunk/src/SendEmail.cs
==============================================================================
--- trunk/src/SendEmail.cs	(original)
+++ trunk/src/SendEmail.cs	Wed Feb 11 20:09:01 2009
@@ -136,11 +136,7 @@
 			}
 
 			NumberOfPictures.Text 	= selection.Count.ToString();
-#if GTK_SHARP_2_14_0
 			TotalOriginalSize.Text 	= GLib.Format.SizeForDisplay (Orig_Photo_Size);
-#else
-			TotalOriginalSize.Text 	= SizeUtil.ToHumanReadable (Orig_Photo_Size);
-#endif
 			
 			UpdateEstimatedSize();
 
@@ -192,11 +188,7 @@
 				else
 					new_approx_total_size = System.Convert.ToInt64(Orig_Photo_Size * avg_scale [new_size_index]);
 
-#if GTK_SHARP_2_14_0
 				approxresult = GLib.Format.SizeForDisplay (new_approx_total_size);
-#else
-				approxresult = SizeUtil.ToHumanReadable (new_approx_total_size);
-#endif
 				ApproxNewSize.Text 	= approxresult;	
 
 		}

Modified: trunk/src/UI.Dialog/AboutDialog.cs
==============================================================================
--- trunk/src/UI.Dialog/AboutDialog.cs	(original)
+++ trunk/src/UI.Dialog/AboutDialog.cs	Wed Feb 11 20:09:01 2009
@@ -90,9 +90,7 @@
 				License = "GPL v2";
 			}
 			Logo = new Gdk.Pixbuf (System.Reflection.Assembly.GetEntryAssembly (), "f-spot-logo.svg");
-	#if !GTK_2_11
-			Name = "F-Spot";
-	#endif
+			ProgramName = "F-Spot";
 			TranslatorCredits = Catalog.GetString ("translator-credits");
                 	if (System.String.Compare (TranslatorCredits, "translator-credits") == 0)
                 		TranslatorCredits = null;

Modified: trunk/src/UI.Dialog/PreferenceDialog.cs
==============================================================================
--- trunk/src/UI.Dialog/PreferenceDialog.cs	(original)
+++ trunk/src/UI.Dialog/PreferenceDialog.cs	Wed Feb 11 20:09:01 2009
@@ -161,9 +161,7 @@
 			theme_filechooser.SelectionChanged += HandleThemeFileActivated;
 			themecustom_radio.Active = (active_theme != String.Empty);	
 
-#if GTK_2_12_2
 			restartlabel.Visible = false;
-#endif
 
 #if DEBUGTHEMES
 			refreshtheme_button = true;
@@ -241,19 +239,15 @@
 			themelist_combo.Sensitive = theme_filechooser.Sensitive = themecustom_radio.Active; 
 			if (themenone_radio.Active) {
 				Preferences.Set (Preferences.GTK_RC, String.Empty);
-#if GTK_2_12_2
 				Gtk.Rc.DefaultFiles = Global.DefaultRcFiles;
 				Gtk.Rc.ReparseAllForSettings (Gtk.Settings.Default, true);
-#endif
 			} else {
 				TreeIter iter;
 				if (themelist_combo.GetActiveIter (out iter)) {
 					Preferences.Set (Preferences.GTK_RC, theme_list [(themelist_combo.Model.GetValue (iter, 0)) as string]);
-#if GTK_2_12_2
 					Gtk.Rc.DefaultFiles = Global.DefaultRcFiles;
 					Gtk.Rc.AddDefaultFile (Preferences.Get<string> (Preferences.GTK_RC));
 					Gtk.Rc.ReparseAllForSettings (Gtk.Settings.Default, true);
-#endif
 				}
 			}
 		}
@@ -265,22 +259,18 @@
 			TreeIter iter;
 			if ((o as ComboBox).GetActiveIter (out iter))
 				Preferences.Set (Preferences.GTK_RC, theme_list [((o as ComboBox).Model.GetValue (iter, 0)) as string]);
-#if GTK_2_12_2
 			Gtk.Rc.DefaultFiles = Global.DefaultRcFiles;
 			Gtk.Rc.AddDefaultFile (Preferences.Get<string> (Preferences.GTK_RC));
 			Gtk.Rc.ReparseAllForSettings (Gtk.Settings.Default, true);
-#endif
 		}
 
 		void HandleThemeFileActivated (object o, EventArgs e)
 		{
 			if (theme_filechooser.Filename != null && theme_filechooser.Filename != Preferences.Get<string> (Preferences.GTK_RC)) {
 				Preferences.Set (Preferences.GTK_RC, theme_filechooser.Filename);	
-#if GTK_2_12_2
 				Gtk.Rc.DefaultFiles = Global.DefaultRcFiles;
 				Gtk.Rc.AddDefaultFile (Preferences.Get<string> (Preferences.GTK_RC));
 				Gtk.Rc.ReparseAllForSettings (Gtk.Settings.Default, true);
-#endif
 			}
 		}
 
@@ -303,9 +293,7 @@
 
 		void HandleRefreshTheme (object o, EventArgs e)
 		{
-#if GTK_2_12_2
 			Gtk.Rc.ReparseAllForSettings (Gtk.Settings.Default, true);	
-#endif
 		}
 
 		void LoadPreference (string key)

Modified: trunk/src/Util.cs
==============================================================================
--- trunk/src/Util.cs	(original)
+++ trunk/src/Util.cs	Wed Feb 11 20:09:01 2009
@@ -153,9 +153,7 @@
 
 
 public class SizeUtil {
-#if GTK_SHARP_2_14_0
 	[Obsolete ("Use GLib.Format.SizeForDisplay (gtk-sharp > 2.14)")]
-#endif
 	public static string ToHumanReadable (long size)
 	{
 		string tmp_str = String.Empty;

Modified: trunk/src/Widgets/InfoBox.cs
==============================================================================
--- trunk/src/Widgets/InfoBox.cs	(original)
+++ trunk/src/Widgets/InfoBox.cs	Wed Feb 11 20:09:01 2009
@@ -553,11 +553,7 @@
 				try {
 					GFile file = FileFactory.NewForUri (photo.DefaultVersionUri);
 					GFileInfo file_info = file.QueryInfo ("standard::size", FileQueryInfoFlags.None, null);
-#if GTK_SHARP_2_14_0
 					file_size_value_label.Text = Format.SizeForDisplay (file_info.Size);
-#else
-					file_size_value_label.Text = Gnome.Vfs.Format.FileSizeForDisplay (file_info.Size);
-#endif
 				} catch (GLib.GException e) {
 					file_size_value_label.Text = Catalog.GetString("(File read error)");
 					FSpot.Utils.Log.DebugException (e);
@@ -653,11 +649,7 @@
 				}
 				
 				if (file_size != -1)
-#if GTK_SHARP_2_14_0
 					file_size_value_label.Text = Format.SizeForDisplay (file_size);
-#else
-					file_size_value_label.Text = Gnome.Vfs.Format.FileSizeForDisplay (file_size);
-#endif
 
 				else
 					file_size_value_label.Text = Catalog.GetString("(At least one File not found)");

Modified: trunk/src/Widgets/OpenWithMenu.cs
==============================================================================
--- trunk/src/Widgets/OpenWithMenu.cs	(original)
+++ trunk/src/Widgets/OpenWithMenu.cs	Wed Feb 11 20:09:01 2009
@@ -15,19 +15,13 @@
 
 using Gtk;
 using Gdk;
-#if GTK_SHARP_2_12_6
 using GLib;
-#endif
 
 using Mono.Unix;
 
 namespace FSpot.Widgets {
 	public class OpenWithMenu: Gtk.Menu {
-#if GTK_SHARP_2_12_6
 		public delegate void OpenWithHandler (AppInfo app_info);
-#else
-		public delegate void OpenWithHandler (Gnome.Vfs.MimeApplication app_info);
-#endif
 		public event OpenWithHandler ApplicationActivated;
 
 		public delegate string [] TypeFetcher ();
@@ -48,13 +42,6 @@
 			set { show_icons = value; }
 		}
 
-#if !GTK_SHARP_2_12_6
-		static OpenWithMenu ()
-		{
-			Gnome.Vfs.Vfs.Initialize ();
-		}
-#endif
-
 		public OpenWithMenu (TypeFetcher type_fetcher) : this (type_fetcher, null)
 		{
 		}
@@ -72,11 +59,7 @@
 			for (int i = 0; i < dead_pool.Length; i++)
 				dead_pool [i].Destroy ();
 
-#if GTK_SHARP_2_12_6
 			foreach (AppInfo app in ApplicationsFor (type_fetcher ())) {
-#else
-			foreach (Gnome.Vfs.MimeApplication app in ApplicationsFor (type_fetcher ())) {
-#endif
 				AppMenuItem i = new AppMenuItem (app, show_icons);
 				i.Activated += HandleItemActivated;
 				Append (i);
@@ -91,42 +74,21 @@
 			ShowAll ();
 		}
 
-#if GTK_SHARP_2_12_6
 		AppInfo[] ApplicationsFor (string [] types)
-#else
-		Gnome.Vfs.MimeApplication[] ApplicationsFor (string [] types)
-#endif
 		{
-#if GTK_SHARP_2_12_6
 			List<AppInfo> app_infos = new List<AppInfo> ();
-#else
-			List<Gnome.Vfs.MimeApplication> app_infos = new List<Gnome.Vfs.MimeApplication> ();
-#endif
 			List<string> existing_ids = new List<string> ();
 			foreach (string type in types)
-#if GTK_SHARP_2_12_6
 				foreach (AppInfo appinfo in AppInfoAdapter.GetAllForType (type)) {
 					if (existing_ids.Contains (appinfo.Id))
 						continue;
-					if (!appinfo.SupportsUris ())
+					if (!appinfo.SupportsUris)
 						continue;
 					if (ignore_apps != null && ignore_apps.Contains (appinfo.Executable))
 						continue;
 					app_infos.Add (appinfo);
 					existing_ids.Add (appinfo.Id);
 				}
-#else
-				foreach (Gnome.Vfs.MimeApplication appinfo in Gnome.Vfs.Mime.GetAllApplications (type)) {
-					if (existing_ids.Contains (appinfo.DesktopId))
-						continue;
-					if (!appinfo.SupportsUris ())
-						continue;
-					if (ignore_apps != null && ignore_apps.Contains (appinfo.BinaryName))
-						continue;
-					app_infos.Add (appinfo);
-					existing_ids.Add (appinfo.DesktopId);
-				}
-#endif
 			return app_infos.ToArray ();
 		}
 
@@ -140,24 +102,12 @@
 
 		private class AppMenuItem : ImageMenuItem {
 
-#if GTK_SHARP_2_12_6
 			AppInfo app;
-#else
-			Gnome.Vfs.MimeApplication app;
-#endif
-#if GTK_SHARP_2_12_6
 			public AppInfo App {
-#else
-			public Gnome.Vfs.MimeApplication App {
-#endif
 				get { return app; }
 			}
 
-#if GTK_SHARP_2_12_6
 			public AppMenuItem (AppInfo app, bool show_icon) : base (app.Name)
-#else
-			public AppMenuItem (Gnome.Vfs.MimeApplication app, bool show_icon) : base (app.Name)
-#endif
 			{
 				this.app = app;
 
@@ -167,7 +117,6 @@
 //FIXME: GTK_SHARP_2_14 should provide a way to get the image directly out of app.Icon
 
 				Pixbuf pixbuf = null;
-#if GTK_SHARP_2_12_6
 				if (app.Icon is ThemedIcon) {
 					try {
 						pixbuf = IconTheme.Default.ChooseIcon ((app.Icon as ThemedIcon).Names, 16, (IconLookupFlags)0).LoadIcon ();
@@ -175,16 +124,6 @@
 					}
 				} else
 					FSpot.Utils.Log.DebugFormat ("Loading icons from {0} is not implemented", app.Icon);
-#else
-				try {
-					if (app.Icon.StartsWith ("/"))
-						pixbuf = new Gdk.Pixbuf (app.Icon, 16, 16);
-					else
-						pixbuf = IconTheme.Default.LoadIcon (app.Icon, 16, (IconLookupFlags)0);
-				} catch (System.Exception) {
-					pixbuf = null;
-				}
-#endif
 
 				if (pixbuf != null)
 					Image = new Gtk.Image (pixbuf);

Modified: trunk/src/f-spot.in
==============================================================================
--- trunk/src/f-spot.in	(original)
+++ trunk/src/f-spot.in	Wed Feb 11 20:09:01 2009
@@ -60,7 +60,7 @@
 	x--uninstalled)
 	    echo "*** Running uninstalled f-spot ***"
 	    EXE_TO_RUN="./f-spot.exe"
-	    export MONO_PATH= PATH_DBUS@@PATH_GIO   /Tao/Tao.OpenGl:../Tao/Tao.OpenGl.Glu:../Tao/Tao.OpenGl.ExtensionLoader:../google-sharp:../gnome-keyring-sharp:../FlickrNet:../SmugMugNet:../libgphoto2-sharp:../semweb:../glitz-sharp/src/:../mono-addins/Mono.Addins:../mono-addins/Mono.Addins.Setup:../mono-addins/Mono.Addins.Gui:$MONO_PATH
+	    export MONO_PATH= PATH_DBUS@../Tao/Tao.OpenGl:../Tao/Tao.OpenGl.Glu:../Tao/Tao.OpenGl.ExtensionLoader:../google-sharp:../gnome-keyring-sharp:../FlickrNet:../SmugMugNet:../libgphoto2-sharp:../semweb:../glitz-sharp/src/:../mono-addins/Mono.Addins:../mono-addins/Mono.Addins.Setup:../mono-addins/Mono.Addins.Gui:$MONO_PATH
 	    ;;
     esac
 done

Modified: trunk/src/main.cs
==============================================================================
--- trunk/src/main.cs	(original)
+++ trunk/src/main.cs	Wed Feb 11 20:09:01 2009
@@ -226,9 +226,7 @@
 							if (File.Exists (Path.Combine (Global.BaseDirectory, "gtkrc")))
 								Gtk.Rc.AddDefaultFile (Path.Combine (Global.BaseDirectory, "gtkrc"));
 
-#if GTK_2_12_2
 							Global.DefaultRcFiles = Gtk.Rc.DefaultFiles;
-#endif
 							Gtk.Rc.AddDefaultFile (Preferences.Get<string> (Preferences.GTK_RC));
 							Gtk.Rc.ReparseAllForSettings (Gtk.Settings.Default, true);
 						}



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