mirror of
https://github.com/ksherlock/ample.git
synced 2024-09-29 12:55:14 +00:00
Clean up the ROM manager a little bit more.
This commit is contained in:
parent
ebdf8b9395
commit
8b2f4c762b
@ -14,60 +14,47 @@
|
|||||||
</customObject>
|
</customObject>
|
||||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||||
<window title="Downloads" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
|
<window title="ROMs" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
|
||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
|
||||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
<rect key="contentRect" x="196" y="240" width="400" height="500"/>
|
||||||
<rect key="contentRect" x="196" y="240" width="480" height="458"/>
|
|
||||||
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
|
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
|
||||||
|
<value key="minSize" type="size" width="300" height="300"/>
|
||||||
<view key="contentView" id="se5-gp-TjO">
|
<view key="contentView" id="se5-gp-TjO">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="480" height="458"/>
|
<rect key="frame" x="0.0" y="0.0" width="400" height="500"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rg5-Qf-4Mw">
|
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rg5-Qf-4Mw">
|
||||||
<rect key="frame" x="404" y="19" width="56" height="23"/>
|
<rect key="frame" x="324" y="19" width="56" height="23"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||||
<buttonCell key="cell" type="roundTextured" title="Cancel" bezelStyle="texturedRounded" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="i6Z-OM-lqE">
|
<buttonCell key="cell" type="roundTextured" title="Cancel" bezelStyle="texturedRounded" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="i6Z-OM-lqE">
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
<string key="keyEquivalent">.</string>
|
<string key="keyEquivalent">.</string>
|
||||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||||
|
<connections>
|
||||||
|
<binding destination="-2" name="enabled" keyPath="self.active" id="mBP-8S-yGB"/>
|
||||||
|
</connections>
|
||||||
</buttonCell>
|
</buttonCell>
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="cancelAll:" target="-2" id="ycl-eJ-ByB"/>
|
<action selector="cancelAll:" target="-2" id="ycl-eJ-ByB"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="MWc-ih-Sp1">
|
|
||||||
<rect key="frame" x="20" y="105" width="442" height="16"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
|
||||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Downloading" id="dZt-4d-PYZ">
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
</textFieldCell>
|
|
||||||
<connections>
|
|
||||||
<binding destination="-2" name="displayPatternValue1" keyPath="self.currentROM" id="FsR-wQ-zks">
|
|
||||||
<dictionary key="options">
|
|
||||||
<string key="NSDisplayPattern">Downloading %{value1}@</string>
|
|
||||||
</dictionary>
|
|
||||||
</binding>
|
|
||||||
</connections>
|
|
||||||
</textField>
|
|
||||||
<scrollView fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CMD-nT-mEa">
|
<scrollView fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CMD-nT-mEa">
|
||||||
<rect key="frame" x="0.0" y="129" width="482" height="330"/>
|
<rect key="frame" x="0.0" y="58" width="402" height="443"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<clipView key="contentView" ambiguous="YES" drawsBackground="NO" id="Igp-aH-flp">
|
<clipView key="contentView" ambiguous="YES" drawsBackground="NO" id="Igp-aH-flp">
|
||||||
<rect key="frame" x="1" y="1" width="480" height="328"/>
|
<rect key="frame" x="1" y="1" width="400" height="441"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<tableView verticalHuggingPriority="750" ambiguous="YES" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" selectionHighlightStyle="none" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" viewBased="YES" id="FLX-Wt-y53">
|
<tableView verticalHuggingPriority="750" ambiguous="YES" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" selectionHighlightStyle="none" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" viewBased="YES" id="FLX-Wt-y53">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="480" height="328"/>
|
<rect key="frame" x="0.0" y="0.0" width="400" height="441"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<size key="intercellSpacing" width="3" height="2"/>
|
<size key="intercellSpacing" width="3" height="2"/>
|
||||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
<tableViewGridLines key="gridStyleMask" dashed="YES"/>
|
<tableViewGridLines key="gridStyleMask" dashed="YES"/>
|
||||||
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
|
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
|
||||||
<tableColumns>
|
<tableColumns>
|
||||||
<tableColumn width="477" minWidth="40" maxWidth="1000" id="5jP-bY-fhI">
|
<tableColumn width="397" minWidth="40" maxWidth="1000" id="5jP-bY-fhI">
|
||||||
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
|
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
@ -81,11 +68,11 @@
|
|||||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
|
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
|
||||||
<prototypeCellViews>
|
<prototypeCellViews>
|
||||||
<tableCellView identifier="Cell" focusRingType="none" id="aBv-F5-XWo">
|
<tableCellView identifier="Cell" focusRingType="none" id="aBv-F5-XWo">
|
||||||
<rect key="frame" x="1" y="1" width="477" height="17"/>
|
<rect key="frame" x="1" y="1" width="397" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pWm-hb-BXB">
|
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pWm-hb-BXB">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="477" height="17"/>
|
<rect key="frame" x="0.0" y="0.0" width="397" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="p71-gJ-vFV">
|
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="p71-gJ-vFV">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
@ -99,11 +86,11 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</tableCellView>
|
</tableCellView>
|
||||||
<tableCellView identifier="DownloadCell" focusRingType="none" id="onK-6l-2iV" customClass="DownloadTableCellView">
|
<tableCellView identifier="DownloadCell" focusRingType="none" id="onK-6l-2iV" customClass="DownloadTableCellView">
|
||||||
<rect key="frame" x="1" y="20" width="477" height="49"/>
|
<rect key="frame" x="1" y="20" width="397" height="49"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="A44-us-TEl">
|
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="A44-us-TEl">
|
||||||
<rect key="frame" x="25" y="28" width="451" height="17"/>
|
<rect key="frame" x="25" y="28" width="371" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="NSU-6I-nsG">
|
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="NSU-6I-nsG">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
@ -116,7 +103,7 @@
|
|||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
</progressIndicator>
|
</progressIndicator>
|
||||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hfu-hP-QAH">
|
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hfu-hP-QAH">
|
||||||
<rect key="frame" x="25" y="3" width="451" height="17"/>
|
<rect key="frame" x="25" y="3" width="371" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="1cQ-Zh-q0o">
|
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="1cQ-Zh-q0o">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
@ -152,14 +139,22 @@
|
|||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</scroller>
|
</scroller>
|
||||||
</scrollView>
|
</scrollView>
|
||||||
<progressIndicator wantsLayer="YES" fixedFrame="YES" maxValue="100" style="bar" translatesAutoresizingMaskIntoConstraints="NO" id="Odp-OZ-ggl">
|
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Fhd-vr-Q2G">
|
||||||
<rect key="frame" x="22" y="78" width="438" height="20"/>
|
<rect key="frame" x="20" y="19" width="124" height="23"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
<buttonCell key="cell" type="roundTextured" title="Download Missing" bezelStyle="texturedRounded" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="AKx-eg-iLS">
|
||||||
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
</buttonCell>
|
||||||
<connections>
|
<connections>
|
||||||
<binding destination="-2" name="maxValue" keyPath="self.totalCount" id="hpx-zN-odo"/>
|
<action selector="downloadMissing:" target="-2" id="azE-F0-5wx"/>
|
||||||
<binding destination="-2" name="value" keyPath="self.currentCount" previousBinding="hpx-zN-odo" id="dd9-45-gfI"/>
|
<binding destination="-2" name="enabled" keyPath="self.active" id="NOL-Db-hgp">
|
||||||
|
<dictionary key="options">
|
||||||
|
<string key="NSValueTransformerName">NSNegateBoolean</string>
|
||||||
|
</dictionary>
|
||||||
|
</binding>
|
||||||
</connections>
|
</connections>
|
||||||
</progressIndicator>
|
</button>
|
||||||
</subviews>
|
</subviews>
|
||||||
</view>
|
</view>
|
||||||
<connections>
|
<connections>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
|
<action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
|
||||||
</connections>
|
</connections>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
<menuItem title="Download ROMs…" id="St3-qR-2Y8">
|
<menuItem title="Manage ROMs…" id="St3-qR-2Y8">
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="downloadROMS:" target="Voe-Tx-rLC" id="jFm-nv-kRC"/>
|
<action selector="downloadROMS:" target="Voe-Tx-rLC" id="jFm-nv-kRC"/>
|
||||||
|
@ -202,6 +202,24 @@ enum {
|
|||||||
//[_tableView setNeedsDisplay: YES]; // doesn't work...
|
//[_tableView setNeedsDisplay: YES]; // doesn't work...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (IBAction)downloadMissing:(id)sender {
|
||||||
|
|
||||||
|
BOOL delta = NO;
|
||||||
|
for (DownloadItem *item in _items) {
|
||||||
|
NSURL *url = [item localURL];
|
||||||
|
id task = [item task];
|
||||||
|
if (!url && !task) {
|
||||||
|
[self downloadItem: item];
|
||||||
|
delta = YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (delta) {
|
||||||
|
[self setActive: YES];
|
||||||
|
[_tableView reloadData];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (IBAction)showInFinder:(id)sender {
|
- (IBAction)showInFinder:(id)sender {
|
||||||
DownloadItem *item = [self clickedItem];
|
DownloadItem *item = [self clickedItem];
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
@ -217,6 +235,7 @@ enum {
|
|||||||
if (!item) return;
|
if (!item) return;
|
||||||
|
|
||||||
[self downloadItem: item];
|
[self downloadItem: item];
|
||||||
|
[self setActive: YES];
|
||||||
[self redrawRow: [item index]];
|
[self redrawRow: [item index]];
|
||||||
}
|
}
|
||||||
- (IBAction)cancel:(id)sender {
|
- (IBAction)cancel:(id)sender {
|
||||||
@ -300,8 +319,6 @@ enum {
|
|||||||
|
|
||||||
- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
|
- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
|
||||||
|
|
||||||
if (row == 51) { NSLog(@"viewForRow 51");}
|
|
||||||
|
|
||||||
DownloadItem *item = [_items objectAtIndex: row];
|
DownloadItem *item = [_items objectAtIndex: row];
|
||||||
DownloadTableCellView *v = [tableView makeViewWithIdentifier: @"DownloadCell" owner: self];
|
DownloadTableCellView *v = [tableView makeViewWithIdentifier: @"DownloadCell" owner: self];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user