mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 07:02:39 +00:00
Removed obsolte Files
Added ToolbarButton to be used as context-menu
This commit is contained in:
14
MacPass/MPContextToolbarButton.h
Normal file
14
MacPass/MPContextToolbarButton.h
Normal 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
|
||||||
46
MacPass/MPContextToolbarButton.m
Normal file
46
MacPass/MPContextToolbarButton.m
Normal 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
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user