Commit Graph

57949 Commits

Author SHA1 Message Date
Vadim Zeitlin
194f7c3d1f Fix appearance of tools with alpha bitmaps in wxMSW wxToolBar.
Recent changes broke the handling of tools with alpha bitmaps as drawing them
on the global toolbar bitmap changes its underlying HBITMAP now, but the code
in wxToolBar didn't expect this.

Fix it by updating the HBITMAP used after every DrawBitmap() call, just in
case it changed (it doesn't cost anything to reset it if it did not).

Closes #15876.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-02 01:15:50 +00:00
Vadim Zeitlin
eebf3f12d5 Make wxFILTER_INCLUDE_LIST in wxTextValidator actually usable.
Only check for its violation once the full text is entered as otherwise
nothing could ever be entered when it was used.

Closes #15778.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-02 01:15:45 +00:00
Vadim Zeitlin
9319b2649c Fix handling of menu items checked before being attached in wxMSW.
Calling wxMenuItem::Check() before appending the item to a menu didn't have
any effect, fix this by checking the item state when actually attaching it.

Closes #15748.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-02 01:15:39 +00:00
Vadim Zeitlin
1ee5d643f1 Prevent wxGrid rows/columns from becoming too small on double click.
The minimal size wasn't respected when auto-sizing rows/columns in
Set{Row,Col}Size() which was called in response to double clicking the
separator line, which resulted in clearly wrong behaviour as the user was
prevented from resizing the row/column to a smaller size by dragging them but
not by double clicking, so fix this to respect the minimal size as well.

Closes #15627.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-02 01:15:34 +00:00
Vadim Zeitlin
9ce54f4fea Fix alpha channel values when using wxGCDC with wxMemoryDC in wxMSW.
Ensure that 32bpp bitmaps selected in wxMemoryDC use DIB for their internal
representation as GDI+ functions don't seem to work correctly with DDBs with
alpha channel.

Closes #13328.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-02 01:15:27 +00:00
Vadim Zeitlin
60d87bbc65 Disable the use of compiler TLS by default under Windows.
While compiler TLS support is simpler to use and much faster than using our
own Win32 API-based TLS implementation, it results in difficult to debug
crashes when used inside a dynamically loaded DLL under Windows XP, so disable
it by default to be safe.

Closes #13116.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-02 01:15:21 +00:00
Vadim Zeitlin
33ae7987ab Move wxCHECK_MINGW32_VERSION() declaration to wx/msw/gccpriv.h.
Unfortunately we can't keep it in wx/compiler.h which is included too early,
before UNICODE macro is defined, and we can't define it before including
wx/setup.h which itself must be included after wx/compiler.h.

So move it to wx/msw/gccpriv.h which is not a great solution, as the best
would be to get rid of this gcc-specific file completely, but at least should
make everything build again and ensure that _mingw.h is included after UNICODE
definition.

Closes #15798.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-02 01:15:13 +00:00
Paul Cornett
ccd6a5fa0e don't avoid no-window widgets in GTKUpdateCursor()
it doesn't work for things like multi-line text control where m_widget is a no-window GtkScrolledWindow

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 21:01:09 +00:00
Paul Cornett
11cecbbf92 fix running with GTK < 2.18 when built with later GTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 20:05:43 +00:00
Paul Cornett
602d813a40 restore non-default cursors in native widgets when unsetting wxCursor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 18:26:21 +00:00
Vadim Zeitlin
9093f22cdf Recompute the tooltip width when changing its text in wxMSW.
This avoids unnecessarily wrapping the tooltips if they are set to a longer
string than their initial value later.

Closes #4685.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 18:22:39 +00:00
Paul Cornett
f883c7783e don't override non-default cursors in native controls when no wxCursor is set, a regression introduced by r75690
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 17:08:25 +00:00
Tim Kosse
3e9e82acae Add Kabyle language, as rare language it uses a three-letter code as per ISO 639-2.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 10:39:32 +00:00
Vadim Zeitlin
7976b83456 Add xh_ribbon.cpp to MSVC 10 ribbon library project.
Fix linking errors when using wxRibbonXmlHandler.

Closes #15927.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 19:14:27 +00:00
Vadim Zeitlin
34a1961e14 Reduce the number of realloc() calls in wxHtmlTableCell.
Don't call realloc() after adding each row, this is horribly inefficient, so
preallocate more memory to avoid this.

Closes #15931.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 18:58:20 +00:00
Vadim Zeitlin
a96c31064b Fix a bug which could result in two default buttons in wxMSW dialogs.
Exchange the order of setting/resetting the new/old button as the default one
when focus is lost/gained to avoid the possibility of having two simultaneously
default buttons at once.

Closes #9528.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:24:53 +00:00
Vadim Zeitlin
95aa0dbb99 Fix handling of wxSET, wxCLEAR and wxINVERT ROPs in wxMSW.
Avoid passing source HDC to MaskBlt() for these ROPs which only use the
destination HDC as they produce garbage instead of just ignoring the source in
if it's non-NULL.

Closes #2047.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:24:48 +00:00
Vadim Zeitlin
dd1b1911f5 Fix wxClientDC::Clear() for scrolled windows in wxMSW.
Take the DC origin into account when clearing a window DC and not only a
memory one.

Closes #2048.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:24:43 +00:00
Vadim Zeitlin
59431015cd Fix wxPrinterDC::DrawIcon() in wxMSW.
Make DrawIcon() work when printing: it previously didn't, as we used
::DrawIconEx() Windows function which wasn't supported when printing.
Work around this by using DrawBitmap() if necessary.

Closes #379.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:24:38 +00:00
Vadim Zeitlin
7c90ac66ee Fix bug with non-NUL-terminaed inputs in wxMBConvUTF8.
We read beyond the provided maximal length as we didn't update the remaining
length while parsing the remaining bytes of an UTF-8-encoded code point.

Fix this and add a test for it.

Closes #15901.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:24:32 +00:00
Vadim Zeitlin
eda112dbfa Fix display of bitmaps with alpha in wxStaticBitmap under MSW.
Avoid double alpha pre-multiplication by converting the bitmap into a non
pre-multiplied format before passing it to STM_SETIMAGE.

Closes #2395.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:24:27 +00:00
Robin Dunn
916c5f96f1 Add some of the Draw* methods that have been available in wxPython.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-27 07:50:41 +00:00
Vadim Zeitlin
74256434cc Fix wx-config --libs in monolithic build.
Don't include non-existent libraries (which are built as part of the main
monolithic one) in this case.

