Commit Graph

63635 Commits

Author SHA1 Message Date
Paul Cornett
ba4da9fdf9 Use "new" GDK keysym names
Old names are no longer available with GTK+4
2017-12-17 21:51:16 -08:00
Paul Cornett
ea5cd6dbfc Avoid GdkDeviceManager with GTK+4 2017-12-17 10:36:58 -08:00
Vadim Zeitlin
3ee52836c6 Link Git-specific notes from the main README
Rename BuildGit.txt to README-GIT.md, which is a more standard name, and
a better format for viewing this file online, e.g. from GitHub Web UI,
and link it from the main README to make it easier to find.
2017-12-17 19:29:41 +01:00
Vadim Zeitlin
f66fb07ce7 Resize wxDataViewCtrl to fix persistence test with wxGTK
Setting the column sizes fails with wxGTK implementation of
wxDataViewCtrl if the control is not wide enough, apparently, so make
sure it's sufficiently big when creating it to fix the unit test
failures on wxGTK build bot slaves.
2017-12-17 16:13:06 +01:00
Artur Wieczorek
b7051a9adb Fix misused wxGTK_CONV 2017-12-17 09:16:25 +01:00
Artur Wieczorek
eba33c837f Allow using labels with mnemonics for buttons in GtkAssertDialog 2017-12-17 00:31:40 +01:00
Artur Wieczorek
5ffae1c936 Don't use stock items in wxMenu
Stock items are deprecated since GTK+ 3.10 so corresponding labels
should be used instead of them.
2017-12-17 00:24:01 +01:00
Artur Wieczorek
af7b4fa084 Don't use stock items in wxInfoBar
Stock items are deprecated since GTK+ 3.10 so corresponding labels
should be used instead of them.
2017-12-17 00:00:02 +01:00
Artur Wieczorek
53ad29b389 Don't use stock items in wxMessageDialog
Stock items are deprecated since GTK+ 3.10 so corresponding labels
should be used instead of them.
2017-12-16 23:56:37 +01:00
Artur Wieczorek
da1d45e8bb Don't use stock items in wxFileDialog
Stock items are deprecated since GTK+ 3.10 so corresponding labels
should be used instead of them.
2017-12-16 23:54:06 +01:00
Artur Wieczorek
77756fae5d Don't use stock items in wxDirDialog
Stock items are deprecated since GTK+ 3.10 so corresponding labels
should be used instead of them.
2017-12-16 23:51:55 +01:00
Artur Wieczorek
38c192acc5 Don't use stock items in wxButton
Stock items are deprecated since GTK+ 3.10 so corresponding labels
should be used instead of them.
2017-12-16 23:49:42 +01:00
Paul Cornett
63634be74b Build fixes for GTK+4 2017-12-16 11:29:57 -08:00
Paul Cornett
5e27ff410c Fix building wxToolTip with GTK+4
gtk_settings_set_long_property() is no longer available. The properties
"gtk-enable-tooltips" and "gtk-tooltip-timeout" are ignored since GTK+
3.10, so just don't compile that code with GTK+4.
2017-12-16 09:42:39 -08:00
kathoum
f1dfb27cb1 Use the same ABI version string for MSVS 2017 as for MSVS 2015
MSVS 2017 (which uses _MSC_VER from 1910 to 1912 currently) is
ABI-compatible with MSVS 2015 (_MSC_VER 1900), so do allow linking code
compiled with one of them with the library built by the other one.

Closes #18024.
2017-12-16 15:57:02 +01:00
Vadim Zeitlin
1b6ec5c538 Merge branch 'linux-spec-files'
wxFile and wxTextFile for working with special/non-seekable files.
2017-12-16 15:26:35 +01:00
Paul Cornett
f5ab4757a6 Fix wxColourButton with GTK+4
gtk_color_button_get_rgba()/gtk_color_button_set_rgba() are gone
2017-12-15 10:48:56 -08:00
Paul Cornett
bb13e9f3da wxColourDialog implementation for GTK+4
GtkColorChooserDialog must be used instead of GtkColorSelectionDialog
2017-12-15 10:27:54 -08:00
Vadim Zeitlin
95b28abfdf Merge branch 'dvc-persist'
Implement persistence for wxDataViewCtrl columns widths and sort order.

