Vadim Zeitlin [Wed, 15 Feb 2012 00:35:25 +0000 (00:35 +0000)]
Make wxDragImage ctors taking hot spot point really deprecated in wxMSW.
They were documented as deprecated and deprecated in the generic version (and
actually not even available there any more without WXWIN_COMPATIBILITY_2_6)
but not in wxMSW, where we just had the weird wxLogDebug() statements that
were inconsistent with our handling of deprecation everywhere else.
Do deprecate them now, remove wxLogDebug() and also remove the deprecated
ctors and Create() overloads from the documentation.
Finally, remove the documentation of deprecated and available in the generic
version only ctor taking only wxCursor (closes #13967).
Vadim Zeitlin [Wed, 15 Feb 2012 00:35:18 +0000 (00:35 +0000)]
Don't document private event handlers in doc/view frame classes.
wxDoc[MDI]ParentFrame::OnCloseWindow(), wxDoc[MDI]ChildFrame::OnActivate() and
OnCloseWindow() are all private, don't document them as public. Just mention
that the wxEVT_CLOSE_WINDOW and wxEVT_ACTIVATE should be left for the
processing in the frame classes to let the default handling take place.
Vadim Zeitlin [Sun, 12 Feb 2012 22:19:04 +0000 (22:19 +0000)]
Implement wxDV_ROW_LINES for generic wxDataViewCtrl.
Provide wxDataViewCtrl::SetAlternateRowColour() to specify the colour to use
for odd rows explicitly but determine it automatically from the background
colour if no explicit colour was specified.
Vadim Zeitlin [Sat, 11 Feb 2012 16:26:47 +0000 (16:26 +0000)]
Update marks in non-current months shown in wxMSW wxCalendarCtrl.
Native wxMSW calendar control can show more than just the current month. When
other months are shown, ensure that they don't have marks for the days marked
in the current month as this doesn't make sense.
Vadim Zeitlin [Sat, 11 Feb 2012 16:26:41 +0000 (16:26 +0000)]
Set marks used in wxMSW wxCalendarCtrl unconditionally.
This fixes wrong display (random days could have been shown marked) when not
using wxCAL_SHOW_HOLIDAYS style. Apparently we need to set the marks
unconditionally as they are not turned off by default, so ensure we call
UpdateMarks() even without wxCAL_SHOW_HOLIDAYS.
Vadim Zeitlin [Fri, 10 Feb 2012 23:34:49 +0000 (23:34 +0000)]
Added a test for wxUSE_DATAOBJ to wxDFB which doesn't support it.
This is just one of many, many things not supported by wxDFB but check for at
least this one as it prevents even the precompiled header from being created.
Vadim Zeitlin [Fri, 10 Feb 2012 23:34:42 +0000 (23:34 +0000)]
Add stubs for wxNativeFontInfo::{Get,Set}Strikethrough() to wxGTK.
These functions are not implemented currently (just as their
{Get,Set}Underlined() counterparts) but should still be defined to allow the
code using wxNativeFontInfo to link.
Vadim Zeitlin [Fri, 10 Feb 2012 10:22:45 +0000 (10:22 +0000)]
Fix wxHash{Set,Map} compilation with g++ 4.7 in C++11 mode.
Fully qualify the hasher and comparator classes used with
WX_DECLARE_HASH_{SET,MAP} macros as they're used as base classes by the
standard library implementation in g++ 4.7 and using them without the scope
operator results in compilation errors because they're interpreted as being
(inaccessible) base classes and not the global ones.
Vadim Zeitlin [Wed, 8 Feb 2012 02:09:55 +0000 (02:09 +0000)]
Use wxSTC_INVALID_POSITION in wxStyledTextCtrl documentation.
Comments -- copied from the generated header file -- used INVALID_POSITION
which is not actually defined, replace it with wxSTC_INVALID_POSITION that is
defined.
Robin Dunn [Wed, 8 Feb 2012 00:20:38 +0000 (00:20 +0000)]
Following the theory that something lame is better than nothing at all, provide a very generic implementation of the ctor wxRegion::wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle) by drawing the polygon into a bitmap and using that to create the region.
Vadim Zeitlin [Tue, 7 Feb 2012 21:38:31 +0000 (21:38 +0000)]
Avoid CRT deprecation warnings for MSVC build using makefiles too.
Define _CRT_SECURE_NO_DEPRECATE, _CRT_NON_CONFORMING_SWPRINTFS and
_SCL_SECURE_NO_WARNINGS when using makefiles to build the library too for
consistency with the project files.
These defines are only needed for VC8 and later but should do no harm for the
previous versions.
Vadim Zeitlin [Tue, 7 Feb 2012 21:38:09 +0000 (21:38 +0000)]
Rebake all project files to reflect MSVC deprecation warnings defines.
Rebake all the projects after the changes of r70182, even if they're only
really needed for the library itself, the other project files should
correspond to the bakefiles contents too.
Vadim Zeitlin [Tue, 7 Feb 2012 13:02:32 +0000 (13:02 +0000)]
Fix infinite loop in wxHtmlEasyPrinting page break code.
The code didn't handle cells higher than the page height correctly and entered
an infinite loop when trying to adjust page breaks in their presence, e.g.
when trying to print a very tall image.
Vadim Zeitlin [Mon, 6 Feb 2012 13:28:34 +0000 (13:28 +0000)]
Fix handling of positional parameters in wxPrintf() and related.
Handle positional parameter specifications in wxFormatConverter to ensure that
e.g. "%N$s" are correctly transformed to "%N$S" if needed. This fixes the use
of positional parameters under OS X.
Vadim Zeitlin [Sun, 5 Feb 2012 15:45:03 +0000 (15:45 +0000)]
Don't set PAGESETUPDLG::hDevNames and hDevMode when using PSD_RETURNDEFAULT.
If the page setup dialog is used to retrieve the default information, hDevMode
and hDevNames fields must not be set, otherwise PageSetupDlg() function simply
fails because of incorrect parameters passed to it.
Vadim Zeitlin [Sun, 5 Feb 2012 14:18:37 +0000 (14:18 +0000)]
Fix huge performance problem in wxStdInputStream when using MSVC8/9.
Our overridden xsgetn() method was never called when using these compilers
because they used their own, non-standard, _Xsgetn_s() instead. Because of
this the stream was always read character by character which was very
inefficient.
Fix the problem by overriding _Xsgetn_s() for these compilers and explicitly
forwarding it to xsgetn().
Vadim Zeitlin [Sun, 5 Feb 2012 14:18:33 +0000 (14:18 +0000)]
Take void** client data in wxSingleChoiceDialog ctor and not char**.
The client data is supposed to be untyped, there is really no reason (other
than compatibility with C conventions of 40 years ago) to use char** here.
So don't do it and provide the versions taking "void**" keeping "char**" ones
for backwards compatibility only.
Also deprecate GetSelectionClientData() that returned char* and add a new
GetSelectionData() returning void* instead.
Vadim Zeitlin [Sun, 5 Feb 2012 14:18:28 +0000 (14:18 +0000)]
Preserve focus when window is minimized and restored in wxMSW.
Add specific code to save and restore the focus when the window is minimized
and restored in wxMSW as the existing code in WM_ACTIVATE handler wasn't
enough because this event was generated too late when minimizing the window
(when it was already minimized and so the focus had been already lost) and too
early when restoring it (so the window was still minimized and restoring focus
failed).
This is still not perfect as we do in our code something Windows would be
expected to do automatically but for whatever reason, it doesn't do it for
wxWidgets programs, and this manual workaround at least prevents the annoying
total focus loss.
Vadim Zeitlin [Sun, 5 Feb 2012 14:18:25 +0000 (14:18 +0000)]
Ensure that the progress dialog parent is activated at the end under MSW.
The progress dialog parent was supposed to become the new foreground window
when the progress dialog was closed, but this didn't happen because
m_parentTop was never set when the native progress dialog implementation was
used under MSW. Fix this by explicitly calling the new SetTopParent() from its
ctor.
Vadim Zeitlin [Sun, 5 Feb 2012 01:20:03 +0000 (01:20 +0000)]
Fix initial state of radio toolbar tools in wxGTK.
The last radio group item was initially checked under wxGTK instead of the
first one, as under the other platforms. Fix this by correcting the check for
the first radio group item which was inversed in wxToolBar::DoInsertTool().
Vadim Zeitlin [Sun, 5 Feb 2012 01:20:00 +0000 (01:20 +0000)]
Never refresh controls from EVT_PAINT handler in wxPropertyGrid.
Refreshing the controls after finishing repainting the grid results in an
infinite stream of paint events, so don't do this, especially as this doesn't
seem to have any bad consequences under wxGTK which was the only major
platform where this behaviour was enabled.
Also rename wxPG_REFRESH_CONTROLS_AFTER_REPAINT to just wxPG_REFRESH_CONTROLS
and keep the control refreshing code for wxGTK only in a couple of places
outside of EVT_PAINT handler to be on the safe side.
Vadim Zeitlin [Fri, 3 Feb 2012 17:27:21 +0000 (17:27 +0000)]
Check string length correctly in wxFileSystem::URLToFileName().
Check that the string is long enough before accessing its first and second
characters to fix a crash when an empty or one-character string was passed to
wxFileSystem::URLToFileName().
Vadim Zeitlin [Fri, 3 Feb 2012 17:27:13 +0000 (17:27 +0000)]
Fix speed regression in wxFileHistory::AddFileToHistory().
Avoid full normalization including wxPATH_NORM_LONG when adding files to
wxFileHistory as this can take a very long time when using network paths under
Windows.
Vadim Zeitlin [Fri, 3 Feb 2012 00:21:45 +0000 (00:21 +0000)]
Fix bug with mouse wheel scrolling wxStyledTextCtrl in long running programs.
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.
Steve Lamerton [Thu, 2 Feb 2012 20:32:08 +0000 (20:32 +0000)]
Disable navigation sounds in wxWebViewIE. This brings the backend into line with the other backends. Also add a general method for changing INTERNETFEATURELIST settings.
Vadim Zeitlin [Thu, 2 Feb 2012 14:26:06 +0000 (14:26 +0000)]
Fix initial wxRadioBox buttons positions in wxMSW.
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.
Vadim Zeitlin [Thu, 2 Feb 2012 14:19:34 +0000 (14:19 +0000)]
Add wxFontDialog ctor not taking wxFontData to wxOSX.
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.
Vadim Zeitlin [Tue, 31 Jan 2012 13:09:07 +0000 (13:09 +0000)]
Don't document wxVector<>::reverse_iterator.
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.
Vadim Zeitlin [Tue, 31 Jan 2012 13:09:04 +0000 (13:09 +0000)]
Remove dummy Lithuanian translations.
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.
Vadim Zeitlin [Wed, 25 Jan 2012 00:05:15 +0000 (00:05 +0000)]
Update wxCommandProcessor after saving wxDocument.
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).
Vadim Zeitlin [Wed, 25 Jan 2012 00:05:09 +0000 (00:05 +0000)]
Don't compare invalid iterators in wxCommandProcessor::IsDirty().
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.