[SCM] audacity/master: Apply upstream fix for upstream bug #137.
bdrung at users.alioth.debian.org
bdrung at users.alioth.debian.org
Sat Apr 23 10:05:50 UTC 2011
The following commit has been merged in the master branch:
commit b52bc5fab39fa469ddbe74ac1201e35ae94b3b4f
Author: Benjamin Drung <bdrung at ubuntu.com>
Date: Sat Apr 23 11:43:37 2011 +0200
Apply upstream fix for upstream bug #137.
diff --git a/debian/patches/series b/debian/patches/series
index b7697f6..d0ce9b8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
-disable-dynamic-ffmpeg.patch
-disable-dynamic-lame.patch
+upstream-bug-137.patch
upstream-bug-350.patch
upstream-bug-367.patch
+disable-dynamic-ffmpeg.patch
+disable-dynamic-lame.patch
diff --git a/debian/patches/upstream-bug-137.patch b/debian/patches/upstream-bug-137.patch
new file mode 100644
index 0000000..dbd6881
--- /dev/null
+++ b/debian/patches/upstream-bug-137.patch
@@ -0,0 +1,97 @@
+Description: Bug 137 (P2) - fix false positive detection of orphaned files that
+ belong to the clipboard (triggered by cut commands)
+Origin: upstream, http://code.google.com/p/audacity/source/detail?r=11118
+
+--- a/src/Project.h
++++ b/src/Project.h
+@@ -275,7 +275,7 @@
+ void UpdateLayout();
+
+ // Other commands
+-
++ static TrackList *GetClipboardTracks();
+ static void DeleteClipboard();
+ static void DeleteAllProjectsDeleteLock();
+
+--- a/src/DirManager.h
++++ b/src/DirManager.h
+@@ -70,8 +70,10 @@
+ BlockFile *NewODDecodeBlockFile( wxString aliasedFile, sampleCount aliasStart,
+ sampleCount aliasLen, int aliasChannel, int decodeType);
+
+- /// Returns true if the blockfile is contained by the DirManager
++ /// Returns true if the blockfile pointed to by b is contained by the DirManager
+ bool ContainsBlockFile(BlockFile *b);
++ /// Check for existing using filename using complete filename
++ bool ContainsBlockFile(wxString filepath);
+
+ // Adds one to the reference count of the block file,
+ // UNLESS it is "locked", then it makes a new copy of
+--- a/src/DirManager.cpp
++++ b/src/DirManager.cpp
+@@ -910,11 +910,17 @@
+ return newBlockFile;
+ }
+
+-bool DirManager::ContainsBlockFile(BlockFile *b) {
+- // check what the hash returns in case the blockfile is from a different project
++bool DirManager::ContainsBlockFile(BlockFile *b)
++{
+ return b ? mBlockFileHash[b->GetFileName().GetName()] == b : NULL;
+ }
+
++bool DirManager::ContainsBlockFile(wxString filepath)
++{
++ // check what the hash returns in case the blockfile is from a different project
++ return mBlockFileHash[filepath] != NULL;
++}
++
+ // Adds one to the reference count of the block file,
+ // UNLESS it is "locked", then it makes a new copy of
+ // the BlockFile.
+@@ -1695,6 +1701,8 @@
+ const wxArrayString& filePathArray, // input: all files in project directory
+ wxArrayString& orphanFilePathArray) // output: orphan files
+ {
++ DirManager *clipboardDM = NULL;
++
+ for (size_t i = 0; i < filePathArray.GetCount(); i++)
+ {
+ wxFileName fullname = filePathArray[i];
+@@ -1705,7 +1713,20 @@
+ (fullname.GetExt().IsSameAs(wxT("au")) ||
+ fullname.GetExt().IsSameAs(wxT("auf"))))
+ {
+- orphanFilePathArray.Add(fullname.GetFullPath());
++ if (!clipboardDM) {
++ TrackList *clipTracks = AudacityProject::GetClipboardTracks();
++
++ if (clipTracks) {
++ TrackListIterator clipIter(clipTracks);
++ Track *track = clipIter.First();
++ if (track)
++ clipboardDM = track->GetDirManager();
++ }
++ }
++
++ // Ignore it if it exists in the clipboard (from a previously closed project)
++ if (clipboardDM && clipboardDM->ContainsBlockFile(fullname.GetFullPath()))
++ orphanFilePathArray.Add(fullname.GetFullPath());
+ }
+ }
+ for (size_t i = 0; i < orphanFilePathArray.GetCount(); i++)
+--- a/src/Project.cpp
++++ b/src/Project.cpp
+@@ -3728,6 +3728,12 @@
+ //
+
+ //static
++TrackList *AudacityProject::GetClipboardTracks()
++{
++ return msClipboard;
++}
++
++//static
+ void AudacityProject::DeleteClipboard()
+ {
+ if (msClipboard) {
--
Audacity debian packaging
More information about the pkg-multimedia-commits
mailing list