There's an issue with textboxes across separate window instances (e.g.
when firing up the New Folder dialog in the file dialog) each getting a
blinking cursor simultaneously displayed on the screen due to timer
events persisting even when a GUI2 window isn't running. This may cause
repaint issues since the whole textbox may need to be redrawn each time
the timer fires, so it's best to disable it until I figure out a better
way to implement a unique global blinking cursor.
According to a warning log from @mattsc, attempting to suppress
-Wmaybe-uninitialized causes a compiler warning in Clang because
it doesn't have a -Wmaybe-uninitialized warning.
(I wish Clang didn't pretend to be GCC to begin with...)
MSVC2013 doesn't support constexpr.
We have a CONSTEXPR macro, but I decided to just drop the constexpr
qualifier instead. It's not at all important to evaluate the variable
at compile time.
This is done because the code will not complain but silently produce
non-sensical results if, for example, the filter is passed as the first
argument to get_visible_units().
GetVolumeInformation() _will_ fail when looking at present removable
drives without any inserted media (optic drives, etc.). We shouldn't
make noise about that.
Users can add and remove bookmarks from the end of the bookmarks list.
These correspond to the currently viewed directory and have its name as
their label. It's not possible to remove hardcoded bookmarks. A bookmark
may only be removed after selecting it.
In order to ensure that users will be able to remove their own bookmarks
if they match predefined paths, the bookmarks bar now matches items from
bottom to top instead of the other way around.
Now they are kept in a separate list using a different interface, since
otherwise it'll be harder to keep track of which bookmarks are
user-defined and which aren't, in the file dialog.
The path label above the fileview now stands on its own without the
"Location:" label since it's self-explanatory for anyone who's managed
to get this far and install Wesnoth. The Delete and New Folder buttons
have had their order reversed so that destructive actions are on the
side opposite to the dialog's control buttons (OK/Cancel), the "Places"
heading no longer has a colon.
The bookmarks bar holds predefined bookmarks (as in the stuff
src/desktop/paths.hpp exposes) and allows users to easily browse to them
in a single click. It will eventually be possible for the user to add or
remove custom bookmarks as well.
I might add a method to disable specific irrelevant bookmarks later, not
sure (e.g. nobody cares about the preferences dir when trying to find
wesnothd).