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

Commit

Permalink
* Fixed language issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Eun committed Jun 3, 2014
1 parent 6444296 commit 172f670
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 44 deletions.
8 changes: 6 additions & 2 deletions DisableMonitor.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
592CED7E18FEB66E00FDDF65 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 592CED7D18FEB66E00FDDF65 /* IOKit.framework */; };
592CED8118FEBDB300FDDF65 /* GLFW.m in Sources */ = {isa = PBXBuildFile; fileRef = 592CED8018FEBDB300FDDF65 /* GLFW.m */; };
592CED8718FEC42800FDDF65 /* status_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 592CED8618FEC42800FDDF65 /* status_icon.png */; };
598E9892193DC99B005DEB10 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 598E9891193DC99B005DEB10 /* MainMenu.xib */; };
59B5766718FFDC6700B57E77 /* icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 59B5766618FFDC6700B57E77 /* icon.icns */; };
8D11072B0486CEB800E47090 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* Localizable.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
Expand All @@ -30,7 +31,8 @@
592CED7D18FEB66E00FDDF65 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/IOKit.framework; sourceTree = DEVELOPER_DIR; };
592CED8018FEBDB300FDDF65 /* GLFW.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GLFW.m; sourceTree = "<group>"; };
592CED8618FEC42800FDDF65 /* status_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = status_icon.png; sourceTree = "<group>"; };
595F6F28193DC2ED00B7323D /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
598E9891193DC99B005DEB10 /* MainMenu.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainMenu.xib; sourceTree = "<group>"; };
598E9893193DC9DD005DEB10 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
59B5766618FFDC6700B57E77 /* icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = icon.icns; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* DisableMonitor-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "DisableMonitor-Info.plist"; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* DisableMonitor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DisableMonitor.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -88,6 +90,7 @@
29B97314FDCFA39411CA2CEA /* DisableMonitor */ = {
isa = PBXGroup;
children = (
598E9891193DC99B005DEB10 /* MainMenu.xib */,
59B5766618FFDC6700B57E77 /* icon.icns */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
Expand Down Expand Up @@ -181,6 +184,7 @@
8D11072B0486CEB800E47090 /* Localizable.strings in Resources */,
59B5766718FFDC6700B57E77 /* icon.icns in Resources */,
592CED8718FEC42800FDDF65 /* status_icon.png in Resources */,
598E9892193DC99B005DEB10 /* MainMenu.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -204,7 +208,7 @@
isa = PBXVariantGroup;
children = (
089C165DFE840E0CC02AAC07 /* English */,
595F6F28193DC2ED00B7323D /* de */,
598E9893193DC9DD005DEB10 /* de */,
);
name = Localizable.strings;
sourceTree = "<group>";
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DisableMonitorAppDelegate.m"
timestampString = "423477482.288443"
timestampString = "423479947.018587"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "256"
endingLineNumber = "256"
startingLineNumber = "257"
endingLineNumber = "257"
landmarkName = "-DetectMonitors:"
landmarkType = "5">
</BreakpointContent>
Expand All @@ -26,11 +26,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DisableMonitorAppDelegate.m"
timestampString = "423477482.288443"
timestampString = "423479947.018587"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "302"
endingLineNumber = "302"
startingLineNumber = "304"
endingLineNumber = "304"
landmarkName = "-menuNeedsUpdate:"
landmarkType = "5">
</BreakpointContent>
Expand All @@ -42,11 +42,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DisableMonitorAppDelegate.m"
timestampString = "423477200.485748"
timestampString = "423479947.018587"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "234"
endingLineNumber = "234"
startingLineNumber = "235"
endingLineNumber = "235"
landmarkName = "-MonitorResolution:"
landmarkType = "5">
</BreakpointContent>
Expand All @@ -58,11 +58,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DisableMonitorAppDelegate.m"
timestampString = "423477482.288443"
timestampString = "423479947.018587"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "295"
endingLineNumber = "295"
startingLineNumber = "297"
endingLineNumber = "297"
landmarkName = "-menuNeedsUpdate:"
landmarkType = "5">
</BreakpointContent>
Expand All @@ -74,11 +74,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DisableMonitorAppDelegate.m"
timestampString = "423477482.288443"
timestampString = "423479947.018587"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "298"
endingLineNumber = "298"
startingLineNumber = "300"
endingLineNumber = "300"
landmarkName = "-menuNeedsUpdate:"
landmarkType = "5">
</BreakpointContent>
Expand All @@ -90,11 +90,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DisableMonitorAppDelegate.m"
timestampString = "423477482.288443"
timestampString = "423479947.018587"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "296"
endingLineNumber = "296"
startingLineNumber = "298"
endingLineNumber = "298"
landmarkName = "-menuNeedsUpdate:"
landmarkType = "5">
</BreakpointContent>
Expand All @@ -106,11 +106,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DisableMonitorAppDelegate.m"
timestampString = "423477482.288443"
timestampString = "423479947.018587"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "321"
endingLineNumber = "321"
startingLineNumber = "323"
endingLineNumber = "323"
landmarkName = "-menuNeedsUpdate:"
landmarkType = "5">
</BreakpointContent>
Expand All @@ -122,11 +122,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DisableMonitorAppDelegate.m"
timestampString = "423477482.288443"
timestampString = "423479947.018587"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "375"
endingLineNumber = "375"
startingLineNumber = "377"
endingLineNumber = "377"
landmarkName = "-menuNeedsUpdate:"
landmarkType = "5">
</BreakpointContent>
Expand All @@ -138,11 +138,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DisableMonitorAppDelegate.m"
timestampString = "423477482.288443"
timestampString = "423479947.018587"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "392"
endingLineNumber = "392"
startingLineNumber = "394"
endingLineNumber = "394"
landmarkName = "-menuNeedsUpdate:"
landmarkType = "5">
</BreakpointContent>
Expand All @@ -154,11 +154,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DisableMonitorAppDelegate.m"
timestampString = "423477482.288443"
timestampString = "423479947.018587"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "386"
endingLineNumber = "386"
startingLineNumber = "388"
endingLineNumber = "388"
landmarkName = "-menuNeedsUpdate:"
landmarkType = "5">
</BreakpointContent>
Expand All @@ -170,11 +170,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DisableMonitorAppDelegate.m"
timestampString = "423477482.288443"
timestampString = "423479947.018587"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "387"
endingLineNumber = "387"
startingLineNumber = "389"
endingLineNumber = "389"
landmarkName = "-menuNeedsUpdate:"
landmarkType = "5">
</BreakpointContent>
Expand All @@ -186,11 +186,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DisableMonitorAppDelegate.m"
timestampString = "423477200.485748"
timestampString = "423479947.018587"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "84"
endingLineNumber = "84"
startingLineNumber = "85"
endingLineNumber = "85"
landmarkName = "-ToggleMonitor:enabled:"
landmarkType = "5">
</BreakpointContent>
Expand All @@ -202,11 +202,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DisableMonitorAppDelegate.m"
timestampString = "423477200.485748"
timestampString = "423479947.018587"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "48"
endingLineNumber = "48"
startingLineNumber = "49"
endingLineNumber = "49"
landmarkName = "screenNameForDisplay()"
landmarkType = "7">
</BreakpointContent>
Expand Down
4 changes: 3 additions & 1 deletion DisableMonitorAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ @implementation DisableMonitorAppDelegate

extern io_service_t IOServicePortFromCGDisplayID(CGDirectDisplayID displayID);
extern CGError CGSConfigureDisplayEnabled(CGDisplayConfigRef, CGDirectDisplayID, bool);
extern CGDisplayErr CGSGetDisplayList(CGDisplayCount maxDisplays, CGDirectDisplayID * onlineDspys, CGDisplayCount * dspyCnt);


NSMutableArray *monitorConfigs;
Expand Down Expand Up @@ -253,8 +254,9 @@ -(void)DetectMonitors:(id) sender
{
CGDirectDisplayID displays[0x10];
CGDisplayCount dspCount = 0;
CGDisplayErr err = CGSGetDisplayList(0x10, displays, &dspCount);

if (CGSGetDisplayList(0x10, displays, &dspCount) == noErr)
if (err == 0)
{
for(int i = 0; i < dspCount; i++)
{
Expand Down
1 change: 0 additions & 1 deletion English.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* Localized versions of Info.plist keys */
"MENU_DISABLE" = "Disable";
"MENU_ENABLE" = "Enable";
"MENU_DETECT" = "Detect Monitors";
Expand Down
23 changes: 23 additions & 0 deletions MainMenu.xib
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5053" systemVersion="13C64" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment defaultVersion="1090" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5053"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
<connections>
<outlet property="delegate" destination="494" id="495"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<menu id="533" customClass="NSMenu"/>
<customObject id="494" customClass="DisableMonitorAppDelegate">
<connections>
<outlet property="statusMenu" destination="533" id="537"/>
</connections>
</customObject>
<customObject id="420" customClass="NSFontManager"/>
</objects>
</document>
1 change: 0 additions & 1 deletion de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* Localized versions of Info.plist keys */
"MENU_DISABLE" = "Deaktivieren";
"MENU_ENABLE" = "Aktivieren";
"MENU_DETECT" = "Monitore erkennen";
Expand Down

0 comments on commit 172f670

Please sign in to comment.