Commit Graph

60529 Commits

Author SHA1 Message Date
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
Paul Cornett
457182b7e2 fix wxTB_RIGHT toolbar positioning with GTK3 2015-10-10 10:10:03 -07:00
Václav Slavík
ec510a0c4b Even more workaround for clang warnings about typeid() side effects.
Even after 5aae7c7387 and
d2c1fce24e clang would still emit the
warning in code using templates via
WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImpl<T>).

Silence the warning by putting the typeid() expressions into a trivial
helper function with two wxAnyValueType reference arguments, so the
class the macro is used in doesn't come into play (it shouldn't in the
previous version of the code either, but clang apparently thought it
did).

Hopefully really closes #16968.
2015-10-10 09:51:47 +02:00
Ian Langworth
c739671796 Ensure that AdjustStaticBoxZOrder is always defined
Fix the build in wxUSE_STATBOX=0 and wxUSE_DRAG_AND_DROP=0 case:
AdjustStaticBoxZOrder() must still be defined as it's also used in
DragAcceptFiles().

Closes https://github.com/wxWidgets/wxWidgets/pull/111
2015-10-08 13:48:39 +02:00
Tobias Taschner
55c76ed087 Remove dynamic loading of GetLongPathName.
GetLongPathName is available since WinXP.
2015-10-08 10:59:56 +02:00
Tobias Taschner
c5ce5bf168 Remove dynamic loading of SetThreadUILanguage.
SetThreadUILanguage is available since WinXP.
2015-10-08 10:48:37 +02:00
Tobias Taschner
c29cf8a0b0 Update outdated references to WinXP in documentation. 2015-10-08 10:45:51 +02:00
Tobias Taschner
0709199548 Remove dynamic loading of SHGetFolderPath and SHGetSpecialFolderPath.
SHGetFolderPath is available since Win2k and no fallback to the outdated SHGetSpecialFolderPath is required.
2015-10-08 10:29:50 +02:00
Vadim Zeitlin
5cce48186c Link with shlwapi.lib and version.lib under MSW
These libraries are required now that we don't load the functions from them
dynamically (see e78be14ac1)

Closes #17180
2015-10-07 18:56:33 +02:00
Vadim Zeitlin
aa970c3da3 Remove all mentions of msevc4prj from bakefiles
Neither eVC nor wxWinCE port it was used for are supported any longer, so
simplify the bakefiles by removing the checks for it.
2015-10-07 18:14:55 +02:00
Vadim Zeitlin
bde287ba81 Rebake webview sample makefile after EXTRALIBS_WEBVIEW addition
This should have been done in d24f711f88 a year
ago but that commit only updated the makefile of the library itself and not
that of the sample.

See #16624
2015-10-07 18:14:55 +02:00
JulianSmart
ca606fb3b6 Merge branch 'master' of https://github.com/wxWidgets/wxWidgets 2015-10-07 14:41:13 +01:00
JulianSmart
5979facc48 Fixed bug in border drawing 2015-10-07 14:40:36 +01:00
Scott Mansell
c33dc4459c Fix building of wxBusyInfo with wxUSE_MARKUP disabled
Don't call SetLabelMarkup() if it's not available.

Closes https://github.com/wxWidgets/wxWidgets/pull/109
2015-10-06 13:15:31 +02:00
Tobias Taschner
6b34f39f46 Choose lighter color for wxOSX/Cocoa wxSYS_COLOUR_INFOBK.
[NSColor windowFrameColor] from commit 515fcc66e6 was way to dark [NSColor windowBackgroundColor] gives a much better contrast with the text.
2015-10-06 11:32:01 +02:00
Vadim Zeitlin
cb83c4e0de Fix wxStandardPaths compilation with gcc after recent changes
Forward declare struct _GUID to allow referencing it in this header without
including the full <windows.h> or even <guiddef.h>.

This fixes compilation with gcc after the changes of
a0fb808087

Closes https://github.com/wxWidgets/wxWidgets/pull/108
2015-10-05 00:50:01 +02:00
Tobias Taschner
614cb5abf0 Fix non PCH build and gcc warnings in wxAuiMSWTabArt
Recent de96b0dae7 commit caused these issues.

