Commit Graph

276 Commits

Author SHA1 Message Date
Vadim Zeitlin
cacfcb1e61 Allow ignoring revisions when viewing blame on GitHub
Rename the existing file with the revisions to ignore to the name used
by GitHub in order to allow using it there too.
2022-03-24 21:35:39 +01:00
utelle
e129c7149d Generate much smaller code for language database initialization
The initialization function has become too huge to be compiled by some
compilers (notably MinGW-TDM 9.2) after the changes of deef116a09
(Update language database and move support for it to wxUILocale,
2021-11-23), so change the script generating this code to output just an
array element rather than code statements for each language.

This also makes this file much faster to compile with the other
compilers as a nice side effect.

Closes #22100, #22104.
2022-02-08 20:59:10 +01:00
oneeyeman1
995c6e6df5 Add wxSpinCtrl::SetIncrement() and implement it for all ports
SetIncrement() was already available in wxSpinCtrlDouble and GTK version
of wxSpinCtrl, now implement support for it in wxMSW and wxOSX as well.

In fact, in wxMSW, implement it at wxSpinButton level, so that both this
class and wxSpinCtrl inheriting from it (in wxMSW only) support setting
custom increment now.

Also add support for it to XRC, show it in the sample and add a unit
test verifying that it works.

Closes #2597.
2022-02-04 02:16:06 +01:00
Vadim Zeitlin
224d8ffdaf Merge branch 'ak_high_dpi' of https://github.com/kosh543/wxWidgets
Add support for wxBitmapBundle to XRC.

See #22040.
2022-01-27 14:04:01 +01:00
Vadim Zeitlin
8f58562fea Fix typo in bin2c.py comment
Correct the name of the other script.
2022-01-27 13:55:46 +01:00
Alexander Koshelev
df1504dd8f XRC: add GetBitmapBundle function
The function creates wxBitmapBundle from <bitmaps> xrc tag.

Co-authored-by: VZ <vz-github@zeitlins.org>
2022-01-24 17:26:42 +03:00
Vadim Zeitlin
a2ad755b1c Add script for converting arbitrary binary data to C arrays
This is similar to the existing png2c, but works for any binary data,
not just PNG files.

Another small difference is that this script puts 16 bytes per line
instead of 8 -- this still results in reasonably short lines, but twice
shorter files, so seems to be worth it.
2022-01-23 02:07:42 +01:00
Vadim Zeitlin
2064526e3d Revert "Merge branch 'ak_high_dpi' of https://github.com/kosh543/wxWidgets"
This reverts commit a34ab31453, reversing
changes made to 783df59e66.

Undo the addition of wxBitmapBundle support to XRC, as it is finally
going to be done in a different way soon -- but for now just remove it
to ensure that nobody starts using it before it's finalized.

See #2633.

Closes #22014.
2022-01-16 23:40:31 +01:00
Vadim Zeitlin
a34ab31453 Merge branch 'ak_high_dpi' of https://github.com/kosh543/wxWidgets
Add wxBitmapBundle support to wxXmlResource and start adding it to XRC
handlers.

See https://github.com/wxWidgets/wxWidgets/pull/2633
2022-01-11 15:35:54 +01:00
Alexander Koshelev
3907657995 XRC: ability to create wxToolBar with wxBitmapBundle 2022-01-11 17:05:14 +03:00
Alexander Koshelev
4b3233e493 XRC: ability to create wxCommandLinkButton with wxBitmapBundle 2022-01-11 17:05:14 +03:00
Alexander Koshelev
7a13979f5a XRC: ability to create wxButton with wxBitmapBundle 2022-01-11 17:05:14 +03:00
Alexander Koshelev
96f5258df5 XRC: ability to create wxStaticBitmap with wxBitmapBundle 2022-01-11 17:05:14 +03:00
Alexander Koshelev
612c37f706 XRC: add GetBitmapBundle function
The function creates wxBitmapBundle from <bitmaps> xrc tag.

Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
2022-01-11 17:04:27 +03:00
Vadim Zeitlin
910f014065 Fix typo in year update script
Fix wrong function name from 81c4fa449b (Use CMake-compatible variable
names in configure Info.plist files, 2021-08-15).
2022-01-02 13:31:25 +01:00
Vadim Zeitlin
1a0eeed0a8 Ignore commit only removing white space for git blame purposes
That commit didn't really change anything, so it's annoying to have the
changes be attributed to it.
2021-11-29 13:58:52 +01:00
utelle
deef116a09 Update language database and move support for it to wxUILocale
Update the language database from the canonical sources:

- It now includes most locales supported by Windows 10.
- It now also has the following attributes for each entry:
 - BCP 47-like locale tag.
 - Reference to canonical name for generic language entries.
 - Language name in this language itself.
