Paul Cornett [Tue, 16 Aug 2011 07:02:37 +0000 (07:02 +0000)]
Avoid creating rect with negative size while clipping to DC size.
Also, don't convert result of wxDC::GetSize() to device coords, it's already device coords.
Steve Lamerton [Mon, 15 Aug 2011 11:03:26 +0000 (11:03 +0000)]
Rename wxWebNavigationError to wxWebViewNavigationError and wxWebNavigationEvent to wxWebViewEvent. This makes the names more consistent with other parts of wxWidgets.
Vadim Zeitlin [Sun, 14 Aug 2011 19:39:31 +0000 (19:39 +0000)]
Fix return value of wxMBConvUTF8::ToWChar() when not using MAP_INVALID_UTF8_NOT.
wxMBConvUTF8::ToWChar() was off by 1 when the input length was explicitly
specified, the extra NUL should only be added in the implicit length case.
This bug didn't occur for the default wxMBConvUTF8 object as it simply
forwarded to the base class wxMBConvStrictUTF8 implementation but it happened
when MAP_INVALID_UTF8_TO_OCTAL or MAP_INVALID_UTF8_TO_PUA was used.
Steve Lamerton [Sun, 14 Aug 2011 12:15:34 +0000 (12:15 +0000)]
Rename wxWebFileHandler to wxWebViewArchiveHandler, wxWebHandler to wxWebViewHandler. Update the documentation and the sample. Add a constructor taking a wxString to specify the scheme in wxWebViewHandler.
Vadim Zeitlin [Sat, 13 Aug 2011 13:54:26 +0000 (13:54 +0000)]
Fix bitmap position attribute name in XRC handler.
Bitmap position attribute was called "bitmapposition" in the documentation and
in the code that generated an error message for a wrong value in it but was
inexplicably called "direction" in the code that really looked it up.
This seems to be just a straight typo from the original r61065. Surprising as
it is that it wasn't noticed before, do correct it now.
Vadim Zeitlin [Fri, 12 Aug 2011 14:09:41 +0000 (14:09 +0000)]
No changes, just remove gratuitous inefficiency from generic wxDVC.
Don't return wxDataViewMainWindow::m_selection array by value, returning a
const reference to it is enough and avoids completely unnecessary memory
allocations and copying of potentially large amounts of data.
Also make wxDataViewMainWindow::GetSelections() const.
Vadim Zeitlin [Fri, 12 Aug 2011 14:09:37 +0000 (14:09 +0000)]
Fix compilation of generic wxDVC code when not using STL containers.
wx sorted containers don't implement iterators so use indices to iterate over
wxDataViewMainWindow::m_selection, just as r68613 already did in another place.
Vadim Zeitlin [Thu, 11 Aug 2011 10:56:05 +0000 (10:56 +0000)]
Use separate strings for stock labels with and without mnemonics.
Obtaining the string without mnemonics by simply removing "&" characters from
the string containing mnemonics doesn't work for some languages, notably
Chinese where the convention is to use "Chinese Text (&M)" for the labels with
"M" being the ASCII mnemonic and just "Chinese Text" and not "Chinese Text (M)"
should be used if wxSTOCK_WITH_MNEMONIC flag is not specified.
Fix the fundamental problem by using separate strings for the two cases.
Translations still need to be updated to really correct the labels appearance.
Since r68621 dataview.cpp didn't compile anymore (at least with wxOSX-Carbon). Fixed by explicitly using wxDataViewItem's void * constructor in a few cases.
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.