OSDN Git Service

Added comments for some of the methods the application delegate implements from NSObj...
authorEric Branlund <ebranlund@fastmail.com>
Tue, 27 Aug 2019 00:06:29 +0000 (17:06 -0700)
committerEric Branlund <ebranlund@fastmail.com>
Tue, 27 Aug 2019 00:06:29 +0000 (17:06 -0700)
src/main-cocoa.m

index eaec76e..a97fcf0 100644 (file)
@@ -3103,6 +3103,12 @@ static void hook_quit(const char * str)
     [panel orderFront:self];
 }
 
+/**
+ * Implent NSObject's changeFont() method to receive a notification about the
+ * changed font.  Note that, as of 10.14, changeFont() is deprecated in
+ * NSObject - it will be removed at some point and the application delegate
+ * will have to be declared as implementing the NSFontChanging protocol.
+ */
 - (void)changeFont:(id)sender
 {
     int mainTerm;
@@ -3204,6 +3210,13 @@ static void hook_quit(const char * str)
     record_current_savefile();
 }
 
+/**
+ * Implement NSObject's validateMenuItem() method to override enabling or
+ * disabling a menu item.  Note that, as of 10.14, validateMenuItem() is
+ * deprecated in NSObject - it will be removed at some point and  the
+ * application delegate will have to be declared as implementing the
+ * NSMenuItemValidation protocol.
+ */
 - (BOOL)validateMenuItem:(NSMenuItem *)menuItem
 {
     SEL sel = [menuItem action];