See https://github.com/wxWidgets/wxWidgets/pull/541
2017-12-15 18:48:34 +01:00
Vadim Zeitlin
a03ece4880 Remove st_blocks hack from wxFile::Length() under Linux
This reverts commit 41f6f17d01 ("return 0
(meaning the file is not seekable, as the docs now explain) instead of
4KB for the files in sysfs under Linux") as it seems to be wrong to
return a value different from what "ls -l" or "stat" return here and the
original problem was solved in a better way in the previous commit.

See #9965.

Closes #17818.
2017-12-15 18:46:22 +01:00
Vadim Zeitlin
cc86de1416 Replace file reading code in wxTextFile with wxFile::ReadAll()
There is nothing special about wxTextFile justifying having code for
dealing with non-seekable files in it, so put this code into wxFile
itself and just call its ReadAll() method from here.

This is a better fix than 41f6f17d01
originally applied (and which is going to be reverted next) as it
doesn't break wxFile::Length() for these files and also avoids
triggering an assert if the file we're trying to read was truncated by
another process in the meanwhile -- which can happen and doesn't
indicate a programming error and so shouldn't result in an assert.

Also add a unit test checking that this really works.

See #3802, #8354, #9965.
2017-12-15 18:46:22 +01:00
Vadim Zeitlin
a30bee473e Make wxFile::ReadAll() work for unseekable files too
Calling this function with an unseekable file, such as any file under
/sys on Linux systems, would previously just hang as the loop condition
was never satisfied when length was -1.

Fix this by checking for this case and using a different approach by
extending the buffer we read the data into as we go instead of
preallocating it all at once.

See #9965.
2017-12-15 18:43:26 +01:00
Paul Cornett
8e35398037 Update gtk-4.0.m4
Minimize differences with gtk-3.0.m4, fix configuring with GTK+ 3.92.1
2017-12-15 09:31:43 -08:00
Paul Cornett
32f6d9521f Update gtk-3.0.m4
From gtk+-3.22.26/m4macros/gtk-3.0.m4
2017-12-15 09:26:40 -08:00
Vadim Zeitlin
ebcba7a385 Merge branch 'mac-mouse-event-crash'
Closes https://github.com/wxWidgets/wxWidgets/pull/640
2017-12-15 16:53:28 +01:00
Vadim Zeitlin
df2f0321fb Some simplification and tidying up of the previous commit
Explain why the order here is important.

Also get rid of now unnecessary temporary variable.
2017-12-15 16:52:41 +01:00
VZ
7ea562eb93
Fix expat config for "NMake Makefiles" target in cmake build
Closes https://github.com/wxWidgets/wxWidgets/pull/639
2017-12-15 15:45:26 +01:00
Vadim Zeitlin
ed23de08c7 Minor clean up of wxPersistentDataViewCtrl
Add another helper function, make variables const when possible, fix
some small style problems.

No real changes.
2017-12-15 15:26:32 +01:00
tommash
3de6d1eb17
MouseEvent crash fix on wxWindow Destroy
If the event handler destroys the wxWindow, then the subsequent call to SetupCursor(event) will miserably fail .
Moved setting the cursor before the event is handled.
2017-12-15 15:01:26 +01:00
Vadim Zeitlin
e3575d1f9c Use temporary wxConfig for persistence unit tests
This requires slightly more work, but ensures that we don't leave any
traces of running the tests in the system registry or file system, as we
can just call DeleteAll() on the config object after finishing with it.
2017-12-15 14:43:43 +01:00
Vadim Zeitlin
036870ab35 Split wxPersistenceManager-related tests and actually build them
It seems better to organize the tests in different files and just
provide a common fixture-like class to reuse functionality.

Also use this as an opportunity to rewrite the tests to use Catch
directly instead of using CppUnit-compatible macros.

Finally, actually build these tests as part of the test suite.
2017-12-15 14:10:35 +01:00
Vadim Zeitlin
4e82f60b8a Add documentation for wxPersistentDataViewCtrl
Documentation is trivial, but better than nothing.
2017-12-15 14:10:16 +01:00
Vadim Zeitlin
072a9c20a3 Add new wx/persist/dataview.h to the build system
In particular, this ensures that it gets installed by "make install"
under Unix.
2017-12-15 14:10:11 +01:00
Vadim Zeitlin
e5b12b5bc8 Merge branch 'dvc-persist' from iwbnwif
See https://github.com/wxWidgets/wxWidgets/pull/541
2017-12-15 14:10:01 +01:00
Alexey Rassikhin
82da79d038
Workaround for expat builtin debug postfix
expat lib has debug postfix on windows only.
2017-12-15 13:59:57 +03:00
Alexey Rassikhin
6b15f19107
Fix expat config for "NMake Makefiles" target. 2017-12-15 11:53:50 +03:00
Paul Cornett
276d96b583 Some additions and corrections for wxArtID to GTK+ names
From 4862884e
2017-12-14 21:35:07 -08:00
Paul Cornett
ab34f92fb9 Avoid stock icon functions with GTK+4
Only theme lookup is available
2017-12-14 20:47:01 -08:00
Paul Cornett
49db2dc315 Add wxART_CLOSE to sample 2017-12-14 20:34:20 -08:00
Paul Cornett
c4614d0c9f Use a single table for translating wxArtID to GTK+ stock/theme names
GtkStock names are used for GTK+2, theme names for GTK+3 and later.
Theme replacements for stock items are those used by GTK+, from
gtk+-3.22.26/gtk/deprecated/gtkiconfactory.c. The list is as it was
prior to 4862884e, with no additions, deletions or other changes.
2017-12-14 20:33:44 -08:00
Vadim Zeitlin
15d22aed82 Merge branch 'cmake'
Closes https://github.com/wxWidgets/wxWidgets/pull/330
2017-12-15 00:33:07 +01:00
Vadim Zeitlin
4cc2762ebc Don't call wxDataViewModel::GetValue() for container row cells
This could be unexpected as it seems reasonable that the model won't be
ever asked about the value of a cell if it's not going to appear in it
anyhow -- however it could still happen during the column width
computation in the generic wxDataViewCtrl implementation.

Fix this in a minimally invasive way by just skipping the call to
GetValue() in this case.
2017-12-15 00:14:29 +01:00
Artur Wieczorek
2f2ecfa03f Don't use hard-coded button labels
Get labels from the central repository of "stock" labels.
2017-12-14 23:33:06 +01:00
Artur Wieczorek
29820dab5b Don't use GtkStock to refer to the built-in icons in GtkAssertDialog
GtkStock is deprecated since GTK+ 3.10 and built-in icons should be
identified directly by their names.
2017-12-14 23:26:07 +01:00
Jouk
47c0aed322 Add samples/event/gestures.cpp for compilation on OpenVMS 2017-12-14 08:59:26 +01:00
Jouk
a2864f907b switch on wxUSE_GRAPHICS_CONTEXT on OpenVMS 2017-12-14 08:57:33 +01:00
Rafael Kitover
aceefac2c9 GTK4: show_uri() is gone
Use show_uri_on_window() instead of show_uri() for GTK+4, show_uri() is
not available.
2017-12-12 08:48:36 -08:00
Rafael Kitover
52f231c9ff GTK4: no support for gtk_tree_view_set_rules_hint
Don't use gtk_tree_view_set_rules_hint() in GTK+4, it's not available.

It is also deprecated in GTK+3 since 3.14, and the documentation advises
to not use it at all, but I will leave the decision about whether to
remove it entirely to someone else.
2017-12-12 08:48:36 -08:00
Rafael Kitover
9f3aa0b4e5 GTK4: different API for adding dialog button
Support the GTK+4 API for adding buttons to dialogs (via __WXGTK4__):

- set_icon_name() instead of image_new_from_stock()/set_image()

- gtk_box_pack_end() takes only two parameters
2017-12-12 08:48:36 -08:00
Rafael Kitover
c09e27cfb4 GTK3/4: GTK_STOCK_CANCEL deprecated, use labels
GTK+3 deprecates GTK_STOCK_CANCEL and GTK_STOCK_SAVE etc. and GTK+4
removes them entirely. The API documentation recommends using the
strings "Cancel" and "Save" instead, use them (or the appropriate
translation.)
2017-12-12 08:48:36 -08:00