From unknown Sun Jun 22 22:42:28 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#2747 <2747@debbugs.gnu.org> To: bug#2747 <2747@debbugs.gnu.org> Subject: Status: [PATCH] 23.0.91; multi-line tooltips don't work on nextstep Reply-To: bug#2747 <2747@debbugs.gnu.org> Date: Mon, 23 Jun 2025 05:42:28 +0000 retitle 2747 [PATCH] 23.0.91; multi-line tooltips don't work on nextstep reassign 2747 emacs,ns submitter 2747 Nikolaj Schumacher severity 2747 normal thanks From me@nschum.de Sun Mar 22 10:46:59 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 22 Mar 2009 17:47:00 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.0 required=4.0 tests=IMPRONONCABLE_2, MURPHY_DRUGS_REL8 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2MHkvJf026608 for ; Sun, 22 Mar 2009 10:46:58 -0700 Received: from mx10.gnu.org ([199.232.76.166]:57582) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LlRlA-00014T-CA for emacs-pretest-bug@gnu.org; Sun, 22 Mar 2009 13:46:56 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LlRl8-0004s6-8z for emacs-pretest-bug@gnu.org; Sun, 22 Mar 2009 13:46:56 -0400 Received: from dd18200.kasserver.com ([85.13.138.168]:49931) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LlRl7-0004rq-MS for emacs-pretest-bug@gnu.org; Sun, 22 Mar 2009 13:46:53 -0400 Received: from thursday (unknown [78.52.32.58]) by dd18200.kasserver.com (Postfix) with ESMTP id B74C7182E2EB1 for ; Sun, 22 Mar 2009 18:46:55 +0100 (CET) From: Nikolaj Schumacher To: emacs-pretest-bug@gnu.org Subject: [PATCH] 23.0.91; multi-line tooltips don't work on nextstep User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (darwin) Date: Sun, 22 Mar 2009 18:46:51 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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 From rgm@gnu.org Sun Mar 22 12:50:11 2009 Received: (at control) by emacsbugs.donarmstrong.com; 22 Mar 2009 19:50:12 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.0 required=4.0 tests=VALID_BTS_CONTROL, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2MJo82F027952 for ; Sun, 22 Mar 2009 12:50:09 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LlTgL-0004CV-SH; Sun, 22 Mar 2009 15:50:05 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18886.38509.807817.77584@fencepost.gnu.org> Date: Sun, 22 Mar 2009 15:50:05 -0400 From: Glenn Morris To: control Subject: control message X-Debbugs-No-Ack: yes reassign 2745 spam reassign 2747 emacs,ns merge 2747 2278 severity 2748 minor severity 2750 minor From mituharu@math.s.chiba-u.ac.jp Sun Mar 22 18:50:53 2009 Received: (at 2747) by emacsbugs.donarmstrong.com; 23 Mar 2009 01:50:53 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mathmail.math.s.chiba-u.ac.jp (ntp.math.s.chiba-u.ac.jp [133.82.132.2]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2N1oomv027994 for <2747@emacsbugs.donarmstrong.com>; Sun, 22 Mar 2009 18:50:51 -0700 Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 751782C40; Mon, 23 Mar 2009 10:50:48 +0900 (JST) Date: Mon, 23 Mar 2009 10:50:48 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Nikolaj Schumacher , 2747@debbugs.gnu.org Subject: Re: bug#2747: [PATCH] 23.0.91; multi-line tooltips don't work on nextstep In-Reply-To: References: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII >>>>> On Sun, 22 Mar 2009 18:46:51 +0100, Nikolaj Schumacher said: > 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: It might solve this particular problem, but I think the whole tooltip code should be rewritten so as to use an Emacs frame like in the other platforms. (cf. http://lists.gnu.org/archive/html/emacs-devel/2009-03/msg00123.html) YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From unknown Sun Jun 22 22:42:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 03 Feb 2010 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator