Commit Graph

51298 Commits

Author SHA1 Message Date
Francesco Montorsi
a05e050bd4 remove wxFileConfig tests: FileConfigTestCase already tests features tested by console sample and is much more complete.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 14:51:45 +00:00
Francesco Montorsi
3634064463 Move some wxPrintf() tests (taken from glibc) to VsnprintfTestCase. Other tests are more difficult to convert in CppUnit style and not worth the effort (since now we don't use wx's own vsnprintf implementation anymore typically).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 14:42:26 +00:00
Francesco Montorsi
7b8ccf3321 Move wxRegConfig tests from console sample to a new wxRegConfigTestCase class.
Remove wxRegKey tests from console sample: on newer Windows they only work when run with admin privileges; also we can expect wx[Reg]ConfigTestCase to already check a good number of wxRegKey features.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 14:12:07 +00:00
Francesco Montorsi
df693ed65c Make wxConfig ctor docs more readable.
Add a simple stub for wxRegConfig class so that Doxygen highlights it just like it does with wxFileConfig.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 13:53:12 +00:00
Vadim Zeitlin
bbdee10d5f Fix recently broken forwarding of events between event handlers.
After the recent changes to the event processing logic, forwarding an event
from one event handler to another one stopped working correctly because the
per-event "process here only" flag prevented it from following the event
handler chain after forwarding. This notably broke keyboard navigation in
wxComboCtrl under MSW in wx itself and probably quite a few of other things in
user code.

Fix this by replacing the boolean flag with a pointer to the handler to which
the processing of this event should be restricted. This allows the full
processing to still take place if an event is forwarded to another handler.
So wxEvent::ShouldProcessHereOnly() is now called ShouldProcessOnlyIn() and
takes a wxEvtHandler parameter.

This made appear a problem in wxScrollHelperEvtHandler code that was hidden by
the bug above: the events were still processed multiple times in it. To fix
this, also add wxEvent::DidntHonourProcessOnlyIn() and take it into account in
the base class code. Did I mention that wxScrollHelperEvtHandler must die?

Add another unit test checking that forwarding works correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 11:58:31 +00:00
Vadim Zeitlin
ce6b1014bf Fix drawing of scaled bitmaps in wxCairoContext.
We must offset the coordinate system before scaling it, otherwise incorrect
offset is used.

Add a test for drawing translated/scaled bitmaps to the drawing sample.

See #11097.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 11:58:25 +00:00
Vadim Zeitlin
5db56cd2e7 Don't hard code position of the drawing sample window and increase its size.
Hardcoding position to 50,50 is inconvenient, let the window manager position
the window as configured by user. Also, the vertical size of the sample was
too small to see the contents of most pages, increase it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 11:58:21 +00:00
Vadim Zeitlin
80d7019761 Remove unused GetTextExtent() call from wxProgressDialog.
This seems to be a left-over from the old, manual positioning code. As we use
sizers now, it's not needed any more.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 11:58:16 +00:00
Francesco Montorsi
20ba398d1a disable FTPTestCase by default.
Add a warning for the user when running --list without arguments: not all tests are listed, only those enabled by default (e.g. FTPTestCase doesn't appear there)!


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 10:49:44 +00:00
Jaakko Salli
87b3708781 Interpret arrow keys correctly in wxMSW wxComboCtrl::IsKeyPopupToggle() (fixes #12114)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-01 15:31:05 +00:00
Jaakko Salli
db3d75435a In wxComboPopupEvtHandler::OnMouseEvent(), when need to relay event to drop-down button, call HandleButtonMouseEvent() directly, if possible. This is less confusing for the platform-specific wxComboCtrl implementations, and fixes issue where the drop-down button could remain in pressed state after the mouse button was lifted.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-01 15:01:59 +00:00
Jaakko Salli
063155781d For clarity: wxComboPopupExtraEventHandler -> wxComboPopupEvtHandler (there is nothing particularly extra about it)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-01 14:17:32 +00:00
Jaakko Salli
4794626d03 Refactored wxComboPopupExtraEventHandler::OnMouseEvent(). Now block mouse events from the popup control until mouse button has been seen in 'up' state (ignoring first mouse up). This matches Windows native combo box behavior (fixes #12115).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-01 13:46:14 +00:00
Vadim Zeitlin
76e1326add Update AUI floating windows position and not just size on resize.
When a window is resized, its position can change as well as its size but it
wasn't updated before. Do it now.

Closes #11421.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-31 14:59:18 +00:00
Vadim Zeitlin
6695aca2e2 Regenerate wxstd.pot with the recently added translatable strings.
Simply reran "make wxstd.pot" in locale subdirectory.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-31 14:59:13 +00:00
Vadim Zeitlin
b27367a5bd Don't disable wxID_PRINT_SETUP even when there is no active document.
Printer can be setup without active document, remove the EVT_UPDATE_UI handler
for wxID_PRINT_SETUP.

See #11394.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-31 14:59:08 +00:00
Vadim Zeitlin
6c4da6d611 Translate strings used in doc-view printing code.
Simply use _() instead of wxT() for the user-visible strings.

Closes #12110.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-31 14:59:03 +00:00
Vadim Zeitlin
7e22c2bd02 Use C locale for numbers in wx(File)Config.
Using the current locale decimal point in config files results in problems
when moving the files to another machine or even using a different locale on
the same one, so don't do it.

Always write the numbers using C locale and try to read them in C locale too
first, but also try the current locale if we failed for backwards
compatibility and to be tolerant with users who edit their config files by
hand.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-31 11:55:53 +00:00
Vadim Zeitlin
951201d81c Add wxString::FromDouble() and FromCDouble().
wxString::FromCDouble() is needed inside wxWidgets itself to format numbers
independently of the current locale. FromDouble() was added for symmetry with
ToDouble/ToCDouble() functions.

Use std::locale for the implementation if available and manual wxLocale-based
fallback otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-31 11:55:48 +00:00
Vadim Zeitlin
105993f7b6 Make wxString::ToCXXX() methods always available.
We use these methods inside wxWidgets itself and so want to always have them,
even when wxUSE_XLOCALE==0. Provide replacement manual implementations for
this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-31 11:55:41 +00:00
Vadim Zeitlin
1a39b0131f No real changes, just avoid an unnecessary heap allocation in a test.
We don't need to allocate the locale object in StringTestCase::ToDouble() on
the heap (and then delete it -- or not, if an assertion fails before the
function end), it's enough and simpler to just create it as a local variable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-31 11:55:37 +00:00
Vadim Zeitlin
cd49ac33b3 Fix wxFont::IsFixedWidth() under MSW to always return correct result.
This function worked erratically, returning the correct result or not
depending on the way it was created. Reimplement it using GetTextMetrics() to
get the correct result in any case.

Closes #4714.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 23:28:59 +00:00
Francesco Montorsi
7cfac8c83a Add a simple example to make it easier to get started (by copy&paste).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 23:28:51 +00:00
Francesco Montorsi
ed0dd9c1f0 implement * and / operators for wxPoint, not only wxSize.
Add to their documentation a note about the fact that the real operators are not class members but rather global functions.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 23:28:14 +00:00
Vadim Zeitlin
f68e16c5fc Add <span> tag and limited support for CSS styles to wxHTML.
Parse "style" attributes of the HTML tags and honour those of them that can be
mapped to the HTML 3 attributes.

Also add a handler for <span> tag.

Closes #10631.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 23:12:25 +00:00
Vadim Zeitlin
c9554803fa No changes, just rebaked and reran autoconf.
It seems that autoconf_inc.m4 hadn't been regenerated by a previous change as
rerunning bakefile_gen resulted in a lot of changes in it, do it now without
any other changes to ensure that the next commit only contains the changes due
to its modification of files.bkl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 20:05:56 +00:00
Vadim Zeitlin
8325504f4b Activate the view of a newly created document.
This appears to be necessary under Mac where views are top level windows and
should do no harm elsewhere.

Also factor out the activation code in a new wxDocManager::ActivateDocument()
method to avoid duplicating it.

Closes #11417.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 20:05:44 +00:00
Vadim Zeitlin
b99017ce20 Store page setup data in wxDocManager.
Printing of documents from wxDocManager always used default page setup data,
allow the user to configure it now.

Add wxDocManager::m_pageSetupDialogData and add a handler for wxID_PRINT_SETUP
command to it.

Closes #11394.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 20:05:39 +00:00
Vadim Zeitlin
65052c6fa7 Don't generate AUINOTEBOOK_BG_DCLICK when clicking inactive arrow.
Clicking on a disabled arrow shouldn't do anything, in particular it shouldn't
generate a wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK event.

See #12084.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 20:05:34 +00:00
Robert Roebling
9c76b9afa9 Patch update, probably fixes #12090: wxGTK cursor handling revamp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 20:01:36 +00:00
Robert Roebling
dec7b5a808 Use GTKXXX notation for some more wxGTK specific methods for consistency
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 17:45:40 +00:00
Václav Slavík
0d373eac1d wxrc -g should output filenames in Unix format.
It is customary in C source code and xgettext has problems with
backslahes in #line comments.

Fixes #10727.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 16:53:20 +00:00
Julian Smart
a216dfa2c1 Caret position corrected to end of selection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 14:00:35 +00:00
Václav Slavík
4a0dcc87af Fix Shift+TAB navigation from wxNotebook.
When the focus was on a tab label, Shift+TAB didn't move it out of the
notebook to the preceding control, as it should. Instead, focus moved to
the last control in the current notebook page.

This change fixes it, TAB and Shift-TAB cycling through controls now
behaves identically modulo direction.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 12:21:49 +00:00
Paul Cornett
375efc1fce Remove pizza backing window.
When it is present, no-window widgets sometimes don't get expose events for
reasons I could not determine. And it is dubious that it improved scrolling
performance on modern hardware anyway, and almost certainly doesn't help now
that GTK+ is using "client side windows".


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 06:38:28 +00:00
Vadim Zeitlin
6305f044a1 Add "filter changed" event to wxFileCtrl.
Generate an event when the selection in the filter combobox of wxFileCtrl
changes.

Closes #12099.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 10:35:47 +00:00
Vadim Zeitlin
384859f8c6 Add wxConfig::Read(float *) overload.
This uses Read(double *) but casts the result to float after checking that it
is in the correct range.

Closes #12100.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 10:35:38 +00:00
Vadim Zeitlin
84f4eef892 Show OLE errors using wxLogDebug() in wxAutomationObject.
Enable the previously commented out ShowException() but use wxLogDebug() in it
instead of wxLogWarning() to avoid confusing the users with errors they don't
care about.

Closes #11632.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 10:35:30 +00:00
Jaakko Salli
47450ed137 Fixed assert when editing wxFontProperty with unspecified value (fixes #12086)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 10:01:35 +00:00
Francesco Montorsi
7a165f2dc6 remove test code for wxScopeGuard (there's already a better ScopeGuardTestCase)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 08:22:34 +00:00
Francesco Montorsi
30ccbb8944 remove wxCmdLineParser tests; there is already a much more complete test suite (CmdLineTestCase).
Refactor single instance checker test.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 08:20:46 +00:00
Francesco Montorsi
61304c6209 get rid of socket tests; there are marked as broken and we already have SocketTestCase in CppUnit test classes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 08:00:50 +00:00
Francesco Montorsi
ec0e093913 move all non-interactive FTP tests from the console sample to a new CppUnit FTPTestCase test.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 07:56:08 +00:00
Francesco Montorsi
9d90f08bed Add examples of usage for easy copy-and-paste.
Minor corrections and markup changes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-28 20:31:45 +00:00
Jouk Jansen
dfe77b113f Update configuration for wxX11 on OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-28 13:31:41 +00:00
Jaakko Salli
eb7117d978 In wxComboPopupExtraEventHandler::OnMouseEvent(): Also include wxEVT_LEFT_UP among the mouse events to be blocked when the cursor is outside the popup area. This fixes wxMSW bug where the popup disappears immediately after mouse button is released (see #12087).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-27 20:03:07 +00:00
Vadim Zeitlin
62b91200c7 Ignore "%*" in the shell command strings in MSW registry.
Apparently "%*" can be used now in addition to the usual "%1" in the MSW shell
command strings. As we don't support passing more than one file to a command
at once anyhow, simply ignore them. At least this avoids errors when trying to
open files with some extensions.

Closes #12091.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-27 17:07:46 +00:00
Vadim Zeitlin
1922588894 Fall back on using tree/list control item text in wxDragImage.
Use the item text instead of its image if it doesn't have any when creating a
wxDragImage from a wxTreeCtrl or wxListCtrl item instead of just failing.

Closes #4390.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-27 17:07:40 +00:00
Vadim Zeitlin
7f4f5e8c24 Correct wxEVT_AUXn_XXX event types names.
They had a wrong "MOUSE" part in them while "MOUSE" is only used for the event
table macros but not the event types themselves for some reason.

Closes #12095.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-27 17:07:35 +00:00
Vadim Zeitlin
7bad1010c2 Add missing samples to samples.dsw.
Add all the samples to the workspace file to allow building all of them at
once easily.

Closes #12098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-27 17:07:30 +00:00