Settings window

This commit is contained in:
Gerrit Linnemann 2013-10-27 22:28:27 +01:00
parent 80cbf9b278
commit f6dd454d59
4 changed files with 91 additions and 0 deletions

View File

@ -649,6 +649,8 @@
</menu> </menu>
<customObject id="494" customClass="ipbcAppDelegate"> <customObject id="494" customClass="ipbcAppDelegate">
<connections> <connections>
<outlet property="settingName" destination="YxW-yA-Irj" id="3ak-Yx-hfH"/>
<outlet property="settingToken" destination="DuK-lM-9lP" id="gKT-El-kvU"/>
<outlet property="settings" destination="S8t-Zf-oY7" id="fzj-sS-eON"/> <outlet property="settings" destination="S8t-Zf-oY7" id="fzj-sS-eON"/>
<outlet property="statusMenu" destination="6bZ-TK-7Qi" id="6e4-5n-iPl"/> <outlet property="statusMenu" destination="6bZ-TK-7Qi" id="6e4-5n-iPl"/>
</connections> </connections>
@ -679,6 +681,78 @@
<view key="contentView" id="R0G-2c-z7t"> <view key="contentView" id="R0G-2c-z7t">
<rect key="frame" x="0.0" y="0.0" width="480" height="309"/> <rect key="frame" x="0.0" y="0.0" width="480" height="309"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Um2-TU-XD5">
<rect key="frame" x="17" y="272" width="104" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Name" id="Qib-zb-Irz">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="tDT-Jc-803">
<rect key="frame" x="17" y="234" width="104" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Token" id="3TI-UC-yh2">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="YxW-yA-Irj">
<rect key="frame" x="131" y="270" width="329" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="nCu-gY-fgW">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="DuK-lM-9lP">
<rect key="frame" x="131" y="232" width="329" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="UzA-bg-t0Q">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hXp-Wv-qfT">
<rect key="frame" x="131" y="49" width="332" height="147"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="You need an ip-breadcrump.orc account to use this software." id="PYW-tK-cnY">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pkc-9j-DCv">
<rect key="frame" x="384" y="13" width="82" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="1Np-5g-nIC">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
Gw
</string>
</buttonCell>
<connections>
<action selector="fromSettingsCancel:" target="494" id="ZDo-vY-7LH"/>
</connections>
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="c09-yz-NC8">
<rect key="frame" x="302" y="13" width="82" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Save" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="rKq-NH-VrX">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="fromSettingsSave:" target="494" id="EAN-Ru-fZm"/>
</connections>
</button>
</subviews>
</view> </view>
</window> </window>
</objects> </objects>

View File

@ -13,6 +13,10 @@
IBOutlet NSWindow *settings; IBOutlet NSWindow *settings;
IBOutlet NSMenu *statusMenu; IBOutlet NSMenu *statusMenu;
NSStatusItem * statusItem; NSStatusItem * statusItem;
/* settings */
IBOutlet NSTextField *settingName;
IBOutlet NSTextField *settingToken;
} }
@property (assign) IBOutlet NSWindow *window; @property (assign) IBOutlet NSWindow *window;
@ -20,4 +24,7 @@
-(IBAction)fromMenuSettings:(id)sender; -(IBAction)fromMenuSettings:(id)sender;
-(IBAction)fromMenuQuit:(id)sender; -(IBAction)fromMenuQuit:(id)sender;
-(IBAction)fromSettingsCancel:(id)sender;
-(IBAction)fromSettingsSave:(id)sender;
@end @end

View File

@ -30,4 +30,14 @@
[NSApp terminate:self]; [NSApp terminate:self];
} }
-(IBAction)fromSettingsSave:(id)sender {
//TODO: implement
[settings orderOut:self];
}
-(IBAction)fromSettingsCancel:(id)sender {
[settings orderOut:self];
}
@end @end