wxWidgets.git
13 years agoGenerate unshifted Unicode key codes in wxEVT_KEY_XXX events in wxGTK.
Vadim Zeitlin [Sat, 11 Sep 2010 10:19:07 +0000 (10:19 +0000)] 
Generate unshifted Unicode key codes in wxEVT_KEY_XXX events in wxGTK.

wxGTK generated wxEVT_KEY_XXX with key codes corresponding to the unshifted
state of the key (except for the letters) but Unicode key codes corresponding
to the current shift state. This was inconsistent with wxMSW and also with the
idea that key events, unlike char ones, don't depend on the modifiers states.

Change wxGTK to behave as wxMSW and use unshifted values for Unicode key codes
as well.

Remove the now unnecessary workaround for different key event Unicode codes
from test.

Also try to explain the difference between normal and Unicode keys and key and
char events even better and mention that the Unicode key codes for the key
events are also untranslated in the documentation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix generation of key events for non-alphabetic keys under Windows.
Vadim Zeitlin [Sat, 11 Sep 2010 10:19:02 +0000 (10:19 +0000)] 
Fix generation of key events for non-alphabetic keys under Windows.

Don't hardcode the values of VK_OEM_XXX keys which are completely nonsensical
on keyboards with non-US layouts. Use the real unshifted value of the key as
its key code instead -- at least if it's a Latin-1 character. Otherwise, use
WXK_NONE as the key code and pass the character generated by the key as
Unicode character code.

Also generate WXK_NONE events for dead keys to avoid confusing them with the
corresponding normal key events.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoImprove printing out of pressed keys in the keyboard sample.
Vadim Zeitlin [Sat, 11 Sep 2010 10:18:57 +0000 (10:18 +0000)] 
Improve printing out of pressed keys in the keyboard sample.

Add missing elements of wxKeyCode enum ("Windows" and "Command" keys) to the
GetVirtualKeyCodeName() function in the sample.

Also output "unknown" and not blank for WXK_NONE.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRename wxCharCode{MSWToWX,WXToMSW}() and move them to a separate header.
Vadim Zeitlin [Sat, 11 Sep 2010 10:18:53 +0000 (10:18 +0000)] 
Rename wxCharCode{MSWToWX,WXToMSW}() and move them to a separate header.

These functions were confusingly named as they work with MSW (virtual) key
codes and not character codes, rename them to better indicate what they do.
They also don't need to be in wx/msw/window.h included by all wx code when
they are only really needed in a couple of files, so move them to a private
header.

No changes in behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFixes to key codes in keyboard events generated by wxMSW.
Vadim Zeitlin [Sat, 11 Sep 2010 10:18:47 +0000 (10:18 +0000)] 
Fixes to key codes in keyboard events generated by wxMSW.

Only set Unicode key code if the event corresponds to a character key and set
it to (newly added) WXK_NONE for the other ones to avoid nonsensical values in
it for e.g. "Home" key presses.

Also set non-Unicode key to WXK_NONE for the characters that can't be
represented in the current locale. This is consistent with wxGTK and avoids
conflicts between special key values and Unicode keys.

Clearly document the above behaviour.

Notice that implementing the correct behaviour in wxMSW involved untangling
previously interwoven WM_KEY{DOWN,UP} and WM_CHAR messages handlers. Clearly
separate them now as they get different input (key codes for the former,
characters for the latter) and especially don't try to convert from both kinds
of input using a single wxCharCodeMSWToWX() function. As this function doesn't
need to distinguish between keys and characters any more it can simply return
the converted value in all cases instead of returning 0 sometimes to indicate
a character value instead of a key. Simplify the code using this function
accordingly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd WXK_NONE symbolic constant indicating absence of a key.
Vadim Zeitlin [Sat, 11 Sep 2010 10:18:41 +0000 (10:18 +0000)] 
Add WXK_NONE symbolic constant indicating absence of a key.

wxKeyEvent::GetKeyCode() and GetUnicodeKey() return 0 to indicate that the key
code or Unicode character is not available, give symbolic name to this 0 to
make the code using these methods more clear.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoNo real changes, just use KF_EXTENDED instead of hard-coded bit mask.
Vadim Zeitlin [Sat, 11 Sep 2010 10:18:35 +0000 (10:18 +0000)] 
No real changes, just use KF_EXTENDED instead of hard-coded bit mask.

KF_EXTENDED is defined in Windows headers as the mask for extracting the
"extended" bit from LPARAM of the keyboard messages. Use it instead of
explicitly writing less clear "1 << 24".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd a simple test for keyboard events generation.
Vadim Zeitlin [Sat, 11 Sep 2010 10:18:31 +0000 (10:18 +0000)] 
Add a simple test for keyboard events generation.

Check that the events generated by wxUIActionSimulator result in the same
wxKeyEvents being generated under all platforms. This is not the same as
checking the event generation for the actual keys pressed by the user as there
are some small differences between the two but better than nothing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoGenerate correct events for extended keys in wxMSW wxUIActionSimulator.
Vadim Zeitlin [Sat, 11 Sep 2010 10:18:25 +0000 (10:18 +0000)] 
Generate correct events for extended keys in wxMSW wxUIActionSimulator.

Simulating keys such as WXK_END resulted in WXK_NUMPAD_END event being
generated instead of the expected WXK_END one.

Fix this by returning from wxCharCodeWXToMSW() whether the key code is a
normal or extended one and use this to set KEYEVENTF_EXTENDEDKEY in
wxUIActionSimulator::DoKey().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRemember the last key event in wxGTK before passing it over to IM.
Vadim Zeitlin [Sat, 11 Sep 2010 10:18:19 +0000 (10:18 +0000)] 
Remember the last key event in wxGTK before passing it over to IM.

Save the last key event before calling IM filter to be able to get the correct
modifiers, timestamp, position &c to use for the CHAR event generated from IM
commit callback.

This restores the changes of r34504 which were reverted for unknown (or at
least unmentioned) reason in r34521.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoExplicitly send events for modifier keys in wxUIActionSimulator.
Vadim Zeitlin [Sat, 11 Sep 2010 10:18:15 +0000 (10:18 +0000)] 
Explicitly send events for modifier keys in wxUIActionSimulator.

Key down/up events for the modifiers were already explicitly sent under wxMSW
and wxOSX but not under wxGTK where, as the result, the corresponding events
were not generated at all.

Do send these events explicitly to make the events generation consistent under
all platforms now. This means that wxUIActionSimulator::DoKey() now generates
exactly one event everywhere.

Notice that the modifiers for the key events generated by the modifier keys
are also the same under all platforms now which is not the case for the events
actually generated by the user (wxMSW sets the corresponding bit for the
modifier key down event but not the key up one while wxGTK does exactly the
contrary). This should be fixed in the future so that wxUIActionSimulator
generates the same sequence of events as the user would and that it's still
the same for all platforms.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRemove assert checking for wxMOD_CONTROL from wxUIActionSimulator.
Vadim Zeitlin [Sat, 11 Sep 2010 10:18:10 +0000 (10:18 +0000)] 
Remove assert checking for wxMOD_CONTROL from wxUIActionSimulator.

It doesn't make sense to fail if modifiers parameter includes wxMOD_CONTROL
telling the caller to use wxMOD_CMD instead as the latter is exactly the same
as the former under non-Mac platforms.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd a convenient wxREGISTER_UNIT_TEST() macro.
Vadim Zeitlin [Sat, 11 Sep 2010 10:18:05 +0000 (10:18 +0000)] 
Add a convenient wxREGISTER_UNIT_TEST() macro.

This macro can be used to easily register a test following a standard naming
convention in both the global test suite and the test suite with the same name
as this test instead of having to use 2 different cppunit macros to do the
same thing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoNo real changes, just some small cleanup in wxMSW keyboard code.
Vadim Zeitlin [Sat, 11 Sep 2010 10:17:57 +0000 (10:17 +0000)] 
No real changes, just some small cleanup in wxMSW keyboard code.

No changes, just use more clear variable name ("keycode" instead of "id") and
anonymous namespace instead of static keyword.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agofixing 'main screen'
Stefan Csomor [Sat, 11 Sep 2010 09:20:28 +0000 (09:20 +0000)] 
fixing 'main screen'

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUse wxLocale::GetInfo() to get date format in wxDatePickerCtrlGeneric.
Vadim Zeitlin [Fri, 10 Sep 2010 19:42:23 +0000 (19:42 +0000)] 
Use wxLocale::GetInfo() to get date format in wxDatePickerCtrlGeneric.

Instead of trying (and failing) to manually decode the format used by "%x",
simply use wxLocale::GetInfo(wxLOCALE_SHORT_DATE_FMT) and just change "%y" to
"%Y" if necessary.

The new code is more than 10 times shorter and also gives correct results
unlike the old version.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't add spurious NULs at the end of wxTextDataObject text under OS X.
Vadim Zeitlin [Fri, 10 Sep 2010 19:28:52 +0000 (19:28 +0000)] 
Don't add spurious NULs at the end of wxTextDataObject text under OS X.

For some reason we added an extra NUL character to the data copied from
wxTextDataObject but this doesn't seem necessary because the Pasteboard API
is passed the correct data size and so the string doesn't need to be
NUL-terminated.

In fact, adding this NUL broke drag and drop between wx and native controls,
including the case of dropping text in our own wxTextCtrl as this uses its
built in support for dnd and not our code (the fact that we can't even set a
drop target for a wxTextCtrl is a separate bug). In this case we got a string
with an extra NUL in the control resulting in all sorts of hard to debug
problems.

So simply don't add the extra bytes, dnd works fine without them both between
wx windows and from/to another OS X applications.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoInitialize wxGenericProgressDialog button members in Init() too.
Vadim Zeitlin [Fri, 10 Sep 2010 17:26:11 +0000 (17:26 +0000)] 
Initialize wxGenericProgressDialog button members in Init() too.

wxGenericProgressDialog::m_btn{Abort,Skip} were not initialized neither which
resulted in crashes inside EnableAbort() which was called if the "Cancel"
button was pressed in a native MSW dialog but the dialog wasn't cancelled (and
hence the button needed to be reenabled).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix closing logic in wxMSW native wxProgressDialog.
Vadim Zeitlin [Fri, 10 Sep 2010 17:26:07 +0000 (17:26 +0000)] 
Fix closing logic in wxMSW native wxProgressDialog.

