By Michael Fielding
As discussed on wx-dev. some fixes and improvements for Interprocess Communication (IPC), using DDE and TCP.
1. DDE buffers were using a global buffer
2. TCP buffers were allocated each time needed, and Request would have caused memory leaks had it been used.
Fixed these both by using a self-resizing buffer in wxConnectionBase. Changed samples and docs to reflect the improved (but backward compatible) internal buffer management. wxConnectionBase could (in future) use wxMemoryBuffer.
3. IPC sample had trouble closing, causing crash, when closing server using window X button.
Because it was (effectively) trying to delete a window in OnExit, when that window was already destroyed. Fixed by making IPCDialog and MyConnection remember if they'd destroyed each other. It's not elegant, but either the connection or the window could be deleted first.
4. Docs for wxDDE... and wxTCP... duplicated eachother, supposed to have same API. Some parts unclear.
Patch removes dde and tcp-specific files (including from tipc.tex and classes.tex), and explains how ipc.h selects for you which one to use based on platform. Some other misc clarifications.
6. Client sample was suffering apparent memory leak because of not deleting connection object, and had a hack in there to do that.
In fact this was due to the derived OnDisconnect not deleting itself, as it does in base class. Mentioned need to do it in docs, fixed sample so that it does.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Blindly tried to fix crash reported by Roman Vanicek on Mailing list:
SetCellHighlightColour sometimes segfaults in wxGTK. The
application crashes in LookupAttr.
Tentative explanation: Cache handling gets confused if LookupAttr gets
called on wxGridNoCell.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
GNU compiler included with Mac OS X 10.2 (Jaguar) as well as August Developer
Tools update contain a bug concerning #pragma interface handling that can only
be worked around by not using them (and they are not necessary anyways)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Benjamin I. Williams
There currently is a very significant problem with the
right-click behavior in wxTreeCtrl. The attached patch
file fixes this problem.
To better understand the problem, load up the tree
control, and start right-clicking on items. Note how
the focus rectangle does not behave properly. Next,
enable multiple selection. Now select several items,
and start right-clicking on the selected items. Note
how the selection highlights disappear.
If you try the tree sample with the generic tree
control, you will notice that the problem does not
occur, and that the tree control behaves properly.
This patch brings the MSW tree control implementation
in line with the generic implementation. This is the
same behavior that one can notice in applications such
as windows explorer and Visual Studio.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
By Robert O'Connor
This is a patch to wxTip Provider classes used by the "Tip of the day" dialog.
See wx-dev archives August 2002 for discussion of the functionality design.
It does 5 things:
-Support for comments inside the tips file. The pound character (#) is used, as recommended by Vadim.
-Allows optional easy translation support to tips, by marking them as translatable for gettext, by enclosing them in a _(""). Program will translate these tips at runtime from the active catalog.
-Blank lines or lines with just spaces are automatically skipped (I had to put this in, I keep wondering why I get blank tips sometimes and it is because the text file had a empty blank line at the end of the text file).
-There is a pluggable virtual function to preprocess to modify the tip in a derived class, in case something specialized is desired, such as variable expansion, etc, as recommended by Julian and Vadim.
-Now resets the tip counter if the previous tip is past the end of the file (ie you removed some tips, or changed tip files), as discussed on wx-dev.
This patch updates:
-The classes.
-The class documentation and the Tip-of-the-day topic overview documentation.
-The dialogs example, placing some new strings for the tips.txt file which demonstrate how to use the Tip-of-the-day features for in practice.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
By Michael Fielding (mfielding)
When using wxFileName::MakeRelativeTo with a new base of "x:\", the result is incorrect. It works fine when there is a subdirectory after x:\. I tracked this to a bug in GetLongPath; here is the fix.
Also, GetLongPath will now try and get as much long path as it can, failing only when part of the path cannot be found. eg
x:\existi~1\file not existing.new becomes
x:\existing directory\filenotexisting.new
instead of just staying the same.
Also, MakeRelative no longer makes filenames lowercase when it normalises them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
GNU compiler included with Mac OS X 10.2 (Jaguar) as well as August Developer
Tools update contain a bug concerning #pragma interface handling that can only
be worked around by not using them (and they are not necessary anyways)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775