Moved more UI fields to bindings.

This commit is contained in:
Damiano Galassi committed 2014-03-22 08:40:13 +01:00
1 parent 609af54296
commit 52e2131693
6 files changed
+18 -22

No files matched your search

-4
View File
@@ -14,10 +14,6 @@
@private
SBQueueItem *_item;
NSTextField *_nameLabel;
NSTextField *_sourceLabel;
NSTextField *_destinationLabel;
NSTextField *_actionsLabel;
NSButton *_editButton;
-12
View File
@@ -17,10 +17,6 @@ static void *SBItemViewContex = &SBItemViewContex;
@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 NSButton *editButton;
@@ -33,10 +29,6 @@ static void *SBItemViewContex = &SBItemViewContex;
@synthesize item = _item;
@synthesize delegate = _delegate;
@synthesize nameLabel = _nameLabel;
@synthesize sourceLabel = _sourceLabel;
@synthesize destinationLabel = _destinationLabel;
@synthesize actionsLabel = _actionsLabel;
@synthesize editButton = _editButton;
@@ -58,10 +50,6 @@ static void *SBItemViewContex = &SBItemViewContex;
- (void)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];
for (id<SBQueueActionProtocol> action in self.item.actions) {
[actions appendString:[NSString stringWithFormat:@"%@\n", [action description]]];
-1
View File
@@ -11,7 +11,6 @@
@interface SBOptionsViewController : NSViewController {
@private
IBOutlet NSPopUpButton *_destButton;
IBOutlet NSPopUpButton *_setsPopup;
NSMutableDictionary *_options;
NSMutableArray *_sets;
+2 -2
View File
@@ -14,7 +14,7 @@
@interface SBOptionsViewController ()
@property (nonatomic) NSMutableDictionary *options;
@property (nonatomic, copy) NSMutableArray *sets;
@property (nonatomic, retain) NSMutableArray *sets;
- (IBAction)chooseDestination:(id)sender;
- (IBAction)destination:(id)sender;
@@ -148,7 +148,7 @@
}
- (void)updateSetsMenu:(id)sender {
self.sets = [[SBPresetManager sharedManager].presets mutableCopy];
self.sets = [[[SBPresetManager sharedManager].presets mutableCopy] autorelease];
}
- (void)dealloc {
+9
View File
@@ -30,6 +30,9 @@
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="-2" name="value" keyPath="item.URL.lastPathComponent" id="euN-2P-iJ4"/>
</connections>
</textField>
<textField verticalHuggingPriority="750" id="MHQ-kr-DVS">
<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="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="-2" name="value" keyPath="item.destURL.path" id="sAH-pe-Ka6"/>
</connections>
</textField>
<textField verticalHuggingPriority="750" id="990-0E-nlL">
<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="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="-2" name="value" keyPath="item.URL.path" id="Tyf-L8-CbJ"/>
</connections>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="pW0-Ga-LFI">
<rect key="frame" x="97" y="34" width="265" height="14"/>
+7 -3
View File
@@ -145,7 +145,7 @@
<menu key="menu" title="OtherViews" id="4en-ZA-qlS"/>
</popUpButtonCell>
<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">
<bool key="NSInsertsNullPlaceholder" value="YES"/>
<string key="NSNoSelectionPlaceholder">None</string>
@@ -153,12 +153,16 @@
<string key="NSNullPlaceholder">None</string>
</dictionary>
</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">
<bool key="NSInsertsNullPlaceholder" value="YES"/>
</dictionary>
</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>
</popUpButton>
</subviews>