Commit Graph

63714 Commits

Author SHA1 Message Date
rmpowell77
af56ccd46f Use semicolons as statement separators in wxHTML code
This avoids (harmless in this, but not necessarily in the other, case)
clang warning: possible misuse of comma operator here [-Wcomma].

See https://github.com/wxWidgets/wxWidgets/pull/662
2018-01-06 17:37:20 +01:00
Tobias Taschner
c8b6ca308b Update year in copyright notices to 2018
Use 2018 instead of 2017 (mostly in version info files).

See https://github.com/wxWidgets/wxWidgets/pull/661
2018-01-05 19:51:47 +01:00
Paul Cornett
00d8434156 Avoid debug message when there is no session manager
See #16024
2018-01-05 10:01:38 -08:00
Vadim Zeitlin
a2ad7f9bf6 Merge branch 'dvc-sort-opt'
Optimize item sorting in generic wxDataViewCtrl and other minor
enhancements.

See https://github.com/wxWidgets/wxWidgets/pull/642
2018-01-04 21:42:42 +01:00
Vadim Zeitlin
48faeb65b3 Fix copy ctor in numeric validators classes
wxFloatingPointValidator and wxIntegerValidator copy ctor didn't copy
the associated window, so it was lost when the validator was Clone()'d.

Fix this by correctly using wxValidator copy ctor, instead of the
default one, in the copy ctor of the common wxNumValidatorBase base
class.
2018-01-04 21:39:57 +01:00
Mart Raudsepp
48a5d6c5f8 Move wx/evtloopsrc.h to BASE_CMN_HDR from GUI_CMN_HDR
This header ends up being included by wx/apptrait.h, which is in
BASE_CMN_HDR, so it needs itself to be there too in order for
compilation to work when using non-GUI library build.

Closes #18038.
2018-01-04 17:16:40 +01:00
Paul Cornett
5efba4ce47 Avoid invisible wxTextCtrl selection with GTK+3
See #18036
2018-01-03 20:22:12 -08:00
Paul Cornett
b02df5ea33 Remove unneeded init function
GObject instances are already zero-initialized
2018-01-03 09:26:12 -08:00
Paul Cornett
da186a0713 Avoid trying to override non-existent property with GTK+ < 2.20 2018-01-03 09:16:06 -08:00
Vadim Zeitlin
a9f6a42d38 Merge branch 'gtk-dvc-custom-edit'
Fix regression with custom wxDataViewCtrl editors in wxGTK.

See https://github.com/wxWidgets/wxWidgets/pull/660
2018-01-03 04:21:04 +01:00
Vadim Zeitlin
827e90e8de Use GtkHBox as GtkWxCellEditorBin parent with GTK+ < 4
Using GtkBin as widget parent didn't work without overriding its
size-related vfuncs until GTK+ 3.8 and, in particular, resulted in the
editor (which was the child of the bin) not being visible at all with
GTK+ 2.

Switch to using GtkHBox as parent, which does work with both GTK+ 2 and
any GTK+ 3 version, but keep using GtkBin with GTK+ 4 as GtkHBox is
removed in it.

This fixes bug introduced in c2821dcea0
since which custom wxDataViewCtrl editors were not visible any more.

Closes #17686.
2018-01-03 00:57:46 +01:00
Vadim Zeitlin
0a2dfc7959 Document wxClipboard::AddData() as synonym for SetData()
Don't pretend that AddData() allows to add multiple objects to the
clipboard because it doesn't work like this by default under any
platform and only MSW possibly supports this in the non-default build
with wxUSE_OLE==0 -- but mentioning it in the documentation would
arguably be more confusing than helpful.

See #17925.
2018-01-02 17:06:58 +01:00
Vadim Zeitlin
32fc7c368f Make it more clear that XRC version must be set
Omitting the version can result in difficult to diagnose problems, so
insist that it should be set in the format documentation.

See #18033.
2018-01-02 16:53:43 +01:00
Vadim Zeitlin
bde62ce981 Get rid of unused renderer rect in gtk_wx_cell_renderer_new()
No real changes, just don't call gtk_wx_cell_renderer_get_size()
unnecessarily as we never use its result: the code using the returned
rectangle was commented out ever since it was added (more than 10 years
ago) in 1e510b1e2d
2018-01-02 16:34:54 +01:00
Vadim Zeitlin
bf09ff2320 Remove unused GTK_IS_WX_CELL_EDITOR_BIN* macros
No real changes, just don't define macros that we never use and don't
plan on using it (why would we need to test whether something is of this
type when we already know it).
2017-12-31 02:27:19 +01:00
Vadim Zeitlin
0730236fa8 Merge branch 'parse-bad-wav'
Fix multiple problems with parsing untrusted input data in wxSound.

