From 0bed550e210b2dfe898a0755592db5747fb3da37 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Tue, 14 Jan 2020 21:36:14 +0000 Subject: [PATCH] Remove EmacsOpenPanel and EmacsSavePanel (bug#38031) --- src/nsfns.m | 25 +------------------------ src/nsterm.h | 16 ---------------- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/src/nsfns.m b/src/nsfns.m index 93d5a1e9488..0f879fe390c 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -1622,7 +1622,7 @@ Optional arg DIR_ONLY_P, if non-nil, means choose only directories. */) dirS = [dirS stringByExpandingTildeInPath]; panel = isSave ? - (id)[EmacsSavePanel savePanel] : (id)[EmacsOpenPanel openPanel]; + (id)[NSSavePanel savePanel] : (id)[NSOpenPanel openPanel]; [panel setTitle: promptS]; @@ -3077,29 +3077,6 @@ handlePanelKeys (NSSavePanel *panel, NSEvent *theEvent) return ret; } -@implementation EmacsSavePanel -- (BOOL)performKeyEquivalent:(NSEvent *)theEvent -{ - BOOL ret = handlePanelKeys (self, theEvent); - if (! ret) - ret = [super performKeyEquivalent:theEvent]; - return ret; -} -@end - - -@implementation EmacsOpenPanel -- (BOOL)performKeyEquivalent:(NSEvent *)theEvent -{ - // NSOpenPanel inherits NSSavePanel, so passing self is OK. - BOOL ret = handlePanelKeys (self, theEvent); - if (! ret) - ret = [super performKeyEquivalent:theEvent]; - return ret; -} -@end - - @implementation EmacsFileDelegate /* -------------------------------------------------------------------------- Delegate methods for Open/Save panels diff --git a/src/nsterm.h b/src/nsterm.h index fb9ac1b462c..f68c3246a70 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -595,22 +595,6 @@ typedef id instancetype; @end -/* ========================================================================== - - File open/save panels - This and next override methods to handle keyboard input in panels. - - ========================================================================== */ - -@interface EmacsSavePanel : NSSavePanel -{ -} -@end -@interface EmacsOpenPanel : NSOpenPanel -{ -} -@end - @interface EmacsFileDelegate : NSObject { } -- 2.39.2