Commit Graph

2472 Commits

Author SHA1 Message Date
Vadim Zeitlin
6ad5aee8ac Document the change in wxMSW wxToolBar height determination
Since 0185d61a2c wxToolBar height is
increased if the controls don't fit in it rather than decreasing the
size of the controls, which results in different appearance than in the
previous versions, so document this as well as the advice for restoring
the old behaviour.
2019-03-21 14:27:53 +01:00
Vadim Zeitlin
ce1b72a4d2 Document wxNotebook::AddPage() events change in wxGTK
This hopefully shouldn't affect many people, but still document this
backwards-incompatible change.
2019-01-28 19:05:01 +01:00
Vadim Zeitlin
761564021c Also change minimum macOS version to 10.9 for CMake
Update CMAKE_OSX_DEPLOYMENT_TARGET default value to match configure
builds, see the previous commit.
2019-01-16 15:09:18 +01:00
Vadim Zeitlin
7226a8f4df Use 10.9 SDK by default in configure under macOS
On modern macOS systems, libstdc++ headers are not installed by default
any more and using 10.7 SDK requires them, so running configure fails
out of the box.

Avoid this by defaulting to the earliest SDK version which works even
under 10.14.
2019-01-16 14:51:08 +01:00
Vadim Zeitlin
288d26598c Merge branch 'dvc-var-height'
Optimize generic wxDataViewCtrl performance with variable line heights.

Closes https://github.com/wxWidgets/wxWidgets/pull/1053
2019-01-16 01:25:06 +01:00
ali kettab
36f6f8ad49 wxTextValidator improvements
Improve char inclusion/exclusion support; update the sample to show more
features of this class and add a unit test for it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1093
2019-01-05 23:33:35 +01:00
Pavel Kalugin
659ab78c6d Add support for editing dates (without time) to wxGrid
Add wxGridCellDateRenderer and wxGridCellDateRenderer which can be used
for the grid cells containing only dates, without times.

Also add wxGrid::SetColFormatDate() convenience function.

Refactor wxGridCellDateTimeRenderer slightly to reuse its code.

Closes https://github.com/wxWidgets/wxWidgets/pull/1101
2019-01-04 14:14:01 +01:00
Vadim Zeitlin
ee352d79c8 Merge branch 'ipc-dde-fixes'
wxIPC fixes when using DDE

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

Closes #17900.
2019-01-04 14:12:53 +01:00
Vadim Zeitlin
7f63adde95 Merge branch 'select-after-delete'
Harmonize behaviour of wxItemContainer::Delete() for all controls and
ports when using single selection.

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

Closes #18267.
2019-01-04 14:01:02 +01:00
Artur Wieczorek
95461c566d Fix repositioning editors for horizontally scrolled grid
Closes #18313.
2018-12-28 14:01:34 +01:00
Vadim Zeitlin
20cb47c1c4 Send Unicode data as UTF-8 text when using DDE-based IPC
This is a more hackish but more compatible solution to the problem of
data sent using wxIPC_UTF8TEXT format being simply lost when using DDE
for IPC classes. We must use CF_TEXT for the DDE to pass our data, but
we can try to decode it as UTF-8 in the client and assume it was sent in
this format if it worked. This obviously suffers from false positives as
any ASCII string will still be assumed to be UTF-8, but there shouldn't
be any real harm coming from this.

This change also makes sending data in wxIPC_UTF{16,32}TEXT formats work
as well by converting it to UTF-8.

Update the sample to call Advise() with both wxIPC_UTF{8,16}TEXT formats
and remove the now unnecessary wxDDEConnection::m_dataType member.

Closes #17900.
2018-12-27 00:26:29 +01:00
Vadim Zeitlin
09bf235a59 Revert "Fix passing Unicode strings via wxIPC when using DDE"
This reverts commit c657fd3d61 because
changing the format of DDE advise requests/replies is not a good idea:
other applications (those using previous versions of wxWidgets or even
not using wxWidgets at all) may rely on getting data in real CF_TEXT
format rather than in one of text formats preceded by the extra byte
containing the actual format and the previous commit would have silently
broken this.

