Commit Graph

57929 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
94ba85cf0f Fix mouse wheel event coordinates in wxFrame in wxMSW.
The screen to client conversion for this event coordinates took the toolbar
height into account twice, resulting in a wrong value if the event was handled
in a frame that did have a toolbar.

Closes #15812.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 21:10:17 +00:00
Vadim Zeitlin
22cb0d9062 Portuguese translations update from Manuela Silva.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75557 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 19:20:12 +00:00
Vadim Zeitlin
a56cffc974 Simplify and fix column determination code in wxGridStringTable.
The number of columns in the table is now (since r60717) stored in m_numCols,
so there is no need to get it from wxGrid any more. This is not only simpler
and faster but also more correct as the first row might not have the full
number of values yet.

Closes #15809.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 12:56:48 +00:00
Vadim Zeitlin
121da56ebd Add Aragonese translations by Jorge Pérez.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 22:50:02 +00:00
Vadim Zeitlin
0e1cc953ae Reset sorting column index in generic wxDataViewCtrl when clearing columns.
Otherwise we could continue to use the now invalid index for sorting.

Closes #15803.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 20:48:28 +00:00
Vadim Zeitlin
58ead3e70f Avoid asserts in wxGTK when wxMDIChildFrame::SetSize() is called.
SetSize() doesn't do anything for MDI children in wxGTK and other ports using
TDI version of MDI, but it shouldn't result in an assert from
wxTLW::DoMoveWindow() neither, so override DoMoveWindow() in wxTDIChildFrame
to avoid it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 14:40:26 +00:00
Vadim Zeitlin
fb18392abf Don't keep using the old wxBitmap data after modifying it directly in wxGTK.
Drawing on a wxBitmap via wxMemoryDC modified its pixmap representation in
wxGTK and even if its pixbuf representation was later changed using direct
access to the bitmap pixels, the out of date pixmap continued to be used,
creating the illusion of direct access being completely ignored.

Fix this by purging the old pixmap representation when locking the bitmap for
raw access.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 01:08:10 +00:00
Robin Dunn
e5160f90b4 Turn off wxUSE_COMPILER_TLS for wxPython builds to avoid crashes on XP.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-02 00:21:34 +00:00
Vadim Zeitlin
a5b850387e Fix possible memory leak in BMP reading code.
Don't forget to free the arrays even in case of an error while reading from
the stream.

Closes #15789.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-31 13:58:23 +00:00
Paul Cornett
16ad55c469 fix memory leak, closes #15785
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 19:14:24 +00:00
Robin Dunn
66b03f12eb Add missing wxMenuItem methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:37:10 +00:00
Robin Dunn
81a891c036 Slight tweaks for the wxWebKitCtrl doc.
Remove inline function bodies.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:37:01 +00:00
Robin Dunn
21283845c5 Add wxWebKitCtrl header.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:36:51 +00:00
Robin Dunn
2886c0fdba Workaround for OSX crash in STC’s CallTip popup. Revert this when the fix in #15765 is backported.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:36:41 +00:00
Robin Dunn
ee2868c9ff Document ctors and dtor for wxListView
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:36:32 +00:00
Robin Dunn
6c0da6f516 Add the ability to show a CallTip in the stc sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:36:24 +00:00
Robin Dunn
4a06bb9051 Guard against trying to use extend() with None
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:36:14 +00:00
Vadim Zeitlin
e2f2fbffa9 Don't crash in wxAuiToolBar::GetToolBarFits().
The code could crash if m_overflowVisible was true but m_overflowSizerItem was
NULL. Ideally this shouldn't happen in the first place, but it did, so at
least fix the crash for now -- and hopefully this code will be refactored to
make it more clear later.

Backport from trunk, see #15747.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:18:16 +00:00
Vadim Zeitlin
09bdd20bb7 Document wxMediaState enum.
Closes #15760.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:06 +00:00
Václav Slavík
75ef80751d wxTextFile: don't loose data with CRCRLF line endings.
Previously, when reading files with completely nonstandard - but
occurring in the wild thanks to broken Notepad - files with CRCRLF, all
content would be replaced with empty lines.

Fix the code to do what many editors do with such files: treat this as
data line followed by an empty one. This is not ideal, but it is better
than discarding data - and arguably, silently cleaning up the endings
wouldn't be great either (and would add extra complications for what is
an obscure and broken case).

See http://stackoverflow.com/questions/6998506/text-file-with-0d-0d-0a-line-breaks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-16 18:55:36 +00:00