Commit Graph

56719 Commits

Author SHA1 Message Date
Vadim Zeitlin
87b621a5b7 Fix compilation for MinGW with wxUSE_IPV6==1.
MinGW doesn't provide wspiapi.h header, so only include it when using MSVC and
include ws2tcpip.h which directly declares the functions used for the other
compilers.

This doesn't have quite the same semantics but it's better than failing to
compile at all.

See #15005.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-09 15:08:13 +00:00
Vadim Zeitlin
025f5d1450 Don't cache HDC used by wxPaintDCEx in wxMSW.
This avoids the problem with mistakenly using wrong HDC in wxBitmapComboBox
code which was due to assuming that we can only ever have one paint HDC for
the given window -- while in wxBitmapComboBox case we are passed different
HDCs for the same window via WM_DRAWITEM.

Instead of fixing the cache, just don't use it at all for wxPaintDCEx as we
don't gain anything from doing it anyhow.

Closes #14842.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-09 15:08:09 +00:00
Vadim Zeitlin
06a32e049c Fit the generic preferences editor dialog to its pages size initially.
Ensure that the dialog has the appropriate size before showing it.

In addition to making it big enough to fit the pages contents, this also fixes
a problem with initial appearance under MSW.

Closes #15092.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-09 15:08:05 +00:00
Vadim Zeitlin
17beda75ef Don't set cell value in wxDataViewEvent in one place only.
We should either set the cell value in the event object everywhere or not do
it anywhere and as currently the native GTK and OS X versions don't do it at
all and the generic version only does it for ITEM_CONTEXT_MENU events, it's
easier to not do it at all.

See #14163.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-09 15:08:00 +00:00
Vadim Zeitlin
0e0f825d7c Remove wxLogWindow::OnFrameCreate() virtual method.
This method couldn't be overridden by the classes deriving from wxLogWindow
because it was called (indirectly) from wxLogWindow ctor itself and so was
completely useless. Just remove it to avoid confusion.

Closes #12763.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-09 15:07:56 +00:00
Vadim Zeitlin
aa9453d6f4 Restore wxDIRCTRL_SHOW_FILTERS flag of wxDirCtrl.
Closes #8572.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-09 15:07:49 +00:00
Stefan Csomor
b09857ae00 avoid infinite recursion for richtooltops, (hopefully) fixes #15070
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-07 21:41:39 +00:00
Stefan Csomor
a5777be7b0 implementing canBecomeKeyView for user panes, native focus support, fixes #15070
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-06 21:00:38 +00:00
Robin Dunn
a150fade15 Minor tweaks to the preferences docs for Phoenix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-05 06:50:37 +00:00
Robin Dunn
7c3f702506 don't use string module
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-05 06:50:28 +00:00
Vadim Zeitlin
11e3c6ef36 Unselect all wxDataViewCtrl items when clicking outside of the item area.
This is consistent with Windows behaviour and as the generic wxDataViewCtrl is
mostly used under Windows, it makes sense to follow Windows convention in it.

Closes #15082.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-04 18:19:41 +00:00
Vadim Zeitlin
09f84bc716 Fix crash on wxDataViewCtrl creation after r73565.
Initialize m_clientArea to NULL to avoid crash in SetFont() which is called
during the control creation.

This might still be not 100% correct as the initial font is not set at all for
the client area but at least it fixes the crash.

See #15056.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73601 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-04 11:48:26 +00:00
Julian Smart
29ec9f9b02 Corrected layout when scaling the control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-04 10:47:55 +00:00
Vadim Zeitlin
e465e64881 Fix handling of wxST_NO_AUTORESIZE in wxOSX.
We do need to set the size of wxStaticText initially even when this style is
specified, it only tells us to not update it later. Otherwise even the initial
label was never shown in full.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-03 22:44:17 +00:00
Vadim Zeitlin
00dee70d12 Fix hundreds of unused parameter warnings in wxOSX build.
Comment out the name of the parameter in the recently added SetupTabs().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-03 22:44:14 +00:00
Stefan Csomor
33f3e2b31e issue NUMPAD constants only for Key but not for Char events, fixes #15073
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-03 17:23:58 +00:00
Vadim Zeitlin
8ae80de41f Revert "Fix off by 1 error in wxGenericListCtrl::HitTest()."
Revert r73563, this breaks the selection in the control apparently.

