Commit Graph

55901 Commits

Author SHA1 Message Date
Vadim Zeitlin
6f2df68ec4 No changes, just fix some typos in comments in wxXRC code.
Closes #14714.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:19:24 +00:00
Vadim Zeitlin
e708cadacb No changes, just remove unneeded variable initialization.
Closes #14712, #14713.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 22:19:01 +00:00
Vadim Zeitlin
669f031b94 Revert "Don't use StringFormat::GenericTypographic() in MSW wxGraphicsContext."
This reverts r72442 and restores the use of GenericTypographic string format
for GDI+ text rendering. While it's true that using this flag with small font
sizes results in pretty bad output, especially under Windows XP, not using it
results in wrong text extent calculations for all sizes which is even worse.

See #14537.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 20:35:56 +00:00
Vadim Zeitlin
5d83eee7dd Fix computation of menu button best size in generic wxSearchCtrl.
Invalidate the cached best size when the bitmap changes.

Closes #14708.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 20:35:33 +00:00
Vadim Zeitlin
e5eff43833 Clear the search control automatically when it's "Cancel" button is pressed.
This should be the desired behaviour in the vast majority of cases, so do it
by default.

Replace the useless OnSearchButton() doing nothing with search button events
with OnCancelButton() handling cancel button events and clearing the control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 20:35:10 +00:00
Vadim Zeitlin
274e4265a8 Don't use text control foreground colour for generic wxSearchCtrl itself.
Logically, it should be done in the other direction and also doing it like
this means that the search and cancel icons, rendered using the current
foreground colour, are barely visible when using generic wxTextCtrl::SetHint()
implementation, as in wxGTK, because the text control foreground is set to
light grey in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 20:34:46 +00:00
Paul Cornett
ec373f2a81 make wxWindowGTK::Init() private, it is not meant to be called from derived classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 16:55:40 +00:00
Robin Dunn
337c5edd43 Use Refresh when the initial paint was abandoned by Scintilla so it will trigger a repaint of the whole window. This is done for things like style changes, word wrapping or brace highlights where more than the current line is affected. Fixes #14653.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-30 02:33:56 +00:00
Vadim Zeitlin
241708ca47 Fix generic wxSearchCtrl best size calculation.
The best size of its text control part was not calculated correctly any more
because a wrong best size was cached during wxSearchTextCtrl construction,
when the final class overridden DoGetBestSize() was not called.

Fix this by explicitly invalidating the best size at the end of constructor
for now even though it would be arguably better to fix this in some way not
requiring anything extra to be done to always take the overridden method into
account, especially as it used to work before. But it's not clear how exactly
to restore this so for now do at least fix wxSearchCtrl appearance.

Closes #14708.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-28 23:50:27 +00:00
Vadim Zeitlin
07d304d2aa Fix wxSearchCtrl recreation in the widgets sample.
The control wasn't readded to the sizer correctly after being recreated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-28 23:50:05 +00:00
Vadim Zeitlin
ceddf94945 Remove unused SearchCtrlWidgetsPage::Reset() from widgets sample.
This method was simply unused and unneeded.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-28 23:49:42 +00:00
Vadim Zeitlin
209dc298e2 Don't send events for disabled ribbon bar buttons.
Hover and activation events were sent even for the disabled buttons which was
unexpected and inconsistent with wxRibbonToolBar, so don't do it.

Closes #14709.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-28 23:49:20 +00:00
Vadim Zeitlin
eae48ea12d Make wxHelpControllerBase::SetFrameParameters() title more clear.
Describe it as "title format string" and call it "titleFormat" and not just
"title" because this is what it is.

Closes #14707.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-28 23:48:57 +00:00
Vadim Zeitlin
45df4bb6c2 Add "inherit" to <font> XRC tag.
This allows to construct a font based on the parent window font instead of
either fully specifying all font parameters or basing it on a standard font.

Closes #14632.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-28 23:48:34 +00:00
Vadim Zeitlin
9696657f22 Fix testing for existence of paths with trailing separators in wxMSW.
We removed the trailing separators, that prevented GetFileAttributes() from
working correctly, from the path but then didn't pass the modified path to it
but the original one. Fix this and do use the updated path.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-28 23:48:09 +00:00
Paul Cornett
603e7f6d0c Avoid unrealizing a frozen window
It seems to continue to prevent updates to the affected area

Fixes #13543


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-28 16:09:12 +00:00
Vadim Zeitlin
97c15a53f2 Make wxTextEntryDialog resizable.
It can be used for entry of relatively long text now, especially when
wxTE_MULTILINE flag is used, so allow the user to resize it to facilitate the
entry.

