banshee r4259 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui.DragDrop



Author: gburt
Date: Sun Jul 27 19:05:37 2008
New Revision: 4259
URL: http://svn.gnome.org/viewvc/banshee?rev=4259&view=rev

Log:
2008-07-27  Gabriel Burt  <gabriel burt gmail com>

	* src/Core/Banshee.ThickClient/Banshee.Gui.DragDrop/DragDropUtilities.cs:
	Change the SplitSelectionData method to use String.Split, and to remove
	empty items.


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.DragDrop/DragDropUtilities.cs

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.DragDrop/DragDropUtilities.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.DragDrop/DragDropUtilities.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.DragDrop/DragDropUtilities.cs	Sun Jul 27 19:05:37 2008
@@ -54,9 +54,10 @@
             return SplitSelectionData(SelectionDataToString(data));
         }
 
+        private static string [] newline = new string [] { "\r\n" };
         public static string [] SplitSelectionData(string data)
         {
-            return Regex.Split(data, "\r\n");
+            return data == null ? new string [0] : data.Split (newline, StringSplitOptions.RemoveEmptyEntries);
         }
         
         public static TreePath [] SelectionDataToTreePaths(Gtk.SelectionData data)



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