Commit Graph

66331 Commits

Author SHA1 Message Date
Artur Wieczorek
cbfff9c944 Set built-in attributes also for parent wxPGProperties
If given attribute is not a built-in attribute handled by the current property it should be passed to the parent property because it may be handled there.
2019-04-22 20:28:23 +02:00
Artur Wieczorek
0c144f6cda User proper value type of wxPG_ATTR_MULTICHOICE_USERSTRINGMODE attribute
This attribute is of int type.
2019-04-22 20:16:16 +02:00
Artur Wieczorek
cd1dafb619 Make wxPG_ATTR_MULTICHOICE_USERSTRINGMODE a built-in attribute
This attribute is used only internally in wxArrayStringProperty and thus can be considered as a built-in attribute which value can be stored in the local data member and not in the property's attribute store.
2019-04-22 20:16:15 +02:00
Artur Wieczorek
36285e7fb8 Fix setting wxPG_ARRAY_DELIMITER attribute
This attribute is used only to set internal data member in wxArrayStringProperty and thus can be considered as a built-in attribute which doesn't have to be stored in the property's attribute store.
2019-04-22 20:16:14 +02:00
Artur Wieczorek
c96495d3be Fix formatting keywords and predefined constants in documentation 2019-04-22 20:16:12 +02:00
Vadim Zeitlin
84dc4707d7 Fix horizontal scrollbar handling for wxCheckListBox in wxMSW
The scrollbar wasn't shown when the control became only slightly more
narrow than its contents, resulting in truncation of the rightmost part
of the strings shown in it.

Fix this by accounting for the check box explicitly in wxListBox
SetHorizontalExtent() method using the new MSWGetFullItemSize() helper
which is also used to avoid code duplication between wxCheckListBox
MSWOnMeasure() and DoGetBestClientSize() methods.

Closes #18377.
2019-04-22 14:57:55 +02:00
Vadim Zeitlin
96422fde4d Also use wx-translators@wxwidgets.org instead of @wxwindows.org
As with the previous commit, the old email address is not available any
more since a long time, so replace all mentions of it.
2019-04-22 14:14:10 +02:00
Vadim Zeitlin
5488a1438f Globally replace vadim@wxwindows.org with vadim@wxwidgets.org
The old email address is invalid since many years and shouldn't be used
any longer.

No real changes.
2019-04-22 14:12:05 +02:00
Vadim Zeitlin
5d770e5cbe Use "m_" prefix for wxExecuteData members
No real changes, just rename the members to use the standard prefix
which is more consistent with the rest of wxWidgets and also allows to
avoid both the hacks with "foo_" names for the arguments of some
functions that were used to avoid the conflicts with member "foo" and
at least one remaining shadowing warning for "exitcode".
2019-04-22 14:09:28 +02:00
Stefan Csomor
5020a810db Fix macOS memory leaks, also avoid false positive warnings from clang analyzer
__clang_analyzer__ is a constant that only is defined during analyze build, this helps avoiding false positives as long as there is no specific way to silence analyzer messages
2019-04-21 23:52:37 +02:00
Artur Wieczorek
d0a84a6266 Update some strings and labels to the more current values in propgrid sample 2019-04-21 23:39:36 +02:00
Artur Wieczorek
ac22b5924f Reduce the scope of local variables 2019-04-21 23:39:35 +02:00
Artur Wieczorek
fc7d8090cf Put header into separate line in wxPG dump in propgrid sample 2019-04-21 23:39:34 +02:00
Artur Wieczorek
ecb711d2b3 Remove obsolete code from propgrid sample
This is code for v3.x so it doesn't make sense to check version against v2.8.
2019-04-21 23:39:33 +02:00
Artur Wieczorek
f6e05f4ed9 Update documentation regarding wxPGProperty attributes
Add explicit notes which attributes are built-in and what it functionally means.
2019-04-21 23:39:33 +02:00
Artur Wieczorek
b35170dc61 Make wxPG_BOOL_USE_CHECKBOX and wxPG_BOOL_USE_DOUBLE_CLICK_CYCLING built-in attributes
Both attributes are used only in wxBoolProperty and wxFlagsProperty to set respective internal flags and don't have to be stored in the property's attribute store.
2019-04-21 23:39:32 +02:00
Artur Wieczorek
1ee97383f7 Make wxPG_COLOUR_HAS_ALPHA a built-in attribute
wxPG_COLOUR_HAS_ALPHA attribute is used only in wxSystemColourProperty (and derived properties) to set respective internal flag so it doesn't have to be stored in the property's attribute store.
2019-04-21 23:39:31 +02:00
Artur Wieczorek
ccd877c458 Make wxPG_FLOAT_PRECISION a built-in wxFloatProperty attribute
wxPG_FLOAT_PRECISION value is used only internally in wxFloatProperty and there is no need to make it readable via getter function.
2019-04-21 23:39:30 +02:00
Artur Wieczorek
76584e2d3c Use dedicated function to get rounded value of wxFloatProperty
wxFloatProperty::ValueToString() returns string representing value rounded with required precision so we don't need to retrieve wxPG_FLOAT_PRECISION attribute and do rounding on our own.
2019-04-21 23:39:29 +02:00
Artur Wieczorek
2898e8136a Cast to wxFileProperty* only once
Result of wxDynamicCast can be used directly, no need to cast once again in case of success.
2019-04-21 23:39:29 +02:00
Artur Wieczorek
9e71598dd1 Explicitly return Boolean value as declared 2019-04-21 23:39:28 +02:00
Artur Wieczorek
c5cdb66c82 Use dedicated function to retrieve Boolean value from wxVariant
GetBool() is dedicated for this purpose.
2019-04-21 23:39:27 +02:00
Artur Wieczorek
fcc961b379 Reset the flag only if it is necessary 2019-04-21 23:39:26 +02:00
Artur Wieczorek
e6e8f45051 Fix setting wxPG_PROP_STRING_PASSWORD attribute
For built-in attributes (like wxPG_PROP_STRING_PASSWORD) wxPGProperty::DoSetAttribute() should return true to give the option (controlled by wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES style) to prevent the attribute from being stored into property's attribute storage.
2019-04-21 23:39:26 +02:00
Artur Wieczorek
01e21b4f38 Use predefined constants to represent wxPGProperty attribute identifiers
Use predefined constants representing attribute identifiers instead of specific strings.
2019-04-21 23:39:25 +02:00
Vadim Zeitlin
aeef082e47 Update year in various copyrights to 2019
This is the equivalent of c8b6ca308b for
2019, except that it was produced by running misc/scripts/inc_year and
not manually now.