See https://github.com/wxWidgets/wxWidgets/pull/108
2015-10-05 00:34:07 +02:00
Cătălin Răceanu
5ba2943d1c Correct wxThread::Delete() default parameter documentation.
It is actually wxTHREAD_WAIT_DEFAULT and not always wxTHREAD_WAIT_BLOCK.

Closes https://github.com/wxWidgets/wxWidgets/pull/107
2015-10-05 00:31:06 +02:00
Tobias Taschner
b642747fd2 Fix right aligned text position in wxDVC on MSW with system theme
Right aligned text was one pixel off when inside selection rect.

Close #16414
2015-10-04 01:14:09 +02:00
Tobias Taschner
4ac0250f90 Fix cell selection drawing in wxDVC on MSW with system theme
Keyboard focus rect when selecting a column was nearly invisible against the
light background. Now the correct theme parts are used when drawing with UX
theme and the old behavior (white focus rect) is used everywhere else.

See #16414
2015-10-04 01:13:27 +02:00
Tobias Taschner
515fcc66e6 Reuse wxSystemSettings from wxCocoa in wxOSX/Cocoa
Use of NSColor’s various system defined color values seem to get more
appropriate colors than the carbon implementation.

Closes #17141
2015-10-04 01:09:27 +02:00
Tobias Taschner
0938141f3e Add Cocoa implementation of wxStandardPaths
Previously wxStandardPathsCF was used for all Mac builds and it used
FSFindFolder() (CoreFoundation) calls in Carbon builds, but many hard coded
values in Cocoa builds. The Cocoa implementation uses NSFileManager and
NSBundle to retrieve the folder locations from the system.

Closes https://github.com/wxWidgets/wxWidgets/pull/89
2015-10-04 01:05:57 +02:00
Tobias Taschner
a0fb808087 Add wxStandardPaths::GetUserDir() to get Desktop, Download etc
All major supported platforms have well defined per-user directories to store
Downloads, Music, Pictures, Videos and the Desktop files. The new method
wxStandardPaths::GetUserDir() allows for a unified way to access these on MSW,
OS X and Unix (if XDG user dirs specification is implemented for the latter).

See https://github.com/wxWidgets/wxWidgets/pull/89
2015-10-04 01:05:23 +02:00
IlyaBizyaev
cfe4b4fd07 Remove obsolete empty files
None of these files is used and they don't contain anything useful.

See https://github.com/wxWidgets/wxWidgets/pull/46
2015-10-04 00:57:48 +02:00
Vadim Zeitlin
02942c1b14 Merge branch 'prewinxp_cleanup' of https://github.com/TcT2k/wxWidgets
Remove the code checking for Windows versions < XP and update the documention
to not mention them any more neither.

Closes https://github.com/wxWidgets/wxWidgets/pull/82
2015-10-04 00:54:05 +02:00
Vadim Zeitlin
de96b0dae7 Implement native wxAuiTabArt for MSW
This wxAuiTabArt implementation uses Windows uxtheme API to draw AUI tabs. A
fallback to generic tab art is implemented for the bottom tabs or if uxtheme
is not available (disabled by user or no manifest file).

Closes https://github.com/wxWidgets/wxWidgets/pull/105
2015-10-04 00:28:00 +02:00
Tobias Taschner
1a8bcd4d88 Add support for mouse hover state to wxAuiTabArt
This allows wxAuiNotebook to support drawing its tabs differently depending on
whether the mouse is hovering above them or not.

See https://github.com/wxWidgets/wxWidgets/pull/105
2015-10-04 00:27:22 +02:00
Vadim Zeitlin
e0a175e0b8 Merge branch 'upmake'
Update upmake script itself and various upmake-related fixes.
2015-10-04 00:18:21 +02:00
Vadim Zeitlin
eae9cf1641 Put systhemectrl.{cpp,h} in alphabetic order in the MSBuild project
No real changes, just keep files a bit better organized.

See #16414.
2015-10-04 00:11:16 +02:00
Vadim Zeitlin
d22574a042 Remove wrong inclusion of systhemectrl.cpp from MSBuild project
This got somehow added in 2fff3cd29f (bug in
upmake?).

See #16414.
2015-10-04 00:11:16 +02:00
Vadim Zeitlin
a3fc5c5400 Update MSBuild wxHTML project to match the old MSVC one
The MSBuild project was not updated in c5d29608b1
so do it now, using upmake.

See #16923.
2015-10-04 00:11:16 +02:00