The code to update m_selection was too aggressive in the virtual list
case, when it simply cleared it, and broken for single-item selection in
the general case.
Fixed to recompute selection properly.
Václav Slavík [Wed, 10 Aug 2011 15:21:22 +0000 (15:21 +0000)]
Make the wxDataViewItem(void*) constructor explicit.
Not having this as an implicit one made it possible to create
wxDataViewItem from any pointer without realizing it, leading to hard to
debug crashes later.
Added NSApplicationDelegate's openFiles for wxOSX-Cocoa.
openFiles (available since OS X 10.3) replaces using the openFile method. It allows for more convenient handling of multiple drops and knowing in advance how much files/folders are dropped instead of openFile with which you only get to respond to a single file/folder drop at a time. By default openFiles calls the newly added MacOpenFiles which calls MacOpenFile multiple times, so ordinarily the behaviour is backwards compatible (both on wxOSX Cocoa and Carbon).
The openFile instance method has been removed because it doesn't seem to be called anymore: neither when dropping a single file on the application in the dock or Finder nor when passed as a command-line argument.
Vadim Zeitlin [Mon, 8 Aug 2011 15:15:50 +0000 (15:15 +0000)]
Don't manually centre dialogs created with default position in wxMSW.
We always centered the dialogs on the main display which was wrong if the
parent window was on another one. Instead of fixing it, simply don't centre
them at all and let Windows position them, there is no reason to change the
default behaviour.
Václav Slavík [Mon, 8 Aug 2011 10:11:04 +0000 (10:11 +0000)]
Remove selection methods taking int from generic wxDataViewCtrl.
Current public API uses wxDataViewItem, this code dated back to 2.8.
They were now protected instead of public, the code wasn't used
anywhere and wasn't portable, it existed only in the generic version.
Vadim Zeitlin [Mon, 8 Aug 2011 09:32:39 +0000 (09:32 +0000)]
Added private wxMenu::MSWNewFromHMENU() method.
Add a method allowing creation of a wxMenu object from a native menu handle.
This will be used to implement access to the system menu in an upcoming commit
but could also be useful for other purposes.
Vadim Zeitlin [Mon, 8 Aug 2011 08:33:19 +0000 (08:33 +0000)]
Fix compilation with g++ 4.7 (prerelease).
The workaround for a bug in g++ 3.5 breaks compilation with 4.7 which
implements two-phase lookup correctly, so disable this workaround for 4.7 and
later. We could probably even only enable it for 3.x but this doesn't really
matter as previous 4.x releases don't have problems with this anyhow.
Vadim Zeitlin [Thu, 4 Aug 2011 22:53:42 +0000 (22:53 +0000)]
Add support for wxHELP button to wxMessageDialog.
Implement support for wxHELP for wxMSW, wxGTK and wxOSX/Cocoa (at least when
showing the message box from the main thread, there doesn't seem to be any way
to show more than three buttons with CFUserNotificationDisplayAlert() so
"Help" button is not supported when using it).
This is useful not only on its own, i.e. to allow the user to ask for help,
but also because it brings the total number of buttons supported by the
message dialog to 4, meaning that more choices can be offered to the user
(which is rarely, but not quite never, useful).
Vadim Zeitlin [Thu, 4 Aug 2011 16:12:41 +0000 (16:12 +0000)]
Add missing header for minimalistic builds not using PCH.
wxWindow might not be fully declared in dcbase.cpp but we need its full
declaration for wxDCImpl::InheritAttributes() so explicitly include
wx/window.h -- while this is usually already included from somewhere else it
might not be in minimal builds with a lot of features disabled.
Vadim Zeitlin [Thu, 4 Aug 2011 16:12:31 +0000 (16:12 +0000)]
Use wxWindowMSW instead of wxWindow to fix wxUniv/MSW compilation.
wxFindWindowAtPoint() only returns wxWindowMSW, not the derived wxWindow, in
wxUniv build so assign its return value to wxWindowMSW to avoid compilation
problems in it.
Vadim Zeitlin [Thu, 4 Aug 2011 13:19:57 +0000 (13:19 +0000)]
Avoid unwanted line break in wxDataViewListModel::GetCount() docs.
Using "i.e." in the brief Doxygen comment makes it end it after the second
period and results in truncated brief description and an unwanted line break
in the full description.
Just avoid using periods for now inside the brief description. Maybe a better
solution could be found in the future.
Steve Lamerton [Thu, 4 Aug 2011 08:30:37 +0000 (08:30 +0000)]
Fix recursion problems when loading pages from a virtual file system using the WebKitGTK+ backend. Navigating through pages in an archive now works correctly.
Steve Lamerton [Wed, 3 Aug 2011 18:31:48 +0000 (18:31 +0000)]
Rework IE virtual file system support to use new syntax. Remove now unused code for resolving links ourselves, we can let the backend resolves them itself.
Vadim Zeitlin [Wed, 3 Aug 2011 00:45:42 +0000 (00:45 +0000)]
Fix bug with TAB being able to switch focus between MDI frames.
The keyboard navigation code correctly checked that TAB was not propagated
above the TLW containing the window in which the key was pressed to avoid
switching focus between different TLWs by pressing TAB.
However wxMDIChildFrame is not a TLW and so it was possible to switch focus
between two different MDI child frames by pressing TAB. This was unexpected
and counterintuitive, especially because the frame receiving focus was not
even activated (which might be another bug).
Fix this by adding a new wxWindow::IsTopNavigationDomain() virtual method that
can be overridden to indicate that a window is a self-contained "keyboard
navigation domain" and that keyboard events shouldn't propagate outside of it
and override it in both wxTopLevelWindow and wxMDIChildFrame to ensure that it
behaves correctly.
Vadim Zeitlin [Wed, 3 Aug 2011 00:45:38 +0000 (00:45 +0000)]
No real changes, just rename a variable.
"focussed" spelling is unusual and inconsistent with "focused" used in many
other places in the same file, so renamed "focussed_child_of_parent" and also
use standard camelCase naming convention for it.
Vadim Zeitlin [Tue, 2 Aug 2011 19:46:40 +0000 (19:46 +0000)]
Fix wxSocket::WaitForAccept() in blocking mode.
When wxSocket::WaitForAccept() was called from another thread or on a socket
with wxSOCKET_BLOCK flag it didn't work because it called
wxSocketImpl::Select() with wxSOCKET_CONNECTION_FLAG which was only handled
for the client sockets in this function.
Handle it now for the server ones too, this should allow blocking server
sockets to work again.
Steve Lamerton [Mon, 1 Aug 2011 10:10:20 +0000 (10:10 +0000)]
Add missing lines to setup.h.in. This properly fixes compilation under configure based environments. Also update the include guards for the wxWebHistoryItem files.
Steve Lamerton [Sun, 31 Jul 2011 14:06:33 +0000 (14:06 +0000)]
Split wxWebHistoryItem headers out into separate files for each backend. This will allow us to dramatically reduce the amount of code in the GTK history implementation and implement it and OSX history support more cleanly.
Václav Slavík [Sun, 31 Jul 2011 13:25:33 +0000 (13:25 +0000)]
Silence Clang warning about numeric_limits<> specialization.
libstdc++ (which is used by Clang) defines numeric_limits<> as a struct
and Clang issues a warning about our specialization that uses 'class'.
As libstdc++ developers have no intention of fixing this, silence the
Clang warning by using 'struct' for it.
Václav Slavík [Sun, 31 Jul 2011 13:25:30 +0000 (13:25 +0000)]
Disable symbols visibility support for the Clang compiler.
Even Clang++ shipped with Xcode 4.1 still can't handle visibility
of non-inline methods in exported template classes if the default
visibility is 'hidden'.
Disable visibility support for Clang for now, we'll revisit it in the future.
Generate events with WXK_NONE Unicode keys for non-characters in wxOSX.
The keyboard keys not corresponding to real characters, such as cursor arrows
or function keys, must generate wxKeyEvents with WXK_NONE as Unicode key code
to make it possible to distinguish them from the printable characters but
wxOSX generated events with valid Unicode key codes for them instead.
Avoid this by excluding Unicode key codes corresponding to code points in the
Unicode private use area: while this doesn't seem to be documented anywhere,
all non-printable characters seem to have their Unicode representation inside
it.
This change brings wxOSX keyboard event generation in line with the other
ports and, as a side effect, also closes #12423.
Avoid bogus focus loss event when wxTextCtrl is modified in wxOSX.
A wxEVT_KILL_FOCUS event was generated when wxTextCtrl::WriteText() was called
in wxOSX, even though the control didn't lose focus at all in this case. This
was completely unexpected and thoroughly confused wxGrid code which closed the
in place editor immediately after showing it because of this (this was perhaps
only the case since r68319 but the changes there were correct so they only
masked the real bug).
Avoid this bogus event by remembering the NSView currently being
programmatically modified and not doing anything in textDidEndEditing
notification if it is generated for this view.
Improve wxTextCtrl::GetNumberOfLines() unit test and documentation.
First, enable execution of the Lines() wxTextCtrl unit test case under wxOSX
as it passes since the fix in the previous commit.
Do add a test for GetNumberOfLines() that currently doesn't work in the same
way under all platforms -- but with this test we at least can be sure how does
it work exactly where.
Also mention the current discrepancy in this function behaviour in the
documentation.
See #12366.
Fix Lines() wxTextCtrl unit test to pass under wxGTK too.
No modifiers were used for stock accelerators, i.e. Append(wxID_NEW) resulted
in an item with the label "New" and plain "N" as accelerator in wxOSX. This
was due to wxACCEL_CMD not being handled in wxAcceleratorEntry::ToString() so
map it to the same prefix as wxACCEL_CTRL there, this is enough to make the
accelerators work even though it's not clear whether this is really the best
thing to do or if we should use a separate "Cmd+" prefix for it (and recognize
it in Parse() too then) as otherwise it's unclear why do we have wxACCEL_CMD
at all, it just seems to be treated identically to wxACCEL_CTRL everywhere.
Get rid of ugly wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST macro.
Replace it with wxWindowWithItems<> template class which takes care of
disambiguating between the two inherited Get/SetClientXXX() versions and use
it as a base class in all clases that previously used the macro.
Resolve ambiguity between GetClientXXX() methods in wxOSX wxComboBox.
Use wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST for wxOSX/Cocoa too, not
only for wxOSX/Carbon. This macro adds methods to explicitly disambiguate
between the two inherited versions of each GetClientXXX() method, the one from
wxItemContainer and the other one from wxEvtHandler.
Steve Lamerton [Sat, 30 Jul 2011 11:26:55 +0000 (11:26 +0000)]
Add new wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED event. Implement for all backends, extend the sample to demonstrate it and document. Also update some copyright notices.
Steve Lamerton [Fri, 29 Jul 2011 10:33:54 +0000 (10:33 +0000)]
Add CombineURIs implementation for wxWebFileProtocolHandler. Update the IE backend to use it. Using the IE backend navigating through zip archives is now functional, including loading resources and links.
Steve Lamerton [Thu, 28 Jul 2011 16:49:48 +0000 (16:49 +0000)]
Move the wxWebFileProtocolHandler from the IE backend to the common source, add the RegisterProtocol method to all classes (as a stub in GTK and OSX). Register the file protocol handler in the sample for testing purposes.
Steve Lamerton [Thu, 28 Jul 2011 16:08:59 +0000 (16:08 +0000)]
Initial implementation of wxWebProtocolHandler and wxWebFileProtocolHandler for the IE backend. This allows browsing of local files and files in zip archives when using a query string which specifies the protocol and path.