Commit Graph

58554 Commits

Author SHA1 Message Date
Scott Talbert
5d33768022 Ensure the PangoFontFace type is loaded.
This works around problems with using wxFontDialog from wxPython.

Closes #16820.
2015-03-12 15:22:52 +01:00
Vadim Zeitlin
c4f569ed60 Avoid refreshing not currently visible items in generic wxListCtrl.
This is useless at best and resulted in GTK+ warnings because we ended up
(somehow -- is there another bug lurking here?) with negative items height in
this case.

Closes #16862.
2015-03-02 14:39:45 +01:00
Vadim Zeitlin
c477605bda Fix TZ handling in wxDateTime::ParseRfc822Date().
When the TZ offset specified in the RFC 822 string was equal to the local TZ
offset but the date fell in the DST period, the result was one hour off.

Fix this by converting the date to the UTC explicitly, and then converting it
back to the local TZ to ensure that the DST is taken into effect.

See #15370.
2015-02-26 00:55:33 +01:00
Vadim Zeitlin
7ffa1c4d3a Fix typo in DateTimeTestCase::TestParseRFC822() method name.
No real changes, just s/Parce/Parse/
2015-02-26 00:54:59 +01:00
Vadim Zeitlin
8bbe683f61 Fix using RegisterHotKey() with negative IDs in wxMSW.
This was broken due to a wrong cast from WPARAM (i.e. 32 bit unsigned int in
Win32) value containing the ID to WORD (i.e. 16 bit unsigned short) which
truncated the ID value.

Notice that MSDN documents the requirement for the IDs to be positive, but
negative IDs seem to work, at least with Windows 7, after this fix.

Closes #16880.
2015-02-25 19:44:48 +01:00
Artur Wieczorek
82106a9d9e Allow use of all wxPG colours.
Restore original list of wxPG-specific colours. wxPG-specific colours are added to the colour database when wxColourProperty is created (already existing colours are not overwritten by wxPG ones).

This is the backport of r76893 and r76894.
See #15597.
2015-02-22 22:50:45 +01:00
Artur Wieczorek
baf965ef30 Fix wxPGChoices::Set method.
There is no need to check if referenced array with values is valid since "reference cannot be bound to dereferenced null pointer in well-defined C++ code". Moreover, conditional call of wxPGChoices::Add() methods (one with explicit parameter and one with default one) is not necessary.

This is the backport of r78343.
See #16759 (http://trac.wxwidgets.org/ticket/16759).
2015-02-21 12:15:26 +01:00
Artur Wieczorek
2d8da317c1 Initialize wxPGChoices object properly in its copy ctor if source object has no data.
Internal data must be always initialized whether the source object contains choices data or not.

This is the backport of r78484.
See #16855.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-17 20:52:59 +00:00
Artur Wieczorek
f6bf3de76d Refresh property grid when property is switched to read-only state.
Property grid is refreshed to reflect the new state of the property.

This is the backport of r76875.
See #16306.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-17 20:42:15 +00:00
Robin Dunn
0225897079 Add some missing default ctors and Create methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-16 21:42:16 +00:00
Artur Wieczorek
a3735c8cc1 When drawing wxPG items (with double buffering) use the same layout direction as the window uses.
Memory DC used for double buffering purposes should inherit layout direction from the window DC to ensure that texts are rendered correctly.

This is the backport of r76931.
See #15797.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-16 20:50:07 +00:00
Artur Wieczorek
63e678d978 Fix saving edited property value when wxPG property is in the 'invalid value' state.
When wxPGProperty is loosing focus in 'invalid value' state its pending value should be stored before resetting property to 'normal' state because this operation (wxPG::OnValidationFailureReset) also resets pending value.

This is the backport of r77887.
See #16587.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-16 20:38:33 +00:00
Vadim Zeitlin
fd7ea006e9 Increase the buffer size used for the host names in wxIPaddress.
This avoids failing to set the host name if the system /etc/hosts file has any
host names that wouldn't fit in our buffer: at least under Linux/glibc,
gethostname_r() returns error if any such names exist even if we don't ask for
them.

Closes #16641.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-16 01:05:32 +00:00
Vadim Zeitlin
c2a4475d08 Fix wxDV_ROW_LINES drawing when horizontally scrolled in generic version.
Use the correct, i.e. logical, as wxDC does the translation to physical
internally, coordinates for drawing the highlighted rows.

