From ef26909d75cdfde2c461135ef4b3bf2eef514b8b Mon Sep 17 00:00:00 2001 From: Nathan Kinsinger Date: Sat, 13 Mar 2010 23:05:28 -0700 Subject: [PATCH] Add a Refresh button to the main window toolbar --- English.lproj/RepositoryWindow.xib | 113 +++++++++++++++++++++++++++-- PBGitWindowController.h | 1 + PBGitWindowController.m | 5 ++ 3 files changed, 111 insertions(+), 8 deletions(-) diff --git a/English.lproj/RepositoryWindow.xib b/English.lproj/RepositoryWindow.xib index 1a8cb07..fd8c769 100644 --- a/English.lproj/RepositoryWindow.xib +++ b/English.lproj/RepositoryWindow.xib @@ -62,6 +62,7 @@ YES 41FA1145-D953-446F-B6DF-0230885AB433 7A8FEE7B-B273-4AF3-8A22-53A9DAF786FA + B15C57F2-985F-4446-9A29-34C76DBA9042 FF15EAEC-D5AB-4C6F-9E13-4B62C6692BFC NSToolbarFlexibleSpaceItem NSToolbarSeparatorItem @@ -96,15 +97,17 @@ Clone Repository To - + 268 {{38, 14}, {40, 25}} + + YES -2080244224 134217728 Round Textured - + LucidaGrande 13 1044 @@ -133,6 +136,49 @@ YES 0 + + + B15C57F2-985F-4446-9A29-34C76DBA9042 + + Refresh + Refresh + + + + 268 + {{8, 14}, {32, 25}} + + + YES + + -2080244224 + 134217728 + Round Textured + + + -2033958657 + 163 + + NSImage + NSRefreshTemplate + + + + 400 + 75 + + + + + + {20, 25} + {32, 25} + YES + YES + 0 + YES + 0 + FF15EAEC-D5AB-4C6F-9E13-4B62C6692BFC @@ -246,12 +292,14 @@ + YES + @@ -473,6 +521,14 @@ 414 + + + refresh: + + + + 419 + @@ -559,6 +615,7 @@ + @@ -646,6 +703,29 @@ + + 415 + + + YES + + + + + + 416 + + + YES + + + + + + 417 + + + @@ -678,15 +758,18 @@ 410.IBPluginDependency 411.IBPluginDependency 412.IBPluginDependency + 415.IBPluginDependency + 416.IBPluginDependency + 417.IBPluginDependency 5.IBPluginDependency 5.ImportedFromIB2 YES com.apple.InterfaceBuilder.CocoaPlugin - {{484, 662}, {890, 514}} + {{210, 655}, {890, 514}} com.apple.InterfaceBuilder.CocoaPlugin - {{484, 662}, {890, 514}} + {{210, 655}, {890, 514}} {{15, 196}, {850, 418}} @@ -697,7 +780,10 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{621, 1007}, {616, 169}} + {{347, 1169}, {616, 0}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -729,7 +815,7 @@ - 414 + 419 @@ -743,6 +829,7 @@ YES cloneTo: openInTerminal: + refresh: revealInFinder: showCommitView: showHistoryView: @@ -754,6 +841,7 @@ id id id + id @@ -1364,8 +1452,17 @@ ../GitX.xcodeproj 3 - CloneRepositoryTemplate - {26, 15} + YES + + YES + CloneRepositoryTemplate + NSRefreshTemplate + + + YES + {26, 15} + {10, 12} + diff --git a/PBGitWindowController.h b/PBGitWindowController.h index ef1ab0d..1d9cac8 100644 --- a/PBGitWindowController.h +++ b/PBGitWindowController.h @@ -46,4 +46,5 @@ - (IBAction) revealInFinder:(id)sender; - (IBAction) openInTerminal:(id)sender; - (IBAction) cloneTo:(id)sender; +- (IBAction) refresh:(id)sender; @end diff --git a/PBGitWindowController.m b/PBGitWindowController.m index 207844d..bfbf150 100644 --- a/PBGitWindowController.m +++ b/PBGitWindowController.m @@ -151,6 +151,11 @@ [PBCloneRepsitoryToSheet beginCloneRepsitoryToSheetForRepository:repository]; } +- (IBAction) refresh:(id)sender +{ + [repository forceUpdateRevisions]; +} + - (void) updateStatus { NSString *status = contentController.status;