Skip to content
This repository has been archived by the owner on May 8, 2018. It is now read-only.

Commit

Permalink
Fixed Abort button
Browse files Browse the repository at this point in the history
Support for 1.6 Fixed again
  • Loading branch information
Eun committed Aug 25, 2014
1 parent 89abf1e commit 18f90b7
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 26 deletions.
4 changes: 2 additions & 2 deletions DisableMonitor.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
INFOPLIST_FILE = "DisableMonitor-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
PRODUCT_NAME = DisableMonitor;
SDKROOT = macosx;
SDKROOT = macosx10.6;
};
name = Debug;
};
Expand All @@ -295,7 +295,7 @@
INFOPLIST_FILE = "DisableMonitor-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
PRODUCT_NAME = DisableMonitor;
SDKROOT = macosx;
SDKROOT = macosx10.6;
};
name = Release;
};
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>8D1107260486CEB800E47090</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
15 changes: 14 additions & 1 deletion DisableMonitorAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,13 @@ -(void)ManageResolution:(id) sender
[window_label setStringValue:NSLocalizedString(@"CUSTOM_LABEL", NULL)];
[window_btnclose setTitle:NSLocalizedString(@"ALERT_CANCEL", NULL)];
[window_btnclose sizeToFit];
[window_btnclose setFrameOrigin: NSMakePoint(

[window frame].size.width -
[window_btnclose frame].size.width
- 13
, [window_btnclose frame].origin.y)];

[window makeFirstResponder: nil];
[monitors release];
}
Expand All @@ -421,7 +428,7 @@ -(void)ManageResolution:(id) sender

- (void)windowWillClose:(NSNotification *)notification {
ProcessSerialNumber psn = { 0, kCurrentProcess };
TransformProcessType(&psn, kProcessTransformToBackgroundApplication);
TransformProcessType(&psn, 2 /*kProcessTransformToBackgroundApplication*/);
[customResolution release];
}

Expand Down Expand Up @@ -540,6 +547,12 @@ - (IBAction)PanelCancel:(id)sender
[NSApp stopModal];
}


- (IBAction)CloseWindow:(id)sender
{
[window close];
}

