[f-spot] Remove obsolete DragDropTargets and warnings about hiding base methods



commit 4c061b987f19f5c2e183a91d5f9cdee3c65853c3
Author: Tim Howard <timothy howard gmail com>
Date:   Fri Nov 26 23:01:19 2010 -0500

    Remove obsolete DragDropTargets and warnings about hiding base methods
    
    https://bugzilla.gnome.org/show_bug.cgi?id=635905

 .../MainApp/FSpot.UI.Dialog/EditTagIconDialog.cs   |    2 +-
 .../MainApp/FSpot.UI.Dialog/TagSelectionDialog.cs  |    4 +-
 .../MainApp/FSpot.Widgets/FolderTreeView.cs        |   23 ++++----
 .../MainApp/FSpot.Widgets/MetadataDisplay.cs       |    2 +-
 .../MainApp/FSpot.Widgets/PhotoImageView.cs        |    2 +-
 src/Clients/MainApp/FSpot/DragDropTargets.cs       |   10 +---
 src/Clients/MainApp/FSpot/MainWindow.cs            |   56 ++++++++++---------
 src/Clients/MainApp/FSpot/PhotoView.cs             |    2 +-
 src/Clients/MainApp/FSpot/SingleView.cs            |   17 +++---
 src/Clients/MainApp/FSpot/TagSelectionWidget.cs    |   25 ++++-----
 src/Clients/MainApp/FSpot/main.cs                  |    2 +-
 src/Clients/MainApp/MainApp.csproj                 |    6 ++-
 src/Core/FSpot.Utils/FSpot.Utils.csproj            |   17 +++++--
 .../FSpot.Utils/TargetListExtensionMethods.cs      |   15 +++++
 src/Core/FSpot.Utils/Makefile.am                   |    1 +
 15 files changed, 102 insertions(+), 82 deletions(-)
---
diff --git a/src/Clients/MainApp/FSpot.UI.Dialog/EditTagIconDialog.cs b/src/Clients/MainApp/FSpot.UI.Dialog/EditTagIconDialog.cs
index 90059bb..ba6200b 100644
--- a/src/Clients/MainApp/FSpot.UI.Dialog/EditTagIconDialog.cs
+++ b/src/Clients/MainApp/FSpot.UI.Dialog/EditTagIconDialog.cs
@@ -132,7 +132,7 @@ namespace FSpot.UI.Dialog
 			fill_delay.Start ();
 		}
 
-		public BrowsablePointer Item {
+		public new BrowsablePointer Item {
 			get { return image_view.Item; }
 		}
 
diff --git a/src/Clients/MainApp/FSpot.UI.Dialog/TagSelectionDialog.cs b/src/Clients/MainApp/FSpot.UI.Dialog/TagSelectionDialog.cs
index 36cde1e..cae51bf 100644
--- a/src/Clients/MainApp/FSpot.UI.Dialog/TagSelectionDialog.cs
+++ b/src/Clients/MainApp/FSpot.UI.Dialog/TagSelectionDialog.cs
@@ -50,7 +50,7 @@ namespace FSpot.UI.Dialog {
 			tag_selection_widget.Show ();
 		}
 
-		public Tag[] Run ()
+		public new Tag[] Run ()
 		{
 			int response = base.Run ();
 			if ((ResponseType) response == ResponseType.Ok)
@@ -59,7 +59,7 @@ namespace FSpot.UI.Dialog {
 			return null;
 		}
 
-		public void Hide ()
+		public new void Hide ()
 		{
 			base.Hide ();
 		}
diff --git a/src/Clients/MainApp/FSpot.Widgets/FolderTreeView.cs b/src/Clients/MainApp/FSpot.Widgets/FolderTreeView.cs
index 905b063..c760a5a 100644
--- a/src/Clients/MainApp/FSpot.Widgets/FolderTreeView.cs
+++ b/src/Clients/MainApp/FSpot.Widgets/FolderTreeView.cs
@@ -49,6 +49,15 @@ namespace FSpot.Widgets
 
 		protected FolderTreeView (IntPtr raw) : base (raw) {}
 
+        private static TargetList folderTreeSourceTargetList = new TargetList();
+
+        static FolderTreeView()
+        {
+            folderTreeSourceTargetList.AddTextTargets((uint)DragDropTargets.TargetType.PlainText);
+            folderTreeSourceTargetList.AddUriTargets((uint)DragDropTargets.TargetType.UriList);
+            folderTreeSourceTargetList.AddTargetEntry(DragDropTargets.UriQueryEntry);
+        }
+
 		public FolderTreeView () : this (new FolderTreeModel ())
 		{
 		}
@@ -72,7 +81,7 @@ namespace FSpot.Widgets
 			AppendColumn (column);
 
 			Gtk.Drag.SourceSet (this, Gdk.ModifierType.Button1Mask | Gdk.ModifierType.Button3Mask,
-				    folder_tree_source_target_table, Gdk.DragAction.Copy | Gdk.DragAction.Move);
+				    (TargetEntry[])folderTreeSourceTargetList, Gdk.DragAction.Copy | Gdk.DragAction.Move);
 		}
 
 		public UriList SelectedUris {
@@ -155,19 +164,11 @@ namespace FSpot.Widgets
 			}
 		}
 