See https://github.com/wxWidgets/wxWidgets/pull/1302
2019-04-21 20:39:28 +02:00
Vadim Zeitlin
0a81d7eb8b Add a script to update copyright years
Now we just have to not forget to run it every year in January.

See https://github.com/wxWidgets/wxWidgets/pull/1302
2019-04-21 20:37:44 +02:00
Vadim Zeitlin
8d7f97a141 Refactor inc_release script to allow reusing parts of it
No real changes, just extract the useful helpers from this script into
another file.
2019-04-21 20:26:07 +02:00
Vadim Zeitlin
f28224dfad Avoid infinite loops when decoding fails in wxTextInputStream
wxTextInputStream::ReadLine() must set stream error to indicate to the
caller that it failed to decode its input, otherwise there is no way to
know about the error and the caller risks to keep calling ReadLine()
forever, as it happened in ReadAll() helper used by wxExecute(), for
example.

See #18382.
2019-04-21 20:10:49 +02:00
Vadim Zeitlin
7d3687f515 Restore wxConvAuto in wxTextInputStream used by wxExecute()
This reverts commit a05ae051d8 and allows
to correctly decode UTF-8 output of child processes again.

Also add a (disabled by default) test allowing to verify that this does
work now.

Closes #14720, #18382.
2019-04-21 20:10:30 +02:00
Vadim Zeitlin
731b3a804f Return error from wxConvAuto if not given enough bytes
Instead of falling back on Latin-1 if we fail to decode the input as
UTF-8, check if we have enough bytes for the latter and just return an
error if we don't.

This ensures that wxTextInputStream::GetChar() and similar code will
retry with a longer byte sequence, allowing wxConvAuto to be used for
decoding UTF-8 contents on the fly, which didn't work before.

See #14720.
2019-04-21 20:05:37 +02:00
Vadim Zeitlin
af83769bd0 Add wxMBConv::GetMaxCharLen()
This is not used yet, but will be needed soon in order to determine
whether we have sufficiently many to decode them.
2019-04-21 20:04:52 +02:00
PB
bd37af32b1 Improve documentation for file selector functions
Improve wording, add missing parentheses to make a function reference
hyperlinked, and add @header tag where it was missing.

Closes https://github.com/wxWidgets/wxWidgets/pull/1303
2019-04-21 17:58:21 +02:00
PB
21f6c0af1e Update year in string returned by wxGetLibraryVersionInfo()
Change years in the copyright information returned by
wxGetLibraryVersionInfo() from "1995-2018" to "1995-2019".

Closes https://github.com/wxWidgets/wxWidgets/pull/1302
2019-04-21 17:53:50 +02:00
Vadim Zeitlin
025709d18b Merge branch 'sys-appearance'
Add wxSystemAppearance for dark mode checks under macOS.

Closes https://github.com/wxWidgets/wxWidgets/pull/1292
2019-04-21 02:11:18 +02:00
Vadim Zeitlin
16af76e542 Use wxSystemAppearance::IsDark() to check for dark mode in wxOSX
This should be more reliable than simply checking the red component of
the default window background colour.
2019-04-21 02:11:08 +02:00
Vadim Zeitlin
9a9c845289 Add wxSystemAppearance to check for dark mode under macOS
Provide a way to retrieve the name of the current system appearance
(mostly for diagnostic purposes) and check if it uses predominantly dark
colours.

Currently this class has a non-trivial (but still very simple)
implementation under macOS only and simply checks whether the default
text colour is brighter than the default background colour under the
other platforms, but other platform-specific implementations could be
added later.

Also update the drawing sample "system colours" page to show the system
appearance as well.
2019-04-21 02:11:07 +02:00
Vadim Zeitlin
d662a2223e Add wxColour::GetLuminance()
This method can be used to return the perceived brightness of the
colour.

Closes https://github.com/wxWidgets/wxWidgets/pull/1300
2019-04-21 02:09:42 +02:00
Vadim Zeitlin
b6477e0b9c Merge branch 'stcpopup'
Many usability and appearance improvements for autocompletion popups and
call tips in wxSTC.

See https://github.com/wxWidgets/wxWidgets/pull/1267
2019-04-21 02:03:32 +02:00
Vadim Zeitlin
eebadf3483 Rename m_UseXXX variables to m_useXXX for consistency
And also to follow the usual naming convention.
2019-04-21 02:03:05 +02:00
Vadim Zeitlin
807d95e07d Add wxEVT_COLOURPICKER_CURRENT_CHANGED and DIALOG_CANCELLED events
Send events from generic wxColourPickerCtrl when the currently selected
colour in the dialog shown by it changes and when this dialog is
cancelled.

Notice that currently this only works on wxMSW as it relies on
wxEVT_COLOUR_CHANGED support in wxColourDialog which is only available
there.

Based on work of Trylz, see https://github.com/wxWidgets/wxWidgets/pull/1219
2019-04-21 01:53:14 +02:00
Vadim Zeitlin
35c16935f1 Send wxEVT_COLOUR_CHANGED from wxColourDialog under MSW
Add support for a new event sent by wxColourDialog, currently only under
MSW, when the colour currently selected in it changes.

Based on work by Trylz, see https://github.com/wxWidgets/wxWidgets/pull/1219
2019-04-21 01:53:14 +02:00
Vadim Zeitlin
5b7114b4d7 Send correct event directly from wxGenericColourButton
Instead of sending wxEVT_COLOURPICKER_CHANGED event from the button
itself and then catching it in wxColourPickerCtrl and resending an event
from the control from there, just send the event originating from the
correct object directly.

This allows to slightly simplify the code and will be especially useful
for other events, to be added in the upcoming commits, to avoid having
to write the same forwarding code for all of them.
2019-04-21 01:53:14 +02:00
New Pagodi
419a053b7d Change names of XXXIsSet variables in wxSTCListBoxVisualData
Instead name the variables useDefaultXXXColour since it more accurately
describes what purpose the variables are serving.
2019-04-20 12:38:29 -05:00
Artur Wieczorek
06d15be780 Notify wxPropertyGrid about selected property only if new page was selected
wxPropertyGridManager::DoSelectPage() returns true also if new page is
the same as the current one so we have to use alternative way to check
whether we really switched to the new page.
2019-04-19 22:24:00 +02:00
Artur Wieczorek
285bedc5e5 Always redraw wxPGProperty after changing its attribute
Because changing some attributes of the property affects the format
of displayed value so the property has to be refreshed whether its
attribute is set through wxPGProperty::SetAttribute()
or wxPropertyGridInterface::SetPropertyAttribute().

Closes #18388.
2019-04-19 22:23:34 +02:00
New Pagodi
9fc8642458 Merge branch 'stcpopup' of https://github.com/NewPagodi/wxWidgets into stcpopup 2019-04-19 10:12:29 -05:00
New Pagodi
9e2089e702 Apply more suggestions from code review
This commit removes an attempt to initially hide a frame which was
unnecessary since frames are initially hidden by defautlt, removes an
unncecessary destructor that only performed actions that would happen
anyway, and replaces a Freeze/Thaw pair with wxWindowUpdateLocker.
2019-04-19 09:55:41 -05:00
Stefan Csomor
26949ce886 Using ‚old‘ constant names, so that SDK 10.7 compilation is still possible 2019-04-19 10:48:54 +02:00
Stefan Csomor
f8bdd27164 Fixing warning when compiling against SDK < 10.14 2019-04-19 09:40:38 +02:00