Commit Graph

60659 Commits

Author SHA1 Message Date
Tim Stahlhut
fb5d1a002c Fixes for wxQt build under Cygwin
Include the missing headers, notable QtGui/QFont from wx/fontutil.h which uses
a QFont object.

Closes #16750.
2015-10-25 18:00:05 +01:00
Vadim Zeitlin
db966da330 Use explicit dllexport attribute for g++ 4.7 and later
The bug that resulted in creating huge DLLs that took inordinate amounts of
memory and time to link with g++ 4.5 has been fixed in 4.7, so don't export
everything when using it, as this results in even smaller DLLs.

The situation with 4.6 is unknown, so leave behaviour with it unchanged.

See 49d2c0adc3
2015-10-25 13:42:23 +01:00
Vadim Zeitlin
1c5c28411b Don't check for LVS_EX_LABELTIP being defined, it always is
This constant is defined in wx/msw/missing.h if it's not defined, so testing
for whether it's defined here doesn't make sense -- and the comment about not
using it under Windows CE which is not supported any more anyhow doesn't make
sense neither.
2015-10-25 13:37:41 +01:00
Vadim Zeitlin
9c1bc3c019 Define LVS_EX_DOUBLEBUFFER ourselves if SDK headers don't do it
This should fix compilation with MinGW after the changes of
2a6e411887 which started using this style.

See #17177.
2015-10-25 13:36:25 +01:00
Vadim Zeitlin
91e5a8de86 Document that wxListCtrl::SetItemState() sends events
This is an exception to the usual rule, so should be documented, do it for
both this method itself and wxListView::Select() using it.
2015-10-24 23:50:47 +02:00
Vadim Zeitlin
50ae059a67 Insert missing "@name" tags in wxTreeListCtrl documentation
This should fix the appearance of the different sections in the generated
documentation.
2015-10-23 19:06:47 +02:00
Vadim Zeitlin
5e5cdf5393 Document that wxToolBar strips mnemonics from labels
After the previous commit all 3 major platforms should be doing it.
2015-10-23 19:00:17 +02:00
Andreas Falkenhahn
82060f816a Strip mnemonics from the label in wxGTK wxToolBar
For consistency with the other platforms, don't show mnemonics in the toolbar
label even if they're defined in the label string.
2015-10-23 18:57:36 +02:00
Andreas Falkenhahn
d45ba8ce62 Add wxTE_{RIGHT,CENTER} support for multiline wxTextCtrl in wxOSX
Just use -[NSTextView setAlignment].

Closes #13702.
2015-10-22 00:06:45 +02:00
Vadim Zeitlin
165842423c Don't mention that wxVariant doesn't derive from wxObject
Because it still does, only wxVariantData does not.

Closes #17217.
2015-10-22 00:02:59 +02:00
Vadim Zeitlin
876e0501d8 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.

Closes #17216.
2015-10-21 23:51:12 +02:00
Vadim Zeitlin
ef1db7acda 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.
2015-10-21 23:49:13 +02:00
Lauri Nurmi
39db6c42bf Clarify the description of wxStringTokenizer::GetString()
Closes https://github.com/wxWidgets/wxWidgets/pull/119
2015-10-21 23:48:24 +02:00
Wolfgang Stoeggl
8437c6a443 German translations update. 2015-10-21 23:46:29 +02:00
Iwbnwif Yiw
2c43b5c2d9 Use wxStdDialogButtonSizer in generic wxProgressDialog
This improves the placement of the buttons by making it consistent with the
platform conventions and also fixes a regression in button placement
introduced in 2f3d0d9629

Closes #17213.
2015-10-20 13:14:01 +02:00
Vadim Zeitlin
0724bc9a5a Fix best size for non-left aligned wxStaticText in wxGTK2
Since the hack for making the alignment work with GTK+ 2 done in
4ae21c7f1a, the best size was not computed
correctly for the right aligned or centered labels and the minimum possible
size was returned instead.

Fix this by temporarily disabling ellipsization during the best size
computation to ensure that the same best size is computed for left and right
aligned labels.

See #12539.
2015-10-18 22:15:40 +02:00
Vadim Zeitlin
5683904c2a 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:04:58 +02:00
Paul Cornett
c4bf905cd5 Remove special-case rectangle drawing for width 2 pen
Avoid missing corner pixel with width 2 pen when using rounded
join on X11 by simply not using rounded join with small pens
2015-10-18 10:53:49 -07:00
Vadim Zeitlin
bc4382a9dd Run wxListbook::OnSize() after creation under all platforms
This was previously done only for wxMSW but is also necessary for wxOSX to
ensure that the icons in the list view part are arranged and shown correctly
initially, otherwise the selected item could be only partially visible.
2015-10-18 03:55:32 +02:00
Vadim Zeitlin
cff9316e57 Ensure that the selected item is fully visible in wxListbook
Call EnsureVisible() after re-arranging the items as otherwise the current
item could be only partly visible, at least with wxMSW wxListCtrl.
2015-10-17 17:25:37 +02:00
Vadim Zeitlin
5e29b26d9e Preserve Win32 last error in wxTlsKey::Get()
::TlsGetValue() resets the last error code which means that the previous last
error is lost, but it shouldn't as we might be in the middle of logging it
with wxLogSysError(). So preserve the last error explicitly.

