diff options
| author | Adrian Robert | 2008-08-01 14:01:08 +0000 |
|---|---|---|
| committer | Adrian Robert | 2008-08-01 14:01:08 +0000 |
| commit | 150349607cf648e78d34aa16ef1d43d774bc6044 (patch) | |
| tree | 7d57cf5f3e5163c7ea3019b9527409df771efe42 /src/nsmenu.m | |
| parent | 27ec92c98304e2b61dc20a1db65972b0eb00d4cc (diff) | |
| download | emacs-150349607cf648e78d34aa16ef1d43d774bc6044.tar.gz emacs-150349607cf648e78d34aa16ef1d43d774bc6044.zip | |
clear warnings and clean up NS port
Diffstat (limited to 'src/nsmenu.m')
| -rw-r--r-- | src/nsmenu.m | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/nsmenu.m b/src/nsmenu.m index 9d17da43596..822aa94efa9 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m | |||
| @@ -53,8 +53,6 @@ int menu_trace_num = 0; | |||
| 53 | #include "nsmenu_common.c" | 53 | #include "nsmenu_common.c" |
| 54 | #endif | 54 | #endif |
| 55 | 55 | ||
| 56 | extern struct widget_value; | ||
| 57 | |||
| 58 | extern Lisp_Object Qundefined, Qmenu_enable, Qmenu_bar_update_hook; | 56 | extern Lisp_Object Qundefined, Qmenu_enable, Qmenu_bar_update_hook; |
| 59 | extern Lisp_Object QCtoggle, QCradio; | 57 | extern Lisp_Object QCtoggle, QCradio; |
| 60 | 58 | ||
| @@ -594,9 +592,9 @@ name_is_separator (name) | |||
| 594 | return [NSString stringWithFormat: @"%c", tpos[2]]; | 592 | return [NSString stringWithFormat: @"%c", tpos[2]]; |
| 595 | } | 593 | } |
| 596 | 594 | ||
| 597 | - (id <NSMenuItem>)addItemWithWidgetValue: (void *)wvptr | 595 | - (NSMenuItem *)addItemWithWidgetValue: (void *)wvptr |
| 598 | { | 596 | { |
| 599 | id <NSMenuItem> item; | 597 | NSMenuItem *item; |
| 600 | widget_value *wv = (widget_value *)wvptr; | 598 | widget_value *wv = (widget_value *)wvptr; |
| 601 | 599 | ||
| 602 | if (name_is_separator (wv->name)) | 600 | if (name_is_separator (wv->name)) |
| @@ -663,7 +661,7 @@ name_is_separator (name) | |||
| 663 | /* add new contents */ | 661 | /* add new contents */ |
| 664 | for (; wv != NULL; wv = wv->next) | 662 | for (; wv != NULL; wv = wv->next) |
| 665 | { | 663 | { |
| 666 | id <NSMenuItem> item = [self addItemWithWidgetValue: wv]; | 664 | NSMenuItem *item = [self addItemWithWidgetValue: wv]; |
| 667 | 665 | ||
| 668 | if (wv->contents) | 666 | if (wv->contents) |
| 669 | { | 667 | { |
| @@ -691,10 +689,9 @@ name_is_separator (name) | |||
| 691 | - (EmacsMenu *)addSubmenuWithTitle: (char *)title forFrame: (struct frame *)f | 689 | - (EmacsMenu *)addSubmenuWithTitle: (char *)title forFrame: (struct frame *)f |
| 692 | { | 690 | { |
| 693 | NSString *titleStr = [NSString stringWithUTF8String: title]; | 691 | NSString *titleStr = [NSString stringWithUTF8String: title]; |
| 694 | id <NSMenuItem> item | 692 | NSMenuItem *item = [self addItemWithTitle: titleStr |
| 695 | = [self addItemWithTitle: titleStr | 693 | action: nil /*@selector (menuDown:) */ |
| 696 | action: nil /*@selector (menuDown:) */ | 694 | keyEquivalent: @""]; |
| 697 | keyEquivalent: @""]; | ||
| 698 | EmacsMenu *submenu = [[EmacsMenu alloc] initWithTitle: titleStr frame: f]; | 695 | EmacsMenu *submenu = [[EmacsMenu alloc] initWithTitle: titleStr frame: f]; |
| 699 | [self setSubmenu: submenu forItem: item]; | 696 | [self setSubmenu: submenu forItem: item]; |
| 700 | [submenu release]; | 697 | [submenu release]; |
| @@ -1107,7 +1104,7 @@ ns_popup_menu (Lisp_Object position, Lisp_Object menu) | |||
| 1107 | #endif | 1104 | #endif |
| 1108 | 1105 | ||
| 1109 | wv_title->name = (char *) SDATA (title); | 1106 | wv_title->name = (char *) SDATA (title); |
| 1110 | wv_title->enabled = NULL; | 1107 | wv_title->enabled = NO; |
| 1111 | wv_title->button_type = BUTTON_TYPE_NONE; | 1108 | wv_title->button_type = BUTTON_TYPE_NONE; |
| 1112 | wv_title->help = Qnil; | 1109 | wv_title->help = Qnil; |
| 1113 | wv_title->next = wv_sep; | 1110 | wv_title->next = wv_sep; |