-		private static TargetEntry [] folder_tree_source_target_table =
-			new TargetEntry [] {
-				DragDropTargets.UriQueryEntry,
-				DragDropTargets.UriListEntry,
-				DragDropTargets.PlainTextEntry
-		};
-
-
 		protected override void OnDragDataGet (Gdk.DragContext context, Gtk.SelectionData selection_data, uint info, uint time_)
 		{
 			if (info == DragDropTargets.UriQueryEntry.Info
-			    || info == DragDropTargets.UriListEntry.Info
-			    || info == DragDropTargets.PlainTextEntry.Info) {
+			    || info == (uint)DragDropTargets.TargetType.UriList
+			    || info == (uint)DragDropTargets.TargetType.PlainText) {
 
 				selection_data.SetUriListData (SelectedUris, context.Targets[0]);
 				return;
diff --git a/src/Clients/MainApp/FSpot.Widgets/MetadataDisplay.cs b/src/Clients/MainApp/FSpot.Widgets/MetadataDisplay.cs
index cec7bd4..2201dbd 100644
--- a/src/Clients/MainApp/FSpot.Widgets/MetadataDisplay.cs
+++ b/src/Clients/MainApp/FSpot.Widgets/MetadataDisplay.cs
@@ -173,7 +173,7 @@ namespace FSpot.Widgets {
             }
 		}
 
-        private bool Visible {
+        private new bool Visible {
             get {
                 return (Page.Sidebar as Sidebar).IsActive (Page);
             }
diff --git a/src/Clients/MainApp/FSpot.Widgets/PhotoImageView.cs b/src/Clients/MainApp/FSpot.Widgets/PhotoImageView.cs
index eac9421..e31eabc 100644
--- a/src/Clients/MainApp/FSpot.Widgets/PhotoImageView.cs
+++ b/src/Clients/MainApp/FSpot.Widgets/PhotoImageView.cs
@@ -61,7 +61,7 @@ namespace FSpot.Widgets {
 			item.Changed += HandlePhotoItemChanged;
 		}
 
-		public BrowsablePointer Item {
+		public new BrowsablePointer Item {
 			get { return item; }
 		}
 
diff --git a/src/Clients/MainApp/FSpot/DragDropTargets.cs b/src/Clients/MainApp/FSpot/DragDropTargets.cs
index 01b0b62..ab5e034 100644
--- a/src/Clients/MainApp/FSpot/DragDropTargets.cs
+++ b/src/Clients/MainApp/FSpot/DragDropTargets.cs
@@ -38,7 +38,7 @@ namespace FSpot
 {
 	public static class DragDropTargets
 	{
-		enum TargetType : uint {
+		public enum TargetType : uint {
 			PlainText = 0,
 			UriList,
 			TagList,
@@ -49,17 +49,9 @@ namespace FSpot
 			CopyFiles,
 		};
 
-		[Obsolete ("better use gtk_target_list_add_text_targets")]
-		public static readonly TargetEntry PlainTextEntry =
-			new TargetEntry ("text/plain", 0, (uint)TargetType.PhotoList);
-
 		public static readonly TargetEntry PhotoListEntry =
 			new TargetEntry ("application/x-fspot-photos", 0, (uint)TargetType.PhotoList);
 
-		[Obsolete ("Use gtk_target_list_add_uri_target")]
-		public static readonly TargetEntry UriListEntry =
-			new TargetEntry ("text/uri-list", 0, (uint)TargetType.UriList);
-
 		public static readonly TargetEntry TagListEntry =
 			new TargetEntry ("application/x-fspot-tags", 0, (uint)TargetType.TagList);
 
diff --git a/src/Clients/MainApp/FSpot/MainWindow.cs b/src/Clients/MainApp/FSpot/MainWindow.cs
index 3cef19a..ac8c831 100644
--- a/src/Clients/MainApp/FSpot/MainWindow.cs
+++ b/src/Clients/MainApp/FSpot/MainWindow.cs
@@ -199,21 +199,6 @@ namespace FSpot
 			set { Tag.TagIconSize = (Tag.IconSize) value; }
 		}
 
-		private static TargetEntry [] icon_source_target_table =
-			new TargetEntry [] {
-				DragDropTargets.PhotoListEntry,
-				DragDropTargets.TagQueryEntry,
-				DragDropTargets.UriListEntry,
-				DragDropTargets.RootWindowEntry
-		};
-
-		private static TargetEntry [] icon_dest_target_table =
-			new TargetEntry [] {
-				DragDropTargets.PhotoListEntry,
-				DragDropTargets.TagListEntry,
-				DragDropTargets.UriListEntry
-		};
-
 		private static TargetEntry [] tag_target_table =
 			new TargetEntry [] {
 				DragDropTargets.TagListEntry
@@ -226,6 +211,21 @@ namespace FSpot
 		public MainSelection Selection { get; private set; }
 		public InfoBox InfoBox { get; private set; }
 
+        private static TargetList iconSourceTargetList = new TargetList();
+        private static TargetList iconDestTargetList = new TargetList();
+
+        static MainWindow()
+        {
+            iconSourceTargetList.AddTargetEntry(DragDropTargets.PhotoListEntry);
+            iconSourceTargetList.AddTargetEntry(DragDropTargets.TagQueryEntry);
+            iconSourceTargetList.AddUriTargets((uint)DragDropTargets.TargetType.UriList);
+            iconSourceTargetList.AddTargetEntry(DragDropTargets.RootWindowEntry);
+
+            iconDestTargetList.AddTargetEntry(DragDropTargets.PhotoListEntry);
+            iconDestTargetList.AddTargetEntry(DragDropTargets.TagListEntry);
+            iconDestTargetList.AddUriTargets((uint)DragDropTargets.TargetType.UriList);
+        }
+
 		//
 		// Constructor
 		//
@@ -474,7 +474,7 @@ namespace FSpot
 			pmenu.TagSelected += HandleRemoveTagMenuSelected;
 			(uimanager.GetWidget("/ui/menubar1/edit2/remove_tag") as MenuItem).Submenu = pmenu;
 
-			Gtk.Drag.DestSet (icon_view, DestDefaults.All, icon_dest_target_table,
+			Gtk.Drag.DestSet (icon_view, DestDefaults.All, (TargetEntry[])iconDestTargetList,
 					  DragAction.Copy | DragAction.Move);
 
 			icon_view.DragDataReceived += HandleIconViewDragDataReceived;
@@ -550,7 +550,6 @@ namespace FSpot
 
 			(uimanager.GetWidget("/ui/menubar1/file1/close1") as MenuItem).Hide ();
 
-
 			Banshee.Kernel.Scheduler.Resume ();
 		}
 
@@ -1048,7 +1047,7 @@ namespace FSpot
 
 		public void HandleIconViewStartDrag (object sender, StartDragArgs args)
 		{
-			Gtk.Drag.Begin (icon_view, new TargetList (icon_source_target_table),
+			Gtk.Drag.Begin (icon_view, iconSourceTargetList,
 					DragAction.Copy | DragAction.Move, (int) args.Button, args.Event);
 		}
 
@@ -1106,7 +1105,7 @@ namespace FSpot
 
 		void HandleIconViewDragDataGet (object sender, DragDataGetArgs args)
 		{
-			if (args.Info == DragDropTargets.UriListEntry.Info) {
+			if (args.Info == (uint)DragDropTargets.TargetType.UriList) {
                 var uris = from p in SelectedPhotos () select p.DefaultVersion.Uri;
 				args.SelectionData.SetUriListData (new UriList (uris), args.Context.Targets[0]);
 				return;
@@ -1209,7 +1208,7 @@ namespace FSpot
 				return;
 			}
 
-			if (args.Info == DragDropTargets.UriListEntry.Info) {
+			if (args.Info == (uint)DragDropTargets.TargetType.UriList) {
 
 				/*
 				 * If the drop is coming from inside f-spot then we don't want to import
@@ -2312,10 +2311,13 @@ namespace FSpot
 				return;
 			}
 
-            var target_entries = new TargetEntry[] {
-                DragDropTargets.PlainTextEntry,
-                DragDropTargets.UriListEntry,
-                DragDropTargets.CopyFilesEntry};
+            TargetList targetList = new TargetList();
+            targetList.AddTextTargets((uint)DragDropTargets.TargetType.PlainText);
+            targetList.AddUriTargets((uint)DragDropTargets.TargetType.UriList);
+            targetList.Add(
+                           DragDropTargets.CopyFilesEntry.Target,
+                           (uint)DragDropTargets.CopyFilesEntry.Flags,
+                           (uint)DragDropTargets.CopyFilesEntry.Info);
 
             // use eager evaluation, because we want to copy the photos which are currently selected ...
             var uris = new UriList (from p in SelectedPhotos () select p.DefaultVersion.Uri);
@@ -2324,14 +2326,14 @@ namespace FSpot
                                       select p.DefaultVersion.Uri.LocalPath).ToArray ()
                                      );
 
-            clipboard.SetWithData (target_entries, delegate (Clipboard clip, SelectionData data, uint info) {
+            clipboard.SetWithData ((TargetEntry[])targetList, delegate (Clipboard clip, SelectionData data, uint info) {
 
-                if (info == DragDropTargets.PlainTextEntry.Info) {
+                if (info == (uint)DragDropTargets.TargetType.PlainText) {
                     data.Text = paths;
                     return;
                 }
 
-                if (info == DragDropTargets.UriListEntry.Info) {
+                if (info == (uint)DragDropTargets.TargetType.UriList) {
                      data.SetUriListData (uris);
                     return;
                 }
diff --git a/src/Clients/MainApp/FSpot/PhotoView.cs b/src/Clients/MainApp/FSpot/PhotoView.cs
index 38a5619..28c2f75 100644
--- a/src/Clients/MainApp/FSpot/PhotoView.cs
+++ b/src/Clients/MainApp/FSpot/PhotoView.cs
@@ -84,7 +84,7 @@ namespace FSpot {
 			get { return photo_view; }
 		}
 
-		public BrowsablePointer Item {
+		public new BrowsablePointer Item {
 			get { return photo_view.Item; }
 		}
 
diff --git a/src/Clients/MainApp/FSpot/SingleView.cs b/src/Clients/MainApp/FSpot/SingleView.cs
index 7185fd7..7595d19 100644
--- a/src/Clients/MainApp/FSpot/SingleView.cs
+++ b/src/Clients/MainApp/FSpot/SingleView.cs
@@ -126,15 +126,14 @@ namespace FSpot {
 
 			collection = new UriCollection (uris);
 
-			TargetEntry [] dest_table = {
-				FSpot.DragDropTargets.UriListEntry,
-				FSpot.DragDropTargets.PlainTextEntry
-			};
+            TargetList targetList = new TargetList();
+            targetList.AddTextTargets((uint)DragDropTargets.TargetType.PlainText);
+            targetList.AddUriTargets((uint)DragDropTargets.TargetType.UriList);
 
 			directory_view = new SelectionCollectionGridView (collection);
 			directory_view.Selection.Changed += HandleSelectionChanged;
 			directory_view.DragDataReceived += HandleDragDataReceived;
-			Gtk.Drag.DestSet (directory_view, DestDefaults.All, dest_table,
+			Gtk.Drag.DestSet (directory_view, DestDefaults.All, (TargetEntry[])targetList,
 					DragAction.Copy | DragAction.Move);
 			directory_view.DisplayTags = false;
 			directory_view.DisplayDates = false;
@@ -164,7 +163,7 @@ namespace FSpot {
 			image_view.Item.Changed += HandleItemChanged;
 			image_view.ButtonPressEvent += HandleImageViewButtonPressEvent;
 			image_view.DragDataReceived += HandleDragDataReceived;
-			Gtk.Drag.DestSet (image_view, DestDefaults.All, dest_table,
+			Gtk.Drag.DestSet (image_view, DestDefaults.All, (TargetEntry[])targetList,
 					DragAction.Copy | DragAction.Move);
 			image_scrolled.Add (image_view);
 
@@ -472,8 +471,8 @@ namespace FSpot {
 
 		void HandleDragDataReceived (object sender, DragDataReceivedArgs args)
 		{
-			if (args.Info == FSpot.DragDropTargets.UriListEntry.Info
-			    || args.Info == FSpot.DragDropTargets.PlainTextEntry.Info) {
+			if (args.Info == (uint)FSpot.DragDropTargets.TargetType.UriList
+			    || args.Info == (uint)FSpot.DragDropTargets.TargetType.PlainText) {
 
 				/*
 				 * If the drop is coming from inside f-spot then we don't want to import
@@ -648,7 +647,7 @@ namespace FSpot {
 			}
 
 			static PreferenceDialog prefs;
-			public static void Show ()
+			public static new void Show ()
 			{
 				if (prefs == null)
 					prefs = new PreferenceDialog ();
diff --git a/src/Clients/MainApp/FSpot/TagSelectionWidget.cs b/src/Clients/MainApp/FSpot/TagSelectionWidget.cs
index f1ff649..cc0e445 100644
--- a/src/Clients/MainApp/FSpot/TagSelectionWidget.cs
+++ b/src/Clients/MainApp/FSpot/TagSelectionWidget.cs
@@ -535,18 +535,17 @@ namespace FSpot {
 			return;
 		}
 
-		private static TargetEntry [] tag_source_target_table =
-			new TargetEntry [] {
-				DragDropTargets.TagListEntry
-			};
+        private static TargetList tagSourceTargetList = new TargetList();
+        private static TargetList tagDestTargetList = new TargetList();
 
-		private static TargetEntry [] tag_dest_target_table =
-			new TargetEntry [] {
-				DragDropTargets.PhotoListEntry,
-				DragDropTargets.UriListEntry,
-				DragDropTargets.TagListEntry
-			};
+        static TagSelectionWidget()
+        {
+            tagSourceTargetList.AddTargetEntry(DragDropTargets.TagListEntry);
 
+            tagDestTargetList.AddTargetEntry(DragDropTargets.PhotoListEntry);
+            tagDestTargetList.AddUriTargets((uint)DragDropTargets.TargetType.UriList);
+            tagDestTargetList.AddTargetEntry(DragDropTargets.TagListEntry);
+        }
 
 		CellRendererPixbuf pix_render;
 		TreeViewColumn complete_column;
@@ -604,7 +603,7 @@ namespace FSpot {
 
 			Gtk.Drag.SourceSet (this,
 			           Gdk.ModifierType.Button1Mask | Gdk.ModifierType.Button3Mask,
-			           tag_source_target_table,
+			           (TargetEntry[])tagSourceTargetList,
 			           DragAction.Copy | DragAction.Move);
 
 			DragDataReceived += HandleDragDataReceived;
@@ -612,7 +611,7 @@ namespace FSpot {
 
 			Gtk.Drag.DestSet (this,
 			                  DestDefaults.All,
-			                  tag_dest_target_table,
+			                  (TargetEntry[])tagDestTargetList,
 			                  DragAction.Copy | DragAction.Move);
 		}
 
@@ -726,7 +725,7 @@ namespace FSpot {
 				return;
 			}
 
-			if (args.Info == DragDropTargets.UriListEntry.Info) {
+			if (args.Info == (uint)DragDropTargets.TargetType.UriList) {
 				UriList list = args.SelectionData.GetUriListData ();
 
 				database.BeginTransaction ();
diff --git a/src/Clients/MainApp/FSpot/main.cs b/src/Clients/MainApp/FSpot/main.cs
index 231febf..64b44db 100644
--- a/src/Clients/MainApp/FSpot/main.cs
+++ b/src/Clients/MainApp/FSpot/main.cs
@@ -315,7 +315,7 @@ namespace FSpot
 			uint timer = Log.InformationTimerStart ("Initializing Mono.Addins");
 			try {
 				UpdatePlugins ();
-			} catch (Exception e) {
+			} catch (Exception) {
 				Log.Debug ("Failed to initialize plugins, will remove addin-db and try again.");
 				ResetPluginDb ();
 			}
diff --git a/src/Clients/MainApp/MainApp.csproj b/src/Clients/MainApp/MainApp.csproj
index 58a3fa4..c16e64a 100644
--- a/src/Clients/MainApp/MainApp.csproj
+++ b/src/Clients/MainApp/MainApp.csproj
@@ -20,8 +20,8 @@
     <DefineConstants>DEBUG ENABLE_TESTS</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <ConsolePause>false</ConsolePause>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <Externalconsole>true</Externalconsole>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>none</DebugType>
@@ -329,7 +329,9 @@
     <Reference Include="Mono.Addins.Gui, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
       <Package>mono-addins-gui</Package>
     </Reference>
-    <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
+    <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+      <Package>mono-nunit</Package>
+    </Reference>
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\Core\FSpot.Core\FSpot.Core.csproj">
diff --git a/src/Core/FSpot.Utils/FSpot.Utils.csproj b/src/Core/FSpot.Utils/FSpot.Utils.csproj
index a600736..7a72206 100644
--- a/src/Core/FSpot.Utils/FSpot.Utils.csproj
+++ b/src/Core/FSpot.Utils/FSpot.Utils.csproj
@@ -57,6 +57,7 @@
     <Compile Include="FSpot.Utils\Vector.cs" />
     <Compile Include="FSpot.Utils\MemorySurface.cs" />
     <Compile Include="FSpot.Utils\DelayedOperation.cs" />
+    <Compile Include="FSpot.Utils\TargetListExtensionMethods.cs" />
   </ItemGroup>
   <ProjectExtensions>
     <MonoDevelop>
@@ -84,17 +85,25 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+      <Package>glib-sharp-2.0</Package>
+    </Reference>
     <Reference Include="gio-sharp, Version=2.14.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\..\lib\gio-sharp\gio\gio-sharp.dll</HintPath>
     </Reference>
     <Reference Include="Mono.Cairo" />
-    <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+      <Package>gtk-sharp-2.0</Package>
+    </Reference>
     <Reference Include="System.Core" />
-    <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+      <Package>gtk-sharp-2.0</Package>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="Mono.Posix" />
-    <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
+    <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+      <Package>mono-nunit</Package>
+    </Reference>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/src/Core/FSpot.Utils/FSpot.Utils/TargetListExtensionMethods.cs b/src/Core/FSpot.Utils/FSpot.Utils/TargetListExtensionMethods.cs
new file mode 100644
index 0000000..57a110d
--- /dev/null
+++ b/src/Core/FSpot.Utils/FSpot.Utils/TargetListExtensionMethods.cs
@@ -0,0 +1,15 @@
+using System;
+
+using Gtk;
+
+namespace FSpot.Utils
+{
+    public static class TargetListExtensionMethods
+    {
+        public static void AddTargetEntry(this TargetList targetList, TargetEntry entry)
+        {
+            targetList.Add(entry.Target, (uint)entry.Flags, (uint)entry.Info);
+        }
+    }
+}
+
diff --git a/src/Core/FSpot.Utils/Makefile.am b/src/Core/FSpot.Utils/Makefile.am
index db4f4fa..6f17140 100644
--- a/src/Core/FSpot.Utils/Makefile.am
+++ b/src/Core/FSpot.Utils/Makefile.am
@@ -17,6 +17,7 @@ SOURCES =  \
 	FSpot.Utils/RecursiveFileEnumerator.cs \
 	FSpot.Utils/SafeUriExtensions.cs \
 	FSpot.Utils/SidecarXmpExtensions.cs \
+	FSpot.Utils/TargetListExtensionMethods.cs \
 	FSpot.Utils/Tests/GIOTagLibFileAbstractionTests.cs \
 	FSpot.Utils/Tests/ImageTestHelper.cs \
 	FSpot.Utils/Tests/MetadataTest.cs \



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