Commit Graph

55212 Commits

Author SHA1 Message Date
Vadim Zeitlin
20ebd9ffbf Allow closing wxAuiTabCtrl pages without switching to them.
Clicking on the page "x" close button switched to the page before doing
anything else which was unusual as other tabbed controls don't behave like
this.

Handle clicks on the close button specially and avoid switching to the page
which is about to be closed anyhow.

Closes #14150.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-29 12:08:05 +00:00
Vadim Zeitlin
22930be86c Fix focus handling logic in generic wxListCtrl.
Don't override SetFocus() to set the focus to the main window, this isn't
enough as we can be given the focus by the underlying toolkit itself, without
our SetFocus() being called -- this happened in wxGTK when focus was changed
from the keyboard using TAB and in this case it didn't get to the main window
but remaining on the wxListCtrl itself meaning that keyboard input wasn't
processed at all.

Use wxNavigationEnabled<> now to ensure that OnSetFocus() and related methods
do the right thing instead now.

Also get rid of OnSetFocus() in wxListHeaderWindow, it's better to override
AcceptsFocus() to return false to avoid getting focus in the first place.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-29 00:10:53 +00:00
Steve Lamerton
34326da778 Minor changes, just trim trailing spaces in webview code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-28 18:00:30 +00:00
Vadim Zeitlin
324ab5e2db Document that wxDateTime::UNow() returns UTC time.
This wasn't clear and was probably surprising as this is different from Now()
behaviour.

See #14149.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-28 11:29:40 +00:00
Stefan Csomor
1e9e4113e9 adding correct behavior for move events as the are issued under OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-28 09:13:40 +00:00
Steve Lamerton
e81ef29720 Correctly use QueryInterface in GetDocument to ensure that we only return an IHTMLDocument2 pointer if one is available. Check GetDocument being NULL when used. This fixes the displaying of non-html documents such as pdfs.
Fixes #14060

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-27 19:33:59 +00:00
Robin Dunn
0ffc170455 Add missing interface items for listctrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-27 17:28:56 +00:00
Vadim Zeitlin
6f26e88002 Honour source wxDC coordinate system in wxDC::Blit() in wxMSW.
wxGTK and wxOSX already did this so do it in wxMSW as well.

Update the documentation to make this explicit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-27 12:28:04 +00:00
Vadim Zeitlin
825842b411 Make wxDC::Blit() and StretchBlit() documentation more useful.
Enumerating the list of parameters in the method description is not especially
helpful, don't do it. Explain the functions relationship instead.

Also don't say that StretchBlit() is not implemented in wxGTK because it does
work there (using the generic implementation using wxDC scale).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-27 12:28:01 +00:00
Vadim Zeitlin
90761420ee Set wxTextAreaBase::m_filename in the methods of this class itself.
m_filename member was declared in wxTextAreaBase but set only in the
overridden wxTextCtrlBase methods. This meant that it wasn't updated correctly
in wxStyledTextCtrl which also derives from wxTextAreaBase and so saving
SaveFile() with empty file name didn't work there even when the control had
been originally loaded from a file.

Move the code updating m_filename to wxTextAreaBase itself to fix this. This
also simplifies the code as it's now not necessary to override
Do{Load,Save}File() in wxTextCtrlBase at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-27 11:58:09 +00:00
Vadim Zeitlin
dace99a4ef Use IsDescendant() in wxTopLevelWindow::IsActive() implementation.
Avoid wxGetTopLevelParent() which doesn't work for the strange TLWs which
override IsTopLevel() to return false, as wxMDIChildFrame does in wxMSW.
Using IsDescendant() works in any case and also is arguably more clear.

Closes #3063.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-27 11:58:05 +00:00
Vadim Zeitlin
8b2f64c6c1 Added wxWindow::IsDescendant() helper.
This function checks if another window is a direct or indirect child of this
one, which can be needed in a number of situations.

See #3063.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-27 11:58:02 +00:00
Julian Smart
ed98f424de Corrected scale factor for the use of DC PPI instead of printer PPI in wxRTC code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-26 16:57:05 +00:00
Paul Cornett
55a0fa4e54 non-pch build fix, closes #14140
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-26 15:44:31 +00:00
Vadim Zeitlin
11c2d6d3bc Arabic translations update from Fatma Mehanna.
Also backport the translations to 2.8 branch.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-26 11:52:14 +00:00
Vadim Zeitlin
ba3b628e8f No changes, just small cleanup in AUI GTK tab art drawing code.
Use more clear variable names; remove commented out assignments to inexistent
variables.

