wxWidgets.git
13 years agoWhen setting empty string as a tooltip, call gtk_widget_set_has_tooltip() with FALSE...
Jaakko Salli [Thu, 23 Sep 2010 12:55:22 +0000 (12:55 +0000)] 
When setting empty string as a tooltip, call gtk_widget_set_has_tooltip() with FALSE to remove the tooltip. This will bring wxGTK behavior in line with wxMSW.

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

13 years agoFix assert when changing the filter selection on a multiple selection wxGenericDirCtrl.
Steve Lamerton [Wed, 22 Sep 2010 19:24:41 +0000 (19:24 +0000)] 
Fix assert when changing the filter selection on a multiple selection wxGenericDirCtrl.

Because ExpandPaths selects the item we can simply grab a list of selected paths and then expand them all in the multiple selection case. The single selection case is unchanged.

Closes #12340

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

13 years agoBetter checks for wxMSWKeyboard::VKToWX() return value.
Vadim Zeitlin [Wed, 22 Sep 2010 13:31:41 +0000 (13:31 +0000)] 
Better checks for wxMSWKeyboard::VKToWX() return value.

Don't generate key events without any valid key code (this shouldn't normally
happen but might on exotic keyboards with keys that we don't know about).

Also ensure that we can distinguish between VKToWX() returning dead keys and
non-Latin-1 keys by setting wchar_t output parameter to WXK_NONE too in the
former case but not the latter.

Generate wxEVT_CHAR_HOOK events for non-Latin-1 keys too in Unicode build.

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

13 years agoFix recently broken generation of wxEVT_CHAR_HOOK events in wxMSW.
Vadim Zeitlin [Wed, 22 Sep 2010 13:31:32 +0000 (13:31 +0000)] 
Fix recently broken generation of wxEVT_CHAR_HOOK events in wxMSW.

Changes to VKToWX() semantics broke the logic of the global keyboard hook
function in wxMSW which didn't generate wxEVT_CHAR_HOOK events for ASCII
special keys such as WXK_ESCAPE any more.

Fix this and also generate wxEVT_CHAR_HOOK for all events, not just the
non-ASCII keys for consistency with the documentation and wxGTK.

Closes #12501.

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

13 years agoRe-enable disabled wxWindow label tests under wxGTK as they were fixed in r65374
Steve Lamerton [Wed, 22 Sep 2010 12:45:45 +0000 (12:45 +0000)] 
Re-enable disabled wxWindow label tests under wxGTK as they were fixed in r65374

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

13 years agoSend generic wxTreeCtrl wxEVT_COMMAND_TREE_KEY_DOWN events from OnKeyDown rather...
Steve Lamerton [Wed, 22 Sep 2010 10:06:39 +0000 (10:06 +0000)] 
Send generic wxTreeCtrl wxEVT_COMMAND_TREE_KEY_DOWN events from OnKeyDown rather than OnChar. This change means it sends events for the same keys as the wxMSW control. It also fixes the failing unit test.

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

13 years agoSend generic wxListCtrl wxEVT_COMMAND_LIST_KEY_DOWN events from OnKeyDown rather...
Steve Lamerton [Wed, 22 Sep 2010 08:48:15 +0000 (08:48 +0000)] 
Send generic wxListCtrl wxEVT_COMMAND_LIST_KEY_DOWN events from OnKeyDown rather than OnChar. Also remove the HasCurrent check. These changes bring the generic control into line with the control under wxMSW. Re-enable the previously failing unit test and document that the key down event might not have a valid item associated with it.

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

13 years agoCompilation fixes for old SDKs (VC6) after recent commit.
Vadim Zeitlin [Tue, 21 Sep 2010 12:57:59 +0000 (12:57 +0000)] 
Compilation fixes for old SDKs (VC6) after recent commit.

Define WM_QUERYUISTATE in wx/msw/missing.h too as src/msw/statbox.cpp uses it
now.

Also move DT_HIDEPREFIX definition from wx/msw/private/button.h to missing.h
as well as it's now used in statbox.cpp too. Include missing.h explicitly from
the files that use DT_HIDEPREFIX.

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

