From 7bbc60de3987a34f3f8c7be63d49367ac8738ec5 Mon Sep 17 00:00:00 2001 From: Zakk Date: Wed, 25 Nov 2015 22:08:47 -0500 Subject: [PATCH] Change save/add button label depending on if existing output is being edited or a new one is being created --- CocoaSplit/Interface/CSNewOutputWindowController.h | 2 ++ CocoaSplit/Interface/CSNewOutputWindowController.m | 4 +++- CocoaSplit/Interface/CSNewOutputWindowController.xib | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CocoaSplit/Interface/CSNewOutputWindowController.h b/CocoaSplit/Interface/CSNewOutputWindowController.h index 1e7303b8..00aaa02b 100644 --- a/CocoaSplit/Interface/CSNewOutputWindowController.h +++ b/CocoaSplit/Interface/CSNewOutputWindowController.h @@ -29,4 +29,6 @@ @property (strong) NSViewController *pluginViewController; @property (strong) NSMutableDictionary *compressors; @property (strong) CompressionSettingsPanelController *compressionPanelController; +@property (strong) NSString *buttonLabel; + @end diff --git a/CocoaSplit/Interface/CSNewOutputWindowController.m b/CocoaSplit/Interface/CSNewOutputWindowController.m index ac2de48f..8fd7f539 100644 --- a/CocoaSplit/Interface/CSNewOutputWindowController.m +++ b/CocoaSplit/Interface/CSNewOutputWindowController.m @@ -24,7 +24,8 @@ -(instancetype) init NSMutableDictionary *servicePlugins = [[CSPluginLoader sharedPluginLoader] streamServicePlugins]; self.outputTypes = servicePlugins.allKeys; - self.outputDestination = [[OutputDestination alloc] init]; + _outputDestination = [[OutputDestination alloc] init]; + self.buttonLabel = @"Add"; } return self; @@ -34,6 +35,7 @@ -(instancetype) init -(void)setOutputDestination:(OutputDestination *)outputDestination { _outputDestination = outputDestination; + self.buttonLabel = @"Save"; if (outputDestination.streamServiceObject) { self.streamServiceObject = outputDestination.streamServiceObject; diff --git a/CocoaSplit/Interface/CSNewOutputWindowController.xib b/CocoaSplit/Interface/CSNewOutputWindowController.xib index e527d617..8a9efeff 100644 --- a/CocoaSplit/Interface/CSNewOutputWindowController.xib +++ b/CocoaSplit/Interface/CSNewOutputWindowController.xib @@ -61,6 +61,7 @@ +