Commit Graph

63069 Commits

Author SHA1 Message Date
Vadim Zeitlin
74e60b39f8 No changes, just get rid of gratuitous difference
Don't add an extra line unrelated to JavaScript changes on this branch.
2017-10-22 23:37:10 +02:00
Vadim Zeitlin
ee9615b9ac Consistently capitalize "JavaScript"
This is the proper name of the language, not "Javascript".
2017-10-22 00:26:33 +02:00
Vadim Zeitlin
ec54ddb66b No real changes, just reformat the code a little
Put long function calls on multiple lines.
2017-10-22 00:26:33 +02:00
Vadim Zeitlin
9d9f692024 Get rid of nonsensical "&*" construct in RunScriptSync()
Just pass JS result object directly to the WebKit function, there is
really no need to dereference it and then take its address for this.
2017-10-22 00:26:32 +02:00
Vadim Zeitlin
0e2f6e5c52 Fix memory leak in wxGTK RunScriptSync()
We must call g_object_unref() on an object that we called g_object_ref()
before.
2017-10-22 00:26:32 +02:00
Vadim Zeitlin
55beb9f7e8 Get rid of unnecessary casts in RunScriptSync()
No real changes, just simplify the code.
2017-10-22 00:26:32 +02:00
Vadim Zeitlin
4476bd646d Get rid of separate JSResultToString() function
This function was used only once and didn't really help understanding
the code and just required extra casts when passing arguments to it, for
some reason.

Just merge it into RunScriptSync() itself.
2017-10-22 00:26:30 +02:00
Vadim Zeitlin
b309487ef6 Rename RunScriptInternal() to RunScriptSync() in wxGTK
This helper function runs a JavaScript script and blocks until it
finishes executing, so try to use a name at least hinting at this
instead of being totally generic and useless.
2017-10-22 00:25:57 +02:00
Vadim Zeitlin
8c6ce2cd59 Improve RunScript() error message when using old WebKit
Don't put WebKit in all capitals and, more importantly, make it clear
that this is related to running JavaScript to the user.
2017-10-21 23:10:42 +02:00
Vadim Zeitlin
6930fff0f4 Minor style changes to private webkit helper classes
Include wx headers using quotes, not angle brackets.

Wrap over long lines.

Don't put space between the function name and its arguments.

Make wxJSStringRef::ToWxString() itself, not its return value, const.

Improve comments.
2017-10-21 23:09:22 +02:00
Jose Lorenzo
af8f7f33c3 Merge wxWebView JavaScript improvements branch
This is a squashed commit of the SOC2017_WEBVIEW_JS branch from
https://github.com/joseeloren/wxWidgets.git

Closes https://github.com/wxWidgets/wxWidgets/pull/538
2017-10-21 22:42:30 +02:00
Vadim Zeitlin
9f4f075034 Disable the use of precompiled headers under Unix by default
The speed advantage from using them is very variable, rarely big and
sometimes even negative, while the space penalty is consistently huge,
so it doesn't seem like a good trade-off to enable them by default.
2017-10-21 22:34:45 +02:00
Artur Wieczorek
afdfc02a49 Allow changing wxPropertyGridManager wxPG_EX_NO_TOOLBAR_DIVIDER style
Currently this style can be set only at toolbar creation and cannot
be changed afterwards.
2017-10-21 22:17:54 +02:00
Vadim Zeitlin
0a093193cf Merge branch 'mac-configure-fixes'
Miscellaneous improvements to configure under macOS, see
https://github.com/wxWidgets/wxWidgets/pull/568
2017-10-21 22:12:31 +02:00
Vadim Zeitlin
d5e1851a40 Merge branch 'remove-mac-res'
Remove all Mac resources and related stuff, see
https://github.com/wxWidgets/wxWidgets/pull/567
2017-10-21 22:11:42 +02:00
Vadim Zeitlin
e98d7181b5 Use wxDataViewCtrl::GetTopItem() and GetCountPerPage() in the sample
Demonstrate the use of these methods and also allow testing them easily.

See #17498.
2017-10-21 22:10:35 +02:00
Andreas Falkenhahn
eb035485d7 Add wxDataViewCtrl::GetTopItem() and GetCountPerPage()
Add methods doing the same thing for wxDataViewCtrl as the existing wxListBox
methods.

Closes #17498.
2017-10-21 22:10:35 +02:00
Andreas Falkenhahn
e77cb6f31f Improve wxListBox::GetCountPerPage() in wxGTK and wxOSX
Provide native implementation of this function instead of using the ad hoc one
in common code, which didn't really work -- so remove it completely now.

