Removed obsolte Files

Added ToolbarButton to be used as context-menu
This commit is contained in:
michael starke
2013-07-27 00:18:58 +02:00
parent b96810db1b
commit 5920697811
6 changed files with 60 additions and 85 deletions

View File

@@ -0,0 +1,14 @@
//
// MPSegmentedToolbarButton.h
// MacPass
//
// Created by Michael Starke on 26.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface MPContextToolbarButton : NSSegmentedControl
- (void)setImage:(NSImage *)image;
@end

View File

@@ -0,0 +1,46 @@
//
// MPSegmentedToolbarButton.m
// MacPass
//
// Created by Michael Starke on 26.07.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPContextToolbarButton.h"
@implementation MPContextToolbarButton
- (id)initWithFrame:(NSRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self setFocusRingType:NSFocusRingTypeNone];
[self setSegmentCount:1];
//[[self cell] setWidth:15 forSegment:1];
[[self cell] setTrackingMode:NSSegmentSwitchTrackingMomentary];
[self setSegmentStyle:NSSegmentStyleTexturedSquare];
}
return self;
}
/*
Block the segment setter to prevent accidential settings
*/
- (void)setImage:(NSImage *)image forSegment:(NSInteger)segment {
if(segment == 0) {
[super setImage:image forSegment:segment];
}
}
- (void)setSegmentCount:(NSInteger)count {
if(count == 1) {
[super setSegmentCount:count];
}
}
- (void)setImage:(NSImage *)image {
[self setImage:image forSegment:0];
}
@end

View File

@@ -1,16 +0,0 @@
//
// MPLoggerProxy.h
// MacPass
//
// Created by michael starke on 26.02.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface MPLoggerProxy : NSObject
@property (strong) id original;
- (id)initWithOriginal:(id) value;
@end

View File

@@ -1,35 +0,0 @@
//
// MPLoggerProxy.m
// MacPass
//
// Created by michael starke on 26.02.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPLoggerProxy.h"
@implementation MPLoggerProxy
- (id) initWithOriginal:(id)value {
if (self = [super init]) {
self.original = value;
}
return self;
}
- (NSMethodSignature *)methodSignatureForSelector:(SEL)sel {
NSMethodSignature *sig = [super methodSignatureForSelector:sel];
if(!sig)
{
sig = [self.original methodSignatureForSelector:sel];
}
return sig;
}
- (void)forwardInvocation:(NSInvocation *)inv {
NSLog(@"[%@ %@] %@ %@", self.original, inv,[inv methodSignature],
NSStringFromSelector([inv selector]));
[inv invokeWithTarget:self.original];
}
@end

View File

@@ -1,17 +0,0 @@
//
// NSString+MPPasswordAnalysis.h
// MacPass
//
// Created by Michael Starke on 29.03.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSString (PasswordStrenght)
- (NSUInteger)passwordStrenght;
@end

View File

@@ -1,17 +0,0 @@
//
// NSString+MPPasswordAnalysis.m
// MacPass
//
// Created by Michael Starke on 29.03.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "NSString+PasswordStrength.h"
@implementation NSString (PasswordStrenght)
- (NSUInteger)passwordStrenght {
return 0;
}
@end