Commit Graph

55994 Commits

Author SHA1 Message Date
Vadim Zeitlin
5da0565d52 Mention David Hart bug fixes in wxFileSystemWatcher.
See #14488, #14490, #14544.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:10:34 +00:00
Vadim Zeitlin
0b3ef556f5 Handle deletion of watched directories in wxFileSystemWatcher sample.
Don't assert when trying to stop watching a directory that doesn't exist any
more later.

See #14544.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:10:12 +00:00
Vadim Zeitlin
0f306261b8 Fix bug in Unix wxFileSystemWatcher implementation when watch is deleted.
Don't assert when removing a watch descriptor from the stale descriptors list.

See #14544.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:09:49 +00:00
Vadim Zeitlin
6eef5763a8 Check for filespec when generating events in wxFileSystemWatcher.
Instead of setting watches on individual files when a non-empty filespec is
given, always watch all the files but just ignore the events from the ones not
matching the filespec. This makes the code simpler and fixes several bugs.

See #14544.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:09:25 +00:00
Vadim Zeitlin
c063adebba Add support for symlinks to wxFileName.
Allow to work with the symlinks themselves and not the file they reference by
calling the new wxFileName::DontFollowLink().

Update Unix wxDir implementation to not treat symlinks to directories as
directories, this ensures that we don't recurse into the directories outside
of the original parent accidentally.

Closes #14542.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:09:01 +00:00
Vadim Zeitlin
76cfd1bf95 Make wxFileSystemWatcher watch entries reference-counted.
This helps to avoid problems that arise from watching the same physical file
system path multiple times, which could happen when adding a watch for a path
already watched because of a recursive watch on a parent directory, for
example.

Closes #14490.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:08:37 +00:00
Vadim Zeitlin
227dee95e0 Improve handling of file spec in wxFileSystemWatcher::AddTree().
Fix watching too many files (i.e. even those not matching the provided spec)
and asserts when removing a recursive watch with a file spec in wxMSW.

Closes #14488.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:08:13 +00:00
Václav Slavík
0f3d125b1a anybutton.cpp compilation fix for wxUSE_IMAGE=0.
Disabled bitmaps are not rendered properly in this configuration, they
look the same as normal ones. This is hardly ideal, but such
degradations are to be expected when disabling something as widely used
as wxImage.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-14 19:30:46 +00:00
Václav Slavík
c586011992 Compilation fix - wx/vector.h is not part of PCH.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-14 19:15:23 +00:00
Václav Slavík
2d748a33ba wxDisplay only needs dynlib.h, not dynload.h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-14 19:14:59 +00:00
Vadim Zeitlin
332afcdb2f Make GetClippingBox() work for wxPrinterDC in wxGTK.
GetClippingBox() implementation relies on wxDCImpl::m_clip[XY][12] being
updated in DoSetClippingRegion() but this wasn't done here. Fix this by adding
the code to do this to the base class version of this method and calling it
from wxGtkPrinterDCImpl.

Also, refactor wxGCDCImpl to reuse the same code instead of duplicating it.

Closes #14697.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-14 14:55:32 +00:00
Vadim Zeitlin
4d604ad397 Provide stand-in IDropTargetHelper definition to fix VC6 build.
VC6 SDK doesn't define this interface, so do it ourselves to fix its build
after the changes of r72668.

See #14697.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-14 14:42:58 +00:00
Vadim Zeitlin
1dc17bcafb Make TAB behaviour in wxGrid more configurable.
Allow making TAB/Shift-TAB wrap to the next/previous row or going to the
next/previous control when the cursor is at the end/beginning of the current
row easily.

Also add wxEVT_GRID_TABBING event to allow customizing TAB behaviour even
further.

Update the sample to show the different possible standard behaviours and a
stupid example of a custom one (it would be probably more useful to implement
something a tad more realistic, e.g. tabbing to the next non-empty cell).

Closes #14711.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:55:18 +00:00
Vadim Zeitlin
ac6a837eed Just correct the path in the header comment.
Add the missing "private" path component.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:54:55 +00:00
Vadim Zeitlin
b9fc07ba8b Document that HasFocus() is new in 2.9.
Closes #14740.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:54:32 +00:00
Vadim Zeitlin
b0134e31e6 No changes, just update a comment about default buttons in wxMSW.
Remove the TODO from it because it's not really obvious if using the proposed
approach is such a good idea.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:54:09 +00:00
Vadim Zeitlin
403750325d Display system-provided drag images during drag-and-drop in wxMSW.
This is especially useful when dragging files from Explorer as it provides
big, informative drag images for them that can be easily displayed using
Windows shell support for them.

See #14697.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:53:46 +00:00
Vadim Zeitlin
0ec1064b79 Use a "hidden" dialog, not frame, in sync wxExecute() hack in wxMSW.
Replace a "hidden" (not really, but shown far off screen) frame with a dialog
to avoid this frame appearing in the Alt+TAB list.

Closes #13251.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:53:22 +00:00
Vadim Zeitlin
90bad79f70 Set the standard sample icon for the exec sample.
Do this for consistency with all the other ones and also because it makes it
simpler to notice any unwanted icons for hidden windows created by this sample.

See #13251.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:52:59 +00:00
Vadim Zeitlin
6754c300cf Freeze wxTreeCtrl in wxMSW by hiding it.
This is far from perfect but better than alternative as freezing this control
by sending WM_SETREDRAW to it can result in completely broken behaviour as
explained in http://support.microsoft.com/kb/130611. And not freezing it at
all shows horrible flicker when adding even a relatively small number of items
at once to the control because it recalculates and repositions its scrollbars
after every parent node addition.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:52:35 +00:00
Vadim Zeitlin
861bdae474 Set wxTAB_TRAVERSAL for wxNavigationEnabled<> windows with focusable children.
We need to have this flag under wxMSW in order for navigation events to be
generated for the window. As wxNavigationEnabled can't set this flag on
creation because its ctor is called too early, do it in overridden AddChild().

Closes #13271.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:52:12 +00:00
Vadim Zeitlin
e68b7b364a Allow using windows that can't be focused with wxNavigationEnabled<>.
The code in wxNavigationEnabled<> assumed that the window itself could be
focused if it didn't have any focusable children because it was originally
extracted from wxPanel that can, indeed, be focused. This is however not the
case for all windows, notably not for wxStaticBox which now derives from
wxNavigationEnabled as well but can never be focused itself.

Add wxControlContainer::DisableSelfFocus() and call it from wxStaticBox to
support this situation. This required splitting m_acceptsFocus flag into
m_acceptsFocusSelf and m_acceptsFocusChildren and updating various methods
using them.