13 years agoCompilation fix of wxSocket code for older Solaris versions.
Vadim Zeitlin [Tue, 21 Sep 2010 11:56:53 +0000 (11:56 +0000)] 
Compilation fix of wxSocket code for older Solaris versions.

Include sys/filio.h to define FIONBIO in all cases (sometimes this header is
already included from sys/ioctl.h but not always).

Closes #12481.

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

13 years agoCorrect drawing of mnemonics in wxStaticBox label under wxMSW.
Vadim Zeitlin [Tue, 21 Sep 2010 11:44:47 +0000 (11:44 +0000)] 
Correct drawing of mnemonics in wxStaticBox label under wxMSW.

Only show the mnemonics if they need to be shown, i.e. use the same logic as
the standard controls use, to avoid showing mnemonics in wxStaticBox with
custom label colour even when other wxStaticBoxes don't show it.

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

13 years agoFix wxStaticBox label redrawing when "Alt" is pressed in wxMSW.
Vadim Zeitlin [Tue, 21 Sep 2010 11:44:41 +0000 (11:44 +0000)] 
Fix wxStaticBox label redrawing when "Alt" is pressed in wxMSW.

The default handling for Alt key press in the standard control is to redraw
the label to account for showing of the keyboard queues (i.e. if the mnemonics
were initially hidden, they are shown when Alt is pressed) but it doesn't
redraw it in the correct colour resulting in any custom label colour being
lost whenever Alt is pressed anywhere in the window containing the box.

Fix this by forcing the box refresh which will result in repainting it using
our code which does use the correct colour.

Also update the static page of the widgets sample to allow changing the
colours of all static controls on this page, including the wxStaticBox, and
not just the main wxStaticText.

Closes #12497.

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

13 years agoCall SetToolTip() for the property editor control when wxPG_EX_HELP_AS_TOOLTIPS style...
Jaakko Salli [Mon, 20 Sep 2010 15:38:12 +0000 (15:38 +0000)] 
Call SetToolTip() for the property editor control when wxPG_EX_HELP_AS_TOOLTIPS style is used

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

13 years agoPCH-less compilation fix to GDI+ wxMSW code.
Vadim Zeitlin [Mon, 20 Sep 2010 14:14:12 +0000 (14:14 +0000)] 
PCH-less compilation fix to GDI+ wxMSW code.

Closes #12496.

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

13 years agoCorrectly recognize when wglChoosePixelFormatARB() fails.
Vadim Zeitlin [Mon, 20 Sep 2010 13:15:21 +0000 (13:15 +0000)] 
Correctly recognize when wglChoosePixelFormatARB() fails.

This function returns TRUE even if it failed to find any matching formats, so
test not only its return value but also the number of formats it found.

Closes #12474.

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

13 years agoAlways use native task dialog for wxProgressDialog under MSW if supported.
Vadim Zeitlin [Mon, 20 Sep 2010 13:11:03 +0000 (13:11 +0000)] 
Always use native task dialog for wxProgressDialog under MSW if supported.

Use task dialogs even for the dialogs with wxPD_AUTO_HIDE style flag and
without wxPD_CAN_ABORT one. Generic fallback was used in this case as native
task dialog doesn't support dialogs without buttons but it is finally better
to create a dummy button and use the native dialog nevertheless. We already
have a mostly disabled "Close" button for the dialogs without wxPD_AUTO_HIDE
style so it seems logical to also have it (but just never enable it at all)
when this style is used.

Closes #12462.

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

13 years agoIgnore time component of SYSTEMTIME in wxMSW wxDatePickerCtrl.
Vadim Zeitlin [Mon, 20 Sep 2010 13:10:49 +0000 (13:10 +0000)] 
Ignore time component of SYSTEMTIME in wxMSW wxDatePickerCtrl.

This is similar to the fix of r64208 for wxCalendarCtrl and ignores the time
component of SYSTEMTIME objects returned by the native functions in
wxDatePickerCtrl too to ensure that we operate with pure dates only.

Closes #12493.

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

13 years agoDon't use native MSW functions in wxString::CmpNoCase().
Vadim Zeitlin [Mon, 20 Sep 2010 12:52:26 +0000 (12:52 +0000)] 
Don't use native MSW functions in wxString::CmpNoCase().