Closes #15567.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-26 13:52:00 +00:00
Václav Slavík
2627b877bb Fix improper NSGraphicsContext handling in wxOSXCreateBitmapContextFromNSImage.
Don't leave currentContext set to the temporary context indefinitely,
but restore the previous one when done. It's apparent from the code that
this is how it was meant to be done.

Not doing this can result in strange, insanely hard to debug errors in
completely unrelated places, because OS X (at least < 10.9) reuses a
pool of contexts. For example, this change fixes Quicklook crashes in
file open panel on 10.8.

For detailed explanation, see the lengthy discussion at
https://code.google.com/p/chromium/issues/detail?id=90140

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-25 17:38:16 +00:00
Vadim Zeitlin
584ae7b854 Don't leave dandling pointers in wxDataViewCtrl in wxOSX.
The previous m_ModelNotifier became invalid but wasn't always replaced with a
valid one, resulting in a crash due to the use of an invalid pointer.

Closes #15910.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-25 17:28:47 +00:00
Stefan Csomor
c376accebf backport, fixes memory leak
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-24 21:08:11 +00:00
Stefan Csomor
cce3135d9d backport, fixes normalization
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-24 21:07:52 +00:00
Paul Cornett
3313a31ed3 fix GetBordersForSizer(), closes #15872
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-24 18:29:45 +00:00
Julian Smart
25684990fa Added an optimisation when the control is frozen
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 21:02:16 +00:00
Paul Cornett
209a3bad20 remove some debugging code inadvertently checked in as part of r75690
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 18:37:29 +00:00
Paul Cornett
50ca21f966 Fix cursor inheritance and busy cursor/global cursor, closes #15801
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 18:27:13 +00:00
Paul Cornett
3fb08cdfe6 use the more appropriate letter 'h' for height
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 05:54:29 +00:00
Paul Cornett
537f4fbf2c fix a couple GTK assertions about setting negative sizes, closes #15891
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 05:47:43 +00:00
Paul Cornett
ef77c65bbb fix wxPopupTransientWindow mouse events with GTK3, also fixes wxOwnerDrawnComboBox, wxDatePickerCtrl. closes #15874
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 04:46:17 +00:00
Robin Dunn
c2bf436db3 Add missing joystick methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 00:17:04 +00:00
Robin Dunn
1ef5afb429 add SetRGB overload
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 00:16:54 +00:00
Vadim Zeitlin
adeb8e69b8 Russian translations update from Dmitry Levichev.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-22 13:10:18 +00:00
Paul Cornett
7b74ec7608 restrict fix from r75668 to GTK3 only, as it might cause flickering
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-22 04:14:46 +00:00
Paul Cornett
1884613a64 Fix best size calculation with GTK3
GTK3 reports preferred size of hidden widgets as zero.
see #15896


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 19:37:13 +00:00
Vadim Zeitlin
0e53ae9eb0 Fix setting fonts and colours for wxToggleButton with bitmaps in wxGTK.
Apply the fixes of r54138 to wxToggleButton too, the problem of #3939 was not
specific to just plain wxButtons.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 12:57:35 +00:00
Vadim Zeitlin
dfe2e8c1e1 Fix possible crash in TAR header parsing code.
Check that the iterator is valid before using its value, otherwise the
validity check was useless.

