Commit Graph

62434 Commits

Author SHA1 Message Date
Tim Kosse
a2b04536d3 Create empty wxCFStringRef and not null one if conversion fails
If the passed string cannot be represented in the target encoding in the
wxCFStringRef constructor, create a reference to an empty string instead of a
null ref. Most users of wxCFStringRef cannot handle a null wxCFStringRef.

Closes #17825.
2017-03-23 14:07:37 +01:00
mgimenez
a9f83c879f Ignore gcc DLL build directories in git too
Add lib/gcc_dll* lines corresponding to the existing lib/gcc_lib* ones.

Closes #17827.
2017-03-23 14:05:25 +01:00
orbitcowboy
f8ea4d61bc wxEnumProperty: Fixed wrong variable name in Doxygen documentation. 2017-03-22 18:03:24 +01:00
Artur Wieczorek
4aed8cd0be Fix harmless warnings in samples (wxGTK)
Under wxGTK, wxAboutBox with no parent raises a warning "GtkDialog mapped without a transient parent".
2017-03-20 23:32:52 +01: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
Kelvin Lee
c4f6cf21dc Use canonical format for MSVS project/solution files
Use the same format as is used by MSVS itself to avoid spurious changes when
modifying the files. Notably:

- Use DOS end of line format (0D 0A).
- Add UTF-8 BOM (EF BB BF) to the beginning of the files.
- Do not put CR LF at the end of the last line in the file.

Closes https://github.com/wxWidgets/wxWidgets/pull/440
2017-03-18 15:14:26 +01:00
Artur Wieczorek
6861a15607 Handle EVT_CONTEXT_MENU directly in wxSTC (wxGTK)
A simulation of context menu event by handling directly EVT_RIGHT_UP was implemented in wxSTC in ddf2da08b5, but later on, EVT_CONTEXT_MENU generation in wxGTK was fixed in ac103441d1 so  simulation is no longer necessary and this event can be directly handled in wxSTC.
2017-03-17 17:15:06 +01:00
Artur Wieczorek
c8cb673aa2 Propagate EVT_CONTEXT_MENU if standard Scintilla context menu wasn't displayed, cont.
Add missing modifications in stc.cpp template for cbbd7b44b2.
2017-03-17 17:14:39 +01:00
Artur Wieczorek
cbbd7b44b2 Propagate EVT_CONTEXT_MENU if standard Scintilla context menu wasn't displayed
EVT_CONTEXT_MENU event should be consumed in the event handler only if Scintilla context menu was actually displayed.
2017-03-16 23:36:54 +01:00
New Pagodi
962979ebf1 Add option to display custom context menu in stc sample
This option could be useful to demonstrate ability to replace (override) standard Scintilla context menu with custom one. Switching between standard and custom popup menu is done with "Extra -> Custom popup menu" menu option.
2017-03-16 23:31:18 +01:00
Artur Wieczorek
6aa5d07229 Use wxCharBuffer instead of wxMemoryBuffer in wxSTC
To simplify the code, use wxCharBuffer objects to store a NUL-terminated Scintilla strings.
2017-03-15 21:06:14 +01:00
Artur Wieczorek
3ec5e06dff Use wxSwap() function to swap values of variables 2017-03-15 21:02:24 +01:00
Vadim Zeitlin
0cc5b6e97e Fix wxGTK build in non-Unicode mode
Use wxGTK_CONV_FONT() and wxGTK_CONV_BACK_FONT() macros instead of implicitly
using "m_font" which doesn't exist in wxTextEntry, which is not a wxWindow.
2017-03-15 13:38:37 +01:00
Vadim Zeitlin
3eda902331 Merge branch 'more-xdg-dirs'
Add possibility to use wxStandardPaths and, hence, wxFileConfig, in
XDG-compliant (but backwards-incompatible) mode.

Closes #17727.
2017-03-15 00:49:11 +01:00
Vadim Zeitlin
6a8b0c1d0e Merge branch 'unicode-cmdline-args'
Handle Unicode command line arguments in console applications with compilers
other than MSVC too.

Closes #14580.
2017-03-15 00:33:40 +01:00
New Pagodi
91a2869b0e Extend FindText() to return end position of matched text in wxSTC
New 5th parameter of FindText() can be used to receive the end position of matched text returned by SCI_FINDTEXT API.

Closes #17305.
Closes https://github.com/wxWidgets/wxWidgets/pull/23
2017-03-13 20:21:41 +01:00
New Pagodi
187c4692c8 Fix regression in mouse click event handling in wxSTC
In EVT_RIGHT_DOWN event handler introduced in 68888ca0a2 we need to propagate event to process it further in EVT_RIGHT_UP handler. This is important especially for wxGTK and wxOSX where EVT_RIGHT_UP is used to generate a context menu event.

Closes #17817.
2017-03-12 17:03:36 +01:00
VZ
edb72282a4 Merge pull request #431 from catalinr/rmv_old_Win_define_checks
Remove checks for several old symbols and defines present in XP and later SDKs.
2017-03-11 17:56:56 +01:00
Cătălin Răceanu
67e61df2a5 Add MSVS 2017 solution file for the tests
Allow (re)building the tests easily with the latest MSVS version too.
2017-03-11 17:55:08 +01:00
Vadim Zeitlin
1821a4043b Fix compilation error in a recent commit
Add semicolon missing from 7a2df9534c.
2017-03-11 03:48:06 +01:00
Vadim Zeitlin
c9a458bfe8 Use Win32 ::CommandLineToArgvW() to tokenize command line
Use the standard function in Unicode build instead of our own emulation, it
should give better results and is marginally more efficient as it does fewer
heap allocations than our own wxCmdLineParser::ConvertStringToArgs().
2017-03-11 03:41:25 +01:00
Vadim Zeitlin
5b74044c3e Use Unicode command line when not using wmain() under Windows
While we use wmain() for the compilers that provide it since the changes of
bfa78c63b9, we still didn't handle Unicode
command line arguments not representable in the current Windows code page
correctly when using other compilers (e.g. MinGW).

Now use Win32 ::GetCommandLine() function for them and parse the command line
ourselves instead of relying on non-Unicode-friendly main() arguments which
can't represent arbitrary Unicode strings when not using UTF-8 (which is never
the case under Windows).
2017-03-11 03:41:23 +01:00
Vadim Zeitlin
9910013c23 Don't use gcc 4.8 workaround in the hash test with clang
This is unnecessary and just results in a warning about an unknown attribute
when building with clang.
2017-03-11 03:37:07 +01:00
Vadim Zeitlin
7a2df9534c Recognize Travis CI environment in the tests
Avoid running time-sensitive tests such as StopWatchTestCase under Travis as
they can result in spurious failures if the machine running the test is under
too much load.
2017-03-11 03:35:11 +01:00
Vadim Zeitlin
13da4f5253 No changes, just fix a typo in a comment
Spell "buildbot" correctly.
2017-03-11 03:32:07 +01:00
Vadim Zeitlin
f6b91ad143 Mention wxStandardPaths::SetFileLayout() in the change log 2017-03-09 18:08:23 +01:00
Vadim Zeitlin
3ad54f2852 Iterate over wxTextFile without using indices
Using iterator methods is less error-prone (there is no danger of using an
invalid index) and slightly shorter and more clear too.
2017-03-09 18:06:33 +01:00
Vadim Zeitlin
058f8c3c0f Use wxFileName instead of manipulating strings directly
Prefer to use wxFileName ctor to string concatenation.
2017-03-09 18:04:44 +01:00
Vadim Zeitlin
214aac6fd6 Avoid calling wxGetenv() twice unnecessarily
Use wxGetEnv() helper function which allows to write the code in more natural
and (slightly) more efficient way.

No real changes.
2017-03-09 18:02:14 +01:00
Vadim Zeitlin
41fe019f3b Refactor: extract GetXDGConfigHome() into a separate function
No real changes, just avoid doing the same thing in 2 different places and do
it in a single helper function instead.
2017-03-09 18:00:29 +01:00
Vadim Zeitlin
a44b61e976 Revert incompatible change to Unix wxStandardPaths::GetUserDir()
There is no reason to break the behaviour of the existing code, which doesn't
call SetFileLayout(FileLayout_XDG), by not returning the correct directories
from GetUserDir(Dir_Downloads) and similar any longer.
2017-03-09 17:56:45 +01:00
Vadim Zeitlin
5cf9fcbb1a Add wxStandardPaths::ConfigFileConv enum for clarity and safety
Use an enum instead of type-unsafe "int" for the second parameter of the
recently added wxStandardPaths::MakeConfigFileName().

This also avoids unnatural dependency of wxStandardPaths on
wxCONFIG_USE_SUBDIR constant defined in a higher level wxFileConfig class.

No real changes, but just make things a bit more robust and hopefully more
clear.
2017-03-09 17:53:14 +01:00
Vadim Zeitlin
4bf6ae8d7c Make FileLayout_XXX elements of an enum
Slight improvement to the previous commit: make FileLayout_Classic and
FileLayout_XDG elements of an enum instead of using an untyped "int" for them
which didn't really make any sense because these values are not bit masks but
exclusive choices for the layout.

Also rewrite the checks for them to use "switch" instead of "if" to be warned
by the compiler if we ever add another enum value but forget to update the
code to handle it.

Finally, improve the documentation (add missing "@since") and comments.
2017-03-09 17:23:20 +01:00
Martin Koegler
d56d127d3f Implement XDG file layout 2017-03-08 22:30:21 +01:00
Martin Koegler
8d5d00db9d Implement MakeConfigFileName 2017-03-08 22:29:55 +01:00
New Pagodi
1bcb30f6d7 Add wxStyledTextCtrl::AutoCompGetCurrentText()
Added support for SCI_AUTOCGETCURRENTTEXT API.

