[f-spot] Minor code clean ups using the new code analysis stuff



commit ba21f16e4b721f314dbe657c600e4d1513b2da9d
Author: Stephen Shaw <sshaw decriptor com>
Date:   Fri Sep 7 16:29:13 2012 -0700

    Minor code clean ups using the new code analysis stuff
    
    Just trying out all the cool new goodness in MonoDevelop
    git master (pre 3.1) and the newly added code analysis
    options
    
    Also, moving some of the test stuff to a test project
    and adding a couple tests

 F-Spot.sln                                         |    1 -
 .../FSpot.Imaging/TestOf_ImageFile.cs              |  126 ++++++++++++++++++++
 .../MainApp.UnitTest/FSpot/TestOf_AndTerm.cs       |    3 +-
 .../MainApp.UnitTest/MainApp.UnitTest.csproj       |   15 +++
 src/Clients/MainApp/FSpot.Imaging/Ciff.cs          |    2 +-
 src/Clients/MainApp/FSpot.Imaging/ImageFile.cs     |   21 ++--
 .../MainApp/FSpot.Imaging/Tests/ImageFileTests.cs  |   91 --------------
 .../MainApp/FSpot.Import/ImportController.cs       |    8 +-
 .../MainApp/FSpot.Import/MetadataImporter.cs       |    2 +-
 src/Clients/MainApp/FSpot.Jobs/CalculateHashJob.cs |    2 +-
 src/Clients/MainApp/FSpot.Jobs/SyncMetadataJob.cs  |    2 +-
 .../MainApp/FSpot.UI.Dialog/DateRangeDialog.cs     |    8 +-
 .../MainApp/FSpot.UI.Dialog/EditTagDialog.cs       |   15 +--
 .../MainApp/FSpot.UI.Dialog/LastRollDialog.cs      |   10 +-
 src/Clients/MainApp/FSpot.Widgets/Filmstrip.cs     |   29 +++--
 src/Clients/MainApp/FSpot.Widgets/FindBar.cs       |    5 +-
 .../MainApp/FSpot.Widgets/FolderTreeModel.cs       |    2 +-
 src/Clients/MainApp/FSpot.Widgets/InfoBox.cs       |    8 +-
 src/Clients/MainApp/FSpot.Widgets/TagEntry.cs      |    4 +-
 src/Clients/MainApp/FSpot/JobStore.cs              |    2 +-
 src/Clients/MainApp/FSpot/MainWindow.cs            |    2 +-
 src/Clients/MainApp/FSpot/Photo.cs                 |   17 ++--
 src/Clients/MainApp/FSpot/PhotoStore.cs            |   10 +-
 src/Clients/MainApp/FSpot/PhotoView.cs             |    4 +-
 src/Clients/MainApp/FSpot/RollStore.cs             |    2 +-
 src/Clients/MainApp/FSpot/TagQueryWidget.cs        |   10 +-
 src/Clients/MainApp/FSpot/TagSelectionWidget.cs    |   12 +-
 src/Clients/MainApp/FSpot/TagStore.cs              |   13 +-
 src/Clients/MainApp/FSpot/Term.cs                  |    5 +-
 src/Clients/MainApp/FSpot/ThumbnailCache.cs        |   10 +-
 src/Clients/MainApp/FSpot/TimeAdaptor.cs           |    4 +-
 src/Clients/MainApp/ImageLoaderThread.cs           |    2 +-
 src/Clients/MainApp/MainApp.csproj                 |    6 +-
 src/Clients/MainApp/PhotoVersionCommands.cs        |    8 +-
 src/Clients/MainApp/TagCommands.cs                 |   14 +-
 .../FSpot.Exporters.CD/FSpot.Exporters.CD.csproj   |    1 +
 .../FSpot.Exporters.Facebook.csproj                |    1 +
 .../FSpot.Exporters.Folder.csproj                  |    1 +
 .../FSpot.Exporters.Gallery.csproj                 |    1 +
 .../FSpot.Exporters.Tabblo.csproj                  |    1 +
 .../FSpot.Exporters.Zip/FSpot.Exporters.Zip.csproj |    1 +
 .../FSpot.Tools.ChangePhotoPath.csproj             |    1 +
 .../FSpot.Tools.DevelopInUFRaw.csproj              |    1 +
 .../FSpot.Tools.MergeDb/FSpot.Tools.MergeDb.csproj |    1 +
 44 files changed, 269 insertions(+), 215 deletions(-)