See #15063.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-03 12:19:20 +00:00
Stefan Csomor
094fa9e9ef enabling cursor events, fixes #15044
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-02 13:01:57 +00:00
Vadim Zeitlin
23c37c2c4e Reset accelerator table after removing last accelerator in wxMSW wxMenuBar.
We didn't update the accelerator table if no more accelerators were left in it
but we still need to do it to stop handling the previously active accelerators.

Closes #15078.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-02 12:11:53 +00:00
Vadim Zeitlin
f29b59b781 Use more native icons in wxMSW wxArtProvider.
Use SHGetStockIconInfo() and SHGetFileInfo() to look up some icons.

Closes #15068.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-02 12:11:47 +00:00
Vadim Zeitlin
4ca8f7ce2f Enable wxUSE_FSVOLUME in configure builds.
This was never set to 1 when using configure, add a configure option for it
and set it to 1 by default now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-02 12:11:44 +00:00
Vadim Zeitlin
c35c7df103 Don't give error message for non-existent paths in wxFileSystemWatcher.
The file we're trying to watch might have been just deleted, this is an
unavoidable (and not only in theory but also in practice when watching busy
directories) race condition so don't give an error message if this does happen
but simply return false from Add().

Closes #15051.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-02 12:11:40 +00:00
Vadim Zeitlin
4efbeff4a5 Interpret wxRect passed to wxRichToolTip::ShowFor() as client coords.
It makes more sense to use the window coordinates here instead of the screen
ones.

Closes #15060.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-02 12:11:36 +00:00
Vadim Zeitlin
f6268c151c Make wxRect parameter of wxRichToolTip::ShowFor() const.
This parameter is read-only, so accept a const pointer here.

See #15060.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-02 12:11:32 +00:00
Vadim Zeitlin
23dd0dcea9 Traditional Chinese translations update from Wei-Lun Chao.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-01 13:00:41 +00:00
Vadim Zeitlin
f155075229 Don't use GetThreadId() in wxMSW code.
Revert r73585, GetThreadId() is only available in Vista or later so don't use
it.

Just cast the handle to an integer explicitly to be able to print it with
"%x".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-01 12:21:41 +00:00
Vadim Zeitlin
9f298361db Use thread ID and not thread handle in the error messages in wxMSW.
The ID is in general more useful than the handle and this also fixes an assert
failure due to mismatch between the HANLDE type and "%x" format specifier.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-28 20:41:14 +00:00
Stefan Csomor
a990673bb9 enabling menu close event, fixes #15069
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-28 18:11:35 +00:00
Julian Smart
914a4e23e4 Corrected loading of images: we need the parent size to compute initial object size
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-28 17:23:09 +00:00
Václav Slavík
a75b6712bd Compilation fix for wxPreferencesPage.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-28 16:53:41 +00:00
Václav Slavík
6bf921176c Add preferences sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-28 16:29:12 +00:00
Václav Slavík
2aab96f58d Add wxPreferencesEditor class.
Implements native UI for preferences editing.  In particular, the API
handles the differences between modal (Windows) and non-modal (OS X) preferences windows and provides platform's native look.

