Commit Graph

57353 Commits

Author SHA1 Message Date
Paul Cornett
dca2fe5dae Move code that does not need realized GdkWinow out of realize handler
These calls can be made much earlier, and it seems like a good idea to do so.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 15:01:06 +00:00
Vadim Zeitlin
60435227b1 Only give capture to wxPopupTransientWindow child if it's the only one.
This removes the arbitrariness of using the first child which didn't make any
sense when the popup had several controls inside it, e.g. in wxRichToolTip
case this resulted in the mouse capture being given to wxStaticBitmap showing
the tooltip icon even though it didn't need it at all.

This probably doesn't really change the observable behaviour but seems more
logical.

See #15288.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:28 +00:00
Vadim Zeitlin
5f9e369af0 Use wxFindWindowAtPoint() for hit testing in wxPopupTransientWindow.
This works even with irregularly shaped windows such as wxRichToolTip unlike
the old naive test using wxRect::Contains() which didn't and resulted in us
believing that the mouse was outside the window when it was still in it and
(somehow, the details are not totally clear) recapturing the mouse again and
again in the same window which resulted in assert failures with the new checks
in wxWindowBase::CaptureMouse() or the capture stack corruption before this.

Closes #15288.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:23 +00:00
Vadim Zeitlin
bf2c43c76e Return NULL from wxWindow::GetCapture() when the capture is being lost.
Make GetCapture() return NULL during wxEVT_MOUSE_CAPTURE_{LOST,CHANGED} events
processing in wxMSW to help their handlers to avoid calling ReleaseCapture():
this shouldn't be done as the mouse capture is being lost anyhow and results
in reentrancy problems between NotifyCaptureLost() and ReleaseCapture() if
it's called.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:19 +00:00
Vadim Zeitlin
2d145378f6 Make mouse capture checking asserts stronger and more detailed.
Verify not only that we don't destroy the window having the capture now but
also that this window is not in the mouse capture stack at all, not
necessarily on top. This is important as keeping a dangling pointer in the
capture stack would result in difficult to diagnose bugs later.

Also check that we don't recapture the mouse in the same window as this should
never be necessary.

Finally, give more details in the assert checking that the window does have
capture in ReleaseMouse().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:16 +00:00
Vadim Zeitlin
af2372b95d Don't set even try to set focus to wxPopupWindow itself in wxMSW.
This doesn't work anyhow with our popup window implementation (it's a child of
the desktop and we can't set focus to it) and provokes error messages due to
::SetFocus() failures, so simply don't do this at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:13 +00:00
Vadim Zeitlin
0c60a0e2b7 No changes, just change data structures used by mouse capture code.
Use a simple stack of windows instead of a separate singly linked list and a
separate current capture pointer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:09 +00:00
Vadim Zeitlin
b0ad1918b9 No changes, just use wxRecursionGuard instead of manual boolean flag.
Use wxRecursionGuard with the flag indicating whether the mouse capture is
changing to ensure that we always reset it correctly and make the code
slightly shorter.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:06 +00:00
Vadim Zeitlin
ae1cdb2d07 No changes, just move mouse capturing bookkeeping data out of wxWindow.
All mouse capture-related data doesn't have to be declared in wxWindow itself
and can just be global in wincmn.cpp, so move it there, this will facilitate
further changes as they won't require recompiling everything any more.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:02 +00:00
Paul Cornett
992bf7cfac should have been part of r74664: Avoid calling gtk_window_get_position() from "configure-event" handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 04:28:28 +00:00
Paul Cornett
3eee64e7cf avoid duplicate move events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-17 16:38:12 +00:00
Paul Cornett
c37b0f0907 Avoid calling gtk_window_get_position() from "configure-event" handler, if possible.
This avoids a round trip to the X server, which is expensive over a remote connection.
Closes #15116


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-17 16:25:13 +00:00
Bryan Petty
fa0681e744 Fix typo in wxSingleInstanceChecker docs, props Lauri Nurmi.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-16 18:17:01 +00:00
Paul Cornett
0c80814ffe use names for gs_requestFrameExtentsStatus values
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-16 15:43:51 +00:00
Vadim Zeitlin
00dc8bac3c Replace wxFONTFAMILY_DEFAULT with wxFONTFAMILY_SWISS when comparing fonts.
Otherwise comparison always failed as no existing fonts had
wxFONTFAMILY_DEFAULT as their family in all ports except wxOSX, which does
keep wxFONTFAMILY_DEFAULT.

