Commit Graph

53024 Commits

Author SHA1 Message Date
Vadim Zeitlin
e8afaabf01 Fix memory leaks in wxXml unit test.
Ensure that the root wxXmlNode is deleted by storing it in a wxScopedPtr
instead of a raw pointer.

See #11593.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-30 14:16:13 +00:00
Vadim Zeitlin
c180fd77f4 Always update internally stored AUI floating frame position.
Update the internally stored position of a floating AUI frame even if the user
is dragging it too fast to update its position on screen. This prevents the
frame from snapping back to the initial position when movement is over.

Closes #13014.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-30 14:16:07 +00:00
Vadim Zeitlin
01871bf642 Add wxUSE_STD_CONTAINERS and turn it on by default.
Previously, wxUSE_STL enabled both implicit conversion of wxString to
std::[w]string and use of standard containers for the implementation of their
wx equivalents. Split up the two roles now by allowing to enable the use of
the standard containers independently of (backwards incompatible) implicit
conversion in wxString and actually enable wxUSE_STD_CONTAINERS by default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-30 14:16:04 +00:00
Vadim Zeitlin
44a0071224 Fix XTI compilation in STL build.
Use explicit c_str() calls in XTI code as implicit conversion to "const char
*" doesn't exist in STL build.

This fixes compilation problems when wxUSE_EXTENDED_RTTI && wxUSE_STL.

Closes #13087.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-30 14:15:53 +00:00
Paul Cornett
6c875e80e7 build fix for older GTK2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-30 05:59:34 +00:00
Paul Cornett
a481bbc318 convert assertdlg_gtk to C++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-30 05:35:24 +00:00
Paul Cornett
23b22b10a8 prepare to convert file to C++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-30 05:29:49 +00:00
Stefan Csomor
0dcbb107ee fix clang warning (? having two different operand types)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-29 18:40:18 +00:00
Paul Cornett
5073caddb1 must use deprecated function for gtk2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-29 17:49:36 +00:00
Paul Cornett
c96acfeff6 don't crash on error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-29 05:29:42 +00:00
Paul Cornett
86b8b3ac31 build fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-29 05:17:00 +00:00
Paul Cornett
7c491c85de fix typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-29 05:16:25 +00:00
Paul Cornett
ad47660f9a GTK_WIDGET_SENSITIVE should have been converted to gtk_widget_get_sensitive
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-29 05:15:54 +00:00
Václav Slavík
34b239ec5d wxDataViewChoiceRenderer's editor control should have the same size as the cell.
It looks weird when it's significantly shorter than the content cell being edited.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-28 14:10:31 +00:00
Paul Cornett
385e8575dd avoid deprecated functions and direct struct access
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-28 06:27:49 +00:00
Paul Cornett
989d151ce2 yet more avoiding direct struct access
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-27 19:38:10 +00:00
Paul Cornett
a8886b11f2 add more functions we will need
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-27 18:41:07 +00:00
Jaakko Salli
a516284f67 Instead of just deleting m_popupInterface, call Destroy() of its wxWindow-based popup control obtained via GetControl() member function. Also still delete m_popupInterface if there was no popup control, or if it was implemented as a separate class (versus being multiple-inherited along side wxComboPopup, as has been the common practice).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-27 18:30:56 +00:00
Václav Slavík
0b669520c2 Always use gtk2-compat.h definitions.
We support building against newer GTK+ version and using an older
one at runtime, so we must provide our implementations of these
functions even if GTK_CHECK_VERSION would indicate the function is
already available in GTK+.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-27 17:23:43 +00:00
Václav Slavík
8bffcd08c2 Renamed wx/gtk/private/compat.h to gtk2-compat.h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-27 17:23:39 +00:00
Paul Cornett
08f0950400 more avoiding direct struct access
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-27 07:17:05 +00:00
Paul Cornett
281644b4c1 remove unused mouse event and redundant checks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-27 06:51:28 +00:00
Paul Cornett
2bca0d2033 a few changes for gtk3, avoiding direct struct access
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-27 06:38:44 +00:00
Václav Slavík
d58a44c371 Compilation fix for r67312: add explicit cast to GtkStateType.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-26 18:09:58 +00:00
Václav Slavík
fc9ab22a76 Use accessor functions instead of deprecated GTK+ macros.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-26 15:49:57 +00:00
Julian Smart
8337ae1e40 Fix for image saving speedup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-25 16:42:02 +00:00
Václav Slavík
80b8c88a63 Don't use deprecated gtk_widget_ref().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-25 15:08:25 +00:00
Václav Slavík
d6355645e7 Revert r67137.
GTK_DISABLE_SINGLE_INCLUDES causes trouble with other included
libraries (libgnomeprint this time) too. This check for trivially fixed
problems is not worth the continuing trouble.

Fixes #13078.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-25 11:00:56 +00:00
Paul Cornett
fbf49ef2b1 fix tool item enter/leave notify, fixes #13083
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-24 16:52:55 +00:00
Vadim Zeitlin
af2fdacdb8 Set m_inheritBgCol flag in wxPanel with a background bitmap.
This ensures that the panel background is used by its transparent children
under wxMSW even when the panel itself is inside a wxNotebook with themed
background: making InheritsBackgroundColour() return true prevents the
notebook from overriding our background.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-24 16:08:11 +00:00
Julian Smart
4dc7ae1ae8 Speeded up image saving to XML (WriteHex).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-24 10:59:47 +00:00
Paul Cornett
879e4f6e19 move deprecated GtkTooltips forward declaration to one place that still needs it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-23 17:37:14 +00:00
Paul Cornett
558a94bd4a clean up wxGTK tooltip code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-23 17:36:10 +00:00
Dimitri Schoolwerth
2a6545a5a7 Fixed buffer overflow when saving certain images in the Windows icon format.
When an image did not have a width with a multiple of 4 the calculations for the number of padding bytes (to get a scan line DWORD aligned) would be wrong. This caused a buffer overrun when saving the 1 bits per pixel mask.

