diff src/nsmenu.m @ 97198:cf43f4e3ecc8

clear warnings and clean up NS port
author Adrian Robert <Adrian.B.Robert@gmail.com>
date Fri, 01 Aug 2008 14:01:08 +0000
parents 605ff890793b
children 248808aeee3e
line wrap: on
line diff
--- a/src/nsmenu.m	Fri Aug 01 12:56:49 2008 +0000
+++ b/src/nsmenu.m	Fri Aug 01 14:01:08 2008 +0000
@@ -53,8 +53,6 @@
 #include "nsmenu_common.c"
 #endif
 
-extern struct widget_value;
-
 extern Lisp_Object Qundefined, Qmenu_enable, Qmenu_bar_update_hook;
 extern Lisp_Object QCtoggle, QCradio;
 
@@ -594,9 +592,9 @@
   return [NSString stringWithFormat: @"%c", tpos[2]];
 }
 
-- (id <NSMenuItem>)addItemWithWidgetValue: (void *)wvptr
+- (NSMenuItem *)addItemWithWidgetValue: (void *)wvptr
 {
-  id <NSMenuItem> item;
+  NSMenuItem *item;
   widget_value *wv = (widget_value *)wvptr;
 
   if (name_is_separator (wv->name))
@@ -663,7 +661,7 @@
   /* add new contents */
   for (; wv != NULL; wv = wv->next)
     {
-      id <NSMenuItem> item = [self addItemWithWidgetValue: wv];
+      NSMenuItem *item = [self addItemWithWidgetValue: wv];
 
       if (wv->contents)
         {
@@ -691,10 +689,9 @@
 - (EmacsMenu *)addSubmenuWithTitle: (char *)title forFrame: (struct frame *)f
 {
   NSString *titleStr = [NSString stringWithUTF8String: title];
-  id <NSMenuItem> item
-      = [self addItemWithTitle: titleStr
-                        action: nil /*@selector (menuDown:) */
-	         keyEquivalent: @""];
+  NSMenuItem *item = [self addItemWithTitle: titleStr
+                                     action: nil /*@selector (menuDown:) */
+                              keyEquivalent: @""];
   EmacsMenu *submenu = [[EmacsMenu alloc] initWithTitle: titleStr frame: f];
   [self setSubmenu: submenu forItem: item];
   [submenu release];
@@ -1107,7 +1104,7 @@
 #endif
 
       wv_title->name = (char *) SDATA (title);
-      wv_title->enabled = NULL;
+      wv_title->enabled = NO;
       wv_title->button_type = BUTTON_TYPE_NONE;
       wv_title->help = Qnil;
       wv_title->next = wv_sep;