Commit Graph

17326 Commits

Author SHA1 Message Date
Vadim Zeitlin
8cb4e70064 Refactor wxLocale initialization code
Don't call wxSetlocale() in DoInit() any more, this was redundant when
it was called from Init(wxLanguage) overload.

Add new DoCommonPostInit() called from both Init() overloads after
setting the locale in whichever way they do it to avoid code
duplication.

As a side effect of this change, the error message given if the locale
can't be set is the same now independently of the ctor/Init() overload
used (previously it differed depending on whether a wxLanguage or the
name of the language as string was passed) and it's always logged using
wxLogWarning() and not it in one case and wxLogError() in the other one.
2017-07-16 15:03:22 +02:00
Vadim Zeitlin
8713d73466 Avoid at least some unnecessary setlocale() calls
Instead of calling wxLanguageInfo::GetLocaleName(), which called
setlocale() at least thrice (first to query the current locale, second
to try to change it and third to restore the original locale) and then
calling setlocale() again if it succeeded, use the new TrySetLocale()
method which calls setlocale() just once and doesn't require calling it
again in the caller.

This makes the code slightly more efficient but, more importantly,
shorter and more clear.
2017-07-16 15:03:17 +02:00
Vadim Zeitlin
7836dfbc77 Make wxLanguageInfo::GetLocaleName() consistent across platforms
Check that the locale can be indeed set to the given string in Unix
version too, there doesn't seem to be any good reason to do it for MSW
only.
2017-07-16 15:03:03 +02:00
Vadim Zeitlin
a2056d7314 Fix 32 bit wxOSX build after wrong merge
Correct wrong merge of 1c0ecec225, the
checks for __LP64__ should have been removed in the merge commit
aaae5ef702 but were mistakenly left in.

See https://github.com/wxWidgets/wxWidgets/pull/377
2017-07-16 14:54:28 +02:00
Vadim Zeitlin
aaae5ef702 Merge branch 'better-mac-32bit-fix'
Re-enable alignment support for wxDataViewCtrl cells in wxOSX which was
previously disabled just to allow the library to compile in 32 bits.

Closes https://github.com/wxWidgets/wxWidgets/pull/377
2017-07-11 23:16:49 +02:00
Vadim Zeitlin
e851db7e9e Avoid -Wexpansion-to-defined clang warning in wxOSX
Define wxCLRDLGG_USE_PREVIEW_WITH_ALPHA as either 0 or 1 instead of using an
expression involving "defined" for it as the latter provoked many clang
-Wexpansion-to-defined warnings, which were harmless but very annoying.
2017-07-11 23:16:28 +02:00
Vadim Zeitlin
467c48841f Rename wxTextFieldCell members once again
Use underscores on them to show that they are different from properties or
local variables (in pure Objective C they would actually start with
underscores, but this is not a good idea in C++ code) and avoid conflict
between a member name and "wxAlignment" type name, which was confusing.
2017-07-11 23:16:14 +02:00
Vadim Zeitlin
a326da369b No real changes, just remove leading underscore from variables
Now that these variables are in a public header, don't use leading underscores
for them, if only for consistency with all the others.
2017-07-11 23:16:13 +02:00
Vadim Zeitlin
1c0ecec225 Better fix for 32 bit wxOSX build
Instead of disabling vertical alignment support in wxDataViewCtrl, move the
private variables to the header file: this is supported by all versions of the
Objective-C runtime, including the old one used for 32 bit applications,
unlike the new way based on declaring the variable in an anonymous extension.

This replaces the changes of 22216b70e7.
2017-07-11 23:16:13 +02:00
Vadim Zeitlin
5292f77ab4 Check for window best size in wxPersistentTLW
Ensure that the restored size is at least equal to the best size of the
window to avoid cutting off parts of it in (a common) case when a newer
version of the program adds new UI elements, thus increasing the window
best size and possibly making the previously stored size too small.
2017-07-06 15:22:10 +02:00
Bryan Petty
ed173ed91e Use HTTPS with Trac links. 2017-07-04 13:15:14 -06:00
VZ
294436c8bb Improve wxBasicString and fix memory leaks when using it
Improve and extend wxBasicString API and fix multiple BSTR leaks in due to
confusingly named Get() method in the old API.

