Commit Graph

60382 Commits

Author SHA1 Message Date
Paul Cornett
02f22eff71 avoid GCC warning: "__WXMSW__" is not defined 2015-09-06 21:24:32 -07:00
Paul Cornett
25b0ee43b8 add wx prefix in a couple places missed in 8f8d58d1 2015-09-06 21:07:06 -07:00
Paul Cornett
845444f35f Fix null pointer check from 198d7c6c (r40919)
operator '?:' has lower precedence than '+'
2015-09-06 20:56:59 -07:00
Paul Cornett
27a8d28029 more use of wxOVERRIDE 2015-09-06 17:20:42 -07:00
Vadim Zeitlin
4177593aef Fix vertical wheel scrolling direction in wxGenericCalendarCtrl
Make scrolling upwards (positive delta) go to the past (i.e. decrease the
date) for consistency with the native calendar controls.

See 50daf1feab (commitcomment-13087042)
2015-09-06 19:40:03 +02:00
Lauri Nurmi
50daf1feab Add mouse wheel handlign 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.

Closes https://github.com/wxWidgets/wxWidgets/pull/88
2015-09-06 14:39:59 +02:00
Vadim Zeitlin
4d911fb059 Merge branch 'os_version'
Make strings returned by wxGetOsDescription() more readable for the users.
2015-09-06 14:24:57 +02:00
Vadim Zeitlin
8b2dc19dbb Don't translate OS X codenames in wxGetOsDescription()
OS X itself doesn't seem to do it.

See https://github.com/wxWidgets/wxWidgets/pull/76#issuecomment-138067426
2015-09-06 14:24:17 +02:00
John Roberts
fe9a5f47f4 Add wxTopLevelWindow::Enable{Maximize,Minimize}Button()
Allow to disable maximize and minimize buttons dynamically just as we already
allow to disable the "Close" button using EnableCloseButton().

Currently implemented for MSW and OSX only.

Closes #17133.
2015-09-06 14:17:46 +02:00
John Roberts
6055d8d0a5 Implement wxTopLevelWindow::EnableCloseButton() for wxOSX
Just forward this wx method to Cocoa standardWindowButton:NSWindowCloseButton.

See #17133
2015-09-06 14:16:39 +02:00
Vadim Zeitlin
8d6a2b3921 Don't send wxActivateEvent for minimized windows in wxMSW
Unexpectedly, minimizing the window by clicking on its taskbar icon resulted
in a wxActivateEvent. This broke the focus handling in wxTLW and resulted in
debug messages about ::SetFocus() failure whenever the window was minimized in
this way.

It also seems that other existing code doesn't take into account the
possibility of getting an "active" activation event when the window is
minimized and this doesn't happen in the other ports, so don't send this event
in wxMSW neither.

Closes #17128.
2015-09-04 16:23:13 +02:00
Tobias Taschner
dac9851f8d Add custom background colour and no XP theme to splitter sample.
Include menu items to toggle wxSP_NO_XP_THEME (on MSW) and to toggle between default background and custom wxBLUE background for the splitter sash.
2015-09-04 11:10:44 +02:00
Tobias Taschner
804f83b13a Fix SetBackgroundColour() for wxSplitterWindow.
Background colour was ignored even if wxSP_3DSASH was not included in the window flags. The OSX renderer already used the background colour.
2015-09-04 11:09:00 +02:00
Paul Cornett
2fbd2a7800 Implement SetVisited()/GetVisited()
and set the visited state when the link is clicked
2015-09-03 09:30:42 -07:00
Vadim Zeitlin
45767ff6d9 Merge branch 'autoconf-fixes'
Correction to m4 macros used in programs and libraries using wxWidgets.
2015-09-03 00:06:53 +02:00
Vadim Zeitlin
602783facb Merge branch 'dvc-type-check'
Various fixes to make wxDataViewCtrl behaviour more homogeneous across all
ports.
2015-09-03 00:01:24 +02:00
Artur Wieczorek
faffaaae29 Fix bug when a wxToolBar tool is deleted from its click handler
Deleting a tool from its own event handler resulted in at least in an assert
and could also lead to a crash as an already deallocated pointer was
dereferenced.

