Commit Graph

55279 Commits

Author SHA1 Message Date
Vadim Zeitlin
25e3f0c69e No changes, just spelling corrections in the comments.
Closes #14275.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-05 14:09:59 +00:00
Vadim Zeitlin
8e8d910979 Update the field widths on demand in wxStatusBarGeneric.
This ensures that the value returned from GetFieldRect() is always up to date,
even when this method is called from the user-defined wxEVT_SIZE handler, i.e.
before our own OnSize() could run.

Also remove the now unneeded hack with calling the base class OnSize() from
the statbar sample.

Closes #14268.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-05 11:22:09 +00:00
Stefan Csomor
71940de693 fixes crashes with embedded controls in toolbars after toolbar destruction, code was moved in r62988, but apparently Destroy doesn't have to be called, so do a last check, fixes #14258
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-05 05:32:19 +00:00
Vadim Zeitlin
f8ab0cdb3e Don't return NULL widget from wxFileCtrl page of widgets sample.
This makes all the common operations such as setting tooltip, colours &c on
this page simply crash.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 22:20:59 +00:00
Vadim Zeitlin
5804d539be Derive wxGenericFileCtrl from wxControl.
wxFileCtrl -- which can be #define'd as wxGenericFileCtrl -- is documented to
inherit from wxControl and does derive from it in the native GTK version, so
do it for the generic version too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 22:20:55 +00:00
Vadim Zeitlin
43868fdedc Improve documentation of wxDataViewCtrl mouse event handling.
Explain that catching mouse events directly doesn't work.

Also make it clear that double clicking an item can be caught by processing
wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED.

See #14111.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 20:35:52 +00:00
Vadim Zeitlin
e762ef8f53 Fix precompiled headers use with MSVC in wxGTK sources.
Don't use PCH for C sources, do include wx/wxprec.h from all wxGTK C++
sources.

Closes #14224.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 20:35:48 +00:00
Vadim Zeitlin
982a0fcd28 Declare variables before doing anything else in C code.
Don't put statements before variable declaration in C source file. This fixes
compilation with non C99-compliant C compilers such as MSVC.

See #14224.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 20:35:44 +00:00
Vadim Zeitlin
7d2295a0ca Allow using non-MSW toolkit in MSVC-specific auto-linking header.
This makes it possible to auto-link wxGTK library when using MSVC too.

Closes #14272.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 20:35:41 +00:00
Vadim Zeitlin
47eab2f2e5 Define wxCONCATn() macro up to n=9 from n=5 previously.
We'll need it for n=6 for the next commit, so increase the max value of n a
bit more.

See #14272.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 20:35:37 +00:00
Vadim Zeitlin
0302691e86 Use GTK-based wxWebView when using GTK+, not under Unix.
Test for the GTK+ toolkit, not Unix platform to determine whether GTK+
wxWebView version should be used.

Closes #14273.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 20:35:33 +00:00
Vadim Zeitlin
c9f6f0a8cd Add wxDir::GetNameWithSep() and use it to avoid consecutive slashes.
It is wrong to use dir.GetName()+"/" to obtain a slash-terminated directory
name as this results in (usually harmless but at best ugly) double slashes at
at the beginning of the string for the root directory. Add GetNameWithSep() to
obtain the correct result in all cases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 20:35:31 +00:00
Vadim Zeitlin
50cbca27ad Document wxTP_DEFAULT as a standalone constant.
Make sure the declarations in the documentation header can be really parsed.

Closes #14270.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 20:35:26 +00:00
Vadim Zeitlin
bb91ff63bc Don't remove the last slash from "/" directory name under Unix.
This was totally wrong as it returned empty string as (invalid) directory
name.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 18:31:48 +00:00
Robin Dunn
7bb22bd68d Add wxDropSource::SetIcon for wxGTK to mimic SetCursor on the other ports.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-03 23:30:40 +00:00
Robin Dunn
07b6b12176 * Change "def" to defResult as def is a reserved word in Python
* Correct some methods that were marked pure virtual but which aren't.
* etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-03 23:30:33 +00:00
Robin Dunn
4e4fffec19 fix incorrect default values
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-03 23:30:27 +00:00
Vadim Zeitlin
df8cd0bd5e Document wxDataViewChoiceByIndexRenderer.
At least briefly document this class too and not only its parent
wxDataViewChoiceRenderer one.

