Commit Graph

58797 Commits

Author SHA1 Message Date
Danny Scott
966084a65a Add script for building MSVS 2015 binaries
See #17408.

(this is a backport of 7e493c3a3c from master)
2016-02-29 18:58:17 +01:00
Paul Cornett
9dccf621c8 Avoid comparing address of reference to NULL
(backport of 01ccff2e05)
2016-02-26 10:39:02 -08:00
Paul Cornett
47fd8835cf Avoid "Gtk-WARNING **: Allocating size to ..." with GTK+ 3.19+
(cherry picked from commit 9fea81c069)
2016-02-24 23:51:56 -08:00
Paul Cornett
7afbdcd534 Avoid "Gtk-WARNING **: State doesn't match"
See https://github.com/wxWidgets/wxWidgets/pull/232
(backport of 69a13d973c)
2016-02-24 21:20:08 -08:00
Paul Cornett
0388ce8e25 Allow SetClientSize() to set correct size even when size of window decorations is not known
This should allow correct sizing of first TLW (when using SetClientSize())
with backends using client-side decorations such as Wayland.

(cherry picked from commit bc4df78421)
2016-02-22 21:16:12 -08:00
Paul Cornett
2bc3721f06 Fix GetBestSize() for GTK3 after size has been set
Need to reset size request to get actual best size.
See Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=1282142

(cherry picked from commit 6ed7e27bf2)
2016-02-22 21:08:59 -08:00
Artur Wieczorek
470a46dd48 Fix wxSearchCtrl vertical size in wxMSW
Don't add the borders twice, this made the control too tall.

Closes #16817.
2016-02-23 00:26:32 +01:00
Václav Slavík
d918dabb2d Fix inefficient delayed setting of wxSplitterWindow sash
If setting sash position to a value that cannot be satisfied due to
minimum size constraints, wxSplitterWindow would continue endlessly
trying and failing to set it, causing constant CPU use on OS X. This was
because delayed sash setting was invoked from idle handler and if it
failed, the code would repeat the same action again and again.

Instead, perform this delayed setting from OnSize handler. If setting
sash position failed in the first place, it must have been due to too
small size of the window. Therefore it's pointless to try again until
the size changes.

(cherry picked from commit 513fca5d4c)
2016-02-22 15:53:43 +01:00
Václav Slavík
d99d4568df wxMSW: Fix wxToolBar rendering with double-buffering
An old check - used for reasons that no longer apply - was preventing
correct rendering of wxToolBar background in wxMSW. Fix this by removing
the obsolete check.

See #9666 for the original reason for the check.

(cherry picked from commit 3a7951db2b)
2016-02-22 15:52:03 +01:00
Scott Talbert
73e9e18ea0 Fix STC compilation with GCC6
Use std::abs() from <cmath> instead of abs() from <math.h> to avoid problems
with ambiguous overloads.

Closes #17147.

Closes https://github.com/wxWidgets/wxWidgets/pull/222
2016-02-21 01:47:41 +01:00
Vadim Zeitlin
e7d27c91e6 Try to always give wxDirDialog a valid parent in wxMSW
Use the same GetParentForModalDialog() method as for the normal dialogs to
find the parent to use for this native dialog and ensure that it is shown
modally even if no parent is explicitly specified when constructing it.

See #17384.

(this is a backport of baff0c942b from master)
2016-02-20 13:44:29 +01:00
Vadim Zeitlin
65c634ed80 Don't define interfaces inside anonymous namespace in wxMSW
IAutoCompleteDropDown interface was defined inside anonymous namespace to
avoid clashing with the same interface possibly (but not necessarily) declared
in the standard headers.

However gcc 4.9 is smart enough to realize that no classes deriving from a
class in an anonymous namespace can exist and so it devirtualizes the calls to
virtual methods of the objects of this type when compiling with optimizations
enabled. And it does it even if it means replacing the call to a virtual
method with just a call to __cxa_pure_virtual(), i.e. crashing during
run-time.

Prevent it from doing this by moving class declarations outside of the
anonymous namespace and fix the crash when using wxTextEntry::AutoComplete()
in the code compiled with g++ 4.9.

(this is a backport of 4475fe36a5 from master)
2016-02-12 00:15:09 +01:00
Paul Cornett
41be4271e1 Adapt window decorations cache for client-side decorations
Fixes size calculations for TLWs created after the first one,
with Wayland, Mir and Broadway. See #17336

(cherry picked from commit 91ea487281)
2016-02-05 10:29:29 -08:00
Vadim Zeitlin
6162570731 Update i18n overview in the manual.
Remove obsolete warning about gettext 0.10, add a link to Poedit instead.

Also fix Doxygen markup: @see can't be used inside a list item.

See #16714.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2016-01-30 14:10:32 +01:00
bogiord
2fdc7196a3 Fix docs for wxGrid and friends
Add a couple of missing @name commands; the corresponding comments were
appearing in the wrong place without them.

