From 5111b363ef9c535c252aa8f4301c88892ed06ada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Walsh?= Date: Tue, 23 Sep 2008 18:37:15 +0100 Subject: [PATCH] Setting up target/action for the file icon buttons --- PBGitCommitController.h | 3 ++ PBGitCommitController.m | 3 ++ PBGitCommitView.xib | 96 ++++++++++++++++++++++++++++++++++++----- 3 files changed, 92 insertions(+), 10 deletions(-) diff --git a/PBGitCommitController.h b/PBGitCommitController.h index d5fd0b8..4e6ddd8 100644 --- a/PBGitCommitController.h +++ b/PBGitCommitController.h @@ -14,6 +14,9 @@ IBOutlet NSArrayController *unstagedFilesController; IBOutlet NSArrayController *cachedFilesController; + + IBOutlet NSButtonCell* unstagedButtonCell; + IBOutlet NSButtonCell* cachedButtonCell; } @property (retain) NSMutableArray *files; diff --git a/PBGitCommitController.m b/PBGitCommitController.m index 19cad2e..e869d5c 100644 --- a/PBGitCommitController.m +++ b/PBGitCommitController.m @@ -18,6 +18,9 @@ { [unstagedFilesController setFilterPredicate:[NSPredicate predicateWithFormat:@"cached == 0"]]; [cachedFilesController setFilterPredicate:[NSPredicate predicateWithFormat:@"cached == 1"]]; + [unstagedButtonCell setAction:@selector(cellClicked:)]; + [cachedButtonCell setAction:@selector(cellClicked:)]; + [self refresh:self]; } diff --git a/PBGitCommitView.xib b/PBGitCommitView.xib index cca034f..a8eb0a2 100644 --- a/PBGitCommitView.xib +++ b/PBGitCommitView.xib @@ -8,7 +8,7 @@ 352.00 YES - + YES @@ -128,7 +128,7 @@ - + 67239424 134348800 Icon @@ -136,7 +136,7 @@ -2039201537 129 - + 549650432 {1, 1} @@ -328,7 +328,7 @@ ARcABAAAAAEAAAACARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA - + 67239424 134348800 Icon @@ -336,7 +336,7 @@ ARcABAAAAAEAAAACARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA -2039201537 129 - + 200 @@ -1119,6 +1119,54 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 161 + + + cachedButtonCell + + + + 164 + + + + unstagedButtonCell + + + + 165 + + + + target: self + + + + + + target: self + target + self + 2 + + + 166 + + + + target: self + + + + + + target: self + target + self + 2 + + + 167 + @@ -1225,7 +1273,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA YES - + @@ -1266,7 +1314,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA YES - + @@ -1428,12 +1476,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 159 - + 162 - + @@ -1537,7 +1585,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA - 162 + 167 @@ -1597,6 +1645,34 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA + + YES + + PBGitCommitController + PBViewController + + YES + + YES + cachedButtonCell + cachedFilesController + unstagedButtonCell + unstagedFilesController + + + YES + NSButtonCell + NSArrayController + NSButtonCell + NSArrayController + + + + IBDocumentRelativeSource + PBGitCommitController.h + + + 0 GitX.xcodeproj