Commit Graph

56898 Commits

Author SHA1 Message Date
Vadim Zeitlin
1054bcb21f Fix wxStyledTextCtrl::SetInsertionPointEnd().
This relied on SetInsertionPoint(-1) working like in wxTextCtrl but it didn't.
Add an explicit check to it for consistency with the other classes and to make
SetInsertionPointEnd() work.

Closes #15234.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:16 +00:00
Vadim Zeitlin
0a72cae73d Improve horizontal scrolling in wxRibbonControl.
Scroll by entire "sections", i.e. panes of the ribbon, instead of scrolling by
a fixed number of pixels as it's much more useful and user-friendly to uncover
the next section entirely instead of asking the user to press on the arrow
several times before being able to use it.

Closes #15232.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:11 +00:00
Vadim Zeitlin
ff3493c0ce Use deferred window positioning in wxWindow::Layout() in wxMSW.
Ensure that {Begin,End}RepositioningChildren() are called before/after
changing the positions of multiple children, whether we're using sizers or
constraints.

This fixes display corruption which could happen under Windows 7 and a child
resized first became bigger, pushing off the children resized later.

Closes #15214.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:06 +00:00
Vadim Zeitlin
1a986642f5 Add wxWindow::BeginRepositioningChildren() and EndRepositioningChildren().
This is just a refactoring of wxMSW code to make it possible to use deferred
window positioning from other places in subsequent commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:03 +00:00
Vadim Zeitlin
4300317631 Make wxSharedPtr::Release() really MT-safe.
Using wxAtomicDec() is not enough, its result also must be checked as it will
return 0 only in one of the threads if multiple threads call it in parallel,
while the old test for m_count==0 could pass for more than one thread,
resulting in deleting the same pointer more than once.

Closes #15227.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:20:58 +00:00
Vadim Zeitlin
3746766367 Fix for special characters in Doxygen comments.
Escape "-" characters in the beginning of the paragraph as they are not
handled properly by Doxygen otherwise.

Escape the space after "i.e." to prevent the brief doc string from being
terminated by it.

Escape "--" which is translated to a dash by Doxygen otherwise.

Closes #15228.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:20:53 +00:00
Vadim Zeitlin
a2d65663a0 Fix assert when adding columns to wxGrid using native header.
Change the order of updating m_colWidths array and the native header control
in wxGird::Redimension() to ensure that we can test whether the column is
shown (which results in accessing m_colWidths element at this column index)
from the wxGridHeaderCtrl::SetColumnCount().

Closes #15225.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:20:48 +00:00
Stefan Csomor
3d184f1e60 using an empty default menu bar when no menubar is available, see #12402
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 18:19:49 +00:00
Stefan Csomor
846c604304 make sure we have a default handling the quit command, see #12402
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 18:18:42 +00:00
Stefan Csomor
50f403a568 avoiding reshow of hidden windows when app is brought forward #12402
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 17:33:53 +00:00
Julian Smart
4c86168d9a Applied patch for #15189 - avoid crash when deleting focused cell (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-26 15:32:12 +00:00
Vadim Zeitlin
0a6ec346d5 Reset row and columns count in wxRichTextTable::ClearTable().
No real changes, just update the internal variables in ClearTable() to avoid
inconsistent internal state, even if this doesn't seem to result in any
problems for now.

Closes #15190.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-26 13:14:48 +00:00
Vadim Zeitlin
830c06655b Ensure that detached menus don't keep focus grab in wxGTK.
A widget being hidden must remove its focus grab with GTK+, otherwise GTK+
would continue sending all input messages to it but fail to process them
because the widget is not realized any more, resulting in a complete freeze of
the entire program.

Do it when detaching menus from menubar and menubar from the frame to fix just
such a problem in case SetMenuBar() was called while the previous menubar was
opened.

Closes #15221.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-26 13:14:43 +00:00
Vadim Zeitlin
a7587bc4a2 Fix printing multiple copies in wxMSW.
If wxPrinterDC was created by the native "Print" dialog for a printer that
supports printing multiple copies, we must not manually print multiple copies
ourselves as this results in too many copies being printed. However we still
need to loop explicitly for wxPrinterDC objects created manually or for the
printers without support for multiple copies (supposing they still exist).

Closes #10323.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-26 13:14:38 +00:00
Vadim Zeitlin
850a256b83 Use C locale representation for floating point numbers in wxAny.
Always use the decimal point, regardless of the current locale.