Closes #17209.
2015-10-16 20:20:42 +02:00
Vadim Zeitlin
fdab57f4a4 Merge branch 'warning-fixes'
Miscellaneous warning fixes for wxMSW.

Closes https://github.com/wxWidgets/wxWidgets/pull/113
2015-10-16 17:36:43 +02:00
Maarten Bent
2ec9b3390d Fully initialize OSVERSIONINFOEX struct
Use wxZeroMemory() instead of explicitly initializing struct fields with
zeroes, this is simpler and less error-prone.
2015-10-16 17:13:03 +02:00
Maarten Bent
3c57698140 Use correct WPARAM type for a MSW ID and not UINT
These types are of different size under Win64, so even if IDs are 32 bits,
truncating a 64 bit value to 32 bit UINT resulted in a warning. Fix this by
just using WPARAM for the variable type in the first place.
2015-10-16 17:13:02 +02:00
Vadim Zeitlin
ecdc7c3442 Fix harmless warning about unused variable in wxMSW wxMenu
A variable was unused in wxDEBUG_LEVEL==0 build and assigning to it resulted
in a warning. Fix this by not defining this variable at all, which also makes
the check more clear.
2015-10-16 17:13:00 +02:00
Maarten Bent
5cfaf2f898 Fix harmless gcc warning advising braces around empty "if" body
Add them just to silence the compiler.
2015-10-16 17:12:59 +02:00
Maarten Bent
0b1bc6b0b1 Fix harmless signed/unsigned comparison warning in Direct2D code
Cast D2DERR_RECREATE_TARGET, which is not of HRESULT type, to it to avoid gcc
warnings.
2015-10-16 17:12:58 +02:00
Maarten Bent
99573ecddd Add more error checks to Direct2D wxGraphics code
Check the result of the operations instead of just assigning them to "hr"
variable which is then never used.
2015-10-16 17:12:57 +02:00
Maarten Bent
c932c8054b Fix harmless parameter hiding warning in AlphaBlt()
Use different names for the local variables, this also makes the code slightly
more readable.
2015-10-16 17:12:56 +02:00
Vadim Zeitlin
e7194a082f Use correct DLL export declaration for wxLanguageInfoArray
This class is forward declared with WXDLLIMPEXP_FWD_BASE, so it should be
really declated with the matching WXDLLIMPEXP_BASE and not with
WXDLLIMPEXP_CORE used by WX_DECLARE_EXPORTED_OBJARRAY() by default too.

Somehow the mismatch between forward and real declaration doesn't seem to
create any problems, but still fix this for consistency and because it might
explain http://thread.gmane.org/gmane.comp.lib.wxwidgets.general/83980
2015-10-16 16:51:08 +02:00
Vadim Zeitlin
2a6e411887 Fix redraw glitches in wxMSW wxListCtrl with system theme
It seems that LVS_EX_DOUBLEBUFFER is required for the system theme to work
correctly, otherwise multiple display glitches can be observed by simply
changing the selection in the list.

Closes #17177.
2015-10-16 03:11:29 +02:00
Vadim Zeitlin
d49abaaec4 Refresh virtual wxListCtrl in wxMSW after deleting all its items
In principle, calling DeleteAllItems() on a virtual list control doesn't make
sense at all, but apparently people actually do it and it mostly works except
that the controls scrollbars are not updated, so add a call to Refresh() to
update them too, for consistency with DeleteItem() which similarly doesn't
make sense for virtual controls but where we also explicitly support them for
some reason.
2015-10-15 23:46:02 +02:00
Vadim Zeitlin
535b73c1f1 Install new wx/osx/cocoa/stdpaths.h header
Add this header, new since 0938141f3e (see
https://github.com/wxWidgets/wxWidgets/pull/89), to the files list and update
the makefile.

Closes #17208.
2015-10-15 22:09:10 +02:00
Markus Juergens
4489ec80e0 Add better error checking to wxWebViewIE
Verify that accessing a property really succeeded before using the returned
value.

This should fix at least one crash due to the use of uninitialized BSTR in
wxWebViewIE::GetCurrentTitle().

Closes #17204.
2015-10-15 16:35:58 +02:00
John Roberts
8ce5b9099b Send PAGE_CHANGED event after page change in wxOSX wxNotebook
Also reuse DoSetSelection() from OSXHandleClicked() to ensure the behaviour is
consistent when changing the selection programmatically or interactively.

Closes #17202.
2015-10-15 16:24:04 +02:00
Václav Slavík
1acfe88347 Allow NSAttributedString in [wxNSTextFieldEditor insertText]
According to the documentation, insertText: argument is either NSString
or NSAttributedString. The latter is not a subclass of the former, yet
the code assumed the argument is always a NSString. This caused the
following exception:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
-[NSConcreteMutableAttributedString characterAtIndex:]: unrecognized selector sent to instance

Fix this by checking for NSAttributedString and extracting plain string
from it.
2015-10-13 14:52:35 +02:00
John Roberts
b9b9a30bc7 Don't rely on getting PAGE_CHANGED event in wxOSX wxNotebook
The user code may handle this event, meaning that its handler in wxNotebook
itself is never invoked, but this broke actually changing the pages.

Fix this by doing the page change in the code handling the underlying OS X
event directly.

Closes #17197.
2015-10-13 14:34:02 +02:00
Vadim Zeitlin
f68c88b8d2 Fix showing cells without values in wxDataViewCtrl
Fix regression introduced in a49567109a: cells
without value, i.e. for which the wxVariant returned from GetValue() is not
set at all, should appear as empty, not reuse the last value used by this
renderer.
2015-10-12 01:13:56 +02:00
Vadim Zeitlin
f9334fda39 Fix crash when deleting items in wxTreeListCtrl
An invalid pointer was dereferenced after being deleted as ToDVI(item) checked
the item parent, i.e. used it, even though the item was already invalid.

Closes #17198.
2015-10-12 01:07:33 +02:00
Andreas Falkenhahn
9dd48eab61 Fix wxDataViewCtrl compilation when wxUSE_SPINCTRL==0
Just don't define wxDataViewSpinRenderer in this case.
2015-10-11 17:07:15 +02:00
Vadim Zeitlin
154ebfd1d9 Rename wxBoxSizer::m_minSize to avoid clash with the base class
wxSizer already has m_minSize field, use m_calculatedMinSize for the field of
the derived wxBoxSizer class to avoid confusion, just as wxFlexGridSizer
already did.

Also add a new unit test checking that GetMinSize() still works after this
change.
2015-10-11 01:00:38 +02:00
Vadim Zeitlin
cfb1e8adbf Don't update min size in wxBoxSizer::RecalcSizes()
This seems to be just unnecessary as RecalcSizes() is only supposed to
reposition the child elements and CalcMin() will be called later again if the
min size needs to be recomputed.
2015-10-11 00:22:04 +02:00
Vadim Zeitlin
b1314bbca4 Fix display of PNG images in wxHTML when GIF is disabled
Too much code was taken in "#if wxUSE_GIF" check, move Layout() out from it to
make PNG images work even if GIF support is disabled.

Closes #17181
2015-10-10 23:32:17 +02:00
Vadim Zeitlin
5c72e0c354 Fix for "Fix handling of relative URLs starting with "/" in wxHTML"
Commit 7e8c2cc4a5 fixed handling of http:// URLs
but completely broke the handling of file:// ones under MSW where the file
paths contain colons and so are different in escaped and unescaped forms and
so passing the unescaped "myfullurl" to wxFileSystem::OpenFile() simply didn't
work at all.

Fix this while still continuing to use "myfullurl" by keeping "myfullurl"
itself escaped and only unescaping it right before passing it to
OnHTMLOpeningURL() so that this public virtual method is still called with the
same value as before, but "myfullurl", and hence "myurl" passed to OpenFile()
later, is kept escaped.

Closes #17148.
2015-10-10 23:32:17 +02:00
Vadim Zeitlin
a2e359613e Revert "Remove dynamic loading of SetThreadUILanguage."
This reverts commit c5ce5bf168.

Using SetThreadUILanguage() directly results in compilation errors with MSVC 8,
see e.g.

http://buildbot.tt-solutions.com/wx/builders/wxMSW-VC8-full/builds/129/steps/libraries/logs/stdio

so keep loading it dynamically for now.

See https://github.com/wxWidgets/wxWidgets/pull/112
2015-10-10 22:19:59 +02:00
Vadim Zeitlin
18472ea8b1 Fix wxDCOverlay ctor associated with the entire wxDC
Use logical coordinates when initializing wxOverlay because this is what it
needs, not physical ones.

See #14415.
2015-10-10 22:17:12 +02:00
Paul Cornett
a15e776dcd avoid gtk_widget_get_root_window(), deprecated in GTK+ 3.12 2015-10-10 11:50:27 -07:00
Paul Cornett
48459e3cd2 avoid GtkAlignment and gtk_widget_reparent(), deprecated in GTK+ 3.14 2015-10-10 11:42:01 -07:00
Paul Cornett
a0173ec13e add compatibility header for older GTK3 versions 2015-10-10 11:38:06 -07:00
Paul Cornett
f8e430e479 avoid gtk_widget_reparent(), deprecated in GTK+ 3.14 2015-10-10 10:40:57 -07:00