This was probably supposed to be "@see GetDocumentsDir()", but as this
function is already mentioned, and auto-linked by Doxygen, just above, another
link to it is unnecessary, so remove it.
Closes#16520.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't prevent termination of the app if all windows are closed, except
for the preferences one (which may very well be hidden at the moment).
This only affects platforms where the preferences are modeless (GTK+, OS
X) and where the preferences window, once created, continues to exist,
but is hidden.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previously, the generic implementation closely mirrored OS X's scaling
factors, with the small size being 3/4 of the normal one and mini 2/3.
This works well with OS X's UI font and font rendering, but less so on
other platforms: wxWINDOW_VARIANT_SMALL is barely readable on Windows
and wxWINDOW_VARIANT_MINI is illegible. In wxGTK, both sizes are
readable, but don't match small text used in native GNOME interfaces.
Change the sizing to use the same scaling factor of 1.2 between all
variant steps. This is the same factor that CSS 1.2 defines for
relative sizes and is also used by Pango's (and so GTK+) size scaling in
markup. This makes wxWINDOW_VARIANT_SMALL identical in size to <small>
markup used in GTK+.
On Windows, this changes default UI font scaling to be less steep and
while wxWINDOW_VARIANT_MINI is still tiny and hard to read (as it is on
OS X), wxWINDOW_VARIANT_SMALL is now readable, thanks to being only 1pt
smaller than the full size (for default GUI font).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't suppose that we always have hbmColor because this is not true for
monochrome icons/cursors. Create our own bitmap in this case.
Closes#16512.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add functions to acquire/release power resources, preventing/allowing back the
system to go to sleep or turn off the screen and a class wrapping them in a
safe way.
This patch implements the functions for MSW and OSX, adds documentation and
updates the sample to demonstrate the new functionality.
Closes#16413.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxFileName::MakeRelativeTo() is only supposed to change the path of the file,
not its name, but it was doing the latter for the shortcuts as it implicitly
resolved them to the name of their target.
Fix this by ensuring we do not use wxPATH_NORM_SHORTCUT in MakeRelativeTo().
Closes#16239.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If it isn't, the function doesn't risk to work. This is especially pernicious
because OLE is initialized on startup in GUI applications, but not in the
console ones only using wxBase, so this function can, completely unexpectedly,
give different results in them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In order to draw choice items with custom colours there is necessary to merge custom cell object (wxPGCell) associated with individual item with default cell object (in wxPGProperty::GetDisplayInfo).
wxPGProperty::GetDisplayInfo function should return customized cell object instead of returning pointer to the default cell object only.
Closes#16509
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Commit history was lost in the git to svn merge for trunk, so this reflect work done in two GSOC projects and/or by several authors.
Lines changed by each user was the main metric used to ack major contributions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Currently, it is not possible to remove properties from the page other then currently selected.
The scope of iterator used in wxPropertyGridPageState::DoClear() to enumerate properties must be limited to the required page and not always to the selected one.
Closes#16459
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Do not explicitly remove sub-properties of aggregate property because they will be removed automatically in their parent property dtor.
See #16459
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While <exception> does define this type in this version of the compiler, it's
non-conforming and doesn't define conversion to bool, so we can't test whether
it is valid or not.
We could work around it but for now just disable the use of exception_ptr with
VC10 and only use it for VC11+.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Ensure that the order of stops is consistent with the documentation and other
platforms behaviour, i.e. they are counted from inside to outside of the
circle and not vice versa, which happens to be the GDI+ convention.
Closes#16443.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Build fixes after StoreCurrentException and RethrowStoredException()
introduction: don't use the latter if exceptions support is turned off.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We always build with wxUSE_LONGLONG now, so just use wxLongLong::ToString()
directly.
This avois a warning about unused local function in wxDEBUG_LEVEL==0 builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
They will need to be replaced with the newer equivalents, but for now getting
dozens of warnings for each wxOSX build is just annoying, so get rid of them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Put the variable used only inside #if 0'd code inside #if 0 itself
(it would be better to get rid of this entirely, of course...).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This shows inconsistency in handling of radial gradients with and without
stops in current wxMSW GDI+-based wxGraphicsContext implementation.
See #16443.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This ensures that GetFilename() and GetFilterIndex() always return consistent
results, even if the path was set programmatically, e.g. during unattended
tests using wxExpectModal<wxFileDialog>.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When using C++11 we can provide implementations of wxApp::StoreCurrentException()
and RethrowStoredException() ourselves and thus make catching exceptions outside
of the event loop work by default.
Do this and update the documentation and the sample to reflect it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These methods can be used to ensure that the exceptions thrown from event
handlers are safely rethrown from the code dispatching the events once the
control flow gets back there.
This allows to work around the problem with not being able to propagate
exceptions through non-C++ code and can be used, for example, to catch
exceptions thrown by the handlers invoked from inside wxYield() by a try/catch
block around wxYield() -- something that didn't work before, update the except
sample to show that it does work now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Extract wxApp::OnExceptionInMainLoop() and OnUnhandledException() in a
separate Doxygen group as there will be more functions defined in it soon.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This demonstrates that under 64 bit Windows exceptions may not propagate
through the kernel code and throwing from inside wxYield() results in either
an immediate abort, even if the code calling wxYield() tries to handle the
exception, or, even more surprisingly, is just completely ignored.
See http://blog.paulbetts.org/index.php/2010/07/20/the-case-of-the-disappearing-onload-exception-user-mode-callback-exceptions-in-x64/
for more information.
Moreover, independently of Windows weirdness, throwing from wxYield() also
results in a difficult to debug crash when using wxGTK because C++ exceptions
can't propagate through C GTK+ code in this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Passing an invalid initial directory to wxDirDialog resulted in using the old
style Windows directory selector dialog instead of the new style (file dialog
like) one, which was unintentional, as incorrect initial directory shouldn't
prevent the dialog from being shown.
Fix this by handling ERROR_FILE_NOT_FOUND error specifically and still showing
the new dialog, just without the (non existent) initial directory value, in
this case.
Closes#16430.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775