The dialog must always close if the C++ object was destroyed, independently of
whether it was cancelled or finished.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoBlock in wxMSW wxProgressDialog::Update(max) until the dialog is dismissed.
Vadim Zeitlin [Fri, 10 Sep 2010 17:26:03 +0000 (17:26 +0000)] 
Block in wxMSW wxProgressDialog::Update(max) until the dialog is dismissed.

For consistency with the generic version and because it makes more sense than
blocking in the dialog destructor (which is the only other alternative for the
dialogs without wxPD_AUTO_HIDE to work), we should block in Update() when the
maximal value is reached for dialogs without wxPD_AUTO_HIDE style until the
dialog is dismissed.

Document this behaviour even more clearly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix errors in handling of maximum field in wxGenericProgressDialog.
Vadim Zeitlin [Fri, 10 Sep 2010 17:25:58 +0000 (17:25 +0000)] 
Fix errors in handling of maximum field in wxGenericProgressDialog.

Provide a SetMaximum() function for setting just m_maximum and return its
value from GetRange() instead of using m_gauge->GetRange() which doesn't work
when the native MSW version is used nor when the range is > USHRT_MAX under
MSW in any case.

More generally, this should fix a lot of bugs for progress dialogs using such
range as the values were not interpreted correctly in many places.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRename wxGenericProgressDialog::ProgressDialogState to just State.
Vadim Zeitlin [Fri, 10 Sep 2010 17:25:53 +0000 (17:25 +0000)] 
Rename wxGenericProgressDialog::ProgressDialogState to just State.

Repeating "ProgressDialog" twice is redundant.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoNo changes, just use less long progress dialog states names.
Vadim Zeitlin [Fri, 10 Sep 2010 17:25:45 +0000 (17:25 +0000)] 
No changes, just use less long progress dialog states names.

We can refer to them using wxProgressDialog class name and not the base
wxGenericProgressDialog so do this as it is shorter and more clear because
these states have nothing to do with the generic version when used by the
native MSW implementation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUse determinate mode in native wxMSW wxProgressDialog by default.
Vadim Zeitlin [Fri, 10 Sep 2010 17:25:41 +0000 (17:25 +0000)] 
Use determinate mode in native wxMSW wxProgressDialog by default.

The dialog was created in indeterminate ("marquee") mode for some reason.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd a possibility to show a progress dialog on dialog sample startup.
Vadim Zeitlin [Fri, 10 Sep 2010 17:25:35 +0000 (17:25 +0000)] 
Add a possibility to show a progress dialog on dialog sample startup.

Add a command line option to the dialogs sample to allow testing of different
wxProgressDialog styles more easily. This also tests for showing them before
the main event loop is started (see r65499).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't use wxGenericProgressDialog::m_windowStyle for wxPD_XXX styles.
Vadim Zeitlin [Fri, 10 Sep 2010 17:25:28 +0000 (17:25 +0000)] 
Don't use wxGenericProgressDialog::m_windowStyle for wxPD_XXX styles.

Storing progress dialog styles in the normal window style didn't work because
they clashed with the TLW styles. The original progress dialog implementation
worked around this by using separate m_has{Abort,Skip}Button variables instead
of relying on wxPD_CAN_{ABORT,SKIP} style bits but this didn't work for the
other styles and was unclear so the new native MSW implementation blithely
used m_windowStyle to test or them and other bits which didn't work at all,
see #12416.

Solve this by using a separate m_pdStyle variable for storing the progress
dialog styles and use it for all wxPD_XXX tests in both the generic and MSW
code. This fixes some bugs (although not all of them yet) and allows to get
rid of m_has{Abort,Skip}Button.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoadjusting to new gui mutex for osx, see #12411
Stefan Csomor [Fri, 10 Sep 2010 13:41:50 +0000 (13:41 +0000)] 
adjusting to new gui mutex for osx, see #12411

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoCreate temporary wxEventLoop in wxGenericProgressDialog if needed.
Vadim Zeitlin [Fri, 10 Sep 2010 11:44:46 +0000 (11:44 +0000)] 
Create temporary wxEventLoop in wxGenericProgressDialog if needed.

wxGenericProgressDialog needs to have an active event loop in order to repaint
itself and process clicks on its buttons but it's more helpful to create a
temporary event loop if there is no currently active one instead of just
asserting. In particular, this allows to use wxProgressDialog from overridden
wxApp::OnInit().

Add temporary event loop creation and remove the now unnecessary asserts
verifying that there is an active event loop as there always will be one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoInitialize wxGenericProgressDialog::m_winDisabler properly.
Vadim Zeitlin [Fri, 10 Sep 2010 11:44:40 +0000 (11:44 +0000)] 
Initialize wxGenericProgressDialog::m_winDisabler properly.

This field wasn't initialized by Init() which might have been harmless
considering the current code structure but still untidy, do set it to NULL
there.

Also move the forward declaration of wxWindowDisabler class in
wx/generic/progdlgg.h to the top of the file for consistency with the other
forward declarations.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't return false from IsOk() for accelerators without flags.
Vadim Zeitlin [Fri, 10 Sep 2010 11:44:35 +0000 (11:44 +0000)] 
Don't return false from IsOk() for accelerators without flags.

wxAcceleratorEntry::IsOk() checked for m_flags != 0 for some reason. Simply
remove this test.

