[Ardour-Dev] Fix for Bug #2030

Sebastian Moors sebastian.moors at googlemail.com
Tue Mar 18 15:46:24 PDT 2008


i wrote a bugfix for Bug #2030.


While using a non-english version of ardour (for example the german
translation), you got warnings during the import of audio-files (see
http://tracker.ardour.org/view.php?id=2030 for more details).
This was caused by the static method string2importmode in sfdb_ui.cc .
The argument "str" is a gettext-translated string, but the method just
checks if the string matches against some english strings.  str is the
caption of the active item of the combo-box in which you can determine
if you want to import new audio as a new track, as a region or a tape

static ImportMode
string2importmode (string str)
	if (str == "as new tracks") {
		return ImportAsTrack;
	} else if (str == "to selected tracks") {
		return ImportToTrack;
	} else if (str == "to region list") {
		return ImportAsRegion;
	} else if (str == "as new tape tracks") {
		return ImportAsTapeTrack;

	warning << string_compose (_("programming error: unknown import mode
string %1"), str) << endmsg;
	return ImportAsTrack;

str is something like "neue Spuren" if you use the german version.
Obviously this ends with a warning..

I attached a patch (svn diff) which uses the Combobox-Index instead of
the caption to determine which mode was chosen. This should work
language independent.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sfdb_ui.patch
Type: text/x-patch
Size: 2085 bytes
Desc: not available
URL: <http://lists.ardour.org/pipermail/ardour-dev-ardour.org/attachments/20080318/516da8ec/attachment-0002.bin>

More information about the Ardour-Dev mailing list