[SCM] Audacity debian packaging branch, master, updated. debian/1.3.10-2-5-g6b5f7de
bdrung-guest at users.alioth.debian.org
bdrung-guest at users.alioth.debian.org
Tue Jan 19 21:23:34 UTC 2010
The following commit has been merged in the master branch:
commit b69c51dc831624865e820ba5358bb8e1b6603602
Merge: 8371f88e45ba5d1e5b8869253c9f8ddf2788db08 8d419ed97430b765c65a15b785d09a099474f563
Author: Benjamin Drung <bdrung at gmail.com>
Date: Tue Jan 19 16:36:02 2010 +0100
Merge commit 'upstream/1.3.11'
diff --combined src/export/ExportMultiple.cpp
index 2635bb4,ed3c159..ee7b41a
--- a/src/export/ExportMultiple.cpp
+++ b/src/export/ExportMultiple.cpp
@@@ -65,7 -65,6 +65,7 @@@ enum
TrackID,
ByNameID,
ByNumberID,
+ ByNameAndNumberID,
PrefixID,
OverwriteID
};
@@@ -308,21 -307,13 +308,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(""));
@@@ -330,7 -321,7 +330,7 @@@
S.SetBorder(3);
mByNumberLabel = S.AddVariableText(_("Numbering consecutively"), false);
- // Row 3
+ // Row 4
S.AddVariableText(wxT(""), false);
S.StartHorizontalLay(wxEXPAND, false);
{
@@@ -374,7 -365,7 +374,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);
@@@ -527,10 -518,8 +527,10 @@@ void ExportMultiple::OnExport(wxCommand
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(),
@@@ -552,7 -541,7 +552,7 @@@
SuccessDialog dlg(this,
wxID_ANY,
- wxString(_("ExportMultiple")));
+ wxString(_("Export Multiple")));
ShuttleGui S(&dlg, eIsCreating);
S.StartVerticalLay();
{
@@@ -613,7 -602,7 +613,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();
@@@ -680,14 -669,9 +680,14 @@@
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 --combined src/prefs/DevicePrefs.cpp
index a5bc10e,b984a2e..a80123e
--- a/src/prefs/DevicePrefs.cpp
+++ b/src/prefs/DevicePrefs.cpp
@@@ -158,6 -158,10 +158,10 @@@ void DevicePrefs::PopulateOrExchange(Sh
void DevicePrefs::OnHost(wxCommandEvent & e)
{
+ // Bail if we have no hosts
+ if (mHostNames.size() < 1)
+ return;
+
// Find the index for the host API selected
int index = -1;
wxString apiName = mHostNames[mHost->GetCurrentSelection()];
@@@ -330,10 -334,6 +334,10 @@@ wxString DevicePrefs::GetDefaultPlayDev
wxLogDebug(wxT("GetDefaultPlayDevice(): HostAPI index %d, name %s"), index, wxString(apiinfo->name, wxConvLocal).c_str());
wxLogDebug(wxT("GetDefaultPlayDevice() default output %d"), apiinfo->defaultOutputDevice);
const PaDeviceInfo* devinfo = Pa_GetDeviceInfo(apiinfo->defaultOutputDevice);
+ if (devinfo == NULL) {
+ wxLogDebug(wxT("GetDefaultPlayDevice() no default output device"));
+ return wxString("", wxConvLocal);
+ }
wxString name(devinfo->name, wxConvLocal);
wxLogDebug(wxT("GetDefaultPlayDevice() default output device name %s"), name.c_str());
return name;
@@@ -349,10 -349,6 +353,10 @@@ wxString DevicePrefs::GetDefaultRecordD
wxLogDebug(wxT("GetDefaultRecordDevice(): HostAPI index %d, name %s"), index, wxString(apiinfo->name, wxConvLocal).c_str());
wxLogDebug(wxT("GetDefaultRecordDevice() default input %d"), apiinfo->defaultInputDevice);
const PaDeviceInfo* devinfo = Pa_GetDeviceInfo(apiinfo->defaultInputDevice);
+ if (devinfo == NULL) {
+ wxLogDebug(wxT("GetDefaultRecordDevice() no default input device"));
+ return wxString("", wxConvLocal);
+ }
wxString name(devinfo->name, wxConvLocal);
wxLogDebug(wxT("GetDefaultRecordDevice() default input device name %s"), name.c_str());
return name;
@@@ -363,15 -359,21 +367,21 @@@ bool DevicePrefs::Apply(
ShuttleGui S(this, eIsSavingToPrefs);
PopulateOrExchange(S);
- const PaDeviceInfo *info;
+ const PaDeviceInfo *info = NULL;
- info = (const PaDeviceInfo *) mPlay->GetClientData(mPlay->GetSelection());
+ if (mPlay->GetCount() > 0) {
+ info = (const PaDeviceInfo *) mPlay->GetClientData(
+ mPlay->GetSelection());
+ }
if (info) {
gPrefs->Write(wxT("/AudioIO/PlaybackDevice"),
DeviceName(info));
}
- info = (const PaDeviceInfo *) mRecord->GetClientData(mRecord->GetSelection());
+ info = NULL;
+ if (mRecord->GetCount() > 0) {
+ info = (const PaDeviceInfo *) mRecord->GetClientData(mRecord->GetSelection());
+ }
if (info) {
gPrefs->Write(wxT("/AudioIO/RecordingDevice"),
DeviceName(info));
--
Audacity debian packaging
More information about the pkg-multimedia-commits
mailing list