Closes #15410.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-16 11:04:39 +00:00
Stefan Csomor
31fda0c2cf forgotten commit :-( remove #if 0 if things work again
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-14 20:34:53 +00:00
Václav Slavík
69c7c9375c Fix wxComboCtrlBase::DoGetSizeFromTextSize() performance regression.
r72935 introduced code that created a temporary wxComboBox control to
take measurements. This is very expensive in MSW and adds noticeable
delay when creating more than a few controls.

Replace with equivalent wxMSW code that computes the height in the same
way other wxMSW controls do.

The wxGTK version cannot be eliminated in the same way, so at least add
some basic caching there. It's much less of a problem, because GTK+
controls creation is much cheaper than MSW one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-14 15:47:21 +00:00
Stefan Csomor
28f058d35e using terminate: terminates prematurely, OnExit is not called anymore
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-14 09:43:31 +00:00
Stefan Csomor
b0fa6efc8b using #ifdef wxABORT_ON_CONFIG_ERROR not just #if as elsewhere
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-14 09:15:16 +00:00
Vadim Zeitlin
88e264616b Don't hide the window in its dtor in wxGTK.
This results in sending an unexpected wxShowEvent to an already half-destroyed
(because the derived class dtor had been already executed) by now object which
could provoke crashes. And it also seems to be completely unnecessary as the
window is going to be destroyed anyhow -- and the other ports don't hide it
before this happens (unless it's a TLW in which case it is already hidden in
wxTopLevelWindowBase::Destroy()).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-13 17:36:47 +00:00
Paul Cornett
3e5a70b5d7 avoid setting pango matrix when not needed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-12 16:24:42 +00:00
Stefan Csomor
c8841d1493 using #ifdef wxABORT_ON_CONFIG_ERROR not just #if as elsewhere
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-11 06:39:20 +00:00
Vadim Zeitlin
8abbca789f Tamil translations update from Dinakar T.D.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-09 20:55:27 +00:00
Vadim Zeitlin
9d94efd8b0 Remove never implemented wxDateTime::IsGregorianDate().
This method was declared and even documented but never actually implemented,
and GregorianAdoption enum used by it had many incorrectly defined elements.

Just remove both the method and the enum instead of fixing/implementing them
as they are not that important (as witnessed by the fact that nobody has
complained about the method being missing since almost 15 years).

Closes #15400.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-09 20:55:20 +00:00
Julian Smart
fc63fb9aaf Applied #15393 (dghart) fixing wxRichTextTable for percentage widths
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-09 11:56:33 +00:00
Paul Cornett
fd51987ff0 add other known types for gdk_pixbuf_save()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-08 05:59:18 +00:00
Paul Cornett
c2f8c2b245 Try native method first in LoadFile() and SaveFile()
closes #15394


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-08 05:43:24 +00:00
Václav Slavík
07fb285c52 Make wxOwnerDrawnComboBox::DoGetBestSize() twice as fast.
Don't call the very expensive wxComboCtrlBase::DoGetBestSize() method
when not needed - it calls wxComboCtrlBase::DoGetSizeFromTextSize(),
which is very expensive.

Also fix the code so that it doesn't apply GetSizeFromTextSize() twice
(once in the base class' DoGetBestSize(), once here).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-07 17:33:42 +00:00
Vadim Zeitlin
f592a93992 Compilation fix for wxMSW with wxUSE_MSGBOX_HOOK==0.
Include wx/fontutil.h unconditionally, it's needed outside message box hook
code.

Closes #15395.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-07 15:44:56 +00:00
Vadim Zeitlin
2d3ae5c537 Compilation fix to propgrid sample after r74628.
Use wxMax() and wxMin() instead of std::max() and min().

Also work around wrong for loop scoping for VC6.

See #15368.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-07 12:08:10 +00:00
Vadim Zeitlin
3939acd2f7 Document light grey colour handling in wxMSW wxBitmap::LoadFile().
For historical/compatibility reasons we handle this colour as transparent in
wxMSW when loading the bitmaps from resources, but this is rather not obvious
for the new users, so document it and provide a way of compensating for this
in the documentation as well.

Closes #15371.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-07 11:08:38 +00:00
Vadim Zeitlin
401aad6ce8 Define __VISUALC__ for ICC under Windows again.
During the refactoring of r74496, the logic of the check for Intel compiler
was slightly altered resulting in not defining __VISUALC__ for it any longer
which broke compilation with it.

Restore this definition now to fix it, even though it could admittedly be
better to explicitly check for __INTELC__ in the places where we currently
only check for __VISUALC__ and reserve the latter only for the case when we
are really using MSVC.

Closes #15359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-07 11:08:33 +00:00
Vadim Zeitlin
5bd6ad08a7 Add wxFileName::SetPermissions().
This is a simple wrapper for the POSIX chmod().

Closes #12951.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-07 11:08:28 +00:00
Vadim Zeitlin
985addd986 Update Travis configuration to run tests and build more configurations.
Install libcppunit-dev in order to be able to run the unit tests (at least the
non-GUI ones for now).

Also build in several configurations: shared/static, multilib/monolithic and
also STL. This should help to find problems appearing only in some specific
build variants.

Closes #15369.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-07 11:08:21 +00:00
Vadim Zeitlin
570a6d968a Don't document wxSortedArrayString as deriving from wxArrayString.
This is no longer the case since quite some time.

Closes #15374.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-07 11:08:17 +00:00
Vadim Zeitlin
777469ca93 Don't use DDEExec registry key in wxMSW wxExecute() if it's empty.
Some file types have DDEExec subkey in the registry but no value for it, don't
use DDE for launching the files of these types in this case as this only
results in errors.

Closes #15388.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-07 11:08:12 +00:00
Vadim Zeitlin
ccef4c3ad1 Fix column sorting UI in wxDataViewCtrl under wxOSX.
Use -outlineView:didClickTableColumn: delegate method instead of
mouseDownInHeaderOfTableColumn: one to ensure that:

(a) We don't sort the column if it's being dragged/resized (closes #15340).
(b) We sort the column on mouse up, not down (closes #15386).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 17:36:17 +00:00
Vadim Zeitlin
945a5ae749 Fix a couple of spelling mistakes in the documentation.
Closes #15382.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 17:36:12 +00:00
Vadim Zeitlin
dcbf35f87c Use RIAA wrapper for wxSpinCtrl event disabling in wxGTK.
The use of wxSpinCtrlEventDisabler class ensures that we never forget to
reenable the events after disabling them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 17:00:10 +00:00
Vadim Zeitlin
6f026b5b63 Reflect changes in stc.cpp in stc.cpp.in from which it's generated.
This should have been part of r74596, see #15353.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 17:00:04 +00:00
Vadim Zeitlin
b736d59eb5 Don't generate any events from wxSpinCtrl and wxSpinCtrlDouble methods.
After the changes of r53758 wxMSW didn't generate any wxEVT_TEXT events but
this was still the case for the generic version (and hence for
wxSpinCtrlDouble under MSW too) and wasn't documented.

Fix all versions to avoid sending events for programmatic actions, add unit
tests checking this behaviour and document it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 17:00:00 +00:00
Vadim Zeitlin
36a0190ebd Add test for absence of events from wxSpinCtrlDouble ctor.
Run the same NoEventsInCtor() test as we already had for wxSpinCtrl for
wxSpinCtrlDouble as well.

Unfortunately currently there is no way to reuse the tests between these two
classes, we should refactor these test cases to use a common
SpinCtrlTestCaseBase<T> base class.

See #15375 which fixed the underlying bug.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 16:59:54 +00:00
Vadim Zeitlin
d96ec58bf6 Document wxTreeCtrl::GetItemFont() behaviour for items without font.
Explain that this method returns wxNullFont if no font was set for the item.

Closes #15390.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 16:59:49 +00:00
Vadim Zeitlin
33d953e748 Add wxPropertyGridPageState::GetColumnFullWidth().
This method allows to get the full width needed by wxPropertyGrid and is
useful for determining the space to allocate for it, e.g. when creating a
popup showing the property grid, as shown by the changes to the sample.

Closes #15368.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 13:05:42 +00:00
Vadim Zeitlin
9869c26285 Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
Return the real height instead of -1.

Closes #15367.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 13:05:36 +00:00
Vadim Zeitlin
09d3b6944e Dutch translations update from Gideon van Melle.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 12:31:58 +00:00
Paul Cornett
632b58cdce Rewrite ConvertToGreyscale() and ConvertToDisabled()
They do almost the same thing, so use almost the same code.
Fixes ConvertToDisabled() modifying its own data.
Closes #15389


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 06:05:38 +00:00
Paul Cornett
4c99fdfaf4 prevent infinite loop if gtk_menu_popup() fails, fixes #15387
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-05 17:10:58 +00:00
Stefan Csomor
71d9783779 follow up parent chain to properly support modal dialog parents, see #15383
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-05 08:59:38 +00:00
Julian Smart
d4d83a46a9 Comment-only update
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-04 07:58:47 +00:00