changed header comments; changed classes name

This commit is contained in:
Gennadiy Potapov 2016-04-09 23:18:45 +08:00
parent 82f018743c
commit 6a0fa2f359
18 changed files with 147 additions and 225 deletions

View file

@ -1,9 +1,12 @@
//
// AppController.h
// Snapback
// AppController.m
// Flycut
//
// Created by Steve Cook on 4/3/06.
// Copyright 2006 __MyCompanyName__. All rights reserved.
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// This code is open-source software subject to the MIT License; see the homepage
// at <https://github.com/TermiT/Flycut> for details.
//
#import <Cocoa/Cocoa.h>
@ -11,7 +14,7 @@
#import "BezelWindow.h"
#import "SRRecorderControl.h"
#import "SRKeyCodeTransformer.h"
#import "JumpcutStore.h"
#import "FlycutStore.h"
#import "SGHotKey.h"
@class SGHotKey;
@ -32,10 +35,9 @@
int stashedStackPosition;
NSDateFormatter* dateFormat;
// The below were pulled in from JumpcutController
JumpcutStore *clippingStore;
JumpcutStore *favoritesStore;
JumpcutStore *stashedStore;
FlycutStore *clippingStore;
FlycutStore *favoritesStore;
FlycutStore *stashedStore;
// Status item -- the little icon in the menu bar
NSStatusItem *statusItem;
@ -59,7 +61,7 @@
// Track the clipboard count so we only act when its contents change
NSNumber *pbCount;
BOOL disableStore;
//stores PasteboardCount for internal Jumpcut pasteboard actions so they don't trigger any events
//stores PasteboardCount for internal Flycut pasteboard actions so they don't trigger any events
NSNumber *pbBlockCount;
//Preferences
NSDictionary *standardPreferences;

View file