This completes the changes of r74019.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-26 13:14:35 +00:00
Vadim Zeitlin
2e1894d608 Tamil translations update from DINAKAR T.D.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-26 11:55:40 +00:00
Stefan Csomor
552be5fd77 adding x server license terms for polygon methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-24 17:05:19 +00:00
Stefan Csomor
a8900da766 adding x server license terms for polygon methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-24 17:04:01 +00:00
Stefan Csomor
9f9305c0d2 adding x server license terms for polygon methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-24 17:01:54 +00:00
Stefan Csomor
7a36d9c7c1 using scan-line polygon conversion for constructing wxregion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-24 16:54:37 +00:00
Robin Dunn
3fc2ee048d Add wxRTTI for the wxFileSystemWatcherEvent class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-24 16:05:33 +00:00
Steve Lamerton
276c32e15b Correctly link to wxWebViewNavigationError from wxWebViewEvent.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-24 14:38:39 +00:00
Steve Lamerton
178a73f313 Document the unused baseURL parameter in wxWebViewIE.
See #15223.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-24 14:04:56 +00:00
Vadim Zeitlin
4a8e979925 Add ctor and assign() taking an iterator range to wxVector<>.
Do it for consistency with wxArray and std::vector<>, even if the current
implementation is suboptimal.

See #15216.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-22 14:13:26 +00:00
Vadim Zeitlin
41da7d974a Add ctor from two input iterators to wxArray in STL build too.
This ctor already existed in non-STL build but was omitted from the STL
version.