Another fix for #17900 will be implemented instead.
2018-12-26 23:20:52 +01:00
Vadim Zeitlin
c657fd3d61 Fix passing Unicode strings via wxIPC when using DDE
wxIPC API doesn't map well onto DDE, as we don't have wxIPCFormat
parameter in StartAdvise() but do allow specifying the format when
calling Advise() itself, whereas DDE requires specifying the format when
establishing the advise loop and the data always must use this format
later.

Because of this, we have to pass the actual format with the data itself
instead of relying on DDE formats support. This has the advantage of
allowing wxIPC_UTF8TEXT to work, while previously it didn't and
couldn't, as DDE only supports the standard (or custom, but registered)
clipboard formats and it wasn't one of them. Of course, this also has a
disadvantage of having to make another copy of the data, but this seems
unavoidable.

This change allow Advise() overload taking wxString to work, including
for non-ASCII strings, as shown by the update to the IPC sample. It also
makes wxDDEConnection::m_dataType unnecessary, as we must always use the
format passed to DDE callback anyhow when handling XTYP_ADVREQ.

Closes #17900.
2018-12-24 01:42:12 +01:00
Vadim Zeitlin
270ad54abe Revert all recent changes to wxTranslations
The latest changes to wxTranslations::AddCatalog() behaviour were not
backwards-compatible and also had other problem, so revert them for now,
even if this means that #18227 has to be reopened.

This is a combination of the following commits:

----

Revert "Fix regression in wxTranslations::AddCatalog()"

This reverts commit 14e905858d.

See #18297.

----

Revert "Fix crash in translations code when no translations are found"

This reverts commit 80904d1bc7.

See #18299.

----

Revert "Rename new wxTranslations method to GetAcceptableTranslations()"

This reverts commit 20b02d6169.

----

Revert "Load catalogs for all preferred languages, if they exist"

This reverts commit 2d784da2ee.

----

Revert "Allow getting all usable translations languages"

This reverts commit 5d08e404c7.

----

See #18227, #18300.

Closes #18302.
2018-12-23 17:33:49 +01:00
Sebastian Walderich
e9cbbede00 Implement wxAuiNotebook::GetBestSize()
Compute the best size of the notebook, taking into account all the
different layout possibilities, and add a test checking that this works
as expected.

Closes https://github.com/wxWidgets/wxWidgets/pull/1085
2018-12-23 17:05:09 +01:00
Artur Wieczorek
0fbc4cd6ab Allow setting custom tooltip text for "New" button in wxPGArrayEditorDialog
Ability to change the tooltip can be useful if standard text "New item" is not descriptive enough.
2018-12-23 11:03:46 +01:00
Vadim Zeitlin
b2cdd287bb Resolve change log conflict with master
Reapply the change log change manually to master version of the file to
let the CI builds merge this branch automatically.
2018-12-20 02:24:49 +01:00
Tomasz Słodkowicz
14e905858d Fix regression in wxTranslations::AddCatalog()
Do load the catalog corresponding to the language of "msgid" strings in
the source code, only skip the languages strictly less preferred than
it.

This avoids incompatibilities with pre-3.1.2 behaviour and avoids
breaking existing applications relying on the old behaviour.

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

Closes #18297.
2018-12-18 04:50:07 +01:00
Vadim Zeitlin
abc4576ffe Invalidate selection after deleting wxListBox item with GTK+ 3
For consistency with the other ports, invalidate the selection when
deleting the selected item or any item before it.

Closes #18267.
2018-12-15 23:45:19 +01:00
Vadim Zeitlin
5189781072 Move wxDataViewCtrl incompatibility note to the correct section
3a24beca62 added this in a wrong place, as
this change does not result in any build errors.

See #18295.
2018-12-13 15:09:13 +01:00
Vadim Zeitlin
cf25bbbf9a Merge branch 'window-create-disabled'
Make calling wxWindow::Disable() before wxWindow::Create() work.

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

Closes #16385.
2018-12-12 18:24:10 +01:00
Vadim Zeitlin
3a24beca62 Document that wxDataViewCtrl now always expands its last column
This has been changed back in 4156e1a5c9
and is a (mildly) incompatible change, so document it in the appropriate
change log section.