Closes #14702.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-27 22:41:55 +00:00
Vadim Zeitlin
b8d6be7f57 Add two step creation to wxTextEntryDialog.
Add Create() method and default ctor for consistency with the other classes.

See #14702.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-27 22:41:33 +00:00
Vadim Zeitlin
70680b6177 Use SelectAll() instead of SetSelection(-1, -1).
The former is more clear and also shorter.

Closes #14701.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-27 22:41:09 +00:00
Vadim Zeitlin
732281950a Remove the now unnecessary wxRichTextCtrl::SelectAll().
It is already inherited from the base wxTextEntry class.

See #14701.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-27 22:40:46 +00:00
Vadim Zeitlin
d993c262a1 Fix _tputenv() return value test in wxSetEnv().
_tputenv() returns -1, not 0, on error, as all the other CRT functions, so the
test added by r72496 resulted in wxSetEnv() and wxUnsetEnv() always failing
when using MSVC.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-27 13:58:26 +00:00
Vadim Zeitlin
6c51ca3750 Account correctly for the controller when computing wxBookCtrl best size.
We must not increase the total control size in the direction along the
controller window as the size of the controller in this direction is
determined by the size of the control itself. So doing this resulted in always
increasing best size in this direction to be at least equal to the current
size which was wrong.

Closes #14496.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-27 12:47:40 +00:00
Vadim Zeitlin
602af335e4 Use wxSize::IncTo() in wxBookCtrlBase::DoGetBestSize().
No changes, just use an existing wxSize method instead of reimplementing it in
the loop over the pages in wxBookCtrlBase.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-27 12:47:17 +00:00
Vadim Zeitlin
e67e249752 Avoid useless iteration on all pages in wxBookCtrlBase::DoGetBestSize().
If m_fitToCurrentPage is true, there is no need to iterate over all the pages
computing their max best size only in order to overwrite it with the best size
of the current page later.

This doesn't result in any changes in the behaviour, just avoids useless best
size computations.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-27 12:46:53 +00:00
Vadim Zeitlin
4fcad4fb6d Do not unref GtkWidget of unattached wxMenuBar.
This results in the destruction of the widgets of all of its menu and when
wxMenu objects are themselves destroyed in the base class dtor, we try to
destroy their already destroyed widgets, resulting in critical GTK warnings.

Simply don't do anything in wxMenuBar dtor itself if the menu bar is not
attached to a frame as the workaround was only needed in case of destroying
attached menu bars.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-26 22:30:00 +00:00
Vadim Zeitlin
e2f268db5c Fix GTK warnings when destroying unattached wxMenuBar.
Reset m_focusWidget to NULL when destroying m_widget in wxMenuBar dtor,
otherwise we try to use this already destroyed (because it's the same as
m_widget) widget in wxWindow dtor later resulting in critical GTK warnings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-26 22:29:37 +00:00
Vadim Zeitlin
64b788642d Don't crash in wxMenuBar::Remove() if unattached in wxGTK.
It should be possible to remove a menu from a menu bar even before it is
attached to a frame without crashing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-26 22:29:14 +00:00
Vadim Zeitlin
f3128ca17d Update MSW installation instructions for 2.9.
Remove all mentions of 16 bit build.

Update the list of supported compilers and their versions.

Update Unicode build description.

Closes #11908.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72557 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-26 12:20:30 +00:00
Vadim Zeitlin
0d1dd76baa Merge "selected" and "active" child in wxAuiMDIParentFrame.
They are one and the same thing and so just make them really synonymous
instead of (unsuccessfully) trying to keep them synchronized.

Closes #14684.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-26 12:20:07 +00:00
Robin Dunn
d0c8c55aca Reserve the whole style byte for styles. See #14688
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-25 23:53:40 +00:00
Robin Dunn
48d63da328 Scintilla's Point class no longer matches the structure of wxPoint, so we need to copy points to a wxPoint array instead of just typcasting Scintilla's array. Fixes #14687
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-25 23:53:14 +00:00
Bryan Petty
7be2a7af39 Fixed interface typo breaking wxRibbonBar docs (from r72495).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-25 20:40:01 +00:00
Paul Cornett
cec92136b4 call Thaw() instead of DoThaw() so frozen status will be properly updated, and use a loop in case window has been frozen more than once
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-25 18:01:04 +00:00
Paul Cornett
6be306d4dc fix deleting a frozen multi-line wxTextCtrl, see #13543
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-25 17:55:00 +00:00
Vadim Zeitlin
317dfa4b70 Attempt to fix wxHelpControllerBase::SetFrameParameters() documentation.
Don't use "%s" in the brief comment, "%" is apparently not allowed there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-25 13:50:07 +00:00
Stefan Csomor
dea54670b3 adding constants for newer OSX versions to make sure our conditional expressions are working with earlier SDKs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-25 13:08:37 +00:00
Vadim Zeitlin
48b2fba025 Add wxGenericAboutDialog documentation.
Closes #14660.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-25 10:50:31 +00:00
Vadim Zeitlin
a7cf6f5556 Fix too hastily copy-pasted wxVariantDataSafeArray documentation.
Some parts were not updated after copying them from wxVariantDataErrorCode.

