Mercurial > emacs
changeset 105200:f9c0c73cfc74
nsmenu.m (EmacsMenu-clear): Recognize application menu
on Mac OS X 10.6+ (bug#4513).
author | David Reitter <david.reitter@gmail.com> |
---|---|
date | Fri, 25 Sep 2009 17:40:53 +0000 |
parents | 8b6d9d4b0bf1 |
children | cdc275504289 |
files | src/ChangeLog src/nsmenu.m |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Fri Sep 25 06:15:30 2009 +0000 +++ b/src/ChangeLog Fri Sep 25 17:40:53 2009 +0000 @@ -1,3 +1,8 @@ +2009-09-25 David Reitter <david.reitter@gmail.com> + + * nsmenu.m (EmacsMenu-clear): Recognize application menu + on Mac OS X 10.6+ (bug#4513). + 2009-09-24 Juanma Barranquero <lekktu@gmail.com> * frame.c (xrdb_get_resource): Return nil for empty string resources;
--- a/src/nsmenu.m Fri Sep 25 06:15:30 2009 +0000 +++ b/src/nsmenu.m Fri Sep 25 17:40:53 2009 +0000 @@ -668,7 +668,7 @@ /* convenience */ --(void) clear +-(void)clear { int n; @@ -676,7 +676,9 @@ { NSMenuItem *item = [self itemAtIndex: n]; NSString *title = [item title]; - if (([title length] == 0 || [@"Apple" isEqualToString: title]) + if (([title length] == 0 /* OSX 10.5 */ + || [@"Emacs" isEqualToString: title] /* from 10.6 on */ + || [@"Apple" isEqualToString: title]) /* older */ && ![item isSeparatorItem]) continue; [self removeItemAtIndex: n];