emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r113798: Fix crash on OSX >= 10.7.


From: Jan D.
Subject: [Emacs-diffs] trunk r113798: Fix crash on OSX >= 10.7.
Date: Sun, 11 Aug 2013 15:34:29 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113798
revision-id: address@hidden
parent: address@hidden
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Sun 2013-08-11 17:34:26 +0200
message:
  Fix crash on OSX >= 10.7.
  
  * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame:
  (initWithTitle:): Initialize frame to 0.
  (fillWithWidgetValue:): Call fillWithWidgetValue:frame.
  (fillWithWidgetValue:frame:): Renamed from
  fillWithWidgetValue:setDelegate, call initWithTile:frame: if f.
  
  * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to
  fillWithWidgetValue:frame:
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/nsmenu.m                   nsmenu.m-20091113204419-o5vbwnq5f7feedwu-8744
  src/nsterm.h                   nsterm.h-20091113204419-o5vbwnq5f7feedwu-8746
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-08-11 15:05:13 +0000
+++ b/src/ChangeLog     2013-08-11 15:34:26 +0000
@@ -1,5 +1,14 @@
 2013-08-11  Jan Djärv  <address@hidden>
 
+       * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame:
+       (initWithTitle:): Initialize frame to 0.
+       (fillWithWidgetValue:): Call fillWithWidgetValue:frame.
+       (fillWithWidgetValue:frame:): Renamed from
+       fillWithWidgetValue:setDelegate, call initWithTile:frame: if f.
+
+       * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to
+       fillWithWidgetValue:frame:
+
        * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
        remove memory leak warnings.
 

=== modified file 'src/nsmenu.m'
--- a/src/nsmenu.m      2013-08-11 14:57:12 +0000
+++ b/src/nsmenu.m      2013-08-11 15:34:26 +0000
@@ -366,7 +366,7 @@
         }
       else
         {
-          [menu fillWithWidgetValue: first_wv->contents setDelegate:YES];
+          [menu fillWithWidgetValue: first_wv->contents frame: f];
         }
 
     }
@@ -527,6 +527,7 @@
 /* override designated initializer */
 - initWithTitle: (NSString *)title
 {
+  frame = 0;
   if ((self = [super initWithTitle: title]))
     [self setAutoenablesItems: NO];
   return self;
@@ -725,10 +726,10 @@
 
 - (void)fillWithWidgetValue: (void *)wvptr
 {
-  [self fillWithWidgetValue: wvptr setDelegate:NO];
+  [self fillWithWidgetValue: wvptr frame:nil];
 }
 
-- (void)fillWithWidgetValue: (void *)wvptr setDelegate: (BOOL)set
+- (void)fillWithWidgetValue: (void *)wvptr frame: (struct frame *)f
 {
   widget_value *wv = (widget_value *)wvptr;
 
@@ -743,11 +744,13 @@
 
       if (wv->contents)
         {
-          EmacsMenu *submenu = [[EmacsMenu alloc] initWithTitle: [item title]];
-
-#ifdef NS_IMPL_COCOA
-          if (set) [submenu setDelegate: submenu];
-#endif
+          EmacsMenu *submenu;
+
+          if (f)
+            submenu = [[EmacsMenu alloc] initWithTitle: [item title] frame:f];
+          else
+            submenu = [[EmacsMenu alloc] initWithTitle: [item title]];
+
           [self setSubmenu: submenu forItem: item];
           [submenu fillWithWidgetValue: wv->contents];
           [submenu release];

=== modified file 'src/nsterm.h'
--- a/src/nsterm.h      2013-08-11 14:57:12 +0000
+++ b/src/nsterm.h      2013-08-11 15:34:26 +0000
@@ -196,7 +196,7 @@
 - (NSString *)parseKeyEquiv: (const char *)key;
 - (NSMenuItem *)addItemWithWidgetValue: (void *)wvptr;
 - (void)fillWithWidgetValue: (void *)wvptr;
-- (void)fillWithWidgetValue: (void *)wvptr setDelegate: (BOOL)set;
+- (void)fillWithWidgetValue: (void *)wvptr frame: (struct frame *)f;
 - (EmacsMenu *)addSubmenuWithTitle: (const char *)title forFrame: (struct 
frame *)f;
 - (void) clear;
 - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f


reply via email to

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