See #18295.
2018-12-12 18:01:41 +01:00
Stefan Ziegler
0c2956be09 Fix wxInfoBar close button size in high DPI
Don't apply the scaling factor twice when dynamically creating the close
button bitmap.

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

Closes #18283.
2018-12-10 19:48:04 +01:00
Vadim Zeitlin
dfec7aa0c0 Make disabling the window before creating it actually work
Disabling a window before actually creating it ought to work, similarly
to hiding a window before creating it which can be used to avoid showing
the window on screen at all, even briefly. However it didn't under MSW
where the window was disabled from wxWidgets point of view, but not at
the MSW level.

Fix this by accounting for the enabled state in MSWGetStyle().

Closes #16385.
2018-12-09 19:20:50 +01:00
Vadim Zeitlin
61320731e9 Merge branch 'pre-3.1.2-updates'
Update release-related files for 3.1.2.

See https://github.com/wxWidgets/wxWidgets/pull/1057
2018-12-09 15:55:49 +01:00
Sebastian Walderich
ab1fd56977 Implement wxAuiNotebook::HitTest()
Check if point is on window or a certain tab.

Closes https://github.com/wxWidgets/wxWidgets/pull/1059
2018-12-09 15:52:30 +01:00
Vadim Zeitlin
aef36f912a Fix 3.1.2 release date in the change log and the manual 2018-12-08 19:16:49 +01:00
ashishmore
87bd82ab6f Fix wxMediaCtrl::SetPosition() in MSW WMP backend
Step the control one frame forward to actually show the frame at the
given position, otherwise the control only showed black screen.

Closes https://github.com/wxWidgets/wxWidgets/pull/678
2018-12-07 15:18:05 +01:00
jensgoe
d6a137b730 Improve wxDataViewCtrl performance with wxDV_VARIABLE_LINE_HEIGHT
Store the line heights in a cache to make the (generic) wxDataViewCtrl
usable with this style.
2018-12-07 04:05:16 +01:00
jwiesemann
3d75541662 Fix bug in template selection in docview framework
Don't use the template specified by the filter in the file open dialog
if it's incapable of actually handling the current file.

This fixes a regression compared to 2.8 in docview code and allows
opening a file using the correct template for its extension even if an
incorrect (e.g. default) filter is chosen in the file open dialog.

Closes #18123.
2018-12-07 03:34:21 +01:00
Stefan Ziegler
e1a702a205 Fix removing and inserting pages in wxToolbook
Removing a page from wxToolbook could result in crashes due to
dereferencing the now invalid page index. Fix this by not assuming that
the page index is the same as its tool ID, but adding functions to
explicitly map one to the other.

Also fix inserting pages into wxToolbook, which worked as appending them
before.

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

Closes #18275.
2018-12-05 17:23:57 +01:00
Daniel Kulp
727a100a6a Handle wxEVT_SYS_COLOUR_CHANGED in wxAUI classes
Update the colours used when the system theme changes.

This is especially important to use the colour scheme compatible with
macOS 10.14+ dark mode.

Note that this commit is best viewed with "git diff --color-moved".

Closes https://github.com/wxWidgets/wxWidgets/pull/916
2018-12-03 19:48:32 +01:00
Stefan Ziegler
974b7c0990 Add wxToolbook::EnablePage()
Add functions to enable or disable pages inside wxToolbook.

Using the new functions you can present disabled icons so that the user
can expect more functionality and you do not need to add/remove pages in
different states.

Closes https://github.com/wxWidgets/wxWidgets/pull/1038
2018-12-03 19:42:45 +01:00
Vadim Zeitlin
4099e75edb Add property sheet to allow easily configure projects using wx
This seems to be the simplest possible way to let a MSVS project use the
library.
2018-11-18 01:05:10 +01:00
Vadim Zeitlin
8dbebf9164 Merge branch 'update_submodules' of https://github.com/MaartenBent/wxWidgets
Update all 3rd party libraries to the latest versions.

See https://github.com/wxWidgets/wxWidgets/pull/1023
2018-11-18 01:00:13 +01:00
Vadim Zeitlin
6e3f818da1 Fix formatting of change log entries for consistency
Capitalize the entries, keep them under 80 columns and terminate with
full stop.

Also fix a typo.