See #12444.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix infinite loop in wxDateTime::Format() when fields width was used.
Vadim Zeitlin [Thu, 9 Sep 2010 22:20:12 +0000 (22:20 +0000)] 
Fix infinite loop in wxDateTime::Format() when fields width was used.

Just add a missing increment of the loop variable.

See #12451.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix cast of pointer to int in artprov sample.
Vadim Zeitlin [Thu, 9 Sep 2010 22:20:07 +0000 (22:20 +0000)] 
Fix cast of pointer to int in artprov sample.

This prevented the sample from building when using MinGW-64 and also probably
prevented it from working correctly on other 64-bit systems.

Closes #12453.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoInitialize all fields of struct tm used by wxDateTime::Format().
Vadim Zeitlin [Thu, 9 Sep 2010 21:57:52 +0000 (21:57 +0000)] 
Initialize all fields of struct tm used by wxDateTime::Format().

Passing not fully initialized struct tm to strftime() results in Valgrind
errors and possible nastiness, see #12455.

Simply use memset() to set all fields of this system-dependent struct to 0
initially.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix wxKill(wxSIGNONE) always returning true for child processes in wxMSW.
Vadim Zeitlin [Thu, 9 Sep 2010 21:49:44 +0000 (21:49 +0000)] 
Fix wxKill(wxSIGNONE) always returning true for child processes in wxMSW.

The fact that a handle to a process can be opened doesn't mean that the
process is still running. In fact, for a child process that we store a handle
for ourselves we will always be able to open (another copy of the) handle even
if it already terminated.

Check for the process termination using WaitForSingleObject() instead in both
normal and wxSIGNONE cases.

Also simplify the code by not using GetExitCodeProcess() at all as we don't
need the process exit code.

Closes #2834.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRemember last values used in exec sample "Kill" menu item dialogs.
Vadim Zeitlin [Thu, 9 Sep 2010 21:49:25 +0000 (21:49 +0000)] 
Remember last values used in exec sample "Kill" menu item dialogs.

Remember the PID entered in the dialog and also remember the last used signal
number. This makes these dialogs slightly less painful to use when testing
even though ideally we'd have a single dialog for choosing both values instead
of two consecutive modal dialogs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoVery minor fixes to wxKill() documentation.
Vadim Zeitlin [Thu, 9 Sep 2010 21:49:07 +0000 (21:49 +0000)] 
Very minor fixes to wxKill() documentation.

Fix "the the" typo.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUse minimal required process access mask in wxMSW wxKill().
Vadim Zeitlin [Thu, 9 Sep 2010 21:48:48 +0000 (21:48 +0000)] 
Use minimal required process access mask in wxMSW wxKill().

We don't need PROCESS_TERMINATE permission if we are not going to call
TerminateProcess() for it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't filter out Cairo libraries from GTK libraries list in configure.
Vadim Zeitlin [Thu, 9 Sep 2010 20:59:10 +0000 (20:59 +0000)] 
Don't filter out Cairo libraries from GTK libraries list in configure.

This undoes the hack of r35357 which surreptitiously removed all Cairo
libraries from the GTK libraries list. This shouldn't be necessary any more as
we use Cairo calls in our own code and so can't run without it anyhow and in
fact is even actively harmful as it results in linking errors under Fedora 13
(which seems to use a slightly different linker?).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUse the same logic for closing dialogs as for handling Escape key.
Vadim Zeitlin [Thu, 9 Sep 2010 20:53:26 +0000 (20:53 +0000)] 
Use the same logic for closing dialogs as for handling Escape key.

Pressing "Esc" key closed the dialog with only wxID_OK button (but no
wxID_CANCEL one) by default but pressing the "close window" button only closed
it if wxID_CANCEL was present.

Fix this by using the same code in OnCloseWindow() as in OnCharHook(), after
extracting it into the new SendCloseButtonClickEvent() method.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRemove the unused "monolithic" MSW wxMediaCtrl file.
Vadim Zeitlin [Thu, 9 Sep 2010 20:34:00 +0000 (20:34 +0000)] 
Remove the unused "monolithic" MSW wxMediaCtrl file.

The contents of this file was split over src/msw/mediactrl_{am,qt,wmp10}.cpp a
long time ago and this file is unused and not compiled into the library so
having it in the repository is useless and confusing -- remove it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoNo real changes, just don't use obsolete FORCE_LINK_ME in wxMediaCtrl.
Vadim Zeitlin [Thu, 9 Sep 2010 20:33:56 +0000 (20:33 +0000)] 
No real changes, just don't use obsolete FORCE_LINK_ME in wxMediaCtrl.

Use wxFORCE_LINK_THIS_MODULE() instead of the obsolete FORCE_LINK_ME.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoForce linking of all wxMSW wxMediaCtrl backends in mediactrl sample.
Vadim Zeitlin [Thu, 9 Sep 2010 20:33:51 +0000 (20:33 +0000)] 
Force linking of all wxMSW wxMediaCtrl backends in mediactrl sample.

Force the linker to include all the backends in the sample executable instead
of discarding them because they are not used directly to allow testing all of
them in the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoNo changes, just remove cruft from mediactrl sample.
Vadim Zeitlin [Thu, 9 Sep 2010 20:33:47 +0000 (20:33 +0000)] 
No changes, just remove cruft from mediactrl sample.

