emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/src nsmenu.m


From: Adrian Robert
Subject: [Emacs-diffs] emacs/src nsmenu.m
Date: Sun, 27 Sep 2009 15:49:09 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Adrian Robert <arobert> 09/09/27 15:49:08

Modified files:
        src            : nsmenu.m 

Log message:
        (ns_update_menubar): Use ns_app_name.  Sync with xmenu.c.  
(EmacsMenu-clear:, ns_popup_dialog): Use ns_app_name.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/nsmenu.m?cvsroot=emacs&r1=1.27&r2=1.28

Patches:
Index: nsmenu.m
===================================================================
RCS file: /sources/emacs/emacs/src/nsmenu.m,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- nsmenu.m    25 Sep 2009 17:40:53 -0000      1.27
+++ nsmenu.m    27 Sep 2009 15:49:08 -0000      1.28
@@ -156,7 +156,7 @@
 
   if (menu == nil)
     {
-      menu = [[EmacsMenu alloc] initWithTitle: @"Emacs"];
+      menu = [[EmacsMenu alloc] initWithTitle: ns_app_name];
       needsSet = YES;
     }
   else
@@ -171,16 +171,6 @@
   t = -(1000*tb.time+tb.millitm);
 #endif
 
-  /* widget_value is a straightforward object translation of emacs's
-     Byzantine lisp menu structures */
-  wv = xmalloc_widget_value ();
-  wv->name = "Emacs";
-  wv->value = 0;
-  wv->enabled = 1;
-  wv->button_type = BUTTON_TYPE_NONE;
-  wv->help = Qnil;
-  first_wv = wv;
-
 #ifdef NS_IMPL_GNUSTEP
   deep_p = 1; /* until GNUstep NSMenu implements the Panther delegation model 
*/
 #endif
@@ -399,6 +389,14 @@
       int n;
       Lisp_Object string;
 
+      wv = xmalloc_widget_value ();
+      wv->name = "menubar";
+      wv->value = 0;
+      wv->enabled = 1;
+      wv->button_type = BUTTON_TYPE_NONE;
+      wv->help = Qnil;
+      first_wv = wv;
+
       /* Make widget-value tree w/ just the top level menu bar strings */
       items = FRAME_MENU_BAR_ITEMS (f);
       if (NILP (items))
@@ -677,7 +675,7 @@
       NSMenuItem *item = [self itemAtIndex: n];
       NSString *title = [item title];
       if (([title length] == 0  /* OSX 10.5 */
-          || [@"Emacs" isEqualToString: title]  /* from 10.6 on */
+          || [ns_app_name isEqualToString: title]  /* from 10.6 on */
           || [@"Apple" isEqualToString: title]) /* older */
           && ![item isSeparatorItem])
         continue;
@@ -1663,7 +1661,7 @@
   area.size.height= TEXTHEIGHT;
   command = [[[NSTextField alloc] initWithFrame: area] autorelease];
   [[self contentView] addSubview: command];
-  [command setStringValue: @"Emacs"];
+  [command setStringValue: ns_app_name];
   [command setDrawsBackground: NO];
   [command setBezeled: NO];
   [command setSelectable: NO];




reply via email to

[Prev in Thread] Current Thread [Next in Thread]