Closes #11855.
2017-12-30 22:52:14 +01:00
Vadim Zeitlin
c010efc172 Avoid integer overflow when computing the sample size
While it seems to be harmless in this particular case, it still prevents
testing this code with UBSAN by triggering it here, so check that
multiplication doesn't overflow.
2017-12-30 18:52:57 +01:00
Vadim Zeitlin
61c7cf9a9c Fix yet another division by 0 when parsing WAV data
Ensure that the size of one sample (including all the channels) is non
zero before dividing by it.
2017-12-30 18:52:57 +01:00
Vadim Zeitlin
932f384c87 Avoid division by 0 when parsing WAV data
Don't divide by waveformat.uiBlockAlign which could be 0, but rather
multiply by it and verify that we get the expected result. This is more
robust, as it prevents crashes on malformed input and also slightly more
efficient even for correct input.
2017-12-30 18:52:57 +01:00
Vadim Zeitlin
45e8d13e13 Add format sub-chunk size check to WAV parsing
This fixes a crash due to reading beyond the buffer bounds when checking
for "data" if WAVEFORMAT::uiSize was too big.
2017-12-30 18:52:57 +01:00
nowhere
69cd6039eb Make parsing WAV data more robust
Check that we have enough data in the input instead of happily reading
out of bounds memory.

This fixes the most common problem of crashing on bad data which doesn't
look like WAV at all, but doesn't fix problems with parsing input which
does look like WAV, but is incorrect -- this will be done in subsequent
commits.
2017-12-30 18:52:36 +01:00
Vadim Zeitlin
c65eaac529 Fix harmless warning about comparing values of different enums
This avoids a bunch of -Wenum-compare-switch warnings from clang 6.
2017-12-30 18:51:05 +01:00
adrian5
6c7aaa9e95 Improve wording and formatting in "Hello World" example
Minor fixes to the "Hello World" example in the manual to make its style
more consistent and the text more readable.

Closes https://github.com/wxWidgets/wxWidgets/pull/657
2017-12-29 20:13:29 +01:00
Frédéric Bron
f4b56f67ec Improve documentation of wxPropertyGrid::MakeColumnEditable()
Explain that column must be different from 1 in the documentation and in
the (already existing) assert checking it.

Closes https://github.com/wxWidgets/wxWidgets/pull/656
2017-12-29 20:06:04 +01:00
orbitcowboy
f423b88ded Replace post-increment on iterators with pre-increment
This is a micro-optimization, as pre-increment is at least as efficient
as post-increment and typically slightly more so because it doesn't need
to make a copy of the iterator, and better conforms to the prevailing
C++ style.

Closes https://github.com/wxWidgets/wxWidgets/pull/655
2017-12-29 19:59:24 +01:00
Vadim Zeitlin
f83d16aa46 Undefine min and max before using them in wx/valnum.h
Avoid problems when using this header in code also include <windows.h>
(and not doing it via wx/msw/wrapwin.h) by ensuring that min and max
used here are not defined as macros.
2017-12-26 04:29:42 +01:00
VZ
fdf2ee425f
Use postfix operator when iterating over containers
No real changes, just avoid a micro-pessimization.

See https://github.com/wxWidgets/wxWidgets/pull/652
2017-12-26 04:25:44 +01:00
Vadim Zeitlin
c697b62d46 Compilation fix for PCH-less build after last commit
Include the headers required by the new code in src/msw/textentry.cpp.

See #12613.
2017-12-26 04:24:23 +01:00
orbitcowboy
0790698345 Use postfix operator when iterating over containers. 2017-12-26 00:25:52 +01:00
Vadim Zeitlin
5a949efc5c Fix sending wxEVT_TEXT_ENTER when using auto-completion in wxMSW
We need to explicitly generate this event from the char hook handler as
we don't get the normal WM_CHAR for it, it is apparently intercepted by
the window proc installed by the auto-completing code, so check if
wxTE_PROCESS_ENTER is used for the text entry and call a special new
MSWProcessSpecialKey() method to do the right thing if it is.

