Commit Graph

14189 Commits

Author SHA1 Message Date
Vadim Zeitlin
323d36e452 Add wxHAS_BITMAPTOGGLEBUTTON and test for it in the unit test.
Not all ports define wxBitmapToggleButton class currently, so add a special
symbol which is defined only if this class is indeed available and test for it
in the unit test for this class.

This fixes the tests compilation under wxX11.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-01 13:05:36 +00:00
Stefan Csomor
4a473abaf2 opening ATSU Font info for Ulrich Telle's wxPDFContext
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 17:30:48 +00:00
Vadim Zeitlin
51b729af92 Add default value for GetPopupMenuSelectionFromUser() position argument.
Let the menu be popped up at the system-determined position, just as it can
already be done with PopupMenu() itself.

Closes #12530.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 14:33:53 +00:00
Vadim Zeitlin
37513b6715 Correct handling of %hs and %ls in our wxPrintf() implementation.
The strings corresponding to %hs and %ls are always narrow/wide independently
of the build so using wxArgNormalizedString which is defined differently in
different builds doesn't make sense in wxPrintf().

Instead, simply expect the parameter of the appropriate matching type for
these conversion specifications. Any conversions to it, if necessary, had been
already done before by wxFormatString.

This fixes some VsnprintfTestCase::BigToSmallBuffer() unit test failures.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 14:30:35 +00:00
Vadim Zeitlin
e2dd624761 Fix handling of asterisks in wxPrintf() implementation.
Count the number of asterisks before modifying the string we use to do this,
otherwise we were off by one for the format specifications containing two of
them.

This really fixes the handling of asterisks (used for width/precision) in
wxPrintf() format string, it wasn't done correctly by r60120 but now
VsnprintfTestCase::Asterisk() test does pass.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 14:30:28 +00:00
Vadim Zeitlin
ce00f59b5b No changes whatsoever, just remove trailing whitespace.
There are no real changes in this commit but it removes all trailing white
space from our source files. This avoids problems when applying patches and
making diffs and it would be nice to prevent it from reappearing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 11:44:45 +00:00
Vadim Zeitlin
6255fac96f Use Unix EOL format for the new files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 11:31:57 +00:00
Vadim Zeitlin
7132641de7 Include correct headers from richtextimagedlg.*.
Include or forward declares the classes used by the header to make it
self-contained. Do not include wx/wx.h from the source file to make compiling
it faster when not using PCH.

This fixes compilation under Unix after SOC2010_RTC_IMAGES branch merge.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 11:31:04 +00:00
Vadim Zeitlin
00fe363361 Remove interface/implementation #pragmas from richtextimagedlg.*.
These pragmas are not necessary and may actually be harmful, no idea why were
they added in the first place to a new file.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 11:30:58 +00:00
Vadim Zeitlin
cdaed652d7 Merge of SOC2010_RTC_IMAGES branch.
Added floating images and image property dialog to wxRichTextCtrl, by Mingquan
Yang as part of GSOC 2010. Also changed image block creation to use a memory
stream instead of creating a temporary file.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 10:27:07 +00:00
Vadim Zeitlin
a65b84f434 Add EVT_RIBBONBAR_TAB_LEFT_DCLICK event.
Generate a special event when a ribbon bar is double clicked.

Closes #12399.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:46:35 +00:00
Vadim Zeitlin
59b7da02ff Return wxFONTFAMILY_DEFAULT, not UNKNOWN, from wxFont::GetFamily().
Although returning wxFONTFAMILY_UNKNOWN when the font family is not recognized
makes more sense, it breaks a lot of existing code including all the
font-related code generated by DialogBlocks, so prefer to return
wxFONTFAMILY_DEFAULT instead -- which can't be confused for a valid font
family neither but can be passed to wxFont ctor or SetFamily() without
problems.

To ensure that this behaviour is correctly implemented by all ports, rename
the existing wxFont::GetFamily() to DoGetFamily() and call the new method from
wxFontBase::GetFamily() which adjusts the return value if needed.

Closes #12330.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:46:09 +00:00
Vadim Zeitlin
4a21ea9d9e Improve mouse handling code in wxAuiToolBar.
Capture the mouse to handle mouse input on the buttons to ensure we always
reset the button when the mouse leaves it.

Closes #11784.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:45:56 +00:00
Vadim Zeitlin
bb4acdc085 Include wx/defs.h before testing for wxUSE_RADIOBOX.
We need to include wx/defs.h that (indirectly) defines wxUSE_RADIOBOX
before testing for it in wx/radiobox.h, otherwise the test may fail if the
latter header is the first wx header included by the user code.