- (IBAction)PaneltTXTChanged:(id)sender
{
NSString *sHeight = [panel_txtheight stringValue];
Expand Down
44 changes: 22 additions & 22 deletions MainMenu.xib
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment defaultVersion="1090" identifier="macosx"/>
<deployment defaultVersion="1060" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
</dependencies>
<objects>
Expand Down Expand Up @@ -38,12 +38,12 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="213" y="227" width="326" height="289"/>
<rect key="screenRect" x="0.0" y="0.0" width="2048" height="1130"/>
<rect key="screenRect" x="0.0" y="0.0" width="1366" height="746"/>
<view key="contentView" id="JSO-uy-PpG">
<rect key="frame" x="0.0" y="0.0" width="326" height="289"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button hidden="YES" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="I3n-Kc-7oN">
<button hidden="YES" verticalHuggingPriority="750" id="I3n-Kc-7oN">
<rect key="frame" x="14" y="13" width="44" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" bezelStyle="rounded" image="NSAddTemplate" imagePosition="overlaps" alignment="center" borderStyle="border" inset="2" id="P66-1J-Zfr">
Expand All @@ -54,7 +54,7 @@
<action selector="AddCustomResoultion:" target="494" id="xK2-IO-pht"/>
</connections>
</button>
<button hidden="YES" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fKC-1E-Bml">
<button hidden="YES" verticalHuggingPriority="750" id="fKC-1E-Bml">
<rect key="frame" x="58" y="13" width="44" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" bezelStyle="rounded" image="NSRemoveTemplate" imagePosition="only" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Ckk-uz-lDv">
Expand All @@ -65,10 +65,10 @@
<action selector="RemoveCustomResoultion:" target="494" id="QfX-Zc-4pj"/>
</connections>
</button>
<scrollView fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="24" horizontalPageScroll="10" verticalLineScroll="24" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="egV-01-WL5">
<scrollView autohidesScrollers="YES" horizontalLineScroll="24" horizontalPageScroll="10" verticalLineScroll="24" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="egV-01-WL5">
<rect key="frame" x="20" y="52" width="286" height="201"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<clipView key="contentView" ambiguous="YES" misplaced="YES" id="8B4-y3-TT5">
<clipView key="contentView" id="8B4-y3-TT5">
<rect key="frame" x="1" y="1" width="284" height="199"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
Expand Down Expand Up @@ -109,23 +109,26 @@
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="SP9-sp-RO7">
<rect key="frame" x="1" y="185" width="284" height="15"/>
<rect key="frame" x="1" y="-15" width="0.0" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="iEg-g7-VMf">
<rect key="frame" x="224" y="17" width="15" height="102"/>
<rect key="frame" x="-15" y="1" width="16" height="0.0"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<button verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="67K-Sz-8O1">
<button verticalHuggingPriority="750" id="67K-Sz-8O1">
<rect key="frame" x="230" y="13" width="82" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="jQG-Fh-esh">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="CloseWindow:" target="494" id="14A-ab-Kt8"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="55r-cD-Tlh">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="55r-cD-Tlh">
<rect key="frame" x="18" y="261" width="290" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="1UV-qB-pMi">
Expand All @@ -135,21 +138,18 @@
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="67K-Sz-8O1" secondAttribute="trailing" constant="20" id="WGc-xi-1pe"/>
</constraints>
</view>
</window>
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="k4x-Qz-rOG" customClass="NSPanel">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" utility="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="211" y="124" width="291" height="128"/>
<rect key="screenRect" x="0.0" y="0.0" width="2048" height="1130"/>
<rect key="screenRect" x="0.0" y="0.0" width="1366" height="746"/>
<view key="contentView" id="id3-ic-Cm9">
<rect key="frame" x="0.0" y="0.0" width="291" height="128"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rPa-be-MVg">
<button verticalHuggingPriority="750" id="rPa-be-MVg">
<rect key="frame" x="195" y="13" width="82" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="X4h-6g-pO6">
Expand All @@ -160,7 +160,7 @@
<action selector="PanelCancel:" target="494" id="X7d-jU-Ui1"/>
</connections>
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="E8P-1T-XY2">
<button verticalHuggingPriority="750" id="E8P-1T-XY2">
<rect key="frame" x="104" y="13" width="82" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ugO-5C-3nS">
Expand All @@ -171,7 +171,7 @@
<action selector="PanelOk:" target="494" id="IAV-Gi-LWN"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dAI-ns-hE8">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="dAI-ns-hE8">
<rect key="frame" x="18" y="24" width="86" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="2w3-Xb-Bme">
Expand All @@ -180,7 +180,7 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8aC-lG-uMB">
<textField verticalHuggingPriority="750" id="8aC-lG-uMB">
<rect key="frame" x="20" y="61" width="96" 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="wuu-pu-LVf">
Expand All @@ -192,7 +192,7 @@
<action selector="PaneltTXTChanged:" target="494" id="ofa-wz-TLI"/>
</connections>
</textField>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bTT-87-GQy">
<textField verticalHuggingPriority="750" id="bTT-87-GQy">
<rect key="frame" x="175" y="61" width="96" 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="LPG-Va-xKB">
Expand All @@ -204,7 +204,7 @@
<action selector="PaneltTXTChanged:" target="494" id="gC7-8D-mWm"/>
</connections>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="AFW-lY-qxP">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="AFW-lY-qxP">
<rect key="frame" x="18" y="91" width="100" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="oqq-12-zdV">
Expand All @@ -213,7 +213,7 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="mU1-Lz-s4F">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="mU1-Lz-s4F">
<rect key="frame" x="173" y="91" width="100" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="lgL-Fu-4L0">
Expand Down
2 changes: 1 addition & 1 deletion ResolutionDataSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ - (void) LoadData:(NSMutableArray*)system_items
ResolutionDataItem *item =[NSKeyedUnarchiver unarchiveObjectWithData:encodedItem];
for (int j = [system_items count] - 1; j>= 0; --j)
{
ResolutionDataItem *sysitem = system_items[j];
ResolutionDataItem *sysitem = [system_items objectAtIndex:j];

if (sysitem.mode.width == item.mode.width && sysitem.mode.height == item.mode.height && sysitem.mode.depth == item.mode.depth && sysitem.mode.freq == item.mode.freq)
{
Expand Down

0 comments on commit 18f90b7

Please sign in to comment.