Commit c3fc76ce authored by Kateryna Kostiuk's avatar Kateryna Kostiuk

preferences: video settings

Change-Id: I734f690dbe7be689134cf44125df2139e152562a
parent 435a1d59
......@@ -29,6 +29,7 @@ namespace lrc {
@protocol LrcModelsProtocol
-(id) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil dataTransferModel:(const lrc::api::DataTransferModel*) dataTransferModel;
-(id) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil avModel:(const lrc::api::AVModel*) avModel;
-(id) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil accountmodel:(const lrc::api::NewAccountModel*) accountModel;
-(id) initWithWindowNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil accountModel:(const lrc::api::NewAccountModel*)accountModel dataTransferModel:(const lrc::api::DataTransferModel*)dataTransferModel behaviourController:(const lrc::api::BehaviorController*) behaviorController;
-(id) initWithWindowNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil accountModel:(const lrc::api::NewAccountModel*)accountModel dataTransferModel:(const lrc::api::DataTransferModel*)dataTransferModel behaviourController:(const lrc::api::BehaviorController*) behaviorController avModel: (const lrc::api::AVModel*)avModel;
......
......@@ -33,7 +33,7 @@
NSViewController *currentVC;
}
@synthesize dataTransferModel, accountModel, behaviorController;
@synthesize dataTransferModel, accountModel, behaviorController, avModel;
// Identifiers used in PreferencesWindow.xib for tabs
static auto const kGeneralPrefsIdentifier = @"GeneralPrefsIdentifier";
......@@ -55,13 +55,14 @@ static auto const kVideoPrefsIdentifer = @"VideoPrefsIdentifer";
[tb setAllowsUserCustomization:NO];
}
-(id) initWithWindowNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil accountModel:( lrc::api::NewAccountModel*)accountModel dataTransferModel:( lrc::api::DataTransferModel*)dataTransferModel behaviourController:( lrc::api::BehaviorController*) behaviorController
-(id) initWithWindowNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil accountModel:(lrc::api::NewAccountModel*)accountModel dataTransferModel:(lrc::api::DataTransferModel*)dataTransferModel behaviourController:(lrc::api::BehaviorController*) behaviorController avModel: (lrc::api::AVModel*)avModel
{
if (self = [self initWithWindowNibName:nibNameOrNil])
{
self.accountModel = accountModel;
self.dataTransferModel = dataTransferModel;
self.behaviorController = behaviorController;
self.avModel = avModel;
}
return self;
}
......@@ -89,7 +90,7 @@ static auto const kVideoPrefsIdentifer = @"VideoPrefsIdentifer";
{
[[prefsContainer subviews]
makeObjectsPerformSelector:@selector(removeFromSuperview)];
currentVC = [[VideoPrefsVC alloc] initWithNibName:@"VideoPrefs" bundle:nil];
currentVC = [[VideoPrefsVC alloc] initWithNibName:@"VideoPrefs" bundle:nil avModel: self.avModel];
[self resizeWindowWithFrame:currentVC.view.frame];
[prefsContainer addSubview:currentVC.view];
}
......
......@@ -423,7 +423,7 @@ typedef NS_ENUM(NSInteger, ViewState) {
return;
}
preferencesWC = [[PreferencesWC alloc] initWithWindowNibName: @"PreferencesWindow" bundle: nil accountModel:self.accountModel dataTransferModel:self.dataTransferModel behaviourController:self.behaviorController];
preferencesWC = [[PreferencesWC alloc] initWithWindowNibName: @"PreferencesWindow" bundle: nil accountModel:self.accountModel dataTransferModel:self.dataTransferModel behaviourController:self.behaviorController avModel: self.avModel];
[preferencesWC.window makeKeyAndOrderFront:preferencesWC.window];
}
......
......@@ -19,9 +19,10 @@
#import <Cocoa/Cocoa.h>
#import "LrcModelsProtocol.h"
@interface VideoPrefsVC : NSViewController <NSMenuDelegate> {
@interface VideoPrefsVC : NSViewController <LrcModelsProtocol, NSMenuDelegate> {
}
@end
\ No newline at end of file
@end
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment