Commit Graph

66086 Commits

Author SHA1 Message Date
Vadim Zeitlin
0b9041dd29 Remove macOS workaround unnecessary any longer
The workaround introduced by f0e098fa06
doesn't seem to be needed any more, the test passes just fine without
it, so remove it.

See #16969.
2019-04-26 13:36:00 +02:00
Vadim Zeitlin
1b7b79e1c2 Remove wxLog::AddTraceMask() call
This shouldn't be done unconditionally, trace mask can always be enabled
using WXTRACE environment variable from outside the test.

Also remove a useless tracing message.
2019-04-26 13:19:05 +02:00
Vadim Zeitlin
77645a1aad Replace legacy CppUnit macros with CATCH ones
No real changes.
2019-04-26 13:19:05 +02:00
Vadim Zeitlin
ba8a594bb3 Remove unnecessary wxLogDebug() from the test cases
Tests can be traced using CATCH command line options already, so these
log statements were useless.
2019-04-26 13:19:05 +02:00
Vadim Zeitlin
12e2f9c0cc Get rid of CppUnit::TestCase subclass
Use a test fixture instead.

This gets rid of some boilerplate and allows to avoid repeating
preprocessor checks.
2019-04-26 13:19:05 +02:00
Vadim Zeitlin
9adcae898f Make wxFileSystemWatcherEvent handler non-virtual and private
There is no reason for it to be neither virtual nor public.
2019-04-26 02:52:57 +02:00
Vadim Zeitlin
194fa8b4ca Remove unneeded KeepWaiting() and AfterWait() functions
These functions were never used anywhere and their meaning was not
clear, so just drop them.

Also remove the now unused "tested" member and "WAIT_DURATION" constant.
2019-04-26 02:52:57 +02:00
Vadim Zeitlin
4783262238 Simplify the code by using CallAfter()
Use CallAfter() to perform idle-time initialization, this is shorter and
simpler than dealing with the idle events explicitly.

Unfortunately the remaining use of idle events can't be avoided, explain
the reasons for this in a comment.
2019-04-26 02:51:47 +02:00
Vadim Zeitlin
9c956ea962 Remove strange counter-based idle handling code
Just bind the idle events we want to execute dynamically instead.

This is already more clear and robust than the old version, but will be
simplified event further in the next commit.
2019-04-26 02:35:14 +02:00
Vadim Zeitlin
db0d288f60 Use Bind() instead of Connect()
Just another modernization, no real changes.
2019-04-25 02:49:23 +02:00
Vadim Zeitlin
cfb194e55f Use wxVector<> instead of macro-based wxArray
Also remove the never used m_lastEvent member variable.

No real changes.
2019-04-25 02:50:08 +02:00
Vadim Zeitlin
cd8bbcb8df Remove unused variable
FileSystemWatcherTestCase::m_loop was never used, so just remove it.
2019-04-25 02:50:03 +02:00
Vadim Zeitlin
a83ffbe320 Reduce use of raw pointers
Use objects instead of pointers whenever possible and wxScopedPtr
instead of raw pointers when we really need to allocate objects on the
heap.
2019-04-25 02:49:54 +02:00
Vadim Zeitlin
789ba56c77 Rename class used as the test skeleton
Use a better name than the absolutely meaningless EventHandler.

Also add a brief comment describing this class.

No real changes.
2019-04-25 02:49:24 +02:00
Artur Wieczorek
87318ec4ee Update documentation bout querying for property attributes
Describe what is returned when corresponding functions are queried for values of built-in attributes and wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES style is set.
2019-04-22 20:28:53 +02:00
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
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