---
diff --git a/F-Spot.sln b/F-Spot.sln
index 9ac8e97..9c69c2a 100644
--- a/F-Spot.sln
+++ b/F-Spot.sln
@@ -284,7 +284,6 @@ Global
 		{A2A7E62B-8AE1-44F3-BB1B-B8E2DE7916C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{A2A7E62B-8AE1-44F3-BB1B-B8E2DE7916C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{A2A7E62B-8AE1-44F3-BB1B-B8E2DE7916C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{A2A7E62B-8AE1-44F3-BB1B-B8E2DE7916C4}.Release|Any CPU.Build.0 = Release|Any CPU
 		{A2A7E62B-8AE1-44F3-BB1B-B8E2DE7916C4}.Submodule|Any CPU.ActiveCfg = Debug|Any CPU
 		{A2A7E62B-8AE1-44F3-BB1B-B8E2DE7916C4}.Submodule|Any CPU.Build.0 = Debug|Any CPU
 		{B5CDF05C-278A-40AA-A587-B27A00BD9135}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
diff --git a/src/Clients/MainApp.UnitTest/FSpot.Imaging/TestOf_ImageFile.cs b/src/Clients/MainApp.UnitTest/FSpot.Imaging/TestOf_ImageFile.cs
new file mode 100644
index 0000000..52dcb81
--- /dev/null
+++ b/src/Clients/MainApp.UnitTest/FSpot.Imaging/TestOf_ImageFile.cs
@@ -0,0 +1,126 @@
+//
+// TestOf_ImageFile.cs
+//
+// Author:
+//   Ruben Vermeersch <ruben savanne be>
+//   Stephen Shaw <sshaw decriptor com>
+//
+// Copyright (c) 2012 Stephen Shaw
+// Copyright (C) 2010 Novell, Inc.
+// Copyright (C) 2010 Ruben Vermeersch
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+
+using NUnit.Framework;
+
+using Hyena;
+
+namespace FSpot.Imaging
+{
+	[TestFixture]
+	public class TestOf_ImageFile
+	{
+		List<string> _imageTypes;
+		[SetUp]
+		public void Initialize () {
+			GLib.GType.Init ();
+			_imageTypes = ImageFile.UnitTestImageFileTypes();
+		}
+
+		[TestCase("file.arw")]
+		[TestCase("file.crw")]
+		[TestCase("file.cr2")]
+		[TestCase("file.dng")]
+		[TestCase("file.mrw")]
+		[TestCase("file.nef")]
+		[TestCase("file.orf")]
+		[TestCase("file.pef")]
+		[TestCase("file.raw")]
+		[TestCase("file.raf")]
+		[TestCase("file.rw2")]
+		public void TestIfUriIsRaw (string uri)
+		{
+			var result = ImageFile.IsRaw(new SafeUri(uri, true));
+			Assert.That(result);
+		}
+
+		[TestCase("file.jpg")]
+		[TestCase("file.jpeg")]
+		[TestCase("file.jpe")]
+		[TestCase("file.jfi")]
+		[TestCase("file.jfif")]
+		[TestCase("file.jif")]
+		public void TestIfUriJpeg (string uri)
+		{
+			var result = ImageFile.IsJpeg(new SafeUri(uri, true));
+			Assert.That(result);
+		}
+
+		[Test]
+		public void CheckLoadableTypes ()
+		{
+			bool missing = false;
+
+			// Test that we have loaders defined for all Taglib# parseable types.
+			foreach (var key in TagLib.FileTypes.AvailableTypes.Keys)
+			{
+				Type type = TagLib.FileTypes.AvailableTypes [key];
+				if (!type.IsSubclassOf (typeof (TagLib.Image.File))) {
+					continue;
+				}
+
+				var test_key = key;
+				if (key.StartsWith ("taglib/")) {
+					test_key = "." + key.Substring (7);
+				}
+
+				if (!_imageTypes.Contains (test_key)) {
+					Log.InformationFormat ("Missing key for {0}", test_key);
+					missing = true;
+				}
+			}
+
+			Assert.IsFalse (missing, "No missing loaders for Taglib# parseable files.");
+		}
+
+		[Test]
+		public void CheckTaglibSupport ()
+		{
+			bool missing = false;
+
+			foreach (var key in _imageTypes) {
+				string type = key;
+				if (type.StartsWith ("."))
+					type = String.Format ("taglib/{0}", type.Substring (1));
+
+				if (!TagLib.FileTypes.AvailableTypes.ContainsKey (type)) {
+					Log.InformationFormat ("Missing type support in Taglib# for {0}", type);
+					missing = true;
+				}
+			}
+
+			Assert.IsFalse (missing, "No missing type support in Taglib#.");
+		}
+	}
+}
diff --git a/src/Clients/MainApp.UnitTest/FSpot/TestOf_AndTerm.cs b/src/Clients/MainApp.UnitTest/FSpot/TestOf_AndTerm.cs
index ffb9770..d24bde7 100644
--- a/src/Clients/MainApp.UnitTest/FSpot/TestOf_AndTerm.cs
+++ b/src/Clients/MainApp.UnitTest/FSpot/TestOf_AndTerm.cs
@@ -2,7 +2,6 @@
 //  Author:
 //       Stephen Shaw <sshaw decriptor com>
 //  Copyright (c) 2011 sshaw
-using System;
 using NUnit.Framework;
 using FSpot;
 
@@ -12,7 +11,7 @@ namespace FSpot
 	public class TestOf_AndTerm
 	{
 		//private AndTerm andTerm = null;
-		private AndTerm andTerm = null;
+		AndTerm andTerm = null;
 
 		[TestFixtureSetUp]
 		public void TestFixtureSetUp ()
diff --git a/src/Clients/MainApp.UnitTest/MainApp.UnitTest.csproj b/src/Clients/MainApp.UnitTest/MainApp.UnitTest.csproj
index e42fa22..c77cd64 100644
--- a/src/Clients/MainApp.UnitTest/MainApp.UnitTest.csproj
+++ b/src/Clients/MainApp.UnitTest/MainApp.UnitTest.csproj
@@ -37,18 +37,33 @@
       <SpecificVersion>False</SpecificVersion>
     </Reference>
     <Reference Include="System" />
+    <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+      <Private>False</Private>
+      <Package>glib-sharp-2.0</Package>
+    </Reference>
+    <Reference Include="taglib-sharp, Version=2.0.4.0, Culture=neutral, PublicKeyToken=db62eba44689b5b0">
+      <Private>False</Private>
+      <Package>taglib-sharp</Package>
+      <SpecificVersion>False</SpecificVersion>
+    </Reference>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="FSpot\TestOf_AndTerm.cs" />
+    <Compile Include="FSpot.Imaging\TestOf_ImageFile.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <ItemGroup>
     <Folder Include="FSpot\" />
+    <Folder Include="FSpot.Imaging\" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\MainApp\MainApp.csproj">
       <Project>{27EC05FB-0223-4B26-8157-E49AF81D0007}</Project>
       <Name>MainApp</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\..\lib\Hyena\Hyena\Hyena.csproj">
+      <Project>{95374549-9553-4C1E-9D89-667755F90E12}</Project>
+      <Name>Hyena</Name>
+    </ProjectReference>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/src/Clients/MainApp/FSpot.Imaging/Ciff.cs b/src/Clients/MainApp/FSpot.Imaging/Ciff.cs
index 5be8277..54f536d 100644
--- a/src/Clients/MainApp/FSpot.Imaging/Ciff.cs
+++ b/src/Clients/MainApp/FSpot.Imaging/Ciff.cs
@@ -117,7 +117,7 @@ namespace FSpot.Imaging.Ciff {
 
 		public byte [] ReadEntry (int pos)
 		{
-			Entry e = (Entry) entry_list [pos];
+			Entry e = entry_list [pos];
 
 			stream.Position = this.start + e.Offset;
 
diff --git a/src/Clients/MainApp/FSpot.Imaging/ImageFile.cs b/src/Clients/MainApp/FSpot.Imaging/ImageFile.cs
index 8b659df..a329801 100644
--- a/src/Clients/MainApp/FSpot.Imaging/ImageFile.cs
+++ b/src/Clients/MainApp/FSpot.Imaging/ImageFile.cs
@@ -32,6 +32,7 @@
 
 using System;
 using System.Collections.Generic;
+using System.Linq;
 
 using Hyena;
 
@@ -112,6 +113,11 @@ namespace FSpot.Imaging
 			}
 		}
 
+		public static List<string> UnitTestImageFileTypes ()
+		{
+			return NameTable.Keys.ToList();
+		}
+
 		public static bool HasLoader (SafeUri uri)
 		{
 			return GetLoaderType (uri) != null;
@@ -144,7 +150,8 @@ namespace FSpot.Imaging
 
 			if (NameTable.TryGetValue (mime, out t))
 				return t;
-			else if (NameTable.TryGetValue (extension, out t))
+
+			if (NameTable.TryGetValue (extension, out t))
 				return t;
 
 			return null;
@@ -180,22 +187,14 @@ namespace FSpot.Imaging
 				".rw2",
 			};
 			var extension = uri.GetExtension ().ToLower ();
-			foreach (string ext in raw_extensions) {
-				if (ext == extension)
-					return true;
-			}
-			return false;
+			return raw_extensions.Any (x => x == extension);
 		}
 
 		public static bool IsJpeg (SafeUri uri)
 		{
 			string [] jpg_extensions = {".jpg", ".jpeg", ".jpe", ".jfi", ".jfif", ".jif"};
 			var extension = uri.GetExtension ().ToLower ();
-			foreach (string ext in jpg_extensions) {
-				if (ext == extension)
-					return true;
-			}
-			return false;
+			return jpg_extensions.Any (x => x == extension);
 		}
 		#endregion
 	}
diff --git a/src/Clients/MainApp/FSpot.Import/ImportController.cs b/src/Clients/MainApp/FSpot.Import/ImportController.cs
index cf4d609..df46558 100644
--- a/src/Clients/MainApp/FSpot.Import/ImportController.cs
+++ b/src/Clients/MainApp/FSpot.Import/ImportController.cs
@@ -130,12 +130,12 @@ namespace FSpot.Import
 
 #region Source Scanning
 
-        private List<IImportSource> sources;
+        private List<IImportSource> _sources;
         public List<IImportSource> Sources {
             get {
-                if (sources == null)
-                    sources = ScanSources ();
-                return sources;
+                if (_sources == null)
+                    _sources = ScanSources ();
+                return _sources;
             }
         }
 
diff --git a/src/Clients/MainApp/FSpot.Import/MetadataImporter.cs b/src/Clients/MainApp/FSpot.Import/MetadataImporter.cs
index 5504514..ffa4d04 100644
--- a/src/Clients/MainApp/FSpot.Import/MetadataImporter.cs
+++ b/src/Clients/MainApp/FSpot.Import/MetadataImporter.cs
@@ -96,7 +96,7 @@ namespace FSpot.Import {
 
         private void AddTagToPhoto (Photo photo, string new_tag_name)
         {
-            if (new_tag_name == null || new_tag_name.Length == 0)
+            if (string.IsNullOrEmpty(new_tag_name))
                 return;
 
             Tag parent = EnsureTag (li_root_tag, tag_store.RootCategory);
diff --git a/src/Clients/MainApp/FSpot.Jobs/CalculateHashJob.cs b/src/Clients/MainApp/FSpot.Jobs/CalculateHashJob.cs
index a9cecbb..79770c0 100644
--- a/src/Clients/MainApp/FSpot.Jobs/CalculateHashJob.cs
+++ b/src/Clients/MainApp/FSpot.Jobs/CalculateHashJob.cs
@@ -62,7 +62,7 @@ namespace FSpot.Jobs {
 			Log.DebugFormat ("Calculating Hash {0}...", photo_id);
 
 			try {
-				Photo photo = FSpot.App.Instance.Database.Photos.Get (Convert.ToUInt32 (photo_id)) as Photo;
+				Photo photo = FSpot.App.Instance.Database.Photos.Get (Convert.ToUInt32 (photo_id));
 				FSpot.App.Instance.Database.Photos.CalculateMD5Sum (photo);
 				return true;
 			} catch (System.Exception e) {
diff --git a/src/Clients/MainApp/FSpot.Jobs/SyncMetadataJob.cs b/src/Clients/MainApp/FSpot.Jobs/SyncMetadataJob.cs
index c6ca5e7..8b7dcf0 100644
--- a/src/Clients/MainApp/FSpot.Jobs/SyncMetadataJob.cs
+++ b/src/Clients/MainApp/FSpot.Jobs/SyncMetadataJob.cs
@@ -61,7 +61,7 @@ namespace FSpot.Jobs {
             System.Threading.Thread.Sleep (500);
 
             try {
-                Photo photo = FSpot.App.Instance.Database.Photos.Get (Convert.ToUInt32 (JobOptions)) as Photo;
+                Photo photo = FSpot.App.Instance.Database.Photos.Get (Convert.ToUInt32 (JobOptions));
                 if (photo == null)
                     return false;
 
diff --git a/src/Clients/MainApp/FSpot.UI.Dialog/DateRangeDialog.cs b/src/Clients/MainApp/FSpot.UI.Dialog/DateRangeDialog.cs
index ba735b1..f2d67bc 100644
--- a/src/Clients/MainApp/FSpot.UI.Dialog/DateRangeDialog.cs
+++ b/src/Clients/MainApp/FSpot.UI.Dialog/DateRangeDialog.cs
@@ -242,9 +242,9 @@ namespace FSpot.UI.Dialog
 		void HandlePeriodComboboxChanged (object o, EventArgs args)
 		{
 			start_dateedit.DateChanged -= HandleDateEditChanged;
-			((Gtk.Entry) start_dateedit.Children [0] as Gtk.Entry).Changed -= HandleDateEditChanged;
+			(start_dateedit.Children [0] as Gtk.Entry).Changed -= HandleDateEditChanged;
 			end_dateedit.DateChanged -= HandleDateEditChanged;
-			((Gtk.Entry) end_dateedit.Children [0] as Gtk.Entry).Changed -= HandleDateEditChanged;
+			(end_dateedit.Children [0] as Gtk.Entry).Changed -= HandleDateEditChanged;
 
 			ComboBox combo = o as ComboBox;
 			if (o == null)
@@ -260,9 +260,9 @@ namespace FSpot.UI.Dialog
 			}
 
 			start_dateedit.DateChanged += HandleDateEditChanged;
-			((Gtk.Entry) start_dateedit.Children [0] as Gtk.Entry).Changed += HandleDateEditChanged;
+			(start_dateedit.Children [0] as Gtk.Entry).Changed += HandleDateEditChanged;
 			end_dateedit.DateChanged += HandleDateEditChanged;
-			((Gtk.Entry) end_dateedit.Children [0] as Gtk.Entry).Changed += HandleDateEditChanged;
+			(end_dateedit.Children [0] as Gtk.Entry).Changed += HandleDateEditChanged;
 		}
 	}
 }
diff --git a/src/Clients/MainApp/FSpot.UI.Dialog/EditTagDialog.cs b/src/Clients/MainApp/FSpot.UI.Dialog/EditTagDialog.cs
index f4d3da4..9c03b44 100644
--- a/src/Clients/MainApp/FSpot.UI.Dialog/EditTagDialog.cs
+++ b/src/Clients/MainApp/FSpot.UI.Dialog/EditTagDialog.cs
@@ -43,16 +43,11 @@ namespace FSpot.UI.Dialog
 	{
 		Db db;
 		Tag tag;
-		[GtkBeans.Builder.Object]
-		Button ok_button;
-		[GtkBeans.Builder.Object]
-		Entry tag_name_entry;
-		[GtkBeans.Builder.Object]
-		Label already_in_use_label;
-		[GtkBeans.Builder.Object]
-		Gtk.Image icon_image;
-		[GtkBeans.Builder.Object]
-		Gtk.ComboBox category_option_menu;
+		[GtkBeans.Builder.Object] Button ok_button;
+		[GtkBeans.Builder.Object] Entry tag_name_entry;
+		[GtkBeans.Builder.Object] Label already_in_use_label;
+		[GtkBeans.Builder.Object] Gtk.Image icon_image;
+		[GtkBeans.Builder.Object] Gtk.ComboBox category_option_menu;
 
 		public EditTagDialog (Db db, Tag t, Gtk.Window parent_window) : base ("EditTagDialog.ui", "edit_tag_dialog")
 		{
diff --git a/src/Clients/MainApp/FSpot.UI.Dialog/LastRollDialog.cs b/src/Clients/MainApp/FSpot.UI.Dialog/LastRollDialog.cs
index c92bcee..fb78774 100644
--- a/src/Clients/MainApp/FSpot.UI.Dialog/LastRollDialog.cs
+++ b/src/Clients/MainApp/FSpot.UI.Dialog/LastRollDialog.cs
@@ -46,11 +46,11 @@ namespace FSpot.UI.Dialog
 		FSpot.PhotoQuery query;
 		RollStore rollstore;
 		Roll[] rolls;
-		[GtkBeans.Builder.Object] private ComboBox combo_filter; // at, after, or between
-		[GtkBeans.Builder.Object] private ComboBox combo_roll_1;
-		[GtkBeans.Builder.Object] private ComboBox combo_roll_2;
-		[GtkBeans.Builder.Object] private Label and_label; // and label between two comboboxes.
-		[GtkBeans.Builder.Object] private Label photos_in_selected_rolls;
+		[GtkBeans.Builder.Object] ComboBox combo_filter; // at, after, or between
+		[GtkBeans.Builder.Object] ComboBox combo_roll_1;
+		[GtkBeans.Builder.Object] ComboBox combo_roll_2;
+		[GtkBeans.Builder.Object] Label and_label; // and label between two comboboxes.
+		[GtkBeans.Builder.Object] Label photos_in_selected_rolls;
 
 		public LastRolls (FSpot.PhotoQuery query, RollStore rollstore, Window parent) : base ("LastImportRollFilterDialog.ui", "last_import_rolls_filter")
 		{
diff --git a/src/Clients/MainApp/FSpot.Widgets/Filmstrip.cs b/src/Clients/MainApp/FSpot.Widgets/Filmstrip.cs
index d1799d6..b76935f 100644
--- a/src/Clients/MainApp/FSpot.Widgets/Filmstrip.cs
+++ b/src/Clients/MainApp/FSpot.Widgets/Filmstrip.cs
@@ -545,19 +545,19 @@ namespace FSpot.Widgets
 			}
 
 			if (current == null) {
-                var pixbuf = XdgThumbnailSpec.LoadThumbnail (uri, ThumbnailSize.Large, null);
-                if (pixbuf == null) {
+				var pixbuf = XdgThumbnailSpec.LoadThumbnail (uri, ThumbnailSize.Large, null);
+				if (pixbuf == null) {
 					ThumbnailLoader.Default.Request (uri, ThumbnailSize.Large, 0);
-                    current = FSpot.Core.Global.IconTheme.LoadIcon ("gtk-missing-image", ThumbSize, (Gtk.IconLookupFlags)0);
-                } else {
+					current = FSpot.Core.Global.IconTheme.LoadIcon ("gtk-missing-image", ThumbSize, (Gtk.IconLookupFlags)0);
+				} else {
 					if (SquaredThumbs) {
-                        current = PixbufUtils.IconFromPixbuf (pixbuf, ThumbSize);
-                    } else {
-                        current = pixbuf.ScaleSimple (ThumbSize, ThumbSize, InterpType.Nearest);
-                    }
-                    pixbuf.Dispose ();
+						current = PixbufUtils.IconFromPixbuf (pixbuf, ThumbSize);
+					} else {
+						current = pixbuf.ScaleSimple (ThumbSize, ThumbSize, InterpType.Nearest);
+					}
+					pixbuf.Dispose ();
 					thumb_cache.Add (uri, current);
-                }
+				}
 			}
 
 			//FIXME: we might end up leaking a pixbuf here
@@ -569,10 +569,11 @@ namespace FSpot.Widgets
 			}
 
 			// Add a four pixel white border around the thumbnail
-			Pixbuf whiteBorder = new Pixbuf (Gdk.Colorspace.Rgb, true, 8, current.Width, current.Height);
-			whiteBorder.Fill (0);
-			current.CopyArea (1, 1, current.Width - 8, current.Height - 8, whiteBorder, 4, 4);
-			current = whiteBorder;
+			using (Pixbuf whiteBorder = new Pixbuf (Gdk.Colorspace.Rgb, true, 8, current.Width, current.Height)) {
+				whiteBorder.Fill (0);
+				current.CopyArea (1, 1, current.Width - 8, current.Height - 8, whiteBorder, 4, 4);
+				current = whiteBorder;
+			}
 
 			if (!highlighted)
 				return current;
diff --git a/src/Clients/MainApp/FSpot.Widgets/FindBar.cs b/src/Clients/MainApp/FSpot.Widgets/FindBar.cs
index a233ed4..f1ecadf 100644
--- a/src/Clients/MainApp/FSpot.Widgets/FindBar.cs
+++ b/src/Clients/MainApp/FSpot.Widgets/FindBar.cs
@@ -234,7 +234,7 @@ namespace FSpot.Widgets {
 
 		private bool ConstructQuery (Term parent, int depth, string txt, bool negated)
 		{
-			if (txt == null || txt.Length == 0)
+			if (string.IsNullOrEmpty(txt))
 				return true;
 
 			string indent = String.Format ("{0," + depth*2 + "}", " ");
@@ -475,8 +475,7 @@ namespace FSpot.Widgets {
 				else if (txt [pos] == two) {
 					if (sames == 0)
 						return pos;
-					else
-						sames--;
+					sames--;
 				}
 			}
 
diff --git a/src/Clients/MainApp/FSpot.Widgets/FolderTreeModel.cs b/src/Clients/MainApp/FSpot.Widgets/FolderTreeModel.cs
index 0312608..5498d9a 100644
--- a/src/Clients/MainApp/FSpot.Widgets/FolderTreeModel.cs
+++ b/src/Clients/MainApp/FSpot.Widgets/FolderTreeModel.cs
@@ -200,7 +200,7 @@ namespace FSpot.Widgets
 					last_count += (int)GetValue (iter, 1);
 					SetValue (iter, 1, last_count);
 				}
-				count_all += (int)last_count;
+				count_all += last_count;
 			}
 		}
 	}
diff --git a/src/Clients/MainApp/FSpot.Widgets/InfoBox.cs b/src/Clients/MainApp/FSpot.Widgets/InfoBox.cs
index cb9a44c..f84c6de 100644
--- a/src/Clients/MainApp/FSpot.Widgets/InfoBox.cs
+++ b/src/Clients/MainApp/FSpot.Widgets/InfoBox.cs
@@ -402,8 +402,8 @@ namespace FSpot.Widgets
 
                                 if (width != 0 && height != 0)
                                     return String.Format ("{0}x{1}", width, height);
-                                else
-                                    return Catalog.GetString ("(Unknown)");
+                                
+				return Catalog.GetString ("(Unknown)");
                            }, null);
 
             AddLabelEntry ("exposure", Catalog.GetString ("Exposure"), Catalog.GetString ("Show Exposure"),
@@ -454,8 +454,8 @@ namespace FSpot.Widgets
                 
                                 if (focal_length == null)
                                     return Catalog.GetString ("(Unknown)");
-                                else
-                                    return String.Format ("{0} mm", focal_length.Value);
+
+				return String.Format ("{0} mm", focal_length.Value);
                             }, null);
 
             AddLabelEntry ("camera", Catalog.GetString ("Camera"), Catalog.GetString ("Show Camera"), false,
diff --git a/src/Clients/MainApp/FSpot.Widgets/TagEntry.cs b/src/Clients/MainApp/FSpot.Widgets/TagEntry.cs
index 81bf936..c2566fb 100644
--- a/src/Clients/MainApp/FSpot.Widgets/TagEntry.cs
+++ b/src/Clients/MainApp/FSpot.Widgets/TagEntry.cs
@@ -77,7 +77,7 @@ namespace FSpot.Widgets
 					int count = 1;
 
 					if (taghash.ContainsKey (tag))
-						count = ((int) taghash [tag]) + 1;
+						count = (taghash [tag]) + 1;
 
 					if (count <= i)
 						taghash.Remove (tag);
@@ -91,7 +91,7 @@ namespace FSpot.Widgets
 
 			selected_photos_tagnames = new List<string> ();
 			foreach (Tag tag in taghash.Keys)
-				if ((int) (taghash [tag]) == sel.Length)
+				if (taghash [tag] == sel.Length)
 					selected_photos_tagnames.Add (tag.Name);
 
 			Update ();
diff --git a/src/Clients/MainApp/FSpot/JobStore.cs b/src/Clients/MainApp/FSpot/JobStore.cs
index 89c8880..020517a 100644
--- a/src/Clients/MainApp/FSpot/JobStore.cs
+++ b/src/Clients/MainApp/FSpot/JobStore.cs
@@ -194,7 +194,7 @@ namespace FSpot {
     	{
     		RemoveFromCache (item);
     
-    		if ((item as Job).Persistent)
+    		if (item.Persistent)
     			Database.Execute (new HyenaSqliteCommand ("DELETE FROM jobs WHERE id = ?", item.Id));
     
     		EmitRemoved (item);
diff --git a/src/Clients/MainApp/FSpot/MainWindow.cs b/src/Clients/MainApp/FSpot/MainWindow.cs
index c819725..1e5f40c 100644
--- a/src/Clients/MainApp/FSpot/MainWindow.cs
+++ b/src/Clients/MainApp/FSpot/MainWindow.cs
@@ -2608,7 +2608,7 @@ namespace FSpot
 			// account for All and separator menu items
 			item_pos -= 2;
 
-			FSpot.Term parent_term = (FSpot.Term) FSpot.LogicWidget.Root.SubTerms [item_pos];
+			FSpot.Term parent_term = LogicWidget.Root.SubTerms [item_pos];
 
 			if (FSpot.LogicWidget.Box != null) {
 				FSpot.Literal after = parent_term.Last as FSpot.Literal;
diff --git a/src/Clients/MainApp/FSpot/Photo.cs b/src/Clients/MainApp/FSpot/Photo.cs
index 773c69a..615cec1 100644
--- a/src/Clients/MainApp/FSpot/Photo.cs
+++ b/src/Clients/MainApp/FSpot/Photo.cs
@@ -213,7 +213,7 @@ namespace FSpot
 
 		public bool VersionNameExists (string version_name)
 		{
-			return Versions.Where ((v) => v.Name == version_name).Any ();
+			return Versions.Any (v => v.Name == version_name);
 		}
 
 		public SafeUri VersionUri (uint version_id)
@@ -599,12 +599,13 @@ namespace FSpot
 		#region IComparable implementation
 		public int CompareTo (object obj)
 		{
-			if (this.GetType () == obj.GetType ())
+			if (GetType () == obj.GetType ())
 				return this.Compare((Photo)obj);
-			else if (obj is DateTime)
-				return this.time.CompareTo ((DateTime)obj);
-			else
-				throw new Exception ("Object must be of type Photo");
+
+			if (obj is DateTime)
+				return time.CompareTo ((DateTime)obj);
+
+			throw new Exception ("Object must be of type Photo");
 		}
 
 		public int CompareTo (Photo photo)
@@ -613,8 +614,8 @@ namespace FSpot
 
 			if (result == 0)
 				return 0;
-			else
-				return (this as IPhoto).Compare (photo);
+
+			return (this as IPhoto).Compare (photo);
 		}
 		#endregion
 	}
diff --git a/src/Clients/MainApp/FSpot/PhotoStore.cs b/src/Clients/MainApp/FSpot/PhotoStore.cs
index 497145d..37977f7 100644
--- a/src/Clients/MainApp/FSpot/PhotoStore.cs
+++ b/src/Clients/MainApp/FSpot/PhotoStore.cs
@@ -245,7 +245,7 @@ namespace FSpot {
         
                  while (reader.Read ()) {
                          uint tag_id = Convert.ToUInt32 (reader ["tag_id"]);
-                         Tag tag = App.Instance.Database.Tags.Get (tag_id) as Tag;
+                         Tag tag = App.Instance.Database.Tags.Get (tag_id);
                          photo.AddTagUnsafely (tag);
                  }
                  reader.Dispose();
@@ -308,7 +308,7 @@ namespace FSpot {
         
                          if (reader [1] != null) {
                                  uint tag_id = Convert.ToUInt32 (reader ["tag_id"]);
-                                 Tag tag = App.Instance.Database.Tags.Get (tag_id) as Tag;
+                                 Tag tag = App.Instance.Database.Tags.Get (tag_id);
                                  photo.AddTagUnsafely (tag);
                          }
                  }
@@ -512,12 +512,12 @@ namespace FSpot {
         
                  if (changes.VersionsAdded != null)
                          foreach (uint version_id in changes.VersionsAdded) {
-                                 PhotoVersion version = photo.GetVersion (version_id) as PhotoVersion;
+                                 PhotoVersion version = photo.GetVersion (version_id);
                                  InsertVersion (photo, version);
                          }
                  if (changes.VersionsModified != null)
                          foreach (uint version_id in changes.VersionsModified) {
-                                 PhotoVersion version = photo.GetVersion (version_id) as PhotoVersion;
+                                 PhotoVersion version = photo.GetVersion (version_id);
                                  Database.Execute (new HyenaSqliteCommand (
                                          "UPDATE photo_versions SET name = ?, " +
                                          "base_uri = ?, filename = ?, protected = ?, import_md5 = ? " +
@@ -536,7 +536,7 @@ namespace FSpot {
         
          public void CalculateMD5Sum (Photo photo) {
                  foreach (uint version_id in photo.VersionIds) {
-                         PhotoVersion version = photo.GetVersion (version_id) as PhotoVersion;
+                         PhotoVersion version = photo.GetVersion (version_id);
         
                          // Don't overwrite MD5 sums that are already calculated.
                          if (version.ImportMD5 != String.Empty && version.ImportMD5 != null)
diff --git a/src/Clients/MainApp/FSpot/PhotoView.cs b/src/Clients/MainApp/FSpot/PhotoView.cs
index 1672139..dba9bce 100644
--- a/src/Clients/MainApp/FSpot/PhotoView.cs
+++ b/src/Clients/MainApp/FSpot/PhotoView.cs
@@ -103,12 +103,12 @@ namespace FSpot {
 		{
 			description_entry.Changed -= HandleDescriptionChanged;
 			if (Item.IsValid) {
-				if (description_entry.Sensitive == false)
+				if (!description_entry.Sensitive)
 					description_entry.Sensitive = true;
 
 				string desc = Item.Current.Description;
 				if (description_entry.Text != desc) {
-					description_entry.Text = desc == null ? String.Empty : desc;
+					description_entry.Text = desc ?? String.Empty;
 				}
 			} else {
 				description_entry.Sensitive = false;
diff --git a/src/Clients/MainApp/FSpot/RollStore.cs b/src/Clients/MainApp/FSpot/RollStore.cs
index bb4088d..d5d9538 100644
--- a/src/Clients/MainApp/FSpot/RollStore.cs
+++ b/src/Clients/MainApp/FSpot/RollStore.cs
@@ -131,7 +131,7 @@ namespace FSpot
 				while (reader.Read ()) {
 					uint id = Convert.ToUInt32 (reader ["roll_id"]);
 
-					Roll roll = LookupInCache (id) as Roll;
+					Roll roll = LookupInCache (id);
 					if (roll == null) {
 						roll = new Roll (id, Convert.ToUInt32 (reader ["roll_time"]));
 						AddToCache (roll);
diff --git a/src/Clients/MainApp/FSpot/TagQueryWidget.cs b/src/Clients/MainApp/FSpot/TagQueryWidget.cs
index 3ff85cf..6577d54 100644
--- a/src/Clients/MainApp/FSpot/TagQueryWidget.cs
+++ b/src/Clients/MainApp/FSpot/TagQueryWidget.cs
@@ -345,16 +345,16 @@ namespace FSpot
 		private void HandleTagChanged (object sender, DbItemEventArgs<Tag> args)
 		{
 			foreach (Tag t in args.Items)
-                foreach (Literal term in rootTerm.FindByTag (t))
-                    term.Update ();
+		                foreach (Literal term in rootTerm.FindByTag (t))
+		                    term.Update ();
 		}
 
 		// If the user deletes a tag that is in use in the query, remove it from the query too.
 		private void HandleTagDeleted (object sender, DbItemEventArgs<Tag> args)
 		{
 			foreach (Tag t in args.Items)
-                foreach (Literal term in rootTerm.FindByTag (t))
-                    term.RemoveSelf ();
+		                foreach (Literal term in rootTerm.FindByTag (t))
+		                    term.RemoveSelf ();
 		}
 
 		private void HandleDragMotion (object o, DragMotionArgs args)
@@ -391,7 +391,7 @@ namespace FSpot
 
 				if (term.IsNegated)
 					foreach (Literal group in groups)
-					group.IsNegated = true;
+						group.IsNegated = true;
 			}
 			preventUpdate = false;
 			UpdateQuery ();
diff --git a/src/Clients/MainApp/FSpot/TagSelectionWidget.cs b/src/Clients/MainApp/FSpot/TagSelectionWidget.cs
index cf69395..84c8703 100644
--- a/src/Clients/MainApp/FSpot/TagSelectionWidget.cs
+++ b/src/Clients/MainApp/FSpot/TagSelectionWidget.cs
@@ -97,7 +97,7 @@ namespace FSpot {
 			Model.GetValue (iter, IdColumn, ref val);
 			uint tag_id = (uint) val;
 
-			return tag_store.Get (tag_id) as Tag;
+			return tag_store.Get (tag_id);
 		}
 
 		// Loading up the store.
@@ -138,7 +138,7 @@ namespace FSpot {
 					Model.GetIter (out iter, path);
 					Model.GetValue (iter, IdColumn, ref value);
 					uint tag_id = (uint) value;
-					tags[i] = tag_store.Get (tag_id) as Tag;
+					tags[i] = tag_store.Get (tag_id);
 					i++;
 				}
 				return tags;
@@ -194,7 +194,7 @@ namespace FSpot {
 			GLib.Value value = new GLib.Value ();
 			Model.GetValue (iter, IdColumn, ref value);
 			uint tag_id = (uint) value;
-			Tag tag = tag_store.Get (tag_id) as Tag;
+			Tag tag = tag_store.Get (tag_id);
 
 			if (tag == null)
 				return;
@@ -227,7 +227,7 @@ namespace FSpot {
 			Model.GetValue (iter, IdColumn, ref value);
 			uint tag_id = (uint) value;
 
-			Tag tag = tag_store.Get (tag_id) as Tag;
+			Tag tag = tag_store.Get (tag_id);
 			if (tag == null)
 				return;
 
@@ -283,7 +283,7 @@ namespace FSpot {
 			bool valid;
 
 			store.GetValue (src, IdColumn, ref value);
-			Tag tag = (Tag) tag_store.Get ((uint)value);
+			Tag tag = tag_store.Get ((uint)value);
 			if (is_parent) {
 				// we need to figure out where to insert it in the correct order
 				copy = InsertInOrder(dest, is_root, tag);
@@ -502,7 +502,7 @@ namespace FSpot {
 			GLib.Value value = new GLib.Value ();
 			Model.GetValue (iter, IdColumn, ref value);
 			uint tag_id = (uint) value;
-			Tag tag = tag_store.Get (tag_id) as Tag;
+			Tag tag = tag_store.Get (tag_id);
 
 			// Ignore if it hasn't changed
 			if (tag.Name == args.NewText)
diff --git a/src/Clients/MainApp/FSpot/TagStore.cs b/src/Clients/MainApp/FSpot/TagStore.cs
index 651250e..a5d8062 100644
--- a/src/Clients/MainApp/FSpot/TagStore.cs
+++ b/src/Clients/MainApp/FSpot/TagStore.cs
@@ -72,10 +72,11 @@ namespace FSpot {
 		{
 			if (t1.IsAncestorOf (t2))
 				return 1;
-			else if (t2.IsAncestorOf (t1))
+
+			if (t2.IsAncestorOf (t1))
 				return -1;
-			else
-				return 0;
+
+			return 0;
 		}
 	}
 	
@@ -175,7 +176,7 @@ namespace FSpot {
 				uint id = Convert.ToUInt32 (reader ["id"]);
 				uint category_id = Convert.ToUInt32 (reader ["category_id"]);
 	
-				Tag tag = Get (id) as Tag;
+				Tag tag = Get (id);
 				if (tag == null)
 					throw new Exception (String.Format ("Cannot find tag {0}", id));
 				if (category_id == 0)
@@ -192,14 +193,14 @@ namespace FSpot {
 			//Pass 3, set popularity
 			reader = Database.Query ("SELECT tag_id, COUNT (*) AS popularity FROM photo_tags GROUP BY tag_id");
 			while (reader.Read ()) {
-				Tag t = Get (Convert.ToUInt32 (reader ["tag_id"])) as Tag;
+				Tag t = Get (Convert.ToUInt32 (reader ["tag_id"]));
 				if (t != null)
 					t.Popularity = Convert.ToInt32 (reader ["popularity"]);
 			}
 			reader.Dispose ();
 	
 			if (FSpot.App.Instance.Database.Meta.HiddenTagId.Value != null)
-				Hidden = LookupInCache ((uint) FSpot.App.Instance.Database.Meta.HiddenTagId.ValueAsInt) as Tag;
+				Hidden = LookupInCache ((uint)FSpot.App.Instance.Database.Meta.HiddenTagId.ValueAsInt);
 		}
 	
 	
diff --git a/src/Clients/MainApp/FSpot/Term.cs b/src/Clients/MainApp/FSpot/Term.cs
index fccb46b..4a0a692 100644
--- a/src/Clients/MainApp/FSpot/Term.cs
+++ b/src/Clients/MainApp/FSpot/Term.cs
@@ -287,7 +287,7 @@ else
 			StringBuilder condition = new StringBuilder ("(");
 
 			for (int i = 0; i < SubTerms.Count; i++) {
-				Term term = SubTerms [i] as Term;
+				Term term = SubTerms [i];
 				condition.Append (term.SqlCondition ());
 
 				if (i != SubTerms.Count - 1)
@@ -318,7 +318,8 @@ else
 			if (AndTerm.Operators.Contains (op))
 				//Console.WriteLine ("AND!");
 				return new AndTerm (parent, after);
-			else if (OrTerm.Operators.Contains (op))
+
+			if (OrTerm.Operators.Contains (op))
 				//Console.WriteLine ("OR!");
 				return new OrTerm (parent, after);
 
diff --git a/src/Clients/MainApp/FSpot/ThumbnailCache.cs b/src/Clients/MainApp/FSpot/ThumbnailCache.cs
index 6291242..9a1ad1e 100644
--- a/src/Clients/MainApp/FSpot/ThumbnailCache.cs
+++ b/src/Clients/MainApp/FSpot/ThumbnailCache.cs
@@ -122,8 +122,8 @@ namespace FSpot
 	
 		public void Dispose ()
 		{
-			foreach (object item in pixbuf_mru) {
-				Thumbnail thumb = item as Thumbnail;
+			foreach (var item in pixbuf_mru) {
+				Thumbnail thumb = item;
 				pixbuf_hash.Remove (thumb.uri);
 				thumb.pixbuf.Dispose ();
 			}
@@ -134,8 +134,8 @@ namespace FSpot
 		~ThumbnailCache ()
 		{
 			Log.DebugFormat ("Finalizer called on {0}. Should be Disposed", GetType ());
-			foreach (object item in pixbuf_mru) {
-				Thumbnail thumb = item as Thumbnail;
+			foreach (var item in pixbuf_mru) {
+				Thumbnail thumb = item;
 				pixbuf_hash.Remove (thumb.uri);
 				thumb.pixbuf.Dispose ();
 			}
@@ -146,7 +146,7 @@ namespace FSpot
 		private void MaybeExpunge ()
 		{
 			while (pixbuf_mru.Count > max_count) {
-				Thumbnail thumbnail = pixbuf_mru [pixbuf_mru.Count - 1] as Thumbnail;
+				Thumbnail thumbnail = pixbuf_mru [pixbuf_mru.Count - 1];
 	
 				pixbuf_hash.Remove (thumbnail.uri);
 				pixbuf_mru.RemoveAt (pixbuf_mru.Count - 1);
diff --git a/src/Clients/MainApp/FSpot/TimeAdaptor.cs b/src/Clients/MainApp/FSpot/TimeAdaptor.cs
index f407fe8..177c5a8 100644
--- a/src/Clients/MainApp/FSpot/TimeAdaptor.cs
+++ b/src/Clients/MainApp/FSpot/TimeAdaptor.cs
@@ -98,8 +98,8 @@ namespace FSpot {
 		{
 			if (order_ascending)
 				return years [startyear + item/12][item % 12];
-			else
-				return years [endyear - item/12][11 - item % 12];
+
+			return years [endyear - item/12][11 - item % 12];
 		}
 
 		public DateTime DateFromIndex (int item)
diff --git a/src/Clients/MainApp/ImageLoaderThread.cs b/src/Clients/MainApp/ImageLoaderThread.cs
index 4668f6f..7372fb9 100644
--- a/src/Clients/MainApp/ImageLoaderThread.cs
+++ b/src/Clients/MainApp/ImageLoaderThread.cs
@@ -311,7 +311,7 @@ public class ImageLoaderThread
 
 					int pos = queue.Count - 1;
 
-					current_request = queue [pos] as RequestItem;
+					current_request = queue [pos];
 					queue.RemoveAt (pos);
 					requests_by_uri.Remove (current_request.Uri);
 				}
diff --git a/src/Clients/MainApp/MainApp.csproj b/src/Clients/MainApp/MainApp.csproj
index f4940e4..0ed1d37 100644
--- a/src/Clients/MainApp/MainApp.csproj
+++ b/src/Clients/MainApp/MainApp.csproj
@@ -97,7 +97,6 @@
     <Compile Include="FSpot.Imaging\InternalProcess.cs" />
     <Compile Include="FSpot.Imaging\IOChannel.cs" />
     <Compile Include="FSpot.Imaging\RafFile.cs" />
-    <Compile Include="FSpot.Imaging\Tests\ImageFileTests.cs" />
     <Compile Include="FSpot.Imaging\Tiff.cs" />
     <Compile Include="FSpot.Import\FileImportSource.cs" />
     <Compile Include="FSpot.Import\ImportController.cs" />
@@ -348,10 +347,11 @@
     </Reference>
     <Reference Include="gio-sharp, Version=2.14.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
       <Package>gtk-sharp-beans-2.0</Package>
+      <SpecificVersion>False</SpecificVersion>
     </Reference>
-    <Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+    <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
       <Private>False</Private>
-      <Package>glade-sharp-2.0</Package>
+      <Package>gtk-sharp-2.0</Package>
     </Reference>
   </ItemGroup>
   <ItemGroup>
diff --git a/src/Clients/MainApp/PhotoVersionCommands.cs b/src/Clients/MainApp/PhotoVersionCommands.cs
index b5861fb..514fcc3 100644
--- a/src/Clients/MainApp/PhotoVersionCommands.cs
+++ b/src/Clients/MainApp/PhotoVersionCommands.cs
@@ -48,10 +48,10 @@ public class PhotoVersionCommands
 	private class VersionNameRequest : BuilderDialog {
 		private Photo photo;
 
-		[GtkBeans.Builder.Object] private Button ok_button;
-		[GtkBeans.Builder.Object] private Entry version_name_entry;
-		[GtkBeans.Builder.Object] private Label prompt_label;
-		[GtkBeans.Builder.Object] private Label already_in_use_label;
+		[GtkBeans.Builder.Object] Button ok_button;
+		[GtkBeans.Builder.Object] Entry version_name_entry;
+		[GtkBeans.Builder.Object] Label prompt_label;
+		[GtkBeans.Builder.Object] Label already_in_use_label;
 
 		public enum RequestType {
 			Create,
diff --git a/src/Clients/MainApp/TagCommands.cs b/src/Clients/MainApp/TagCommands.cs
index 0b4c0ff..a19aa4e 100644
--- a/src/Clients/MainApp/TagCommands.cs
+++ b/src/Clients/MainApp/TagCommands.cs
@@ -56,12 +56,12 @@ public class TagCommands {
 		TagStore tag_store;
 
 
-		[GtkBeans.Builder.Object] private Button create_button;
-		[GtkBeans.Builder.Object] private Entry tag_name_entry;
-		[GtkBeans.Builder.Object] private Label prompt_label;
-		[GtkBeans.Builder.Object] private Label already_in_use_label;
-		[GtkBeans.Builder.Object] private ComboBox category_option_menu;
-		[GtkBeans.Builder.Object] private CheckButton auto_icon_checkbutton;
+		[GtkBeans.Builder.Object] Button create_button;
+		[GtkBeans.Builder.Object] Entry tag_name_entry;
+		[GtkBeans.Builder.Object] Label prompt_label;
+		[GtkBeans.Builder.Object] Label already_in_use_label;
+		[GtkBeans.Builder.Object] ComboBox category_option_menu;
+		[GtkBeans.Builder.Object] CheckButton auto_icon_checkbutton;
 
 		private List<Tag> categories;
 
@@ -204,7 +204,7 @@ public class TagCommands {
 					Category parent_category = Category;
 
 					if (type == TagType.Category)
-						new_tag = tag_store.CreateCategory (parent_category, tag_name_entry.Text, autoicon) as Tag;
+						new_tag = tag_store.CreateCategory (parent_category, tag_name_entry.Text, autoicon);
 					else
 						new_tag = tag_store.CreateTag (parent_category, tag_name_entry.Text, autoicon);
 				} catch (Exception ex) {
diff --git a/src/Extensions/Exporters/FSpot.Exporters.CD/FSpot.Exporters.CD.csproj b/src/Extensions/Exporters/FSpot.Exporters.CD/FSpot.Exporters.CD.csproj
index 5168e36..edf16f5 100644
--- a/src/Extensions/Exporters/FSpot.Exporters.CD/FSpot.Exporters.CD.csproj
+++ b/src/Extensions/Exporters/FSpot.Exporters.CD/FSpot.Exporters.CD.csproj
@@ -75,6 +75,7 @@
     </Reference>
     <Reference Include="gio-sharp, Version=2.14.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
       <Private>False</Private>
+      <Package>gtk-sharp-beans-2.0</Package>
     </Reference>
   </ItemGroup>
   <ItemGroup>
diff --git a/src/Extensions/Exporters/FSpot.Exporters.Facebook/FSpot.Exporters.Facebook.csproj b/src/Extensions/Exporters/FSpot.Exporters.Facebook/FSpot.Exporters.Facebook.csproj
index f46ee25..23cf3bb 100644
--- a/src/Extensions/Exporters/FSpot.Exporters.Facebook/FSpot.Exporters.Facebook.csproj
+++ b/src/Extensions/Exporters/FSpot.Exporters.Facebook/FSpot.Exporters.Facebook.csproj
@@ -104,6 +104,7 @@
     </Reference>
     <Reference Include="gio-sharp, Version=2.14.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
       <Private>False</Private>
+      <Package>gtk-sharp-beans-2.0</Package>
     </Reference>
   </ItemGroup>
   <ItemGroup>
diff --git a/src/Extensions/Exporters/FSpot.Exporters.Folder/FSpot.Exporters.Folder.csproj b/src/Extensions/Exporters/FSpot.Exporters.Folder/FSpot.Exporters.Folder.csproj
index 41152e4..0263851 100644
--- a/src/Extensions/Exporters/FSpot.Exporters.Folder/FSpot.Exporters.Folder.csproj
+++ b/src/Extensions/Exporters/FSpot.Exporters.Folder/FSpot.Exporters.Folder.csproj
@@ -113,6 +113,7 @@
     </Reference>
     <Reference Include="gio-sharp, Version=2.14.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
       <Private>False</Private>
+      <Package>gtk-sharp-beans-2.0</Package>
     </Reference>
   </ItemGroup>
   <ItemGroup>
diff --git a/src/Extensions/Exporters/FSpot.Exporters.Gallery/FSpot.Exporters.Gallery.csproj b/src/Extensions/Exporters/FSpot.Exporters.Gallery/FSpot.Exporters.Gallery.csproj
index 5088cdc..291a9b6 100644
--- a/src/Extensions/Exporters/FSpot.Exporters.Gallery/FSpot.Exporters.Gallery.csproj
+++ b/src/Extensions/Exporters/FSpot.Exporters.Gallery/FSpot.Exporters.Gallery.csproj
@@ -89,6 +89,7 @@
     </Reference>
     <Reference Include="gio-sharp, Version=2.14.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
       <Private>False</Private>
+      <Package>gtk-sharp-beans-2.0</Package>
     </Reference>
   </ItemGroup>
   <ItemGroup>
diff --git a/src/Extensions/Exporters/FSpot.Exporters.Tabblo/FSpot.Exporters.Tabblo.csproj b/src/Extensions/Exporters/FSpot.Exporters.Tabblo/FSpot.Exporters.Tabblo.csproj
index bafc2f4..373ad51 100644
--- a/src/Extensions/Exporters/FSpot.Exporters.Tabblo/FSpot.Exporters.Tabblo.csproj
+++ b/src/Extensions/Exporters/FSpot.Exporters.Tabblo/FSpot.Exporters.Tabblo.csproj
@@ -77,6 +77,7 @@
     </Reference>
     <Reference Include="gio-sharp, Version=2.14.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
       <Private>False</Private>
+      <Package>gtk-sharp-beans-2.0</Package>
     </Reference>
     <Reference Include="gtk-sharp-beans">
       <HintPath>..\..\..\..\external\gtk-sharp-beans.dll</HintPath>
diff --git a/src/Extensions/Exporters/FSpot.Exporters.Zip/FSpot.Exporters.Zip.csproj b/src/Extensions/Exporters/FSpot.Exporters.Zip/FSpot.Exporters.Zip.csproj
index c2d385e..a4b9c48 100644
--- a/src/Extensions/Exporters/FSpot.Exporters.Zip/FSpot.Exporters.Zip.csproj
+++ b/src/Extensions/Exporters/FSpot.Exporters.Zip/FSpot.Exporters.Zip.csproj
@@ -87,6 +87,7 @@
     <Reference Include="System" />
     <Reference Include="gio-sharp, Version=2.14.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
       <Private>False</Private>
+      <Package>gtk-sharp-beans-2.0</Package>
     </Reference>
     <Reference Include="gtk-sharp-beans">
       <HintPath>..\..\..\..\external\gtk-sharp-beans.dll</HintPath>
diff --git a/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/FSpot.Tools.ChangePhotoPath.csproj b/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/FSpot.Tools.ChangePhotoPath.csproj
index 11ce585..c9deb68 100644
--- a/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/FSpot.Tools.ChangePhotoPath.csproj
+++ b/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/FSpot.Tools.ChangePhotoPath.csproj
@@ -70,6 +70,7 @@
     </Reference>
     <Reference Include="gio-sharp, Version=2.14.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
       <Private>False</Private>
+      <Package>gtk-sharp-beans-2.0</Package>
     </Reference>
   </ItemGroup>
   <ItemGroup>
diff --git a/src/Extensions/Tools/FSpot.Tools.DevelopInUFraw/FSpot.Tools.DevelopInUFRaw.csproj b/src/Extensions/Tools/FSpot.Tools.DevelopInUFraw/FSpot.Tools.DevelopInUFRaw.csproj
index c4a03a7..46fe044 100644
--- a/src/Extensions/Tools/FSpot.Tools.DevelopInUFraw/FSpot.Tools.DevelopInUFRaw.csproj
+++ b/src/Extensions/Tools/FSpot.Tools.DevelopInUFraw/FSpot.Tools.DevelopInUFRaw.csproj
@@ -86,6 +86,7 @@
     <Reference Include="System" />
     <Reference Include="gio-sharp, Version=2.14.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
       <Private>False</Private>
+      <Package>gtk-sharp-beans-2.0</Package>
     </Reference>
     <Reference Include="gtk-sharp-beans">
       <HintPath>..\..\..\..\external\gtk-sharp-beans.dll</HintPath>
diff --git a/src/Extensions/Tools/FSpot.Tools.MergeDb/FSpot.Tools.MergeDb.csproj b/src/Extensions/Tools/FSpot.Tools.MergeDb/FSpot.Tools.MergeDb.csproj
index 2b8893b..467fade 100644
--- a/src/Extensions/Tools/FSpot.Tools.MergeDb/FSpot.Tools.MergeDb.csproj
+++ b/src/Extensions/Tools/FSpot.Tools.MergeDb/FSpot.Tools.MergeDb.csproj
@@ -105,6 +105,7 @@
     </Reference>
     <Reference Include="gio-sharp, Version=2.14.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
       <Private>False</Private>
+      <Package>gtk-sharp-beans-2.0</Package>
     </Reference>
   </ItemGroup>
   <ItemGroup>



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