- Also add data file with list of language script identifiers and
  aliases based on ISO 15924.
- And update genlang.py to handle all the new attributes and data.

Also move database-related methods of wxLocale to wxUILocale and
just redirect wxLocale methods to the new wxUILocale ones (they are
still preserved for compatibility).

Closes https://github.com/wxWidgets/wxWidgets/pull/2594
2021-11-27 17:44:20 +01:00
Vadim Zeitlin
17c1bfc0f4 Suppress "Unix" spelling warnings in the samples overview
There doesn't seem to be any good way to avoid codespell warnings about
"unx", so just add the lines containing it to the exceptions file.
2021-11-18 15:47:28 +01:00
Alexander Koshelev
0cd898975c Allow to add extra accelerators to wxMenuItem
These accelerators are not shown in wxMenuItem label, but still will
work.

Implement support for them in all major ports and XRC.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2021-11-16 17:26:39 +01:00
Vadim Zeitlin
cffd5db562 Ignore the commit removing "$Id$" keywords for git-blame
Not sure if this is actually that useful, as this commit didn't modify
any of the still existing lines anyhow, but it seems logical to exclude
this commit, as it didn't make any real changes, but touched almost all
files.
2021-11-09 13:29:48 +01:00
Vadim Zeitlin
9c17ff731a Ignore the parent commit for git blame purposes
Typo fixes don't affect anything else, so skip the parent commit when
searching for the reason of some change in the future.
2021-10-03 17:09:08 +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
Maarten Bent
2e12779a21 CMake: update Info.plist variables
Use the same values as in build/bakefiles/mac_bundles.bkl.
Use the correct copyright year for in the Info.plist files.
2021-08-17 22:33:45 +02:00
Vadim Zeitlin
81c4fa449b Use CMake-compatible variable names in configure Info.plist files
This will allow reusing them for CMake as well, and is required in order
to be able to do it as CMake variables names are fixed.
2021-08-15 18:39:34 +02:00
Vadim Zeitlin
1ca29b6721 Update copyright years in Info.plist files used by configure
Also update inc_year script to update them automatically the next time,
to prevent them from becoming 3 (for one, or 13 for the other one) years
out of date again.
2021-08-15 16:56:24 +02:00
Vadim Zeitlin
bb767e0ebc Remove apparently unused Info.plist in docview sample
Only Info.plist.in is used by configure and it doesn't hardcode the
version, so there is no need to update it there.
2021-08-15 16:56:24 +02:00
Vadim Zeitlin
f41564a3e2 Add wxRegEx::ConvertFromBasic() helper
This will be used to implement support for BREs using PCRE which doesn't
support them directly in the upcoming commits.
2021-07-15 22:45:29 +02:00
Vadim Zeitlin
3ec24bd981 Exclude cotire.cmake from white space checks
This is a third-party file using TABs for indentation.
2021-07-15 21:40:58 +02:00
Vadim Zeitlin
1a515725b3 Suppress ASAN leak reports when using print dialog in wxGTK
There is nothing we can do about them, as memory is allocated from a
CUPS functions used by GTK itself, so suppress them.
2021-05-16 00:55:04 +02:00
Vadim Zeitlin
c82ff381f5 Suppress memory leak reports from GTK CSS drawing functions
We don't seem to be doing anything wrong, but ASAN detects many such
leaks as soon as we call functions such as gtk_css_style_render_icon()
(used by wxRendererGTK::DrawCheckBox()) and several others.
2021-04-11 17:34:05 +02:00
Vadim Zeitlin
57bba0b990 Suppress a leak sanitizer report in libxrandr2
This happens from inside gtk_init_check(), i.e. is not a "real" leak
anyhow because it can be leaked at most once. Just ignore it.
2021-03-14 13:10:13 +01:00
Andriy Byelikov
b2d97d1393 Add support for English locale for Israel (en_IL)
This locale is recognized by glibc, so add it to the known locales
database.

Closes https://github.com/wxWidgets/wxWidgets/pull/2252

See #19082.
2021-03-05 18:51:10 +01:00
Maarten Bent
2161e5270f Add check for expected line endings
Check that the EOL used in the file corresponds to the expected one for
its extension, in addition to checking that EOLs are consistent.

Closes https://github.com/wxWidgets/wxWidgets/pull/2228
2021-02-14 19:33:27 +01:00
Maarten Bent
36ab71301c Add CI check for mixed line endings
Trigger workflow on all file changes.

Closes https://github.com/wxWidgets/wxWidgets/pull/2224
2021-02-09 22:17:13 +01:00
Vadim Zeitlin
d1810b0dce Remove setup0.h files
Simplify things by putting setup.h files themselves under version
control and getting rid of setup0.h ones.

