Commit Graph

52531 Commits

Author SHA1 Message Date
Václav Slavík
9a49372428 More wxControl::Ellipsize() tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-09 19:52:50 +00:00
Václav Slavík
4b52555d71 Don't eliminate text completely in Ellipsize().
If the shortened text is so short there's nothing left of the original,
show one character and "...". This is standard behaviour on both
Windows and OS X, in addition to making lot of sense.

Fixes #11360.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-09 19:52:34 +00:00
Václav Slavík
38ddd614f2 Calculate ellipsized width exactly.
Width calculation using partial extents is just an inaccurate
estimate: partial extents have sub-pixel precision and are rounded
by GetPartialTextExtents(). Use partial extents to
estimate string width and only verify it with GetTextExtent()
when it looks good.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-09 19:52:22 +00:00
Václav Slavík
508fc76d0c Don't shorten text too much in wxControl::Ellipsize().
If the allowed width is so small that nothing reasonable can fit it,
overlap it. Ellipsized text must always contain "..." to indicate that
it was shortened, it isn't acceptable to omit it.

See #11360.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-09 19:52:10 +00:00
Václav Slavík
d6ebae9a94 Ellipsization can't shorten 1-character string.
It doesn't make sense to attempt to shorten 1 character long string, so
don't do it. Note that 2 characters strings may be shortened (consider
e.g. "mm" in some typefaces).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-09 19:51:58 +00:00
Václav Slavík
1d065710d3 Remove "safety margin" from wxControl::Ellipsize().
When ellipsizing kicks in, the text is much shorter than the available
space -- there's a "safety margin" of one character's width that is
always left unused. This appears to be some kludge that worked around
algorithm defects, not something that should really be needed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-09 19:51:47 +00:00
Jaakko Salli
90fae9d2cf Added missing wxBitmapComboBox::Insert() implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-09 19:11:13 +00:00
Vadim Zeitlin
b083f3e8c1 Tweak offset in the RichTextCtrlTestCase::UrlEvent() to make it pass.
The mouse was not positioned over the URL in this test so clicking it didn't
work. Tweak the offset to make it pass but it would be better to have some
more fool-proof way of finding the real position of the text in the control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-08 17:24:50 +00:00
Vadim Zeitlin
fb76ad8f55 Use wxLocale instead of setlocale() to change the locale in the tests.
Numeric validator tests rely on wxLocale::GetInfo() returning the decimal
point and calling setlocale() is not enough to ensure this under MSW, we must
use wxLocale for this currently.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-08 17:24:45 +00:00
Stefan Csomor
816b29417d disabling multiline text controls correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-08 14:19:20 +00:00
Stefan Csomor
6ade9e8917 forward enable functionality to inner view in scrollview (eg for multiline textviews)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-08 14:11:56 +00:00
Vadim Zeitlin
e4c903b2ea Fix wxWrapSizer minimal size calculation.
Add a unit test checking that wxWrapSizer::CalcMin() returns the expected
results.

Closes #12464.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-08 13:36:13 +00:00
Vadim Zeitlin
8de6a0270d Fix bytes to integers conversion in png2c script.
Use really correct coefficients for all the bytes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-08 13:36:06 +00:00
Vadim Zeitlin
21b5902b81 Define KEY_WOW64_64KEY if it is missing from SDK headers.
Fixes compilation with old SDKs, e.g. the one used by VC6.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-08 13:36:01 +00:00
Stefan Csomor
aa3e374197 copy item text for app menu items from wx menus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-08 10:47:19 +00:00
Vadim Zeitlin
31a9fc9390 Correct more wxEVT_AUXn_XXX event types names.
This completes the changes of r64414 and also removes the extraneous "MOUSE"
from the event types listed in the wxMouseEvent ctor documentation.

Closes #12095.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-06 01:01:14 +00:00
Vadim Zeitlin
302674fe17 Use better title by default in wxDocPrintout.
Use the document name instead of the default "Printout" if no title is
explicitly specified when creating wxDocPrintout.

Closes #12885.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-06 01:01:09 +00:00
Vadim Zeitlin
a5c468483d Allow accessing 64 bit registry from 32 bit MSW code and vice versa.
Implement support for KEY_WOW64_32KEY and KEY_WOW64_64KEY in wxRegKey code.

Closes #10792.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-06 01:01:01 +00:00
Vadim Zeitlin
e615d356fc Use Explorer style for wxTreeCtrl with wxTR_TWIST_BUTTONS in wxMSW.
The tree control style used by Explorer uses rotating triangles instead of the
standard "+/-" buttons and so seems to correspond relatively well to this
style. And this provides a possibility to have a more standard-looking tree
controls in wxWidgets programs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-06 01:00:48 +00:00
Vadim Zeitlin
1f77d487b7 Clean up wxMSW wxTreeCtrl code by removing obsolete workarounds.
Remove wxUSE_COMCTL32_SAFELY that hasn't been needed for years, the current
code seems to work just fine on all the systems so remove this obsolete
workaround to simplify it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-06 01:00:40 +00:00
Vadim Zeitlin
57c7447463 Link console programs with PNG library in monolithic build.
PNG images are used by the main wxWidgets library itself now and so linking
with the monolithic wx library introduces dependencies on PNG as well, even
for the console applications. Link them with linpng to avoid linker errors.

Closes #12889.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-05 20:25:09 +00:00
Vadim Zeitlin
a8bda51207 Correct decoding of 4-byte integers in png2c script.
Wrong multiplier was used for the most significant byte. Fix it even though it
doesn't risk to be a problem in practice as the images of such gigantic size
would surely break some limit anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-05 20:24:52 +00:00
Vadim Zeitlin
7721116699 Re-enable generation of wxEVT_MOVE_{START,END} events under wxMSW.
Handling of WM_{ENTER,EXIT}SIZEMOVE was disabled as a side-effect of r47927,
possibly unintentionally. Revert this change to generate these events again.

Also document that they're MSW-only for now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-05 20:24:47 +00:00
Vadim Zeitlin
41628a43cb Don't adjust menu item positions for title for menubar menus in wxMSW.
The code in wxMSW menu code which accounted for the extra items used to show
popup menu title has become incorrect since the changes of r66178 as now the
non-popup menus have titles as well.

Correct the check to only do the adjustment for the popup menus.

Closes #12922.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-05 16:38:53 +00:00
Vadim Zeitlin
0a12e013f5 Deprecate second parameter of wxSlider::SetTickFreq().
This parameter was never needed nor properly documented. Simply remove it from
SetTickFreq() and keep the overload still taking it for backwards
compatibility only.

Closes #12907.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-05 16:36:30 +00:00
Vadim Zeitlin
c20389eb5f Implement restoring default video mode under OS X.
Use CGRestorePermanentDisplayConfiguration() to implement switching to default
video mode in wxOSX wxDisplay implementation.

Closes #12914.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-05 16:36:18 +00:00
Vadim Zeitlin
55dffc4f13 Check for WLAN interface names in wxDialUpManager under Unix.
Recognize "wlan" and "ath" interfaces as well as the "eth" ones.

Closes 12923.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-05 16:14:24 +00:00
Julian Smart
8757ab3623 Fix for lines not wrapping soon enough if tabs are present
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-03 20:05:33 +00:00
Vadim Zeitlin
00eef16d51 Rebake everything using bakefile 0.2.9.
Update configure and bakefile.m4 for the new version too.

Also add the missing makefiles and projects for the XTI sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-03 15:02:45 +00:00
Jouk Jansen
23fd114fcd Avoid incompatible operand types
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-03 10:59:50 +00:00
Stefan Csomor
cc5fe8d459 fixes #10978
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-03 10:20:01 +00:00
Stefan Csomor
f67a33e3ad switching to assert
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-02 13:49:44 +00:00
Dimitri Schoolwerth
15f345aad3 Added support for reading comments from a GIF image.
Applied (modified) patch by troelsk. Changed comments (which are allowed per frame in an animated GIF) to be read using wxIMAGE_OPTION_GIF_COMMENT with wxImage.GetOption. Added unit tests for reading and writing GIF comments.

