Commit Graph

71396 Commits

Author SHA1 Message Date
Vadim Zeitlin
9604c729bf Update the shown file name in wxGTK wxFilePickerCtrl::SetPath()
This still doesn't work if the file doesn't exist, but at least shows
the correct file name if it does exist, which is better than nothing and
the best we can reasonably do when using the native control.

Closes #19163.
2021-09-22 16:11:35 +02:00
Vadim Zeitlin
bd423096df Restore recently removed #include wx/textctrl.h in wx/combobox.h
Some existing code relies on wxEVT_TEXT being defined after including
just wx/combobox.h too, so just keep this formally unnecessary but by
now impossible to remove #include removed in d3eafa4d18 (Fix compilation
of wxFormBuilder-generated code using wxTE_XXX, 2021-07-14).

See #14132.

Closes #19264.
2021-09-22 16:11:35 +02:00
Jouk
f4e0c76346 Add wxUSE_SPELLCHECK to setup for OpenVMS 2021-09-22 08:44:01 +02:00
Vadim Zeitlin
19002a54ad Regenerate toolbar sample bitmaps in 32 and 64 pixel sizes
They're more appropriate than 16 and 32 pixels nowadays.

Also add SVG versions of the icons, from which these bitmaps were
created.
2021-09-21 23:45:09 +02:00
Vadim Zeitlin
47211fa520 Show how to use higher resolution toolbar bitmaps in high DPI
Update the toolbar sample to show how to use bigger images for the
toolbar in high DPI.
2021-09-15 21:15:19 +02:00
Vadim Zeitlin
d6f1f79cef Remove unnecessary calls to wxToolBar::SetToolBitmapSize()
This is unnecessary, just as an existing comment said, so don't bother
doing it.
2021-09-15 21:15:19 +02:00
Vadim Zeitlin
fe615bdeea Get rid of INIT_TOOL_BMP() macro in the toolbar sample
It isn't really useful any more now that all ports use wxBITMAP_PNG()
and just obfuscates the code.

No real changes.
2021-09-15 21:15:19 +02:00
Vadim Zeitlin
8a337fcdd9 Use PNG icons instead of BMP and XPM ones in the toolbar sample
Update the sample for the 21st century (with just a bit of delay) and
use PNGs under all platforms instead of using BMPs under MSW and XPMs
elsewhere.

Copy PNG icons from Tango, even if we already have almost of them in
art/tango because we plan to also use "2x" versions of them in this
sample soon.
2021-09-15 21:15:19 +02:00
Vadim Zeitlin
acb43011c1 Remove extra blank lines from png2c.py output
Adding them just seems unnecessary.
2021-09-15 21:15:19 +02:00
Vadim Zeitlin
fc104c8b4f Link only GUI libraries, not wxBase, with gspell
Don't add dependencies on gspell and all GUI libraries that it uses to
wxBase library, only link the GUI libraries with it.

See https://github.com/wxWidgets/wxWidgets/pull/2516
2021-09-15 15:35:33 +02:00
Vadim Zeitlin
ed19e5625b Fix wxFileName unit test under Unix after recent changes
Don't use GetVolumeSeparator() to combine UNC or GUID volumes with
paths, this doesn't work because this kind of paths doesn't contain
colons at all.

Update the documentation to mention this.
2021-09-15 13:10:25 +02:00
Vadim Zeitlin
e8629db48a Add another test case for wxPATH_NORM_DOTS
This was reported to not work but does work now.

See #15012.
2021-09-15 02:06:30 +01:00
Vadim Zeitlin
549e0a59b1 Fix handling of single letter shares in UNC paths in wxFileName
This comes at the price of breaking compatibility and returning
"\\share" rather than just "share" from wxFileName::GetVolume() for the
UNC paths. This breakage seems justified because it is required in order
to allow application code to distinguish between paths "x:\foo" and
"\\x\foo", which was previously impossible as GetVolume() returned just
"x" in both cases.

Document this change, adjust the existing checks for the new GetVolume()
semantics and add a new test which passes now, but didn't pass before.

Closes #19255.

This commit is best viewed ignoring whitespace-only changes.
2021-09-15 01:51:35 +01:00
Vadim Zeitlin
7e4b54a00a Replace old hack in wxFileName::Assign() with better solution
Replace the workaround introduced as a "temporary fix to avoid breaking
backwards compatibility in 2.8" back in 9e1c7236e0 (don't treat foo in
c:\\foo\bar as network share, 2006-12-17) with a better solution
proposed in the comment in that commit, i.e. don't even try to extract
the volume from the path if we already have the volume separately.

This commit is best viewed ignoring whitespace-only changes.
2021-09-15 00:35:34 +01:00
Vadim Zeitlin
abf26b03a7 Fix wxFileName::Mkdir("/foo") under MSW
Creating a directory with the leading path separator unexpectedly
created it under the current directory rather than in the root of the
current drive under MSW, due to the path being considered relative, in
spite of starting with the path separator, because it didn't have the
volume.

