From 509de290919f37bb270258dacb4b4d18813f7cb7 Mon Sep 17 00:00:00 2001 From: Nathan Kinsinger Date: Sat, 26 Dec 2009 21:35:54 -0700 Subject: [PATCH] Add Reveal in Finder item to the Repository menu. --- English.lproj/MainMenu.xib | 46 +++++++++++++++++++++++++++++--------- PBGitWindowController.h | 1 + PBGitWindowController.m | 5 +++++ 3 files changed, 42 insertions(+), 10 deletions(-) diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib index cf17779..8f619b8 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -657,7 +657,7 @@ - + YES YES @@ -667,9 +667,17 @@ - + - Open In Terminal + Open in Terminal + + 2147483647 + + + + + + Reveal in Finder 2147483647 @@ -1278,10 +1286,18 @@ openInTerminal: - + 944 + + + revealInFinder: + + + + 946 + @@ -1941,8 +1957,9 @@ YES - - + + + @@ -1953,12 +1970,17 @@ 942 - + 943 - + + + + + 945 + @@ -2157,6 +2179,7 @@ 938.IBPluginDependency 942.IBPluginDependency 943.IBPluginDependency + 945.IBPluginDependency YES @@ -2345,7 +2368,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{668, 683}, {192, 53}} + {{668, 663}, {192, 73}} + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2368,7 +2392,7 @@ - 944 + 946 @@ -2644,6 +2668,7 @@ YES openInTerminal: + revealInFinder: showCommitView: showHistoryView: @@ -2652,6 +2677,7 @@ id id id + id diff --git a/PBGitWindowController.h b/PBGitWindowController.h index d40d436..d8815a0 100644 --- a/PBGitWindowController.h +++ b/PBGitWindowController.h @@ -35,5 +35,6 @@ - (IBAction) showCommitView:(id)sender; - (IBAction) showHistoryView:(id)sender; +- (IBAction) revealInFinder:(id)sender; - (IBAction) openInTerminal:(id)sender; @end diff --git a/PBGitWindowController.m b/PBGitWindowController.m index 0d7b8ee..4bfd0f7 100644 --- a/PBGitWindowController.m +++ b/PBGitWindowController.m @@ -150,6 +150,11 @@ [self showErrorSheet:error]; } +- (IBAction) revealInFinder:(id)sender +{ + [[NSWorkspace sharedWorkspace] openFile:[repository workingDirectory]]; +} + - (IBAction) openInTerminal:(id)sender { TerminalApplication *term = [SBApplication applicationWithBundleIdentifier: @"com.apple.Terminal"];