diff options
| author | Adrian Robert | 2009-09-27 15:48:51 +0000 |
|---|---|---|
| committer | Adrian Robert | 2009-09-27 15:48:51 +0000 |
| commit | f27a64a912771b21e448f903c0b3ee857c437398 (patch) | |
| tree | d8a3e93ec2b6b53e787c97d5c535c2e72a6e9fbe /src | |
| parent | abd5747ed94ae15ca754f246cdfa5b51d3b2a497 (diff) | |
| download | emacs-f27a64a912771b21e448f903c0b3ee857c437398.tar.gz emacs-f27a64a912771b21e448f903c0b3ee857c437398.zip | |
(ns_app_name): New variable. (ns_term_init): Set and use it. (ns_term_shutdown): Use it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.m | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index aecd3e7bfdf..008860f94fb 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -175,6 +175,7 @@ NSString *ns_selection_color; | |||
| 175 | Lisp_Object ns_confirm_quit; | 175 | Lisp_Object ns_confirm_quit; |
| 176 | 176 | ||
| 177 | NSArray *ns_send_types =0, *ns_return_types =0, *ns_drag_types =0; | 177 | NSArray *ns_send_types =0, *ns_return_types =0, *ns_drag_types =0; |
| 178 | NSString *ns_app_name = @"Emacs"; /* default changed later */ | ||
| 178 | 179 | ||
| 179 | /* Display variables */ | 180 | /* Display variables */ |
| 180 | struct ns_display_info *x_display_list; /* Chain of existing displays */ | 181 | struct ns_display_info *x_display_list; /* Chain of existing displays */ |
| @@ -3820,6 +3821,8 @@ ns_term_init (Lisp_Object display_name) | |||
| 3820 | 3821 | ||
| 3821 | delete_keyboard_wait_descriptor (0); | 3822 | delete_keyboard_wait_descriptor (0); |
| 3822 | 3823 | ||
| 3824 | ns_app_name = [[NSProcessInfo processInfo] processName]; | ||
| 3825 | |||
| 3823 | /* Set up OS X app menu */ | 3826 | /* Set up OS X app menu */ |
| 3824 | #ifdef NS_IMPL_COCOA | 3827 | #ifdef NS_IMPL_COCOA |
| 3825 | { | 3828 | { |
| @@ -3848,7 +3851,6 @@ ns_term_init (Lisp_Object display_name) | |||
| 3848 | keyEquivalent: @"" | 3851 | keyEquivalent: @"" |
| 3849 | atIndex: 4]; | 3852 | atIndex: 4]; |
| 3850 | [appMenu setSubmenu: svcsMenu forItem: item]; | 3853 | [appMenu setSubmenu: svcsMenu forItem: item]; |
| 3851 | /* [svcsMenu setSupercell: item]; */ | ||
| 3852 | [appMenu insertItem: [NSMenuItem separatorItem] atIndex: 5]; | 3854 | [appMenu insertItem: [NSMenuItem separatorItem] atIndex: 5]; |
| 3853 | [appMenu insertItemWithTitle: @"Hide Emacs" | 3855 | [appMenu insertItemWithTitle: @"Hide Emacs" |
| 3854 | action: @selector (hide:) | 3856 | action: @selector (hide:) |
| @@ -3865,7 +3867,7 @@ ns_term_init (Lisp_Object display_name) | |||
| 3865 | keyEquivalent: @"q" | 3867 | keyEquivalent: @"q" |
| 3866 | atIndex: 9]; | 3868 | atIndex: 9]; |
| 3867 | 3869 | ||
| 3868 | item = [mainMenu insertItemWithTitle: @"Emacs" | 3870 | item = [mainMenu insertItemWithTitle: ns_app_name |
| 3869 | action: @selector (menuDown:) | 3871 | action: @selector (menuDown:) |
| 3870 | keyEquivalent: @"" | 3872 | keyEquivalent: @"" |
| 3871 | atIndex: 0]; | 3873 | atIndex: 0]; |
| @@ -4099,7 +4101,7 @@ ns_term_shutdown (int sig) | |||
| 4099 | if (NILP (ns_confirm_quit)) // || ns_shutdown_properly --> TO DO | 4101 | if (NILP (ns_confirm_quit)) // || ns_shutdown_properly --> TO DO |
| 4100 | return NSTerminateNow; | 4102 | return NSTerminateNow; |
| 4101 | 4103 | ||
| 4102 | ret = NSRunAlertPanel([[NSProcessInfo processInfo] processName], | 4104 | ret = NSRunAlertPanel(ns_app_name, |
| 4103 | [NSString stringWithUTF8String:"Exit requested. Would you like to Save Buffers and Exit, or Cancel the request?"], | 4105 | [NSString stringWithUTF8String:"Exit requested. Would you like to Save Buffers and Exit, or Cancel the request?"], |
| 4104 | @"Save Buffers and Exit", @"Cancel", nil); | 4106 | @"Save Buffers and Exit", @"Cancel", nil); |
| 4105 | 4107 | ||