Closes #16263.
2017-03-07 19:15:46 +01:00
New Pagodi
f33da324c0 Don't use deprecated function in stc sample
Call to deprecated wxStyledTextCtrl::SetStyleBits() function can be omitted because underlying SCI_SETSTYLEBITS API is not operational anymore.

See #17671.
2017-03-07 19:07:38 +01:00
Artur Wieczorek
da66e81fb9 Update bounding box when drawing gradients in drawing sample
Advanced gradients are drawn using wxGraphicsContext and hence bounding box for underlying wxDC is not updated automatically. We need to update bounding box with extents of all used graphics paths.
2017-03-06 18:48:49 +01:00
Artur Wieczorek
92b64ff997 Set background colour of saved image in drawing sample
Initialize background colour prior to actual drawing to make it uniform for all kinds of drawing operations.
2017-03-06 18:47:02 +01:00
New Pagodi
15ee1ebd12 Improve generating wxSTC code and documentation
Several new features were implemented in gen_iface.py and accompanying '.in' files:
1. Added an option to parse provisional section in Scintilla.iface. When global variable GENERATE_PROVISIONAL_ITEMS is set to 1, methods and values in this section receive corresponding wxSTC items.
2. Deprecated section in Scintilla.iface is not skipped, but parsed and corresponding wxSTC items are created (marked as deprecated in the code and documentation).
3. Added a set 'notMappedSciValues' that can be used to prevent the creation of specific wxSTC values which are intended to be handled manually.
4. For deprecated constants there is generated a code to raise respective warnings during the compilation.

Closes #17671.
2017-03-06 18:38:56 +01:00
Catalin
8e82435d70 Keep NIN_BALLOONxxx checks and definitions.
Apparently some gcc flavors (like g++ (GCC) 5.3.0 from AppVeyor) do not define these symbols. FWIW tdm-gcc-5.1.0 does not need them.

This partially reverts commit 299a06c86e.
2017-03-06 00:40:18 +02:00
Catalin
b8ced83a6c Keep SHACF_FILESYS_XXX checks and definitions.
Apparently some gcc flavors (like g++ (GCC) 5.3.0 from AppVeyor) do not define these symbols. FWIW tdm-gcc-5.1.0 does not need them.

This partially reverts commit 2f5f5caf99.
2017-03-05 22:25:34 +02:00
Catalin
79256c2fe3 Revert "Remove check for TTTOOLINFO_V1_SIZE"
Apparently some gcc flavors (like g++ (GCC) 5.3.0 from AppVeyor) do not define TTTOOLINFO_V1_SIZE, so keep the check for it. FWIW tdm-gcc-5.1.0 does not need it.

This reverts commit e38762bc55.
2017-03-05 21:17:02 +02:00
Cătălin Răceanu
bbc4b3659a Drop compile and run-time Win9x support in wxFileDialog
All relatively recent SDK versions have the up-to-date definition of struct
OPENFILENAME, so we don't need to provide our own one.

Also, wxWidgets applications don't run under Win9x any longer, so there is no
need to fall back to comdlg32.dll v4 which was used there during run-time.
2017-03-05 17:06:19 +01:00
Cătălin Răceanu
e950e4a129 Remove MONITOR-related declarations not needed any more
Don't define MONITOR-related structs and messages ourselves in wxMSW code,
this shouldn't be needed any more as they're present in all remotely recent
versions of the SDK.

No real changes, just minor clean up.
2017-03-05 17:01:22 +01:00
Catalin
e81c460808 Keep defining ACDD_VISIBLE because shobjidl.h header is not included since it is missing from MinGW and Cygwin. 2017-03-05 15:49:14 +02:00
Catalin
f6b1a6bc16 Remove check for ATTACH_PARENT_PROCESS.
<https://msdn.microsoft.com/en-us/library/windows/desktop/ms681952(v=vs.85).aspx>
2017-03-05 15:40:30 +02:00
Catalin
511ec44743 Remove old checks
AW_XXX <https://msdn.microsoft.com/en-us/library/windows/desktop/ms632669(v=vs.85).aspx>
MAPVK_VK_TO_CHAR <https://msdn.microsoft.com/en-us/library/windows/desktop/ms646307(v=vs.85).aspx>
TME_LEAVE <https://msdn.microsoft.com/en-us/library/windows/desktop/ms645604(v=vs.85).aspx>
WM_MOUSELEAVE <https://msdn.microsoft.com/en-us/library/windows/desktop/ms645615(v=vs.85).aspx>
2017-03-05 15:39:31 +02:00
Catalin
7b26050fb6 Remove checks for NIN_XXX.
<https://msdn.microsoft.com/en-us/library/windows/desktop/ms632643(v=vs.85).aspx>
2017-03-05 15:36:24 +02:00
Catalin
e38762bc55 Remove check for TTTOOLINFO_V1_SIZE.
<https://msdn.microsoft.com/en-us/library/windows/desktop/hh298349(v=vs.85).aspx>
2017-03-05 15:35:14 +02:00