• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

TextMate is a graphical text editor for OS X 10.7+


Commit MetaInfo

Revision64ff8a53e751cddf9197009ebf7e9aa26d778f80 (tree)
Zeit2012-08-18 22:30:24
AutorAllan Odgaard <git@abet...>
CommiterAllan Odgaard

Log Message

Go to SCM Status is now a toggle

This is implemented by invoking “go back” if already showing an SCM URL. If there is no history (unlikely) then we instead “go up (parent)” which should take us to the root of the repository.

Ändern Zusammenfassung

Diff

--- a/Frameworks/OakFileBrowser/src/OakFileBrowser.mm
+++ b/Frameworks/OakFileBrowser/src/OakFileBrowser.mm
@@ -831,12 +831,21 @@ static struct data_source_options_map_t { NSString* const name; NSUInteger flag;
831831
832832 - (IBAction)goToSCMDataSource:(id)sender
833833 {
834- for(NSURL* selectedURL in self.selectedURLs)
834+ if([url.scheme isEqualToString:@"scm"])
835835 {
836- if([selectedURL isFileURL] && path::is_directory([[selectedURL path] fileSystemRepresentation]))
837- return [self pushURL:[FSSCMDataSource scmURLWithPath:[selectedURL path]]];
836+ if(historyController.previousURL)
837+ [self goBack:sender];
838+ else [self goToParentFolder:sender];
839+ }
840+ else
841+ {
842+ for(NSURL* selectedURL in self.selectedURLs)
843+ {
844+ if([selectedURL isFileURL] && path::is_directory([[selectedURL path] fileSystemRepresentation]))
845+ return [self pushURL:[FSSCMDataSource scmURLWithPath:[selectedURL path]]];
846+ }
847+ [self pushURL:[FSSCMDataSource scmURLWithPath:[url path]]];
838848 }
839- [self pushURL:[FSSCMDataSource scmURLWithPath:[url path]]];
840849 }
841850
842851 - (IBAction)goBack:(id)sender { if(historyController.previousURL) { [self setURL:historyController.previousURL]; [historyController retreat:self]; [outlineViewDelegate scrollToOffset:historyController.currentURLScrollOffset]; [self updateView]; } }