Closes #17189.
2017-10-21 22:10:35 +02:00
Andreas Falkenhahn
accf7ab117 Add wxFontPickerCtrl::SetMinPointSize()
Allow setting the minimal, as well as maximal, point size.

Closes #17126.
2017-10-21 22:10:35 +02:00
Vadim Zeitlin
60c93971b3 Merge branch 'dvc-compare-values'
Fix comparing items with checkboxes in wxTreeListCtrl and make it
simpler to correctly implement item comparison in other
wxDataViewCtrl-derived classes.

See https://github.com/wxWidgets/wxWidgets/pull/558
2017-10-21 19:59:12 +02:00
Vadim Zeitlin
6974280ee1 Merge branch 'better-assert-dialog'
Use wxRichMessageDialog for showing asserts if possible.
2017-10-21 19:55:15 +02:00
Vadim Zeitlin
d9e4f72fd2 Remove unused configure --enable-objc_uniquifying option
This was only ever used in the alternative wxCocoa port which was itself
removed quite a long time ago.
2017-10-21 19:06:33 +02:00
Vadim Zeitlin
7b373703f7 Only use macOS-specific options when configuring for macOS
Don't even check for options such as --with-macosx-xxx or
--enable-universal_binaries when not targeting macOS, as they only make
sense for this platform.
2017-10-21 19:04:20 +02:00
Vadim Zeitlin
4754621959 Do Mac-specific checks in configure for all ports under Darwin
Configure options such as --enable-universal_binary or
--with-macosx-version-min should be taken into account for any port
being built under macOS, not just wxOSX itself.

In particular, this ensures that PCH and dependencies tracking is
correctly disabled automatically when building universal wxGTK
libraries.

Closes #15454.
2017-10-21 18:59:16 +02:00
Vadim Zeitlin
a1a3efe03b Use wxRichMessageDialog for showing assertion failures
This allows to hide the long (and possibly not fitting on the screen)
call stack by default to avoid intimidating people not used to it and
provides a much more clear way to ignore the subsequent asserts, by
clicking a dedicated checkbox instead of having to choose the "Cancel"
button which didn't make much sense.

See #15430.
2017-10-21 18:19:35 +02:00
Vadim Zeitlin
352a06ad22 Remove old Carbon Mac resource files themselves
They are not used any longer.
2017-10-21 17:49:34 +02:00
Vadim Zeitlin
c77c43cf8c Remove checks for Carbon Mac tools not used any longer
We don't use Rez, DeRez and SetFile any longer and they are not
referenced in bakefile-generated makefiles any longer since the previous
commit.
2017-10-21 17:47:33 +02:00
Vadim Zeitlin
0d394eec9c Update to bakefile 0.2.11 and rebake everything
The main/only change in this version is the removal of automatic rules
using old Carbon Rez/DeRez/SetFile tools.
2017-10-21 17:42:30 +02:00
Paul Cornett
5ba7a1d166 Draw a point instead of a line in wxGCDC::DrawPoint()
See #9674, #4550
2017-10-20 09:40:43 -07:00
Vadim Zeitlin
c52ed1aff3 Make "No" button default in the assert dialog
This makes more sense than the default default (sic) "Yes" button,
pressing which accidentally could kill the program if not running under
the debugger.
2017-10-20 02:40:05 +02:00
Vadim Zeitlin
2e3f0d95dd Open debugger at assert location from the GUI assert handler too
This should have been part of 55fd62c1e3
which only updated the default assert handler, but not the one used by
default in all GUI applications, for some reason, see there for more
explanations.

Do this now to ensure that after pressing "Yes" in the assert failure
dialog, the debugger opens at the assert location and not deep inside
wxWidgets code.

See #11184.
2017-10-20 02:36:01 +02:00
Vadim Zeitlin
1cf41eced6 Use __DARWIN__ for -psn command line argument test
This code should be used in all ports that can be used under macOS, i.e.
also wxGTK and not just wxMac.

Closes #15432.
2017-10-19 19:01:08 +02:00
Robin Dunn
8fca138d29 Add missing wxGetLocale 2017-10-18 18:14:43 -07:00
Artur Wieczorek
892def066c Pass only relevant extra style bits to wxPropertyGrid
When extra style bits are set with the call to
wxPropertyGridManager::SetExtraStyle(), only those which are relevant
to wxPropertyGrid should be passed to the underlying property grid object.
Because it can happen that not all extra style bits of the underlying
wxPropertyGrid have been effectively changed by call to SetExtraStyle()
(e.g. wxPG_EX_NATIVE_DOUBLE_BUFFERING), we have to get the actual style
bits prior to storing them.
2017-10-18 22:58:21 +02:00
Artur Wieczorek
2f3376c4c5 Allow changing wxPG_EX_ALWAYS_ALLOW_FOCUS in propgrid sample
Add wxPG_EX_ALWAYS_ALLOW_FOCUS to the list of flags which can be changed.
2017-10-18 22:57:39 +02:00
Artur Wieczorek
19dbdca53b Rely on native double buffering by default in propgrid sample
If the platform has native double-buffering, create wxPropertyGrid
relying on it by default.
2017-10-18 22:56:44 +02:00
Artur Wieczorek
aaf1d505c6 Rely on native double buffering by default in wxPropertyGrid
If the platform has native double-buffering, instruct wxPropertyGrid
to rely on it by default.

