This uses the native registry support for 64-bit values available since
Windows XP.
Note that SetValue64() can't be just called SetValue() as this would
introduce ambiguities when writing an int or an enum to the registry.
This could be avoided by providing overloads for all the arithmetic
types, but it's arguably better to be more clear about what exactly is
being written to the registry in this low-level class and using a
different name is definitely simpler.
Don't repeat exactly the same code for 3 different types, just use a
template function instead.
Change the existing TryGetValue() helpers to take all output parameters
consistently by pointer, rather than taking only long by pointer and the
other by reference. This allows to isolate the inconsistency of the type
of wxRegKey::QueryValue() parameter in a single place here, hiding it
from the rest of wxRegConfig code.
Add an extra unit test for writing/reading longs to/from wxRegConfig.
wxListBox's width adjustment code appears to have been written before
wxCheckListBox's existence, and still assumed there's only one column, at
index 0, in some places.
In wxCheckListBox, however, there are two columns, and column 0 is the
non-resizable checkbox one. We need to use column 1 (aka the last
column) for automatic width updates, because that's where the text is.
This allows to show message boxes in ports other than wxMSW too by doing
it only when it is safe, i.e. when the GUI is initialized, while still
keeping the old code directly using the native MessageBox() function for
MSW for maximal robustness.
Although we don't want to use MB_TASKMODAL unconditionally, because it
results in non-optimal UI behaviour when there is a parent window, there
is no reason not to use it when we don't have any parent anyhow, so do
this, at least.
Pass correct parent HWND to ::MessageBox() in order to disable the
window while the message box is shown, as this function is supposed to
be similar to modal wxMessageBox() and it was unexpected that the
application could be reentered via the event handlers from inside it.
This required adding wxAppTraits::GetMainHWND() in order to only use the
HWND in GUI applications from the function defined in non-GUI code.
This trivial function just allows to avoid checking if wxTheApp is not
null before calling GetTopWindow() on it.
Replace the existing "wxTheApp && wxTheApp->GetTopWindow()" calls with
wxApp::GetMainTopWindow().
No real changes.
We currently don't use these files in the existing builds.
It might be a good idea to add another GitHub Action workflow checking
the message catalogs compilation that would be executed _only_ for the
changes to them, but this can/will be done later.
This internal function will be useful to check if the modules are
already initialized, i.e. if the library is in the "steady state"
between the end of the initialization and the beginning of the cleanup
phases.
Simply use wxVector instead, this shouldn't be less efficient (we rarely
remove the modules from the list and iterating over a vector should
actually be faster, as well as consuming less memory), but it avoids
ugly macros, is simpler to use and to debug and will be trivial to
replace with std::vector<> in the future.
No real changes, this is just pure cleanup.
In native OS X apps, focus ring is not shown around NSTableView controls
(focus is indicated differently, with selection's color).
See eece498 for the same fix in wxDataViewCtrl.
This adds a yet another conversion function, which is not ideal, but
still better than having to write ToStdString(wxConvUTF8) every time for
losslessly converting wxString to std::string: not only this is too
long, but it's also too easy to forget to specify wxConvUTF8, resulting
in data loss when using non-UTF-8 locale.
The simple test added in 59a8f26b01 (Add a unit test for wxWebRequest
query using URL parameters, 2021-03-06) worked when using httpbin.org,
but not when running httpbin locally, as it doesn't pretty-print JSON by
default.
Skip optional whitespace to make it work in both cases.
Not doing it, i.e. creating the window inside the static box as its
siblings, rather than children, may appear to work, but actually doesn't
always do it, for example the windows are not shown correctly when using
RTL locale.
Closes#19086.
For generic wx{Dir|File}PickerCtrl with text field the picker button
should be as high as the associated text field also when
wx{FLP|DIRP}_SMALL flag is set.
Closes#19087.
Avoid the need for ugly WX_NO_LOCALE_SUPPORT macro at the cost of a
couple of extra #ifs, which seems to be a worthy trade-off.
This also allows making the code calling setlocale("") for the default
language platform-independent.
No real changes.
Even if we do know about the system language, it's still better to let
OS/CRT handle it, as we may not know enough about it. E.g. "system
language" may actually be a mix of the different languages and formats
and we don't handle this case at all, while OS/CRT do just fine.