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

@@ -10,6 +10,8 @@
4C01C23F1764D2980016D5D0 /* KdbEntry+Undo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C01C23E1764D2980016D5D0 /* KdbEntry+Undo.m */; }; 4C01C23F1764D2980016D5D0 /* KdbEntry+Undo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C01C23E1764D2980016D5D0 /* KdbEntry+Undo.m */; };
4C01C2421764D8980016D5D0 /* MPContextMenuHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C01C2411764D8980016D5D0 /* MPContextMenuHelper.m */; }; 4C01C2421764D8980016D5D0 /* MPContextMenuHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C01C2411764D8980016D5D0 /* MPContextMenuHelper.m */; };
4C01C245176500C40016D5D0 /* HNHLevelIndicatorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C01C244176500C40016D5D0 /* HNHLevelIndicatorCell.m */; }; 4C01C245176500C40016D5D0 /* HNHLevelIndicatorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C01C244176500C40016D5D0 /* HNHLevelIndicatorCell.m */; };
4C099930176D4C5C00C885CB /* MPTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C09992F176D4C5C00C885CB /* MPTableCellView.m */; };
4C099933176D4EA600C885CB /* HNHScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C099932176D4EA600C885CB /* HNHScrollView.m */; };
4C1DDCDD1711ECEB00C98DA3 /* PasswordCreatorWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C1DDCDC1711ECEB00C98DA3 /* PasswordCreatorWindow.xib */; }; 4C1DDCDD1711ECEB00C98DA3 /* PasswordCreatorWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C1DDCDC1711ECEB00C98DA3 /* PasswordCreatorWindow.xib */; };
4C22040D1746ED160054C916 /* KdbGroup+Undo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C22040C1746ED160054C916 /* KdbGroup+Undo.m */; }; 4C22040D1746ED160054C916 /* KdbGroup+Undo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C22040C1746ED160054C916 /* KdbGroup+Undo.m */; };
4C25D58716CF0FAA00F6806C /* EntryView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C25D58616CF0FAA00F6806C /* EntryView.xib */; }; 4C25D58716CF0FAA00F6806C /* EntryView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C25D58616CF0FAA00F6806C /* EntryView.xib */; };
@@ -145,6 +147,10 @@
4C01C2411764D8980016D5D0 /* MPContextMenuHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPContextMenuHelper.m; sourceTree = "<group>"; }; 4C01C2411764D8980016D5D0 /* MPContextMenuHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPContextMenuHelper.m; sourceTree = "<group>"; };
4C01C243176500C40016D5D0 /* HNHLevelIndicatorCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHLevelIndicatorCell.h; sourceTree = "<group>"; }; 4C01C243176500C40016D5D0 /* HNHLevelIndicatorCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHLevelIndicatorCell.h; sourceTree = "<group>"; };
4C01C244176500C40016D5D0 /* HNHLevelIndicatorCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHLevelIndicatorCell.m; sourceTree = "<group>"; }; 4C01C244176500C40016D5D0 /* HNHLevelIndicatorCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHLevelIndicatorCell.m; sourceTree = "<group>"; };
4C09992E176D4C5C00C885CB /* MPTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTableCellView.h; sourceTree = "<group>"; };
4C09992F176D4C5C00C885CB /* MPTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTableCellView.m; sourceTree = "<group>"; };
4C099931176D4EA600C885CB /* HNHScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHScrollView.h; sourceTree = "<group>"; };
4C099932176D4EA600C885CB /* HNHScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHScrollView.m; sourceTree = "<group>"; };
4C1DDCDC1711ECEB00C98DA3 /* PasswordCreatorWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PasswordCreatorWindow.xib; sourceTree = "<group>"; }; 4C1DDCDC1711ECEB00C98DA3 /* PasswordCreatorWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PasswordCreatorWindow.xib; sourceTree = "<group>"; };
4C22040B1746ED160054C916 /* KdbGroup+Undo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbGroup+Undo.h"; sourceTree = "<group>"; }; 4C22040B1746ED160054C916 /* KdbGroup+Undo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbGroup+Undo.h"; sourceTree = "<group>"; };
4C22040C1746ED160054C916 /* KdbGroup+Undo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbGroup+Undo.m"; sourceTree = "<group>"; }; 4C22040C1746ED160054C916 /* KdbGroup+Undo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbGroup+Undo.m"; sourceTree = "<group>"; };
@@ -427,6 +433,8 @@
4CE39AC316ECE4F7000FE29D /* MPPopupImageView.m */, 4CE39AC316ECE4F7000FE29D /* MPPopupImageView.m */,
4C4A100D176286FD00BBF2CA /* MPTableView.h */, 4C4A100D176286FD00BBF2CA /* MPTableView.h */,
4C4A100E176286FD00BBF2CA /* MPTableView.m */, 4C4A100E176286FD00BBF2CA /* MPTableView.m */,
4C09992E176D4C5C00C885CB /* MPTableCellView.h */,
4C09992F176D4C5C00C885CB /* MPTableCellView.m */,
); );
name = Views; name = Views;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -827,6 +835,8 @@
4C01C244176500C40016D5D0 /* HNHLevelIndicatorCell.m */, 4C01C244176500C40016D5D0 /* HNHLevelIndicatorCell.m */,
4C37A6711769393300AD0A40 /* HNHTableHeaderCell.h */, 4C37A6711769393300AD0A40 /* HNHTableHeaderCell.h */,
4C37A6721769393300AD0A40 /* HNHTableHeaderCell.m */, 4C37A6721769393300AD0A40 /* HNHTableHeaderCell.m */,
4C099931176D4EA600C885CB /* HNHScrollView.h */,
4C099932176D4EA600C885CB /* HNHScrollView.m */,
); );
path = HNHUi; path = HNHUi;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -1082,6 +1092,8 @@
4C79DF2A176685870083708F /* HNHRoundedTextField.m in Sources */, 4C79DF2A176685870083708F /* HNHRoundedTextField.m in Sources */,
4C46E09E17673A0A00DA62E8 /* HNHShadowBox.m in Sources */, 4C46E09E17673A0A00DA62E8 /* HNHShadowBox.m in Sources */,
4C37A6731769393300AD0A40 /* HNHTableHeaderCell.m in Sources */, 4C37A6731769393300AD0A40 /* HNHTableHeaderCell.m in Sources */,
4C099930176D4C5C00C885CB /* MPTableCellView.m in Sources */,
4C099933176D4EA600C885CB /* HNHScrollView.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };

View File

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

View File

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

View File

@@ -504,6 +504,9 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
} }
- (void)_columnDoubleClick:(id)sender { - (void)_columnDoubleClick:(id)sender {
if(0 == [[self.entryArrayController arrangedObjects] count]) {
return; // No data available
}
NSTableColumn *column = [self.entryTable tableColumns][[self.entryTable clickedColumn]]; NSTableColumn *column = [self.entryTable tableColumns][[self.entryTable clickedColumn]];
NSString *identifier = [column identifier]; NSString *identifier = [column identifier];
if([identifier isEqualToString:MPEntryTablePasswordColumnIdentifier]) { 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> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>322</string> <string>339</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string> <string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>