Add a special symbol which is defined only if the icons and other images (e.g.
cursor) are in the separate resource files and don't need to be embedded as
XPMs in the main program.
This makes the checks more clear and more customizable as it's enough to
change wxHAS_IMAGES_IN_RESOURCES definition instead of changing many platform
checks.
Closes#14050.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
- use correct printf format specifiers
- don't perform operations requiring a window until the window has been created
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix the wrong concatenation macro name that was used as using wxMSVC_VERSION
could not work as expected before (which also shows that nobody ever used it).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxGenericFileButton calls wxFileDialog::SetPath() with empty path if no
initial path is explicitly specified and this clearly shouldn't do anything --
but it did, as it set the file dialog path to the initial directory (cwd by
default), and so opened it in the parent of that directory which was
completely unexpected and not useful at all.
Simply don't do anything when SetPath("") is called.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
empty() doesn't empty the string but just checks for its emptiness, clear()
was supposed to be used here instead.
Thanks to PVS-Studio for finding these problems.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code initialized m_isDirty twice which was clearly wrong. The original
intention was probably to set both m_isDirty and m_isShown to false.
Thanks to PVS-Studio for finding this bug.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It doesn't make sense to check whether a pointer is NULL after using it, so do
the checks first.
In fact the m_art pointer probably can never be NULL at all as other code uses
it without checking and so these checks could probably be removed completely,
but keep them for now as I'm not totally sure if having NULL art provider is
really impossible.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The built-in of /bin/sh doesn't handle "-n" option that we use (at least not
under OS X 10.6), so we were getting "-n APPL????" in the generated files.
Fix this by using /bin/echo which does support this option.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Set the default directory first, if it's specified, and the file name later to
ensure that it's interpreted relatively to this directory. Otherwise we could
have a mismatch between the directory shown in the dialog and its initial
path.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use the initial dialog directory to build the absolute path required by GTK+
in wxFileDialog instead of the current working directory. This makes more
sense and makes specifying the default directory and (just) the default file
name work correctly and avoids GTK+ warnings like
Gtk-CRITICAL **: gtk_file_folder_unix_get_info: assertion `strcmp (dirname, folder_unix->filename) == 0' failed
(and in some older versions of GTK+ -- 2.10? -- this even results in a crash).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function is called in many places in the code with possibly invalid (i.e.
out of range) row, so handle it gracefully inside it in virtual list control
case. This is consistent with the behaviour in non-virtual case and with that
of GetRowByItem().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775