Commit Graph

57992 Commits

Author SHA1 Message Date
Stefan Csomor
48971280a5 make things work as advertised
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-24 20:27:19 +00:00
Stefan Csomor
3ad6684b63 fixing memory leak
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-24 19:55:42 +00:00
Paul Cornett
5744fad0f9 fix GetBordersForSizer(), closes #15872
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-24 18:29:45 +00:00
Julian Smart
15d0a86eb2 Added an optimisation when the control is frozen
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 21:01:46 +00:00
Paul Cornett
04ad5f5aea remove some debugging code inadvertently checked in as part of r75690
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 18:37:29 +00:00
Paul Cornett
9f09241cd0 Fix cursor inheritance and busy cursor/global cursor, closes #15801
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 18:27:13 +00:00
Paul Cornett
7df4846118 use the more appropriate letter 'h' for height
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 05:54:29 +00:00
Paul Cornett
eb1f6dd806 fix a couple GTK assertions about setting negative sizes, closes #15891
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 05:47:43 +00:00
Paul Cornett
6286f9b1ef fix wxPopupTransientWindow mouse events with GTK3, also fixes wxOwnerDrawnComboBox, wxDatePickerCtrl. closes #15874
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 04:46:17 +00:00
Robin Dunn
e5b5f18c3d Add missing joystick methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 00:18:06 +00:00
Robin Dunn
82f1df8a6d add SetRGB overload
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 00:17:57 +00:00
Vadim Zeitlin
344c9f7087 Russian translations update from Dmitry Levichev.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-22 13:10:40 +00:00
Paul Cornett
8bfcb398df restrict fix from r75668 to GTK3 only, as it might cause flickering
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-22 04:14:46 +00:00
Vadim Zeitlin
3b3930d62a Remove unnecessary CommandStateChangeConstants enum redeclaration.
This declaration conflicted with the one in the latest MinGW-W64 headers and
wasn't needed anyhow as we don't use neither the enum itself nor its members
in our code, so just remove it to fix the build in 64 bits with MinGW-W64 4.8.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 21:46:09 +00:00
Paul Cornett
6d7522952a 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/trunk@75668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 19:37:13 +00:00
Vadim Zeitlin
eba3e39426 Move deprecated wxFont ctor implementation out of line.
Blind fix to avoid strange warnings given by OS X build slave about the ctor
being deprecated when it's defined, not used.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 19:32:04 +00:00
Vadim Zeitlin
9d3550f413 Add a virtual dtor to wxEventLoopSourcesManagerBase to avoid g++ warnings.
This virtual dtor is not really needed as manager objects are static
singletons and are not destroyed via their pointer, but add a virtual dtor
just to avoid g++ warnings about its absence.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 19:32:00 +00:00
Vadim Zeitlin
69fe5785b6 Send events when toggling wxPropertyGrid nodes from keyboard.
Closes #15899.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 18:39:14 +00:00
Vadim Zeitlin
c96fc29a52 Draw the selected bitmap correctly in wxMSW buttons.
Clear the previously drawn bitmap before drawing the new one.

