Commit Graph

62417 Commits

Author SHA1 Message Date
Vadim Zeitlin
200ea47519 Fix harmless recently introduced warning in wxOSX
Add an explicit cast to suppress "NSString may not respond to 'string'"
warning from clang given since d1c5f107a1.
2017-04-04 06:54:56 -07: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
1fb0b9c01f wxOSX: Don't tighten truncated markup in wxDataViewCtrl
Starting with OS X 10.10, rich text is automatically tightened if it
doesn't fit and needs to be ellipsized, in an effort to fit more text
on screen. This is not desirable in wxDataViewCtrl where the cells may
display texts of varying lengths, some tightened and some not.
Explicitly disable this functionality to have consistent appearance.
2017-04-04 14:30:33 +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
Vadim Zeitlin
404f0f8587 Hide wxChoice before destroying it with GTK+ 3
This works around GTK+ critical error messages that we get otherwise with GTK+
since the change done in its commit 7401794de6b084fea469af297b7c144724b8492c
which appeared in 3.22.8 release and is still present in the latest version.

These messages happen because gtk_combo_box_popdown() ends up being called
during the widget destruction if it's still shown, so just hide the combobox
before destroying it to avoid them.

Closes https://github.com/wxWidgets/wxWidgets/pull/449
2017-04-02 22:48:19 +02:00
Vadim Zeitlin
e9ce55e000 Fix wxRmdir() with non-ASCII paths
Don't apply at best unnecessary, and actually harmful, as it uses a wrong
conversion, fn_str() when calling wxRmDir() which takes wxString.

Update unit tests to check that wxRmdir() now works with non-ASCII filenames
too.

Closes #17644.
2017-04-01 19:12:27 +02:00
Vadim Zeitlin
d145ef7205 Get rid of ugly "pUnitMsg" in the file functions unit test
No real changes, just simplify the code passing the message shown when a test
fails to CppUnit a bit.
2017-04-01 19:07:26 +02:00
jprotopopov
5552351393 Add unit tests for more file-related functions
Test wxDirExists(), wxIsAbsolutePath(), wxMkdir() and wxRmdir() too.

Closes #17830.
2017-04-01 18:47:16 +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
Vadim Zeitlin
a05b1f39f5 Merge branch 'svg-sample'
Improve the UI and code of this sample.

Closes #14663.
2017-04-01 18:28:10 +02:00
Vadim Zeitlin
4325472e97 Use symbolic constants instead of hardcoded numbers in svn sample
It would arguably be even better to use different derived classes for
different operations instead of doing everything inside a single class with a
big "switch", but this would require more time, so for now at least make the
code slightly more understandable and maintainable.

This also results in using useful names for the files being saved by default
instead of just "SVG Test #" used before.
2017-04-01 18:26:16 +02:00
Vadim Zeitlin
5fb77c4c78 Credit Prashant Kumar Nirmal as svg sample author 2017-04-01 18:26:06 +02:00
Vadim Zeitlin
672cf7d199 Don't hardcode wxSpinCtrl size in the aui sample
This makes it too small when using GTK+ 3.22, resulting in GTK+ debug messages
about not having enough space for it -- and is, of course, wrong anyhow, as we
should always let controls determine their own best size.
2017-04-01 15:48:53 +02:00
Václav Slavík
d1c5f107a1 Fix crash with Vietnamese input method on macOS 2017-03-31 19:08:57 +02:00
Vadim Zeitlin
b7822ff511 Get rid of unnecessary helper function in the svg sample
No real changes, just remove the trivial CreateNewPage() function which made
the code less clear without any real gain.
2017-03-31 17:15:03 +02:00
Vadim Zeitlin
3745f2c771 Remove unnecessary check for null notebook page
A non-empty notebook always has a non-null current page.
2017-03-31 17:13:44 +02:00
Vadim Zeitlin
9eb62000f9 Simplify layout of the svg sample
Get rid of the panel and the sizer, neither of them are necessary when we have
a single control (wxNotebook in this case) taking up the entire frame client
area.
2017-03-31 17:12:39 +02:00
Vadim Zeitlin
fe562d8bcd Avoid ugly cast in the svg sample
Just use wxLogStatus() instead of manually setting the status text, as this
also allows to get rid of wxUSE_STATUSBAR checks (wxLogStatus() is always
declared and just does nothing in this case).
2017-03-31 17:11:27 +02:00
Vadim Zeitlin
367cf2da5c Fix a few whitespace problems in the svg sample
No real changes, just consistently use spaces after "//" and on both sides of
the assignment operator.
2017-03-31 17:07:12 +02:00
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