Remove the test for wxUSE_GUI together with the comment questioning its
presence.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRemove debugging wxLogMessage from wxMediaCtrl::Create().
Vadim Zeitlin [Thu, 9 Sep 2010 20:33:41 +0000 (20:33 +0000)] 
Remove debugging wxLogMessage from wxMediaCtrl::Create().

This was added apparently by mistake in r45478 and resulted in showing the
backend being used by the control in a message box whenever it was created
ever since.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't exclude "contrib" from wxMSW setup.exe generation.
Vadim Zeitlin [Thu, 9 Sep 2010 10:18:31 +0000 (10:18 +0000)] 
Don't exclude "contrib" from wxMSW setup.exe generation.

This was presumably needed to exclude the top level contrib directory but also
seems to apply to src/tiff/contrib and excluding this directory breaks
configuration of libtiff as it looks for src/tiff/contrib/Makefile.in.

As we don't even have top level contrib any more, simply don't exclude it any
longer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agouse svn:keywords instead of eol:keywords
Dimitri Schoolwerth [Thu, 9 Sep 2010 08:57:07 +0000 (08:57 +0000)] 
use svn:keywords instead of eol:keywords

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUnregister configure callback,part of #12447: wxGTK patch: Segfault on Drag&Drop
Robert Roebling [Wed, 8 Sep 2010 20:00:44 +0000 (20:00 +0000)] 
Unregister configure callback,part of #12447: wxGTK patch: Segfault on Drag&Drop

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoMake Xcode identifiers in generated project files be the same after each run.
Dimitri Schoolwerth [Wed, 8 Sep 2010 17:11:15 +0000 (17:11 +0000)] 
Make Xcode identifiers in generated project files be the same after each run.

From the AppleScript that composes the Xcode projects call a Python script that bases the identifiers on an associated name instead of being random each run like Xcode does. After the Python script reopen the project again in Xcode to have the identifiers sorted (Xcode wants them to be), resulting in the project.pbxproj file being completely different inside but in the IDE the order of files still will be the same.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUse correct Unicode define for wxScintilla compilation.
Vadim Zeitlin [Tue, 7 Sep 2010 21:37:22 +0000 (21:37 +0000)] 
Use correct Unicode define for wxScintilla compilation.

Compilation of wxScintilla with Borland failed because -D_UNICODE was not
passed on command line resulting in mismatches between wxChar and Windows
TCHAR. It's a mystery why this didn't happen with the other compilers but
defining _UNICODE for them too can't hurt.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoresetting the wrapper flag later, otherwise the native destructors dealloc too much...
Stefan Csomor [Tue, 7 Sep 2010 16:05:01 +0000 (16:05 +0000)] 
resetting the wrapper flag later, otherwise the native destructors dealloc too much, fixes #12448

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agomodeling subclassing along msw, unsubclassing filedialog at end of ShowModal, fixes...
Stefan Csomor [Tue, 7 Sep 2010 06:51:13 +0000 (06:51 +0000)] 
modeling subclassing along msw, unsubclassing filedialog at end of ShowModal, fixes #12236

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agousing non-sleep version for GUI mutex, solves #12411
Stefan Csomor [Mon, 6 Sep 2010 13:50:12 +0000 (13:50 +0000)] 
using non-sleep version for GUI mutex, solves #12411

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoSimplify ButtonTestCase::Bitmap. The old test was not correct as it tested all bitmap...
Steve Lamerton [Sun, 5 Sep 2010 13:31:13 +0000 (13:31 +0000)] 
Simplify ButtonTestCase::Bitmap. The old test was not correct as it tested all bitmaps to see if they were valid, however these do not get set by SetBitmap and so the tests only passed if the platform set valid defaults.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix typo from previous commit.
Steve Lamerton [Sun, 5 Sep 2010 13:14:14 +0000 (13:14 +0000)] 
Fix typo from previous commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoMove the second wxListBox sort test back to the ownerdrawn section and re-enable...
Steve Lamerton [Sun, 5 Sep 2010 13:11:42 +0000 (13:11 +0000)] 
Move the second wxListBox sort test back to the ownerdrawn section and re-enable it under wxGTK.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoWrap BitmapToggleButtonTestCase in a preprocessor check so compilation shouldn't...
Steve Lamerton [Sun, 5 Sep 2010 12:47:46 +0000 (12:47 +0000)] 
Wrap BitmapToggleButtonTestCase in a preprocessor check so compilation shouldn't fail on platforms that don't support it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRemove unused wxProgressDialogTaskRunner::m_parent field.
Vadim Zeitlin [Sat, 4 Sep 2010 13:33:40 +0000 (13:33 +0000)] 
Remove unused wxProgressDialogTaskRunner::m_parent field.

This seems to be a left over from old version of the code and is not used any
longer.

See #12414.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix crash in wxMSW wxProgressDialog without wxPD_APP_MODAL style.
Vadim Zeitlin [Sat, 4 Sep 2010 13:33:36 +0000 (13:33 +0000)] 
Fix crash in wxMSW wxProgressDialog without wxPD_APP_MODAL style.

Use the correct method to retrieve the parent window to disable and check that
this pointer is not NULL before dereferencing it.

Closes #12414.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoImprove main and extended messages handling in new wxMSW wxMessageDialog.
Vadim Zeitlin [Sat, 4 Sep 2010 13:33:29 +0000 (13:33 +0000)] 
Improve main and extended messages handling in new wxMSW wxMessageDialog.

Don't use the main message if there is no extended message: this looks bad as
the main message is emphasized to contrast with the extended one which doesn't
make sense visually if there is no extended message.

Also recognize the common use of wxMessageBox() with a multiline text composed
of the first string that plays the role of the main message with the rest
being the extended one and handle this appropriately automatically. This
results in a better appearance by default for a lot of message boxes,
including even the one in our own minimal sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd a link to Microsoft guidelines from wxICON_QUESTION documentation.
Vadim Zeitlin [Sat, 4 Sep 2010 09:36:25 +0000 (09:36 +0000)] 
Add a link to Microsoft guidelines from wxICON_QUESTION documentation.

Microsoft documentation provides explanations as to how the icons should be
used in the message dialogs which can be useful for people wondering which
icon style to use an when.

See #12417.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't link with long obsolete ctl3d32 library when using MinGW.
Vadim Zeitlin [Fri, 3 Sep 2010 22:48:44 +0000 (22:48 +0000)] 
Don't link with long obsolete ctl3d32 library when using MinGW.

ctl3d32 was used for Win16 development and is not used by wxMSW since many
years, don't link with it unnecessarily when using MinGW.

Also remove a FIXME comment about an issue which doesn't seem to need any
fixing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix wxOwnerDrawnComboBox keyboard navigation with duplicate items.
Václav Slavík [Fri, 3 Sep 2010 19:33:18 +0000 (19:33 +0000)] 
Fix wxOwnerDrawnComboBox keyboard navigation with duplicate items.

If the combobox contained duplicate strings (i.e. multiple items with the
same string value, but differing indexes), then navigating to the second
and subsequent ones skipped to the first occurence instead. We need to
preserve the index.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFixed wxscintilla compilation for wxDFB.
Václav Slavík [Fri, 3 Sep 2010 19:33:11 +0000 (19:33 +0000)] 
Fixed wxscintilla compilation for wxDFB.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix compilation under MinGW, also add missing SVN properties.
Steve Lamerton [Wed, 1 Sep 2010 15:25:01 +0000 (15:25 +0000)] 
Fix compilation under MinGW, also add missing SVN properties.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agowxRichTextCtrl::ApplyStyle now applies a paragraph style at the cursor
Julian Smart [Wed, 1 Sep 2010 14:48:54 +0000 (14:48 +0000)] 
wxRichTextCtrl::ApplyStyle now applies a paragraph style at the cursor
without needing a selection, and setting the default style now avoids duplicating
character attributes in subsequently typed text when they exist in the paragraph style.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoReduce flicker when removing wxNotebook page.
Václav Slavík [Wed, 1 Sep 2010 13:28:43 +0000 (13:28 +0000)] 
Reduce flicker when removing wxNotebook page.

wxMSW implementation hides all pages except the selected one. But when
removing selected page from the control, this invariant is temporarily
broken and this results in visible flicker. Hiding the page as soon as
it gets removed fixes it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUpdate wx_dll.dsw to include the ribbon library.
Vadim Zeitlin [Wed, 1 Sep 2010 09:48:24 +0000 (09:48 +0000)] 
Update wx_dll.dsw to include the ribbon library.

Add wx_ribbon project with dependency on core library.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd wxGrid::RefreshAttr() method to force attribute refresh.
Vadim Zeitlin [Mon, 30 Aug 2010 22:18:52 +0000 (22:18 +0000)] 
Add wxGrid::RefreshAttr() method to force attribute refresh.

A cached attribute may continue to be used even though the attribute returned
by a custom wxGridCellAttrProvider has changed so add a method to force wxGrid
to update the attribute by forgetting the cached copy.

Closes #12406.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't center wxGenericMessageDialog elements.
Vadim Zeitlin [Mon, 30 Aug 2010 21:48:25 +0000 (21:48 +0000)] 
Don't center wxGenericMessageDialog elements.

Centering doesn't seem to be appropriate on neither of the major platforms and
makes wxGenericMessageDialog and wxGenericRichMessageDialog which uses it look
even less native than otherwise.

Simply don't do it neither for the text nor, especially, for the buttons where
wxStdDialogButtonSizer already exists to take care of their alignment.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAllow using custom labels for wxGenericMessageDialog buttons.
Vadim Zeitlin [Mon, 30 Aug 2010 21:48:21 +0000 (21:48 +0000)] 
Allow using custom labels for wxGenericMessageDialog buttons.

Custom labels set for wxGenericMessageDialog buttons were simply ignored as it
used CreateSeparatedButtonSizer() to create the actual buttons which in turn
always used the standard labels.

Fix this by explicitly creating the buttons with custom labels if necessary.

This also fixes custom label support in wxGenericRichMessageDialog deriving
from this class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoExtract CreateSeparatedSizer() from wxDialog::CreateSeparatedButtonSizer().
Vadim Zeitlin [Mon, 30 Aug 2010 21:48:16 +0000 (21:48 +0000)] 
Extract CreateSeparatedSizer() from wxDialog::CreateSeparatedButtonSizer().

Extract the code adding a separating wxStaticLine to the sizer in its own
function to be able to reuse it in upcoming commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix button order in wxStdDialogButtonSizer in all cases under GTK.
Vadim Zeitlin [Mon, 30 Aug 2010 21:48:11 +0000 (21:48 +0000)] 
Fix button order in wxStdDialogButtonSizer in all cases under GTK.

The order of Yes/No/Cancel was recently fixed by the changes in r65346 but it
broke the order of the buttons in Ok/Cancel case. Ensure the correct order is
used in all cases now: the one described by GNOME HIG by default but different
order for the special case of Yes/No/Cancel which follows the native message
box.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRewrite GTK section of wxStdDialogButtonSizer using wxSizerFlags.
Vadim Zeitlin [Mon, 30 Aug 2010 21:48:06 +0000 (21:48 +0000)] 
Rewrite GTK section of wxStdDialogButtonSizer using wxSizerFlags.

Using wxSizerFlags makes the code shorter and more understandable but
otherwise there are no real changes in behaviour except for a minor fix to one
of the border which was wrong before.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFixed wrong line spacing calculation
Julian Smart [Mon, 30 Aug 2010 11:27:42 +0000 (11:27 +0000)] 
Fixed wrong line spacing calculation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't add space before para twice in paragraph layout
Julian Smart [Mon, 30 Aug 2010 08:47:23 +0000 (08:47 +0000)] 
Don't add space before para twice in paragraph layout
Discard attributes from empty text object when merging

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoinclude wx/sizer.h as buildbot complained
Robert Roebling [Sun, 29 Aug 2010 12:24:44 +0000 (12:24 +0000)] 
include wx/sizer.h as buildbot complained

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd possibility to use sizers in ribbon panel, fixes #12404: wxRibbonPanel and wxSizer
Robert Roebling [Sun, 29 Aug 2010 09:42:55 +0000 (09:42 +0000)] 
Add possibility to use sizers in ribbon panel, fixes #12404: wxRibbonPanel and wxSizer

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoScale sizes more accurately in generic SetWindowVariant().
Václav Slavík [Sat, 28 Aug 2010 17:05:02 +0000 (17:05 +0000)] 
Scale sizes more accurately in generic SetWindowVariant().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoChanged wxArrayStringProperty default delimiter to comma. It should allow for better...
Jaakko Salli [Thu, 26 Aug 2010 13:51:45 +0000 (13:51 +0000)] 
Changed wxArrayStringProperty default delimiter to comma. It should allow for better looking and more easily editable property values for common cases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdded missing wx/defs.h includes in propgrid headers
Jaakko Salli [Thu, 26 Aug 2010 13:25:07 +0000 (13:25 +0000)] 
Added missing wx/defs.h includes in propgrid headers

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agocorrecting wxX11 for wxkeysym as was done for wxMOTIF
Jouk Jansen [Thu, 26 Aug 2010 06:53:51 +0000 (06:53 +0000)] 
correcting wxX11 for wxkeysym as was done for wxMOTIF

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix wxListBox selection handling broken by r64500.
Václav Slavík [Wed, 25 Aug 2010 15:02:30 +0000 (15:02 +0000)] 
Fix wxListBox selection handling broken by r64500.

r64500 introduced tracking of previous selection in wxMSW's wxListBox so
that an event isn't sent when the user clicks already selected item
again. Unfortunately, it forgot to account for programatic changes of
selection (e.g. when all items are removed, so is the selection) and
didn't update selection book-keeping information in that case. The
result was that the event wasn't sent when it should be in some cases.

Fixed by using UpdateOldSelections() even in single-selection case in
wxMSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoReenable sorting tests for GTK
Robert Roebling [Tue, 24 Aug 2010 17:22:12 +0000 (17:22 +0000)] 
Reenable sorting tests for GTK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoMake sorting of wxListBox, wxChoice and wxComboBox identical to the MSW sorting
Robert Roebling [Tue, 24 Aug 2010 17:06:15 +0000 (17:06 +0000)] 
Make sorting of wxListBox, wxChoice and wxComboBox identical to the MSW sorting

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRemove unused wxDisplay implementation using DirectDraw from wxMSW.
Vadim Zeitlin [Tue, 24 Aug 2010 11:36:43 +0000 (11:36 +0000)] 
Remove unused wxDisplay implementation using DirectDraw from wxMSW.

Remove commented out version of DirectDraw-based wxDisplayFactory
implementation. It doesn't seem to have any advantages compared to the
currently used version and nobody uses it anyhow.

Closes #12387.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agowxKeysym problem for wxMOTIF fixed
Jouk Jansen [Tue, 24 Aug 2010 11:23:22 +0000 (11:23 +0000)] 
wxKeysym problem for wxMOTIF fixed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoCompilation fix: forward declare wxTextEntry in unit tests code.
Vadim Zeitlin [Mon, 23 Aug 2010 18:54:59 +0000 (18:54 +0000)] 
Compilation fix: forward declare wxTextEntry in unit tests code.

This should fix tests compilation on the build bot Mac OS X slaves.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUpdate openVMS compile support
Jouk Jansen [Mon, 23 Aug 2010 07:50:00 +0000 (07:50 +0000)] 
Update openVMS compile support

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUse "C" locale for locale-dependent part of TextCtrlTestCase.
Vadim Zeitlin [Sun, 22 Aug 2010 23:46:02 +0000 (23:46 +0000)] 
Use "C" locale for locale-dependent part of TextCtrlTestCase.

As we expect to get decimal points in the text control when we stream floating
point numbers into it, we must do it in a locale which uses decimal point,
e.g. "C" one. Otherwise the test failed when ran in e.g. French locale.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDocument that wxFD_FILE_MUST_EXIST is implied under OS X.
Vadim Zeitlin [Sun, 22 Aug 2010 23:45:58 +0000 (23:45 +0000)] 
Document that wxFD_FILE_MUST_EXIST is implied under OS X.

Mention in the documentation that the standard file open dialog under OS X
can't be used to select a non-existing file.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRemove unused src/osx/cocoa/bmpbuttn.mm file.
Vadim Zeitlin [Sun, 22 Aug 2010 23:45:53 +0000 (23:45 +0000)] 
Remove unused src/osx/cocoa/bmpbuttn.mm file.

This file was empty and unused any more so simply remove it and all references
to it in the makefiles.

This avoids warnings about empty object files in static builds of the library.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't use uninitialized variable in wxCharCodeWXToOSX().
Vadim Zeitlin [Sun, 22 Aug 2010 22:58:25 +0000 (22:58 +0000)] 
Don't use uninitialized variable in wxCharCodeWXToOSX().

If an unsupported wxKeyCode was passed to this function, an undefined value
was returned. Return -1 instead to indicate failure.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoMerge the new GUI tests from SOC2010_GUI_TEST branch.
Vadim Zeitlin [Sun, 22 Aug 2010 22:16:05 +0000 (22:16 +0000)] 
Merge the new GUI tests from SOC2010_GUI_TEST branch.

Add a lot of tests for many wx GUI classes.

Add tests using the new wxUIActionSimulator class but disable them under OS X
as too many of them currently fail there.

Refactor the test suite to make organizing the existing tests and adding the
new ones easier.

Improve documentation using the information gathered while testing the
classes. Also update the documentation of the testing system itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoMerge wxUIActionSimulator fixes from SOC2010_GUI_TEST branch.
Vadim Zeitlin [Sun, 22 Aug 2010 22:15:42 +0000 (22:15 +0000)] 
Merge wxUIActionSimulator fixes from SOC2010_GUI_TEST branch.

Correct a lot of problems with the initial implementation, notably make the
API consistent across all platforms, e.g. all keyboard-related methods now
take just a wxKeyCode.

Add some useful higher-level helpers such as Text() and MouseDragDrop().

Improve documentation.

wxUIActionSimulator now works under MSW, GTK and OS X and is enabled by
default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix selection corner cases in wxOSX wxComboBox.
Vadim Zeitlin [Sun, 22 Aug 2010 22:15:32 +0000 (22:15 +0000)] 
Fix selection corner cases in wxOSX wxComboBox.

Don't crash in wxComboBox::GetString() if it's passed an invalid index.

Don't call GetString() with invalid index from GetStringSelection() if there
is no selection.

Do accept wxNOT_FOUND in SetSelectedItem() as it means, according to the docs,
that the existing selection should be reset.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't crash in wxOSX::wxClipboard::Clear() if initialization failed.
Vadim Zeitlin [Sun, 22 Aug 2010 22:15:27 +0000 (22:15 +0000)] 
Don't crash in wxOSX::wxClipboard::Clear() if initialization failed.

Creating the clipboard may fail (e.g. when running from a ssh session to an OS
X machine), don't crash by passing NULL pointer to PasteboardClear() if this
happens but assert and return instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoWork around a crash on starting editing in wxGrid under wxOSX/Cocoa.
Vadim Zeitlin [Sun, 22 Aug 2010 22:15:22 +0000 (22:15 +0000)] 
Work around a crash on starting editing in wxGrid under wxOSX/Cocoa.

wxOSX/Cocoa currently generates unexpected focus loss events with the window
gaining focus being the same one as losing it. This is wrong and shouldn't
happen but as long as it does, filter these events out to at least allow
editing the grid to work.

See #12267.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't send event from wxMSW::wxListCtrl::DeleteAllItems() if it did nothing.
Vadim Zeitlin [Sun, 22 Aug 2010 22:15:17 +0000 (22:15 +0000)] 
Don't send event from wxMSW::wxListCtrl::DeleteAllItems() if it did nothing.

wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS should only be sent if the control hadn't
been empty before. Document this behaviour and adjust wxMSW to match the
other platforms.

Also document the return value better.

Closes #12336.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoExtract X11 Display wrapper class in a private header.
Vadim Zeitlin [Sun, 22 Aug 2010 22:15:13 +0000 (22:15 +0000)] 
Extract X11 Display wrapper class in a private header.

No real changes, just extract a private Dpy class used by wxGTK to a header
and rename it to wxX11Display.

This will allow reusing it from X11 wxUIActionSimulator implementation in the
upcoming commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd missing header required if wx/mousestate.h is included first.
Vadim Zeitlin [Sun, 22 Aug 2010 22:15:07 +0000 (22:15 +0000)] 
Add missing header required if wx/mousestate.h is included first.

This header uses wxPoint so it must include wx/gdicmn.h (instead of relying on
it having been already included).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775