While the native CompareString() is much more efficient than MSVC CRT version
of _wcsicmp(), it gives unexpected results for non-letter characters, so don't
use it but use the slow but correct wxStricmp() instead.

At least don't use char-by-char comparison (in non-UTF-8 case) as it's the
slowest possible implementation of this function, the new one using
wxStricmp() is 3 times faster (by comparison, using CompareString() is 16
times faster still -- but wrong).

Closes #10375.

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

13 years agoAdd benchmarks for various ways to compare strings.
Vadim Zeitlin [Mon, 20 Sep 2010 12:52:21 +0000 (12:52 +0000)] 
Add benchmarks for various ways to compare strings.

Benchmark the abstraction overhead of wxString methods compared to plain
functions and also benchmark native functions for string comparison under MSW.

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

13 years agoFlush output after every benchmark.
Vadim Zeitlin [Mon, 20 Sep 2010 12:52:15 +0000 (12:52 +0000)] 
Flush output after every benchmark.

This purely cosmetic change simply allows to see the output of the benchmarks
sooner which is more user-friendly when running several long benchmarks.

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

13 years agoIncrease the number of expected events in TreeCtrlTestCase::KeyDown and ListBaseTestC...
Steve Lamerton [Sun, 19 Sep 2010 10:02:57 +0000 (10:02 +0000)] 
Increase the number of expected events in TreeCtrlTestCase::KeyDown and ListBaseTestCase::KeyDown from four to six as this is the number of events seen when testing using their samples. This also stops the tests failing after the recent keyboard event improvements.

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

13 years agoReally fix setting fonts in RichEdit 4.1 controls.
Vadim Zeitlin [Sat, 18 Sep 2010 16:26:35 +0000 (16:26 +0000)] 
Really fix setting fonts in RichEdit 4.1 controls.

The fix applied in r64394 wasn't enough and the control could still decide to
overwrite the font used by default when non-ASCII characters were inserted
into it. To really force it to use the font we want we apparently must send it
EM_SETCHARFORMAT with SCF_ALL flag (MSDN also documents SCF_DEFAULT but it's
not clear if we should use it instead or together with SCF_ALL, for now it
doesn't seem to be necessary).

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

13 years agoNo changes, just refactor wxTextCtrl::SetStyle() in wxMSW.
Vadim Zeitlin [Sat, 18 Sep 2010 16:26:30 +0000 (16:26 +0000)] 
No changes, just refactor wxTextCtrl::SetStyle() in wxMSW.

Split this overly long function into MSWSetCharFormat() and MSWSetParaFormat().

No real changes otherwise except for the use of PARAFORMAT instead of
PARAFORMAT2 if wxUSE_RICHEDIT2 is not set as it was certainly intended (but
the fact that nobody complained about this problem means that nobody must be
compiling without wxUSE_RICHEDIT2 by now so arguably we should just remove it
completely).

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

13 years agoSet wxTextCtrl::m_verRichEdit to 4 for RichEdit 4.1.
Vadim Zeitlin [Sat, 18 Sep 2010 16:26:22 +0000 (16:26 +0000)] 
Set wxTextCtrl::m_verRichEdit to 4 for RichEdit 4.1.

Set m_verRichEdit to a different value for the version 4.1 of the control as
it behaves subtly differently from the previous versions.

Also clarify that value of 2 is used for both 2.0 and 3.0 versions of the
control.

No real changes yet.

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

13 years agoPostpone EnsureVisible() to idle as this sometimes seems to be required, fixes #12480...
Robert Roebling [Fri, 17 Sep 2010 19:07:02 +0000 (19:07 +0000)] 
Postpone EnsureVisible() to idle as this sometimes seems to be required, fixes #12480: wxDataViewCtrl::EnsureVisible does not make item visible in some
circumstances on GTK

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

13 years agoSet svn properties on .cpp files.
Dimitri Schoolwerth [Fri, 17 Sep 2010 11:17:55 +0000 (11:17 +0000)] 
Set svn properties on .cpp files.

Add missing svn:eol-style property to all .cpp files. Also set svn:keywords for .cpp files which don't have that property yet to Id, including src/osx/core/glgrab.cpp for consistency (it doesn't make use of the property).

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

