mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Retain tooltip strings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26147 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2dabdc3270
commit
6afdbb5209
2 changed files with 23 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2008-02-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSToolTips.m: Fix bug #22421
|
||||
|
||||
2008-02-25 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSBitmapImageRep.m (-_premultiply, _unpremultiply): Flag
|
||||
|
|
|
@ -71,10 +71,28 @@
|
|||
{
|
||||
return data;
|
||||
}
|
||||
- (void) dealloc
|
||||
{
|
||||
if ([object respondsToSelector:
|
||||
@selector(view:stringForToolTip:point:userData:)] == NO)
|
||||
{
|
||||
/* Object must be a string rather than something which provides one */
|
||||
RELEASE(object);
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
- (id) initWithObject: (id)o userData: (void*)d rect: (NSRect)r
|
||||
{
|
||||
data = d;
|
||||
object = o;
|
||||
if ([object respondsToSelector:
|
||||
@selector(view:stringForToolTip:point:userData:)] == NO)
|
||||
{
|
||||
/* Object does not provide a string ... so we take a copy of it
|
||||
* as the string to be used.
|
||||
*/
|
||||
object = [[object description] copy];
|
||||
}
|
||||
viewRect = r;
|
||||
return self;
|
||||
}
|
||||
|
@ -231,7 +249,7 @@ static BOOL restoreMouseMoved;
|
|||
}
|
||||
else
|
||||
{
|
||||
toolTipString = [[provider object] description];
|
||||
toolTipString = [provider object];
|
||||
}
|
||||
|
||||
timer = [NSTimer scheduledTimerWithTimeInterval: 0.5
|
||||
|
|
Loading…
Reference in a new issue