Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds "Full Height" action #187

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ShiftIt/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"Toggle Zoom" = "Toggle Zoom";
"Maximize" = "Maximize";
"Toggle Full Screen" = "Toggle Full Screen";
"Full Height" = "Full Height";
"Increase" = "Increase";
"Reduce" = "Reduce";
"Next Screen" = "Next Screen";
Expand Down
19 changes: 11 additions & 8 deletions ShiftIt/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13D65" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="8191" systemVersion="15A284" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment defaultVersion="1070" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="8191"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
Expand All @@ -11,7 +11,7 @@
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customObject id="494" customClass="ShiftItAppDelegate">
<connections>
<outlet property="statusMenu_" destination="535" id="789"/>
Expand Down Expand Up @@ -57,18 +57,21 @@
<menuItem title="Toggle Full Screen" tag="2012" keyEquivalent="f" id="545">
<modifierMask key="keyEquivalentModifierMask" control="YES" option="YES" command="YES"/>
</menuItem>
<menuItem title="Full Height" tag="2013" keyEquivalent="h" id="oA1-D9-Jq2">
<modifierMask key="keyEquivalentModifierMask" control="YES" option="YES" command="YES"/>
</menuItem>
<menuItem isSeparatorItem="YES" id="538"/>
<menuItem title="Increase" tag="2013" keyEquivalent="=" id="786">
<menuItem title="Increase" tag="2014" keyEquivalent="=" id="786">
<modifierMask key="keyEquivalentModifierMask" control="YES" option="YES" command="YES"/>
</menuItem>
<menuItem title="Reduce" tag="2014" keyEquivalent="-" id="787">
<menuItem title="Reduce" tag="2015" keyEquivalent="-" id="787">
<modifierMask key="keyEquivalentModifierMask" control="YES" option="YES" command="YES"/>
</menuItem>
<menuItem isSeparatorItem="YES" id="788"/>
<menuItem title="Next Screen" tag="2015" keyEquivalent="n" id="794">
<menuItem title="Next Screen" tag="2016" keyEquivalent="n" id="794">
<modifierMask key="keyEquivalentModifierMask" control="YES" option="YES" command="YES"/>
</menuItem>
<menuItem title="Previous Screen" tag="2016" id="URi-Kh-uDb">
<menuItem title="Previous Screen" tag="2017" id="URi-Kh-uDb">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem isSeparatorItem="YES" id="793"/>
Expand Down
1 change: 1 addition & 0 deletions ShiftIt/DefaultShiftItActions.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const extern SimpleWindowGeometryChangeBlock shiftItBottomLeft;
const extern SimpleWindowGeometryChangeBlock shiftItBottomRight;
const extern SimpleWindowGeometryChangeBlock shiftItFullScreen;
const extern SimpleWindowGeometryChangeBlock shiftItCenter;
const extern SimpleWindowGeometryChangeBlock shiftItFullHeight;

@interface IncreaseReduceShiftItAction : AbstractWindowGeometryShiftItAction {
@private
Expand Down
12 changes: 12 additions & 0 deletions ShiftIt/DefaultShiftItActions.m
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@
return MakeAnchoredRect(r, 0);
};

const SimpleWindowGeometryChangeBlock shiftItFullHeight = ^AnchoredRect(NSRect windowRect, NSSize screenSize) {
NSRect r = NSMakeRect(0, 0, 0, 0);

r.origin.x = windowRect.origin.x;
r.origin.y = 0;

r.size.width = windowRect.size.width;
r.size.height = screenSize.height;

return MakeAnchoredRect(r, 0);
};

const SimpleWindowGeometryChangeBlock shiftItCenter = ^AnchoredRect(NSRect windowRect, NSSize screenSize) {
NSRect r = NSMakeRect(0, 0, 0, 0);

Expand Down
2 changes: 1 addition & 1 deletion ShiftIt/FMT Tests/FMT Tests-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>net.fikovnik.projects.FMT.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
Expand Down
1 change: 1 addition & 0 deletions ShiftIt/PreferencesWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ - (void)setShouldStartAtLogin:(BOOL)flag {
@"zoom",
@"maximize",
@"fullScreen",
@"fullHeight",
NULL,
@"increase",
@"reduce",
Expand Down
6 changes: 3 additions & 3 deletions ShiftIt/ShiftIt Tests/SIAdjacentRectanglesTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

*/

#import <SenTestingKit/SenTestingKit.h>
#import <XCTest/XCTest.h>
#import "SIAdjacentRectangles.h"

@interface SIAdjacentRectanglesTest : SenTestCase
@interface SIAdjacentRectanglesTest : XCTestCase
@end

@implementation SIAdjacentRectanglesTest
Expand Down Expand Up @@ -65,7 +65,7 @@ - (void)testTwoRectangles {
FMTDirection directions[] = {kRightDirection, kBottomDirection, kLeftDirection, kTopDirection};
NSArray *path = [adjr buildDirectionalPath:directions fromValue:@"A"];

STAssertEquals((NSUInteger)11, [path count], @"There is only one rectangle in right direction from A");
XCTAssertEqual((NSUInteger)11, [path count], @"There is only one rectangle in right direction from A");
NSLog(@"%@",path);
}

Expand Down
2 changes: 1 addition & 1 deletion ShiftIt/ShiftIt Tests/ShiftIt Tests-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>org.shiftitapp.shiftit.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
Expand Down
2 changes: 1 addition & 1 deletion ShiftIt/ShiftIt-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string>ShiftIt.icns</string>
<key>CFBundleIdentifier</key>
<string>org.shiftitapp.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
12 changes: 8 additions & 4 deletions ShiftIt/ShiftIt-defaults.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
<integer>28</integer>
<key>fixedSizeWidthDelta</key>
<integer>50</integer>
<key>fullHeightKeyCode</key>
<integer>4</integer>
<key>fullHeightModifiers</key>
<integer>1</integer>
<key>fullScreenKeyCode</key>
<integer>3</integer>
<key>fullScreenModifiers</key>
Expand Down Expand Up @@ -85,10 +89,10 @@
<key>zoomKeyCode</key>
<integer>6</integer>
<key>zoomModifiers</key>
<integer>1835008</integer>
<key>nextscreenKeyCode</key>
<integer>45</integer>
<key>nextscreenModifiers</key>
<integer>1835008</integer>
<key>nextscreenKeyCode</key>
<integer>45</integer>
<key>nextscreenModifiers</key>
<integer>1835008</integer>
<key>previousscreenKeyCode</key>
<integer>35</integer>
Expand Down
39 changes: 19 additions & 20 deletions ShiftIt/ShiftIt.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,13 @@
27160C6D16C939FF002DA475 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
27160C6F16C939FF002DA475 /* ShortcutRecorder.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 27A14D7F1269CCA200E68263 /* ShortcutRecorder.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
27160C7016C939FF002DA475 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = F2708222117FCF9400C0A04C /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
2717BDAC1498B7FD0012EF87 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2714C0B21487F9BC00CC951D /* SenTestingKit.framework */; };
2717BE18149933530012EF87 /* GTMLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 270DACA814098AE30080DFBD /* GTMLogger.m */; };
2717BE1F149933840012EF87 /* SIAdjacentRectangles.m in Sources */ = {isa = PBXBuildFile; fileRef = F2DC61EF1127C862000E1A5F /* SIAdjacentRectangles.m */; };
2717BE29149933E70012EF87 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2717BE28149933E70012EF87 /* Carbon.framework */; };
2717BE2B149933EE0012EF87 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2717BE2A149933EE0012EF87 /* Cocoa.framework */; };
2717BE39149935EC0012EF87 /* FMTNSArray+Functional.m in Sources */ = {isa = PBXBuildFile; fileRef = 2717BE36149935EB0012EF87 /* FMTNSArray+Functional.m */; };
2717BE3A149935EC0012EF87 /* FMTNSArray+Functional.m in Sources */ = {isa = PBXBuildFile; fileRef = 2717BE36149935EB0012EF87 /* FMTNSArray+Functional.m */; };
2717BE3B149935EC0012EF87 /* FMTNSError+Extras.m in Sources */ = {isa = PBXBuildFile; fileRef = 2717BE38149935EC0012EF87 /* FMTNSError+Extras.m */; };
2717BEAC14994C120012EF87 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2714C0B21487F9BC00CC951D /* SenTestingKit.framework */; };
2717BEAE14994C120012EF87 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2717BEAD14994C120012EF87 /* Cocoa.framework */; };
2717BEBA14994C120012EF87 /* FMTGeometryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2717BEB914994C120012EF87 /* FMTGeometryTests.m */; };
2717BEBF14994CAE0012EF87 /* FMTGeometry.m in Sources */ = {isa = PBXBuildFile; fileRef = F2DC61EF1127C862000E1A67 /* FMTGeometry.m */; };
Expand Down Expand Up @@ -161,9 +159,8 @@
270DACA714098AE30080DFBD /* GTMLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMLogger.h; path = GTM/GTMLogger.h; sourceTree = "<group>"; };
270DACA814098AE30080DFBD /* GTMLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GTMLogger.m; path = GTM/GTMLogger.m; sourceTree = "<group>"; };
270DACAA14098B250080DFBD /* GTMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMDefines.h; path = GTM/GTMDefines.h; sourceTree = "<group>"; };
2714C0B21487F9BC00CC951D /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
27160C7416C939FF002DA475 /* ShiftIt.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ShiftIt.app; sourceTree = BUILT_PRODUCTS_DIR; };
2717BDAB1498B7FD0012EF87 /* ShiftIt Tests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ShiftIt Tests.octest"; sourceTree = BUILT_PRODUCTS_DIR; };
2717BDAB1498B7FD0012EF87 /* ShiftIt Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ShiftIt Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
2717BE28149933E70012EF87 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
2717BE2A149933EE0012EF87 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
2717BE34149935EB0012EF87 /* FMT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FMT.h; path = FMT/FMT.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -267,15 +264,13 @@
files = (
2717BE2B149933EE0012EF87 /* Cocoa.framework in Frameworks */,
2717BE29149933E70012EF87 /* Carbon.framework in Frameworks */,
2717BDAC1498B7FD0012EF87 /* SenTestingKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2717BEA714994C120012EF87 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2717BEAC14994C120012EF87 /* SenTestingKit.framework in Frameworks */,
2717BEAE14994C120012EF87 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -337,7 +332,7 @@
isa = PBXGroup;
children = (
8D1107320486CEB800E47090 /* ShiftIt.app */,
2717BDAB1498B7FD0012EF87 /* ShiftIt Tests.octest */,
2717BDAB1498B7FD0012EF87 /* ShiftIt Tests.xctest */,
2717BEAB14994C120012EF87 /* FMT Tests.octest */,
27160C7416C939FF002DA475 /* ShiftIt.app */,
);
Expand Down Expand Up @@ -528,7 +523,6 @@
children = (
279AF8181943675F0048FE5F /* ScriptingBridge.framework */,
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
2714C0B21487F9BC00CC951D /* SenTestingKit.framework */,
2717BEAD14994C120012EF87 /* Cocoa.framework */,
27B4F46A192CFB2B00D35063 /* CoreFoundation.framework */,
27B4F479192CFB4600D35063 /* Foundation.framework */,
Expand Down Expand Up @@ -603,8 +597,8 @@
);
name = "ShiftIt Tests";
productName = "ShiftIt Tests";
productReference = 2717BDAB1498B7FD0012EF87 /* ShiftIt Tests.octest */;
productType = "com.apple.product-type.bundle.ocunit-test";
productReference = 2717BDAB1498B7FD0012EF87 /* ShiftIt Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
2717BEAA14994C120012EF87 /* FMT Tests */ = {
isa = PBXNativeTarget;
Expand Down Expand Up @@ -650,8 +644,8 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastTestingUpgradeCheck = 0630;
LastUpgradeCheck = 0630;
LastTestingUpgradeCheck = 0700;
LastUpgradeCheck = 0700;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ShiftIt" */;
compatibilityVersion = "Xcode 3.2";
Expand Down Expand Up @@ -902,6 +896,7 @@
GCC_PREFIX_HEADER = ShiftIt_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "_DEBUGPRINTS_=1";
INFOPLIST_FILE = "ShiftIt-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "org.shiftitapp.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = ShiftIt;
};
name = Debug;
Expand All @@ -915,6 +910,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = ShiftIt_Prefix.pch;
INFOPLIST_FILE = "ShiftIt-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "org.shiftitapp.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = ShiftIt;
};
name = Release;
Expand All @@ -925,8 +921,8 @@
ALWAYS_SEARCH_USER_PATHS = NO;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
"\"$(SRCROOT)\"",
"$(SRCROOT)",
"$(inherited)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "ShiftIt Tests/ShiftIt Tests-Prefix.pch";
Expand All @@ -935,8 +931,8 @@
"$(inherited)",
);
INFOPLIST_FILE = "ShiftIt Tests/ShiftIt Tests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "org.shiftitapp.shiftit.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = octest;
};
name = Debug;
};
Expand All @@ -946,14 +942,14 @@
ALWAYS_SEARCH_USER_PATHS = NO;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
"\"$(SRCROOT)\"",
"$(SRCROOT)",
"$(inherited)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "ShiftIt Tests/ShiftIt Tests-Prefix.pch";
INFOPLIST_FILE = "ShiftIt Tests/ShiftIt Tests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "org.shiftitapp.shiftit.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = octest;
};
name = Release;
};
Expand All @@ -976,6 +972,7 @@
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
INFOPLIST_FILE = "FMT Tests/FMT Tests-Info.plist";
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_BUNDLE_IDENTIFIER = "net.fikovnik.projects.FMT.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = octest;
};
Expand All @@ -995,6 +992,7 @@
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
INFOPLIST_FILE = "FMT Tests/FMT Tests-Info.plist";
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_BUNDLE_IDENTIFIER = "net.fikovnik.projects.FMT.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = octest;
};
Expand Down Expand Up @@ -1025,6 +1023,7 @@
"-DDEBUG",
"-DX11",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.shiftitapp.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = ShiftIt;
};
name = Debug;
Expand Down Expand Up @@ -1052,16 +1051,17 @@
"-DNDEBUG",
"-DX11",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.shiftitapp.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = ShiftIt;
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = .;
GCC_C_LANGUAGE_STANDARD = "compiler-default";
GCC_OPTIMIZATION_LEVEL = 0;
Expand Down Expand Up @@ -1096,7 +1096,6 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
FRAMEWORK_SEARCH_PATHS = .;
Expand Down
Loading