Closes #16815.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-15 22:54:39 +00:00
Vadim Zeitlin
1cfd935c26 Use non-static reentrancy guard in wxScrollHelper::AdjustScrollbars().
This prevented calls to AdjustScrollbars() of another window from doing
anything if they were called due to a size change from AdjustScrollbars() of
an outer window.

Closes #16852.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-14 19:09:39 +00:00
Vadim Zeitlin
e22fcf204e Fix coordinates of wxSetCursorEvent in wxGTK.
The event coordinates remained in the client coordinates of the window the
initial event had been sent to, even when the event was propagated to its
parent.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-14 15:04:55 +00:00
Vadim Zeitlin
14c29db79c Correct wxInfoBar::ShowMessage() flags argument documentation.
The default value is wxICON_INFORMATION, not wxICON_NONE.

Closes #16861.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-14 14:46:28 +00:00
Dimitri Schoolwerth
5964643206 Update XML Tools URL.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-13 21:49:06 +00:00
Paul Cornett
edc127ed8d More complete fix to avoid GDK assertion "impl_window->update_freeze_count > 0" on Ubuntu.
Any frozen window in the whole TLW could be affected, not just a child of the enabled window.
Also do a more complete search for scrollbars.
Closes #16795


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-12 06:12:16 +00:00
Paul Cornett
e88904ccad build fix for __WXUNIVERSAL__
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-11 18:11:07 +00:00
Paul Cornett
66780715c0 avoid GDK assertion "impl_window->update_freeze_count > 0" on Ubuntu when enabling frozen window
closes #16795


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-11 18:05:15 +00:00
Paul Cornett
e19a2263bd don't assume size-allocate implies a widget is realized
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-09 18:19:14 +00:00
Bryan Petty
e1ebfd29ac Backport r78447: Updated logos in the reference manual.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-04 17:58:08 +00:00
Paul Cornett
bb3dcf85fb set transient parent for 'about' dialog, closes #16823
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-02 18:31:24 +00:00
Paul Cornett
0e6f0bd5fa use logical operator, rather than bitwise, on bools, closes #16824
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-02 17:23:55 +00:00
Paul Cornett
d988a94acb avoid passing invalid rect to Refresh(), closes #16819
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-01 18:06:06 +00:00
Artur Wieczorek
e268d561a6 Fix vertical positioning of text field in the combo box editor associated with wxPG property under wxMSW.
Vertical position of text field in wxOwnerDrawnComboBox control (instantiated at property selection) doesn't need any special adjustment.

This is a backport of r77687.
See #16556.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-01 11:14:34 +00:00
Václav Slavík
89f490a4ca Avoid unneeded use of wxLocale in wxDateTime::Format()
On OS X, wxDateTime::Format() uses wxString::Replace() to
unconditionally replace locale-specific %c, %x and %X specifiers in the
format string if present. Doing so causes three wxLocale::GetInfo()
calls that are often not necessary.

Check for the presence of these  specifiers before calling GetInfo().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-30 15:53:19 +00:00
Václav Slavík
6e35d4bc6b Handle 5+ letter codes in TranslateFromUnicodeFormat()
Unicode TR #35 v26 allows for five-letter (MMMMM) or even six-letter
(EEEEEE) forms of some of the fields, but TranslateFromUnicodeFormat()
asserts in these situations.

Fix it to fall back to short forms for MMMMM and EEEEEE that are used in
practice e.g. on OS X if the user has custom formatting settings.

Consulting the table of sensible specifiers from
http://userguide.icu-project.org/formatparse/datetime, it appears these
two were the only omissions in this function.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-30 15:53:17 +00:00
Vadim Zeitlin
f047d93c6a Fix wxEVT_TREE_STATE_IMAGE_CLICK generation in wxMSW wxTreeCtrl.
Use GET_{X,Y}_LPARAM() to extract them from the event position, which handle
negative coordinates (and coordinates can perfectly well be negative when
using multiple displays) correctly, unlike {LO,HI}WORD().

Closes #16812.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-27 11:49:44 +00:00
Václav Slavík
14f052a768 Allow disabling SetProcessDPIAware() call
Add Windows-specific wxMSWDisableSettingHighDPIAware() function then can
be called before startup (i.e. wxEntry() call) to disable wxWidgets'
handling of DPI awareness. This is useful for code embedded in non-wx
applications as well as for purely wx application that are not
HiDPI-ready (although the latter has the option of forcing
dpiAware=false in the manifest).