Similarly, handle Tab presses correctly if wxTE_PROCESS_TAB is used.

Closes #12613.
2017-12-25 19:29:25 +01:00
Vadim Zeitlin
f32edbe1fc Test wxTE_PROCESS_TAB support on text page of widgets sample too
Do it for completeness and symmetry with the already existing checkbox
enabling wxTE_PROCESS_ENTER.
2017-12-25 18:45:06 +01:00
Vadim Zeitlin
610c164988 Always let DefWndProc() process column resizing in wxListCtrl
If we don't pass these messages to it, the selected items highlight
rectangle doesn't get updated when the columns are resized when using
visual themes, as could be seen in the listctrl sample.

While this did work if the wxEVT_LIST_COL_DRAGGING event handler skipped
the event, prefer to not require doing this as things work without this
call to wxEvent::Skip() under the other platforms and even MSW with
themes disabled.

Closes #18032.
2017-12-25 17:14:56 +01:00
Vadim Zeitlin
0df05d5377 Merge branch 'msw-listctrl-painting'
Improve rules drawing in wxMSW wxListCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/643 and https://github.com/wxWidgets/wxWidgets/pull/278
2017-12-25 16:54:44 +01:00
Vadim Zeitlin
3e8d63d256 Merge branch 'gesturesamplefixes' of https://github.com/NewPagodi/wxWidgets
Several cosmetic improvements to the gesture demo in the events sample.

See https://github.com/wxWidgets/wxWidgets/pull/651
2017-12-25 16:50:51 +01:00
New Pagodi
a636141b56 Use consistent letter case in log message strings 2017-12-24 18:25:26 -06:00
New Pagodi
0fa033df61 Remove newline characters from log message strings 2017-12-24 18:24:45 -06:00
New Pagodi
d3fd17db04 Use wxAutoBufferedPaintDC to reduce flicker with wxMSW 2017-12-24 18:24:05 -06:00
New Pagodi
ca1b76ba49 Set a minimum size for MyGestureFrame 2017-12-24 18:23:13 -06:00
John Roberts
f36973875e Silence uninitialized variable warning in wxMac PanGestureEvent
Even though the value of this variable is not actually used in this
case, we still must initialize it to something before comparing with
NSGestureRecognizerState{Began,Ended} below.

Closes https://github.com/wxWidgets/wxWidgets/pull/645
2017-12-24 15:54:51 +01:00
skruse
3de89b2710 Fix auto-sizing multiline wxGrid column labels with empty lines
Account for the empty lines explicitly by reserving enough vertical
space for them, as wxDC::GetTextExtent() wouldn't do it as it simply
returns 0 for empty strings.

Closes #18028.
2017-12-24 15:20:23 +01:00
Artur Wieczorek
4f7fb24ef4 Use composite template to create GtkAssertDialog as a composite children
GtkAssertDialog UI is now defined with GtkBuilder XML because
gtk_widget_push_composite_child() and gtk_widget_pop_composite_child() are
deprecated since 3.10 and composite widget templates should be used
to make composite children.
2017-12-24 00:40:58 +01:00
Paul Cornett
be35405129 Apply current style to wxStaticBox container when it's created
Background may have been set before adding any children
See #15466
2017-12-21 10:06:10 -08:00
Paul Cornett
c867e0a23b Fix wxRadioBox non-default background with GTK+2 2017-12-20 22:33:07 -08:00
Paul Cornett
121ac8742d Fix wxStaticBox non-default background with GTK+2
See #15466
2017-12-20 22:29:21 -08:00
Paul Cornett
c23cac4c79 Avoid GtkAlignment with GTK+4 2017-12-19 21:49:13 -08:00
Paul Cornett
9249e823d9 Avoid gtk_window_set_opacity() with GTK+4 2017-12-19 21:48:34 -08:00
Paul Cornett
1235c7bb74 Avoid gtk_widget_is_composited() with GTK+4 2017-12-19 21:43:16 -08:00
Paul Cornett
72fe3a1d07 Avoid gdk_window_set_composited() with GTK+4 2017-12-19 21:40:38 -08:00
Paul Cornett
a3518a550f Use GtkGrid instead of GtkTable with GTK+3
GtkTable was deprecated in GTK+ 3.4
2017-12-19 20:47:10 -08:00
Paul Cornett
54bcf1b9b6 Avoid gtk_widget_get_pointer() with GTK+4 2017-12-19 10:46:37 -08:00