Closes #16978.
2017-10-17 21:13:45 +02:00
Artur Wieczorek
cd669aea71 Use GetContentScaleFactor() to obtain the scale of the back buffer
GetContentScaleFactor() is implemented on all platforms and therefore
can be used to obtain the proper scale not only under wxOSX.
2017-10-17 20:32:29 +02:00
Paul Cornett
ed8a541463 Use wxFALLTHROUGH 2017-10-17 09:21:45 -07:00
Paul Cornett
4ec80a35f9 Define wxFALLTHROUGH for more compilers
Avoids -Wimplicit-fallthrough warning with GCC 7
2017-10-17 09:21:03 -07:00
Artur Wieczorek
cb799483b7 Rely on native double buffering by default in wxSTC
To avoid unnecessary buffering, turn off Scintilla buffered drawing
by default on platforms which have native double-buffering already.
2017-10-16 19:40:01 +02:00
Artur Wieczorek
2c69d27c0d Directly generate EVT_CONTEXT_MENU when Applications (Menu) key is pressed
WM_CONTEXTMENU message is generated directly by the system when the user presses and releases the VK_APPS key so there is no need to do this by emulating right mouse button click.

Closes #17969.
2017-10-09 16:14:50 +02:00
Artur Wieczorek
f34a6253c7 Fix compilation with wxUSE_ACCEL==0 2017-10-08 10:38:54 +02:00
New Pagodi
3a362c64cf Implement EVT_MOUSE_CAPTURE_LOST handler in wxSTC
When mouse is captured somwhere in the application, it's recommended
to have implemented a EVT_MOUSE_CAPTURE_LOST handler.
Resetting in the handler flag signalling captured state seems
to be a sufficient action because something like this is implemented
in the native Scintilla and it works fine in SciTE.

Closes #17961.
2017-10-08 10:22:59 +02:00
New Pagodi
6d0cb403a9 Prevent sending EVT_MOUSE_CAPTURE_LOST while opening a context menu in wxSTC
At least under wxMSW and wxGTK opening a popup menu when mouse is captured
generates EVT_MOUSE_CAPTURE_LOST. We would like to avoid this and
to release capture in a controlled way.

See #17961.
2017-10-08 10:11:47 +02:00
Takeshi Abe
0fea881f12 Fix recurrent "applicable" typo in wxPropertyGrid documentation
It was misspelt as "applicapple" in several places.

Closes https://github.com/wxWidgets/wxWidgets/pull/564
2017-10-06 15:28:58 +02:00
Artur Wieczorek
1ef1f8fda6 Allow setting position of wxProgressDialog (wxMSW)
Position of wxProgressDialog cannot be changed directly because the dialog is created in another thread and may exist when SetPosition() is called. New position has be stored in the data structure used to share data between the main thread and the task dialog runner and the real update is done during the cyclic refresh in the dialog thread.

Closes #13546.
2017-10-05 16:22:15 +02:00
Vadim Zeitlin
961a1c2b39 Remove unused Java class files without sources from help sample
These files didn't have any sources, don't work in any modern browser
and seem to have been completely unused anyhow, so just drop them.

Closes #17962.
2017-10-04 19:15:44 +02:00
Artur Wieczorek
bff8421ed7 Fix setting icon for wxProgressDialog (wxMSW)
Icon for wxProgressDialog cannot be changed directly because the dialog is created in another thread and may not yet exist when SetIcon() is called. We have to store new icon(s) in the data structure used to share data between the main thread and the task dialog runner and wait for a cyclic update.

Closes #17967.
2017-10-04 16:09:23 +02:00
Artur Wieczorek
718c916c93 Don't overwrite notification flags while setting a title for wxProgressDialog (wxMSW)
In wxProgressDialog::SetTitle(), wxSPDD_TITLE_CHANGED flag signaling a request to update a title should be added to the flags already being set and signaling another data waiting for the update.

Closes #17966.
2017-10-04 16:09:23 +02:00