In long running programs the wxEvent time stamp could wrap around resulting in
all mouse wheel events being ignored in wxStyledTextCtrl as the comparison of
the (positive) time until which all the subsequent events were supposed to be
blocked and the (now negative) current event time stamp would be always false.
Fix this by using wxStopWatch::TimeInMicro() to avoid wraparound instead of
wxEvent::GetTimestamp().
Also rename the variable to have a more clear name as the original code wasn't
easy to understand.
Closes#9057.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We only updated the button positions when the radio box was moved or resized
after being created but didn't do it initially, so a radio box created with
fixed position and size didn't lay out its buttons correctly. Do lay them out
immediately after creating the radio box to fix this.
Closes#13912.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxFontDialog should have ctor and Create() overload taking just wxWindow
parent in addition to the one taking parent and wxFontData used to initialize
the dialog but it didn't have them in wxOSX, do add them now.
Closes#13908.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The second parameter of this method should be optional, so make it so in wxOSX.
Also document what this method does exactly and the platforms under which it's
implemented.
Closes#13914.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Pass the name of the temporary file to wxFFile::Attach(). This allows to give
more useful error messages if any operation on this file fails later.
Closes#13903.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxString::mb_str() returns a raw pointer and not wxScopedCharBuffer when
wxUSE_UNICODE==0 so fix the code to do it differently in this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Documenting just this class but not iterator (and const_iterator) is
inconsistent but documenting all of them is too much mostly useless work as
all iterators (of the same category) have the same interface anyhow. So just
remove the documentation of reverse_iterator for now.
See #2585.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
All non-translated strings were "translated" as their English originals in
lt.po. This was just a artefact of the software used for translation and
wrong, so remove all these dummy translations.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Apply the same fix as was done in r68694 for ToWChar() to FromWChar(): it also
returned an off by 1 value when not using MAP_INVALID_UTF8_NOT.
Closes#13400.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Surprisingly, wxCommandProcessor::MarkAsSaved() method was never called by
wxDocument so saving the document didn't update wxCommandProcessor dirty
status.
Do add a call to MarkAsSaved() now, this allows wxCommandProcessor to track
its status correctly (and actually more correctly than the dirty status of the
document which becomes "dirty" after doing and undoing an operation after
saving it, unlike wxCommandProcessor::IsDirty() which correctly returns false
in this case).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
IsDirty() returned false when all commands were undone after saving even
though it clearly should have returned true in this case.
Fix this and add comments explaining what happens in this method.
Closes#2862.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Check that m_lastSavedCommand is valid before comparing it with
m_currentCommand as comparing invalid iterators results in an assert in STL
build (and probably should also result in an assert in non-STL build too for
consistency).
Also move IsDirty() implementation out of line to make it easier to modify it
further in the future and because there is no real reason to keep it inline.
Closes#13465.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Set the closest (and larger, if possible) icon if the icon of exactly the
system icon size is not available. This fixes setting the icons when using
custom DPI settings under MSW as the standard icon size may be different from
the standard 32*32 in this case.
This also improves wxIconBundle::GetIcon() to make its behaviour when the icon
with exactly the given size is not found more flexible as a side effect.
Closes#13891.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Appending all items at once is more efficient than doing it one by one in the
loop 9probably because of CB_INITSTORAGE that we send in this case).
Closes#13899.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The new wxFont ctor added in r70445 resulted in ambiguity when using
wxFont(int, wxFontFamily, wxFontStyle, int) ctor mixing the type-safe values
for the 2nd and 3rd arguments with "untyped" int for the 4th one. Fix this by
avoiding the use of this ctor as it seems impossible to do it in any other
way.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxPG_FILE_DIALOG_STYLE allowing to pass wxFileDialog style that should be
used by the given wxFileProperty. This notably allows to have file properties
accepting not yet existing files, as is needed when using them for the file
names to be saved, not opened.
Closes#13894.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code added in r70447 didn't initialize m_fontStrikethrough correctly.
This fixes unit test failures for wxRichTextCtrl that appeared since this
change.
See #9907.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Currently this ctor just does the same thing as the existing ctors in a
different way but it will be extended to support wxFONTFLAG_STRIKETHROUGH in
the next commits.
See #9907.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775