@ -1,12 +1,13 @@
//
// AppController.m
// Jumpcut
// Flycut
//
// Created by Steve Cook on 4/3/06.
// Copyright 2006 __MyCompanyName__. All rights reserved.
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// This code is open-source software subject to the MIT License; see the homepage
// at <http://jumpcut.sourceforge.net/> for details.
// at <https://github.com/TermiT/Flycut> for details.
//
#import "AppController.h"
#import "SGHotKey.h"
@ -90,11 +91,11 @@
[[[[NSUserDefaults standardUserDefaults] dictionaryForKey:@"ShortcutRecorder mainHotkey"] objectForKey:@"modifierFlags"] intValue] )
];
};
// Initialize the JumpcutStore
clippingStore = [[JumpcutStore alloc] initRemembering:[[NSUserDefaults standardUserDefaults] integerForKey:@"rememberNum"]
// Initialize the FlycutStore
clippingStore = [[FlycutStore alloc] initRemembering:[[NSUserDefaults standardUserDefaults] integerForKey:@"rememberNum"]
displaying:[[NSUserDefaults standardUserDefaults] integerForKey:@"displayNum"]
withDisplayLength:_DISPLENGTH];
favoritesStore = [[JumpcutStore alloc] initRemembering:[[NSUserDefaults standardUserDefaults] integerForKey:@"favoritesRememberNum"]
favoritesStore = [[FlycutStore alloc] initRemembering:[[NSUserDefaults standardUserDefaults] integerForKey:@"favoritesRememberNum"]
displaying:[[NSUserDefaults standardUserDefaults] integerForKey:@"displayNum"]
withDisplayLength:_DISPLENGTH];
stashedStore = NULL;
@ -364,7 +365,7 @@
-(IBAction) setFavoritesRememberNumPref:(id)sender
{
JumpcutStore *primary = clippingStore;
FlycutStore *primary = clippingStore;
clippingStore = favoritesStore;
[self setRememberNumPref: sender];
clippingStore = primary;
@ -1306,7 +1307,7 @@
-(void) fillBezel
{
JumpcutClipping* clipping = [clippingStore clippingAtPosition:stackPosition];
FlycutClipping* clipping = [clippingStore clippingAtPosition:stackPosition];
[bezel setText:[NSString stringWithFormat:@"%@", [clipping contents]]];
[bezel setCharString:[NSString stringWithFormat:@"%d of %d", stackPosition + 1, [clippingStore jcListCount]]];
NSString *localizedName = [clipping appLocalizedName];
@ -1339,11 +1340,11 @@
}
}
- (void)saveStore:(JumpcutStore *)store toKey:(NSString *)key onDict:(NSMutableDictionary *)saveDict {
- (void)saveStore:(FlycutStore *)store toKey:(NSString *)key onDict:(NSMutableDictionary *)saveDict {
NSMutableArray *jcListArray = [NSMutableArray array];
for ( int i = 0 ; i < [store jcListCount] ; i++ )
{
JumpcutClipping *clipping = [store clippingAtPosition:i];
FlycutClipping *clipping = [store clippingAtPosition:i];
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
[clipping contents], @"Contents",
[clipping type], @"Type",

View file

@ -272,7 +272,7 @@
<binding destination="808" name="value" keyPath="values.displayNum" id="832"/>
</connections>
</textField>
<stepper toolTip="Controls how many clippings Jumpcut stores in its stack" horizontalHuggingPriority="750" verticalHuggingPriority="750" id="472">
<stepper toolTip="Controls how many clippings Flycut stores in its stack" horizontalHuggingPriority="750" verticalHuggingPriority="750" id="472">
<rect key="frame" x="104" y="172" width="19" height="27"/>
<autoresizingMask key="autoresizingMask"/>
<stepperCell key="cell" continuous="YES" alignment="left" minValue="10" maxValue="99" doubleValue="10" valueWraps="YES" id="760"/>
@ -281,7 +281,7 @@
<binding destination="808" name="value" keyPath="values.rememberNum" id="829"/>
</connections>
</stepper>
<stepper toolTip="Controls how many clippings Jumpcut shows in the menu" horizontalHuggingPriority="750" verticalHuggingPriority="750" id="473">
<stepper toolTip="Controls how many clippings Flycut shows in the menu" horizontalHuggingPriority="750" verticalHuggingPriority="750" id="473">
<rect key="frame" x="249" y="172" width="19" height="27"/>
<autoresizingMask key="autoresizingMask"/>
<stepperCell key="cell" continuous="YES" alignment="left" minValue="5" maxValue="99" doubleValue="5" valueWraps="YES" id="761"/>
@ -363,7 +363,7 @@
<binding destination="808" name="value" keyPath="values.rememberNum" id="887-jS-Kpn"/>
</connections>
</textField>
<stepper toolTip="Controls how many clippings Jumpcut stores in its stack" horizontalHuggingPriority="750" verticalHuggingPriority="750" id="wZv-HJ-VdW">
<stepper toolTip="Controls how many clippings Flycut stores in its stack" horizontalHuggingPriority="750" verticalHuggingPriority="750" id="wZv-HJ-VdW">
<rect key="frame" x="371" y="172" width="19" height="27"/>
<autoresizingMask key="autoresizingMask"/>
<stepperCell key="cell" continuous="YES" alignment="left" minValue="10" maxValue="99" doubleValue="10" valueWraps="YES" id="gUi-gl-RH6"/>

Binary file not shown.

View file

@ -9,10 +9,6 @@
/* Begin PBXBuildFile section */
773ABFB113E9AA1A00AE3969 /* NSWindow+TrueCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 773ABFAF13E9AA1A00AE3969 /* NSWindow+TrueCenter.h */; };
773ABFB213E9AA1A00AE3969 /* NSWindow+TrueCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 773ABFB013E9AA1A00AE3969 /* NSWindow+TrueCenter.m */; };
7761C87C139BDE7F000FB3AB /* JumpcutClipping.h in Headers */ = {isa = PBXBuildFile; fileRef = 7761C878139BDE7F000FB3AB /* JumpcutClipping.h */; };
7761C87D139BDE7F000FB3AB /* JumpcutClipping.m in Sources */ = {isa = PBXBuildFile; fileRef = 7761C879139BDE7F000FB3AB /* JumpcutClipping.m */; };
7761C87E139BDE7F000FB3AB /* JumpcutStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 7761C87A139BDE7F000FB3AB /* JumpcutStore.h */; };
7761C87F139BDE7F000FB3AB /* JumpcutStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 7761C87B139BDE7F000FB3AB /* JumpcutStore.m */; };
7761C885139BDE94000FB3AB /* LoginItemsAE.c in Sources */ = {isa = PBXBuildFile; fileRef = 7761C881139BDE94000FB3AB /* LoginItemsAE.c */; };
7761C886139BDE94000FB3AB /* LoginItemsAE.h in Headers */ = {isa = PBXBuildFile; fileRef = 7761C882139BDE94000FB3AB /* LoginItemsAE.h */; };
7761C887139BDE94000FB3AB /* UKLoginItemRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 7761C883139BDE94000FB3AB /* UKLoginItemRegistry.h */; };
@ -56,6 +52,10 @@
77A4F3B2139BD72300F39666 /* SGKeyCodeTranslator.m in Sources */ = {isa = PBXBuildFile; fileRef = 77A4F3AA139BD72300F39666 /* SGKeyCodeTranslator.m */; };
77A4F3B3139BD72300F39666 /* SGKeyCombo.h in Headers */ = {isa = PBXBuildFile; fileRef = 77A4F3AB139BD72300F39666 /* SGKeyCombo.h */; };
77A4F3B4139BD72300F39666 /* SGKeyCombo.m in Sources */ = {isa = PBXBuildFile; fileRef = 77A4F3AC139BD72300F39666 /* SGKeyCombo.m */; };
77DA6B921CB9549B0077917F /* FlycutStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 77DA6B8E1CB9549B0077917F /* FlycutStore.m */; };
77DA6B931CB9549B0077917F /* FlycutStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 77DA6B8F1CB9549B0077917F /* FlycutStore.h */; };
77DA6B941CB9549B0077917F /* FlycutClipping.m in Sources */ = {isa = PBXBuildFile; fileRef = 77DA6B901CB9549B0077917F /* FlycutClipping.m */; };
77DA6B951CB9549B0077917F /* FlycutClipping.h in Headers */ = {isa = PBXBuildFile; fileRef = 77DA6B911CB9549B0077917F /* FlycutClipping.h */; };
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
@ -69,38 +69,7 @@
DBEB0C9D1442F2AE0080D24E /* NSWindow+ULIZoomEffect.m in Sources */ = {isa = PBXBuildFile; fileRef = DBEB0C9B1442F2AE0080D24E /* NSWindow+ULIZoomEffect.m */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
AA22E86C0DBC4CB100351132 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 7;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
AAE200D70A23255C002DCC2A /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 7;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
AAECDE440A03E75C007D377A /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
0474801818D46BDB00AA9857 /* Flycut.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Flycut.entitlements; sourceTree = "<group>"; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
@ -110,10 +79,6 @@
32CA4F630368D1EE00C91783 /* Flycut_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Flycut_Prefix.pch; sourceTree = "<group>"; };
773ABFAF13E9AA1A00AE3969 /* NSWindow+TrueCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSWindow+TrueCenter.h"; sourceTree = "<group>"; };
773ABFB013E9AA1A00AE3969 /* NSWindow+TrueCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSWindow+TrueCenter.m"; sourceTree = "<group>"; };
7761C878139BDE7F000FB3AB /* JumpcutClipping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JumpcutClipping.h; sourceTree = "<group>"; };
7761C879139BDE7F000FB3AB /* JumpcutClipping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JumpcutClipping.m; sourceTree = "<group>"; };
7761C87A139BDE7F000FB3AB /* JumpcutStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JumpcutStore.h; sourceTree = "<group>"; };
7761C87B139BDE7F000FB3AB /* JumpcutStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JumpcutStore.m; sourceTree = "<group>"; };
7761C881139BDE94000FB3AB /* LoginItemsAE.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = LoginItemsAE.c; sourceTree = "<group>"; };
7761C882139BDE94000FB3AB /* LoginItemsAE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginItemsAE.h; sourceTree = "<group>"; };
7761C883139BDE94000FB3AB /* UKLoginItemRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UKLoginItemRegistry.h; sourceTree = "<group>"; };
@ -159,6 +124,10 @@
77A4F3AA139BD72300F39666 /* SGKeyCodeTranslator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SGKeyCodeTranslator.m; sourceTree = "<group>"; };
77A4F3AB139BD72300F39666 /* SGKeyCombo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SGKeyCombo.h; sourceTree = "<group>"; };
77A4F3AC139BD72300F39666 /* SGKeyCombo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SGKeyCombo.m; sourceTree = "<group>"; };
77DA6B8E1CB9549B0077917F /* FlycutStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FlycutStore.m; path = FlycutEngine/FlycutStore.m; sourceTree = SOURCE_ROOT; };
77DA6B8F1CB9549B0077917F /* FlycutStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlycutStore.h; path = FlycutEngine/FlycutStore.h; sourceTree = SOURCE_ROOT; };
77DA6B901CB9549B0077917F /* FlycutClipping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FlycutClipping.m; path = FlycutEngine/FlycutClipping.m; sourceTree = SOURCE_ROOT; };
77DA6B911CB9549B0077917F /* FlycutClipping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlycutClipping.h; path = FlycutEngine/FlycutClipping.h; sourceTree = SOURCE_ROOT; };
8D1107320486CEB800E47090 /* Flycut.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Flycut.app; sourceTree = BUILT_PRODUCTS_DIR; };
8D2E28821B0669F500AE62C8 /* com.generalarcade.flycut.black.16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = com.generalarcade.flycut.black.16.png; path = Resources/com.generalarcade.flycut.black.16.png; sourceTree = "<group>"; };
8D2E28831B0669F500AE62C8 /* com.generalarcade.flycut.black.32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = com.generalarcade.flycut.black.32.png; path = Resources/com.generalarcade.flycut.black.32.png; sourceTree = "<group>"; };
@ -193,7 +162,7 @@
7761C896139BDEC4000FB3AB /* UKPrefsPanel */,
7761C889139BDEAF000FB3AB /* UI */,
7761C880139BDE94000FB3AB /* LoginItem */,
7761C877139BDE7F000FB3AB /* JumpcutEngine */,
7761C877139BDE7F000FB3AB /* FlycutEngine */,
77A4F3A4139BD72300F39666 /* SGHotKeysLib */,
);
name = Classes;
@ -229,7 +198,6 @@
29B97314FDCFA39411CA2CEA /* Jumpcut */ = {
isa = PBXGroup;
children = (
0474801818D46BDB00AA9857 /* Flycut.entitlements */,
7794D3D4139BF28B0047E862 /* flycut.icns */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
@ -284,14 +252,15 @@
name = Frameworks;
sourceTree = "<group>";
};
7761C877139BDE7F000FB3AB /* JumpcutEngine */ = {
7761C877139BDE7F000FB3AB /* FlycutEngine */ = {
isa = PBXGroup;
children = (
7761C878139BDE7F000FB3AB /* JumpcutClipping.h */,
7761C879139BDE7F000FB3AB /* JumpcutClipping.m */,
7761C87A139BDE7F000FB3AB /* JumpcutStore.h */,
7761C87B139BDE7F000FB3AB /* JumpcutStore.m */,
77DA6B8E1CB9549B0077917F /* FlycutStore.m */,
77DA6B8F1CB9549B0077917F /* FlycutStore.h */,
77DA6B901CB9549B0077917F /* FlycutClipping.m */,
77DA6B911CB9549B0077917F /* FlycutClipping.h */,
);
name = FlycutEngine;
path = JumpcutEngine;
sourceTree = "<group>";
};
@ -375,8 +344,6 @@
77A4F3AF139BD72300F39666 /* SGHotKeyCenter.h in Headers */,
77A4F3B1139BD72300F39666 /* SGKeyCodeTranslator.h in Headers */,
77A4F3B3139BD72300F39666 /* SGKeyCombo.h in Headers */,
7761C87C139BDE7F000FB3AB /* JumpcutClipping.h in Headers */,
7761C87E139BDE7F000FB3AB /* JumpcutStore.h in Headers */,
7761C886139BDE94000FB3AB /* LoginItemsAE.h in Headers */,
7761C887139BDE94000FB3AB /* UKLoginItemRegistry.h in Headers */,
7761C890139BDEAF000FB3AB /* BezelWindow.h in Headers */,
@ -385,9 +352,11 @@
7761C899139BDEC4000FB3AB /* UKPrefsPanel.h in Headers */,
7761C8AA139BDF12000FB3AB /* SRCommon.h in Headers */,
7761C8AC139BDF12000FB3AB /* SRKeyCodeTransformer.h in Headers */,
77DA6B951CB9549B0077917F /* FlycutClipping.h in Headers */,
7761C8AE139BDF12000FB3AB /* SRRecorderCell.h in Headers */,
7761C8B0139BDF12000FB3AB /* SRRecorderControl.h in Headers */,
7761C8B2139BDF12000FB3AB /* SRValidator.h in Headers */,
77DA6B931CB9549B0077917F /* FlycutStore.h in Headers */,
773ABFB113E9AA1A00AE3969 /* NSWindow+TrueCenter.h in Headers */,
DBEB0C9C1442F2AE0080D24E /* NSWindow+ULIZoomEffect.h in Headers */,
);
@ -403,11 +372,8 @@
8D60A1BA1BC8399900A26CBF /* ShellScript */,
8D1107290486CEB800E47090 /* Resources */,
8D11072C0486CEB800E47090 /* Sources */,
AAECDE440A03E75C007D377A /* CopyFiles */,
8D11072E0486CEB800E47090 /* Frameworks */,
AAE200D70A23255C002DCC2A /* CopyFiles */,
AAE2036C0A27B2B9002DCC2A /* Headers */,
AA22E86C0DBC4CB100351132 /* CopyFiles */,
);
buildRules = (
);
@ -511,8 +477,6 @@
77A4F3B0139BD72300F39666 /* SGHotKeyCenter.m in Sources */,
77A4F3B2139BD72300F39666 /* SGKeyCodeTranslator.m in Sources */,
77A4F3B4139BD72300F39666 /* SGKeyCombo.m in Sources */,
7761C87D139BDE7F000FB3AB /* JumpcutClipping.m in Sources */,
7761C87F139BDE7F000FB3AB /* JumpcutStore.m in Sources */,
7761C885139BDE94000FB3AB /* LoginItemsAE.c in Sources */,
7761C888139BDE94000FB3AB /* UKLoginItemRegistry.m in Sources */,
7761C891139BDEAF000FB3AB /* BezelWindow.m in Sources */,
@ -520,9 +484,11 @@
7761C895139BDEAF000FB3AB /* RoundRecTextField.m in Sources */,
7761C89A139BDEC4000FB3AB /* UKPrefsPanel.m in Sources */,
7761C8AB139BDF12000FB3AB /* SRCommon.m in Sources */,
77DA6B941CB9549B0077917F /* FlycutClipping.m in Sources */,
7761C8AD139BDF12000FB3AB /* SRKeyCodeTransformer.m in Sources */,
7761C8AF139BDF12000FB3AB /* SRRecorderCell.m in Sources */,
7761C8B1139BDF12000FB3AB /* SRRecorderControl.m in Sources */,
77DA6B921CB9549B0077917F /* FlycutStore.m in Sources */,
7761C8B3139BDF12000FB3AB /* SRValidator.m in Sources */,
773ABFB213E9AA1A00AE3969 /* NSWindow+TrueCenter.m in Sources */,
DBEB0C9D1442F2AE0080D24E /* NSWindow+ULIZoomEffect.m in Sources */,