Closes #15216.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-22 14:13:22 +00:00
Vadim Zeitlin
268331f0db Fix regression in wxGTK wxFilePickerCtrl due to wxFileDialog changes.
Revert the changes of r72979 and fix wxFileDialog::GetDirectory() return
value bug (see #14786) differently to avoid breaking wxFilePickerCtrl which
relies on getting wxEVT_BUTTON event when the associated dialog is dismissed.

Closes #15218.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-22 13:36:14 +00:00
Vadim Zeitlin
3ca5e2db2d Fix GTK+ errors during wxFilePickerCtrl destruction after recent changes.
We do need to destroy the dialog (see #15156), but we must not destroy its
GtkWidget as it is owned by GtkFileChooserButton itself, so amend the changes
of r74030 to only destroy the C++ object, not GTK+ one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-22 13:36:10 +00:00
Vadim Zeitlin
50f12a6313 Use the best instead of current page size in OS X preferences dialog.
The page, which is typically just a wxPanel, is usually not created with the
correct size, so resize it to its best size before showing it in the
preferences dialog.

This makes OS X behaviour consistent with MSW and GTK and is generally more
useful.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-21 23:47:20 +00:00
Vadim Zeitlin
48e0574704 Fit modeless preferences dialog to its contents too.
When a preferences dialog is shown non-modally, it should still fit to the
contents of its pages, so move the code added for the modal case in r73624
to the base wxGenericPreferencesEditorImplBase class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-21 23:17:29 +00:00
Vadim Zeitlin
eb1a78f7ff Turkish translations update from Kaya Zeren.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-21 12:02:10 +00:00
Vadim Zeitlin
1b495a94e6 Fix last count value after ReadAll() and WriteAll().
This corrects the bugs introduced when applying the patch adding these
functions in r74034: we can't simply use m_lastcount directly in them because
it's also modified by each call to Read() and Write(), so do use the temporary
variable.

See #12056.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-20 15:26:22 +00:00
Vadim Zeitlin
691745ab41 Add a public wxModalDialogHook class for intercepting modal dialogs.
Extract wxModalDialogHook from wx/testing.h into its own wx/modalhook.h,
extend it to allow to be notified not only about showing modal dialogs but
also about dismissing them and document it and show its use in the dialogs
sample.

Also replace all the WX_TESTING_SHOW_MODAL_HOOK macros occurrences with
WX_HOOK_MODAL_DIALOG.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-20 13:15:41 +00:00
Vadim Zeitlin
9bc3af3e64 Fix return value of wxCountingOutputStream::LastWrite().
Don't reuse m_lastcount in wxCountingOutputStream to store the stream length,
this doesn't make any sense and results in LastWrite() returning completely
wrong results as it expects m_lastcount to be the number of bytes written by
the last operation.

Add m_lastPos member to store the stream length instead.

Also correct wxCountingOutputStream documentation.

Closes #15215.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-20 13:15:26 +00:00
Vadim Zeitlin
0f5378d414 Make code reading BMP files more robust.
Check that we did correctly read the requested amount of data instead of
blindly assuming that the needed (from the point of view of BMP format
specification) number of bytes are always available -- this doesn't work so
well with corrupted or truncated files.

Closes #12056.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-20 13:15:21 +00:00
Vadim Zeitlin
cc437b9654 Add wxInputStream::ReadAll() and wxOutputStream::WriteAll().
Unlike Read() and Write(), these functions always transfer exactly the
specified number of bytes or fail.

See #12056.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-20 13:15:16 +00:00
Vadim Zeitlin
54582f9ac6 Link with liblzma when using built-in libtiff if it's available.
New version of libtiff includes code using liblzma if it's available, so we
need to link with it in this case.

Closes #14963.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-19 17:26:53 +00:00
Vadim Zeitlin
784eebb38c Propagate wxEVT_COMMAND_TEXT_UPDATED renaming to the real stc.cpp.
wxEVT_COMMAND_TEXT_UPDATED was renamed to wxEVT_TEXT in the generated stc.cpp
but not in stc.cpp.in it was generated from. Do it there too to prevent the
correct version in stc.cpp from being overwritten during the next regeneration.

See #10661.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-19 12:47:34 +00:00
Vadim Zeitlin
1cdaa5f251 Trigger wxLog auto-creation when getting old logger in wxLogChain ctor.
This ensures that a program that uses wxLogChain or one of the classes
deriving from it, such as wxLogWindow, can do it directly without worrying
about the standard logging being completely suppressed if the default log
target hadn't been instantiated yet.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-19 12:38:22 +00:00
Vadim Zeitlin
0553426814 Delete the associated dialog in wxGTK wx{File,Dir}Button.
The code seemed to rely on Destroy() being called for deleting the dialog, but
it's actually not used for child windows, so do it in dtor instead.

Closes #15156.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-19 12:38:18 +00:00
Vadim Zeitlin
622bc15f11 Add conversions to/from long long to wxUniChar.
Allow conversions to/from long long and unsigned long long values in wxUniChar
for consistency with the other integral types.

Also make the code shorter by using helper wxDO_FOR_INT_TYPES() and
wxDO_FOR_CHAR_INT_TYPES() macros to avoid duplicating the same code for all of
the integral types and having to handle wchar_t (and wxLongLong_t now)
specially because sometimes we may need to overload on it and sometimes not.

Finally, add more tests to check that all the wxUniChar methods compile and
work with all the different types.

Closes #15206.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-19 12:38:12 +00:00
Vadim Zeitlin
15df2e476b Disable menu event test case in wxGTK buildbot slaves.
This test sporadically fails for unknown reason and I don't know what to do
about it, so disable it for now to let the test suite pass consistently and be
notifed about any new failures.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-19 12:38:09 +00:00
Steve Lamerton
938506b1f7 Use wxCOMPtr throughout the wxWebViewIE Find code.
As well as making the code a bit neater this seems to fix some memory issues.

See #15207.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-18 14:07:58 +00:00
Vadim Zeitlin
43c42c18d3 Test using wxString::ToCDouble() in wxAny.
Apparently the heap corruption problems in wxOSX/PPC build are due to using
wxString::ToDouble() and not anything done specifically in wxAny at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-17 20:00:10 +00:00
Vadim Zeitlin
1422312707 Try using wxString::ToCDouble() instead of ToDouble() in wxAny case.
Apparently enabling the call to ToDouble() in the test is enough to corrupt
the heap in wxOSX PPC build. No idea how can this be possible but try to check
if using ToCDouble() helps...

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-17 11:53:46 +00:00
Vadim Zeitlin
e1bf9a5776 Make wxPreferencesEditor dtor virtual.
Mainly just to suppress g++ warnings about a class with virtual functions but
non-virtual dtor, this class isn't really supposed to be used polymorphically.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-17 11:53:43 +00:00
Robin Dunn
12346143b1 Add richtext event types.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 18:00:12 +00:00
Robin Dunn
42f2b395b7 More richtext fixes and cleanup for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 18:00:02 +00:00
Robin Dunn
a4eac7660c Add docs for SetMin and SetMax
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 17:57:01 +00:00
Vadim Zeitlin
8e912ebf47 Initialize wxXmlResourceHandler members in its ctor.
Not sure if this results in any real problems but at the very least memory
checking tools give errors about reading uninitialized memory in
wxXmlResourceHandlerImpl::CreateResource() if we leave them uninitialized, so
do initialize all the pointers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:43:13 +00:00
Vadim Zeitlin
615f9ff096 Allow wxPreferencesEditor::Dismiss() to work when using modal dialogs too.
The modal dialog case is not really different, the dialog may still need to be
dismissed if the associated object doesn't exist any longer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:43:09 +00:00