Fix this by checking if the tool with the same ID is still available after the
event handler finishes.

See #16762.
2015-09-01 18:51:19 +02:00
Vadim Zeitlin
a7e5dd0d2a Merge branch 'toolbar-sample-fixes'
Miscellaneous fixes to the toolbar sample.

Closes https://github.com/wxWidgets/wxWidgets/pull/84
2015-09-01 18:42:33 +02:00
Cătălin Răceanu
2e103dfe95 Explain toolbar sample actions better
Added messages to show that Copy tool intentionally influences Print tool and
Cut tool influences Help tool, as this is rather unexpected behaviour and
could be seen as a bug.
2015-09-01 18:39:55 +02:00
Cătălin Răceanu
0d45559975 Append log messages to the end of the text in the toolbar sample
This ensures that the messages always appear in the correct order, even if the
user clicked somewhere in the middle of the control -- which would previously
result in inserting the next message at the cursor position, not the end.
2015-09-01 18:39:49 +02:00
Cătălin Răceanu
826296efc3 Make the text control in the toolbar sample read-only
This text control is used only for logging messages, so don't allow modifying
it.
2015-09-01 18:36:37 +02:00
Cătălin Răceanu
57ec523b6f Fix "Print" tool handling in the toolbar sample
Ensure that the count of the Print tools is always correct, even if more tools
were inserted and then the toolbar was recreated (in a different position).
2015-09-01 18:34:49 +02:00
Tobias Taschner
e6b31adefe Fix OS X wxWebView ignoring JavaScript window.open() calls
On OS X (tested on 10.10.5) calls to window.open() with a different target
than _self were simply ignored. No navigation and no EVT_WEBVIEW_NEWWINDOW as
expected.

Unfortunately WebKit does not call the decidePolicyForNewWindowAction delegate
method in these cases. A new delegate method createWebViewWithRequest has been
implemented to handle this case and send EVT_WEBVIEW_NEWWINDOW as in other
ports.

Closes https://github.com/wxWidgets/wxWidgets/pull/85
2015-09-01 18:29:34 +02:00
Paul Cornett
83ce88402c Add gtk_cell_renderer_set_padding() compatibility function 2015-09-01 08:41:15 -07:00
Vadim Zeitlin
361c6357b4 Use wxDataViewRenderer::PrepareForItem() in all ports
wxOSX and wxGTK previously used their own methods for handling the enabled
state and the attributes of the items being rendered, change them to reuse the
same methods as the generic implementation, i.e. SetEnabled() and SetAttr()
and remove the port-specific GtkSetAttr(), OSXApplyAttr() and so on.

This has the advantage of ensuring that the logic is the same for all
platforms (e.g. item enabled status wasn't handled in the same way in wxGTK as
in the other ports previously) and hopefully makes the code simpler by cutting
down on the number of virtual methods.

Notice that GtkSupportsAttrs() optimization was removed as it didn't seem to
be worth the bother (we basically saved a call to a virtual model method at a
price of a virtual renderer method call) and preserving it would have
complicated things needlessly.
2015-08-31 22:20:33 +02:00
Vadim Zeitlin
d501395ee0 Fix handling of unspecified build options in wxwin.m4
There were many problems if some options selecting the build of wxWidgets to
use were not specified at all, i.e. if the corresponding string was not used
in WX_STANDARD_OPTIONS() argument or if WX_STANDARD_OPTIONS() was not used at
all (which is perfectly possible and allowed).

In this case, the output of WX_STANDARD_OPTIONS_SUMMARY_MSG() was corrupted
(e.g. it could output "WX_DEBUG is" without any value and "PORT:" value was
empty) and, worse, as that macro is only cosmetic, WX_LIKE_LIBNAME() didn't
work correctly neither, making it difficult to check for the libraries using
it to construct their name (as many libraries from wxCode do).

