Commit Graph

55096 Commits

Author SHA1 Message Date
Vadim Zeitlin
167fc10e3b Set the data size in wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE in wxGTK.
Allow wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE handler to examine the data
being dragged by setting not only the pointer to it but also its size, as
otherwise it's impossible to do anything with it.

See #12583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:21 +00:00
Vadim Zeitlin
04581fad18 Explicitly document wxDrag_XXX flags.
They were mentioned in DoDragDrop() documentation but not documented on their
own. Do it now to be able to refer to them from elsewhere.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:18 +00:00
Vadim Zeitlin
bf915caf9b Remove internal only methods from wxDataViewEvent documentation.
SetDataXXX() methods are only meant to be used by wxDataViewCtrl itself, so
don't document them as part of public API. Their documentation was pretty
useless anyhow as it didn't say anything not already contained in the method
name.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:16 +00:00
Vadim Zeitlin
165e563dca Restore 2.8 stock labels for wxID_PREVIEW inadvertently changed in 2.9.
The wxID_PREVIEW labels were accidentally removed in r68641 and added back
with a wrong/different label later. Restore the same one (or almost, just add
an ellipsis at the end) that was used in 2.8.

Closes #13906.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:13 +00:00
Vadim Zeitlin
7c7bd972fa Add a hack to prevent the test suite from aborting after Grid test case.
There is a problem with the native header control still having the mouse
capture when the grid is destroyed in wxGTK and this resulted in asserts when
destroying the grid, nested asserts due to an exception being thrown from a
dtor and finally abort that prevented the rest of the tests from running.

As I failed to find the real reason for this problem, just forcefully ensure
that we don't have the mouse capture when destroying the grid. This at least
allows the complete test suite to run.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:10 +00:00
Vadim Zeitlin
b57655127d Improve error reporting for nested asserts failures in the test suite.
If an assert occurred while handling an exception generated by a previous
assert handler, the information about the original assert was lost even if
though it was more important than the secondary assert. Do preserve and show
the original assert message in this case now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:08 +00:00
Vadim Zeitlin
af184f1d2f Work around wxDateTime::ParseFormat() problem in generic wxDateTimePickerCtrl.
Due to a bug in wxDateTime::ParseFormat(), calling it with wxString::c_str()
currently just crashes, so don't do this in generic wxDateTimePickerCtrl code.
The real fix is, of course, to correct the bug in wxDateTime itself but for
now this at least prevents the crash when executing the test suite. And using
c_str() here is unnecessary anyhow.

See #14214.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:05 +00:00
Vadim Zeitlin
182cad34aa Preserve wxComboBox selection when modifying the selected item in wxGTK too.
This does the same thing as r70018 did for wxMSW but for wxGTK, i.e. it keeps
the combo box item selected when its text is modified.

This fixes [Bitmap]ComboBox unit tests under wxGTK.

See #13769.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:01 +00:00
Vadim Zeitlin
b90aca4cba Enable wxComboBox::SetString() test in the widgets sample.
It was disabled because it wasn't implemented for wxGTK at some time in the
past -- but it is implemented now, so there is no reason to not allow testing
it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:21:57 +00:00
Václav Slavík
550a0c4154 Don't use ancient -no-cpp-precomp flag on OS X.
See http://trac.wxwidgets.org/ticket/14029 for a discussion of the
problems it causes when using non-Apple compiler. Even for Apple's GCC,
it does nothing these days and we no longer support OS X 10.3, so
there's no point in continuing to use it.

Fixes #14029.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 09:36:44 +00:00
Vadim Zeitlin
39258ad796 Make wxGTK code returning correct focus in popup menu presence more robust.
Replace the changes of r69938 with an alternative and simpler solution:
instead of playing games with gs_pendingFocus, which could break down if its
old value became invalid while the menu was shown as happened if one of the
menu commands resulted in this window being destroyed, just take the currently
shown popup menu into account in DoFindFocus() itself.

This should be safer as there is no danger of any dangling pointers here and
is also simpler and more obviously correct.

Closes #14103.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:25:26 +00:00
Vadim Zeitlin
7e7ba0dfc5 Add missing "flags" argument to wxNotificationMessage ctor in wxMSW.
It was impossible to specify the flags when creating wxNotificationMessage in
wxMSW, cotrary to the other ports and the documentation.

Fix this by adding the missing argument to the ctor and simply passing it to
the base class one, we don't have to do anything else as the existing code
already calls GetFlags() later so it should respect these flags without any
more changes.

Closes #14245.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:25:23 +00:00
Vadim Zeitlin
a610eb7369 Fix crash in wxFileConfig when deleting last entry of the root group.
This resulted in keeping a dangling pointer to the group line in
wxFileConfigGroup and any attempt to use it after this resulted in a crash.
Fix this by explicitly resetting the last line in this case.

