Fixed error when double-clicking on and empty entryTable

This commit is contained in:
michael starke
2013-06-16 10:40:25 +02:00
parent cbbf55e0c5
commit dadf416950
7 changed files with 68 additions and 3 deletions

View File

@@ -114,7 +114,7 @@
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">textBackgroundColor</string>
<object class="NSColor" key="NSColor" id="579297540">
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
@@ -337,6 +337,7 @@
<string key="NSFrameSize">{272, 30}</string>
<reference key="NSSuperview" ref="87082330"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="NSClassName">HNHGradientView</string>
</object>
@@ -440,7 +441,7 @@
</array>
<double key="NSIntercellSpacingWidth">3</double>
<double key="NSIntercellSpacingHeight">2</double>
<reference key="NSBackgroundColor" ref="579297540"/>
<reference key="NSBackgroundColor" ref="533509460"/>
<object class="NSColor" key="NSGridColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
@@ -2397,6 +2398,7 @@
<string key="725.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="726.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="732.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="806.CustomClassName">HNHScrollView</string>
<array key="806.IBNSViewMetadataConstraints">
<reference ref="18481886"/>
</array>
@@ -2412,6 +2414,7 @@
<reference ref="80019053"/>
</array>
<string key="814.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="833.CustomClassName">MPTableCellView</string>
<array class="NSMutableArray" key="833.IBNSViewMetadataConstraints">
<reference ref="553918146"/>
<reference ref="880978105"/>
@@ -2499,6 +2502,14 @@
<string key="minorKey">./Classes/HNHRoundedTextFieldCell.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">HNHScrollView</string>
<string key="superclassName">NSScrollView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/HNHScrollView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">HNHSeparator</string>
<string key="superclassName">NSView</string>
@@ -2587,6 +2598,14 @@
<string key="minorKey">./Classes/MPPopupImageView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">MPTableCellView</string>
<string key="superclassName">NSTableCellView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/MPTableCellView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">MPViewController</string>
<string key="superclassName">NSViewController</string>

View File

@@ -193,6 +193,7 @@
- (void)toggleInspector:(id)sender {
NSView *inspectorView = [_inspectorViewController view];
if([inspectorView superview]) {
//[inspectorView animator]
[inspectorView removeFromSuperview];
}
else {

View File

@@ -504,6 +504,9 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
}
- (void)_columnDoubleClick:(id)sender {
if(0 == [[self.entryArrayController arrangedObjects] count]) {
return; // No data available
}
NSTableColumn *column = [self.entryTable tableColumns][[self.entryTable clickedColumn]];
NSString *identifier = [column identifier];
if([identifier isEqualToString:MPEntryTablePasswordColumnIdentifier]) {

13
MacPass/MPTableCellView.h Normal file
View File

@@ -0,0 +1,13 @@
//
// MPTableCellView.h
// MacPass
//
// Created by Michael Starke on 16.06.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface MPTableCellView : NSTableCellView
@end

17
MacPass/MPTableCellView.m Normal file
View File

@@ -0,0 +1,17 @@
//
// MPTableCellView.m
// MacPass
//
// Created by Michael Starke on 16.06.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPTableCellView.h"
@implementation MPTableCellView
- (void)setBackgroundStyle:(NSBackgroundStyle)backgroundStyle {
[super setBackgroundStyle:NSBackgroundStyleRaised];
}
@end

View File

@@ -48,7 +48,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>322</string>
<string>339</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>