Closes #14139.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-26 11:24:01 +00:00
Vadim Zeitlin
ce0092d71f Fix gap box coordinates in GTK AUI tab art code.
Closes #14138.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-26 11:23:58 +00:00
Vadim Zeitlin
0d57a51305 Minor fix to wxGraphicsContext::SetInterpolationQuality() in wxMSW.
Only update the internal variable if we really succeeded in changing the
interpolation mode.

See #14134.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-26 11:23:54 +00:00
Paul Cornett
6b1f115551 remove unneeded includes and forward declaration
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 23:34:42 +00:00
Paul Cornett
a99e147a5c remove unused variable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 23:33:43 +00:00
Paul Cornett
54195d23c2 replace wxBitmap::SetPixbuf() with wxBitmap ctor taking pixbuf
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 23:33:18 +00:00
Vadim Zeitlin
b05875c977 Fix generic wxTimePickerCtrl on DST change dates.
Do not use the date when DST changes as the date part of wxDateTime object
used by wxTimePickerGeneric internally as this introduces problems with times
that can't be represented at all -- and so can't be entered into the control.
Use arbitrary date on which DST does not change to avoid this.

Closes #14137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 23:17:04 +00:00
Vadim Zeitlin
c0795ce8ea Added wxTimePickerCtrl::GetTime() and SetTime().
These methods, taking broken down time representation, avoid the problems
arising due to DST complications when using wxDateTime to represent the time
as special care needs to be taken in this case to avoid using the date part
corresponding to a DST change date at which time is discontinuous.

Document the problem with the old functions and use the new ones in the
sample.

See #14137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 23:17:01 +00:00
Paul Cornett
25d7cf54f0 build fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 19:15:54 +00:00
Vadim Zeitlin
069358b7cc Implement native tab art for wxAUI in wxGTK.
Use native wxAuiTabArt implementation in wxGTK, it better conforms to the
system style.

Closes #14098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:56:04 +00:00
Vadim Zeitlin
4758baf5eb Refactor wxAUI: extract wxAuiTabArt in a separate file.
No real changes, just extract wxAuiTabArt into its own file. Also rename
wxAuiDefaultTabArt to wxAuiSimpleTabArt in preparation for having other tab
art classes as the default one.

See #14098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:55:59 +00:00
Vadim Zeitlin
445a98c7d2 Explicitly include wx/aui/dockart.h from the file needing it.
src/aui/tabmdi.cpp needs wxAuiDockArt declaration as it uses it, don't rely on
wx/aui/dockart.h being included from other wxAUI headers and include it from
here explicitly.

See #14098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:55:52 +00:00
Vadim Zeitlin
740dd154a5 Add a private GetNotebookWidget() accessor to wxGTK.
This is similar to the other existing functions and allows to access
GtkNotebook-specific style.

See #14098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:55:49 +00:00
Vadim Zeitlin
5c26126c14 Export wxGTK private widget creation functions from core library.
This is necessary to allow using them from other libraries, e.g. wxAUI that
will do it in the upcoming commits.

See #14098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:55:45 +00:00
Vadim Zeitlin
2970f22a89 Include <wx/textctrl.h> from <wx/combobox.h> for compatibility.
The wxComboBox header itself doesn't need <wx/textctrl.h> but there exists
code using wxComboBox with wxTextCtrl styles and events that doesn't include
<wx/textctrl.h> explicitly because it wasn't necessary in 2.8. So include it
from wx/combobox.h to avoid breaking this code after an upgrade to 2.9.

Closes #14132.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 17:55:42 +00:00
Vadim Zeitlin
f17ac57417 Return valid pointers from wxDateTime::ParseXXX() with non-wxString strings.
The pointer returned by wxDateTime::ParseXXX() methods could point into a
buffer of a temporary wxString created to wrap a char* or wchar_t* argument so
dereferencing it was illegal.

Fix this by defining separate overloads for char*/wchar_t* arguments returning
pointers into the original string.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 16:45:53 +00:00
Vadim Zeitlin
52dc2108ae Add helper wxString::IterOffsetInMBStr() method.
This method can be used to recover the pointer in char* buffer containing
multi-byte string representation corresponding to the given iterator which is
useful for implementing backwards-compatible functions that must be able to
return such pointers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 16:45:50 +00:00
Vadim Zeitlin
9d98c19792 Correct Eric Jensen name in the change log.
See #14134.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 12:14:53 +00:00
Vadim Zeitlin
4323bbde8d Fix bug with parsing time formats during DST periods.
wxDateTime::ParseFormat() used todays date as fall back when parsing all
formats, including those involving times, which meant that its results
depended on whether DST was active at the time of the parsing which was
clearly wrong.

