Commit Graph

374 Commits

Author SHA1 Message Date
Vadim Zeitlin
19e3a47d98 Update version to 3.1.7 and rebake the makefiles
Make it possible to distinguish the latest master from 3.1.6 before
making any changes.

Closes #22282.
2022-04-07 17:40:13 +02:00
utelle
6d6e5cde21 Enhance wxUILocale and wxLocaleIdent
Many improvements and fixes to wxUILocale:

- Add wxUILocale method for retrieving wxLocaleIdent identifier,
  localized names, layout direction.
- Add wxLocaleIdent attributes, getter, and setter for
  platform-dependent tags under Windows: extension, sort order.
- Modify method wxLocaleIdent::FromTag to support not only BCP 47-like
  tags, but also platform-dependent syntax.
- Modify method wxLocaleIdent::GetTag to allow specifying the tag type.
- Update internat sample to better show using wxUILocale.
- Update German and French message catalogs for internat sample (German
  fully translated, French msgIds only).
- Introduced wxUILocaleImplStdC under Windows, because locale "en-US" is
  not equivalent to the C locale.
- Adjust wxLocale class to restore previous wxUILocale in the
  destructor.
- Implement wxLocale::GetInfo method through wxUILocale methods.
- Removed LCID dependency in wxLocale.
- Move the implementation of some static wxUILocale methods from
  intl.cpp to uilocale.cpp.

Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>

Closes #2615.
2022-03-28 01:11:40 +02:00
Vadim Zeitlin
ee330d73a7 Rebake after the year change
The year is now included in the copyright string used in the makefiles
and so they need to be regenerated every time the year changes (which
happens surprisingly frequently).

It would be better to define a single variable with the year number to
avoid having to do this in the future.
2022-01-14 22:51:24 +01:00
PB
0f8ab824a3 Fix using const char* and wxString in ternary operator
Using a const char* and a wxString in the two branches of the ternary
operator resulted in compile-time errors since the result type of the
conditional expression was ambiguous, so add explicit conversions to fix
it.

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

See #19355.
2022-01-03 21:20:23 +01:00
Vadim Zeitlin
559ea66e55 Use DPI aware manifests for MSVS 2022 too 2021-12-18 13:22:59 +01:00
Vadim Zeitlin
5d6b2f6704 Rebake after parent commit changes 2021-12-17 21:29:49 +01:00
utelle
1a4a0eee48 Update German translation of internat sample
See https://github.com/wxWidgets/wxWidgets/pull/2594
2021-11-27 17:44:20 +01:00
Vadim Zeitlin
5216d97f08 Use arch suffix consistently in all directories names
For some reason, we used "vc_x64_lib" as the output directory for the
libraries, but "vc_mswu_x64" as the output directory for the samples.

Place the arch suffix, i.e. "_x64" part, always after the compiler
prefix (possibly including version), for consistency with both the
library output directories and with MSBuild project files, as
build/msw/wx_setup.props uses $(wxCompilerPrefix)$(wxArchSuffix)_...
as wxIntRootDir value.
2021-08-26 23:12:40 +02:00
Vadim Zeitlin
e307945170 Merge branch 'ui-locale'
Add wxUILocale class providing functionality which can be implemented
portably for all major platforms, including macOS, and doesn't force
the change of the global C locale, unlike wxLocale.

See https://github.com/wxWidgets/wxWidgets/pull/2464
2021-08-26 15:49:57 +02:00
Vadim Zeitlin
9205209099 Demonstrate the thousands separator in internat sample too
Use a number > 1000 to show the difference between the locales.
2021-08-20 23:37:28 +02:00
Vadim Zeitlin
8373b14280 Add a wxGrid with numbers and dates to the internat sample
Show that the numbers and dates in wxGrid use the expected formats.
2021-08-20 23:37:28 +02:00
Vadim Zeitlin
b9cbe6770f Add wxUILocale with minimal functionality
Use it in the sample to show what (little) it can do right now.
2021-08-20 22:02:46 +02:00
Vadim Zeitlin
a69af310ad Use CFBundleLocalizations in internant sample Info.plist only
Remove this bundle key from the generic Info.plist files as it's not
really useful there because none of our samples except "internat" is
localized.

So just add a special Info.plist for this sample and add values
corresponding to all the languages for which we have translations to its
CFBundleLocalizations.
2021-08-15 18:39:34 +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
b12961f992 Display locale information directly in the main sample frame
This is more convenient than having to open the "About" dialog to see
the details of the locale being used.

It also makes it unnecessary to store wxLocale reference in the frame
class, simplifying the sample code.
2021-08-14 19:22:29 +02:00
Vadim Zeitlin
afe04f7c4a Add internat sample command line option to skip the locale dialog
Getting this dialog all the time is annoying when testing, so add
another command line option to set the locale unconditionally.