Closes #17889.
2017-07-03 02:28:37 +02:00
Artur Wieczorek
f311807112 Handle EVT_CONTEXT_MENU directly in wxSTC (wxOSX)
A simulation of context menu event by handling directly EVT_RIGHT_UP was implemented in wxSTC in 451c5cc7b9, but later on, EVT_CONTEXT_MENU generation in wxOSX was fixed in 524c47aa3a so  simulation is no longer necessary and this event can be directly handled in wxSTC.
2017-07-02 13:02:13 +02:00
PB
ca3f919da9 Make wxBasicString safer and easier to use as a BSTR RAII wrapper. 2017-07-01 12:50:24 +02:00
Stefano D. Mtangoo
2971930ab8 Fix wx/textcompleter.h compilation when it's the first included header
Explicitly include the required headers instead of relying on them being already included.

Closes https://github.com/wxWidgets/wxWidgets/pull/513
2017-06-29 17:17:01 +02:00
Stefan Csomor
a352f80537 Fix 32 bit compilation
The class wxTextFieldCell was still declared, but not defined for 32 bit builds, move the define to NSTextFieldCell into the header.
2017-06-27 18:10:07 +02:00
Stefan Csomor
6dfa897b4a Adding a native implementation for clearing bitmap/window contexts
Filling a bitmap surface is filled with ARGB 0,0,0,0. This way eg buffered transparent layers can be properly cleared.
2017-06-25 22:48:58 +02:00
Stefan Csomor
b0470eb91d Bring OSX API in sync with MSW 2017-06-25 13:55:06 +02:00
Stefan Csomor
7104ed845d Allow for compilation under iOS 11
The system() API call has been deprecated since iOS 8, so it's better not to use it at all, eventhough compilation only breaks in iOS 11.
2017-06-24 22:01:15 +02:00
Stefan Csomor
a77066d530 Use toll-free bridges from CTFontRef to NSFont or UIFont from (#507) 2017-06-24 11:09:29 +02:00
PB
60563ce0ce Modify wxBasicString so it is better suited to work as an RAII wrapper for BSTR. 2017-06-23 17:06:56 +02:00
PB
684f0146f1 Revert "Introduces wxBSTR, an RAII wrapper for MSW BSTR type. wxBSTR also supersedes wxBasicString."
This reverts commit db22c91d44.
2017-06-23 17:05:03 +02:00
Stefan Csomor
36de95bd8e wxSecretStore is not implemented on iOS 2017-06-23 11:04:26 +02:00
Stefan Csomor
e15d417a76 Move config_xcode.h include to setup.h
In order to allow inclusion of configure determined flags via a wx/setup.h include also for xcode builds, the include has to move into the setup0.h template
2017-06-22 22:23:28 +02:00
Vadim Zeitlin
bfb893170e Fix initialization of SingleCharBuffer and Utf16CharBuffer data
Don't do it at all in the ctor, initializing just the first element of
the array is useless as it's overwritten by EncodeChar() anyhow, so just
leave the task of NUL-terminating the data to this function as well.

It might be even better to just have a ctor taking wxUniChar in these
classes instead and make EncodeChar() a trivial wrapper around it, but
for now just apply the minimal fix to repair the test breakage after the
last commit.

See https://github.com/wxWidgets/wxWidgets/pull/467#issuecomment-310384946
2017-06-22 15:55:24 +02:00
Vadim Zeitlin
4d3aaafc86 Avoid MSVC warning about correctly default-initializing arrays
Don't rely on default array initialization, not only it may not work
with some really old compilers (which is actually not that important as
we don't seem to rely on these arrays being initialized, in fact), but
it results in warnings about working correctly (sic) from MSVC in
versions from 9 up to 12 inclusive.

See https://github.com/wxWidgets/wxWidgets/pull/467#issuecomment-310193867
2017-06-22 01:50:19 +02:00
Dimitri Schoolwerth
07c8f15e43 Fix 'destionation' typos
Rename relatively new enum value wxTASKBAR_JUMP_LIST_DESTIONATION to
wxTASKBAR_JUMP_LIST_DESTINATION as well as a private function containing
the same typo.
2017-06-21 22:51:57 +04:00
Vadim Zeitlin
bb306b7ed0 Merge fixes for handling Unicode characters outside of BMP
Closes https://github.com/wxWidgets/wxWidgets/pull/467
2017-06-21 19:10:12 +02:00
Vadim Zeitlin
8311715bdf Ensure that SIZEOF_WCHAR_T is defined in wx/chartype.h
This should always the case now, but wasn't when not using configure
(e.g. in MSVC builds) before, so verify this explicitly to ensure that
we don't just silently define wxUSE_UNICODE_UTF16 wrongly, as it
happened before the fix in the previous commit.
2017-06-21 19:08:27 +02:00
Vadim Zeitlin
a86d0f8d65 Move wx/debug.h inclusion after SIZEOF_WCHAR_T in wx/defs.h
This is required now because wx/debug.h includes wx/chartype.h which uses
SIZEOF_WCHAR_T to define wxUSE_UNICODE_UTF16.
2017-06-21 19:07:43 +02:00
Vadim Zeitlin
24f3ff3b78 No changes, just fix a typo in a recently added comment 2017-06-21 19:07:13 +02:00
Stefan Csomor
8b1381f2b1 OSX use fontAttributes for better emulation of bold fonts (#501)
* using fontAttributes dictionary allows for better emulation of bold typefaces, also switch to using color from context, this allows keeping the same dict throughout, as a side effect fix font caching

* reverting in order to maintain crossplatform compatibility

* applying review suggestions

* applying review suggestions
2017-06-20 17:55:26 +02:00
Vadim Zeitlin
a2af796156 Remove outdated comment about wxListCtrl checkboxes support
They're implemented in the generic version too, so don't say that they're
MSW-only.

No real changes.
2017-06-20 15:25:28 +02:00
pbfordev
3dd7d57bd4 wxBSTR cleanup: fixed a bug in wxBSTR::operator=(const wxBSTR& wxbstr); slightly improved comments in the code. 2017-06-17 08:52:48 +02:00
pbfordev
db22c91d44 Introduces wxBSTR, an RAII wrapper for MSW BSTR type. wxBSTR also supersedes wxBasicString. 2017-06-16 21:07:50 +02:00
Stefan Csomor
4558dbe97f switching from comma to semicolon, possible error warning 2017-06-15 17:48:23 +02:00
Stefan Csomor
d28dd3333b change code to help analyzer trace ownership properly 2017-06-07 23:00:28 +02:00
Stefan Csomor
a12a4c25bc support Xcode 9 and 10.13 SDK builds 2017-06-06 21:54:08 +02:00
Steve Browne
1eea936f8f Properly handle tab navigation for wxRadioBoxes on wxOSX. 2017-06-05 01:17:52 -04:00
Steve Browne
f4b73fd99e Account for wxTE_PROCESS_TAB when doing tab navigation on wxOSX. 2017-06-05 01:14:43 -04:00
Steve Browne
8bca6deda3 Properly handle tab navigation for most controls on wxOSX #17341. 2017-06-05 01:10:53 -04:00
Vadim Zeitlin
60d9f403a2 Only declare wxSetClipboardData() in wxMSW when it's defined
This is only the case when full OLE support is disabled.

See https://github.com/wxWidgets/wxWidgets/pull/491
2017-06-01 00:38:08 +02:00
Adrian DC
9b97be52c6 wx/msw/clipbrd.h: Remove unreferenced wxGetClipboardData prototype
* wxGetClipboardData was removed through commit
    b375d81499 "Use wxDataObject methods..."
    but former usages will break with unreferenced
    function as the header still advertises the function

Change-Id: I77e756d2b7d0db7c3833578d2846f4e922a55262
2017-05-31 16:56:09 +02:00
Adrian DC
11e5413558 wx/xml: Implement line-ending modes for xml saves
* Add 'wxTextFileType m_fileType' to hold the type
 * Add 'wxString m_eol' to hold the end of lines string

 * Add SetFileType() and GetFileType() to set and get the type
 * Add GetEOL() to get the end of lines wxString

 * Backwards compatibility preserved by using wxTextFileType_Unix

Change-Id: I3e8547b377e2c4060a3a2d97c299a08ea2c0a376
Signed-off-by: Adrian DC <radian.dc@gmail.com>
2017-05-30 14:31:59 +02:00
Artur Wieczorek
79a7fa0330 Create new instance of wxPrintDC in wxGtkPrintDialog
GetPrintDC() should return a new device context created by the print
dialog, not the duplicate of existing context passed from the caller
(e.g. from wxGtkPrinter) through SetPrintDC(). Therefore SetPrintDC() is
no longer useful and can be removed.
2017-05-29 20:17:19 +02:00
Paul Cornett
d16afbd3c1 Use const reference for wxPoint parameter 2017-05-28 23:56:46 -07:00
Paul Cornett
01909a20c8 Remove initializations of wxString with wxEmptyString
An empty string is the default
2017-05-28 23:53:44 -07:00
Paul Cornett
7358202d29 Use ctor initializer for non-trivial data members 2017-05-28 23:49:55 -07:00
Paul Cornett
1532afcb2f Use ctor initializer for non-trivial data members 2017-05-28 23:40:34 -07:00
Paul Cornett
d35e516fd5 Use compiler-generated copy ctor and assignment operator for wxHtmlLinkInfo 2017-05-28 23:29:10 -07:00
Paul Cornett
5feb43c8a2 Fix accidental use of comma operator 2017-05-28 22:42:13 -07:00
Vadim Zeitlin
de47af2f0f Merge branch 'configure-enhance'
Miscellaneous enhancements to configure
2017-05-28 16:21:21 +02:00
Vadim Zeitlin
e2dfa8e477 Regenerate comments in setup.h headers
Update the generated files after 338629e314.

The only changes are in the comments.
2017-05-28 16:20:19 +02:00
Vadim Zeitlin
5283fa14a7 Fix wxUSE_XTEST location in include/wx/osx/setup.h
Move it out from the auto-generated section to avoid losing it during the next
build/update-setup-h execution (see e24bc249e4
which added this option in the wrong place).
2017-05-28 16:18:12 +02:00
Vadim Zeitlin
2f8a343b22 Add an option for reproducible library builds
This can be useful to the library packagers, notably under Debian.

Closes #17000.
2017-05-27 19:03:32 +02:00
Artur Wieczorek
ef3863a71e Implement GetPartialTextExtents() in wxGtkPrinterDC
Generic implementation from wxDCImpl doesn't work well with wxPrinterDC
under wxGTK.
(This implementation is adopted from wxCairoContext::GetPartialTextExtents.)
2017-05-26 00:32:49 +02:00
orbitcowboy
aa56419ea8 Fix accidental use of comma operator in wxMouseState
Replace an accidental comma with the semicolon, which is what should have been
used here since the beginning (even though comma actually did do the same
thing).
2017-05-24 17:29:25 +02:00
VZ
d2c2274baa Merge pull request #478 from stahta01/staging
Fix wxGTK/Win32 build with "--disable-wxdib".
2017-05-22 00:25:03 +02:00
Vadim Zeitlin
66865ed714 Merge branch 'icon-bundle-from-msw-res'
Add support for using icons from MSW resources in wxIconBundle.

Closes https://github.com/wxWidgets/wxWidgets/pull/482
2017-05-20 17:03:50 +02:00
Vadim Zeitlin
f5a0893ee9 Update comment and change log after MSW wxIconBundle improvements
It is now possible to load icons from a bundle too.
2017-05-20 17:01:59 +02:00
Vadim Zeitlin
5353bfc963 Minor whitespace/style fixes
Remove extra spaces, harmonize the style of "#endif" comments.
2017-05-20 17:01:58 +02:00
Vadim Zeitlin
e24bc249e4 Add back wxUSE_XTEST definition to Xcode setup.h file
This was erroneously removed by e82c619402 but
it still needs to be defined here, even if it's not used under macOS, in order
to avoid errors about it being undefined in wx/unix/chkconf.h.
2017-05-20 16:50:59 +02:00
pbfordev
944f3dffd2 Refactored the previous commit regarding wxIconBundle support for icons stored MS Windows resources. 2017-05-20 08:43:50 +02:00
Artur Wieczorek
3eb650972a Fix setting style flags in wxListCtrl (wxMSW)
UpdateStyle() function was introduced in edccf428 to synchronize in
SetWindowStyleFlag() style of the control with new style flags just stored
in m_windowStyle.
In 9a8d75f1, storing directly a new flags in m_windowStyle was replaced by
the call to parent's SetWindowStyleFlag().
Because call to parent's SetWindowStyleFlag() updates both m_windowStyle
and actual style of the control for common flags (WS_*, LVS_* flags),
synchronizing the control again with UpdateStyles() is pointless (since
this function does nothing in this context).
Only wxSCROLL style flags need special care because wxListCtrl doesn't
have these styles but the control itself may have them. In order
to preserve them in the call to SetWindowStyleFlag(), we can do the trick
and request the same new scroll style as the actual physical style.
UpdateStyles() is useless now and can be deprecated.

See #17059.
2017-05-19 00:01:47 +02:00
pbfordev
062f7c4137 Add support for loading wxIconBundle from MS Windows resource 2017-05-18 22:51:01 +02:00
Catalin
6c9b3a8254 Improved wxListCtrl::HitTest() docs
Changes were based on the docs of LVHITTESTINFO structure
<https://msdn.microsoft.com/en-us/library/windows/desktop/bb774754(v=vs.85).aspx>
2017-05-14 22:34:31 +02:00
Václav Slavík
11f79cda31 Fix handling of & in wxDataViewCtrl markup on wxOSX
Follow up to 60bd6842e4. Apply equivalent
changes to wxMarkupToAttrString, add a new wxItemMarkupToAttrString
class for mnemonics-less strings and use it in wxDataViewTextRenderer.
2017-05-12 16:43:21 +02:00
Artur Wieczorek
de739181ba Update comment in msw/setup0.h
Since fc96ef3570 WinRT implementation of
wxNotificationMessage doesn't require wxUSE_OLE.
2017-05-09 20:51:58 +02:00
Artur Wieczorek
a17ce3debe Take COM defintions from ObjBase.h header file
Apparently combaseapi.h header file is not present in the older development
environments.
2017-05-09 20:51:41 +02:00
Artur Wieczorek
fc96ef3570 Allow build wxNotificationMessage without OLE support (wxUSE_OLE==0)
WinRT implementation of wxNotificationMessage can be decoupled from OLE
utilities because actually only IUnknown interface implementation is
required.
2017-05-09 17:27:36 +02:00
Artur Wieczorek
8d03282378 Move IUnknown implementation to the separate files
IUnknown interface is used sometimes (e.g. in WinRT implementation of
wxNotificationMessage) alone, without other OLE routines, so it is
helpful to have its code in the separate file to avoid coupling with main
OLE code when only IUnknown implementation is required.
2017-05-09 17:27:21 +02:00
Tim S
bd63bb49e3 Changed value of resource macros;
under Win32 when wxUSE_WXDIB=0.
  wxICON
  wxBITMAP
  wxBITMAP_PNG
2017-05-08 09:49:00 -04:00
Scott Talbert
69e4f491b2 Move wx/gtk/webview_webkit2_extension.h to private directory
Make it more clear that this header is private, i.e. used only by the library
itself.

Close https://github.com/wxWidgets/wxWidgets/pull/473
2017-05-04 18:23:00 +02:00
Vadim Zeitlin
d0aaea5143 Merge branch 'staging' of https://github.com/stahta01/wxWidgets
Allow building wxGTK for MSW using MSys2 and configure.

Close https://github.com/wxWidgets/wxWidgets/pull/428
2017-05-04 02:51:52 +02:00
Artur Wieczorek
f2e707f095 Add check for wxUSE_NOTIFICATION_MESSAGE dependency on wxUSE_OLE
WinRT implementation of wxNotificationMessage requires wxUSE_OLE because
one memeber variable is of type wxAutoULong which is defined in the OLE
utilities collection (oleutils.h).
2017-05-03 22:49:12 +02:00
Artur Wieczorek
83f5ba359d Add check for wxUSE_DRAG_AND_DROP dependency on wxUSE_OLE
Library itself can be built successfully when wxUSE_DRAG_AND_DROP==1 and
wxUSE_OLE==0 but several wxDropTarget functions (referred in wxWindowMSW,
wxTextDropTarget, wxFileDropTarget) are reported as missing during linking
the application.
2017-05-03 22:49:01 +02:00
Artur Wieczorek
670e1fe948 Allow build wxDataObject without OLE support (when wxUSE_OLE==0)
Reorganize the code by putting OLE-dependent code into the blocks
controlled by wxUSE_OLE and by sharing remaining code (like implementation
of wxDataFormat, wxBitmapDataObject, wxFileDataObject, etc.) to allow
building wxDataObject and its specializations also without OLE support.
Since wxDataObject no longer requires OLE support, corresponding check in
checkconf.h can be removed.
Thanks to this additional flexibility, it is possible to use wxClipboard
whether OLE support (wxUSE_OLE) is enabled or not, either with OLE-based
wxDataObject (OLE clipboard) or with wxDataObject decoupled from OLE (Win
clipboard API).
2017-05-03 00:12:56 +02:00
Artur Wieczorek
2dd726471f Build wxMetafileDataObject when wxUSE_DATAOBJ==1
wxMetafileDataObject is a specialization of wxDataObject and its
compilation should be controlled directly by wxUSE_DATAOBJ (like it's done
under wxOSX, see e.g. include/wx/osx/metafile.h), not by
wxUSE_DRAG_AND_DROP.
2017-05-02 23:30:30 +02:00
Artur Wieczorek
d7f70fc462 Schedule deprecated wxWindowBase functions for removal in the future
Some wxWindowBase functions were marked deprecated prior to wx 3.0 release
and therefore they should be inserted into WXWIN_COMPATIBILITY_2_8 blocks
to mark them for removal in a future wx version.
2017-05-01 14:27:42 +02:00
Artur Wieczorek
e4a1e9a27f Schedule deprecated wxSTC constants and functions for removal in the future
Insert recently deprecated wxSTC elements in WXWIN_COMPATIBILITY_3_0 blocks
to mark them for removal in a future wx version.
2017-05-01 14:27:41 +02:00
ARATA Mizuki
58d940690a Better handling of supplementary wxUniChar values in some of wxString methods
On MSW, the Unicode code point is now properly encoded as UTF-16 when
assigned or appended to a wxString.

Closes #11827
2017-05-01 18:37:59 +09:00
ARATA Mizuki
90c990cf83 Add some functions to handle supplementary characters
The added functions are:

- wxUniChar::IsBMP()
- wxUniChar::IsSupplementary()
- wxUniChar::HighSurrogate()
- wxUniChar::LowSurrogate()
2017-05-01 18:00:21 +09:00
ARATA Mizuki
61f0e0ce22 Add wxUSE_UNICODE_UTF16 macro to represent if the internal representation of wxString is UTF-16 or not
The value of this macro is equal to (wxUSE_UNICODE_WCHAR && SIZEOF_WCHAR_T == 2).
2017-05-01 13:55:26 +09:00
Artur Wieczorek
6f59c756f6 Fix inserting items to wxRearrangeList (wxGTK)
Order array cannot be extended both in DoInsertItems() and DoInsertOneItem()
functions because DoInsertOneItem() is invoked indirectly from DoInsertItems()
(through the call to wxCheckListBox::DoInsertItems() and DoInsertItemsInLoop())
and therefore order array would be eventually extended by two items for one
inserted list item. To avoid this duplicated actions, we should resign from
overriding DoInsertOneItem().
2017-04-30 21:42:41 +02:00
Artur Wieczorek
d5c46e87a6 Fix inserting multiple items to wxRearrangeList
In wxRearrangeList implementations (like wxMSW) where DoInsertItemsInLoop()
and DoInsertOneItem() are not used to insert multiple items, DoInsertItems()
has to be overriden to do this insertion.

See #17836.
2017-04-28 23:57:36 +02:00
Artur Wieczorek
7e1b64a2eb Order array has to have the same size as item list in wxRearrangeList
Number of indices stored in the internal order array has to be the same as
number of the items, so whenever item is added or removed, order array
has to be adjusted accordingly.

Closes #17836.
2017-04-28 21:03:23 +02:00
Vadim Zeitlin
0975228809 Fix build problem with "override" on wxApp::GetXVisualInfo()
This method doesn't override any virtual method in the base class, so
wxOVERRIDE can't be used here.

In fact, this method doesn't seem to be used at all, but keep it for
compatibility and in case we want to use it later, as wxGTK does.
2017-04-26 14:42:38 +02:00
Scott Talbert
cbe0a1f049 Add support for WebKit2GTK+ in wxWebView 2017-04-22 20:00:48 +01:00
Vadim Zeitlin
9c35db85d1 Use symbolic constant for DST shift
No real changes, just use DST_OFFSET constant instead of 3600 and remove the
"FIXME" comments as we're not actually going to fix anything here but will
just continue to assume 1 hour shift for DST.
2017-04-19 17:07:44 +02:00
Metallicow
8c8d8c4d3a Fix "ont" (instead of "one") typo in wxSTC
Correct "ont" to "one" in several places.
2017-04-18 12:25:46 +02:00
Vadim Zeitlin
70a499f635 Don't rely on argv being NULL-terminated under MSW
Since the changes of c9a458bfe8 ("Use Win32
::CommandLineToArgvW() to tokenize command line"), this is not guaranteed any
more as this Win32 function doesn't necessarily ensure it under older MSW
versions such as XP.

Just use "argc" explicitly instead of relying on this in wxCmdLineArgsArray to
fix crashing under XP.
2017-04-16 17:50:22 +02:00
Václav Slavík
c7a6cb9c2e Fix missing virtual dtor warning for wxMarkupText
Changes from 60bd6842 introduced a warning about not having a virtual
destructor despite having virtual methods.
2017-04-11 15:34:50 +02:00
Maarten
3afc2790b8 Target latest Windows API in wxMSW
Update WINVER and similar definitions to use the latest 0x0a00 value
corresponding to Windows 10 instead of the old Windows 8.1 values.
2017-04-08 21:48:47 +02:00
Václav Slavík
60bd6842e4 Fix handling of ampersands in wxDataViewCtrl markup
Handle "&amp;" in exactly the same way as "&" in wxMarkupParser, i.e. do not
map the former to "&&" to prevent it from being interpreted as a mnemonic as
this is incompatible with using markup for anything but the control labels,
e.g. for wxDataViewCtrl items text, in which mnemonics are not recognized.
And even when using markup for control labels, it was a questionable decision
as it's really not clear at all why should the XML entity and the raw
character itself be handled differently.

Also split wxMarkupText into two classes, wxMarkupText that handles
mnemonics in the markup (which is typically a label) and a very
similar, but not derived, wxItemMarkupText that handles mnemonics-less
markup for list etc. items, uses DrawItemText() and supports
ellipsizing.

Illustrate the use of ampersands in the dataview sample.
2017-04-07 18:45:39 +02:00
Václav Slavík
a145d759ea Fix building wxOSX with MacOSX10.11 SDK
Fixes #17838.
2017-04-06 15:05:19 +02:00
Vadim Zeitlin
2b026e02e8 Only declare wxTextCtrl::MSWCreateContextMenu() if wxUSE_RICHEDIT==1
This method is only used, and defined, when using rich edit controls, so don't
declare it if wxUSE_RICHEDIT==0.

This should fix a link error in this build variant.

Closes https://github.com/wxWidgets/wxWidgets/pull/452
2017-04-04 15:27:05 +02:00
Václav Slavík
e01510f6c0 Add MAC_OS_X_VERSION_10_{11,12} to platform.h 2017-04-04 14:06:36 +02:00
jprotopopov
9b1afaa7a6 Don't crash in wxFFile::Eof() and Error() if file is closed
Assert and return false instead, this is more developer-friendly.

Add unit tests to check that these functions really work as expected when
called on a closed file.

Closes #17828.
2017-04-01 18:43:13 +02:00
Artur Wieczorek
113cec4ab2 Update wxPropertyGrid documentation
Completed documentation for topics marked as uncompleted.
2017-03-27 18:54:16 +02:00
Vadim Zeitlin
3b298cc8b2 Only define wxCLANG_WARNING_SUPPRESS/RESTORE when using clang
This makes sense and avoids an error if some other header sabotages our
__has_warning definition check by providing a dummy definition for it (as ICU
does, for whatever reason).
2017-03-20 00:26:10 +01:00