Don't close the window when clicking on Import. Changing "OK" to "Import" makes
it clear what action is being taken by the button. I quite frequently imported
several files from different directories using "Apply" and then would click on
OK to finish using the dialog only to have the last import occur again
unintentionally.
Another option would of been to change "Apply" to "Import" and "OK" to "Import
and Close" and not have a Close button.
This button closes the window, it doesn't actually cancel any importing that
has taken place and cancelling the import in progress is done by the Cancel
button in popup progress dialog
see 87b89a6
IMPORTANT NOTE: In theory, the correct glibmm function should have been Glib::filename_from_utf8() but I couldn't make that work on Windows and
ended up using Glib::locale_from_utf8() instead. sfdb import will therefore
need to get re-tested on the other platforms (especially in a non-English locale).
If this fix doesn't work we should probably revert to the previous strategy
but using the global specifier "::g_open()" explicitly…
… and only on PLATFORM_WINDOWS (POSIX #define g_open open) fails regardless.
This reverts commit 1a619472ca.
On Unix systems "#define g_open open" interferes with class member function
IMHO this is the wrong approach, the filename should be converted using
glib::filename_from_utf8().
For sfdb stuff, use glib file functions in preference to ANSI or libsndfile handling. On Windows, we need functions which understand UTF-8 (so that we'll be able to import sound files, even in a non-English locale).
Idea here is for importing large multi-track MIDI files to be immediately
listenable upon play without tediously adding a ton of instrument plugins
manually.
This cleans up a lot of false-positives in static analysis
and also helps compilers to optimize code paths in general.
(tagging the fatal stingstream operator as ‘noreturn’ is
far less trivial)
when using ImportDistinctChannels, correctly name regions so that playlists for each channel/track
are also named differently, and thus reloaded properly when the session is reloaded.
Make download of sound files multi-threaded. Each sound file download takes
place in its own thread, and has its own progress bar and cancel button,
which stack up from the bottom of the list of results.
Sound files download into a file with a '.part' suffix, which is then
renamed to the intended name on success.
Add a 'Similar' button, which searches Freesound for sounds similar to the
currently-selected sound in the results list.
Add a 'More' button to load the next page of results without clearing the already-found list.
Don't allow cancellation of searches, and don't update progress bar around searches, since we only get one page at a time now.
Show number of pages of results remaining to download in the tooltip of the 'More' button.
Use a new Mootcher object for each request, to avoid bad things happening when clicking in the Freesound search results list while a search or file download is already in progress.
Make the 'Stop' button insensitive except when it will actually stop the download of a sound file.
Only retrieve one page worth of data per search, rather than looping to get all pages.
Don't show an error in the log window if the user cancelled download.
Request 100 items per page, rather than the default 30.
Fix DOS line endings.