Extracted RoundedTextFieldCell

This commit is contained in:
michael starke
2013-06-05 12:32:39 +02:00
parent 8c4383b4d1
commit f7c6222910
20 changed files with 182 additions and 160 deletions

3
.gitmodules vendored
View File

@@ -7,3 +7,6 @@
[submodule "DMSplitView"] [submodule "DMSplitView"]
path = DMSplitView path = DMSplitView
url = https://mstarke@github.com/mstarke/DMSplitView.git url = https://mstarke@github.com/mstarke/DMSplitView.git
[submodule "HNHUi"]
path = HNHUi
url = https://mstarke@github.com/mstarke/HNHUi.git

1
HNHUi Submodule

Submodule HNHUi added at 7708aac7e8

View File

@@ -33,6 +33,7 @@
4C586FA216D07F6A00E7DB57 /* 02_MessageBoxWarningTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C586FA116D07F6A00E7DB57 /* 02_MessageBoxWarningTemplate.pdf */; }; 4C586FA216D07F6A00E7DB57 /* 02_MessageBoxWarningTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C586FA116D07F6A00E7DB57 /* 02_MessageBoxWarningTemplate.pdf */; };
4C5A11FE1708DE8700223D8A /* MPPasswordCreatorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5A11FC1708DE8700223D8A /* MPPasswordCreatorViewController.m */; }; 4C5A11FE1708DE8700223D8A /* MPPasswordCreatorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5A11FC1708DE8700223D8A /* MPPasswordCreatorViewController.m */; };
4C5A11FF1708DE8800223D8A /* PasswordCreatorView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C5A11FD1708DE8700223D8A /* PasswordCreatorView.xib */; }; 4C5A11FF1708DE8800223D8A /* PasswordCreatorView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C5A11FD1708DE8700223D8A /* PasswordCreatorView.xib */; };
4C5BF67B175C01F300D53DF7 /* MPUppercaseStringValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5BF67A175C01F300D53DF7 /* MPUppercaseStringValueTransformer.m */; };
4C61EA0316D2FD0800AC519E /* MPOutlineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C61EA0216D2FD0800AC519E /* MPOutlineViewController.m */; }; 4C61EA0316D2FD0800AC519E /* MPOutlineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C61EA0216D2FD0800AC519E /* MPOutlineViewController.m */; };
4C61EA0516D2FFE200AC519E /* OutlineView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C61EA0416D2FFE200AC519E /* OutlineView.xib */; }; 4C61EA0516D2FFE200AC519E /* OutlineView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C61EA0416D2FFE200AC519E /* OutlineView.xib */; };
4C65C79C16DD283900E32CFF /* MPToolbarButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C65C79B16DD283900E32CFF /* MPToolbarButton.m */; }; 4C65C79C16DD283900E32CFF /* MPToolbarButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C65C79B16DD283900E32CFF /* MPToolbarButton.m */; };
@@ -100,12 +101,15 @@
4CAD747F15B887FD00104512 /* DDXMLNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CAD746115B887FD00104512 /* DDXMLNode.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; 4CAD747F15B887FD00104512 /* DDXMLNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CAD746115B887FD00104512 /* DDXMLNode.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
4CAD748C15B889B700104512 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CAD748B15B889B700104512 /* Security.framework */; }; 4CAD748C15B889B700104512 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CAD748B15B889B700104512 /* Security.framework */; };
4CAD748E15B88AC100104512 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CAD748D15B88AC100104512 /* libz.dylib */; }; 4CAD748E15B88AC100104512 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CAD748D15B88AC100104512 /* libz.dylib */; };
4CB25D54175A206000D1369D /* MPRoundedTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CB25D53175A206000D1369D /* MPRoundedTextFieldCell.m */; };
4CB25D57175A208300D1369D /* MPTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CB25D56175A208300D1369D /* MPTextField.m */; }; 4CB25D57175A208300D1369D /* MPTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CB25D56175A208300D1369D /* MPTextField.m */; };
4CB9339916D3A0DD00A13B5D /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 4CB9339716D3A0DD00A13B5D /* Credits.rtf */; }; 4CB9339916D3A0DD00A13B5D /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 4CB9339716D3A0DD00A13B5D /* Credits.rtf */; };
4CBA2ABA17074C07006D8139 /* MPSettingsHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CBA2AB917074C07006D8139 /* MPSettingsHelper.m */; }; 4CBA2ABA17074C07006D8139 /* MPSettingsHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CBA2AB917074C07006D8139 /* MPSettingsHelper.m */; };
4CBFA240172B385D006090DF /* PasswordEditView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CBFA23F172B385D006090DF /* PasswordEditView.xib */; }; 4CBFA240172B385D006090DF /* PasswordEditView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CBFA23F172B385D006090DF /* PasswordEditView.xib */; };
4CC1AEBE16D4467C006D2AAB /* KdbTree+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */; }; 4CC1AEBE16D4467C006D2AAB /* KdbTree+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */; };
4CC3AABC175F4983003EF01B /* .gitignore in Resources */ = {isa = PBXBuildFile; fileRef = 4CC3AAB7175F4983003EF01B /* .gitignore */; };
4CC3AABD175F4983003EF01B /* HNHRoundedTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC3AAB9175F4983003EF01B /* HNHRoundedTextFieldCell.m */; };
4CC3AABE175F4983003EF01B /* LICENSE.MIT in Resources */ = {isa = PBXBuildFile; fileRef = 4CC3AABA175F4983003EF01B /* LICENSE.MIT */; };
4CC3AABF175F4983003EF01B /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 4CC3AABB175F4983003EF01B /* README.md */; };
4CC6259115BA1C99002F5B11 /* MPOutlineViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6259015BA1C99002F5B11 /* MPOutlineViewDelegate.m */; }; 4CC6259115BA1C99002F5B11 /* MPOutlineViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6259015BA1C99002F5B11 /* MPOutlineViewDelegate.m */; };
4CCF9754173EFBA500460BD2 /* KdbEntry+Undo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCF9753173EFBA500460BD2 /* KdbEntry+Undo.m */; }; 4CCF9754173EFBA500460BD2 /* KdbEntry+Undo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCF9753173EFBA500460BD2 /* KdbEntry+Undo.m */; };
4CD78ABC16D155FF00768A1D /* 07_NotepadTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CD78AB716D155FF00768A1D /* 07_NotepadTemplate.pdf */; }; 4CD78ABC16D155FF00768A1D /* 07_NotepadTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CD78AB716D155FF00768A1D /* 07_NotepadTemplate.pdf */; };
@@ -165,6 +169,8 @@
4C5A11FB1708DE8700223D8A /* MPPasswordCreatorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPasswordCreatorViewController.h; sourceTree = "<group>"; }; 4C5A11FB1708DE8700223D8A /* MPPasswordCreatorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPasswordCreatorViewController.h; sourceTree = "<group>"; };
4C5A11FC1708DE8700223D8A /* MPPasswordCreatorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPPasswordCreatorViewController.m; sourceTree = "<group>"; }; 4C5A11FC1708DE8700223D8A /* MPPasswordCreatorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPPasswordCreatorViewController.m; sourceTree = "<group>"; };
4C5A11FD1708DE8700223D8A /* PasswordCreatorView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PasswordCreatorView.xib; sourceTree = "<group>"; }; 4C5A11FD1708DE8700223D8A /* PasswordCreatorView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PasswordCreatorView.xib; sourceTree = "<group>"; };
4C5BF679175C01F300D53DF7 /* MPUppercaseStringValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPUppercaseStringValueTransformer.h; sourceTree = "<group>"; };
4C5BF67A175C01F300D53DF7 /* MPUppercaseStringValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPUppercaseStringValueTransformer.m; sourceTree = "<group>"; };
4C61EA0116D2FD0800AC519E /* MPOutlineViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPOutlineViewController.h; sourceTree = "<group>"; }; 4C61EA0116D2FD0800AC519E /* MPOutlineViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPOutlineViewController.h; sourceTree = "<group>"; };
4C61EA0216D2FD0800AC519E /* MPOutlineViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPOutlineViewController.m; sourceTree = "<group>"; }; 4C61EA0216D2FD0800AC519E /* MPOutlineViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPOutlineViewController.m; sourceTree = "<group>"; };
4C61EA0416D2FFE200AC519E /* OutlineView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OutlineView.xib; sourceTree = "<group>"; }; 4C61EA0416D2FFE200AC519E /* OutlineView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OutlineView.xib; sourceTree = "<group>"; };
@@ -298,8 +304,6 @@
4CAD746315B887FD00104512 /* DDXMLPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDXMLPrivate.h; sourceTree = "<group>"; }; 4CAD746315B887FD00104512 /* DDXMLPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDXMLPrivate.h; sourceTree = "<group>"; };
4CAD748B15B889B700104512 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 4CAD748B15B889B700104512 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
4CAD748D15B88AC100104512 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; 4CAD748D15B88AC100104512 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
4CB25D52175A206000D1369D /* MPRoundedTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRoundedTextFieldCell.h; sourceTree = "<group>"; };
4CB25D53175A206000D1369D /* MPRoundedTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRoundedTextFieldCell.m; sourceTree = "<group>"; };
4CB25D55175A208300D1369D /* MPTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTextField.h; sourceTree = "<group>"; }; 4CB25D55175A208300D1369D /* MPTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTextField.h; sourceTree = "<group>"; };
4CB25D56175A208300D1369D /* MPTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTextField.m; sourceTree = "<group>"; }; 4CB25D56175A208300D1369D /* MPTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTextField.m; sourceTree = "<group>"; };
4CB9339816D3A0DD00A13B5D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; }; 4CB9339816D3A0DD00A13B5D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
@@ -308,6 +312,11 @@
4CBFA23F172B385D006090DF /* PasswordEditView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PasswordEditView.xib; sourceTree = "<group>"; }; 4CBFA23F172B385D006090DF /* PasswordEditView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PasswordEditView.xib; sourceTree = "<group>"; };
4CC1AEBC16D4467C006D2AAB /* KdbTree+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbTree+MPAdditions.h"; sourceTree = "<group>"; }; 4CC1AEBC16D4467C006D2AAB /* KdbTree+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbTree+MPAdditions.h"; sourceTree = "<group>"; };
4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbTree+MPAdditions.m"; sourceTree = "<group>"; }; 4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbTree+MPAdditions.m"; sourceTree = "<group>"; };
4CC3AAB7175F4983003EF01B /* .gitignore */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .gitignore; sourceTree = "<group>"; };
4CC3AAB8175F4983003EF01B /* HNHRoundedTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHRoundedTextFieldCell.h; sourceTree = "<group>"; };
4CC3AAB9175F4983003EF01B /* HNHRoundedTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHRoundedTextFieldCell.m; sourceTree = "<group>"; };
4CC3AABA175F4983003EF01B /* LICENSE.MIT */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.MIT; sourceTree = "<group>"; };
4CC3AABB175F4983003EF01B /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = "<group>"; };
4CC6258F15BA1C99002F5B11 /* MPOutlineViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPOutlineViewDelegate.h; sourceTree = "<group>"; }; 4CC6258F15BA1C99002F5B11 /* MPOutlineViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPOutlineViewDelegate.h; sourceTree = "<group>"; };
4CC6259015BA1C99002F5B11 /* MPOutlineViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPOutlineViewDelegate.m; sourceTree = "<group>"; }; 4CC6259015BA1C99002F5B11 /* MPOutlineViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPOutlineViewDelegate.m; sourceTree = "<group>"; };
4CCF9752173EFBA500460BD2 /* KdbEntry+Undo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbEntry+Undo.h"; sourceTree = "<group>"; }; 4CCF9752173EFBA500460BD2 /* KdbEntry+Undo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbEntry+Undo.h"; sourceTree = "<group>"; };
@@ -376,8 +385,6 @@
4CE39AC316ECE4F7000FE29D /* MPPopupImageView.m */, 4CE39AC316ECE4F7000FE29D /* MPPopupImageView.m */,
4C3D4C0617594CA40038DAAC /* MPSeparator.h */, 4C3D4C0617594CA40038DAAC /* MPSeparator.h */,
4C3D4C0717594CA40038DAAC /* MPSeparator.m */, 4C3D4C0717594CA40038DAAC /* MPSeparator.m */,
4CB25D52175A206000D1369D /* MPRoundedTextFieldCell.h */,
4CB25D53175A206000D1369D /* MPRoundedTextFieldCell.m */,
4CB25D55175A208300D1369D /* MPTextField.h */, 4CB25D55175A208300D1369D /* MPTextField.h */,
4CB25D56175A208300D1369D /* MPTextField.m */, 4CB25D56175A208300D1369D /* MPTextField.m */,
); );
@@ -408,6 +415,8 @@
4C920E2916DCDFA00083839B /* MPLoggerProxy.m */, 4C920E2916DCDFA00083839B /* MPLoggerProxy.m */,
4CBA2AB617074B59006D8139 /* MPSettingsHelper.h */, 4CBA2AB617074B59006D8139 /* MPSettingsHelper.h */,
4CBA2AB917074C07006D8139 /* MPSettingsHelper.m */, 4CBA2AB917074C07006D8139 /* MPSettingsHelper.m */,
4C5BF679175C01F300D53DF7 /* MPUppercaseStringValueTransformer.h */,
4C5BF67A175C01F300D53DF7 /* MPUppercaseStringValueTransformer.m */,
); );
name = Helper; name = Helper;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -579,6 +588,7 @@
4C77E35715B84A240093A587 = { 4C77E35715B84A240093A587 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
4CC3AAB6175F4983003EF01B /* HNHUi */,
4C3CD2A5175570C9005F911C /* DMSplitView */, 4C3CD2A5175570C9005F911C /* DMSplitView */,
4C669B2D16760ED100DD0774 /* MiniKeePassLib */, 4C669B2D16760ED100DD0774 /* MiniKeePassLib */,
4CAD745415B887FD00104512 /* KissXML */, 4CAD745415B887FD00104512 /* KissXML */,
@@ -741,6 +751,18 @@
path = Private; path = Private;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
4CC3AAB6175F4983003EF01B /* HNHUi */ = {
isa = PBXGroup;
children = (
4CC3AAB7175F4983003EF01B /* .gitignore */,
4CC3AAB8175F4983003EF01B /* HNHRoundedTextFieldCell.h */,
4CC3AAB9175F4983003EF01B /* HNHRoundedTextFieldCell.m */,
4CC3AABA175F4983003EF01B /* LICENSE.MIT */,
4CC3AABB175F4983003EF01B /* README.md */,
);
path = HNHUi;
sourceTree = "<group>";
};
4CDB556616E29A8A00635918 /* Controls */ = { 4CDB556616E29A8A00635918 /* Controls */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@@ -868,6 +890,9 @@
4C5A11FF1708DE8800223D8A /* PasswordCreatorView.xib in Resources */, 4C5A11FF1708DE8800223D8A /* PasswordCreatorView.xib in Resources */,
4C1DDCDD1711ECEB00C98DA3 /* PasswordCreatorWindow.xib in Resources */, 4C1DDCDD1711ECEB00C98DA3 /* PasswordCreatorWindow.xib in Resources */,
4CBFA240172B385D006090DF /* PasswordEditView.xib in Resources */, 4CBFA240172B385D006090DF /* PasswordEditView.xib in Resources */,
4CC3AABC175F4983003EF01B /* .gitignore in Resources */,
4CC3AABE175F4983003EF01B /* LICENSE.MIT in Resources */,
4CC3AABF175F4983003EF01B /* README.md in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@@ -974,8 +999,9 @@
4C22040D1746ED160054C916 /* KdbGroup+Undo.m in Sources */, 4C22040D1746ED160054C916 /* KdbGroup+Undo.m in Sources */,
4C3CD2A8175570C9005F911C /* DMSplitView.m in Sources */, 4C3CD2A8175570C9005F911C /* DMSplitView.m in Sources */,
4C3D4C0817594CA40038DAAC /* MPSeparator.m in Sources */, 4C3D4C0817594CA40038DAAC /* MPSeparator.m in Sources */,
4CB25D54175A206000D1369D /* MPRoundedTextFieldCell.m in Sources */,
4CB25D57175A208300D1369D /* MPTextField.m in Sources */, 4CB25D57175A208300D1369D /* MPTextField.m in Sources */,
4C5BF67B175C01F300D53DF7 /* MPUppercaseStringValueTransformer.m in Sources */,
4CC3AABD175F4983003EF01B /* HNHRoundedTextFieldCell.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };

View File

@@ -2,9 +2,9 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00"> <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
<data> <data>
<int key="IBDocument.SystemTarget">1080</int> <int key="IBDocument.SystemTarget">1080</int>
<string key="IBDocument.SystemVersion">12D78</string> <string key="IBDocument.SystemVersion">12E55</string>
<string key="IBDocument.InterfaceBuilderVersion">3084</string> <string key="IBDocument.InterfaceBuilderVersion">3084</string>
<string key="IBDocument.AppKitVersion">1187.37</string> <string key="IBDocument.AppKitVersion">1187.39</string>
<string key="IBDocument.HIToolboxVersion">626.00</string> <string key="IBDocument.HIToolboxVersion">626.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions"> <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -107,7 +107,6 @@
<string key="NSCellIdentifier">_NS:9</string> <string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="290763686"/> <reference key="NSControlView" ref="290763686"/>
<bool key="NSDrawsBackground">YES</bool> <bool key="NSDrawsBackground">YES</bool>
<int key="NSTextBezelStyle">1</int>
<object class="NSColor" key="NSBackgroundColor" id="955209345"> <object class="NSColor" key="NSBackgroundColor" id="955209345">
<int key="NSColorSpace">6</int> <int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string> <string key="NSCatalogName">System</string>
@@ -296,6 +295,7 @@
<string key="NSFrame">{{199, 289}, {32, 25}}</string> <string key="NSFrame">{{199, 289}, {32, 25}}</string>
<reference key="NSSuperview" ref="87082330"/> <reference key="NSSuperview" ref="87082330"/>
<reference key="NSWindow"/> <reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:22</string> <string key="NSReuseIdentifierKey">_NS:22</string>
<bool key="NSEnabled">YES</bool> <bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="353877023"> <object class="NSButtonCell" key="NSCell" id="353877023">
@@ -1531,6 +1531,7 @@
<string key="462.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="462.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="463.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> <boolean value="NO" key="463.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="463.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="463.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="464.CustomClassName">MPTextField</string>
<boolean value="NO" key="464.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> <boolean value="NO" key="464.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="464.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="464.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="465.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> <boolean value="NO" key="465.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
@@ -1553,7 +1554,7 @@
<string key="493.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="493.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="494.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="494.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="495.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="495.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="496.CustomClassName">MPRoundedTextFieldCell</string> <string key="496.CustomClassName">HNHRoundedTextFieldCell</string>
<string key="496.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="496.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="497.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="497.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="498.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="498.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1605,6 +1606,14 @@
</object> </object>
<object class="IBClassDescriber" key="IBDocument.Classes"> <object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions"> <array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">HNHRoundedTextFieldCell</string>
<string key="superclassName">NSTextFieldCell</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/HNHRoundedTextFieldCell.h</string>
</object>
</object>
<object class="IBPartialClassDescription"> <object class="IBPartialClassDescription">
<string key="className">MPInspectorViewController</string> <string key="className">MPInspectorViewController</string>
<string key="superclassName">MPViewController</string> <string key="superclassName">MPViewController</string>
@@ -1681,14 +1690,6 @@
<string key="minorKey">./Classes/MPPopupImageView.h</string> <string key="minorKey">./Classes/MPPopupImageView.h</string>
</object> </object>
</object> </object>
<object class="IBPartialClassDescription">
<string key="className">MPRoundedTextFieldCell</string>
<string key="superclassName">NSTextFieldCell</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/MPRoundedTextFieldCell.h</string>
</object>
</object>
<object class="IBPartialClassDescription"> <object class="IBPartialClassDescription">
<string key="className">MPSeparator</string> <string key="className">MPSeparator</string>
<string key="superclassName">NSView</string> <string key="superclassName">NSView</string>
@@ -1697,6 +1698,14 @@
<string key="minorKey">./Classes/MPSeparator.h</string> <string key="minorKey">./Classes/MPSeparator.h</string>
</object> </object>
</object> </object>
<object class="IBPartialClassDescription">
<string key="className">MPTextField</string>
<string key="superclassName">NSTextField</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/MPTextField.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

@@ -12,12 +12,15 @@ APPKIT_EXTERN NSString *const MPGroupNameUndoableKey;
@interface KdbGroup (Undo) @interface KdbGroup (Undo)
+ (NSUndoManager *)undoManager; - (NSUndoManager *)undoManager;
- (NSString *)nameUndoable; - (NSString *)nameUndoable;
- (void)setNameUndoable:(NSString *)newName; - (void)setNameUndoable:(NSString *)newName;
- (void)removeEntryUndoable:(KdbEntry *)entry;
- (void)addEntryUndoable:(KdbEntry *)entry; - (void)addEntryUndoable:(KdbEntry *)entry;
- (void)addGroupUndoable:(KdbGroup *)group;
- (void)removeGroupUndoable:(KdbGroup *)group;
- (void)removeEntryUndoable:(KdbEntry *)entry;
@end @end

View File

@@ -12,7 +12,7 @@ NSString *const MPGroupNameUndoableKey = @"nameUndoable";
@implementation KdbGroup (Undo) @implementation KdbGroup (Undo)
+ (NSUndoManager *)undoManager { - (NSUndoManager *)undoManager {
return [[[NSDocumentController sharedDocumentController] currentDocument] undoManager]; return [[[NSDocumentController sharedDocumentController] currentDocument] undoManager];
} }
@@ -21,21 +21,32 @@ NSString *const MPGroupNameUndoableKey = @"nameUndoable";
} }
- (void)setNameUndoable:(NSString *)newName { - (void)setNameUndoable:(NSString *)newName {
[[KdbGroup undoManager] registerUndoWithTarget:self selector:@selector(setNameUndoable:) object:self.name]; [[self undoManager] registerUndoWithTarget:self selector:@selector(setNameUndoable:) object:self.name];
[[KdbGroup undoManager] setActionName:NSLocalizedString(@"UNDO_SET_NAME", "Undo set name")]; [[self undoManager] setActionName:NSLocalizedString(@"UNDO_SET_NAME", "Undo set name")];
self.name = newName; self.name = newName;
} }
- (void)removeEntryUndoable:(KdbEntry *)entry {
[[KdbGroup undoManager] registerUndoWithTarget:self selector:@selector(addEntryUndoable:) object:entry];
[[KdbGroup undoManager] setActionName:NSLocalizedString(@"UNDO_DELETE_ENTRY", "Undo deleting of entry")];
[self removeEntry:entry];
}
- (void)addEntryUndoable:(KdbEntry *)entry { - (void)addEntryUndoable:(KdbEntry *)entry {
[[KdbGroup undoManager] registerUndoWithTarget:self selector:@selector(removeEntryUndoable:) object:entry]; [[self undoManager] registerUndoWithTarget:self selector:@selector(removeEntryUndoable:) object:entry];
[[KdbGroup undoManager] setActionName:NSLocalizedString(@"UNDO_ADD_ENTRY", "Undo adding of entry")]; [[self undoManager] setActionName:NSLocalizedString(@"UNDO_ADD_ENTRY", "Undo adding of entry")];
[self addEntry:entry]; [self addEntry:entry];
} }
- (void)addGroupUndoable:(KdbGroup *)group {
[[self undoManager] registerUndoWithTarget:self selector:@selector(removeGroupUndoable:) object:group];
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_ADD_GROUP", @"Create Group Undo")];
[self addGroup:group];
}
- (void)removeEntryUndoable:(KdbEntry *)entry {
[[self undoManager] registerUndoWithTarget:self selector:@selector(addEntryUndoable:) object:entry];
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_DELETE_ENTRY", "Undo deleting of entry")];
[self removeEntry:entry];
}
- (void)removeGroupUndoable:(KdbGroup *)group {
[[self undoManager] registerUndoWithTarget:self selector:@selector(addGroupUndoable:) object:group];
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_DELETE_GROUP", @"Create Group Undo")];
[group.parent removeGroup:group];
}
@end @end

View File

@@ -14,6 +14,7 @@
#import "MPActionHelper.h" #import "MPActionHelper.h"
#import "MPSettingsHelper.h" #import "MPSettingsHelper.h"
#import "NSString+MPPasswordCreation.h" #import "NSString+MPPasswordCreation.h"
#import "MPUppercaseStringValueTransformer.h"
@interface MPAppDelegate () @interface MPAppDelegate ()
@@ -28,6 +29,7 @@
+ (void)initialize { + (void)initialize {
[MPSettingsHelper setupDefaults]; [MPSettingsHelper setupDefaults];
[MPUppercaseStringValueTransformer registerTransformer];
} }
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {

View File

@@ -11,9 +11,9 @@
APPKIT_EXTERN NSString *const MPDocumentDidAddGroupNotification; APPKIT_EXTERN NSString *const MPDocumentDidAddGroupNotification;
APPKIT_EXTERN NSString *const MPDocumentDidDelteGroupNotification; APPKIT_EXTERN NSString *const MPDocumentWillDelteGroupNotification;
APPKIT_EXTERN NSString *const MPDocumentDidAddEntryNotification; APPKIT_EXTERN NSString *const MPDocumentDidAddEntryNotification;
APPKIT_EXTERN NSString *const MPDocumentDidDeleteEntryNotification; APPKIT_EXTERN NSString *const MPDocumentWillDeleteEntryNotification;
APPKIT_EXTERN NSString *const MPDocumentEntryKey; APPKIT_EXTERN NSString *const MPDocumentEntryKey;
APPKIT_EXTERN NSString *const MPDocumentGroupKey; APPKIT_EXTERN NSString *const MPDocumentGroupKey;
@@ -36,7 +36,6 @@ APPKIT_EXTERN NSString *const MPDocumentGroupKey;
- (KdbGroup *)createGroup:(KdbGroup *)parent; - (KdbGroup *)createGroup:(KdbGroup *)parent;
- (KdbEntry *)createEntry:(KdbGroup *)parent; - (KdbEntry *)createEntry:(KdbGroup *)parent;
- (void)addGroup:(NSArray *)groupAndParent;
- (void)deleteEntry:(KdbEntry *)entry; - (void)deleteEntry:(KdbEntry *)entry;
- (void)deleteGroup:(KdbGroup *)group; - (void)deleteGroup:(KdbGroup *)group;

View File

@@ -13,11 +13,13 @@
#import "Kdb4Node.h" #import "Kdb4Node.h"
#import "KdbPassword.h" #import "KdbPassword.h"
#import "MPDatabaseVersion.h" #import "MPDatabaseVersion.h"
#import "KdbGroup+Undo.h"
#import "KdbEntry+Undo.h"
NSString *const MPDocumentDidAddGroupNotification = @"MPDocumentDidAddGroupNotification"; NSString *const MPDocumentDidAddGroupNotification = @"MPDocumentDidAddGroupNotification";
NSString *const MPDocumentDidDelteGroupNotification = @"MPDocumentDidDelteGroupNotification"; NSString *const MPDocumentWillDelteGroupNotification = @"MPDocumentDidDelteGroupNotification";
NSString *const MPDocumentDidAddEntryNotification = @"MPDocumentDidAddEntryNotification"; NSString *const MPDocumentDidAddEntryNotification = @"MPDocumentDidAddEntryNotification";
NSString *const MPDocumentDidDeleteEntryNotification = @"MPDocumentDidDeleteEntryNotification"; NSString *const MPDocumentWillDeleteEntryNotification = @"MPDocumentDidDeleteEntryNotification";
NSString *const MPDocumentEntryKey = @"MPDocumentEntryKey"; NSString *const MPDocumentEntryKey = @"MPDocumentEntryKey";
NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey"; NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
@@ -30,7 +32,6 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
@property (nonatomic, readonly) KdbPassword *passwordHash; @property (nonatomic, readonly) KdbPassword *passwordHash;
@property (assign) MPDatabaseVersion version; @property (assign) MPDatabaseVersion version;
@property (assign) BOOL isDecrypted; @property (assign) BOOL isDecrypted;
@property (assign) BOOL isDirty;
@end @end
@@ -138,50 +139,34 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
- (KdbEntry *)createEntry:(KdbGroup *)parent { - (KdbEntry *)createEntry:(KdbGroup *)parent {
KdbEntry *newEntry = [self.tree createEntry:parent]; KdbEntry *newEntry = [self.tree createEntry:parent];
newEntry.title = NSLocalizedString(@"DEFAULT_ENTRY_TITLE", @"Title for a newly created entry"); newEntry.title = NSLocalizedString(@"DEFAULT_ENTRY_TITLE", @"Title for a newly created entry");
[[self undoManager] registerUndoWithTarget:self selector:@selector(deleteEntry:) object:newEntry]; [parent addEntryUndoable:newEntry];
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_ADD_ENTRY", @"Create Entry Undo")]; NSDictionary *userInfo = @{ MPDocumentEntryKey : newEntry };
[parent addEntry:newEntry]; [[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidAddEntryNotification object:self userInfo:userInfo];
return newEntry; return newEntry;
} }
- (KdbGroup *)createGroup:(KdbGroup *)parent { - (KdbGroup *)createGroup:(KdbGroup *)parent {
KdbGroup *newGroup = [self.tree createGroup:parent]; KdbGroup *newGroup = [self.tree createGroup:parent];
newGroup.name = NSLocalizedString(@"DEFAULT_GROUP_NAME", @"Title for a newly created group"); newGroup.name = NSLocalizedString(@"DEFAULT_GROUP_NAME", @"Title for a newly created group");
[parent addGroupUndoable:newGroup];
[[self undoManager] registerUndoWithTarget:self selector:@selector(deleteGroup:) object:newGroup];
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_ADD_GROUP", @"Create Group Undo")];
[parent addGroup:newGroup];
NSDictionary *userInfo = @{ MPDocumentGroupKey : newGroup }; NSDictionary *userInfo = @{ MPDocumentGroupKey : newGroup };
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidAddGroupNotification object:self userInfo:userInfo]; [[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidAddGroupNotification object:self userInfo:userInfo];
self.isDirty = YES;
return newGroup; return newGroup;
} }
- (void)addGroup:(NSArray *)groupAndParent{
KdbGroup *parent = groupAndParent[0];
KdbGroup *group = groupAndParent[1];
NSDictionary *userInfo = @{ MPDocumentGroupKey:group };
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidAddGroupNotification object:self userInfo:userInfo];
[parent addGroup:group];
}
- (void)deleteEntry:(KdbEntry *)entry { - (void)deleteEntry:(KdbEntry *)entry {
if(entry.parent) { if(entry.parent) {
[entry.parent removeEntry:entry]; NSDictionary *userInfo = @{ MPDocumentEntryKey : entry };
self.isDirty = YES; [[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentWillDeleteEntryNotification object:self userInfo:userInfo];
[entry.parent removeEntryUndoable:entry];
} }
} }
- (void)deleteGroup:(KdbGroup *)group { - (void)deleteGroup:(KdbGroup *)group {
if(group.parent) { if(group.parent) {
[[self undoManager] registerUndoWithTarget:self selector:@selector(addGroup:) object:@[group.parent, group]];
[[self undoManager] setActionName:NSLocalizedString(@"UNDO_DELETE_GROUP", @"Create Group Undo")];
[group.parent removeGroup:group];
NSDictionary *userInfo = @{ MPDocumentEntryKey : group }; NSDictionary *userInfo = @{ MPDocumentEntryKey : group };
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidDelteGroupNotification object:self userInfo:userInfo]; [[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentWillDelteGroupNotification object:self userInfo:userInfo];
[group.parent removeGroupUndoable:group];
self.isDirty = YES;
} }
} }

View File

@@ -16,6 +16,7 @@
#import "MPPasteBoardController.h" #import "MPPasteBoardController.h"
#import "MPOverlayWindowController.h" #import "MPOverlayWindowController.h"
#import "KdbGroup+MPAdditions.h" #import "KdbGroup+MPAdditions.h"
#import "KdbGroup+Undo.h"
#import "KdbEntry+Undo.h" #import "KdbEntry+Undo.h"
NSString *const MPDidChangeSelectedEntryNotification = @"com.macpass.MPDidChangeSelectedEntryNotification"; NSString *const MPDidChangeSelectedEntryNotification = @"com.macpass.MPDidChangeSelectedEntryNotification";
@@ -136,6 +137,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
name:MPOutlineViewDidChangeGroupSelection name:MPOutlineViewDidChangeGroupSelection
object:windowController.outlineViewController.outlineDelegate]; object:windowController.outlineViewController.outlineDelegate];
//[[NSNotificationCenter defaultCenter] addObserver:self.entryTable selector:@selector(reloadData) name:MPDocumentDidAddEntryNotification object:nil];
[self.entryTable setDelegate:self]; [self.entryTable setDelegate:self];
[self.entryTable setDoubleAction:@selector(_columnDoubleClick:)]; [self.entryTable setDoubleAction:@selector(_columnDoubleClick:)];
@@ -244,14 +246,13 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
[self.filterSearchField setStringValue:@""]; [self.filterSearchField setStringValue:@""];
} }
MPOutlineViewDelegate *delegate = [notification object]; MPOutlineViewDelegate *delegate = [notification object];
KdbGroup *group = delegate.selectedGroup; self.activeGroup = delegate.selectedGroup;
//[self.entryTable deselectAll:nil];
if(group) { if(_activeGroup) {
[self.entryArrayController setContent:nil]; [self.entryArrayController bind:NSContentArrayBinding toObject:_activeGroup withKeyPath:@"entries" options:nil];
[self.entryArrayController addObjects:group.entries];
} }
else { else {
[self.entryArrayController setContent:nil]; [self.entryArrayController unbind:NSContentArrayBinding];
} }
} }
@@ -478,7 +479,11 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
} }
- (void)createEntry:(id)sender { - (void)createEntry:(id)sender {
// TODO: if(!_activeGroup) {
return; // Entries are not allowed in root group
}
MPDocument *document = [[NSDocumentController sharedDocumentController] currentDocument];
[document createEntry:_activeGroup];
} }
- (void)deleteEntry:(id)sender { - (void)deleteEntry:(id)sender {

View File

@@ -9,12 +9,14 @@
#import "MPViewController.h" #import "MPViewController.h"
@class MPOutlineViewDelegate; @class MPOutlineViewDelegate;
@class KdbGroup;
@interface MPOutlineViewController : MPViewController @interface MPOutlineViewController : MPViewController
@property (retain, readonly) MPOutlineViewDelegate *outlineDelegate; @property (retain, readonly) MPOutlineViewDelegate *outlineDelegate;
@property (assign, nonatomic) BOOL isVisible; @property (assign, nonatomic) BOOL isVisible;
- (void)clearSelection; - (void)clearSelection;
- (void)showOutline; - (void)showOutline;

View File

@@ -51,7 +51,7 @@
[[NSNotificationCenter defaultCenter] addObserver:self [[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(_didUpdateData:) selector:@selector(_didUpdateData:)
name:MPDocumentDidDelteGroupNotification name:MPDocumentWillDelteGroupNotification
object:[[self windowController] document]]; object:[[self windowController] document]];
} }

View File

@@ -8,6 +8,7 @@
#import "MPOutlineViewDelegate.h" #import "MPOutlineViewDelegate.h"
#import "MPIconHelper.h" #import "MPIconHelper.h"
#import "MPUppercaseStringValueTransformer.h"
#import "KdbLib.h" #import "KdbLib.h"
NSString *const MPOutlineViewDidChangeGroupSelection = @"com.macpass.MPOutlineViewDidChangeGroupSelection"; NSString *const MPOutlineViewDidChangeGroupSelection = @"com.macpass.MPOutlineViewDidChangeGroupSelection";
@@ -27,8 +28,9 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
KdbGroup *group = item; KdbGroup *group = item;
NSTableCellView *view; NSTableCellView *view;
if(![group parent]) { if(![group parent]) {
NSDictionary *options = @{ NSValueTransformerBindingOption : [NSValueTransformer valueTransformerForName:MPUppsercaseStringValueTransformerName] };
view = [outlineView makeViewWithIdentifier:_MPOutlinveViewHeaderViewIdentifier owner:self]; view = [outlineView makeViewWithIdentifier:_MPOutlinveViewHeaderViewIdentifier owner:self];
[view.textField bind:NSValueBinding toObject:group withKeyPath:@"name" options:nil]; [view.textField bind:NSValueBinding toObject:group withKeyPath:@"name" options:options];
} }
else { else {
view = [outlineView makeViewWithIdentifier:_MPOutlineViewDataViewIdentifier owner:self]; view = [outlineView makeViewWithIdentifier:_MPOutlineViewDataViewIdentifier owner:self];

View File

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

View File

@@ -1,51 +0,0 @@
//
// MPRoundedTextFieldCell.m
// MacPass
//
// Created by Michael Starke on 01.06.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPRoundedTextFieldCell.h"
#define CORNER_RADIUS 3.0
@implementation MPRoundedTextFieldCell
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
NSRect pathRect = NSInsetRect(cellFrame, 0.5, 0.5);
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:pathRect xRadius:CORNER_RADIUS yRadius:CORNER_RADIUS];
[([self isEnabled] ? [NSColor colorWithCalibratedWhite:0.55 alpha:1] : [NSColor colorWithCalibratedWhite:0.75 alpha:1]) setStroke];
[[NSColor whiteColor] setFill];
[path fill];
[NSGraphicsContext saveGraphicsState];
NSShadow *shadow = [[NSShadow alloc] init];
[shadow setShadowColor:[NSColor colorWithCalibratedWhite:0.8 alpha:1]];
[shadow setShadowOffset:NSMakeSize(0, -1)];
[shadow setShadowBlurRadius:2];
[shadow set];
[path setClip];
[path stroke];
[shadow release];
[NSGraphicsContext restoreGraphicsState];
[path stroke];
//[shadow release];
[super drawInteriorWithFrame:cellFrame inView:controlView];
}
- (void)drawFocusRingMaskWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
NSLog(@"drawFocusRing");
//NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:cellFrame xRadius:CORNER_RADIUS yRadius:CORNER_RADIUS];
//[path stroke];
[super drawFocusRingMaskWithFrame:cellFrame inView:controlView];
}
- (NSRect)focusRingMaskBoundsForFrame:(NSRect)cellFrame inView:(NSView *)controlView {
return [controlView bounds];
}
@end

View File

@@ -7,33 +7,19 @@
// //
#import "MPTextField.h" #import "MPTextField.h"
#import "MPRoundedTextFieldCell.h" #import "HNHRoundedTextFieldCell.h"
@implementation MPTextField @implementation MPTextField
+ (Class)cellClass { + (Class)cellClass {
return [MPRoundedTextFieldCell class]; return [HNHRoundedTextFieldCell class];
} }
- (id)initWithCoder:(NSCoder *)aDecoder { - (void)awakeFromNib {
self = [super initWithCoder:aDecoder]; [[self class] setCellClass:[HNHRoundedTextFieldCell class]];
if(self) { if([[super class] instanceMethodForSelector:@selector(awakeFromNib)]) {
MPRoundedTextFieldCell *newCell = [[MPRoundedTextFieldCell alloc] init]; [super awakeFromNib];
NSTextFieldCell *cell = [self cell];
[newCell setBackgroundStyle:[cell backgroundStyle]];
[newCell setBezeled:[cell isBezeled]];
[newCell setBordered:[cell isBordered]];
[newCell setBackgroundColor:[cell backgroundColor]];
[newCell setTextColor:[cell textColor]];
[newCell setDrawsBackground:[cell drawsBackground]];
[newCell setAction:[cell action]];
[newCell setTarget:[cell target]];
[newCell setEditable:[cell isEditable]];
[newCell setEnabled:[cell isEnabled]];
[self setCell:newCell];
[newCell release];
} }
return self;
} }
@end @end

View File

@@ -0,0 +1,17 @@
//
// MPUppercaseStringValueTransformer.h
// MacPass
//
// Created by Michael Starke on 03.06.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
APPKIT_EXTERN NSString *const MPUppsercaseStringValueTransformerName;
#import <Foundation/Foundation.h>
@interface MPUppercaseStringValueTransformer : NSValueTransformer
+ (void)registerTransformer;
@end

View File

@@ -0,0 +1,37 @@
//
// MPUppercaseStringValueTransformer.m
// MacPass
//
// Created by Michael Starke on 03.06.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPUppercaseStringValueTransformer.h"
NSString *const MPUppsercaseStringValueTransformerName = @"StringToUppercaseStringTransformer";
@implementation MPUppercaseStringValueTransformer
+ (Class)transformedValueClass {
return [NSString class];
}
+ (BOOL)allowsReverseTransformation {
return NO;
}
+ (void)registerTransformer {
MPUppercaseStringValueTransformer *transformer = [[MPUppercaseStringValueTransformer alloc] init];
[NSValueTransformer setValueTransformer:transformer
forName:MPUppsercaseStringValueTransformerName];
[transformer release];
}
- (id)transformedValue:(id)value {
if([value respondsToSelector:@selector(uppercaseString)]) {
return [value uppercaseString];
}
return value;
}
@end

View File

@@ -46,7 +46,7 @@
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>7F1</string> <string>863</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string> <string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>

View File

@@ -20,7 +20,6 @@ static NSUInteger randomInteger(NSUInteger minimum, NSUInteger maximum) {
return maximum; return maximum;
} }
if( delta < 0 ) { if( delta < 0 ) {
maximum = minimum;
minimum -= delta; minimum -= delta;
delta = -delta; delta = -delta;
} }