Fix this by using a fixed date on which DST is known not to be active as fall
back date.

This fixes unit test failures in DateTimeTestCase::TestTimeFormat() when it
was ran on a DST transition date.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 00:31:47 +00:00
Vadim Zeitlin
14f3866748 Add a gdb pretty printer for wxDateTime.
Format it using Python datetime module in the standard ISO notation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-25 00:31:38 +00:00
Vadim Zeitlin
ce84ef6a7f Allow hiding rows in wxGrid with HideRow().
HideRow() was simply ignored as SetRowSize(row, 0) didn't do anything. Check
for the special value of 0 and allow it, just as it was done for the columns
since r57336.

See #14133.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-24 18:24:19 +00:00
Vadim Zeitlin
c3562311c8 Implement wxGraphicsContext::SetInterpolationQuality() for wxMSW.
Provide implementation of the previously stubbed out method.

Closes #14134.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-24 18:24:15 +00:00
Paul Cornett
3f6439ae66 avoid reported problem with RHEL 5 GTK+ 2.10 where selection is reset by a clipboard callback, closes #13277
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-23 16:50:13 +00:00
Vadim Zeitlin
42e86f64b7 Don't cache incorrect length in wxString::DoUngetWriteBuf().
The length here is the size of the buffer in bytes and is not necessarily the
string length in code points (notably not for non-ASCII strings in UTF-8
build).

Closes #14130.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-23 15:13:16 +00:00
Vadim Zeitlin
556a836e0f Don't cache incorrect length in wxString::assign(char*, size_t).
The length of the string here is specified in bytes and is not the same as the
string length for non-ASCII UTF-8 strings, so don't cache it as the string
length.

Just invalidate the cached length instead as we simply don't know what the
real length of the string is going to be.

See #14130.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-23 15:13:13 +00:00
Vadim Zeitlin
bd42a07c7a Fix caching wrong length in wxString(str, len) ctor in UTF-8 build.
A length greater than that of the source string could be passed to this ctor.
This worked correctly, i.e. created a string which was a copy of the source
one but cached a wrong length for it.

Avoid this by explicitly checking the length before caching it in
wxString::assign(str, len).

See #14130.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-23 15:13:08 +00:00
Jouk Jansen
d1485d8177 update setup for OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-23 09:30:14 +00:00
Paul Cornett
8e98dabce4 fix building with GTK+ < 2.8
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-22 18:09:43 +00:00
Vadim Zeitlin
b9e52a19e6 Implement horizontal mouse wheel events support for wxMSW.
Handle WM_MOUSEHWHEEL messages and translate them to the corresponding
wxMouseEvents.

Closes #14105.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-22 00:27:02 +00:00
Vadim Zeitlin
41469c9e5e Use enum for wxMouseEvent::m_wheelAxis instead of int.
This variable can take only 2 values, use symbolic names for them instead of
difficult to understand 0 and 1.

See ##14105.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-22 00:26:59 +00:00
Vadim Zeitlin
32632baf6d Use pthread_setconcurrency() in wxThread::SetConcurrency().
Use POSIX function if available instead of only using Solaris-specific
thr_setconcurrency() which is not found in modern Linux systems any more.

Closes #2115.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-22 00:12:40 +00:00
Robin Dunn
84484a8ddd Avoid assert when deleting columns if there is more columns than there are column labels
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-21 16:42:00 +00:00
Vadim Zeitlin
8d241dea5c Fix display of "const" methods in wxGTK assert dialog.
Don't separate the function name and its arguments types in 2 different
columns in the assert dialog, this doesn't really work with const methods as
"const" can't be separated from the function like this. The old code just
didn't take "const" into account at all and mangled all the const methods by
showing ") cons" (no typo) at the end.

Just show everything in one column to avoid the problem and also simplify the
code.

Closes #14104.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-21 00:11:12 +00:00
Vadim Zeitlin
996de8322b Remove empty and unnecessary wxFontDialogBase destructor.
This fixes build with wxUSE_FONTMAP==0 as this dtor was only defined inside
"#if wxUSE_FONTMAP" section. Instead of fixing this, just get rid of this dtor
entirely as it was unnecessary anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-20 23:31:25 +00:00
Vadim Zeitlin
a4087a4324 Fix wxMSW compilation when wxUSE_FONTMAP==0.
Don't use wxFontMapper::GetEncodingName() in wxFontEnumerator if wxFontMapper
is not available.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-20 23:26:39 +00:00