This commit is best viewed ignoring whitespace-only changes.
2021-08-14 18:55:43 +02:00
Vadim Zeitlin
31677e597d Don't load translations when setting the locale is disabled too
It makes more sense to skip loading the translations too, if the user
decided not to use the current locale.

This commit is best viewed ignoring whitespace-only changes.
2021-08-14 18:55:43 +02:00
Vadim Zeitlin
eb5bffd3ca Stop allowing to select the language in the internat sample
Restrict the choice to using the current system locale or not using it,
as setting any other language doesn't, and can't, work under macOS.
2021-08-14 18:55:43 +02:00
Vadim Zeitlin
4adb58b7ea Add an option to skip changing locale in the internat sample
Show that we can use the translations to the user language even without
changing the locale.
2021-08-14 18:55:43 +02:00
Vadim Zeitlin
e0cd2c637d Use a panel in internat sample to make it look better under MSW
Creating the controls directly on wxFrame is not recommended and looks
ugly under MSW due to the wrong background being used, so add an
intermediate panel.
2021-08-14 18:55:43 +02:00
Vadim Zeitlin
4db5de9cdb Use wxTranslations directly instead of passing by wxLocale
This is slightly more verbose, but more clear and allows to separate the
translations-related part from locale-changing one.
2021-08-14 18:55:43 +02:00
Vadim Zeitlin
7dc6462561 Show using wxNumberFormatter in the internat sample too
This shows that C and UI (or OS) locales can be different.
2021-08-14 18:55:43 +02:00
Vadim Zeitlin
1f74e7cd1b Show more locale-dependent controls in the internat sample
Show that file dialogs, spin and calendar controls also respect the
selected locale conventions.
2021-08-07 18:04:22 +02:00
Vadim Zeitlin
93190d6263 Interpret empty language as "default" in the internat sample
This provides a more convenient way of testing wxLANGUAGE_DEFAULT than
selecting it from the dialog shown on startup.

This commit is best viewed ignoring whitespace-only changes.
2021-08-07 18:04:22 +02:00
Vadim Zeitlin
ebec1ff9f6 Rebake after removing shaped-ld-sh from bakefile
Simply remove the not existent any longer shared-ld-sh from clean
targets in all makefile.

This should have been done in e663d9af2b (Stop using shared-ld wrapper
script under Mac, 2021-07-06).
2021-08-06 21:51:40 +02:00
Vadim Zeitlin
aabfa8806b Show translation from coreutils message catalog string
Actually test using the coreutils catalog, as this was broken for many
years due to using a wrong catalog name and not adding /usr/share/locale
as a search prefix, but went unnoticed.

So add a menu item to show translation of a string in this catalog to
make testing that this works simpler.
2021-06-15 14:43:38 +02:00
Vadim Zeitlin
c880cf9872 Test for USE_COREUTILS_MO in the internat sample
This is more clear than testing for Linux and will allow enabling this
code under other systems later (as there doesn't seem to be any real
reason not to do it under other Unix systems too).

No real changes.
2021-06-15 14:42:48 +02:00
Vadim Zeitlin
bef4ccede4 Remove unnecessary wxLogNull from internat sample
There is no need to suppress wxLog messages from AddCatalog() because it
doesn't log any errors even if the catalog is not found, while tracing
messages (given only if WXTRACE is set) from it can be useful.
2021-06-15 14:32:44 +02:00
redtide
a71b3d2cd6 Update the standard catalog name used in the internat sample
What used to be called "fileutils" is called "coreutils" since many
years now, so use it to demonstrate loading of the standard catalog.

Closes https://github.com/wxWidgets/wxWidgets/pull/2395
2021-06-15 14:21:15 +02:00
Vadim Zeitlin
8b854d2f92 Remove MSVC 7 project files and support for generating them
This compiler is not supported any longer.
2021-04-26 16:24:02 +02:00
Vadim Zeitlin
1dfc18a004 Link with ws2_32.lib rather than obsolete wsock32.lib
Winsock 2 provided by ws2_32.lib is available since 1994, it should be
fine to use it even for wx in 2021.

See #15562.
2021-04-18 22:13:45 +02:00
Vadim Zeitlin
dc5f1711f2 Upgrade version to 3.1.6
Run misc/scripts/inc_release, bakefile_gen and autoconf.
2021-04-14 17:57:27 +02:00
Vadim Zeitlin
e539cb69bb Remove platform-specific translations support
As shown by the fact that no other platform-specific translations were
ever added since the initial version of locale/msw/it.po added way back
in 4d931bcca0 (Translate '&Help' to '&' for italian Windows only,
2005-08-12), this is not especially useful, so just handle this
particular case specially in wxGetStockLabel() and remove support for
platform-specific translations.

This allows to simplify the makefiles and the catalog loading code as
there is no need to deal with the files in subdirectories any more.
2021-02-07 00:06:21 +01:00
Vadim Zeitlin
94ee588e76 Add an almost empty message catalog with Georgian translations
Surprisingly, we had Georgian translations for the internat sample, but
not for wx itself.

Extract a couple of strings that were present in the sample catalog for
the string defined in wx into the main catalog for tidiness.
2021-02-06 14:58:10 +01:00
Vadim Zeitlin
aafed05b12 Use wxGetStockLabel() in internat sample
This allows to reuse "&File" translation already available in wxstd
catalog rather than translating it again in the sample catalogs for all
languages, so remove the now unnecessary translations from them.
2021-02-06 14:58:09 +01:00
Vadim Zeitlin
426a0ed527 Remove HAVE_W32API_H definition and checks
All still supported versions of MinGW/Cygwin provide w32api.h file, so
there is no need to test for it.

This allows to simplify the code, but also remove the definition of
HAVE_W32API_H from bake- and makefiles and this, in turn, allows to get
rid of extra flags in MinGW format entirely, as we don't support gcc
2.95 for which they were originally needed neither.
2020-10-20 01:47:47 +02:00
PB
be7e68605e Remove BCC make and project files 2020-10-13 18:54:01 +02:00
PB
f57f214122 Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00
Maarten Bent
53a2c8c7fb Rebake after manifest changes 2020-07-31 01:53:43 +02:00
Vadim Zeitlin
d1aa3d5663 Update the version to 3.1.5
This was done by running misc/scripts/inc_release, bakefile_gen and
autoconf.
2020-07-23 16:25:39 +02:00
Vadim Zeitlin
f5001e728c Rebake with bakefile 0.2.12
No real changes, just synchronize with the bakefile release used now.
2020-05-02 17:02:36 +02:00
Vadim Zeitlin
47d881b683 Fix order of -L options in autoconf makefiles
Put linker flags determined by configure after -L$(LIBDIRNAME) option
pointing to the directory containing the libraries being built, to
ensure that we link with these libraries rather than any wx libraries
globally installed in the system, as could be the case since the changes
of ec091c9f2b (Don't override CFLAGS etc in configure-generated
makefile, 2020-02-02).

See #18729.
2020-04-15 02:33:53 +02:00
Maarten Bent
343bd89b63 Rebake after changes 2020-03-27 23:15:03 +01:00
Vadim Zeitlin
ec091c9f2b Don't override CFLAGS etc in configure-generated makefile
CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS are supposed to be under
user-control and putting configure-determined options in them broke
something as simple as running "make CXXFLAGS=-Wno-some-extra-warning"
because this overrode the CXXFLAGS set by configure and required for
build.

Improve this by using WX_*FLAGS in the generated makefile and leaving
the user-controlled FLAGS alone. This is still not ideal as running
"configure CFLAGS=-DFOO" and then "make CFLAGS=-DBAR" will define both
FOO and BAR, as configure copies CFLAGS to WX_CFLAGS, and so setting it
on make command line won't override it, as it should, but this should be
a much more rare and also much less severe problem, so we should be able
to live with it for now.

Normally this commit shouldn't result in any user-visible changes, i.e.
it shouldn't break any previously working scenarios and only make some
previously broken ones work.
2020-02-11 23:19:31 +01:00
Maarten Bent
083f4b3c32 Rename manifests to use underscores 2019-12-13 21:44:26 +01:00
Maarten Bent
bed8cd7b52 Rebake after adding DPI awareness option 2019-11-30 22:52:48 +01:00
Vadim Zeitlin
349e73994b Merge branch 'dpi-awareness-option' of https://github.com/MaartenBent/wxWidgets
Add wxUSE_DPI_AWARE_MANIFEST option allowing to choose to use a manifest
specifying per-monitor DPI awareness.

See https://github.com/wxWidgets/wxWidgets/pull/1622
2019-10-30 21:25:45 +01:00
Maarten Bent
a72c9b6dbc Run autoconf and rebake after adding wxUSE_DPI_AWARE_MANIFEST 2019-10-30 00:02:08 +01:00
Vadim Zeitlin
0a02f4c190 Increment version number to 3.1.4
Done by running misc/scripts/inc_release, manually updating version.bkl,
rebaking and rerunning autoconf.

Also a header for the next version to the change log.
2019-10-28 14:11:00 +01:00
Vadim Zeitlin
86fab39ac9 Regenerate MinGW makefiles using response files
This avoids errors due to overflowing MSW command line length when
linking monolithic library.

Closes #18135.
2019-10-06 23:04:21 +02:00