Commit Graph

57975 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
a185067a47 Document wxWindow::FindWindow() TLW skipping behaviour.
Explicitly mention that TLW "children" are not searched by this function
(which is the case since r74721).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-13 13:38:34 +00:00
Vadim Zeitlin
8ab2bad7c1 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/trunk@75606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-12 14:13:24 +00:00
Vadim Zeitlin
d66e7af9aa Don't use deprecated wxBOLD, wxNORMAL and similar constants.
Replace them with wxFONTWEIGHT_BOLD, wxFONTSTYLE_NORMAL or wxFONTWEIGHT_NORMAL
and equivalents in the code of the library itself and in the samples.

Also simplify font construction using wxFontInfo where possible to avoid
specifying these constants at all if they are not needed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 14:25:30 +00:00
Vadim Zeitlin
7696081c90 Remove commented out line from the dnd sample.
No real changes, just remove the unnecessary line and its outdated comment
(wxPaintDC::Clear() can be called in wxGTK, it's just not useful).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 14:25:21 +00:00
Vadim Zeitlin
e484333926 wxBitmap with cleared alpha channel doesn't keep its alpha flag any more.
Explicitly reset wxBitmap alpha flag after clearing its alpha channel to
ensure that we don't treat it as having alpha after going to all the trouble
of ensuring that it doesn't/

See #14403.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 14:24:35 +00:00
Vadim Zeitlin
60a3e0cc54 Rename wxLANGUAGE_CAMBODIAN to wxLANGUAGE_KHMER.
Keep the old name for compatibility.

See https://github.com/wxWidgets/wxWidgets/pull/2

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 02:52:17 +00:00
Vadim Zeitlin
4736f13d79 No real changes, just fix a typo in a comment.
z/preffered/preferred/

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 02:52:13 +00:00
Vadim Zeitlin
91bd95beb7 Allow building wxGTK using GTK+3 under Windows too.
No real changes, just use the right libraries for GTK+3 port.

Closes #15871.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-10 14:18:54 +00:00
Robin Dunn
a7288e4179 Add doc for wxFlexGridSizer::GetRowHeights and GetColWidths
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-10 05:15:46 +00:00
Jouk Jansen
c43600bbbe Fix compilation on OpenVMS id the logical CONFIG is defined
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-08 15:56:43 +00:00
Vadim Zeitlin
1d444d684a Disable wxUSE_PREFERENCES_EDITOR in correct place in wxiOS.
wx/osx/setup0.h is auto-generated, so r74708 shouldn't have changed it as the
change was overwritten by r75568 which regenerated that file. Instead, disable
wxUSE_PREFERENCES_EDITOR in iPhone-specific file.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-08 00:38:43 +00:00
Vadim Zeitlin
98601f5646 Fix check for the item being checked when appending it under wxMSW.
The changes of r75448 were wrong, we can't ask Windows for the item state
before attaching it to the menu, so just check the internal flag here.

See ##15748.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-07 21:54:51 +00:00
Vadim Zeitlin
d14879f2bd Fix benchmarks compilation with WXWIN_COMPATIBILITY_2_8 set to 0.
Include wx/crt.h explicitly to be able to use wxPrintf() and friends.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-07 21:54:48 +00:00
Vadim Zeitlin
8b8dfdde4c 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/trunk@75568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-07 21:54:42 +00:00
Vadim Zeitlin
44f26d6f82 Fix handling of bitmaps with alpha channel in wxMSW wxImageList.
Don't use mask and alpha together, this results in visual artefacts and masks
are unnecessary with RGBA bitmaps anyhow.

The only potentially problematic remaining case is mixing bitmaps with alpha
and mask inside the same image list (as we need to indicate whether we use the
mask or not when creating it), but this should probably be rare and in the
meanwhile we can at least RGBA bitmaps with image lists, which includes doing
this implicitly when they are used as button bitmaps.

Also refactor wxBitmap code to extract part of CopyFromIconOrCursor() to allow
reusing it in the newly added MSWUpdateAlpha().

See #11476.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-07 21:13:20 +00:00
Vadim Zeitlin
739ccedee7 Fix alpha after drawing a bitmap with alpha on a purely RGB bitmap in wxMSW.
Previously, the area of the bitmap outside of the rectangle covered by the
bitmap being drawn became completely transparent, "losing" the original bitmap
contents. This was due to some pixels of the bitmap having non-0 alpha value
after AlphaBlend() call, as it updates both the colours and alpha of the
destination. As there doesn't seem to be any way to prevent it from doing
this, just reset alpha back to 0 after calling it to avoid the problem.

Closes #14403.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-07 21:13:14 +00:00
Vadim Zeitlin
bd30752410 Just deprecate but don't schedule for removal wxNORMAL and friends.
Deprecate the use of the old untyped constants but don't schedule them from
removal in a future wx version by removing "#if WXWIN_COMPATIBILITY_3_0" tests
around their definition and use. Provoking deprecation warnings in the code
using these constants is worth it as they are unclear and it's easy to make
mistakes when using them, but breaking this code compilation outright can't be
justified -- even in the future.

Also use more informational wxDEPRECATED_MSG() instead of a simple
wxDEPRECATED() as it might not be obvious at all how should the code be
updated exactly.

Finally, avoid the use of deprecated constants inside the library itself.

As a side effect, this closes #15814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-06 12:42:37 +00:00