mirror of
https://github.com/ksherlock/ample.git
synced 2024-06-01 16:41:35 +00:00
log window - add button to clear the log
This commit is contained in:
parent
41de913e5f
commit
5e87627251
|
@ -21,7 +21,7 @@
|
||||||
<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"/>
|
||||||
<view key="contentView" id="se5-gp-TjO">
|
<view key="contentView" id="se5-gp-TjO">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="800" height="270"/>
|
<rect key="frame" x="0.0" y="0.0" width="800" height="270"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<scrollView fixedFrame="YES" borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hj3-ou-djb">
|
<scrollView fixedFrame="YES" borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hj3-ou-djb">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="800" height="270"/>
|
<rect key="frame" x="0.0" y="0.0" width="800" height="270"/>
|
||||||
|
@ -52,10 +52,31 @@
|
||||||
</scrollView>
|
</scrollView>
|
||||||
</subviews>
|
</subviews>
|
||||||
</view>
|
</view>
|
||||||
|
<toolbar key="toolbar" implicitIdentifier="54C242E0-0A7F-491A-9B83-7279A9663A36" autosavesConfiguration="NO" allowsUserCustomization="NO" displayMode="iconOnly" sizeMode="small" id="Cik-bA-ZYu">
|
||||||
|
<allowedToolbarItems>
|
||||||
|
<toolbarItem implicitItemIdentifier="NSToolbarShowColorsItem" id="zxC-EA-a7F"/>
|
||||||
|
<toolbarItem implicitItemIdentifier="NSToolbarShowFontsItem" id="xZv-cQ-rPS"/>
|
||||||
|
<toolbarItem implicitItemIdentifier="NSToolbarPrintItem" id="2BZ-oP-sMg"/>
|
||||||
|
<toolbarItem implicitItemIdentifier="NSToolbarSpaceItem" id="j5G-hW-61a"/>
|
||||||
|
<toolbarItem implicitItemIdentifier="NSToolbarFlexibleSpaceItem" id="a72-iv-2QT"/>
|
||||||
|
<toolbarItem implicitItemIdentifier="21A9965C-D1B3-4E82-A344-1688A467E870" label="Clear Log" paletteLabel="Clear Log" tag="-1" image="NSTrashEmpty" id="pn5-MM-9p1">
|
||||||
|
<connections>
|
||||||
|
<action selector="clearLog:" target="-2" id="VU3-mv-6WR"/>
|
||||||
|
</connections>
|
||||||
|
</toolbarItem>
|
||||||
|
</allowedToolbarItems>
|
||||||
|
<defaultToolbarItems>
|
||||||
|
<toolbarItem reference="a72-iv-2QT"/>
|
||||||
|
<toolbarItem reference="pn5-MM-9p1"/>
|
||||||
|
</defaultToolbarItems>
|
||||||
|
</toolbar>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
|
<outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
|
||||||
</connections>
|
</connections>
|
||||||
<point key="canvasLocation" x="-285" y="-234"/>
|
<point key="canvasLocation" x="-285" y="-234"/>
|
||||||
</window>
|
</window>
|
||||||
</objects>
|
</objects>
|
||||||
|
<resources>
|
||||||
|
<image name="NSTrashEmpty" width="32" height="32"/>
|
||||||
|
</resources>
|
||||||
</document>
|
</document>
|
||||||
|
|
|
@ -197,4 +197,12 @@ static NSMutableSet *LogWindows;
|
||||||
[LogWindows removeObject: self];
|
[LogWindows removeObject: self];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark - IBActions
|
||||||
|
|
||||||
|
- (IBAction)clearLog:(id)sender {
|
||||||
|
NSAttributedString *empty = [NSAttributedString new];
|
||||||
|
[[_textView textStorage] setAttributedString: empty];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user