The original broken code was intended to stop using ifstream
and ofstream to open files, but it used a very old MSVCism to
open streams from FILE*.
In the case for reading, this patch replaces that code by using
standard c file manipulation to read the data into a stringstream,
and then it uses the existing stream-based code to read from there.
Similarly the ofstream in the code for writing the recent files list
is replaced by a stringstream, and then a c-string is extracted
from it and written using standard c file manipulation.
Also tweaked a couple of typos from rgareus :)
During session-load, ardour calls Route::SoloControllable::set_value()
which calls Session::set_solo() which in turn sends a session-rt event.
Along with other rt-events (locations,..) the current solo logic limits
Ardour to only load sessions with about >= 200 tracks.
now bumped to a few thousand tracks.. until a proper solution comes along.
Use gdk_pango_layout() for all text-size calculations.
In Canvas::Text always use the same context (local image surface)
for layouting (prior to this, local and window-context mix resulted in
different sizes).
This change should ensure that our "been_here_before" file ('.a3' or whatever) will get created successfully - even for user paths with non-English characters in them.
If this experiment works on all platforms, there are several other areas where we'll probably need something similar.
On linux SndFileSource::get_soundfile_info was being called with an empty path
value when clicking on a folder in the left side part of the file browser which
resulted in an unnecessary error message.
On Windows every time a directory was selected in the Import dialog,
SndFileSource::get_soundfile_info would fail to open the directory in read only
mode and produce an error, but as we don't want to query/open soundfile info
for directories anyway just test and return if the path is a directory.
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.