Added licenses

This commit is contained in:
michael starke
2013-11-30 19:09:27 +01:00
parent ebfc0f91eb
commit 871b3a5c45
46 changed files with 735 additions and 31 deletions

View File

@@ -225,6 +225,7 @@
4CCEDE2A179F203B008402BE /* MPOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCEDE29179F203B008402BE /* MPOutlineView.m */; };
4CCEDE2E179F213B008402BE /* MPNotifications.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCEDE2D179F213B008402BE /* MPNotifications.m */; };
4CCEDE32179F5B6C008402BE /* KPKDataStreamReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCEDE31179F5B6C008402BE /* KPKDataStreamReader.m */; };
4CD2B9061849424B0051B395 /* MPAutotypeContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD2B9051849424B0051B395 /* MPAutotypeContext.m */; };
4CD3ABBA178F71B50073F5C5 /* KPKTree.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD3ABB4178F71B50073F5C5 /* KPKTree.m */; };
4CD3ABBF178F72610073F5C5 /* KPKEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD3ABBE178F72610073F5C5 /* KPKEntry.m */; };
4CD3ABC2178F72720073F5C5 /* KPKGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD3ABC1178F72720073F5C5 /* KPKGroup.m */; };
@@ -685,6 +686,8 @@
4CCEDE2F179F550D008402BE /* KPKTreeReading.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KPKTreeReading.h; sourceTree = "<group>"; };
4CCEDE30179F5B6C008402BE /* KPKDataStreamReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKDataStreamReader.h; sourceTree = "<group>"; };
4CCEDE31179F5B6C008402BE /* KPKDataStreamReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKDataStreamReader.m; sourceTree = "<group>"; };
4CD2B9041849424B0051B395 /* MPAutotypeContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAutotypeContext.h; sourceTree = "<group>"; };
4CD2B9051849424B0051B395 /* MPAutotypeContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAutotypeContext.m; sourceTree = "<group>"; };
4CD3ABB2178F71B50073F5C5 /* KPKVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = KPKVersion.h; path = Format/KPKVersion.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
4CD3ABB3178F71B50073F5C5 /* KPKTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKTree.h; sourceTree = "<group>"; };
4CD3ABB4178F71B50073F5C5 /* KPKTree.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKTree.m; sourceTree = "<group>"; };
@@ -1322,6 +1325,8 @@
4CE296181842A166005F01CE /* MPAutotypePaste.m */,
4CC87EA11847FDDA005AA18D /* MPAutotypeParser.h */,
4CC87EA21847FDDA005AA18D /* MPAutotypeParser.m */,
4CD2B9041849424B0051B395 /* MPAutotypeContext.h */,
4CD2B9051849424B0051B395 /* MPAutotypeContext.m */,
);
name = Autotype;
sourceTree = "<group>";
@@ -2012,6 +2017,7 @@
4C1842C3179B69E700E2F5BC /* NSData+HashedData.m in Sources */,
4C1842C6179BF52100E2F5BC /* KPKLegacyHeaderReader.m in Sources */,
4C1842D0179C64DD00E2F5BC /* KPKLegacyTreeCryptor.m in Sources */,
4CD2B9061849424B0051B395 /* MPAutotypeContext.m in Sources */,
4C1842D3179C64F000E2F5BC /* KPKXmlTreeCryptor.m in Sources */,
4CFC873B179DEDF3000DFC03 /* KPKMetaData.m in Sources */,
4CFC873E179DF200000DFC03 /* KPKTimeInfo.m in Sources */,

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 30.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Foundation/Foundation.h>

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 30.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPAddEntryContextMenuDelegate.h"
#import "MPDocument.h"

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 19.07.12.
// Copyright (c) 2012 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Cocoa/Cocoa.h>

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 19.07.12.
// Copyright (c) 2012 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPAppDelegate.h"

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 01.08.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Foundation/Foundation.h>

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 01.08.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPAttachmentTableDataSource.h"
#import "MPDocument.h"

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 17.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Foundation/Foundation.h>

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 17.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPAttachmentTableViewDelegate.h"

View File

@@ -8,6 +8,12 @@
#import <Foundation/Foundation.h>
extern NSString *const kMPAutotypeSymbolShift;
extern NSString *const kMPAutotypeSymbolControl;
extern NSString *const kMPAutotypeSymbolAlt;
extern NSString *const kMPAutotypeSymbolEnter;
extern NSString *const kMPAutptypeCommandEnter;
@class KPKEntry;
/**

View File

@@ -11,6 +11,80 @@
#import <Carbon/Carbon.h>
NSString *const kMPAutotypeSymbolShift = @"+";
NSString *const kMPAutotypeSymbolControl = @"^";
NSString *const kMPAutotypeSymbolAlt = @"%";
NSString *const kMPAutotypeSymbolEnter = @"~";
NSString *const kMPAutptypeCommandEnter = @"{ENTER}";
NSString *const kMPAutotypeCommandTab = @"{TAB}";
NSString *const kMPAutotypeCommandUp = @"{UP}";
NSString *const kMPAutotypeCommandDown = @"{DOWN}";
NSString *const kMPAutotypeCommandLeft = @"{LEFT}";
NSString *const kMPAutotypeCommandRight = @"{RIGHT}";
NSString *const kMPAutotypeCommandDelete = @"{DELETE}";
NSString *const kMPAutotypeCommandHome = @"{HOME}";
NSString *const kMPAutotypeCommandEnd = @"{END}";
NSString *const kMPAutotypeCommandPageUp = @"{PGUP}";
NSString *const kMPAutotypeCommandPageDown = @"{PGDOWN}";
NSString *const kMPAutotypeCommandBackspace = @"{BACKSPACE}";
NSString *const kMPAutotypeCommandBackspaceShort = @"{BS}";
NSString *const kMPAutotypeCommandBackspaceMedium = @"{BKSP}";
NSString *const kMPAutotypeCommandBreak = @"{BREAK}";
NSString *const kMPAutotypeCommandCapsLock = @"{CAPSLOCK}";
NSString *const kMPAutotypeCommandEscape = @"{ESC}";
NSString *const kMPAutotypeCommandWindows = @"{WIN}";
NSString *const kMPAutotypeCommandLeftWindows = @"{LWIN}";
NSString *const kMPAutotypeCommandRightWindows = @"{RWIN}";
NSString *const kMPAutotypeCommandApps = @"{APPS}";
NSString *const kMPAutotypeCommandHelp = @"{HELP}";
NSString *const kMPAutotypeCommandNumlock = @"{NUMLOCK}";
NSString *const kMPAutotypeCommandPrintScreen = @"{PRTSC}";
NSString *const kMPAutotypeCommandScrollLock = @"{SCROLLLOCK}";
NSString *const kMPAutotypeCommandF1 = @"{F1}";
/*
Tab {TAB}
Enter {ENTER} or ~
Arrow Up {UP}
Arrow Down {DOWN}
Arrow Left {LEFT}
Arrow Right {RIGHT}
Insert {INSERT} or {INS}
Delete {DELETE} or {DEL}
Home {HOME}
End {END}
Page Up {PGUP}
Page Down {PGDN}
Backspace {BACKSPACE}, {BS} or {BKSP}
Break {BREAK}
Caps-Lock {CAPSLOCK}
Escape {ESC}
Windows Key {WIN} (equ. to {LWIN})
Windows Key: left, right {LWIN}, {RWIN}
Apps / Menu {APPS}
Help {HELP}
Numlock {NUMLOCK}
Print Screen {PRTSC}
Scroll Lock {SCROLLLOCK}
F1 - F16 {F1} - {F16}
Numeric Keypad + {ADD}
Numeric Keypad - {SUBTRACT}
Numeric Keypad * {MULTIPLY}
Numeric Keypad / {DIVIDE}
Numeric Keypad 0 to 9 {NUMPAD0} to {NUMPAD9}
Shift +
Ctrl ^
Alt %
+ {+}
^ {^}
% {%}
~ {~}
(, ) {(}, {)}
[, ] {[}, {]}
{, } {{}, {}}
*/
@implementation MPAutotypeCommand
- (void)sendPressKey:(CGKeyCode)keyCode modifierFlags:(CGEventFlags)flags {

View File

@@ -0,0 +1,32 @@
//
// MPAutotypeSequence.h
// MacPass
//
// Created by Michael Starke on 29/11/13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import <Foundation/Foundation.h>
@class KPKEntry;
@class KPKWindowAssociation;
@interface MPAutotypeContext : NSObject <NSCopying>
@property (nonatomic, strong) KPKEntry *entry;
@property (nonatomic, copy) NSString *commandsSequence;
@property (nonatomic, assign) NSUInteger value;
/**
* Designated initializer
*
* @param entry Entry to use
* @param sequence Keystroke Sequence to use
*
* @return AutotypeSequnce with the entry and keystroke in places
*/
- (instancetype)initWithEntry:(KPKEntry *)entry andSequence:(NSString *)sequence;
- (instancetype)initWithDefaultSequenceForEntry:(KPKEntry *)entry;
- (instancetype)initWithWindowAssociation:(KPKWindowAssociation *)association;
@end

View File

@@ -0,0 +1,58 @@
//
// MPAutotypeSequence.m
// MacPass
//
// Created by Michael Starke on 29/11/13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPAutotypeContext.h"
#import "KPKAutotype.h"
#import "KPKEntry.h"
#import "KPKWindowAssociation.h"
@implementation MPAutotypeContext
- (instancetype)initWithWindowAssociation:(KPKWindowAssociation *)association {
self = [self initWithEntry:association.autotype.entry andSequence:association.keystrokeSequence];
return self;
}
- (instancetype)initWithDefaultSequenceForEntry:(KPKEntry *)entry {
self = [self initWithEntry:entry andSequence:entry.autotype.defaultSequence];
return self;
}
- (instancetype)initWithEntry:(KPKEntry *)entry andSequence:(NSString *)sequence {
self = [super init];
/*
Parse the sequence to determine a possible Value?
DELAY <seconds>
TAB <repeat>
VKEY <code>
*/
if(self) {
if(entry == nil || sequence == nil) {
self = nil;
}
else {
self.entry = entry;
self.commandsSequence = sequence;
NSRegularExpression *regexp = [[NSRegularExpression alloc] initWithPattern:@"{[a-z]+([0-9]*)}" options:NSRegularExpressionIgnoreMetacharacters error:0];
if(regexp) {
NSArray *matches = [regexp matchesInString:self.commandsSequence options:0 range:NSMakeRange(0, [self.commandsSequence length])];
if(matches) {
}
}
}
}
return self;
}
- (id)copyWithZone:(NSZone *)zone {
MPAutotypeContext *copy = [[MPAutotypeContext alloc] initWithEntry:self.entry andSequence:self.commandsSequence];
return copy;
}
@end

View File

@@ -58,7 +58,7 @@ NSString *const kMPApplciationNameKey = @"applicationName";
Query the document to generate a autotype command list for the window title
We do not care where this came form, just get the autotype commands
*/
NSArray *autotypeCandidates = [[currentDocument findEntriesForWindowTitle:windowTitle] lastObject];
NSArray *autotypeCandidates = [[currentDocument buildContextsForWindowTitle:windowTitle] lastObject];
NSUInteger candiates = [autotypeCandidates count];
if(candiates == 0) {
return; // No Entries found.

View File

@@ -8,13 +8,9 @@
#import "MPAutotypeParser.h"
#import "NSString+Placeholder.h"
#import "MPAutotypeCommand.h"
NSString *const kMPAutotypeKeyShift = @"+";
NSString *const kMPAutotypeKeyControl = @"^";
NSString *const kMPAutotypeKeyAlt = @"%";
NSString *const kMPAutotypeKeyEnter = @"~";
NSString *const kMPAutptypeCommandEnter = @"{ENTER}";
#import "NSString+Placeholder.h"
@implementation MPAutotypeParser
@@ -79,13 +75,13 @@ NSString *const kMPAutptypeCommandEnter = @"{ENTER}";
NSRange modifierRange = [currentCommands rangeOfCharacterFromSet:modifierKeySet options:NSCaseInsensitiveSearch range:NSMakeRange(0, 1)];
if(modifierRange.length != 0 && modifierRange.location == 0) {
/* starts with a special key */
if([currentCommands hasPrefix:kMPAutotypeKeyShift]) {
if([currentCommands hasPrefix:kMPAutotypeSymbolShift]) {
modiferKeys |= kCGEventFlagMaskAlphaShift;
}
if([currentCommands hasPrefix:kMPAutotypeKeyControl]) {
if([currentCommands hasPrefix:kMPAutotypeSymbolControl]) {
modiferKeys |= kCGEventFlagMaskControl;
}
if([currentCommands hasPrefix:kMPAutotypeKeyAlt]) {
if([currentCommands hasPrefix:kMPAutotypeSymbolAlt]) {
modiferKeys = kCGEventFlagMaskAlternate;
}
/* move the index and continue */
@@ -154,7 +150,7 @@ NSString *const kMPAutptypeCommandEnter = @"{ENTER}";
+ (NSString *)_normalizeCommands:(NSString *)commandString {
/* Cache normalized Commands? */
NSMutableString *mutableCommand = [commandString mutableCopy];
[mutableCommand replaceOccurrencesOfString:kMPAutotypeKeyEnter withString:kMPAutptypeCommandEnter options:NSCaseInsensitiveSearch range:NSMakeRange(0, [mutableCommand length])];
[mutableCommand replaceOccurrencesOfString:kMPAutotypeSymbolEnter withString:kMPAutptypeCommandEnter options:NSCaseInsensitiveSearch range:NSMakeRange(0, [mutableCommand length])];
[mutableCommand replaceOccurrencesOfString:@"{{}" withString:@"{LCURL}" options:NSCaseInsensitiveSearch range:NSMakeRange(0, [mutableCommand length])];
[mutableCommand replaceOccurrencesOfString:@"{}}" withString:@"{RCURL}" options:NSCaseInsensitiveSearch range:NSMakeRange(0, [mutableCommand length])];
return nil;

View File

@@ -1,10 +1,24 @@
//
// MPSegmentedToolbarButton.h
// MPContextToolbarButton.h
// MacPass
//
// Created by Michael Starke on 26.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Cocoa/Cocoa.h>

View File

@@ -1,10 +1,24 @@
//
// MPSegmentedToolbarButton.m
// MPContextToolbarButton.m
// MacPass
//
// Created by Michael Starke on 26.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPContextToolbarButton.h"
#import "MPSegmentedContextCell.h"

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 17.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Foundation/Foundation.h>

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 17.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPCustomFieldTableViewDelegate.h"
#import "MPDocument.h"

View File

@@ -5,6 +5,20 @@
// Created by Nathaniel Madura on 18/04/13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#ifndef MacPass_MPDatabaseVersion_h
#define MacPass_MPDatabaseVersion_h

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 05.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPDocument.h"

View File

@@ -5,18 +5,25 @@
// Created by Michael Starke on 01/11/13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPDocument.h"
@interface MPDocument (Autotype)
/*
Problem:
If matching isn't safe, we need to determine what to do:
Possible selections for the user are Window associations or entries
Hence we need to deliver both - or do something completely different?
*/
- (NSArray *)findEntriesForWindowTitle:(NSString *)windowTitle;
- (NSArray *)buildContextsForWindowTitle:(NSString *)windowTitle;
@end

View File

@@ -5,29 +5,50 @@
// Created by Michael Starke on 01/11/13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPDocument+Autotype.h"
#import "MPAutotypeContext.h"
#import "KPKGroup.h"
#import "KPKEntry.h"
#import "KPKAutotype.h"
#import "KPKWindowAssociation.h"
@implementation MPDocument (Autotype)
- (NSArray *)findEntriesForWindowTitle:(NSString *)windowTitle {
- (NSArray *)buildContextsForWindowTitle:(NSString *)windowTitle {
NSArray *autotypeEntries = [self.root autotypeableChildEntries];
NSMutableArray *matchingEntries = [[NSMutableArray alloc] initWithCapacity:ceil([autotypeEntries count] / 4.0)];
NSMutableArray *contexts = [[NSMutableArray alloc] initWithCapacity:ceil([autotypeEntries count] / 4.0)];
for(KPKEntry *entry in autotypeEntries) {
/* Test for title */
NSRange titleRange = [entry.title rangeOfString:windowTitle options:NSCaseInsensitiveSearch];
if(titleRange.location != NSNotFound) {
[matchingEntries addObject:entry];
if(titleRange.location != NSNotFound && titleRange.length != 0) {
MPAutotypeContext *context = [[MPAutotypeContext alloc] initWithEntry:entry andSequence:entry.autotype.defaultSequence];
[contexts addObject:context];
}
/* search in Autotype entries for match */
else {
KPKWindowAssociation *association = [entry.autotype windowAssociationMatchingWindowTitle:windowTitle];
MPAutotypeContext *context = [[MPAutotypeContext alloc] initWithWindowAssociation:association];
[contexts addObject:context];
}
}
return nil;
return contexts;
}
@end

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 08.05.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Cocoa/Cocoa.h>
#import "KPKVersion.h"

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 08.05.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPDocument.h"
#import "MPDocumentWindowController.h"

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 25.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Foundation/Foundation.h>

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 25.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPDocumentWindowDelegate.h"
#import "MPDocument.h"

View File

@@ -1,10 +1,24 @@
//
// MPEntryMenuDelegate.h
// MPEntryContextMenuDelegate.h
// MacPass
//
// Created by Michael Starke on 17.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Foundation/Foundation.h>

View File

@@ -1,10 +1,24 @@
//
// MPEntryMenuDelegate.m
// MPEntryContextMenuDelegate.m
// MacPass
//
// Created by Michael Starke on 17.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPEntryContextMenuDelegate.h"
#import "MPEntryViewController.h"

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 09.06.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Foundation/Foundation.h>

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 09.06.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPEntryTableDataSource.h"
#import "MPEntryViewController.h"

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 10.03.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Foundation/Foundation.h>

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 10.03.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPKeyfilePathControlDelegate.h"

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 29.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Foundation/Foundation.h>

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 29.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPOutlineContextMenuDelegate.h"
#import "MPOutlineViewController.h"

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 19.07.12.
// Copyright (c) 2012 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Foundation/Foundation.h>

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 19.07.12.
// Copyright (c) 2012 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPOutlineDataSource.h"
#import "MPDocument.h"

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 13.08.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Cocoa/Cocoa.h>

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 13.08.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPSegmentedContextCell.h"

View File

@@ -1,10 +1,24 @@
//
// MPButton.h
// MPToolbarButton.h
// MacPass
//
// Created by michael starke on 26.02.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Cocoa/Cocoa.h>

View File

@@ -1,10 +1,24 @@
//
// MPButton.m
// MPToolbarButton.m
// MacPass
//
// Created by michael starke on 26.02.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPToolbarButton.h"

View File

@@ -5,6 +5,20 @@
// Created by michael starke on 18.02.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Foundation/Foundation.h>

View File

@@ -5,6 +5,20 @@
// Created by michael starke on 18.02.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPToolbarDelegate.h"
#import "MPIconHelper.h"

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 09.03.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import <Cocoa/Cocoa.h>

View File

@@ -5,6 +5,20 @@
// Created by Michael Starke on 09.03.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#import "MPToolbarItem.h"
#import "MPActionHelper.h"