See also https://groups.google.com/d/msg/wx-dev/Z0VpgzCY34U/f1FfPqGDppMJ
and #16116.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 15:00:03 +00:00
Julian Smart
f4ac4fcab6 Remove selection before container is deleted or it could cause a crash later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-21 14:31:04 +00:00
Václav Slavík
30ebabc9d0 Use wxNB_MULTILINE in wxPreferencesEditor
The size of the dialog in wxPreferencesEditor's generic implementation
is determined from notebook pages alone and doesn't account for label
size, which may be significantly longer in some languages (German,
Danish). If the labels don't fit into the window, some of the tabs are
hidden behind scroll buttons that are easy to overlook.

Improve usability by using wxNB_MULTILINE, which will use multiple rows
of tabs in this situation. This is what e.g. Internet Explorer does in
its preferences as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-20 15:26:56 +00:00
Tim Kosse
1bc8f00b82 Fix memory leak introduced in r78183: wxMenuItemBase::SetAccel does not take ownership of the passed pointer nor keeps it for later use.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-20 15:01:19 +00:00
Vadim Zeitlin
a2d8746ba7 only flush a client dc if it was not inheriting the native CGContextRef from an outside paint context, fixes #16334
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-08 14:11:05 +00:00
Vadim Zeitlin
c489816251 Fix wxBitmap conversion to wxImage in 64-bit wxOSX builds.
Don't assume that sizeof(long) == 4, this is just wrong.

Closes #16770.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-06 20:08:25 +00:00
Tim Kosse
440e477ea7 On wxMac, modal event loops avoid deleting pending objects. Hide the text control after editing a label in the generic tree control so it does not remain visible e.g. if the tree control is used in a dialog.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-05 12:49:41 +00:00
Vadim Zeitlin
ef5232d289 Fix wxFileDialog::GetFilterIndex() when opening files in wxOSX.
Update m_filterIndex in the "opening" case, just as we already did in the
"saving" one (see #13158 and r67550).

Closes #16764.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 20:45:13 +00:00
Robin Dunn
4ae6049401 a commit to test Trac/SVN integration. Closes #16754
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-31 23:36:18 +00:00
Robin Dunn
d2f140abff just another test commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-31 22:25:00 +00:00
Robin Dunn
618e1a1891 just a test commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-31 22:20:45 +00:00
Vadim Zeitlin
e91a996fa4 Make disabling submenus work in wxMSW.
As submenu items don't have a valid ID, we need to address them by their
position when calling EnableMenuItem() -- and for simplicity do it for all the
items.

Closes #16747.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 14:17:51 +00:00
Vadim Zeitlin
7a8cfc7964 Fix handling of fast clicks in wxRibbonBar under MSW.
Second click can result in a double click event instead of the usual simple
click if it happens quickly enough after the first one, so handle double
clicks in the same way as simple clicks instead of ignoring them.

Closes #16551.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 14:17:46 +00:00
Tim Kosse
a2b3702934 Add Windows 10 support to wxGetOsDescription(). Map Windows 10 to wxWinVersion_8 in wxGetWinVersion() to not change ABI.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-20 10:15:51 +00:00
Paul Cornett
2decc6f669 guard functions with wxCHECK_* macros rather than wxASSERT_*
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-17 17:44:06 +00:00
Vadim Zeitlin
01b12b8839 No real changes, just fix some typos in comments in the samples.
Closes #16734 (for 3.0).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-16 20:15:56 +00:00
Vadim Zeitlin
f7cf6e1e9e Fix inserting tools removed from wxToolBar back into it in wxMSW.
Make sure to reset the "to be deleted" flag we set on the tool when removing
it from the toolbar to avoid layout problems if the tool is added back later.

Closes #16735 (for 3.0).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-16 20:15:51 +00:00
Stefan Neis
e086d73560 No real changes, just fixed a couple of typos in comments, fixes #16726.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-14 11:12:31 +00:00
Paul Cornett
1f054661a4 Allow setting icon before m_widget is valid.
There is no need to require a valid m_widget,
the "realize" handler will take care of things later.
Closes #16731


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-13 17:40:29 +00:00
Tim Kosse
c7e52048e6 In wxMBConvStrictUTF8::ToWChar the length of a multibyte UTF-8 sequence is obtained from a table, with the leading byte as offset. Later in that function, the prefix of the leading byte is compared against the expected prefix for the given length.
Unless the table is faulty, this comparison can never fail. It is thus redundant and not needed. As optimizing compilers aren't smart enough yet to detect this, this commit removes the redundant check.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-11 20:31:31 +00:00