[SCM] Audacity debian packaging branch, master, updated. debian/1.3.7-3-21-g7416dec

bdrung-guest at users.alioth.debian.org bdrung-guest at users.alioth.debian.org
Sat Aug 15 16:38:02 UTC 2009


The following commit has been merged in the master branch:
commit 7416dec12ae73c00285e9164d0fb1783f4d970f6
Author: Benjamin Drung <bdrung at gmail.com>
Date:   Sat Aug 15 18:37:52 2009 +0200

    Add debian/patches/export-multiple.patch

diff --git a/debian/changelog b/debian/changelog
index e961180..a83cd54 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,11 +15,12 @@ audacity (1.3.8-1) UNRELEASED; urgency=low
   * Update debian/watch file to search on Google Code.
   * Do not create help directory on runtime (backport patch from upstream)
     - Add debian/patches/dont-create-help-directory-on-runtime.patch
+  * Add debian/patches/export-multiple.patch
 
   [ Reinhard Tartler ]
   * Build against system taglib
 
- -- Benjamin Drung <bdrung at ubuntu.com>  Sun, 02 Aug 2009 00:42:30 +0200
+ -- Benjamin Drung <bdrung at ubuntu.com>  Sat, 15 Aug 2009 18:37:00 +0200
 
 audacity (1.3.7-3) unstable; urgency=low
 
diff --git a/debian/patches/export-multiple.patch b/debian/patches/export-multiple.patch
new file mode 100644
index 0000000..fea06c7
--- /dev/null
+++ b/debian/patches/export-multiple.patch
@@ -0,0 +1,113 @@
+diff -pruN audacity-src-1.3.8.orig/src/export/ExportMultiple.cpp audacity-src-1.3.8/src/export/ExportMultiple.cpp
+--- audacity-src-1.3.8.orig/src/export/ExportMultiple.cpp	2009-07-16 05:27:35.000000000 +0200
++++ audacity-src-1.3.8/src/export/ExportMultiple.cpp	2009-07-17 15:39:52.165690507 +0200
+@@ -65,6 +65,7 @@ enum {
+    TrackID,
+    ByNameID,
+    ByNumberID,
++   ByNameAndNumberID,
+    PrefixID,
+    OverwriteID
+ };
+@@ -298,13 +299,21 @@ void ExportMultiple::PopulateOrExchange(
+          {
+             // Row 1
+             S.SetBorder(1);
+-            mByName = S.Id(ByNameID)
++            mByNumberAndName = S.Id(ByNameAndNumberID)
+                .AddRadioButton(wxT(""));
++            mByNumberAndName->SetName(_("Consecutively numbered Label/Track Name"));
++            S.SetBorder(3);
++            mByNumberAndNameLabel = S.AddVariableText(_("Consecutively numbered Label/Track Name"), false);
++
++            // Row 2
++            S.SetBorder(1);
++            mByName = S.Id(ByNameID)
++               .AddRadioButtonToGroup(wxT(""));
+             mByName->SetName(_("Using Label/Track Name"));
+             S.SetBorder(3);
+             mByNameLabel = S.AddVariableText(_("Using Label/Track Name"), false);
+ 
+-            // Row 2
++            // Row 3
+             S.SetBorder(1);
+             mByNumber = S.Id(ByNumberID)
+                .AddRadioButtonToGroup(wxT(""));
+@@ -312,7 +321,7 @@ void ExportMultiple::PopulateOrExchange(
+             S.SetBorder(3);
+             mByNumberLabel = S.AddVariableText(_("Numbering consecutively"), false);
+ 
+-            // Row 3
++            // Row 4
+             S.AddVariableText(wxT(""), false);
+             S.StartHorizontalLay(wxEXPAND, false);
+             {
+@@ -356,7 +365,7 @@ void ExportMultiple::EnableControls()
+    mFirst->Enable(mLabel->GetValue());
+    
+    enable = mLabel->GetValue() &&
+-            mByName->GetValue() &&
++            (mByName->GetValue() || mByNumberAndName->GetValue()) &&
+             mFirst->GetValue();
+    mFirstFileLabel->Enable(enable);
+    mFirstFileName->Enable(enable);
+@@ -509,8 +518,10 @@ void ExportMultiple::OnExport(wxCommandE
+    mExported.Empty();
+ 
+    if (mLabel->GetValue()) {
+-      ok = ExportMultipleByLabel(mByName->GetValue(),
+-                                 mPrefix->GetValue());
++      // TODO
++      ok = ExportMultipleByLabel(mByName->GetValue() || mByNumberAndName->GetValue(),
++                                 mPrefix->GetValue(),
++                                 mByNumberAndName->GetValue());
+    }
+    else {
+       ok = ExportMultipleByTrack(mByName->GetValue(),
+@@ -580,7 +591,7 @@ bool ExportMultiple::DirOk()
+    return fn.Mkdir(0777, wxPATH_MKDIR_FULL);
+ }
+ 
+-int ExportMultiple::ExportMultipleByLabel(bool byName, wxString prefix)
++int ExportMultiple::ExportMultipleByLabel(bool byName, wxString prefix, bool addNumber)
+ {
+    wxASSERT(mProject);
+    bool tagsPrompt = mProject->GetShowId3Dialog();
+@@ -647,9 +658,14 @@ int ExportMultiple::ExportMultipleByLabe
+             name.Printf(wxT("%s-%02d"), prefix.c_str(), l+1);
+          else
+             name.Printf(wxT("%s-%d"), prefix.c_str(), l+1);
++      } else if (addNumber) {
++         if (numFiles > 9)
++            name.Prepend(wxString::Format(wxT("%02d "), l+1));
++         else
++            name.Prepend(wxString::Format(wxT("%d "), l+1));
+       }
+ 
+-      // store sanitised and user checjed name in object
++      // store sanitised and user checked name in object
+       setting.destfile.SetName(MakeFileName(name));
+ 
+       wxASSERT(setting.destfile.IsOk());     // scream if file name is broke
+diff -pruN audacity-src-1.3.8.orig/src/export/ExportMultiple.h audacity-src-1.3.8/src/export/ExportMultiple.h
+--- audacity-src-1.3.8.orig/src/export/ExportMultiple.h	2009-07-16 05:27:35.000000000 +0200
++++ audacity-src-1.3.8/src/export/ExportMultiple.h	2009-07-17 15:40:33.465690249 +0200
+@@ -51,7 +51,7 @@ private:
+     * labels that define them (true), or just numbered (false).
+     * @param prefix The string used to prefix the file number if files are being
+     * numbered rather than named */
+-   int ExportMultipleByLabel(bool byName, wxString prefix);
++   int ExportMultipleByLabel(bool byName, wxString prefix, bool addNumber);
+ 
+    /** \brief Export each track in the project to a separate file
+     *
+@@ -154,6 +154,9 @@ private:
+    wxRadioButton *mByNumber;  /**< button to choose numbering exported files */
+    wxStaticText  *mByNumberLabel;
+ 
++   wxRadioButton *mByNumberAndName;
++   wxStaticText  *mByNumberAndNameLabel;
++
+    wxStaticText  *mPrefixLabel;
+    wxTextCtrl    *mPrefix;
+ 

-- 
Audacity debian packaging



More information about the pkg-multimedia-commits mailing list