See #13271.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:51:50 +00:00
Vadim Zeitlin
4ea366746b Use WS_EX_CONTROLPARENT for wxStaticBox in wxMSW.
This doesn't change anything currently but it seems correct to use this style
with wxStaticBox as it can now contain other windows (and so be "control
parent"), so it could allow Windows or other programs checking for this style
to handle it more correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:51:27 +00:00
Vadim Zeitlin
8f0271018e Remove unused wxNavigationEnabled::AcceptFocus() method.
This doesn't seem to be ever called or used from anywhere else.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:51:04 +00:00
Vadim Zeitlin
4e9a014e9b Document wxListBox limitation concerning TAB characters.
TABs appear simply as a space under MSW (because we don't use LBS_USETABSTOPS
style there) but are aligned to (multiple of 8?) tab stops under GTK. It's not
clear which behaviour is actually preferable so for now just document the
inconsistency and advise people to use spaces instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:50:41 +00:00
Vadim Zeitlin
c68f710526 Remove mention of "listbox callback" from wxListBox documentation.
This is probably a left over from wxWidgets 1.x.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:50:19 +00:00
Vadim Zeitlin
b00cf746ab Improve explanation of maximal number of wxListBox items in the documentation.
Don't say that it's limited -- because, strictly speaking, it isn't -- but
mention other controls that are better alternatives for large numbers of items.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:49:56 +00:00
Vadim Zeitlin
256edfbf11 Do give focus to the wxNotebook page when switching to it under MSW.
Switching to the page but keeping the focus on the notebook itself makes it
difficult to use the UI from keyboard and is inconsistent with the behaviour
of native property sheets. Do restore the code to set the focus to the page as
the bug that resulted in a wrong radio button being selected when we did this
was apparently fixed elsewhere in the meanwhile because it doesn't happen any
more even with this change.

See #2268.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-13 22:49:33 +00:00
Vadim Zeitlin
c254e996ca Tamil translations update from DINAKAR T.D.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-12 18:45:38 +00:00
Vadim Zeitlin
d01c174676 Document default argument value of wxListCtrl::EnableBellOnNoMatch().
In addition to forgetting to specify the default value in wxGenericListCtrl,
it was also not documented, do it now to complete the fix of r72654.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-11 22:29:35 +00:00
Vadim Zeitlin
4d3d97a84c Use "true" by default in wxGenericListCtrl::EnableBellOnNoMatch().
The changes of r72639 mistakenly omitted the default value for
EnableBellOnNoMatch() argument in this class (although it was present in the
base class and in wxGenericTreeCtrl), fix this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-11 12:41:07 +00:00
Jouk Jansen
8f4e96c0e3 Update setup.h for OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-11 11:15:21 +00:00
Vadim Zeitlin
705c834b75 Mention InvalidateBestSize() in DoGetBestClientSize() documentation.
It is not obvious that it needs to be called when the best size changes, so
give at least a hint.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-10 18:47:19 +00:00
Julian Smart
4aa079bf56 Don't write text if it's empty
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-10 15:45:08 +00:00
Vadim Zeitlin
4d4e7a8a73 Do return the protocol part from GetLocaltion() for local wxFSFiles.
wxLocalFSHandler created wxFSFile without the protocol information which means
that calling GetLocaltion() on this file later doesn't return it, contrary to
the documentation.

Do include the protocol to fix this.

Closes #14638.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-09 21:28:33 +00:00
Vadim Zeitlin
319faba717 Generate text events in generic wxSpinCtrl itself.
The text events in a wxSpinCtrl should originate from the control itself but
they were just propagated upwards from wxTextCtrl embedded into it and hence
had wrong event object and event ID fields.

Fix this by making EVT_TEXT come from wxSpinCtrl itself, in addition to
EVT_TEXT_ENTER ones which we already forwarded like this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-09 21:02:17 +00:00
Vadim Zeitlin
34af6cfc8d Copy wxCommandEvent string explicitly in its copy ctor.
Due to the optimization used in wxCommandEvent::GetString(), which returns the
string from the text control that generated the event only if it's really
needed, wxCommandEvent::m_cmdString field may be empty even when it does have
an associated string. As we lose the possibility to retrieve the value on
demand from wxTextCtrl when we make a copy (because it can be associated with
a different object), we need to explicitly copy the string to avoid losing
this data entirely.

This fixes GetString() value for the text events generated by generic
wxSearchCtrl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-09 21:01:53 +00:00
Vadim Zeitlin
8d489a5e4b Fix printing in landscape mode in wxGTK.
Only apply Cairo transforms in StartPage(), doing it earlier interferes with
the code doing the coordinate system rotation inside GTK+ itself when a
non-portrait printing mode is used.

Closes #14732.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-09 21:01:29 +00:00
Vadim Zeitlin
bf47204759 Document wxGrid methods dealing with cell overflow.
Closes #14733.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-08 12:09:59 +00:00
Vadim Zeitlin
bb03d283be Recreate GtkPrintOperation every time when printing in wxGTK.
Apparently reusing GtkPrintOperation is not allowed, so create a new one
every time we need it.

Closes #14731.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-08 12:09:37 +00:00
Vadim Zeitlin
9fa99f045e Improve wxAuiNotebook appearance when using some GTK themes.
Let wxAuiNotebook render the border itself, instead of doing it in dock art
class. This allows the notebook to do it correctly for the current theme.

Closes #14710.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-08 12:09:13 +00:00
Vadim Zeitlin
1bcef6701b Ensure that key events are sent to focused window first in wxGTK.
Start processing key events from the currently focused window, this ensures
that its key event handlers are tried before the top level window
accelerators.

This is consistent with wxMSW and allows a window to locally override the
global accelerators which really makes sense.

Closes #14553.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:42:50 +00:00
Vadim Zeitlin
d34d31f6d6 Implement incremental search in wxGenericListCtrl.
Mostly copy wxGenericTreeCtrl incremental search implementation to
wxGenericListCtrl (unfortunately there is no simple way to reuse this code
currently), including the recently added EnableBellOnNoMatch() method.

Update the sample to test it, the key event handling in it had to be modified
to allow it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:42:27 +00:00
Vadim Zeitlin
27bc919446 Add a possibility to beep on no match to wxGenericTreeCtrl.
For consistency with Windows, allow to optionally generate a beep when
incremental search in the tree control doesn't find anything.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:42:02 +00:00
Vadim Zeitlin
e0dec8753a Fix return value of wxGenericTreeCtrl::FindItem().
We incorrectly returned the item we started from instead of invalid item if
there was no match, fix this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:41:38 +00:00
Vadim Zeitlin
4d1cf9f3d3 Handle successive key presses better in wxGenericTreeCtrl search code.
Go to the next item starting with the given character if the same one is
pressed multiple times. This is more useful than searching for an item
starting with multiple occurrences of this character (which usually won't
exist) and is more consistent with how Windows handles this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:41:15 +00:00
Vadim Zeitlin
a4e4e66dd6 Recognize "_" as alphanumeric key in wxGenericTreeCtrl find item code.
Items can have underscores in their names too, not just letters and digits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:40:52 +00:00
Vadim Zeitlin
15ec266ae3 Fix spurious label editing in generic wx{List,Tree,DataView}Ctrl.
Clicking on the control to give it focus must not start editing the label of
an item in it, this is bad UI as you need to carefully select where do you
click to avoid starting to edit the label and nobody else does it like this
(probably because of the former reason).

As a side note, it would be really great to abstract the item handling in a
class that could be reused by all these controls instead of having to update 3
slightly different versions of the same code every time.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:40:29 +00:00
Vadim Zeitlin
e55e1a5fda Don't set focus explicitly in wxGenericListCtrl mouse handling code.
Just skip the event to allow the system to set the focus to the control
itself. This is more consistent with the other controls and should result in
correct behaviour everywhere automatically.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:40:06 +00:00
Vadim Zeitlin
6ceda4f536 Don't set focus to generic wxDataViewCtrl on any button press.
Only set focus if the left button was pressed for consistency with just about
everything else. Also, just skip the event instead of setting the focus
explicitly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-07 22:39:43 +00:00