13 years agoAllow setting Mac-specific menu item ids to wxID_NONE to suppress them.
Vadim Zeitlin [Thu, 16 Sep 2010 19:36:37 +0000 (19:36 +0000)] 
Allow setting Mac-specific menu item ids to wxID_NONE to suppress them.

If s_macAboutMenuItemId or s_macPreferencesMenuItemId was explicitly set to
wxID_NONE by the application, don't add them to the standard menu at all,
otherwise they would be present there but be always disabled and useless.

This is still not documented because we really need a better API for this but
it at least provides a temporary workaround for having useless menu items
under OS X.

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

13 years agoAllow use of report mode non-native wxListCtrl in wxListBook under Mac.
Vadim Zeitlin [Thu, 16 Sep 2010 19:36:29 +0000 (19:36 +0000)] 
Allow use of report mode non-native wxListCtrl in wxListBook under Mac.

The use of wxListBook in report mode was disabled for wxOSX in r54001 and
r54318 (see #9484) because it created problems with the native wxListCtrl
implementation but the report mode can be used if we're using the generic
wxListCtrl version so do allow to use it if the system option governing the
choice of the version to use is set to "generic".

Of course, the real fix would be to correct the bugs in the native wxListCtrl
version and use report mode always but for now this at least restores correct
behaviour with the generic version.

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

13 years agoOnly use wxFORCE_LINK_MODULE() in mediaplayer sample in static build.
Vadim Zeitlin [Thu, 16 Sep 2010 11:05:51 +0000 (11:05 +0000)] 
Only use wxFORCE_LINK_MODULE() in mediaplayer sample in static build.

The linking optimization this macro protects against can't happen when using
DLL and so using it is at best useless and actually harmful (because it
doesn't contain the correct DLL export declarations) in the latter case.

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

13 years agoCompilation fixes for non-MSVC 9 compilers after r65555.
Vadim Zeitlin [Thu, 16 Sep 2010 11:05:46 +0000 (11:05 +0000)] 
Compilation fixes for non-MSVC 9 compilers after r65555.

Somehow MSVC 9 compiled invalid wxT(__FUNCTION__) expressions but both MinGW
and MSVC 6 (correctly) failed. Don't use this construct at all but instead
call wxLogLastError() with the real function name.

Also refactor the code slightly to avoid having to repeat this fix thrice.

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

13 years agoFix wxMSW rendering artifacts with modal dialogs.
Václav Slavík [Thu, 16 Sep 2010 09:05:48 +0000 (09:05 +0000)] 
Fix wxMSW rendering artifacts with modal dialogs.

When a modal dialog showed another modal dialog, parts of the parent
window weren't refreshed correctly. This demonstrated itself as
rendering artifacts when moving the child dialog to another position:
parts of the dialog were shown as disabled, parts as enabled.

Fixed by explicitly refreshing the window.

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

13 years agoRemove display information caching from MSW wxDisplay implementation.
Vadim Zeitlin [Wed, 15 Sep 2010 23:04:02 +0000 (23:04 +0000)] 
Remove display information caching from MSW wxDisplay implementation.

Don't cache display rectangle and client rectangle as they can both change
during the program lifetime (especially the latter which changes whenever
taskbar is moved or shown/hidden) and retrieving them every time they're
needed doesn't seem to be a problem performance-wise anyhow.

We still cache the list of all the monitors, ideally we'd refresh it when we
receive a notification about a display being [dis]connected.

Closes #4582.

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

13 years agoFix possible errors introduced while generating Xcode project.
Dimitri Schoolwerth [Wed, 15 Sep 2010 22:13:40 +0000 (22:13 +0000)] 
Fix possible errors introduced while generating Xcode project.

Under some unknown circumstances two added source files are concatenated into one faulty entry in an Xcode project (this probably occurs either at the Xcode or XMLTools2 level). Try to detect these errors in the Python script and fix them by patching up the project.pbxproj file.

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

13 years agoDocument limitations of the generic wxTextEntry hints.
Vadim Zeitlin [Wed, 15 Sep 2010 22:10:26 +0000 (22:10 +0000)] 
Document limitations of the generic wxTextEntry hints.

Calling methods other than SetValue() or ChangeValue() doesn't update the
display correctly currently, see #12475.

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

13 years agoUpdate the text hint display correctly when ChangeValue() is called.
Vadim Zeitlin [Wed, 15 Sep 2010 22:10:20 +0000 (22:10 +0000)] 
Update the text hint display correctly when ChangeValue() is called.

wxTextEntry::ChangeValue() doesn't generate any events so we need to
explicitly update the text stored by wxTextEntryHintData when it is called to
ensure that it corresponds to the real controls value.

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

13 years agoFix several bugs in generic text entry hints implementation.
Vadim Zeitlin [Wed, 15 Sep 2010 22:10:14 +0000 (22:10 +0000)] 
Fix several bugs in generic text entry hints implementation.

The text controls contents and colour was not updated correctly in several
situations (see #12475).

The old code was completely wrong as it didn't store the actual value of the
control at all and so could never work. Do store and update it now and show
the hint if and only if the real contents is empty.

Also handle "text updated" event to correctly update the hint when the control
becomes [non-]empty.

Closes #12475.

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

13 years agoFix wxTextEntry::SelectAll() in presence of hints in wxGTK.
Vadim Zeitlin [Wed, 15 Sep 2010 22:10:07 +0000 (22:10 +0000)] 
Fix wxTextEntry::SelectAll() in presence of hints in wxGTK.

Translation of wx (-1, -1) selection to (0, GetValue().length()) in
wxTextCtrl::SetSelection() was unnecessary as it ended up calling the base
class wxTextEntry::SetSelection() version which didn't need it. Moreover, this
translation was actually harmful when the text control happened to show a hint
string as its official value was empty in this case and so SetSelection(0, 0)
was called which didn't do anything and broke clearing/changing the controls
text when it was showing a hint.

Simply don't translate the indices when using a single line control to fix
this.

See #12475.

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

13 years agoUse a unique namespace for generating identifiers.
Dimitri Schoolwerth [Wed, 15 Sep 2010 11:45:32 +0000 (11:45 +0000)] 
Use a unique namespace for generating identifiers.

Instead of using uuid.NAMESPACE_DNS as namespace use a newly generated UUID. Also minor cleanup of import uuid statement.

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

13 years agoMake Xcode identifier consecutive when there is a collision.
Dimitri Schoolwerth [Wed, 15 Sep 2010 11:29:07 +0000 (11:29 +0000)] 
Make Xcode identifier consecutive when there is a collision.

Making them consecutive groups source files that are repeated next to each other in the project file like Xcode does, instead of creating a complete new random identifier which resulted in creating a distance between the source files after they were sorted.

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

13 years agoClick on wxOwnerDrawnComboBox's animating popup should close it.
Václav Slavík [Tue, 14 Sep 2010 18:35:50 +0000 (18:35 +0000)] 
Click on wxOwnerDrawnComboBox's animating popup should close it.

Previously, it behaved differently from native combo box: clicking the
popup while its opening animation was running had no effect. This was
different from the native control, which would close the popup in this
case (just like when it's fully opened).

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

13 years agoFix incorrect behaviour of wxRibbonGallery::EnsureVisible when the ribbon is vertical...
Peter Cawley [Tue, 14 Sep 2010 17:35:26 +0000 (17:35 +0000)] 
Fix incorrect behaviour of wxRibbonGallery::EnsureVisible when the ribbon is vertical rather than horizontal.

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

13 years agoFix drawing of items with custom background in wxGenericListCtrl.
Vadim Zeitlin [Tue, 14 Sep 2010 13:18:48 +0000 (13:18 +0000)] 
Fix drawing of items with custom background in wxGenericListCtrl.

This was broken by the changes of r64879 which erroneously used
wxRendererNative::DrawItemSelectionRect() even for the non-selected items.

Now only use DrawItemSelectionRect() for the selected items to make them
appear natively while drawing the non-selected items with custom background
colour ourselves.

Also refactor the code to avoid (the not quite and hence especially
pernicious) duplication between wxListLineData::Draw() and DrawInReportMode():
rename SetAttributes() to ApplyAttributes() and draw the item background in
this function now instead of doing it in both Draw() and DrawInReportMode().

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

13 years agoFix hang on termination of wxProgressDialog with wxPD_AUTO_HIDE style.
Vadim Zeitlin [Tue, 14 Sep 2010 10:24:35 +0000 (10:24 +0000)] 
Fix hang on termination of wxProgressDialog with wxPD_AUTO_HIDE style.

We don't need to run a modal event loop waiting for the wxProgressDialog to be
closed when it has wxPD_AUTO_HIDE style because it does it on its own.

Closes #12472.

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

13 years agoDocument wxDataViewListModel as common abstract base class for
Robert Roebling [Mon, 13 Sep 2010 20:12:57 +0000 (20:12 +0000)] 
Document wxDataViewListModel as common abstract base class for
wxDataViewIndexListModel and wxDataViewVirtualListModel.

Add wxDataViewListModel::GetCount() as both have it.

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

13 years agoFurther work on wxDataViewListModel::Reset()
Robert Roebling [Mon, 13 Sep 2010 20:02:01 +0000 (20:02 +0000)] 
Further work on wxDataViewListModel::Reset()

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

13 years agoUpdate wxRibbonPanel documentation to mention use of sizers.
Vadim Zeitlin [Sun, 12 Sep 2010 22:58:58 +0000 (22:58 +0000)] 
Update wxRibbonPanel documentation to mention use of sizers.

This documents the changes of r65436.

Closes #12418.

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

13 years agoDelete wxListCtrl item data after handling its deletion event in wxMSW.
Vadim Zeitlin [Sun, 12 Sep 2010 22:58:53 +0000 (22:58 +0000)] 
Delete wxListCtrl item data after handling its deletion event in wxMSW.

We deleted the data associated with the item too soon as we did it before the
handler for the item deletion event was run and this handler could still
access this data.

Only free the data after the handler returns now.

Closes #12449.

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

13 years agoFix compilation of EnumerateLoadedModules() call for MinGW64 4.5.
Vadim Zeitlin [Sun, 12 Sep 2010 22:58:48 +0000 (22:58 +0000)] 
Fix compilation of EnumerateLoadedModules() call for MinGW64 4.5.

Our logic for detection of whether the first argument of
PENUMLOADED_MODULES_CALLBACK is const or not didn't work for MinGW64 4.5.

Replace it with a less error-prone (even if more ugly) version which simply
casts the callback to the type expected by the function.

Closes #12465.

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

13 years agoDefine MAPVK_VK_TO_CHAR to fix wxMSW compilation with old SDK headers.
Vadim Zeitlin [Sun, 12 Sep 2010 22:05:51 +0000 (22:05 +0000)] 
Define MAPVK_VK_TO_CHAR to fix wxMSW compilation with old SDK headers.

At least MinGW headers don't define this constant.

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

13 years agoMoved more code from wxDataViewCtrl to wxDataViewCtrlInternal.
Robert Roebling [Sun, 12 Sep 2010 20:07:28 +0000 (20:07 +0000)] 
Moved more code from wxDataViewCtrl to wxDataViewCtrlInternal.
Add new special API for wxDataViewVirtualIndexModel::Reset() as
wxDataViewModel::Clear is something different and needs a different, two
step API under GTK+, one for destroying the current view and one for
rereading the new contents.
Added ::BeforeReset() and ::AfterReset() notifications for that purpose.

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

13 years agoFix for % symbols going missing from style parameter
Julian Smart [Sun, 12 Sep 2010 16:16:48 +0000 (16:16 +0000)] 
Fix for % symbols going missing from style parameter

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

13 years agoCompilation fix for wxOSX.
Vadim Zeitlin [Sat, 11 Sep 2010 11:20:40 +0000 (11:20 +0000)] 
Compilation fix for wxOSX.

Remove stray closing brace.

Also fix a warning about unused parameter.

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

13 years agoGenerate the same flags for modifier key events in wxGTK as in wxMSW.
Vadim Zeitlin [Sat, 11 Sep 2010 10:19:14 +0000 (10:19 +0000)] 
Generate the same flags for modifier key events in wxGTK as in wxMSW.

Resolve the discrepancy between modifier flags of the key events corresponding
to the modifier key itself between wxMSW and wxGTK by changing the latter to
follow wxMSW behaviour.

Clearly document the now officially correct behaviour of the modifiers for the
key events corresponding to the modifiers keys themselves in the manual.

This fix also makes it unnecessary to work around this bug in the keyboard
unit test so remove it from there.

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

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