This is similar to r65210 fix for wxUSE_CHECKLISTBOX.

Closes #12526.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-29 13:45:51 +00:00
Vadim Zeitlin
8cb2c49f7d Fix wx/event.h compilation with Sun CC compiler.
Move wxObjectEventFunctor::operator() definition after wxEvtHandler
declaration as it uses call through a pointer to member of this class and Sun
CC refuses to compile this without having the full class declaration.

Closes #12452.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-27 12:55:22 +00:00
Vadim Zeitlin
f1b08e84a1 Fix typo in wxStandardPathsBase::ResourceCat description and document it.
Document the enum itself and also correct GetLocalizedResourcesDir()
documentation which didn't specify the default value for the category
parameter.

Closes #12523.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-27 11:51:50 +00:00
Vadim Zeitlin
5ed8879eaf Make wxDateTime::Tm::yday public and document it.
There doesn't seem any reason to allow access to all the other struct Tm
fields but not yday so make it public, fill it in correctly when creating Tm
without using its ctor from struct tm and document struct Tm itself including
its yday field.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-26 22:11:21 +00:00
Jaakko Salli
248a4ec0f2 Fixed PCH-less build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-24 15:22:52 +00:00
Jaakko Salli
2e2e62def1 Have wxPropertyGrid inherit from wxControl and wxScrollHelper instead of wxScrolledWindow. This is the approach other scrolled controls use.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-24 14:47:20 +00:00
Robin Dunn
6f5778a627 CanSetTransparent needs to be virtual
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 21:07:19 +00:00
Jaakko Salli
c27615f55c Streamline wxPropertyGrid tooltip code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-23 12:58:02 +00:00
Vadim Zeitlin
033428a32c 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
2010-09-22 13:31:41 +00:00
Steve Lamerton
2a4a928df7 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
2010-09-22 10:06:39 +00:00
Vadim Zeitlin
2f0312f0c4 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
2010-09-21 12:57:59 +00:00
Vadim Zeitlin
74d3098357 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
2010-09-21 11:56:53 +00:00
Vadim Zeitlin
76c4b1491e 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
2010-09-20 13:11:03 +00:00
Vadim Zeitlin
a8abba41bc 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
2010-09-18 16:26:30 +00:00
Vadim Zeitlin
4f7c00f237 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
2010-09-18 16:26:22 +00:00
Robert Roebling
3f53dd3a2f 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
2010-09-17 19:07:02 +00:00
Václav Slavík
685ed4d1f8 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
2010-09-16 09:05:48 +00:00
Vadim Zeitlin
7bfc104bba 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
2010-09-15 22:10:20 +00:00
Vadim Zeitlin
a7aeddacf9 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
2010-09-15 22:10:14 +00:00
Vadim Zeitlin
ed84dc74d9 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
2010-09-14 13:18:48 +00:00
Robert Roebling
b955766e88 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
2010-09-13 20:12:57 +00:00
Robert Roebling
d8090b5e2c Further work on wxDataViewListModel::Reset()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-13 20:02:01 +00:00
Robert Roebling
673810eeb8 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
2010-09-12 20:07:28 +00:00
Vadim Zeitlin
5844ad30dd 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
2010-09-11 10:19:02 +00:00
Vadim Zeitlin
0c03f52d02 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
2010-09-11 10:18:53 +00:00
Vadim Zeitlin
b6885972ee 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
2010-09-11 10:18:47 +00:00
Vadim Zeitlin
86408a0374 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
2010-09-11 10:18:41 +00:00
Vadim Zeitlin
2dcbc4615b 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
2010-09-11 10:18:25 +00:00
Vadim Zeitlin
371412145f 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
2010-09-11 10:18:15 +00:00
Stefan Csomor
5d57348ef5 fixing 'main screen'
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 09:20:28 +00:00
Vadim Zeitlin
cc31a982ec 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
2010-09-10 17:26:03 +00:00
Vadim Zeitlin
2de77c6a54 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
2010-09-10 17:25:58 +00:00
Vadim Zeitlin
4f4d6f44f9 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
2010-09-10 17:25:53 +00:00
Vadim Zeitlin
e77570de2e 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
2010-09-10 17:25:28 +00:00
Vadim Zeitlin
7ad8a38ae5 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
2010-09-10 11:44:46 +00:00
Vadim Zeitlin
79e58a409e 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
2010-09-10 11:44:40 +00:00
Vadim Zeitlin
395da337e9 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
2010-09-10 11:44:35 +00:00