Also add a unit test for this scenario.

Closes #14243.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:25:19 +00:00
Vadim Zeitlin
586bed9446 Make it possible to forward declare wx{Choice,Tool,Tree}bookEvent again.
Don't use typedef for these classes as it makes it impossible to
forward-declare them, just use #define instead as we already do for
wxListbookEvent and wxNotebookEvent. This allows forward declaration and is
also more consistent.

Closes #12242.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:25:15 +00:00
Vadim Zeitlin
6ce2b9f11f Use generic wxAboutBox() in wxUniv/GTK.
The native GTK implementation is not used in wxUniv/GTK, so don't exclude the
generic one as well.

Notice that the same should be done for wxMSW and wxOSX too but we currently
seem to use the native version even in wxUniv there. It would be better to
consistently use the generic version in all wxUniv ports.

Closes #14236.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:25:07 +00:00
Vadim Zeitlin
c87df234ac Don't change wxTextEntry value if it didn't really change.
This is not only unnecessary but also can result in a kind of infinite loop
when wxTextEntry::SetValue() is called from wxEVT_IDLE handler as really
modifying the text results in another wxEVT_IDLE being generated and another
call to SetValue() and so on while not doing it in the first place completely
works around the problem and is also more efficient.

Closes #13936.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:25:03 +00:00
Vadim Zeitlin
d9abe7f2f9 Run some wxTextCtrl unit test cases for single and multi-line controls.
Some of the tests that were previously ran for single or multi-line controls
only actually apply to both of them, so run them for both kinds of control to
test that both of them work correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:25:01 +00:00
Vadim Zeitlin
358fb6ada6 No changes, just refactor wxTextCtrl unit test case.
Allow running the same tests for both single and multi-line controls easily.
No real changes yet though, the tests are still ran for the controls with the
same styles as before for now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:24:59 +00:00
Vadim Zeitlin
d4bc7a1601 Recognize wxDefaultDateTime in gdb wxDateTime pretty-printer.
Trying to print an uninitialized/invalid wxDateTime in gdb resulted in an
error (Python exception from datetime module), recognize it specially now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:24:57 +00:00
Vadim Zeitlin
586c455167 Don't block in wxEventLoopManual::Dispatch() if loop was exited.
If Exit() was called from a handler for one of the pending events we could
reenter Dispatch() and block there indefinitely if no other events were coming
and this was exactly what happened in wxFileSystemWatcher unit test,
preventing it from ever running to completion under Unix.

Fix this by checking m_shouldExit after executing the pending handlers and
before calling Dispatch().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:24:54 +00:00
Vadim Zeitlin
a6a181a303 Add a gdb pretty-printer for wxFileName objects.
This pretty-printer works by calling the C++ wxFileName::GetFullPath()
directly instead of interpreting the object data from gdb because this is much
simpler to do, so it can only be used when debugging live programs. If this is
a serious restriction, it would need to be changed to use gdb data access only
later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:24:52 +00:00
Vadim Zeitlin
c8648b64a6 Fix harmless warnings about hiding base class virtual in dialogs sample.
GetTitle() added in r71213 resulted in virtual function warnings from g++, fix
them by renaming it to GetBoxTitle().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:24:50 +00:00
Vadim Zeitlin
a55602fafa Don't use too big width for wxHtmlHelpWindow navigation panel.
The width of the navigation panel in wxHtmlHelpWindow could become arbitrarily
high if long items used. Avoid this by using a reasonably large but not too
big minimal width instead of determining it automatically from the items width.

Closes #13754.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:24:47 +00:00
Vadim Zeitlin
49b489e80f Fix erasing wxHtmlWindow background in wxUniv.
Prevent the default wxWindow-level wxEVT_ERASE_BACKGROUND handler from being
used in wxUniv for wxHtmlWindow. This is unnecessary as it has its own handler
anyhow and also doesn't work for some reason as erasing wxMemoryDC by drawing
a solid rectangle over it seems to be broken in at least wxX11.

Work around this problem by erasing the background in wxHtmlWindow itself if
no user-defined (as opposed to any, including one defined in wxWindow itself)
handler for this event exists.

Closes #13880.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:24:43 +00:00
Vadim Zeitlin
4fbb421ba9 Handle kCGImageAlphaNoneSkipFirst correctly in wxOSX wxBitmap code.
The code tested twice for kCGImageAlphaNoneSkipLast which was clearly wrong.
The original intention was probably to check for both it and
kCGImageAlphaNoneSkipFirst, so fix it to this now.