Closes #15888.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 11:39:45 +00:00
Paul Cornett
06f160a128 avoid crash with GTK3 when deleting an item, closes #15786
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-17 16:50:13 +00:00
Vadim Zeitlin
1612b2f329 wxWindow::SetWindowVariant() does do something under ports other than wxOSX.
Document that this function adjusts the window font size under non-OS X
systems and explain why it should still be used instead of changing the font
size directly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-16 21:41:21 +00:00
Vadim Zeitlin
c795adec8a Ensure that the help viewer keeps running as long as its main frame is opened.
Do prevent the app from exiting when the help frame is shown in the special
case of the help viewer application where the default behaviour of exiting the
application when only the help window remains open is inappropriate and
results in unexpected program exit if we open and then close any dialog, e.g.
from the help frame toolbar.

Even though the previous commit actually already fixed the problem in the
current code, still apply this fix as well, just in case we can (or could, in
the future) should any dialogs with NULL parent in this program.

Closes #15880.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-16 21:33:24 +00:00
Vadim Zeitlin
230b038d50 Avoid automatically closing parent frame if a child dialog was closed.
This counterintuitive behaviour could happen when a dialog of a frame
returning false from its ShouldPreventAppExit() was closed: if there were no
other TLWs in the application, then the parent frame could be closed as well,
even if this clearly shouldn't happen.

See #15880.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-16 21:33:19 +00:00
Robin Dunn
14f0fe8ea9 Add missing GetControl and SetControl methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-14 05:35:42 +00:00
Robin Dunn
7f3cd4d682 add missing GetVeto method
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-14 05:35:33 +00:00
Vadim Zeitlin
eaa854bc8a Document incompatible change to wxWindow::FindWindow() in 3.0.
We now skip the TLW children in this method, see r74721.

Also explicitly mention that TLW "children" are not searched by this function
in the documentation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-13 13:38:05 +00:00
Vadim Zeitlin
5ac0638d95 Support file associations using "show" verb under MSW too.
If we failed to find the "open" command, try the "show" one as some programs
(notable Microsoft viewers for Office file formats) only define the latter but
not the former.

Closes #15821.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-12 14:13:11 +00:00
Robin Dunn
fe2ded6292 Add doc for wxFlexGridSizer::GetRowHeights and GetColWidths
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-10 05:14:12 +00:00