Closes #12843.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-02 11:19:30 +00:00
Stefan Csomor
41857332b6 testing for define alone is sufficient and more portable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-02 07:56:38 +00:00
Stefan Csomor
11f87a381b fixing searchctrl on osx_cocoa, changing type for peer to wxSearchCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-02 07:55:57 +00:00
Stefan Csomor
2f250cb6e6 guard against null ptr access
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-02 07:36:18 +00:00
Václav Slavík
4d3de2c5f7 Account for first removal char with wxELLIPSIZE_MIDDLE.
wxControl::Ellipsize() in wxELLIPSIZE_MIDDLE mode starts the
string-shortening loop with the removal interval initially set to remove
only the len/2-th character. But it didn't add its size to the running
total of removal characters' length, thus always removing one more
character. Fixed by making the initial interval 0-sized rather than
1-sized.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-31 18:23:32 +00:00
Václav Slavík
3433de6e63 Remove chars one-by-one with wxELLIPSIZE_MIDDLE.
Previously, Ellipsize() would always remove two characters at a time in
wxELLIPSIZE_MIDDLE mode. This was clearly a bug: it led to shortening
the text more than was strictly necessary.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-31 18:23:29 +00:00
Václav Slavík
3999336cb9 Fix vertical rules rendering in generic wxDataViewCtrl.
Vertical rules are now drawn in the last pixel of a column instead of in
the first, so that they align perfectly with native MSW wxHeaderCtrl as
well as for consistency with MSW native list control.  There's no
vertical rule at the most-left side of the control anymore.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-31 16:54:03 +00:00
Stefan Csomor
ec46fd5fce adding support for wxCANCEL_DEFAULT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-30 19:01:37 +00:00
Vadim Zeitlin
85ecb1d5ca OLE uses VARIANT_TRUE and not TRUE for its boolean values.
VARIANT_TRUE is -1, unlike TRUE which is just 1, and we must use the former
and not the latter with OLE VARIANT values.

Closes #12910.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-29 14:20:42 +00:00
Vadim Zeitlin
ff4713940d Revert "Set up pages range in the wxMSW print dialog correctly."
This patch changed the relative order of calls to wxPrintout::GetPageInfo()
and OnPreparePrinting(), breaking the existing code and the documentation
promise about OnPreparePrinting() being called first, so revert it.

Reverts r66549.
See #12819.
Closes #12911.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-29 13:55:40 +00:00
Jouk Jansen
aadabb545b Update OpenVMS makefile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-28 15:01:01 +00:00
Dimitri Schoolwerth
64a3ee76aa Allow writing a comment to each GIF frame.
Don't write a comment as part of the GIF header during the first frame only but write a possible comment for each wxImage in an animation.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-28 08:36:34 +00:00
Dimitri Schoolwerth
da60600bc9 Added support for writing a long comment to a GIF image.
Instead of limiting a comment to a maximum length of 255 bytes write multiple comment data blocks (each a Pascal string) followed by the block terminator.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-28 08:10:01 +00:00
Stefan Csomor
7279a306bb clang fix, fixes #12332
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-28 07:35:07 +00:00
Dimitri Schoolwerth
491da41173 Changed the procedure for writing a comment to a GIF image.
Use wxImage.SetOption with newly introduced wxIMAGE_OPTION_GIF_COMMENT to set a GIF's image comment now. Formerly this was done (since recently) using wxGIFHandler::ms_comment which has now been removed.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-28 07:27:34 +00:00
Paul Cornett
d4280c0282 better way to silence unused parameter warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-28 06:18:33 +00:00
Bryan Petty
be4980ab43 Properly account for floated panes while restoring maximized pane.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-28 02:21:42 +00:00
Stefan Csomor
db2c04684d clang fixes, fixes #12332
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-27 18:35:01 +00:00