Closes #14265.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-03 10:17:19 +00:00
Vadim Zeitlin
2ebef6d174 No changes, just remove duplicate flags checks in wxUniv wxTLW.
For some reason (rename of the old wxTHICK_FRAME to wxRESIZE_BORDER?) we
tested for wxRESIZE_BORDER twice in a couple of places. Don't do it for
clarity.

Closes #14264.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-03 10:17:15 +00:00
Stefan Csomor
18a7376a34 use explicit WakeUp variant, too many errors using heuristics, fixes #14176
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-02 19:38:58 +00:00
Stefan Csomor
4b0a48dbac make WakeUp variant explicit, too many errors using heuristics, like #14176
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-02 19:30:11 +00:00
Stefan Csomor
6e22db9e3e fixes #14178
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-02 18:44:23 +00:00
Dimitri Schoolwerth
ae580de376 Fixed parts of toolbar background not being drawn with older comctl32.dll.
When using comctl32.dll versions older than 6.0 toolbar icons would not have their background drawn. Fix this in a rough way by always completely erasing the background like was done before. Regression since r62971.

Closes #13512.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-02 14:44:45 +00:00
Vadim Zeitlin
c06efacb1c German translations update from Thomas Krebs.
Closes #14262.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-02 10:37:36 +00:00
Václav Slavík
dea9430d44 Fix destruction of wxDataViewCtrl's editor control.
Don't pop event handler from the control more than once.

See r70002 and r70005 (which this reverts) for reference.

Fixes #14215.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-30 14:51:52 +00:00
Václav Slavík
840fc4d170 wxDataViewCtrl: always update the header when col best width changes.
Have an explicit per-column dirty flag and use that to determine whether
we need to call wxHeaderCtrl::UpdateColumn(). Previously, the lack of
computed best width was used as an indicator, but this didn't work
correctly if some code called GetWidth() after invalidation but before
wxDataViewCtrl::UpdateColWidths() was called at idle time. This resulted
in header's column widths getting out of sync with the control itself.

Fixes #14167.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-30 09:33:30 +00:00
Václav Slavík
b6b171522b Invalidate wxDataViewCtrl bests widths on expand/collapse.
The best column widths are computed from "realized" items that are
available as rows in wxDataViewCtrl. This information changes when a
previously collapsed node is expanded and new items become available for
column width calculation.

Fixes #14167.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-30 09:33:25 +00:00
Václav Slavík
f0630187ea Respect minimal width in wxDataViewCtrl::GetBestColumnWidth().
See #14167.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-30 09:33:21 +00:00
Vadim Zeitlin
1b29603d20 Work around the problem with not exiting event loop under MSW.
Changes of r71304 broke the event loop termination under MSW, limit them to
only the case in which they were really needed, i.e. when loop is really
exited by a pending event handler.

This is only a temporary solution, we need something better in longer term.

See #14250.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:48:20 +00:00
Vadim Zeitlin
f330dce9b7 No changes, just refactor common IsSorted() tests in wxGTK wxDataViewCtrl.
Add wxDataViewCtrlInternal::ShouldBeSorted() helper instead of testing for
both IsSorted() and wxDataViewModel::HasDefaultCompare() in several places.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:34 +00:00
Vadim Zeitlin
87cf085e96 No real changes, just make wxDataViewCtrlInternal::IsSorted() const.
This is a simple accessor, should have been const since the beginning.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:32 +00:00
Vadim Zeitlin
f2f5d11c0e Use PCH in the tests in all Windows ports and not only when using wxMSW.
This change doesn't actually change anything for the "normal" ports as it only
affects wxGTK/MSW which is not officially supported yet, so the make/project
files are unchanged by it.

Closes #14249.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:28 +00:00
Vadim Zeitlin
c04be1a29f Added wxDataViewEvent::SetDragFlags() and GetDropEffect() methods.
Allow specifying the drag operation flags and retrieving the drop effect when
it's over for wxDataViewCtrl drag-and-drop.

Currently this is only implemented in the generic version.

Closes #12583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:25 +00:00
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