The initial motivation for using separate setup0.h files was to allow
having local changes to setup.h, but with Git there is a simple way to
do it by using "git update-index --skip-worktree include/wx/msw/setup.h"
for example, so we don't really need setup0.h any more and dropping them
makes things simpler.
2021-01-31 19:02:56 +01:00
Vadim Zeitlin
2aba3ad0e1 Ignore leak from atk_bridge_adaptor_init() when using ASAN
There doesn't seem to be any way to avoid calling it or freeing
(multiple) memory blocks allocated by it.
2021-01-31 17:33:04 +01:00
Vadim Zeitlin
84e6e5a029 Add another commit to ignore when doing git-blame
This one contains whitespace changes only.
2020-12-04 20:00:00 +01:00
Vadim Zeitlin
712c2d4004 Add possibility to create "Close" bitmap button from XRC
This requires refactoring NewCloseButton() in order to extract
CreateCloseButton() from it, as XRC relies on being able to use two-step
creation which was previously impossible for this kind of buttons.

CreateCloseButton() is rather unusual, as it has to be declared in the
derived, platform-specific class, in order to be able to call its
Create(), but is defined only once in common, platform-independent,
code. However the only alternative seems to be to have a static
function, e.g. InitCloseButton(), which wouldn't be very pretty neither.

Closes https://github.com/wxWidgets/wxWidgets/pull/2118
2020-11-19 15:44:54 +01:00
Vadim Zeitlin
b92d194ac4 Add "default" and "bitmap" to wxCommandLinkButton XRC handler
Support the same buttons as in wxButton, as they also make sense here.

Closes https://github.com/wxWidgets/wxWidgets/pull/2116
2020-11-19 15:43:01 +01:00
Vadim Zeitlin
9bc6c3c234 Add support for wxDatePickerCtrl::SetNullText() to XRC
Recognize null-text element.
2020-11-05 14:22:05 +01:00
Vadim Zeitlin
987758eb97 Add a suppression file for FontConfig leaks occurring under wxGTK
We're not interested in these (one off) leaks and can't do anything
about them anyhow, so just provide a way too suppress leak sanitizer
errors about them.
2020-10-19 13:54:19 +02:00
Vadim Zeitlin
19db07d668 Fix broken MSW tags generation script
Add "--recursive" option which is needed since the changes of 37cf80240b
(Exclude unwanted files in wxMSW tags script, 2020-01-31) as otherwise
no files were parsed at all.
2020-08-14 15:55:41 +02:00
Vadim Zeitlin
cd0fd2aaaa Suppress codespell complaints about "SEH"
For now just exclude the line with it, but we may need to give up and
ignore "seh" as a word if this continues, as it just occurs in too many
places.
2020-07-22 15:04:40 +02:00
Vadim Zeitlin
e875b11f74 Run codespell from a separate script in GitHub workflow
This allows to give a more detailed error message in case of a problem
and also makes it simpler to run the spell check locally.
2020-07-18 19:42:48 +02:00
Vadim Zeitlin
1eccf833f9 Add codespell line suppression file
This file is used with "-x misc/suppressions/codespell-lines" codespell
option and allows to ignore entire lines, instead of ignoring words that
only occur once or twice and shouldn't be ignored globally because they
could well be misspelt elsewhere.

The remaining words in codespell.ignore occur too many times (as
parameter names in various places) to be ignored in this way.
2020-07-13 02:28:38 +02:00
Vadim Zeitlin
ebc418a02a Move codespell ignore file to new misc/suppressions directory
This is not really a script, so having it under misc/scripts was not
very logical.

Also rename it to explicitly indicate that this file contains the words
to ignore as the next commit will also add another file ignoring the
whole lines.
2020-07-13 02:28:38 +02:00
Vadim Zeitlin
c8124b691f Add more commits to ignore when running git-blame
Ignore global changes touching the entire code base as well as some more
local commits which changed the EOL style and so affected all lines.
2020-06-30 19:18:00 +02:00
Vadim Zeitlin
b7bfe53bed Merge branch 'spelling-fixes'
Fix spelling mistakes found by codespell in the headers and
documentation.

See https://github.com/wxWidgets/wxWidgets/pull/1909
2020-06-28 15:31:54 +02:00
Vadim Zeitlin
c14008f287 Add file allowing to always ignore some commits with git-blame
Skip some commits that don't introduce any interesting changes when
running git-blame, as we never really care about them.
2020-06-28 00:11:53 +02:00
Vadim Zeitlin
d7f19ee610 Fix spelling in comments and documentation using codespell
Apply the utility from https://github.com/codespell-project/codespell/
to fix spelling issues in the headers under both include and interface
directories and add a file with a couple of exceptions.

The exact command line used was:

    $ codespell -w -I misc/scripts/codespell.ignore -i 3 in*
2020-06-27 22:56:22 +02:00