No real changes.
2018-11-11 19:46:58 +01:00
Andy Robinson
fe4f35b0a3 Make wxFrame::EnableFullScreenView() work under macOS 10.11+
We must explicitly turn on NSWindowCollectionBehaviorFullScreenAuxiliary
flag to prevent the window from becoming shown in full screen.

Closes #18168.
2018-11-11 19:46:58 +01:00
Vadim Zeitlin
5b891e9ffc Merge branch 'dvc-getitemrect'
Make wxDataViewCtrl::GetIremRect() work under all platforms and improve
tests, documentation and fix a couple of other problems in the same code
area.

See https://github.com/wxWidgets/wxWidgets/pull/1015
2018-11-10 22:38:05 +01:00
Vadim Zeitlin
463deb03c9 Merge branch 'gtk-dpi'
A bunch of improvements for per-monitor DPI support in wxGTK and
wxGraphicsContext more generally.

Closes https://github.com/wxWidgets/wxWidgets/pull/995
2018-11-10 12:15:27 +01:00
Vadim Zeitlin
d5c43831b5 Really implement wxGraphicsContext::GetDPI()
Return the DPI of the associated window, if any, instead of always
returning hard-coded 72*72.
2018-11-06 03:36:53 +01:00
Vadim Zeitlin
5e53b22bd4 Add wxGraphicsContext::GetWindow()
This method allows to retrieve the window this context is associated
with, if any.

Add "wxWindow*" argument to wxGraphicsContext ctor and provide the
window pointer to it when available, i.e. when creating the context from
a wxWindow directly or from wxWindowDC, which is also associated with a
window, in platform-specific code.

No real changes yet.
2018-11-06 03:36:53 +01:00
Vadim Zeitlin
b00a24af60 Document wxJoystickEvent event changes
In particular, list the incompatible change in the corresponding section
and explain how to update the existing code.
2018-11-05 19:27:53 +01:00
Vadim Zeitlin
1256695d46 Document that wxDataViewCtrl::GetItemRect() now works in wxGTK
Remove the note about it being non-implemented from the docs and mention
this in the change log.
2018-11-04 18:37:54 +01:00
Daniel Kulp
26f0e816ca Send wxEVT_AUINOTEBOOK_PAGE_CHANGED after changing the page
For consistency with the other similar events and because it is more
useful for the code handling it, send this event when the new page is
already shown instead of doing it before showing it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1007
2018-11-03 22:56:15 +01:00
Vadim Zeitlin
8e817f8a0e Don't send events from wxTextCtrl::ChangeValue("") in wxGTK
ChangeValue() must not send events, but did in wxGTK when changing the
contents of a wxTextCtrl to be empty when it had been non-empty before.

Closes #18264.
2018-11-01 02:04:01 +01:00
Evileye
28f7e6130d Fix wxDateTime::ParseFormat() when matching TZ offset and in DST
Don't skip MakeFromTimeZone() for the current time zone, this is still
necessary.

Fixes a failure in the unit tests when running during a DST period with
TZ=Europe/London, for example.

Closes https://github.com/wxWidgets/wxWidgets/pull/966
2018-10-31 23:16:03 +01:00
Vadim Zeitlin
bc974910ec Implement setting bitmaps for the menu item for wxQt
Closes https://github.com/wxWidgets/wxWidgets/pull/975
2018-10-11 14:40:20 +02:00
Vadim Zeitlin
54ef52fbd9 Merge branch 'display-funcs'
Implement all global functions in terms of wxDisplay and add
wxDisplay::GetPPI().

See https://github.com/wxWidgets/wxWidgets/pull/963
2018-10-09 16:31:54 +02:00
oneeyeman1
1a58c9c8ba Also fill the column for wxEVT_DATAVIEW_ITEM_ACTIVATED in wxOSX
Similar to the previous commit.

Closes https://github.com/wxWidgets/wxWidgets/pull/967
2018-10-09 15:25:18 +02:00
Vadim Zeitlin
aafb87b40d Set the column for wxEVT_DATAVIEW_ITEM_ACTIVATED in wxGTK
The column is available in the GTK+ callback, so just pass it along to
avoid gratuitous inconsistency with the generic version.

Also update the sample to show the column value for these events.
2018-10-09 15:21:08 +02:00