You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.4 KiB
35 lines
1.4 KiB
Description: Remove wxSTRING_MAXLEN (removed in wx3.0) and incomp. definition.
|
|
The definition wxSTRING_MAXLEN was removed from the public API of wxWidgets.
|
|
Its meaning was basically "take all the string", whenever a string length was
|
|
expected. The missing definition didn't raise a compilation error because
|
|
TreeLib's treedrawer.h contained a fall-back definition, which is however
|
|
incompatible with the original definition of wxWidgets and therefore is
|
|
interpreted by wxWidgets as a number representing the real string length.
|
|
This patch gets rid of the dangerous fall-back definition and of all of its
|
|
uses by using alternative wxString constructors that achieve the same
|
|
behavior.
|
|
Author: Martin Steghöfer <martin@steghoefer.eu>
|
|
Last-Update: Sun, 10 Aug 2014 14:06:42 +0200
|
|
Bug-Debian: http://bugs.debian.org/751255
|
|
|
|
--- tv-0.5.orig/TreeLib/treedrawer.cpp
|
|
+++ tv-0.5/TreeLib/treedrawer.cpp
|
|
@@ -245,7 +245,7 @@
|
|
// error in gcc, which is probably a gcc bug
|
|
{
|
|
wxCoord w, h, descent;
|
|
- wxString s (formatedString.c_str(), wxSTRING_MAXLEN);
|
|
+ wxString s (formatedString.c_str());
|
|
pt.x += dc->GetCharWidth();
|
|
pt.y -= dc->GetCharHeight()/2;
|
|
dc->DrawText (s, (int)pt.x, (int)pt.y);
|
|
@@ -566,7 +566,7 @@
|
|
|
|
#if USE_WXWINDOWS
|
|
wxCoord w, h;
|
|
- wxString s (buf, wxSTRING_MAXLEN);
|
|
+ wxString s (buf);
|
|
dc->GetTextExtent (s, &w, &h);
|
|
int x = (int)pt2.x;
|
|
int y = (int)pt2.y;
|