View file

@ -1,32 +1,17 @@
//
// JumpcutClipping.h
// Jumpcut
// http://jumpcut.sourceforge.net/
// FlycutClipping.h
// Flycut
//
// Created by steve on Sun Jan 12 2003.
// Copyright (c) 2003-2006 Steve Cook
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
// THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This code is open-source software subject to the MIT License; see the homepage
// at <https://github.com/TermiT/Flycut> for details.
//
#import <Foundation/Foundation.h>
@interface JumpcutClipping : NSObject {
@interface FlycutClipping : NSObject {
// What must a clipping hold?
// The text
NSString * clipContents;
@ -59,7 +44,7 @@
-(void) setHasName:(BOOL)newHasName;
// Retrieve values
-(JumpcutClipping *) clipping;
-(FlycutClipping *) clipping;
-(NSString *) contents;
-(int) displayLength;
-(NSString *) displayString;

View file

@ -1,32 +1,18 @@
//
// JumpcutClipping.m
// Jumpcut
// http://jumpcut.sourceforge.net/
// FlycutClipping.m
// Flycut
//
// Created by steve on Sun Jan 12 2003.
// Copyright (c) 2003-2006 Steve Cook
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
// THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This code is open-source software subject to the MIT License; see the homepage
// at <https://github.com/TermiT/Flycut> for details.
//
#import "JumpcutClipping.h"
@implementation JumpcutClipping
#import "FlycutClipping.h"
@implementation FlycutClipping
-(id) init
{
@ -177,7 +163,7 @@
return description;
}
-(JumpcutClipping *) clipping
-(FlycutClipping *) clipping
{
return self;
}
@ -235,7 +221,7 @@
return YES;
if (!other || ![other isKindOfClass:[self class]])
return NO;
JumpcutClipping * otherClip = (JumpcutClipping *)other;
FlycutClipping * otherClip = (FlycutClipping *)other;
return ([self.type isEqualToString:otherClip.type] &&
[self.displayString isEqualToString:otherClip.displayString] &&
(self.displayLength == otherClip.displayLength) &&

View file

@ -1,42 +1,19 @@
//
// JumpcutStore.h
// Jumpcut
// http://jumpcut.sourceforge.net/
// FlycutStore.h
// Flycut
//
// Created by steve on Sun Dec 21 2003.
// Copyright (c) 2003-2006 Steve Cook
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
// This code is open-source software subject to the MIT License; see the homepage
// at <https://github.com/TermiT/Flycut> for details.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
// THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// The Jumpcut store is the component that actually holds the strings.
// It deals with everything regarding holding and returning the clippings,
// leaving all UI-related concerns to the other components.
// jcRememberNum and jcDisplayNum are slight misnomers; they're both "remember this many"
// limits, but they represent slightly different things.
// In Jumpcut 0.5, I should go through and fiddle with the nomenclature.
#import <Foundation/Foundation.h>
#import "JumpcutClipping.h"
#import "FlycutClipping.h"
@interface JumpcutStore : NSObject {
@interface FlycutStore : NSObject {
// Our various listener-related preferences
int jcRememberNum; // The max we will allow users to display; 20
@ -65,7 +42,7 @@
-(int) rememberNum;
-(int) displayLen;
-(int) jcListCount;
-(JumpcutClipping *) clippingAtPosition:(int)index;
-(FlycutClipping *) clippingAtPosition:(int)index;
-(NSString *) clippingContentsAtPosition:(int)index;
-(NSString *) clippingDisplayStringAtPosition:(int)index;
-(NSString *) clippingTypeAtPosition:(int)index;
@ -76,7 +53,7 @@
// Add a clipping
-(void) addClipping:(NSString *)clipping ofType:(NSString *)type fromAppLocalizedName:(NSString *)appLocalizedName fromAppBundleURL:(NSString *)bundleURL atTimestamp:(int) timestamp;
-(void) addClipping:(JumpcutClipping*) clipping;
-(void) addClipping:(FlycutClipping*) clipping;
// Delete a clipping
-(void) clearItem:(int)index;

View file

@ -1,33 +1,19 @@
//
// JumpcutStore.m
// Jumpcut
// http://jumpcut.sourceforge.net/
// FlycutStore.m
// Flycut
//
// Created by steve on Sun Dec 21 2003.
// Copyright (c) 2003-2006 Steve Cook
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
// This code is open-source software subject to the MIT License; see the homepage
// at <https://github.com/TermiT/Flycut> for details.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
// THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#import "JumpcutStore.h"
#import "JumpcutClipping.h"
#import "FlycutStore.h"
#import "FlycutClipping.h"
@implementation JumpcutStore
@implementation FlycutStore
-(id) init
{
@ -54,9 +40,9 @@
return;
}
// Clipping object
JumpcutClipping * newClipping;
FlycutClipping * newClipping;
// Create clipping
newClipping = [[JumpcutClipping alloc] initWithContents:clipping
newClipping = [[FlycutClipping alloc] initWithContents:clipping
withType:type
withDisplayLength:[self displayLen]
withAppLocalizedName:appLocalizedName
@ -68,7 +54,7 @@
[newClipping release];
}
-(void) addClipping:(JumpcutClipping*) clipping{
-(void) addClipping:(FlycutClipping*) clipping{
if ([jcList containsObject:clipping] && [[[NSUserDefaults standardUserDefaults] valueForKey:@"removeDuplicates"] boolValue]) {
[jcList removeObject:clipping];
}
@ -105,7 +91,7 @@
-(void) clippingMoveToTop:(int)index
{
JumpcutClipping *clipping = [jcList objectAtIndex:index];
FlycutClipping *clipping = [jcList objectAtIndex:index];
[jcList insertObject:clipping atIndex:0];
[jcList removeObjectAtIndex:index+1];
}
@ -133,7 +119,7 @@
if ( newDisplayLength > 0 ) {
jcDisplayLen = newDisplayLength;
for (JumpcutClipping *aClipping in jcList) {
for (FlycutClipping *aClipping in jcList) {
[aClipping setDisplayLength:newDisplayLength];
}
}
@ -154,7 +140,7 @@
return [jcList count];
}
-(JumpcutClipping *) clippingAtPosition:(int)index
-(FlycutClipping *) clippingAtPosition:(int)index
{
if ( index >= [jcList count] ) {
return nil;
@ -191,7 +177,7 @@
NSArray *subArray;
NSMutableArray *returnArray = [[[NSMutableArray alloc] init] autorelease];
NSEnumerator *enumerator;
JumpcutClipping *aClipping;
FlycutClipping *aClipping;
theRange.location = 0;
theRange.length = howMany;
if ( howMany > [jcList count] ) {
@ -217,7 +203,7 @@
NSArray *subArray;
NSMutableArray *returnArray = [[[NSMutableArray alloc] init] autorelease];
NSEnumerator *enumerator;
JumpcutClipping *aClipping;
FlycutClipping *aClipping;
// If we have a search, do that. Pretty much a mix of the other two paths below, but separated out to avoid extra processing.
if (nil != search && search.length > 0) {
@ -255,7 +241,7 @@
NSArray *subArray;
NSMutableArray *returnArray = [[[NSMutableArray alloc] init] autorelease];
NSEnumerator *enumerator;
JumpcutClipping *aClipping;
FlycutClipping *aClipping;
// If we have a search, do that.
if (nil != search && search.length > 0) {

View file

@ -1,12 +1,14 @@
//
// BezelWindow.h
// Jumpcut
// Flycut
//
// Created by Steve Cook on 4/3/06.
// Copyright 2006 Steve Cook. All rights reserved.
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// This code is open-source software subject to the MIT License; see the homepage
// at <http://jumpcut.sourceforge.net/> for details.
// at <https://github.com/TermiT/Flycut> for details.
//
#import <Cocoa/Cocoa.h>
#import "RoundRecBezierPath.h"

View file

@ -1,12 +1,13 @@
//
// BezelWindow.m
// Jumpcut
// Flycut
//
// Created by Steve Cook on 4/3/06.
// Copyright 2006 Steve Cook. All rights reserved.
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// This code is open-source software subject to the MIT License; see the homepage
// at <http://jumpcut.sourceforge.net/> for details.
// at <https://github.com/TermiT/Flycut> for details.
//
#import "BezelWindow.h"

View file

@ -1,9 +1,13 @@
//
// NSWindow+TrueCenter.h
// Jumpcut
// Flycut
//
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// This code is open-source software subject to the MIT License; see the homepage
// at <https://github.com/TermiT/Flycut> for details.
//
// Created by Gennadii Potapov on 4/8/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import <AppKit/AppKit.h>

View file

@ -1,9 +1,13 @@
//
// NSWindow+TrueCenter.m
// Jumpcut
// Flycut
//
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// This code is open-source software subject to the MIT License; see the homepage
// at <https://github.com/TermiT/Flycut> for details.
//
// Created by Gennadii Potapov on 4/8/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import "NSWindow+TrueCenter.h"

View file

@ -1,12 +1,13 @@
//
// RoundRecBezierPath.h
// Jumpcut
// Flycut
//
// Created by steve on Tue Dec 16 2003.
// Copyright (c) 2003 Steve Cook. All rights reserved.
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// This code is open-source software subject to the MIT License; see the homepage
// at <http://jumpcut.sourceforge.net/> for details.
// at <https://github.com/TermiT/Flycut> for details.
//
#import <AppKit/AppKit.h>
#import <AppKit/NSBezierPath.h>

View file

@ -1,12 +1,13 @@
//
// RoundRecBezierPath.m
// Jumpcut
// Flycut
//
// Created by steve on Tue Dec 16 2003.
// Copyright (c) 2003 Steve Cook. All rights reserved.
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// This code is open-source software subject to the MIT License; see the homepage
// at <http://jumpcut.sourceforge.net/> for details.
// at <https://github.com/TermiT/Flycut> for details.
//
#import "RoundRecBezierPath.h"

View file

@ -1,12 +1,13 @@
//
// RoundedTextField.h
// Jumpcut
// RoundRecTextField.h
// Flycut
//
// Created by steve on Wed Dec 17 2003.
// Copyright (c) 2003 Steve Cook. All rights reserved.
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// This code is open-source software subject to the MIT License; see the homepage
// at <http://jumpcut.sourceforge.net/> for details.
// at <https://github.com/TermiT/Flycut> for details.
//
#import <AppKit/AppKit.h>

View file

@ -1,12 +1,14 @@
//
// RoundedTextField.m
// Jumpcut
// RoundRecTextField.m
// Flycut
//
// Created by steve on Wed Dec 17 2003.
// Copyright (c) 2003 Steve Cook. All rights reserved.
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// This code is open-source software subject to the MIT License; see the homepage
// at <http://jumpcut.sourceforge.net/> for details.
// at <https://github.com/TermiT/Flycut> for details.
//
//
#import "RoundRecTextField.h"
#import "RoundRecBezierPath.h"

9
main.m
View file

@ -1,9 +1,12 @@
//
// main.m
// Jumpcut
// Flycut
//
// Created by Steve Cook on 4/25/06.
// Copyright __MyCompanyName__ 2006. All rights reserved.
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook.
// Copyright 2011 General Arcade. All rights reserved.
//
// This code is open-source software subject to the MIT License; see the homepage
// at <https://github.com/TermiT/Flycut> for details.
//
#import <Cocoa/Cocoa.h>