Closes #14689.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-25 10:50:07 +00:00
Vadim Zeitlin
1114902acf Really fix stack dumps for asserts and wxStackWalker::Walk() calls.
The code apparently tried to compensate for the wrong "skip" values used in
the calls to wxStackWalker::Walk() by skipping too much in Walk() itself which
was wrong as it dropped the frames that should have been shown.

Fix this by skipping only the one extra (compared to Walk() itself) frame we
add in wxStackWalker Unix implementation and not 3 of them and do skip more
frames when calling Walk() from assert failure handlers.

Also fix the wrong number of frames used in ProcessFrames(): we must not
subtract the number of skipped frames, they were already skipped.

Closes #14690.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-25 10:49:45 +00:00
Vadim Zeitlin
3fce0e6480 Use utf8_str(), not mb_str(), for strings passed to GTK+.
All GTK+ strings must be encoded in UTF-8, not whichever encoding the current
locale happens to use.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-25 10:49:22 +00:00
Vadim Zeitlin
d2fd662983 Vietnamese translations update from Trần Ngọc Quân.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-25 10:48:56 +00:00
Vadim Zeitlin
226fa6db3d Improve SAFEARRAY support in wxMSW OLE Automation code.
Add a new wxSafeArray<> class wrapping SAFEARRAY.

Also add support for converting VARIANTs containing other, previously
unsupported, standard types.

Closes #14637.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72543 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-23 22:49:50 +00:00
Vadim Zeitlin
2abce4af22 Explain EVT_CONTEXT_MENU generation in more details.
Document that you should not count on specific order of mouse right button and
context menu events.

Closes #12535.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-23 22:49:24 +00:00
Vadim Zeitlin
0079c032f5 No changes, just reuse a bit of code in wxMSW wxMDIParentFrame.
Call wxMDIChildFrame::Activate() instead of redoing the same thing. This also
ensures that iconized MDI children are restored before being activated (see
previous commit).

See #13946.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-23 22:49:01 +00:00
Vadim Zeitlin
254dceaaab Restore an iconized MDI child frame when activating it.
Without doing this activating an iconized frame doesn't do anything at all,
i.e. doesn't present it to the user as presumably intended.

Closes #13946.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-23 22:48:39 +00:00
Vadim Zeitlin
e380ca3cf8 Correct best size computation for wxCheckBox with borders under MSW.
As wxCheckBox can now have borders (see previous commit), we must override
DoGetBestClientSize() and not DoGetBestSize() in it to take account of them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-23 22:48:16 +00:00
Vadim Zeitlin
687823a157 Respect styles translated to WS_EX_XXX in wxMSW wxCheckBox and wxRadioButton.
Take into account the window styles that translate to extended Windows styles
at MSW level.

Also override MSWGetStyle() in these classes, just as in most (all?) other
ones, for consistency instead of doing wx-to-MSW styles translation directly
in Create().

Notice that as a side effect of this change, border styles now work for
wxCheckBox which wasn't the case before. It's not clear if this is really
wanted but OTOH there doesn't seem to be any real reason to forbid them
neither.

Closes #14674.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-23 22:47:52 +00:00
Vadim Zeitlin
863dc042da Allow wxWrapSizer to request more size than it used previously.
The code in wxWrapSizer::CalcMin() ensured that the sizer never requested more
space than what it had been already given which, while clearly done
intentionally, seems to be wrong because it can never end up with enough space
for all its rows/columns unless it is set to up to expand in the containing
sizer.

In other words, the old code could return the size which was not enough to
show the sizer contents fully which is against CalcMin() contract.

Change this by simply removing the check for the new minimal size being less
than the old one. This allows the wrap sizer demo in the layout sample to work
correctly whereas before the sizer contents was completely invisible initially.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-22 16:16:52 +00:00
Vadim Zeitlin
73eb7ca93f Make wxWrapSizer demo in the layout sample more dynamic.
Allow adding checkboxes to and removing them from the wrap sizer to
demonstrate how it adjusts to its contents dynamically.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-22 16:16:30 +00:00
Vadim Zeitlin
3e8cba9f8e Credit "sodev" with correct full name.
Amend the change log entry of r71701.

See #14380.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-22 16:16:07 +00:00