Closes #14019.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:24:40 +00:00
Vadim Zeitlin
93be446f3a Fix wxBitmapButton best size calculation in wxOSX/Carbon.
wxAnyButton refactoring broke the best size computation for Carbon, fix it to
work as it did before.

Closes #13830.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:24:36 +00:00
Vadim Zeitlin
0531b19965 Document the change in wxEVT_SIZE generation for wxDialogs in wxMSW.
These events are now generated earlier and can result in crashes if the
controls they use are not initialized yet.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:24:34 +00:00
Vadim Zeitlin
586f402336 Document that wxDCClipper currently resets clipping region.
Unlike other similar classes, this one doesn't restore the previous clipping
region but just resets it because there is no way to get the current clipping
region from wxDC now. At least document this limitation until it can be fixed.

See #13834.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 22:24:31 +00:00
Vadim Zeitlin
d6256ab96d Added note about WXWIN_COMPATIBILITY_2_6 being off in 2.9 by default.
Also list some concrete symbols which are not available any more and their
replacements.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-27 22:35:08 +00:00
Julian Smart
d022fa4e45 Restored the exact-fit-button horizontal margin calculation from 2.8 since it was too cramped.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-27 11:39:52 +00:00
Robin Dunn
8746b63ff7 Typo fix, and add some missing methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-26 01:29:00 +00:00
Julian Smart
23698b123b Fixed floating image layout when typing in subsequent paragraph
Now makes use of max size for images and keeps the image size reasonable
Added original image size so can usually avoid reloading image when recomputing
cached bitmap size
Takes into account bottom of the last floating image so scrollbars are
set correctly
Original image size is shown in disabled size controls


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-25 11:42:31 +00:00
Julian Smart
c6182d489c Added custom properties to style definitions and style sheets
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-24 11:22:18 +00:00
Paul Cornett
ee1787872d Remove code to find topmost X window in SetTransparent().
The purpose of this code is unknown, but it may be intended to make WM
decorations transparent. But it causes a crash when docking an AUI panel.
And in my testing the decorations are transparent even without this code.
Fixes #4841


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-24 05:38:12 +00:00
Julian Smart
e059e1bb33 Added flags to SetStyle with specific object
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-23 16:54:52 +00:00
Robin Dunn
ac03e0173b Fix missing and broken interface items for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-21 00:07:31 +00:00
Paul Cornett
3cc04de73e defer queue-resize until after size-allocate processing, to keep it from being ignored by GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-20 16:05:13 +00:00
Paul Cornett
1104248bb5 silence warning about wxOSX_USE_COCOA not being defined
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-20 15:34:24 +00:00
Robin Dunn
70175534bf Make wxTaskBarIcon's ctor have the same API on all platforms even though setting the icon type can only be done on wxOSX-cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-20 05:41:54 +00:00
Robin Dunn
b83b7724da Document SetDoubleBuffered
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-20 05:41:39 +00:00
Paul Cornett
01a49fd4c4 move widget resize handling from DoSetSize to DoMoveWindow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-19 17:15:40 +00:00
Paul Cornett
0604cfd7b9 simplify default border code in DoSetSize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-19 16:51:06 +00:00
Paul Cornett
4d711190c7 rearrange some code in DoSetSize to facilitate upcoming changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-19 16:44:59 +00:00
Vadim Zeitlin
34670bdafe Fix for wxUniv/GTK compilation.
wxWindowBase needs to be explicitly cast to wxWindow in wxUniv/GTK build but
this wasn't done in the changes of r70597.

Cloes #14235.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-19 16:14:18 +00:00
Vadim Zeitlin
3d0905aba8 Correct wxPaintDC base class in the documentation.
wxPaintDC derives from wxClientDC, not wxWindowDC.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-19 16:14:16 +00:00
Paul Cornett
90dcb0d968 Adjust x,y parameters by pizza scroll offset in DoSetSize
This should cause no change in behavior, and is merely preparation for further changes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-18 16:30:11 +00:00
Vadim Zeitlin
6ca243fc75 Don't set focus to hidden window in wxSetFocusToChild().
The window that had focus previously could be hidden now, but its parent could
be hidden as well so it's not enough to set focus to it but we need to loop
until we find a visible ancestor.

Closes #14230.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-18 09:23:05 +00:00
Robin Dunn
34a9a3528f Fix missing and broken interface items for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-17 17:00:36 +00:00
Stefan Csomor
38274d1de3 avoiding potential mismatch between true and expected state of wxGraphicsContext because it might have been changed through its direct API meanwhile, fixes #14226
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-17 16:57:12 +00:00
Vadim Zeitlin
d60a9c00e4 Add possibility to change the test message box title in dialog sample.
All the other message box elements were configurable, so why not this one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-17 13:57:18 +00:00