Get rid of all these problems by simply treating empty/undefined variables as
meaning "auto detect" instead of having to set them to the special "auto"
value first. This makes sense as now we have just 3 states: 0, 1 or null,
instead of previous 4 (+ "auto") and is much more robust.
2015-08-31 02:16:01 +02:00
Vadim Zeitlin
e36874d4f9 Fix nonsensical handling of TOOLKIT in wxwin.m4
The code set WX_PORT to $TOOLKIT only if the latter was empty which made no
sense and also set WX_PORT to the never used nor documented anywhere else
$PORT if $TOOLKIT was not empty which made even less of it.

Just assign $TOOLKIT to WX_PORT if the former has a valid value.
2015-08-31 01:57:48 +02:00
Vadim Zeitlin
6bfea22363 No real changes, just slightly simplify a macro in wxwin.m4
Remove the never used 4th and 5th arguments of _WX_SELECTEDCONFIG_CHECKFOR
macro.

Also update the comment to better explain what does the macro actually do: it
doesn't "output the message" but rather sets a variable, with the message
being an optional side effect.
2015-08-31 01:43:21 +02:00
Artur Wieczorek
5619e7f964 Use wxSwap function to swap values of array elements in wxPGArrayStringEditorDialog::ArraySwap. 2015-08-30 19:49:29 +02:00
Artur Wieczorek
d6f2264f8b Use Boolean variable to store Boolean value. 2015-08-30 19:48:09 +02:00
Artur Wieczorek
c63b1604b3 Use native renderer to draw rectangle indicating that wxPG category property is selected.
Because on some ports native renderers require a valid reference to the windows be drawn then it is necessary to implement and use new wxPGCellRenderer::DrawCaptionSelectionRect method which passes this  additional argument.
2015-08-30 19:46:34 +02:00
Vadim Zeitlin
a49567109a Consistently check for type mismatch in all ports in wxDataViewCtrl.
Move the checks for the type mismatch between the type of the value returned
by wxDataViewModel and the type expected by wxDataViewRenderer into common
code. This avoids duplicating the same code in wxGTK and wxOSX and, more
importantly, means that this check is also performed in wxMSW when using the
generic version, so that the problems such as the one fixed in 3ff8c3c ("add
missing wxDataViewDateRenderer::GetDefaultType()") would be visible there too.
2015-08-29 00:03:15 +02:00
Vadim Zeitlin
e8647b4751 No changes, just use an extra variable in wxGTK wxDataViewCtrl code.
Store the column index in a variable instead of accessing it several times
using the clumsy and unclear cell->GetOwner()->GetModelColumn() expression.
2015-08-28 23:37:51 +02:00
Vadim Zeitlin
bff235c918 Recognize GTK3 port in helper autoconf macros.
Allow "gtk3" as a value of --with-toolkit option and recognize it correctly
when auto-detecting toolkit from `wx-config --selected-config` output.
2015-08-28 18:58:25 +02:00
Artur Wieczorek
bbecebd4ba Use Boolean expression instead of conditional statement to get Boolean value. 2015-08-27 19:17:49 +02:00
Artur Wieczorek
d0eea355fa Fixed turning on/off 'Category Specific Colours' in propgrid sample.
When specific colours are turned on then custom colours are assigned to both category properties and their sub-properties. But when specific colours are turned off then only category properties are reverted to default colours what is misleading.
Now, all properties are reverted to default colours.
2015-08-27 19:16:29 +02:00
Artur Wieczorek
7ce6cff5ab Extend functionality of wxPropertyGridInterface::SetPropertyColoursToDefault method.
SetPropertyTextColour, SetPropertyBackgroundColour methods are able to set colours recursively for sub-properties but SetPropertyColoursToDefault method is not.
For the sake of consistency, SetPropertyColoursToDefault method is extended to have the same capabilities as SetPropertyTextColour and SetPropertyBackgroundColour. Behaviour and signature in default case (no recursion) is preserved.
For internal purposes there were also implemented helper methods in wxPGProperty class: SetDefaultColours, ClearCells.
2015-08-27 19:14:52 +02:00
Artur Wieczorek
503c6a48c7 Use argument of proper type when calling SetPropertyTextColour in propgrid sample.
wxPropertyGridInterface::SetPropertyTextColour expects int value for flags parameter, not Boolean.
2015-08-27 19:06:46 +02:00
Artur Wieczorek
0870f213df Do not attempt to change colours of properties which are not present on the current page (in propgrid sample).
Test executed from 'Category Specific Colours' menu is designed to work only for specific category properties which are present only on 'Standard Items' page.
Display a message if current page is not this one and therefore test cannot be executed properly. Also make menu item non-checkable if it is accessed from improper page.
2015-08-27 19:05:15 +02:00
Vadim Zeitlin
f3d8f6cadc Restore automatic quotation marks replacement in wxOSX wxTextCtrl.
This was disabled by 262ed2c133 but doesn't seem
to be justified, we shouldn't be overriding native platform behaviour without a
very good reason and there doesn't seem to be any.

See #16805.
2015-08-27 12:02:22 +02:00
Vadim Zeitlin
6605eebae6 Restore comment wrongly removed by c269398.
The comment is (probably) still relevant, otherwise we wouldn't need this code
at all but could just disable the control normally. It was probably removed
because of a mix up between "disabling the control" and "settings its colour
to disabled".

See #10254.
2015-08-27 12:02:22 +02:00
Tobias Taschner
f1abb351af Remove MicroWindows support.
MicroWindows (aka Nano-X) support hasn’t been updated since 2010 and last work for it in wxWidgets happened more than 10 years ago.
2015-08-27 11:00:16 +02:00
Tobias Taschner
5f75b7506f Remove Hildon framework support.
The Hildon framework was used for Nokia 770 and other Maemo devices.
This platform discontinued and hasn't seen a new release since 2011.
2015-08-26 22:49:53 +02:00
Tobias Taschner
26a0a24f38 Remove MS-DOS source files.
Last work on the MS-DOS files was 10 years ago and it's not a viable platform in 2015 any more.
2015-08-26 21:09:41 +02:00
Paul Cornett
e77c48331b Update internal sorting state in wxDataViewColumn::SetSortOrder()
This allows a subsequent wxDataViewModel::Resort() to actually work, see #15626
2015-08-25 22:38:26 -07:00
Paul Cornett
63615e323a avoid GCC warning "enumeral and non-enumeral type in conditional expression" 2015-08-24 08:18:30 -07:00
Artur Wieczorek
b18f6ed10a Fix reading ZIP extra field content from local file header.
Extract extra data from buffer allocated for the local extra field.

This fixes regression after ZIP-64 additions which resulted in crashes while
running the test suite.

Closes https://github.com/wxWidgets/wxWidgets/pull/78
2015-08-24 14:41:50 +02:00
dasimx
10a4d15b27 Don't change the clipboard in wxNotebook::SetPageImage() in wxOSX.
For some reason the implementation of this method (see #12754) also put the
image on the clipboard, which was completely unexpected and unnecessary, so
just don't do it.

Closes https://github.com/wxWidgets/wxWidgets/pull/77
2015-08-24 14:39:20 +02:00
Tobias Taschner
d9761208e5 Remove documentation notes to OS X prior 10.5.
Since these prior versions are not supported by the cocoa or carbon builds these notes are no longer required in the documentation.
2015-08-21 13:18:59 +02:00
Tobias Taschner
3796744dac Include OS X name in wxGetOsDescription().
Use the marketing/code name of the current OS X version (if known) as part of the wxGetOsDescription(). Also removed the Mac prefix in the description which is no longer used since OS X 10.8.
2015-08-21 13:18:59 +02:00