Fixes #12937.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-23 15:20:25 +00:00
Václav Slavík
fce2dc61c3 Only react to clicks on the checkbox in wxDataViewToggleRenderer.
Previously, left click anywhere in the cell toggled the checkbox.
This was unexpected when the cursor was far from the checkbox
in a wide column. With this change, one has to be over the
checkbox to toggle it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-23 13:57:52 +00:00
Vadim Zeitlin
09bdb1cb3e Add WXK_CONTROL_A..WXK_CONTROL_Z constants.
These key codes provide nicer symbolic values for ASCII values in 1..26 range
generated by Ctrl+Letter keys.

Closes #13075.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-23 12:59:59 +00:00
Vadim Zeitlin
6c1de05621 Prevent event generation in wxGtkCalendarCtrl::SetDate().
Block not only gtk_day_selected_callback() but also gtk_month_changed_callback()
as we don't want wxEVT_CALENDAR_PAGE_CHANGED generated neither when calling
SetDate().

This fixes partial resetting of the just set value in wxDatePickerCtrl as
calling SetDate() there resulted in the date being reset from inside it and
the behaviour of the control was clearly wrong as could be seen in the widgets
sample.

Closes #13073.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-23 10:37:38 +00:00
Vadim Zeitlin
6418e3ae72 Use correct month in the date picker page of the widgets sample.
Months returned by wxDateTime::GetMonth() start from 0 while people mostly
expect to have 1-based months in the UI.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-23 10:37:35 +00:00
Václav Slavík
9445e542a0 Fix <object_ref> processing to respect overridden attributes.
r60494 accidentally broke this, by adding faster code path for
child-less <object_ref>s. Unfortunately, this made it ignore
<object_ref>s without children, but with attributes overrides.

Fixes #13061.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 19:13:28 +00:00
Stefan Csomor
c560088c4d wiring notifications
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 18:44:43 +00:00
Vadim Zeitlin
dd1af40c59 Add wxUSE_THREADS checks around wxMSW functions dealing with threads.
This removes the code unneeded in wxUSE_THREADS==0 build and also fixes
compilation of wxGUIAppTraits::WaitForThread() which didn't compile any more
with wxUSE_THREADS==0 since r67185.

Closes #13050.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 17:15:56 +00:00
Vadim Zeitlin
20ca563279 Don't consider fully opaque bitmaps as having alpha in wxMSW.
Remove the alpha channel from the DIB we create not only if all of its pixels
are fully transparent but also if they are all fully opaque. This prevents us
from erroneously creating bitmaps with alpha channel when none is needed nor
expected.

Closes #13056.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 17:15:49 +00:00
Vadim Zeitlin
23a9142e27 Add wxText{Input,Output}Stream::Get{Input,Output}Stream() methods.
These methods simply return the underlying low-level stream.

See #10807.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 17:15:45 +00:00
Vadim Zeitlin
b83144c46f Post size events to the event handler and not window itself.
Post the artificial wxSizeEvent to the window event handler and not window
itself in SendSizeEvent() as otherwise any event handlers wouldn't see this
event at all.

Closes #13066.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 17:15:38 +00:00
Vadim Zeitlin
b78a53aca0 Use disabled version of normal bitmap for disabled one in wxMSW::wxButton.
Initialize the disabled button bitmap with a greyed out version of the normal
one instead of using the same normal bitmap for it. This is more consistent
with the other ports and makes more sense.

Closes #13070.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 17:15:34 +00:00
Stefan Csomor
38e4bfde17 first version of osx_cocoa implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 16:40:28 +00:00
Stefan Csomor
869aa41b51 only remove from parent if not content view, fixes #13068
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 16:39:26 +00:00
Vadim Zeitlin
a3b89fa936 Correctly align background brush when erasing owner drawn bitmaps in wxMSW.
Add a hack to work around the problem with background alignment when drawing
the owner-drawn buttons in wxMSW. This fixes the alignment for any custom
brushes used for background painting but doesn't help with user-defined
EVT_ERASE_BACKGROUND handlers which still don't work well with the owner-drawn
buttons. Unfortunately DrawThemeParentBackground() remains a mystery and I
couldn't understand why not only doesn't it position the DC correctly on its
own but also ignores any attempts to do it manually.

This also doesn't help with the stubbornly remaining one pixel non-transparent
border around non-owner-drawn buttons which I just can't get rid of.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 15:07:20 +00:00
Dimitri Schoolwerth
4c51a665c6 Fixed various typos.
Applied patch by snowleopard2 fixing a bunch of typos such as misspellings and double words in the documentation. Combined the patch with some local queued typos waiting to be committed as well as adding new typo fixes inspired by the patch.

Function names with American spelling were not changed nor was third-party code touched. The only code changes involve some changes in strings that are translated ("Can not" -> "Cannot").

Closes #13063 (again).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 14:17:38 +00:00
Bryan Petty
57ab6f2314 Extensive documentation typo patch (closes #13063).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 14:08:30 +00:00