Vadim Zeitlin [Fri, 20 Jan 2012 23:18:29 +0000 (23:18 +0000)]
Update the message catalog charset expected by the unit test.
The charset of the message catalog files changed to UTF-8 in r70411 but the
unit test still expected ISO-8859-1. Update the unit test too to make it pass
again.
Vadim Zeitlin [Fri, 20 Jan 2012 22:11:55 +0000 (22:11 +0000)]
Fix time zone in wxDateTime::UNow().
The internal wxDateTime representation is in the UTC, so use
wxGetUTCTimeMillis() in UNow(), using wxGetLocalTimeMillis() made it
inconsistent with Now() and wrong.
Vadim Zeitlin [Fri, 20 Jan 2012 22:11:51 +0000 (22:11 +0000)]
Ensure wxCharTypeBuffer data is NUL-terminated after extend() call.
As wxCharTypeBuffer ctor taking the length NUL-terminates the buffer, it may
be expected that extend() does the same but it did not. Do add the NUL at the
end for consistency, even though it's not really needed for the existing code
using extend() in wxWidgets itself.
Vadim Zeitlin [Fri, 20 Jan 2012 22:11:47 +0000 (22:11 +0000)]
Fix documentation of wxConfig::Read(float*) overload.
Grouping methods using "//@{" and "//@}" apparently doesn't work and
completely wrong documentation is used in this case, so document the two
overloads separately, as it's done for the other methods.
Vadim Zeitlin [Fri, 20 Jan 2012 22:11:44 +0000 (22:11 +0000)]
Add error checking when retrieving client data from wxMSW wxListBox.
Verify if retrieving client data failed which might happen if the index
is invalid for example. This makes code more robust and also consistent with
wxChoice.
Vadim Zeitlin [Fri, 20 Jan 2012 22:11:39 +0000 (22:11 +0000)]
Check that an error really occurred when getting wxChoice data in wxMSW.
We could wrongly return NULL client data if -1 was stored as client data in
wxChoice because it's the same value as CB_ERR and we always interpreted it as
an error, while it may not be one if GetLastError() doesn't indicate it.
Vadim Zeitlin [Fri, 20 Jan 2012 22:11:32 +0000 (22:11 +0000)]
Destroy modeless wxGenericAboutDialog when it is closed.
Don't leave the wxGenericAboutDialog object alive when non-modal about dialog
(as can be used under GTK and OS X) is closed. This is wasteful and, worse,
resulted in the program not exiting after such a dialog was shown because it
counted as a remaining open top level window.
This also fixes the same bug in wxGTK when using GTK+ 2.4.
MS and Apple guidelines mention ellipses should generally be used when a command needs additional information from the user before the operation can execute. This is not the case for showing an about dialog so the ellipses have been removed.
Vadim Zeitlin [Fri, 20 Jan 2012 12:30:08 +0000 (12:30 +0000)]
Try to avoid truncation of the message in wxMSW wxMessageDialog.
Use (documented but undefined) TDF_SIZE_TO_CONTENT flag under Windows Vista/7
to reduce the chance that Windows truncates or ellipsizes the message text if
it can't wrap it.
Truncation can still happen for very long words but there doesn't seem to be
any drawbacks to using TDF_SIZE_TO_CONTENT and it does avoid truncation in at
least some cases.
This also improves the situation for wxRichMessageDialog and wxProgressDialog.
Vadim Zeitlin [Wed, 18 Jan 2012 23:12:03 +0000 (23:12 +0000)]
Skip EVT_RIGHT_UP event in wxHtmlWindow if it wasn't handled.
This fixes generation of EVT_CONTEXT_MENU for mouse clicks in wxHtmlWindow
under MSW: it wasn't generated before because we always ate the right mouse
clicks.
Vadim Zeitlin [Wed, 18 Jan 2012 19:42:58 +0000 (19:42 +0000)]
Avoid needless second string conversion when adding files to memory FS.
Create the buffer holding the result of conversion instead of converting
twice, once to only get the length of the result and the second time to get
the data.
Vadim Zeitlin [Wed, 18 Jan 2012 17:26:23 +0000 (17:26 +0000)]
Don't auto-link with 3rd party libraries in DLL build using MSVC.
It's unnecessary to link with these libraries as they're already embedded
inside our DLLs and the functions from them can't be used anyhow as they're
not declared as DLL-exported in the libraries headers.
Václav Slavík [Tue, 17 Jan 2012 14:05:17 +0000 (14:05 +0000)]
Replace wxDataViewCtrl::StartEditor() with EditItem().
This is more consistent with other wxDVC methods (taking column pointer
as its argument) and other DVC-like classes where the name EditLabel()
is used for similar purposes.
The script or application in this file was used to set the file type for CodeWarrior projects on the Mac. Since that IDE is not supported anymore and OS X is moving away from file and creator types the file can be deleted.
Fixed keyboard navigation in generic tree control.
Under MSW any cursor key presses would not be handled by the generic tree control (and it would lose focus). Added the style wxWANTS_CHARS to the creation of wxGenericTreeCtrl to fix keyboard navigation.
Vadim Zeitlin [Mon, 16 Jan 2012 13:37:18 +0000 (13:37 +0000)]
Only return the requested data from generic wxListCtrl::GetItem().
For compatibility with MSW, only return the data that was requested by the
item mask from wxListCtrl::GetItem(). This harmonizes the behaviour between
all ports.
Steve Lamerton [Sun, 15 Jan 2012 19:19:00 +0000 (19:19 +0000)]
Implement IDocHostUIHandler in wxWebViewIE to improve the default behaviour. Disable built-in keyboard handlers, remove the 3D border and enable themes.
Václav Slavík [Sun, 15 Jan 2012 17:45:14 +0000 (17:45 +0000)]
Don't crash if XRC file contains '_' at the end of a string.
Parsing code for translating between '_' and '&' didn't properly handle
the case when the input was malformed and '_' wasn't followed by either
another '_' or another character. Added a check to guard against this.
Vadim Zeitlin [Sun, 15 Jan 2012 14:46:41 +0000 (14:46 +0000)]
Remove wxMGL port.
The company behind MGL toolkit (SciTech) doesn't exist since several years and
this port is not used by anybody, so remove it to ease maintenance burden.
Vadim Zeitlin [Sun, 15 Jan 2012 13:41:17 +0000 (13:41 +0000)]
Implement wxMenuBar::EnableTop() for wxMSW and wxGTK.
This method was only available in wxUniv before and just always returned true
in the other ports. Implement it for wxMSW and wxGTK too now and document it.
Also add a unit test.
Vadim Zeitlin [Sun, 15 Jan 2012 01:05:28 +0000 (01:05 +0000)]
Remove Palm OS port.
The platform targeted by this port doesn't exist any more and the port never
achieved really working state so remove the code to avoid having to maintain
it.
Vadim Zeitlin [Sat, 14 Jan 2012 17:57:11 +0000 (17:57 +0000)]
Fix the size of the font returned from wxTextCtrl::GetStyle() in wxMSW.
Due to a typo the size was expressed in 1/10th of a point and not in points.
Fix this and add a unit test checking that GetStyle() returns the same font as
was set by SetStyle().
Vadim Zeitlin [Sat, 14 Jan 2012 17:57:08 +0000 (17:57 +0000)]
Update wxNotebook selection when user changes the page in wxOSX.
wxNotebook::m_selection was only updated if the selected page was changed
programmatically but not if it was done by the user. Do update it in this case
as well, it fixes generation of the events which was broken before because of
comparison of the new selection with the incorrect current selection value in
m_selection.
Vadim Zeitlin [Fri, 13 Jan 2012 11:36:33 +0000 (11:36 +0000)]
Call tzset() for all compilers before using time zone variable.
Changes of r66245 shouldn't have been specific to MSVC, we must call tzset()
when using any other compiler as well, otherwise time zone information can be
initially incorrect.
Vadim Zeitlin [Thu, 12 Jan 2012 18:15:12 +0000 (18:15 +0000)]
Correct wxDropSource constructors documentation.
The types of the arguments (wxCursor vs wxIcon) were inversed. Even though the
description correctly said that wxCursor version was used by MSW and wxIcon --
by wxGTK the converse was actually documented.
Fix this and also mention OS X.
Finally remove the unnecessary and useless destructor documentation.
Vadim Zeitlin [Wed, 11 Jan 2012 13:42:06 +0000 (13:42 +0000)]
Only declare wxDialog::SetWindowStyleFlag() when wxUSE_DIALOG_SIZEGRIP.
This method was only defined when wxUSE_DIALOG_SIZEGRIP==1 so avoid declaring
it when wxUSE_DIALOG_SIZEGRIP==0 to fix compilation in this case (i.e. under
Windows CE).
Vadim Zeitlin [Tue, 10 Jan 2012 23:11:39 +0000 (23:11 +0000)]
Fix UI in generic wxListCtrl when pressing cursor arrows while editing.
Pressing Up/Down keys while editing an item changed the selection but left the
in-place editing control on the previously selected item which was just wrong.
Ignore these keys to avoid it.
Notice that there is an underlying bug somewhere in wxGTK because we shouldn't
be getting these events in the first place while the in-place editing text
control has focus but it doesn't seem easy to fix so work around it here.
Fixed clicking on MSW slider not changing value with small ranges.
If the range was 9 or less the SetPageSize call would pass a page size of 0, resulting in the value not being changed when clicking on the slider area (outside the thumb). Fix this by at least passing a page size of 1 to SetPageSize.