Hello community, here is the log from the commit of package banshee checked in at Sun May 21 01:38:10 CEST 2006. -------- --- GNOME/banshee/banshee.changes 2006-05-17 18:44:55.000000000 +0200 +++ banshee/banshee.changes 2006-05-19 22:59:36.000000000 +0200 @@ -1,0 +2,10 @@ +Fri May 19 21:00:11 CEST 2006 - jpr@suse.de + +-Improve SQL queries to improve performance (#168653) +-Escape commas correclty (#147144) +-Scrollbar does not show (#174406) +-Column re-ordering remembered incorrectly (#120666) +-Fix crash on CD burn for ogg (#175378) +-Move the xing plugin to the banshe-engine-helix package + +------------------------------------------------------------------- Old: ---- banshee-sled-cuml-10.diff New: ---- banshee-sled-cuml-11.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ banshee.spec ++++++ --- /var/tmp/diff_new_pack.4CnOQw/_old 2006-05-21 01:37:58.000000000 +0200 +++ /var/tmp/diff_new_pack.4CnOQw/_new 2006-05-21 01:37:58.000000000 +0200 @@ -23,7 +23,7 @@ PreReq: filesystem gconf2 Requires: mono-core Version: 0.10.9 -Release: 27 +Release: 28 Source0: banshee-%{version}.tar.gz Source1: gstreamer-xing-0.10.0.tar.gz Source2: banshee-po.tar.bz2 @@ -32,7 +32,7 @@ Patch2: %{name}-configure.patch Patch3: %{name}-transparent-trayicon.patch Patch5: %{name}-fix-icons.patch -Patch6: %{name}-sled-cuml-10.diff +Patch6: %{name}-sled-cuml-11.diff Patch7: %{name}-networkmanager-reconnect.diff Patch8: %{name}-desktop-ogg-support.patch Patch9: %{name}-i18n.patch @@ -256,13 +256,13 @@ %defattr(-,root,root) %dir %{prefix}/%{_lib}/banshee/Banshee.MediaEngine/Gstreamer %{prefix}/%{_lib}/banshee/Banshee.MediaEngine/Gstreamer/gst-player.dll* -%{gstreamerprefix}/%{_lib}/gstreamer-%{gst_branch}/*.so -%{gstreamerprefix}/%{_lib}/gstreamer-%{gst_branch}/*.*a %files engine-helix %defattr(-,root,root) %dir %{prefix}/%{_lib}/banshee/Banshee.MediaEngine/Helix %{prefix}/%{_lib}/banshee/Banshee.MediaEngine/Helix/*.dll* +%{gstreamerprefix}/%{_lib}/gstreamer-%{gst_branch}/*.so +%{gstreamerprefix}/%{_lib}/gstreamer-%{gst_branch}/*.*a %files plugins-default %defattr(-,root,root) @@ -283,6 +283,13 @@ %{prefix}/%{_lib}/banshee/Banshee.Plugins/Daap.dll* %changelog -n banshee +* Fri May 19 2006 - jpr@suse.de +-Improve SQL queries to improve performance (#168653) +-Escape commas correclty (#147144) +-Scrollbar does not show (#174406) +-Column re-ordering remembered incorrectly (#120666) +-Fix crash on CD burn for ogg (#175378) +-Move the xing plugin to the banshe-engine-helix package * Wed May 17 2006 - gekker@suse.de - Add translations for de and hu (#173507) * Thu May 11 2006 - rml@suse.de ++++++ banshee-sled-cuml-10.diff -> banshee-sled-cuml-11.diff ++++++ --- GNOME/banshee/banshee-sled-cuml-10.diff 2006-05-07 18:54:28.000000000 +0200 +++ banshee/banshee-sled-cuml-11.diff 2006-05-19 22:36:03.000000000 +0200 @@ -689,14 +689,40 @@ } public static string [] SplitSelectionData(Gtk.SelectionData data) +Index: src/Main.cs +=================================================================== +RCS file: /cvs/gnome/banshee/src/Main.cs,v +retrieving revision 1.29 +retrieving revision 1.29.2.1 +diff -u -r1.29 -r1.29.2.1 +--- src/Main.cs 13 Feb 2006 22:18:07 -0000 1.29 ++++ src/Main.cs 19 May 2006 20:34:43 -0000 1.29.2.1 +@@ -56,6 +56,9 @@ + #endif + } + ++ [System.Runtime.InteropServices.DllImport("libdbus-glib-1")] ++ private static extern void dbus_g_thread_init(); ++ + private static void Startup(string [] args) + { + try { +@@ -63,6 +66,7 @@ + } catch {} + + Gtk.Application.Init(); ++ dbus_g_thread_init(); + + Globals.ArgumentQueue = new ArgumentQueue(new ArgumentLayout [] { + new ArgumentLayout("enqueue <files>","Files to enqueue, must be last argument specified"), Index: src/PlayerInterface.cs =================================================================== RCS file: /cvs/gnome/banshee/src/PlayerInterface.cs,v retrieving revision 1.167 -retrieving revision 1.167.2.4 -diff -u -r1.167 -r1.167.2.4 +retrieving revision 1.167.2.5 +diff -u -r1.167 -r1.167.2.5 --- src/PlayerInterface.cs 20 Mar 2006 09:30:47 -0000 1.167 -+++ src/PlayerInterface.cs 1 May 2006 16:33:17 -0000 1.167.2.4 ++++ src/PlayerInterface.cs 16 May 2006 17:08:41 -0000 1.167.2.5 @@ -385,6 +385,8 @@ sourceViewDestEntries, DragAction.Copy | DragAction.Move); @@ -706,7 +732,15 @@ // Playlist View playlistModel = new PlaylistModel(); playlistView = new PlaylistView(playlistModel); -@@ -452,7 +454,6 @@ +@@ -402,6 +404,7 @@ + playlistView.DragDataGet += OnPlaylistViewDragDataGet; + playlistView.DragDrop += OnPlaylistViewDragDrop; + playlistView.Selection.Changed += OnPlaylistViewSelectionChanged; ++ playlistView.Vadjustment.Changed += OnPlaylistViewVadjustmentChanged; + + playlistView.EnableModelDragSource( + Gdk.ModifierType.Button1Mask | Gdk.ModifierType.Button3Mask, +@@ -452,7 +455,6 @@ SetTip(previous_button, Catalog.GetString("Play previous song")); SetTip(playpause_button, Catalog.GetString("Play/pause current song")); SetTip(next_button, Catalog.GetString("Play next song")); @@ -714,7 +748,7 @@ SetTip(dapDiskUsageBar, Catalog.GetString("Device disk usage")); SetTip(sync_dap_button, Catalog.GetString("Synchronize music library to device")); SetTip(volumeButton, Catalog.GetString("Adjust volume")); -@@ -867,22 +868,24 @@ +@@ -867,22 +869,24 @@ private void OnPlayerEngineTick() { @@ -746,7 +780,23 @@ PlayerEngineCore.CurrentTrack.IncrementPlayCount(); incrementedCurrentSongPlayCount = true; playlistView.QueueDraw(); -@@ -1320,13 +1323,15 @@ +@@ -919,6 +923,15 @@ + !(source is AudioCdSource || source is DapSource); + } + ++ private void OnPlaylistViewVadjustmentChanged(object o, EventArgs args) ++ { ++ double max_offset = playlistView.Vadjustment.Upper - playlistView.Vadjustment.PageSize; ++ ++ if(playlistView.Vadjustment.Value > max_offset) { ++ playlistView.Vadjustment.Value = max_offset; ++ } ++ } ++ + private void OnSourceManagerActiveSourceChanged(SourceEventArgs args) + { + ThreadAssist.ProxyToMain(HandleSourceChanged); +@@ -1320,13 +1333,15 @@ return; } @@ -768,7 +818,7 @@ } } -@@ -1814,7 +1819,7 @@ +@@ -1814,7 +1829,7 @@ for(i = 0; i < iters.Length; i++) { TrackInfo track = playlistModel.IterTrackInfo(iters[i]); SourceManager.ActiveSource.RemoveTrack(track); @@ -777,7 +827,7 @@ if(deleteFromFileSystem) { DeleteSong(track); -@@ -1906,8 +1911,22 @@ +@@ -1906,8 +1921,22 @@ if(playlistView.Selection.CountSelectedRows() <= 0) { return; } @@ -850,11 +900,38 @@ =================================================================== RCS file: /cvs/gnome/banshee/src/PlaylistView.cs,v retrieving revision 1.45 -retrieving revision 1.45.2.1 -diff -u -r1.45 -r1.45.2.1 +retrieving revision 1.45.2.2 +diff -u -r1.45 -r1.45.2.2 --- src/PlaylistView.cs 20 Mar 2006 08:38:38 -0000 1.45 -+++ src/PlaylistView.cs 5 Apr 2006 20:26:22 -0000 1.45.2.1 -@@ -367,7 +367,14 @@ ++++ src/PlaylistView.cs 19 May 2006 18:24:23 -0000 1.45.2.2 +@@ -77,6 +77,14 @@ + public PlaylistColumn PlaysColumn; + public PlaylistColumn LastPlayedColumn; + ++ private class ColumnSorter : IComparer ++ { ++ public int Compare(object a, object b) ++ { ++ return (a as PlaylistColumn).Order.CompareTo((b as PlaylistColumn).Order); ++ } ++ } ++ + public PlaylistView(PlaylistModel model) + { + // set up columns +@@ -121,8 +129,10 @@ + 8, (int)ColumnId.LastPlayed); + columns.Add(LastPlayedColumn); + ++ columns.Sort(new ColumnSorter()); ++ + foreach(PlaylistColumn plcol in columns) { +- InsertColumn(plcol.Column, plcol.Order); ++ AppendColumn(plcol.Column); + } + + // FIXME: would be nice to have these as PlaylistColumns too... +@@ -367,7 +377,14 @@ } if(ti != null) { @@ -1025,6 +1102,43 @@ } } } +Index: src/Banshee.Base/Database.cs +=================================================================== +RCS file: /cvs/gnome/banshee/src/Banshee.Base/Database.cs,v +retrieving revision 1.6 +retrieving revision 1.6.2.1 +diff -u -r1.6 -r1.6.2.1 +--- src/Banshee.Base/Database.cs 13 Feb 2006 22:18:07 -0000 1.6 ++++ src/Banshee.Base/Database.cs 19 May 2006 18:24:23 -0000 1.6.2.1 +@@ -1,4 +1,3 @@ +- + /*************************************************************************** + * Database.cs + * +@@ -94,7 +93,8 @@ + CREATE TABLE PlaylistEntries ( + EntryID INTEGER PRIMARY KEY, + PlaylistID INTEGER NOT NULL, +- TrackID INTEGER NOT NULL ++ TrackID INTEGER NOT NULL, ++ ViewOrder INTEGER NOT NULL DEFAULT 0 + )"); + } + } +@@ -120,6 +120,13 @@ + } catch(ApplicationException) { + LogCore.Instance.PushDebug("Adding new database column", "RemoteLookupStatus INTEGER"); + Execute("ALTER TABLE Tracks ADD RemoteLookupStatus INTEGER"); ++ } ++ ++ try { ++ QuerySingle("SELECT ViewOrder FROM PlaylistEntries LIMIT 1"); ++ } catch(ApplicationException) { ++ LogCore.Instance.PushDebug("Adding new database column", "ViewOrder INTEGER"); ++ Execute("ALTER TABLE PlaylistEntries ADD ViewOrder INTEGER NOT NULL DEFAULT 0"); + } + } + } Index: src/Banshee.Base/FileTrackInfo.cs =================================================================== RCS file: /cvs/gnome/banshee/src/Banshee.Base/FileTrackInfo.cs,v @@ -1339,10 +1453,10 @@ =================================================================== RCS file: /cvs/gnome/banshee/src/Banshee.Base/Utilities.cs,v retrieving revision 1.16 -retrieving revision 1.16.2.2 -diff -u -r1.16 -r1.16.2.2 +retrieving revision 1.16.2.3 +diff -u -r1.16 -r1.16.2.3 --- src/Banshee.Base/Utilities.cs 15 Mar 2006 18:30:42 -0000 1.16 -+++ src/Banshee.Base/Utilities.cs 5 Apr 2006 20:26:23 -0000 1.16.2.2 ++++ src/Banshee.Base/Utilities.cs 19 May 2006 18:24:23 -0000 1.16.2.3 @@ -1,9 +1,8 @@ - /*************************************************************************** @@ -1355,7 +1469,45 @@ ****************************************************************************/ /* THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW: -@@ -376,6 +375,20 @@ +@@ -337,10 +336,37 @@ + { + private static char[] CharsToQuote = { ';', '?', ':', '@', '&', '=', '$', ',', '#', '%' }; + ++ [DllImport("libglib-2.0.so")] ++ private static extern IntPtr g_filename_to_uri(IntPtr filename, IntPtr hostname, IntPtr error); ++ ++ public static string FilenameToUri(string localPath) ++ { ++ // TODO: replace with managed conversion to avoid marshalling ++ IntPtr path_ptr = GLib.Marshaller.StringToPtrGStrdup(localPath); ++ IntPtr uri_ptr = g_filename_to_uri(path_ptr, IntPtr.Zero, IntPtr.Zero); ++ GLib.Marshaller.Free(path_ptr); ++ ++ if(uri_ptr == IntPtr.Zero) { ++ throw new ApplicationException("Filename path must be absolute"); ++ } ++ ++ string uri = GLib.Marshaller.Utf8PtrToString(uri_ptr); ++ GLib.Marshaller.Free(uri_ptr); ++ ++ return uri; ++ } ++ + public static Uri PathToFileUri(string path) + { + path = Path.GetFullPath(path); + ++ try { ++ return new Uri(FilenameToUri(path)); ++ } catch { ++ Console.WriteLine("Could not use g_filename_to_uri for {0}, " + ++ "falling back on CharsToQuote.", path); ++ } ++ + StringBuilder builder = new StringBuilder(); + builder.Append(Uri.UriSchemeFile); + builder.Append(Uri.SchemeDelimiter); +@@ -376,6 +402,20 @@ return Path.GetDirectoryName(path) + Path.DirectorySeparatorChar + Path.GetFileNameWithoutExtension(path); @@ -1590,11 +1742,71 @@ =================================================================== RCS file: /cvs/gnome/banshee/src/Banshee.Base/Sources/PlaylistSource.cs,v retrieving revision 1.5 -retrieving revision 1.5.2.1 -diff -u -r1.5 -r1.5.2.1 +retrieving revision 1.5.2.2 +diff -u -r1.5 -r1.5.2.2 --- src/Banshee.Base/Sources/PlaylistSource.cs 13 Feb 2006 22:18:10 -0000 1.5 -+++ src/Banshee.Base/Sources/PlaylistSource.cs 1 May 2006 16:33:19 -0000 1.5.2.1 -@@ -99,8 +99,10 @@ ++++ src/Banshee.Base/Sources/PlaylistSource.cs 19 May 2006 18:24:24 -0000 1.5.2.2 +@@ -1,9 +1,8 @@ +- + /*************************************************************************** + * PlaylistSource.cs + * +- * Copyright (C) 2005 Novell +- * Written by Aaron Bockover (aaron@aaronbock.net) ++ * Copyright (C) 2005-2006 Novell, Inc. ++ * Written by Aaron Bockover <aaron@abock.org> + ****************************************************************************/ + + /* THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW: +@@ -52,6 +51,8 @@ + } + + private ArrayList tracks = new ArrayList(); ++ private Queue remove_queue = new Queue(); ++ private Queue append_queue = new Queue(); + private int id; + + public PlaylistSource() : this(0) +@@ -84,23 +85,46 @@ + } + + private void LoadFromDatabase() +- { ++ { + Name = (string)Globals.Library.Db.QuerySingle(String.Format( + @"SELECT Name + FROM Playlists + WHERE PlaylistID = '{0}'", + id + )); +- ++ ++ // check to see if ViewOrder has ever been set, if not, perform ++ // a default ordering as a compatibility update ++ if(Convert.ToInt32(Globals.Library.Db.QuerySingle(String.Format( ++ @"SELECT COUNT(*) ++ FROM PlaylistEntries ++ WHERE PlaylistID = '{0}' ++ AND ViewOrder > 0", ++ id))) <= 0) { ++ Console.WriteLine("Performing compatibility update on playlist '{0}'", Name); ++ Globals.Library.Db.Execute(String.Format( ++ @"UPDATE PlaylistEntries ++ SET ViewOrder = (ROWID - ++ (SELECT COUNT(*) ++ FROM PlaylistEntries ++ WHERE PlaylistID < '{0}')) ++ WHERE PlaylistID = '{0}'", ++ id ++ )); ++ } ++ + IDataReader reader = Globals.Library.Db.Query(String.Format( + @"SELECT TrackID + FROM PlaylistEntries +- WHERE PlaylistID = '{0}'", ++ WHERE PlaylistID = '{0}' ++ ORDER BY ViewOrder", id )); @@ -1607,13 +1819,14 @@ } reader.Dispose(); -@@ -139,14 +141,18 @@ +@@ -139,14 +163,20 @@ public override void AddTrack(TrackInfo track) { if(track is LibraryTrackInfo) { - tracks.Add(track); + lock(TracksMutex) { + tracks.Add(track); ++ append_queue.Enqueue(track); + } OnUpdated(); } @@ -1624,14 +1837,44 @@ - tracks.Remove(track); + lock(TracksMutex) { + tracks.Remove(track); ++ remove_queue.Enqueue(track); + } } public void Delete() -@@ -175,22 +181,26 @@ +@@ -163,34 +193,90 @@ id )); ++ tracks.Clear(); ++ append_queue.Clear(); ++ remove_queue.Clear(); ++ + SourceManager.RemoveSource(this); + playlists.Remove(this); + } + + public override void Commit() + { +- Globals.Library.Db.Execute(String.Format( +- @"DELETE FROM PlaylistEntries +- WHERE PlaylistID = '{0}'", +- id +- )); ++ if(remove_queue.Count > 0) { ++ lock(TracksMutex) { ++ while(remove_queue.Count > 0) { ++ TrackInfo track = remove_queue.Dequeue() as TrackInfo; ++ Globals.Library.Db.Execute(String.Format( ++ @"DELETE FROM PlaylistEntries ++ WHERE PlaylistID = '{0}' ++ AND TrackID = '{1}'", ++ id, track.TrackId ++ )); ++ } ++ } ++ } + - foreach(TrackInfo track in Tracks) { - if(track.TrackId <= 0) - continue; @@ -1641,31 +1884,90 @@ - VALUES (NULL, '{0}', '{1}')", - id, track.TrackId - )); -+ lock(TracksMutex) { -+ foreach(TrackInfo track in Tracks) { -+ if(track.TrackId <= 0) -+ continue; -+ -+ Globals.Library.Db.Execute(String.Format( -+ @"INSERT INTO PlaylistEntries -+ VALUES (NULL, '{0}', '{1}')", -+ id, track.TrackId -+ )); ++ if(append_queue.Count > 0) { ++ lock(TracksMutex) { ++ while(append_queue.Count > 0) { ++ TrackInfo track = append_queue.Dequeue() as TrackInfo; ++ Globals.Library.Db.Execute(String.Format( ++ @"INSERT INTO PlaylistEntries ++ VALUES (NULL, '{0}', '{1}', ( ++ SELECT CASE WHEN MAX(ViewOrder) ++ THEN MAX(ViewOrder) + 1 ++ ELSE 1 END ++ FROM PlaylistEntries ++ WHERE PlaylistID = '{0}') ++ )", id, track.TrackId ++ )); ++ } + } } } public override void Reorder(TrackInfo track, int position) { - RemoveTrack(track); +- RemoveTrack(track); - tracks.Insert(position, track); + lock(TracksMutex) { ++ int sql_position = 1; ++ ++ if(position > 0) { ++ TrackInfo sibling = tracks[position] as TrackInfo; ++ if(sibling == track || sibling == null) { ++ return; ++ } ++ ++ sql_position = Convert.ToInt32(Globals.Library.Db.QuerySingle(String.Format( ++ @"SELECT ViewOrder ++ FROM PlaylistEntries ++ WHERE PlaylistID = '{0}' ++ AND TrackID = '{1}' ++ LIMIT 1", id, sibling.TrackId) ++ )); ++ } else if(tracks[position] == track) { ++ return; ++ } ++ ++ Globals.Library.Db.Execute(String.Format( ++ @"UPDATE PlaylistEntries ++ SET ViewOrder = ViewOrder + 1 ++ WHERE PlaylistID = '{0}' ++ AND ViewOrder >= '{1}'", ++ id, sql_position ++ )); ++ ++ Globals.Library.Db.Execute(String.Format( ++ @"UPDATE PlaylistEntries ++ SET ViewOrder = '{1}' ++ WHERE PlaylistID = '{0}' ++ AND TrackID = '{2}'", ++ id, sql_position, track.TrackId ++ )); ++ ++ tracks.Remove(track); + tracks.Insert(position, track); + } } private void OnLibraryTrackRemoved(object o, LibraryTrackRemovedArgs args) -@@ -233,6 +243,10 @@ +@@ -213,10 +299,13 @@ + + int removed_count = 0; + +- foreach(TrackInfo track in args.Tracks) { +- if(tracks.Contains(track)) { +- tracks.Remove(track); +- removed_count++; ++ lock(TracksMutex) { ++ foreach(TrackInfo track in args.Tracks) { ++ if(tracks.Contains(track)) { ++ tracks.Remove(track); ++ remove_queue.Enqueue(track); ++ removed_count++; ++ } + } + } + +@@ -233,6 +322,10 @@ get { return tracks; } @@ -2740,7 +3042,7 @@ retrieving revision 1.139 diff -u -r1.139 configure.ac --- configure.ac 20 Mar 2006 09:30:47 -0000 1.139 -+++ configure.ac 7 May 2006 16:54:22 -0000 ++++ configure.ac 19 May 2006 20:35:58 -0000 @@ -148,7 +148,7 @@ fi AM_CONDITIONAL(ENABLE_IPOD, test "x$enable_ipodsharp" = "xyes") @@ -2750,7 +3052,7 @@ PKG_CHECK_MODULES(NJBSHARP, njb-sharp >= $NJBSHARP_REQUIRED, enable_njbsharp="$enable_njbsharp", enable_njbsharp=no) ---- /dev/null 2006-04-09 11:27:20.000000000 -0400 +--- /dev/null 2006-05-01 18:19:19.000000000 -0400 +++ src/Banshee.Base/Gui/ErrorListDialog.cs 2006-04-04 13:28:11.000000000 -0400 @@ -0,0 +1,105 @@ +/*************************************************************************** ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de