Commit Graph

62398 Commits

Author SHA1 Message Date
Vadim Zeitlin
70e01a6849 Use quotes, not angle brackets, for wx header in svg sample
Samples are part of wxWidgets and use quotes for including wx headers to
indicate that they're part of the same tree and not global headers, so just
follow the same convention here.
2017-03-31 17:04:56 +02:00
Vadim Zeitlin
331ba71d4e Remove unnecessary wx/vector.h inclusion from the svg sample
Nothing uses wxVector<> here.
2017-03-31 17:03:33 +02:00
Vadim Zeitlin
4b7d3561d9 Use standard menu IDs in the "svg" sample
Don't define our own ID_XXX when the standard ones will do.

Use wxID_SAVE instead of wxID_SAVEAS just because the former has a standard
accelerator (Ctrl-S) while the latter does not, at least under MSW, and it's
convenient to have one.
2017-03-31 17:01:10 +02:00
Vadim Zeitlin
4aa2a84ac5 Remove the now unused icons from the svg sample
Since these bitmaps are not used in the sample toolbar any more, they're not
needed at all now.
2017-03-31 16:58:19 +02:00
Prashant Kumar Nirmal
e2fbfb693f Improve "svg" sample UI to make using it less troublesome
The sample forced the user to use the menu "Open" command several (up to 8!)
times to get to a particular page which was inconvenient and confusing,
especially because more than 8 windows could be opened.

Fix both problems by just creating a notebook with 8 pages, each corresponding
to a particular test.
2017-03-31 16:55:23 +02:00
orbitcowboy
15ae00d7a2 Declare a local variable in filefn.cpp as const
No real changes, just make a variable which is set only once const.
2017-03-31 14:09:58 +02:00
Artur Wieczorek
72e67d0c52 Fix layout and size of vertical wxSlider (wxMSW)
Correct positioning of min/max labels to prevent them to be drawn outside the control.
Use size of enabled labels to adjust the size of the slider control.

Closes #17829.
2017-03-29 20:42:24 +02:00
Artur Wieczorek
113cec4ab2 Update wxPropertyGrid documentation
Completed documentation for topics marked as uncompleted.
2017-03-27 18:54:16 +02:00
Catalin
e118c918ce Redefine MAPVK_VK_TO_CHAR, missing from XP 64-bit and tdm32-gcc-5.1.0 2017-03-27 18:39:20 +02:00
Prince David
f375293704 Fix wxSVGFileDC build with wxUSE_MARKUP==0
Just add the missing wxUSE_MARKUP checks.
2017-03-27 00:27:09 +02:00
Artur Wieczorek
716f42b416 Fix drawing sample compilation when wxUSE_GRAPHICS_CONTEXT==0
'File_ShowGraphics' constant is not defined in this case so it cannot be referred to.
2017-03-25 21:00:51 +01:00
Takeshi Abe
1f20b73c11 Remove wrong MSW notes from wx*ChoiceDialog documentation
Both wxCENTRE flag and dialog position are supported under MSW, so don't say
that they are not.
2017-03-25 03:22:17 +01:00
Paul Cornett
493643477c Fix typo: CFStringref --> CFStringRef 2017-03-24 08:33:01 -07:00
Václav Slavík
dd3dec42e5 wxrc: extract translatable strings from <hint> 2017-03-24 12:32:39 +01:00
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