Currently implemented natively for wxOSX/Cocoa, wxGTK and Windows (the latter is used as a fallback generic implementation as well).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-28 16:29:05 +00:00
Václav Slavík
d52a1abad3 Add support for Cocoa's selectable toolbar items.
The support is currently limited to making all toolbar items selectable
and is only available in wxOSX with Cocoa and native toolbars.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-28 16:28:56 +00:00
Václav Slavík
72625b36b6 Add wxBitmap(NSImage*) ctor to wxOSX.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-28 16:28:52 +00:00
Václav Slavík
4863951a5f Line endings fixes in bakefile-generated files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-28 14:29:00 +00:00
Václav Slavík
2026acc1e2 Don't include Common-Controls manifest in wxBase apps.
If only the non-GUI portions of wxWidgets are used, the dependency on
Microsoft.Windows.Common-Controls assembly shouldn't be automatically
added to Visual C++. Only do it when compiling GUI code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-28 13:31:58 +00:00
Stefan Neis
05e66a7002 No real changes, just spelling fixes to comments. Closes #15030.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-27 12:05:17 +00:00
Steve Lamerton
026a6ed6ce Minor change. Fix LoadURL case typo in wxWebView docs.
Closes #15067

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-27 08:12:42 +00:00
Vadim Zeitlin
44f4afd2da Fix, or at least make less common, deadlock in the thread sample.
Don't always deadlock when "Stop the last spawned thread" menu command is
selected. There is still a problem with a race condition which could result in
a crash when dereferencing an invalid pointer, but at least this doesn't
happen all the time, unlike the current bug.

Of course, the real solution would be to properly rewrite the sample to show
how thread deletion should be handled correctly...

See #14891.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-24 13:48:57 +00:00
Vadim Zeitlin
4f082fb3a0 Preserve client data pointers when setting bitmaps in wxBitmapComboBox.
Changing the bitmap could recreate the control if the height of the bitmap
changed but recreating wxBitmapComboBox lost all the client data pointers.

Do preserve them now when recreating.

Closes #14892.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-24 13:48:49 +00:00
Vadim Zeitlin
4cf8e24bc1 Fix typo in definitions of BEGIN_EVENT_TABLE_TEMPLATEn() macros with n>=2.
They were all defined as wxBEGIN_EVENT_TABLE_TEMPLATE1() instead of the
correct wxBEGIN_EVENT_TABLE_TEMPLATEn().

Closes #15050.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-24 13:48:42 +00:00
Vadim Zeitlin
1af67319a7 Make wxGenericDataViewCtrl::SetFont() really work.
Do use the new font for the items display.

Closes #15056.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-24 13:48:35 +00:00
Vadim Zeitlin
de6e6d08b2 Fix compilation in !wxUSE_MENUS case.
wxFrameBase::ShouldUpdateMenuFromIdle() should be defined inside "#if
wxUSE_MENUS" as it's only declared when wxUSE_MENUS==1.

Closes #15062.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-24 13:48:26 +00:00
Vadim Zeitlin
f4f4c3aca4 Fix off by 1 error in wxGenericListCtrl::HitTest().
Account for the header height if the header is present.

Closes #15063.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-24 13:48:20 +00:00
Vadim Zeitlin
95316a3f24 Move menu messages handling from wxFrame to wxTLW in wxMSW.
This allows to generate the menu open/close/highlight events correctly for the
popup menus used in the dialogs.

Extend the menu sample with a test using such menus.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-24 13:48:13 +00:00
Robin Dunn
823e18c7bc Fix MSVCBuilder so it can pass an alternate make command to the Builder
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-22 05:59:59 +00:00
Robin Dunn
317bc825f4 Enable using jom in place of nmake in the wxMSW build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-22 05:59:51 +00:00
Robin Dunn
2e59a53a59 Add version check for MSVC 10
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-22 05:59:42 +00:00
Vadim Zeitlin
c92374f0a2 Fix crash when drawing bitmaps with mask in wxGTK with GTK+ < 2.20.
r73386 introduced a crash in wxGTK drawing code when using old GTK+ versions
by releasing the mask pixmap prematurely. Apparently GTK+ itself was fixed at
some time in 2.19.x time frame but work around the bug for the sake of older
GTK+ versions in wxGTK itself by simply releasing the pixmap at the end of
DoDrawBitmap(), as pre-r73386 code did.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-21 14:32:04 +00:00
Vadim Zeitlin
4e5e421c78 No real changes, just suppress a harmless warning.
g++ warned about possibly uninitialized variable, so initialize it in its
declaration even if it was actually already always initialized in the branches
where it could be used.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-21 13:22:31 +00:00