Closes #12550.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 18:39:09 +00:00
Vadim Zeitlin
82a774cf98 Avoid selecting invalid tab when removing last page from wxOSX wxNotebook.
Closes #15897.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 18:39:03 +00:00
Vadim Zeitlin
e3c7cd18d6 Remove unnecessary redundant assignments.
Don't assign values consecutively to the same variable without using it in
between the assignments, this is useless.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:41 +00:00
Vadim Zeitlin
8cca19809b Remove redundant checks from conditional statements.
It is not necessary to test for the condition which is already known to be
true or false because the code is inside the if statement checking it.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:35 +00:00
Vadim Zeitlin
3637808c39 Correct wrong error handler in wxDialUpManagerMSW code.
Forgot to set the success flag to false if thread creation failed.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:29 +00:00
Vadim Zeitlin
4db74850dc Don't pass input parameter by non-const reference unnecessarily.
This is confusing.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:23 +00:00
Vadim Zeitlin
eef9b03d24 Don't pass ID to wxWindow::LoadNativeDialog() by reference.
This is completely unnecessary and confusing.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:19 +00:00
Vadim Zeitlin
d2f125aa35 Pass non-primitive types by const reference instead of value.
No real changes, just avoid the unnecessary copying and also make the
signatures more consistent by adding the apparently forgotten "&" in a couple
of places.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:08 +00:00
Vadim Zeitlin
62e17153c2 Fix exit on last TLW logic after the change of r75633.
The changes in this revision meant to prevent the closure of transient dialogs
from quitting the application (see #15880) prevented any application using AUI,
including the aui sample, from exiting as the AUI utility frames deleted
during the main frame destruction were returning false from their
IsLastBeforeExit() now.

Fix this by relaxing the check and ignoring the parent if it is already being
deleted anyhow -- in this case there is no danger of closing it accidentally.

Closes #15894.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:44:55 +00:00
Vadim Zeitlin
a81511317b Deal correctly with non-ASCII hostnames in wxGetFullHostName() in wxMSW.
Somewhat surprisingly, Windows can return a non-ASCII string from
gethostname(). It's not really clear what happens if the host name is not
representable in the current locale encoding at all, but at least make the
function work in case it is.

Closes #15875.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:44:50 +00:00
Vadim Zeitlin
ddd761f2d9 Ensure wxChoice reported width never becomes negative in wxMSW.
Don't set the pending size to (-1, valid-height) as it is always supposed to
be either fully valid or fully invalid (meaning there is no pending size
change).

Closes #15723.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:44:44 +00:00
Vadim Zeitlin
0997127e37 Work around g++ warning about comparing compatibility_iterator with NULL.
Use double negation to placate both it and MSVC, see r75445.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 19:03:28 +00:00
Vadim Zeitlin
239d77c8e4 Use wxUSE_WXDIB in preprocessor tests.
NEVER_USE_DIB is meant to be used only in conjunction with
{SOMETIMES,ALWAYS}_USE_DIB constants, use wxUSE_WXDIB elsewhere.

This is more logical and also fixes inadvertent use of NEVER_USE_DIB before it
is defined added by the changes of r75648.

See #13328.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 14:14:23 +00:00
Vadim Zeitlin
c4e312efb9 Exclude wxMSW-specific code from compilation under other platforms.
Compilation fix after r75648, see #13328.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 14:14:18 +00:00
Vadim Zeitlin
7ded29f297 Improve appearance of tools using bitmaps with alpha in wxMSW wxToolBar.
Use alpha in the combined toolbar bitmap if any of its tools has a bitmap
using alpha. This greatly improves the appearance of the automatically
generated disabled images for the tools with bitmaps using alpha.

See #15876.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 13:16:02 +00:00
Vadim Zeitlin
0824752236 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/trunk@75649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 13:15:57 +00:00
Vadim Zeitlin
322fc32b82 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/trunk@75648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 13:15:52 +00:00
Vadim Zeitlin
95b5a81c0e Use AssocQueryString() instead of manual accessing registry in wxMSW.
AssocQueryString() is more reliable and should work under all Windows
versions, including Windows 8 for which our previous implementation, reading
the values directly from the registry, had some problems.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 13:15:48 +00:00
Vadim Zeitlin
8aed772f6c Restore correct handling of wxDocument::OnCreate() error return value.
The changes of r74515 didn't quite restore the old behaviour, the document was
still not being cleaned up if its OnCreate() simply returned false and not
threw an exception.

Do add cleanup in this code branch too, just duplicating what we in case of
exception (this duplication can't be easily avoided unfortunately).

Closes #15883.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 13:15:43 +00:00
Vadim Zeitlin
fe67b68d7a Focus generic spin control when its spin button is pressed.
This is consistent with the behaviour of the native control under MSW and GTK
and generally makes sense as otherwise focus could remain on a completely
unrelated control.

Closes #15885.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 13:15:38 +00:00
Vadim Zeitlin
2a14facb0f 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/trunk@75644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 12:58:53 +00:00
Vadim Zeitlin
bdef0d8ff7 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/trunk@75642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 11:44:54 +00:00
Vadim Zeitlin
fb730c32b4 Override Do{Freeze,Thaw}() instead of {Freeze,Thaw}() in wxPropGrid code.
{Freeze,Thaw}() themselves are not virtual any more, so overriding them
doesn't really work and it is unnecessary to reimplement the reference
counting already done by the base class anyhow, so override the DoXXX()
versions instead.

Closes #15877.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-17 18:56:13 +00:00
Paul Cornett
726d6f006e avoid crash with GTK3 when deleting an item, closes #15786
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-17 16:50:13 +00:00
Vadim Zeitlin
7d8f4cae1b Fix wrong variable name in the example in wxVariantDataSafeArray documentation.
Closes #15882.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-17 14:33:03 +00:00
Vadim Zeitlin
b60a0beb6d Compilation fix for the example in wxThread documentation.
Make MyThread a friend to allow it accessing the private fields of MyFrame.

Notice that this example still remains badly written and should be ideally
entirely redone using conditions and mutexes.

See #15881.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-17 14:32:57 +00:00
Vadim Zeitlin
33142e6284 Fix syntax error in the QueueEvent() documentation example.
Use ".", not "->", on the object.

Closes #15881.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-17 14:32:51 +00:00
Vadim Zeitlin
d11aa4c790 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/trunk@75635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-16 21:45:00 +00:00
Vadim Zeitlin
9084dd3fb0 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/trunk@75634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-16 21:44:55 +00:00
Vadim Zeitlin
55759171de 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/trunk@75633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-16 21:44:47 +00:00
Robin Dunn
575481d06b Add missing GetControl and SetControl methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-14 05:36:33 +00:00
Robin Dunn
1e0b04a9cb add missing GetVeto method
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-14 05:36:24 +00:00