Vadim Zeitlin [Tue, 11 Aug 2009 18:16:39 +0000 (18:16 +0000)]
Create compressed debug report file outside of temporary directory.
Otherwise the compressed file is deleted when the temporary directory is (it
doesn't happen if temporarily files are left because an error occurred while
the report generation but perversely enough no useful information was left if
no errors happened).
Vadim Zeitlin [Tue, 11 Aug 2009 10:54:40 +0000 (10:54 +0000)]
Another compilation fix after wxFlexGridSizer ctors change.
wxFlexGridSizer ctor was even used incorrectly even in layout sample itself,
once again the code was supposed to create 3*3 sizer, not 3-column sizer with
3 pixel vertical gap.
Changed ctors to be more explicit and to use a 5 pixel gap in both directions.
Vadim Zeitlin [Mon, 10 Aug 2009 11:18:23 +0000 (11:18 +0000)]
Update wxFlexGridSizer ctors to match (new) wxGridSizer ones.
Confusing wxFlexGridSizer(int cols, int vgap = 0, int hgap = 0) was removed as
well as corresponding wxGridSizer ctor overload. New ctor overloads taking gap
as wxSize were added.
Vadim Zeitlin [Mon, 10 Aug 2009 11:18:09 +0000 (11:18 +0000)]
Made wxWindow::HasScrollbar() do what it says.
Added wxWindow::CanScroll() with the old HasScrollbar() meaning but changed
HasScrollbar() to check for the scrollbar existence instead of just checking
if it might exist.
Vadim Zeitlin [Thu, 6 Aug 2009 00:01:43 +0000 (00:01 +0000)]
Don't pop explicitly changed status messages.
Calls to SetStatusText() in between Push/PopStatusText() were simply lost
before, now the text explicitly changed by SetStatusText() is preserved by the
next call to PopStatusText().
This required adding a new virtual method, called DoUpdateStatusText(), which
is now implemented in all the derived classes instead of overriding
SetStatusText() (on the bright side, it doesn't need to do any checks already
done in the base class any more).
Also fix PushStatusText() to actually show the text being pushed at all under
wxMSW as a side effect.
And further reduce code duplication between wxStatusBarBase and the derived
classes.
Vadim Zeitlin [Thu, 6 Aug 2009 00:00:47 +0000 (00:00 +0000)]
Add test for Push/PopStatusText().
Allow to interactively push and pop status messages for the selected field.
This shows that currently PushStatusText() is completely broken under wxMSW
as it never shows the text being pushed at all because it is "optimized" away
due to an incorrect comparison with the old value (which turns out to be the
new one)
Vadim Zeitlin [Thu, 6 Aug 2009 00:00:39 +0000 (00:00 +0000)]
Provide saner UI for setting status bar fields.
Instead of asking the user to enter N values in a row (which is really
annoying even for N=2 already), allow to select the status bar to set the
value for and only show a single dialog asking for the value of this pane.
Vadim Zeitlin [Wed, 5 Aug 2009 17:25:27 +0000 (17:25 +0000)]
wxSplitterWindow mouse capture improvements and cleanup.
- Handle mouse-capture-lost event to abort dragging mode.
- Remember mouse and sash position on buttondown event and use them as
absolute reference during dragging. Avoid delta values from one mousemove to
the next as this may introduce a skew during dragging and especially when
coordinate clipping occurs.
- Clear the requested sash position when dragging in live mode.
- Draw the tracker at correct coordinates - taking into account the width of
the pen used to draw the tracker.
- The old code did not clearly distinguish between live vs. tracking mode in
some places.
Vadim Zeitlin [Wed, 5 Aug 2009 17:25:14 +0000 (17:25 +0000)]
Generate scroll events for key presses in wxScrolledWindow.
Don't duplicate the existing wxScrolledWindow::CalcScrollInc() logic in
HandleOnChar(), simply generate scrolling events from it, this simplifies the
code and ensures that it is more correct.
Vadim Zeitlin [Wed, 5 Aug 2009 17:24:50 +0000 (17:24 +0000)]
Cleaned up low level OS X sources.
The low level files are those which are used by wxUniversal and so shouldn't
contain native controls implementations -- moved them from OSX_LOWLEVEL_SRC to
OSX_CARBON_COCOA_SRC.
Also removed the now unnecessary check for __WXUNIVERSAL__ in src/osx/accel.cpp.
Vadim Zeitlin [Mon, 3 Aug 2009 20:37:03 +0000 (20:37 +0000)]
Correct week day returned from wxCalendarCtrl::HitTest() on header click.
A combination of a wx bug in conversion from native control week days to
wxDateTime week days and a bug of native control itself when the first week
day is not Monday resulted in the day being off by one it did start with
Monday. The new code works correctly in both Monday and Sunday cases, at least
until the bug in comctl32.dll is corrected.
Vadim Zeitlin [Mon, 3 Aug 2009 20:10:31 +0000 (20:10 +0000)]
Always use MCHITTESTINFO of minimal size.
This struct has gained additional fields under Vista which are not supported under previous versions. We don't use these fields but just using a bigger struct makes functions using it fail under pre-Vista systems, so don't do this.
Vadim Zeitlin [Sun, 2 Aug 2009 00:59:31 +0000 (00:59 +0000)]
Check indices validity better in wxGridStringTable.
Calling GetValue(-1, -1) could crash as the code naively only checked upper boundary (and didn't use unsigned which would have made the extra check unnecessary but it's too late for this now).
Václav Slavík [Fri, 31 Jul 2009 18:48:34 +0000 (18:48 +0000)]
compilation fix: only one wxInitialize form may have default argument values. It doesn't make sense to specify only argc>0, so removed default values and added default wxInitializer ctor.
Václav Slavík [Thu, 30 Jul 2009 07:09:43 +0000 (07:09 +0000)]
Use wxInitializer in wxEntryReal() instead of directly calling wxEntryStart() without refcounting. This makes it possible to write hybrid CLI/GUI wx applications.
It was left uninitialized before resulting in the key being closed on access because the check for being opened in a mode with enough permissions failed even for Read.
Long version is constructed by concatenating "Version " with the short version but can be overridden for the platforms which use it (currently MSW and OS X).
Use Ok/Cancel dialog instead of Yes/No one in CheckFit().
This has the advantage of being able to close the dialog with "Esc" and also allows us to not specify the label for the "Cancel" button at all and use the default one, which is especially important under MSW where the label returned by wxGetStockLabel(wxID_CANCEL) is actually not the same string as is used in the native message boxes (they don't define an accelerator for the cancel button).
Set all parent frame icons for print preview frame.
Using SetIcon(GetIcon()) resulted in ugly scaled icons being used for small icons while using SetIcons(GetIcons()) correctly reuses all parent frame icons in the child one.
Use wxINT32_MAX instead of LONG_MAX as the upper bound in wxDateTime::IsInStdRange().
Under Debian Linux 64 bit time_t is 64 bit long but libc doesn't seem to handle values beyond 2^32
correctly, e.g. wrong results are returned from localtime() for them. And it would seem that platforms
where sizeof(long) > sizeof(time_t) might exist too so it seems safer to only work with 32 bit time_t
values until we can reliably detect platforms which support 64 bit ones.
Support delayed destruction in console applications too.\n\nThis only works if there is a running event loop but if there is one, we can have the same kind of problems with non-GUI objects such as sockets in console applications as we have with windows in GUI ones, so we must support this (see #10989).
This is necessary in order to define wxVector<wxDataFormat> at least when
wxVector is std::vector (as in wxUSE_STL==1 build) because vectors of
incomplete types can't be used.
Also removed inclusions of this and other unneeded headers from MSW and OS X
headers and removed a hopefully out of date comment about Mac code being wx
1.xx-based from the latter.