Avoid unintended effects of JAVADOC_AUTOBRIEF by using Qt-style comments
instead of Javadoc.

A couple of minor wording corrections.

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

(this is a backport of 9c95b398c8 from master)
2016-01-20 18:58:53 +01:00
bogiord
402219ed13 Add nullptr checks to wxGridTableBase::Set(Row|Col)Attr
wxGridTableBase::SetAttr (for cells) does check its attr parameter for
nullptr, but the check was missing from the row and column functions.
Adding it makes it possible to use a nullptr argument to reset the
attributes.

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

(this is a backport of e7fa9b0c10 from master)
2016-01-20 18:58:25 +01:00
Tim Kosse
6f5b629f2f Don't assert if Ctrl+Tab is pressed inside a wxGTK window
Ignore the WinChange flag in DoNavigateIn() to fix an assertion that happened
when pressing Ctrl+Tab with the generic wxListCtrl having focus.

This seems to be consistent with pressing Ctrl+Tab elsewhere, e.g. when
cycling between buttons in a dialog.

(this is a backport of f3cd79984f2936a4148964af8c23cd42aab6a871 from master)
2016-01-14 15:49:46 +01:00
Vadim Zeitlin
4e5e788bae Use correct format (%zu) for printing size_t values.
Fix assert due to using %d for printing 64 bit size_t values under Win64.

See #16974.

(this is a backport of 6c7c8b6d8d from master)
2016-01-14 15:41:44 +01:00
Paul Cornett
e39322c374 fix cursor unref for GTK2, broken by 148f5f3 2016-01-13 00:04:27 -08:00
Paul Cornett
8d87321215 remove incorrect cursor unref added in 148f5f3, see #17330 2016-01-13 00:04:12 -08:00
Pete Stieber
eed32268a2 Make wx/dirdlg.h safe to include as first wx header
Include wx/defs.h to get wxUSE_DIRDLG value from it, otherwise it could be
undefined, and hence evaluate to 0 (unfortunately without even a warning with
some compilers), if this header was the first wx header to be included.

(this is a backport of 5948602f4f from master)
2016-01-05 01:32:49 +01:00
Vadim Zeitlin
70faad3429 Fix GTK error wxApp::CleanUp() when GUI is not initialised
For the programs that use wxWidgets but can also run using just CLI, exiting
the program would show a bogus GTK error

GLib-GObject-CRITICAL **: g_type_class_unref: assertion 'g_class != NULL' failed

Fix this by only releasing the references to GTK_TYPE_WIDGET if we had
acquired it in the first place.

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

(this is a backport of e1f31febadea7d6277c7ee92c424ae7581e1d6d1 from master)
2016-01-05 01:31:48 +01:00
Troels Knakkergaard
d71d1a50e5 Use the appropriate parent for the choice dialogs
Fall back to the main application window if no parent was explicitly specified
using the standard GetParentForModalDialog() method.

See #17295

(cherry picked from commit 50435ef678)
2015-12-22 19:58:41 -08:00
Vadim Zeitlin
f0f83adecf Create native buttons without any label in wxOSX/Cocoa
Since the changes of db9baf9aa5 the label wasn't
explicitly reset to be empty on wxWindow creation because it was assumed it
would already be empty if not explicitly set, but this turned out to be false
for the controls using NSButton which (very helpfully) uses "Button" as its
label by default and so kept this useless label if it wasn't explicitly
overridden.

Fix this by explicitly resetting the NSButton title after creating it, to
ensure consistency between the real state of the control and what wxWidgets
thinks it is.

Closes #17152.

(cherry picked from commit ef1db7acda)
2015-12-22 19:57:26 -08:00
Troels Knakkergaard
46b534a194 Use document window as parent for "Save changes?" dialog
This ensures that the message box is centered on its parent window and not the
screen.

Closes #17295.

(cherry picked from commit 4ebb8d9837)
2015-12-21 08:09:59 -08:00
Paul Cornett
8cea217701 implement Flush() for wxImage wxGraphicsContext under Cairo and GDI+, see #16694 2015-12-20 10:25:52 -08:00
Paul Cornett
c2a38b2f92 flush Cairo surface before converting to wxImage
(cherry picked from commit cd27b73237)
2015-12-20 10:23:52 -08:00
Lauri Nurmi
61a3e328ef Add mouse wheel handling to wxGenericCalendarCtrl
Mimics the scrolling behaviour of native MSW and GTK calendars by allowing to
increment/decrement the month by scrolling anywhere on the generic calendar.

Additionally, use horizontal scrolling to increment/decrement the year.

Backport of 50daf1feab + 4177593aef
into WX_3_0_BRANCH.

See also 50daf1feab (commitcomment-13087042)
2015-12-19 16:16:42 +01:00
Bryan Petty
d82306cd2e Update apt sources in Travis CI builds. 2015-12-17 17:57:50 +01:00
Paul Cornett
70de382197 remove unused global variable
(cherry picked from commit 84a77c0c32)
2015-12-06 20:26:50 -08:00
Paul Cornett
f5fac50856 Fix generation of wxEVT_ACTIVATE_APP
Avoid spurious events when showing most native dialogs
See #17260

(cherry picked from commit d4d209dd39)
2015-12-06 20:11:54 -08:00
Paul Cornett
5c4d565a68 check for macro '__sun' rather than 'sun', see #17258 2015-12-03 21:39:19 -08:00
Vadim Zeitlin
a487dc88c1 Fix modifying file type associations under MSW as non-admin
The existing code tried writing to HKEY_CLASSES_ROOT which doesn't work, in
general, for normal, i.e. non administrator, users, under any post-XP versions
of Windows.

Fix it to write to HKEY_CURRENT_USER\Software\Classes, which is the part of
HKEY_CLASSES_ROOT for the current user and to which we do have write access,
and only continue to use HKEY_CLASSES_ROOT itself for reading.

(this is a backport of 0ed580f451 from master)
2015-12-02 23:29:10 +01:00
Vadim Zeitlin
f5e966deeb Remove commented out code from wxMSW wxMimeTypesManager
Just clean up; we don't need all this old and unused code in this file.

(this is a backport of 0ed580f451 from master)
2015-12-02 23:27:48 +01:00
Vadim Zeitlin
13aa914019 Fix Cygwin build with wxUSE_STL==1
Use explicit c_str() when calling Cygwin functions taking char* or void*
instead of relying on implicit conversions.

(this is a backport of 09e7dc290c from master)
2015-12-02 17:02:54 +01:00
Bryan Petty
80ceca14b5 Backport release script updates to 3.0. 2015-11-15 22:20:26 -07:00
Bryan Petty
4a23f03ede Normalize all the line endings. 2015-11-15 21:47:15 -07:00
Bryan Petty
1328f7043d Backporting git updates for 3.0 branch. 2015-11-15 21:45:07 -07:00
Bryan Petty
6ed2b8527f Add AppVeyor configurations for 3.0 branch. 2015-11-09 18:46:26 -07:00
Bryan Petty
669bf7e4c7 Backport .gitignore from current master. 2015-11-09 18:36:02 -07:00
Vadim Zeitlin
80f5928999 Use full paths when checking for existence in wxGenericFileDialog
Use full path to the selected file before checking whether it exists,
otherwise the check could fail even if the file does exist but the current
directory is different from the one it is in.

Closes #16698.

(this is a backport of 5846144614 from
master)
2015-11-10 01:56:27 +04:00
Paul Cornett
148f5f3dc9 fix GdkCursor memory leaks
(cherry picked from commit 3e75b231b0)
2015-11-02 08:52:03 -08:00
Paul Cornett
db668a136c avoid gdk_cursor_new(), deprecated in GTK+ 3.16 2015-11-02 08:29:31 -08:00
Paul Cornett
c1d150ed12 Fix drawing checkbox and radiobutton in checked state with GTK+ >= 3.14, see #17240
(cherry picked from commit ed817dd366)
2015-11-01 19:49:28 -08:00
Vadim Zeitlin
458bcb9546 Insert missing "@name" tags in wxTreeListCtrl documentation
This fixes the appearance of the different sections in the generated
documentation.

(this is a backport of 50ae059a67 from master)
2015-10-24 23:10:15 +02:00
Vadim Zeitlin
034684d476 Initialize wxAuiNotebookXmlHandler::m_isInside in ctor
See #15694.

Closes #17222.

(this is a backport of 7439c0951b from master)
2015-10-24 15:16:05 +02:00
Vadim Zeitlin
d3a5963258 Don't mention that wxVariant doesn't derive from wxObject
Because it still does, only wxVariantData does not.

See #17217.

(this is a backport of 165842423c from master)
2015-10-22 00:04:23 +02:00
Vadim Zeitlin
458616010e Remove wxString from the list of ref-counted classes
This is not the case any more since 3.0 and it actually never used the same
ref-counting model as the classes described in the ref-counting overview
anyhow.

See #17216.

(this is a backport of 876e0501d8 from master)
2015-10-21 23:52:20 +02:00
Vadim Zeitlin
c89cc865ca Fix wxLocale::IsOk() in case of initialization failure
Ever since 700256bbdb IsOk() returned true even
if setting the locale actually failed because the old locale was still set to
the null value.

Apply the minimal possible fix for this and just reset the old locale pointer
to null if initializing the locale fails to make sure IsOk() doesn't return
true in this case.
2015-10-18 22:07:03 +02:00
Vadim Zeitlin
821450a20c Reset the system last error value before checking it in wxLog test.
Explicitly set the last error indicator to 0 before checking that
wxLogSysError() logs it correctly as it wasn't always set to 0 otherwise.

(this is a backport of 2c64172825 from master)
2015-10-17 18:26:55 +02:00