bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#2747: marked as done ([PATCH] 23.0.91; multi-line tooltips don't wor


From: Emacs bug Tracking System
Subject: bug#2747: marked as done ([PATCH] 23.0.91; multi-line tooltips don't work on nextstep)
Date: Mon, 04 Jan 2010 06:26:01 +0000

Your message dated Mon, 4 Jan 2010 07:25:24 +0100
with message-id <A51A6A3E-37F9-4417-A5E9-E7AF2135D1BA@gmail.com>
and subject line done
has caused the Emacs bug report #2278,
regarding [PATCH] 23.0.91; multi-line tooltips don't work on nextstep
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact bug-gnu-emacs@gnu.org
immediately.)


-- 
2278: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2278
Emacs Bug Tracking System
Contact bug-gnu-emacs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] 23.0.91; multi-line tooltips don't work on nextstep Date: Sun, 22 Mar 2009 18:46:51 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (darwin)
In GNU Emacs 23.0.91.1 (i386-apple-darwin9.6.0, NS apple-appkit-949.43)
 of 2009-03-22 on thursday
Windowing system distributor `Apple', version 10.3.949
configured using `configure  '--with-ns' '--with-x''


Only the first line multi-line tooltips like

  (tooltip-show "foo\nbar")

appear on nextstep.


The following patch seems to be a simple (perhaps too simple?) solution:


diff --git a/src/nsmenu.m b/src/nsmenu.m
index 9a97492..97d29e9 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1398,10 +1398,7 @@ update_frame_tool_bar (FRAME_PTR f)
   NSColor *col = [NSColor colorWithCalibratedRed: 1.0 green: 1.0
                                             blue: 0.792 alpha: 0.95];
   NSFont *font = [NSFont toolTipsFontOfSize: 0];
-  NSFont *sfont = [font screenFont];
-  int height = [sfont ascender] - [sfont descender];
-/*[font boundingRectForFont].size.height; */
-  NSRect r = NSMakeRect (0, 0, 100, height+6);
+  NSRect r = NSMakeRect (0, 0, 100, 100);
 
   textField = [[NSTextField alloc] initWithFrame: r];
   [textField setFont: font];
@@ -1438,10 +1435,8 @@ update_frame_tool_bar (FRAME_PTR f)
 - (void) setText: (char *)text
 {
   NSString *str = [NSString stringWithUTF8String: text];
-  NSRect r = [textField frame];
-  r.size.width = [[[textField font] screenFont] widthOfString: str] + 8;
-  [textField setFrame: r];
   [textField setStringValue: str];
+  [textField sizeToFit];
 }
 
 - (void) showAtX: (int)x Y: (int)y for: (int)seconds



--- End Message ---
--- Begin Message --- Subject: done Date: Mon, 4 Jan 2010 07:25:24 +0100
patch was checked in 2009-06-14.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]