Moved more UI fields to bindings.
This commit is contained in:
1 parent
609af54296
commit
52e2131693
6 files changed
+18
-22
No files matched your search
@@ -14,10 +14,6 @@
|
|||||||
@private
|
@private
|
||||||
SBQueueItem *_item;
|
SBQueueItem *_item;
|
||||||
|
|
||||||
NSTextField *_nameLabel;
|
|
||||||
NSTextField *_sourceLabel;
|
|
||||||
NSTextField *_destinationLabel;
|
|
||||||
|
|
||||||
NSTextField *_actionsLabel;
|
NSTextField *_actionsLabel;
|
||||||
|
|
||||||
NSButton *_editButton;
|
NSButton *_editButton;
|
||||||
|
|||||||
@@ -17,10 +17,6 @@ static void *SBItemViewContex = &SBItemViewContex;
|
|||||||
|
|
||||||
@property SBQueueItem *item;
|
@property SBQueueItem *item;
|
||||||
|
|
||||||
@property (assign) IBOutlet NSTextField *nameLabel;
|
|
||||||
@property (assign) IBOutlet NSTextField *sourceLabel;
|
|
||||||
@property (assign) IBOutlet NSTextField *destinationLabel;
|
|
||||||
|
|
||||||
@property (assign) IBOutlet NSTextField *actionsLabel;
|
@property (assign) IBOutlet NSTextField *actionsLabel;
|
||||||
|
|
||||||
@property (assign) IBOutlet NSButton *editButton;
|
@property (assign) IBOutlet NSButton *editButton;
|
||||||
@@ -33,10 +29,6 @@ static void *SBItemViewContex = &SBItemViewContex;
|
|||||||
@synthesize item = _item;
|
@synthesize item = _item;
|
||||||
@synthesize delegate = _delegate;
|
@synthesize delegate = _delegate;
|
||||||
|
|
||||||
@synthesize nameLabel = _nameLabel;
|
|
||||||
@synthesize sourceLabel = _sourceLabel;
|
|
||||||
@synthesize destinationLabel = _destinationLabel;
|
|
||||||
|
|
||||||
@synthesize actionsLabel = _actionsLabel;
|
@synthesize actionsLabel = _actionsLabel;
|
||||||
|
|
||||||
@synthesize editButton = _editButton;
|
@synthesize editButton = _editButton;
|
||||||
@@ -58,10 +50,6 @@ static void *SBItemViewContex = &SBItemViewContex;
|
|||||||
- (void)loadView {
|
- (void)loadView {
|
||||||
[super loadView];
|
[super loadView];
|
||||||
|
|
||||||
[self.nameLabel setStringValue:[self.item.URL lastPathComponent]];
|
|
||||||
[self.sourceLabel setStringValue:[self.item.URL path]];
|
|
||||||
[self.destinationLabel setStringValue:[self.item.destURL path]];
|
|
||||||
|
|
||||||
NSMutableString *actions = [[[NSMutableString alloc] init] autorelease];
|
NSMutableString *actions = [[[NSMutableString alloc] init] autorelease];
|
||||||
for (id<SBQueueActionProtocol> action in self.item.actions) {
|
for (id<SBQueueActionProtocol> action in self.item.actions) {
|
||||||
[actions appendString:[NSString stringWithFormat:@"%@\n", [action description]]];
|
[actions appendString:[NSString stringWithFormat:@"%@\n", [action description]]];
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
@interface SBOptionsViewController : NSViewController {
|
@interface SBOptionsViewController : NSViewController {
|
||||||
@private
|
@private
|
||||||
IBOutlet NSPopUpButton *_destButton;
|
IBOutlet NSPopUpButton *_destButton;
|
||||||
IBOutlet NSPopUpButton *_setsPopup;
|
|
||||||
|
|
||||||
NSMutableDictionary *_options;
|
NSMutableDictionary *_options;
|
||||||
NSMutableArray *_sets;
|
NSMutableArray *_sets;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
@interface SBOptionsViewController ()
|
@interface SBOptionsViewController ()
|
||||||
|
|
||||||
@property (nonatomic) NSMutableDictionary *options;
|
@property (nonatomic) NSMutableDictionary *options;
|
||||||
@property (nonatomic, copy) NSMutableArray *sets;
|
@property (nonatomic, retain) NSMutableArray *sets;
|
||||||
|
|
||||||
- (IBAction)chooseDestination:(id)sender;
|
- (IBAction)chooseDestination:(id)sender;
|
||||||
- (IBAction)destination:(id)sender;
|
- (IBAction)destination:(id)sender;
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)updateSetsMenu:(id)sender {
|
- (void)updateSetsMenu:(id)sender {
|
||||||
self.sets = [[SBPresetManager sharedManager].presets mutableCopy];
|
self.sets = [[[SBPresetManager sharedManager].presets mutableCopy] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)dealloc {
|
- (void)dealloc {
|
||||||
|
|||||||
@@ -30,6 +30,9 @@
|
|||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
|
<connections>
|
||||||
|
<binding destination="-2" name="value" keyPath="item.URL.lastPathComponent" id="euN-2P-iJ4"/>
|
||||||
|
</connections>
|
||||||
</textField>
|
</textField>
|
||||||
<textField verticalHuggingPriority="750" id="MHQ-kr-DVS">
|
<textField verticalHuggingPriority="750" id="MHQ-kr-DVS">
|
||||||
<rect key="frame" x="18" y="56" width="73" height="14"/>
|
<rect key="frame" x="18" y="56" width="73" height="14"/>
|
||||||
@@ -57,6 +60,9 @@
|
|||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
|
<connections>
|
||||||
|
<binding destination="-2" name="value" keyPath="item.destURL.path" id="sAH-pe-Ka6"/>
|
||||||
|
</connections>
|
||||||
</textField>
|
</textField>
|
||||||
<textField verticalHuggingPriority="750" id="990-0E-nlL">
|
<textField verticalHuggingPriority="750" id="990-0E-nlL">
|
||||||
<rect key="frame" x="46" y="74" width="45" height="14"/>
|
<rect key="frame" x="46" y="74" width="45" height="14"/>
|
||||||
@@ -75,6 +81,9 @@
|
|||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
|
<connections>
|
||||||
|
<binding destination="-2" name="value" keyPath="item.URL.path" id="Tyf-L8-CbJ"/>
|
||||||
|
</connections>
|
||||||
</textField>
|
</textField>
|
||||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="pW0-Ga-LFI">
|
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="pW0-Ga-LFI">
|
||||||
<rect key="frame" x="97" y="34" width="265" height="14"/>
|
<rect key="frame" x="97" y="34" width="265" height="14"/>
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
<menu key="menu" title="OtherViews" id="4en-ZA-qlS"/>
|
<menu key="menu" title="OtherViews" id="4en-ZA-qlS"/>
|
||||||
</popUpButtonCell>
|
</popUpButtonCell>
|
||||||
<connections>
|
<connections>
|
||||||
<binding destination="vyv-na-Xpo" name="content" keyPath="arrangedObjects" id="HIJ-Fo-c7b">
|
<binding destination="vyv-na-Xpo" name="content" keyPath="arrangedObjects" id="4rl-TJ-0yZ">
|
||||||
<dictionary key="options">
|
<dictionary key="options">
|
||||||
<bool key="NSInsertsNullPlaceholder" value="YES"/>
|
<bool key="NSInsertsNullPlaceholder" value="YES"/>
|
||||||
<string key="NSNoSelectionPlaceholder">None</string>
|
<string key="NSNoSelectionPlaceholder">None</string>
|
||||||
@@ -153,12 +153,16 @@
|
|||||||
<string key="NSNullPlaceholder">None</string>
|
<string key="NSNullPlaceholder">None</string>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
</binding>
|
</binding>
|
||||||
<binding destination="vyv-na-Xpo" name="contentValues" keyPath="arrangedObjects.presetName" previousBinding="HIJ-Fo-c7b" id="P6E-1t-NzK">
|
<binding destination="vyv-na-Xpo" name="contentValues" keyPath="arrangedObjects.presetName" previousBinding="4rl-TJ-0yZ" id="QqS-yf-Kdq">
|
||||||
<dictionary key="options">
|
<dictionary key="options">
|
||||||
<bool key="NSInsertsNullPlaceholder" value="YES"/>
|
<bool key="NSInsertsNullPlaceholder" value="YES"/>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
</binding>
|
</binding>
|
||||||
<binding destination="-2" name="selectedObject" keyPath="options.SBQueueSet" previousBinding="P6E-1t-NzK" id="76d-3o-xTk"/>
|
<binding destination="-2" name="selectedObject" keyPath="options.SBQueueSet" previousBinding="QqS-yf-Kdq" id="YcS-AE-oRP">
|
||||||
|
<dictionary key="options">
|
||||||
|
<bool key="NSValidatesImmediately" value="YES"/>
|
||||||
|
</dictionary>
|
||||||
|
</binding>
|
||||||
</connections>
|
</connections>
|
||||||
</popUpButton>
|
</popUpButton>
|
||||||
</subviews>
|
</subviews>
|
||||||
|
|||||||
Reference in new issue
Block a user