Fix this by avoiding the use of IsAbsolute() in Mkdir() and checking for
m_relative instead, as it seems the safest possible fix for this bug
because changing IsAbsolute() to return true in this case might change
the behaviour of the existing code.

Closes #4470.
2021-09-13 21:25:30 +01:00
Vadim Zeitlin
8d13440d69 Fix wxPATH_RMDIR_FULL documentation
Explain what this flag really does in Rmdir() documentation itself, as
the old wording was confusing.

Closes #16682.
2021-09-13 21:05:21 +01:00
Vadim Zeitlin
8db2f45171 Fix handling multiple leading backslashes in wxFileName under MSW
Extend the existing workaround to work not only with explicitly
wxPATH_DOS paths, but with paths implicitly using the DOS format due to
it being the default format for the current platform.

Closes #19261.
2021-09-13 20:53:27 +01:00
Artur Wieczorek
efb40daf4f Execute Window::SizerErrors test under wxMac 2021-09-11 23:24:22 +02:00
Artur Wieczorek
a86419c0be Fix Window::SizerErrors test in release build
In release build no exceptions are thrown by wxASSERT/wxCHECK
so there is no need to check them.
2021-09-11 23:24:22 +02:00
Vadim Zeitlin
3840b0b1c4 Merge branch 'combo-non-text'
Allow using non-text control as main window of wxComboCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/2515
2021-09-11 14:03:02 +02:00
Iwbnwif Yiw
5ba2461fd1 Switch to using GSpell for wxTextCtrl proof checker in wxGTK
Use GSpell rather than GtkSpell because GSpell also allows to check
single line text controls.

Closes https://github.com/wxWidgets/wxWidgets/pull/2516
2021-09-11 14:02:13 +02:00
Vadim Zeitlin
0fd138a4e7 Slightly simplify running the GUI tests in the Mac CI workflow
No real changes, just don't use pipefail option when we're not using
pipelines at all -- this was somewhat confusing.
2021-09-11 13:54:24 +02:00
Artur Wieczorek
0381b16bd1 Skip tests that currently fail under wxMac 2021-09-11 09:16:32 +02:00
Artur Wieczorek
301b08b95d Execute GUI tests under wxOSX 2021-09-11 09:16:32 +02:00
Vadim Zeitlin
178ac74596 Fix crash due to missing retain in wxUILocale wxMac code
We need to retain [NSLocale availableLocaleIdentifiers] result too, as
it doesn't copy the returned object.
2021-09-10 19:11:42 +02:00
Owen Wengerd
b3f609781e Handle more wxTextCtrl accelerators in MSWShouldPreProcessMessage()
Ensure that Shift-{Home,End,Left,Right} can still be used for selecting
text in the control even if they're also used as accelerators.

Closes https://github.com/wxWidgets/wxWidgets/pull/2511
2021-09-08 23:23:24 +01:00
Vadim Zeitlin
573e4fa0ec Allow using custom main window in wxComboCtrl
Add wxComboCtrl::SetMainControl() which can be used to use some other
window instead of the default wxTextCtrl as the main window of the
combo control.

Update the sample and the documentation to show the new function.
2021-09-08 20:44:34 +02:00
Vadim Zeitlin
13c6c619ac Remove unnecessary local variable in wxComboCtrlBase code
There doesn't seem to be any point in using local "customBorder" instead
of member "m_widthCustomBorder", so remove the unnecessary local
variable and use the member variable instead.

No real changes.
2021-09-08 18:42:10 +01:00
Artur Wieczorek
4a7ac90ce3 Fix wxImage::InitAlpha tests in release build
In release build exceptions are not thrown
so there is no need to check them.
2021-09-08 17:43:25 +02:00
Vadim Zeitlin
d89af4e311 Fix regression with spurious generic wxListCtrl columns resizing
Don't set default width every time the column is updated, as it happens
e.g. when it's clicked by the user, but only when it is created, by
moving the code added in 96d36383bd (Use sensible default column width
in generic wxListCtrl too, 2021-08-17) from SetItem() to the ctor of
wxListHeaderData.

Closes #19256.
2021-09-07 19:44:02 +02:00
Vadim Zeitlin
bba9aa7122 Merge branch 'gtk-install-docs'
Improve wxGTK install docs: document prerequisites, improve formatting,
remove obsolete parts.

See https://github.com/wxWidgets/wxWidgets/pull/2510
2021-09-07 19:25:45 +02:00
Vadim Zeitlin
50493a920f Remove "fall through" comments from the samples
Use wxFALLTHROUGH when appropriate and just remove the useless "fall
through" comment from a "default" branch.

No real changes.
2021-09-07 19:24:30 +02:00
Blake Madden
1380b1914c Fix typos in sample comments
Closes https://github.com/wxWidgets/wxWidgets/pull/2513
2021-09-07 19:23:31 +02:00
Vadim Zeitlin
8368914725 Merge branch 'compare-localized'
Allow creating wxUILocale for any locale and add
wxUILocale::CompareStrings().

See https://github.com/wxWidgets/wxWidgets/pull/2506
2021-09-05 23:16:10 +02:00
Vadim Zeitlin
2bab87b140 Always initialize just added wxRibbonButtonBar field
Initialize m_ribbonBar added in the previous commit to NULL before
setting it to the correct value later, when wxRibbonButtonBar is fully
created.

See #19249.

Co-Authored-By: Maarten Bent <MaartenBent@users.noreply.github.com>
2021-09-05 18:28:38 +02:00
Vadim Zeitlin
706ab2c300 Fix crash when using popup window for wxRibbon button bars
Fix crash introduced by 8e8a68c1b (Move code accessing bitmaps to
wxRibbonButtonBarButtonBase too, 2020-02-07) which start using
GetAncestorRibbonBar() in wxRibbonButtonBar code, without taking into
account that we may have no ribbon bar ancestor when the button bar is
shown in a popup frame, as it happens when there is not enough space to
show it fully in the main window itself.

Remember the ribbon bar in a member variable, relying on the fact that
we must have it in our parent chain when constructed, and just use it
later to avoid this.

Closes #19249.
2021-09-05 18:15:41 +02:00
Vadim Zeitlin
c777a39650 Fix appearance of "%" in wxMSW install instructions
Te changes of 74c51eaff2 (Fix formatting of wxMSW build instructions,
2021-07-13) broke the rendered output of "%WXWIN%", for some reason the
leading percent sign needs to be double to appear correctly inside the
backticks, so do it to fix this.

Closes #19260.
2021-09-05 17:44:57 +02:00
Vadim Zeitlin
98c2eef619 Fix scrollbar position in wxListCtrl in wxUniv
Skip the event in wxGenericListCtrl::OnSize() to let wxUniv position the
window scrollbars correctly.

See https://github.com/wxWidgets/wxWidgets/pull/2512

Closes #19254.
2021-09-05 17:36:57 +02:00
Kvaz1r
bfd2d02b3e Fix crash in wxUniv when destroying MDI child frame
Disassociate child frame menu bar from its parent before destroying it
to avoid using a dangling pointer later, when destroying the parent.

See https://github.com/wxWidgets/wxWidgets/pull/2505

Closes #19253.
2021-09-05 17:28:13 +02:00
Vadim Zeitlin
e38e089525 Update configure --enable-debug[_flag] options description
Don't say that the application needs to be compiled with the same
__WXDEBUG__ value, as this is not true since 3.0 days.

Also link the debugging overview.
2021-09-05 16:04:56 +02:00
Vadim Zeitlin
91923dc3f1 Reformat configure options description
No changes in contents, just use a list for configure options rather
than preformatted text block.
2021-09-05 16:04:56 +02:00
Vadim Zeitlin
45f7ec9bdb Add "prerequisites" section to GTK installation instructions
List the required packages in Debian/Ubuntu and Fedora/CentOS.
2021-09-05 16:04:56 +02:00
Vadim Zeitlin
3ca3944cff Add a pseudo-test for interactive wxUILocale::FromTag() testing
This allows to easily check whether the given locale is supported.
2021-09-05 00:10:05 +01:00
Vadim Zeitlin
2c580c9190 Add wxUILocale::FromTag() helper
This is exactly the same as wxUILocale(wxLocaleIdent::FromTag()) but
shorter.
2021-09-05 01:00:04 +02:00
Vadim Zeitlin
c217eb6815 Make wxUILocale objects copyable
There doesn't seem to be any reason to disallow copying these objects
and because they only have const methods, we can use reference counting
for them without bothering with copy-on-write, so it's simple to
implement.
2021-09-05 01:00:04 +02:00
Vadim Zeitlin
c7ad052c71 Use wxLocaleIdent in Unix wxLocale and wxUILocale code
No real changes, just prefer using wxLocaleIdent to strings in a few
places.
2021-09-05 01:00:04 +02:00
Vadim Zeitlin
6f4dd01b5b Remove unnecessary wxMac check from Unix code not used under Mac
This file is not compiled under Mac, where src/osx/core/uilocale.mm is
used, so there is no need to check for __WXMAC__ here.

No real changes.
2021-09-05 01:00:04 +02:00
Vadim Zeitlin
6b26deaddc Replace wxLocaleIdent ctor from language with FromTag()
This static function parses a subset of the language tags described in
BCP 47 (see https://www.rfc-editor.org/rfc/bcp/bcp47.txt).

Use the tag, as specified by this function, rather than the locale
identifiers components under MSW, where this should allow us to use even
locales that can't be described using just language-script-region.
2021-09-05 01:00:04 +02:00
Vadim Zeitlin
a47a885718 Check that locale ID argument of wxUILocale ctor is not empty
Disallow using empty wxLocaleIdent here, GetDefault() can, and should,
be used for the user default locale.
2021-09-05 01:00:04 +02:00
Vadim Zeitlin
be01b0c36a Rename wxLocaleIdent::IsDefault() to IsEmpty()
We don't use empty wxLocaleIdent as default user locale and it doesn't
make much sense to do it, as the default locale is already accessible
via wxUILocale::GetDefault().
2021-09-05 00:15:39 +02:00