From c36726b9850c6ceecc07a428f3b3f57263c9cfbb Mon Sep 17 00:00:00 2001 From: Nathan Kinsinger Date: Thu, 7 Jan 2010 21:24:32 -0700 Subject: [PATCH] Update the GUI to be more iApp like - In PBGitSidebarView.xib - change indentation to 12 - change font size to 11 - disable the editable behavior - disable autoresizing - disable user resizing (column should resize with view) - remove the window - remove the shared user defaults controller (not being used) - add a project item with the project's name - a "Stage" item to go to what has been called the commit view - new icons for branches, remote branches and tags (created by Nathan Kinsinger) - remove the old tiff icons, PBSourceViewRemote.h/m and PBSourceViewAction.h/m from the xcode project - uses system icon for folder - uses Network icon for remotes - capitalize group names - rename the Custom group to Other (you can't really customize items in the traditional sense) - create a class for each item type that takes care of it's image (instead of trying to guess the image from it or it's parent's name) - remove the branch menu toolbar item from the history view, it's redundant now --- GitX.xcodeproj/project.pbxproj | 101 +++-- Images/Branch.acorn | Bin 0 -> 1849 bytes Images/Branch.png | Bin 0 -> 546 bytes Images/RemoteBranch.acorn | Bin 0 -> 1810 bytes Images/RemoteBranch.png | Bin 0 -> 513 bytes Images/StageView.png | Bin 0 -> 271 bytes Images/Tag.acorn | Bin 0 -> 1794 bytes Images/Tag.png | Bin 0 -> 527 bytes PBGitHistoryView.xib | 304 +++++--------- PBGitRevSpecifier.h | 1 + PBGitRevSpecifier.m | 22 + PBGitSVBranchItem.h | 19 + PBGitSVBranchItem.m | 33 ++ PBGitSVFolderItem.h | 19 + PBGitSVFolderItem.m | 34 ++ PBGitSVOtherRevItem.h | 19 + PBGitSVOtherRevItem.m | 34 ++ PBGitSVRemoteBranchItem.h | 19 + PBGitSVRemoteBranchItem.m | 33 ++ PBGitSVRemoteItem.h | 19 + PBGitSVRemoteItem.m | 41 ++ PBGitSVStageItem.h | 19 + PBGitSVStageItem.m | 32 ++ PBGitSVTagItem.h | 19 + PBGitSVTagItem.m | 33 ++ PBGitSidebarController.h | 6 +- PBGitSidebarController.m | 44 +- PBGitSidebarView.xib | 714 ++++++++++++++++++++++++++++----- PBRefController.h | 3 - PBRefController.m | 116 ------ PBSourceViewItem.h | 5 +- PBSourceViewItem.m | 73 ++-- PBSourceViewItems.h | 19 + 33 files changed, 1257 insertions(+), 524 deletions(-) create mode 100644 Images/Branch.acorn create mode 100644 Images/Branch.png create mode 100644 Images/RemoteBranch.acorn create mode 100644 Images/RemoteBranch.png create mode 100644 Images/StageView.png create mode 100644 Images/Tag.acorn create mode 100644 Images/Tag.png create mode 100644 PBGitSVBranchItem.h create mode 100644 PBGitSVBranchItem.m create mode 100644 PBGitSVFolderItem.h create mode 100644 PBGitSVFolderItem.m create mode 100644 PBGitSVOtherRevItem.h create mode 100644 PBGitSVOtherRevItem.m create mode 100644 PBGitSVRemoteBranchItem.h create mode 100644 PBGitSVRemoteBranchItem.m create mode 100644 PBGitSVRemoteItem.h create mode 100644 PBGitSVRemoteItem.m create mode 100644 PBGitSVStageItem.h create mode 100644 PBGitSVStageItem.m create mode 100644 PBGitSVTagItem.h create mode 100644 PBGitSVTagItem.m create mode 100644 PBSourceViewItems.h diff --git a/GitX.xcodeproj/project.pbxproj b/GitX.xcodeproj/project.pbxproj index 46c6917..7c1bab3 100644 --- a/GitX.xcodeproj/project.pbxproj +++ b/GitX.xcodeproj/project.pbxproj @@ -52,11 +52,22 @@ D8083E03111FA33700337480 /* PBCloneRepositoryPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = D8083E02111FA33700337480 /* PBCloneRepositoryPanel.m */; }; D8357535112640F100DE249D /* PBRemoteProgressSheet.xib in Resources */ = {isa = PBXBuildFile; fileRef = D8C1B77110E875CF009B7F8B /* PBRemoteProgressSheet.xib */; }; D854948610D5C01B0083B917 /* PBCreateBranchSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = D854948510D5C01B0083B917 /* PBCreateBranchSheet.m */; }; + D85810551127476E007F254B /* StageView.png in Resources */ = {isa = PBXBuildFile; fileRef = D85810541127476E007F254B /* StageView.png */; }; + D858108311274D28007F254B /* Branch.png in Resources */ = {isa = PBXBuildFile; fileRef = D858108011274D28007F254B /* Branch.png */; }; + D858108411274D28007F254B /* RemoteBranch.png in Resources */ = {isa = PBXBuildFile; fileRef = D858108111274D28007F254B /* RemoteBranch.png */; }; + D858108511274D28007F254B /* Tag.png in Resources */ = {isa = PBXBuildFile; fileRef = D858108211274D28007F254B /* Tag.png */; }; D85B939310E3D8B4007F3C28 /* PBCreateBranchSheet.xib in Resources */ = {isa = PBXBuildFile; fileRef = D85B939210E3D8B4007F3C28 /* PBCreateBranchSheet.xib */; }; D889EB3110E6BCBB00F08413 /* PBCreateTagSheet.xib in Resources */ = {isa = PBXBuildFile; fileRef = D889EB3010E6BCBB00F08413 /* PBCreateTagSheet.xib */; }; D8E3B2B810DC9FB2001096A3 /* ScriptingBridge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8E3B2B710DC9FB2001096A3 /* ScriptingBridge.framework */; }; D8E3B34D10DCA958001096A3 /* PBCreateTagSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = D8E3B34C10DCA958001096A3 /* PBCreateTagSheet.m */; }; D8FDD9F711432A12005647F6 /* PBCloneRepositoryPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = D8FDD9F511432A12005647F6 /* PBCloneRepositoryPanel.xib */; }; + D8FDDA6A114335E8005647F6 /* PBGitSVBranchItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA5D114335E8005647F6 /* PBGitSVBranchItem.m */; }; + D8FDDA6B114335E8005647F6 /* PBGitSVFolderItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA5F114335E8005647F6 /* PBGitSVFolderItem.m */; }; + D8FDDA6C114335E8005647F6 /* PBGitSVOtherRevItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA61114335E8005647F6 /* PBGitSVOtherRevItem.m */; }; + D8FDDA6D114335E8005647F6 /* PBGitSVRemoteBranchItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA63114335E8005647F6 /* PBGitSVRemoteBranchItem.m */; }; + D8FDDA6E114335E8005647F6 /* PBGitSVRemoteItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA65114335E8005647F6 /* PBGitSVRemoteItem.m */; }; + D8FDDA6F114335E8005647F6 /* PBGitSVStageItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA67114335E8005647F6 /* PBGitSVStageItem.m */; }; + D8FDDA70114335E8005647F6 /* PBGitSVTagItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA69114335E8005647F6 /* PBGitSVTagItem.m */; }; EB2A734A0FEE3F09006601CF /* PBCollapsibleSplitView.m in Sources */ = {isa = PBXBuildFile; fileRef = EB2A73490FEE3F09006601CF /* PBCollapsibleSplitView.m */; }; F50A411F0EBB874C00208746 /* mainSplitterBar.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F50A411D0EBB874C00208746 /* mainSplitterBar.tiff */; }; F50A41200EBB874C00208746 /* mainSplitterDimple.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F50A411E0EBB874C00208746 /* mainSplitterDimple.tiff */; }; @@ -65,8 +76,6 @@ F513085B0E0740F2000C8BCD /* PBQLOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = F513085A0E0740F2000C8BCD /* PBQLOutlineView.m */; }; F5140DC90E8A8EB20091E9F3 /* RoundedRectangle.m in Sources */ = {isa = PBXBuildFile; fileRef = F5140DC80E8A8EB20091E9F3 /* RoundedRectangle.m */; }; F523CEB60ED3399200DDD714 /* PBGitIndexController.m in Sources */ = {isa = PBXBuildFile; fileRef = F523CEB50ED3399200DDD714 /* PBGitIndexController.m */; }; - F528210A1056A7C1001D1511 /* PBSourceViewRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = F52821091056A7C1001D1511 /* PBSourceViewRemote.m */; }; - F528210D1056A7EB001D1511 /* PBSourceViewAction.m in Sources */ = {isa = PBXBuildFile; fileRef = F528210C1056A7EB001D1511 /* PBSourceViewAction.m */; }; F52BCE030E84208300AA3741 /* PBGitHistoryView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F52BCE020E84208300AA3741 /* PBGitHistoryView.xib */; }; F52BCE070E84211300AA3741 /* PBGitHistoryController.m in Sources */ = {isa = PBXBuildFile; fileRef = F52BCE060E84211300AA3741 /* PBGitHistoryController.m */; }; F53C4DF70E97FC630022AD59 /* PBGitBinary.m in Sources */ = {isa = PBXBuildFile; fileRef = F53C4DF60E97FC630022AD59 /* PBGitBinary.m */; }; @@ -121,10 +130,6 @@ F58DB55910566D3500CFDF4A /* PBGitSidebarController.m in Sources */ = {isa = PBXBuildFile; fileRef = F58DB55810566D3500CFDF4A /* PBGitSidebarController.m */; }; F58DB56010566E3900CFDF4A /* PBGitSidebarView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F58DB55F10566E3900CFDF4A /* PBGitSidebarView.xib */; }; F58DB5E8105671B600CFDF4A /* PBSourceViewItem.m in Sources */ = {isa = PBXBuildFile; fileRef = F58DB5E7105671B600CFDF4A /* PBSourceViewItem.m */; }; - F58DB7711056860900CFDF4A /* branch.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F58DB76D1056860900CFDF4A /* branch.tiff */; }; - F58DB7721056860900CFDF4A /* remote.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F58DB76E1056860900CFDF4A /* remote.tiff */; }; - F58DB7731056860900CFDF4A /* folder.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F58DB76F1056860900CFDF4A /* folder.tiff */; }; - F58DB7741056860900CFDF4A /* tag.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F58DB7701056860900CFDF4A /* tag.tiff */; }; F59116E60E843BB50072CCB1 /* PBGitCommitView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F59116E50E843BB50072CCB1 /* PBGitCommitView.xib */; }; F59116E90E843BCB0072CCB1 /* PBGitCommitController.m in Sources */ = {isa = PBXBuildFile; fileRef = F59116E80E843BCB0072CCB1 /* PBGitCommitController.m */; }; F593DF780E9E636C003A8559 /* PBFileChangesTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = F593DF770E9E636C003A8559 /* PBFileChangesTableView.m */; }; @@ -245,6 +250,10 @@ D854948410D5C01B0083B917 /* PBCreateBranchSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBCreateBranchSheet.h; sourceTree = ""; }; D854948510D5C01B0083B917 /* PBCreateBranchSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBCreateBranchSheet.m; sourceTree = ""; }; D854949310D5C3E20083B917 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/PBCreateBranchSheet.xib; sourceTree = ""; }; + D85810541127476E007F254B /* StageView.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = StageView.png; path = Images/StageView.png; sourceTree = ""; }; + D858108011274D28007F254B /* Branch.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Branch.png; path = Images/Branch.png; sourceTree = ""; }; + D858108111274D28007F254B /* RemoteBranch.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = RemoteBranch.png; path = Images/RemoteBranch.png; sourceTree = ""; }; + D858108211274D28007F254B /* Tag.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Tag.png; path = Images/Tag.png; sourceTree = ""; }; D85B93F610E51279007F3C28 /* PBGitRefish.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRefish.h; sourceTree = ""; }; D8C1B77210E875CF009B7F8B /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/PBRemoteProgressSheet.xib; sourceTree = ""; }; D8E3B2B710DC9FB2001096A3 /* ScriptingBridge.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ScriptingBridge.framework; path = /System/Library/Frameworks/ScriptingBridge.framework; sourceTree = ""; }; @@ -252,6 +261,21 @@ D8E3B34C10DCA958001096A3 /* PBCreateTagSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBCreateTagSheet.m; sourceTree = ""; }; D8E3B38110DD4E2C001096A3 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/PBCreateTagSheet.xib; sourceTree = ""; }; D8FDD9F611432A12005647F6 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/PBCloneRepositoryPanel.xib; sourceTree = ""; }; + D8FDDA5C114335E8005647F6 /* PBGitSVBranchItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSVBranchItem.h; sourceTree = ""; }; + D8FDDA5D114335E8005647F6 /* PBGitSVBranchItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSVBranchItem.m; sourceTree = ""; }; + D8FDDA5E114335E8005647F6 /* PBGitSVFolderItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSVFolderItem.h; sourceTree = ""; }; + D8FDDA5F114335E8005647F6 /* PBGitSVFolderItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSVFolderItem.m; sourceTree = ""; }; + D8FDDA60114335E8005647F6 /* PBGitSVOtherRevItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSVOtherRevItem.h; sourceTree = ""; }; + D8FDDA61114335E8005647F6 /* PBGitSVOtherRevItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSVOtherRevItem.m; sourceTree = ""; }; + D8FDDA62114335E8005647F6 /* PBGitSVRemoteBranchItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSVRemoteBranchItem.h; sourceTree = ""; }; + D8FDDA63114335E8005647F6 /* PBGitSVRemoteBranchItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSVRemoteBranchItem.m; sourceTree = ""; }; + D8FDDA64114335E8005647F6 /* PBGitSVRemoteItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSVRemoteItem.h; sourceTree = ""; }; + D8FDDA65114335E8005647F6 /* PBGitSVRemoteItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSVRemoteItem.m; sourceTree = ""; }; + D8FDDA66114335E8005647F6 /* PBGitSVStageItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSVStageItem.h; sourceTree = ""; }; + D8FDDA67114335E8005647F6 /* PBGitSVStageItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSVStageItem.m; sourceTree = ""; }; + D8FDDA68114335E8005647F6 /* PBGitSVTagItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSVTagItem.h; sourceTree = ""; }; + D8FDDA69114335E8005647F6 /* PBGitSVTagItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSVTagItem.m; sourceTree = ""; }; + D8FDDA7311433634005647F6 /* PBSourceViewItems.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBSourceViewItems.h; sourceTree = ""; }; EB2A73480FEE3F09006601CF /* PBCollapsibleSplitView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBCollapsibleSplitView.h; sourceTree = ""; }; EB2A73490FEE3F09006601CF /* PBCollapsibleSplitView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBCollapsibleSplitView.m; sourceTree = ""; }; F50A411D0EBB874C00208746 /* mainSplitterBar.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = mainSplitterBar.tiff; path = Images/mainSplitterBar.tiff; sourceTree = ""; }; @@ -266,10 +290,6 @@ F5140DC80E8A8EB20091E9F3 /* RoundedRectangle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoundedRectangle.m; sourceTree = ""; }; F523CEB40ED3399100DDD714 /* PBGitIndexController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitIndexController.h; sourceTree = ""; }; F523CEB50ED3399200DDD714 /* PBGitIndexController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitIndexController.m; sourceTree = ""; }; - F52821081056A7C1001D1511 /* PBSourceViewRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBSourceViewRemote.h; sourceTree = ""; }; - F52821091056A7C1001D1511 /* PBSourceViewRemote.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBSourceViewRemote.m; sourceTree = ""; }; - F528210B1056A7EB001D1511 /* PBSourceViewAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBSourceViewAction.h; sourceTree = ""; }; - F528210C1056A7EB001D1511 /* PBSourceViewAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBSourceViewAction.m; sourceTree = ""; }; F52BCE020E84208300AA3741 /* PBGitHistoryView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PBGitHistoryView.xib; sourceTree = ""; }; F52BCE050E84211300AA3741 /* PBGitHistoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitHistoryController.h; sourceTree = ""; }; F52BCE060E84211300AA3741 /* PBGitHistoryController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitHistoryController.m; sourceTree = ""; }; @@ -317,10 +337,6 @@ F58DB55F10566E3900CFDF4A /* PBGitSidebarView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PBGitSidebarView.xib; sourceTree = ""; }; F58DB5E6105671B600CFDF4A /* PBSourceViewItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBSourceViewItem.h; sourceTree = ""; }; F58DB5E7105671B600CFDF4A /* PBSourceViewItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBSourceViewItem.m; sourceTree = ""; }; - F58DB76D1056860900CFDF4A /* branch.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = branch.tiff; path = Images/branch.tiff; sourceTree = ""; }; - F58DB76E1056860900CFDF4A /* remote.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = remote.tiff; path = Images/remote.tiff; sourceTree = ""; }; - F58DB76F1056860900CFDF4A /* folder.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = folder.tiff; path = Images/folder.tiff; sourceTree = ""; }; - F58DB7701056860900CFDF4A /* tag.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = tag.tiff; path = Images/tag.tiff; sourceTree = ""; }; F59116E50E843BB50072CCB1 /* PBGitCommitView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PBGitCommitView.xib; sourceTree = ""; }; F59116E70E843BCB0072CCB1 /* PBGitCommitController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitCommitController.h; sourceTree = ""; }; F59116E80E843BCB0072CCB1 /* PBGitCommitController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitCommitController.m; sourceTree = ""; }; @@ -478,10 +494,10 @@ 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( - F58DB76D1056860900CFDF4A /* branch.tiff */, - F58DB76E1056860900CFDF4A /* remote.tiff */, - F58DB76F1056860900CFDF4A /* folder.tiff */, - F58DB7701056860900CFDF4A /* tag.tiff */, + D858108011274D28007F254B /* Branch.png */, + D858108111274D28007F254B /* RemoteBranch.png */, + D858108211274D28007F254B /* Tag.png */, + D85810541127476E007F254B /* StageView.png */, 3BC07F4A0ED5A5C5009A7768 /* HistoryViewTemplate.png */, 3BC07F4B0ED5A5C5009A7768 /* CommitViewTemplate.png */, F56ADDD70ED19F9E002AC78F /* AddBranchTemplate.png */, @@ -577,6 +593,30 @@ name = Sheets; sourceTree = ""; }; + D8FDDA58114335B0005647F6 /* Source View Items */ = { + isa = PBXGroup; + children = ( + D8FDDA7311433634005647F6 /* PBSourceViewItems.h */, + F58DB5E6105671B600CFDF4A /* PBSourceViewItem.h */, + F58DB5E7105671B600CFDF4A /* PBSourceViewItem.m */, + D8FDDA66114335E8005647F6 /* PBGitSVStageItem.h */, + D8FDDA67114335E8005647F6 /* PBGitSVStageItem.m */, + D8FDDA5C114335E8005647F6 /* PBGitSVBranchItem.h */, + D8FDDA5D114335E8005647F6 /* PBGitSVBranchItem.m */, + D8FDDA64114335E8005647F6 /* PBGitSVRemoteItem.h */, + D8FDDA65114335E8005647F6 /* PBGitSVRemoteItem.m */, + D8FDDA62114335E8005647F6 /* PBGitSVRemoteBranchItem.h */, + D8FDDA63114335E8005647F6 /* PBGitSVRemoteBranchItem.m */, + D8FDDA68114335E8005647F6 /* PBGitSVTagItem.h */, + D8FDDA69114335E8005647F6 /* PBGitSVTagItem.m */, + D8FDDA60114335E8005647F6 /* PBGitSVOtherRevItem.h */, + D8FDDA61114335E8005647F6 /* PBGitSVOtherRevItem.m */, + D8FDDA5E114335E8005647F6 /* PBGitSVFolderItem.h */, + D8FDDA5F114335E8005647F6 /* PBGitSVFolderItem.m */, + ); + name = "Source View Items"; + sourceTree = ""; + }; F50A41130EBB872D00208746 /* Widgets */ = { isa = PBXGroup; children = ( @@ -682,12 +722,7 @@ children = ( F58DB55710566D3500CFDF4A /* PBGitSidebarController.h */, F58DB55810566D3500CFDF4A /* PBGitSidebarController.m */, - F58DB5E6105671B600CFDF4A /* PBSourceViewItem.h */, - F58DB5E7105671B600CFDF4A /* PBSourceViewItem.m */, - F52821081056A7C1001D1511 /* PBSourceViewRemote.h */, - F52821091056A7C1001D1511 /* PBSourceViewRemote.m */, - F528210B1056A7EB001D1511 /* PBSourceViewAction.h */, - F528210C1056A7EB001D1511 /* PBSourceViewAction.m */, + D8FDDA58114335B0005647F6 /* Source View Items */, ); name = Sidebar; sourceTree = ""; @@ -931,6 +966,7 @@ 47DBDB6A0E94EF6500671A1E /* Preferences.xib in Resources */, 47DBDBB10E94F6CA00671A1E /* Updates.png in Resources */, F569AE930F2CBD7C00C2FFA7 /* Credits.html in Resources */, + F58DB56010566E3900CFDF4A /* PBGitSidebarView.xib in Resources */, D85B939310E3D8B4007F3C28 /* PBCreateBranchSheet.xib in Resources */, D889EB3110E6BCBB00F08413 /* PBCreateTagSheet.xib in Resources */, D8357535112640F100DE249D /* PBRemoteProgressSheet.xib in Resources */, @@ -938,10 +974,10 @@ D8083DCD111F918900337480 /* PBCloneRepsitoryToSheet.xib in Resources */, D8FDD9F711432A12005647F6 /* PBCloneRepositoryPanel.xib in Resources */, F58DB56010566E3900CFDF4A /* PBGitSidebarView.xib in Resources */, - F58DB7711056860900CFDF4A /* branch.tiff in Resources */, - F58DB7721056860900CFDF4A /* remote.tiff in Resources */, - F58DB7731056860900CFDF4A /* folder.tiff in Resources */, - F58DB7741056860900CFDF4A /* tag.tiff in Resources */, + D85810551127476E007F254B /* StageView.png in Resources */, + D858108311274D28007F254B /* Branch.png in Resources */, + D858108411274D28007F254B /* RemoteBranch.png in Resources */, + D858108511274D28007F254B /* Tag.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1070,8 +1106,13 @@ F58DB55910566D3500CFDF4A /* PBGitSidebarController.m in Sources */, F58DB5E8105671B600CFDF4A /* PBSourceViewItem.m in Sources */, F567B88D1057FA9F000DB976 /* NSOutlineViewExt.m in Sources */, - F528210A1056A7C1001D1511 /* PBSourceViewRemote.m in Sources */, - F528210D1056A7EB001D1511 /* PBSourceViewAction.m in Sources */, + D8FDDA6A114335E8005647F6 /* PBGitSVBranchItem.m in Sources */, + D8FDDA6B114335E8005647F6 /* PBGitSVFolderItem.m in Sources */, + D8FDDA6C114335E8005647F6 /* PBGitSVOtherRevItem.m in Sources */, + D8FDDA6D114335E8005647F6 /* PBGitSVRemoteBranchItem.m in Sources */, + D8FDDA6E114335E8005647F6 /* PBGitSVRemoteItem.m in Sources */, + D8FDDA6F114335E8005647F6 /* PBGitSVStageItem.m in Sources */, + D8FDDA70114335E8005647F6 /* PBGitSVTagItem.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Images/Branch.acorn b/Images/Branch.acorn new file mode 100644 index 0000000000000000000000000000000000000000..6e6498df6eab81e4b3f55f82c173d3b2665f9111 GIT binary patch literal 1849 zcmZ`)2~ZPf6#h56i3#T-r*g<8Dg;TO96FVBII3U{AgCO5;*u<|nq=edMvN3IlBTtc zI;AQGgPmdv*s8TUV5uVtwcdENouN8bgrU`GZ3pd)Iu%R*L}bF){{QUm+y8ywizCyM>k5-`4;9|4P=I&}gLpsS)I&=kL}t2S0w-mtMS|ScgQxHq66UsEHI=COKPQQ;z(&)oyrf{gn6VDD8B}Cr;mRx5cz+n&%fm;f~~F<$uL= zb5}sXeGpC>ToK!vfh%C()K?MuS0Fr_&8EU-|4lxmz*Uxz4L9Pgh!(T*Dk~cXuE;YR zU{+&X_n$(N)@z@ zT%pwyEUUo-rWreX4fG*Hv{8l6+vw1)3E{^Cj&~d@mBh8sA>J@t29Ppw6bDJts76 zmnTLCZ!Q-9usipep*K+3jU>oZ4;7d8ZPq;K^BM999>iv-JwsO)UXTedeVc(lJDR}t z4|J_*IQ(Agk^blvEzPHk+f8vhM+#=2*?-;JcgUvb_FE_4-jjG^XkFS{2`R$4=hut9 z`;s2_U#?lxxGwF)+`qs6v#+81gHW^2@Mx@Z)DJtm`KfgwTi!MyQ9k_q+1OrYMAYk~$oDB_%HomS|ai(Qdbt zNR#8EqElW=6_va^uvK`+Mn~5bg-5>xw+-JpU-wnw^8Ad{j;@M z>6iA_e0jQ%r}=I?;amy-?eIr~=DK;G9jd3Z{`o@iG_CK%nHo_q+N&B{GM2q{&Xzg; zcROTH9g7Q7%K16hq!@~}5X=Mf!UC}vOpHmf z94r@G&i|O-&hO-R^H1~7@(1}p@rMPC0=uA1&>`rAeGdoE`M+?Ej2DlWcfrAb0cI5grfj_~!IB^UTd=ZfAF9e>*dq zGeuEA#29mrQ>$Fmd>Hq&W*d>(Y#kgP?x=Mzf9&qc1v7OJ4KN$MrEo|acmJ%S+wJZU zGE2z7B~}MI>+~|%)>?S)1@c8Q2@V<>U=o)gwl}mt*ijs7$ZX{pD8Un8Wf+V8)dg~n zO18JQO0(1H$ZV>84Y1y3Jnjf^Sebl}mwR)#%=_59cvi*Z-1Nl`nQH(`Xweg4@z&e& zz}nPDyxN<`?fY#M97;k4fkdZCqai$=c&*}qm8lPq-u&0#dVqJs_;mby0PyDL0=#RK z5Y^y%KFHFG|R}qje;pD^t< zq`{e!a+=}`09``){@u%cj6{tZXAQGmd)~kvNjP|f%>$EB=b#$!PP(kZpYqc`gTdMsNkqKk_|FgSq-}~Ns`+xs? z|5h4xG|P#_R}mhH@dZA ziPor%1W6mJ%8VvPOY5jyf+I>v!myHH)$}T=WPyn`aQOx;Q{o28869IPEg-BgKmkly z!d5dDb}qD(u?E7(7BOzQ*p@C8#imQ`g;LyKh4&~FAO!#r2rmGF5CBm4MBoGn;wAGu zG6rq?5Y$UA7?pVt9|GKV=m~t0P%lixs0^)0q?dl;7#>5WcB$faOdSq35hdO5^w)bt2hLr!zpQ9^(mdI(?ODRpl~@E&xE6f~G3CX2N4)RWztib6ERI0t+H#!m8*NukGY7UZKg+Nv61f@EM;W$RGAWT)X zp`R4*oUW(q)XiqnZ`+e;y)wKYhoUPxC}b7O98uJ-nM9#f=JJ&!Tb zs~7`E=yX;&tOv?OX`rpmubf`t z77%b9gqsFW#;q;DlQ3fJs|ej25MDz=g9^|3Z}K4pp0b2&coFYJNX*I8YU}&X6lB)J zUCnCP7M3{UN_a%%#Hi>=lc!95D<(EBUN|jb$x51~;pUX++-0pK^i%~dEK=vtoSrax zN?p$AjV6j^DNVkfsPeSPe9BsZM~*{z8jR9$L>XC47^)~aV>WOVcrXdQ8J6bYmMRzx zwTRRaEL(wxk8^hS8jQJwad#tU^()FJ8G{O+UgIK{M)8FaBRjiF#084(Y9jF|<;04NCJCu+Y?RDyoYxp4 ze1-&D9^J=%7yB6ET zqFAvVN8aH2)rk?GHLGK}7uOPLN?iQRcV_t&zdngo_|6*F!7~c~V`9AF`n41G&a{8F z-My+09^5zBYWf&InP{^G+G<7J2k_}pc{hb|b?6L-_^jp%JK=(4fv&&lh<U`n zjMW2{s9XKZI@VSk!H-QMbJ9<3vg|)v$gB8iB=vYP|HG;GFPZJrx9@c@IWP7Ip2&Xq z>U)b{589&|o--`3i>ZwX8}S|4IJh(GiR<0MndTjlw{Mh<4BWBY4}J_>Ng$6Ks=UBQ_Q$SR|m3CW7L}vpGn?b}dQCEzc@L^)HYF4M zMkQvd2FBWSHX8P#|0vSjq|0hHtfFlHIfj|pL1(0eKg^;d;6iSE@gdeG2q9wG%XST=G@AXW~ zd_EWL(IG&^`Hqp-X06K>VCjqxmu{Zg74lwQmL4gxuBSnlzz zHaCk6e*=o)Eo+SO5@I;D>NeQ8VLAdtN=Oi>@i_TYmjY-Lj?ZtIi#2*M&2X!-nczI{ zf%oCyb8f?0hipK$ATh)yjPDEUAIJyf3-XG%J81d?IhkqDx&i;n00000NkvXXu0mjf D@lDac literal 0 HcmV?d00001 diff --git a/Images/StageView.png b/Images/StageView.png new file mode 100644 index 0000000000000000000000000000000000000000..36ff76474f642e737f98b11267ab7ad9733cccd5 GIT binary patch literal 271 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~q!3HGX7W?Z1Db50q$YKTtZeb8+WSBKa0w{RU z)5S4FLv(5ILEdHq0qZOIOTErq;FVZ#`^(kPU#|>4B=W?~U1+?dOmz7Zk%hu8Ms|AX z>N1^6r>tQ$-p%0u;L5D^iRWf3 z9QWPu?0k=TLHz6xC&}E7)IUyV*YB+6%{cPxo2=ZQ7QV#>vCYXzvaO=V;s<(W?Grks zp1V$TWf|1qG%eorP`4pVoPR{E4eado71;uiRa0E23`H zny3|HwurPiQRAOPT!!(_k}=&-!KraDwnd|3Y#N=Is8gnkO7~ikluX~t^}fFE_x-+m zzxREw+H9aXUM9PS2vAHY3JMla2nh|F7>-9oW@HdrGp)v>@>p_p9;2}sDHC5tu^i2q zs`M+R%%{1gyu7;W0!Ku)Zw7Cj7RK_XK<( z^XT+_A)Mv)X_+a~w9E!o1hNJT;dquJjlA7VX+ODxI*|7q4o8TR7}E)HID(ags=Aia z@L=N(=#5em#TK5dhT_s19_miAcHnS?Dv5yqpE(dZ*oTI}1P?{mBXDWfL?xkMc%Cs9 zldPULIY$vni?NzwAxV&uC?gFP3P5nO!-42pDhpjb)^eQu9q=T5{Angn?%mZvr2A#FZxxZ4uOJdXKgQn;fcO82^) z0dz}AxDV1NgFoZmoxq;`z>`&)8q%bvav6(>SL5Lt7|n1r50A8% z(Nd)v1Ick}eA2jJU#~&V<&3WzdAqn|iH0$$@cA~6X60nzJ`lYhdAL5MS<*ST?Xfz2 zI9D|LQkKOZ5MA+tCAGlAMxAriLk63FA>*9WS_HOpRx=(95o6N^U z27jjek32d2jUsYbdM?R@#??PpwHDWAF50srt?y~e`T5no2kLregdJOTD`$CAPoLO@ zxN=+*y`0wCetp%8t=aCrQyVuk+j~MX|7uw=>&XU1o4O{u_tc;3od%Y+zR-E=TAU%R zm$x6Tk4ro@6#ne*&DG-8D_3uRcdzz%s%yjf@9))irbf`#_G{i-zafbQD|>O|jhd#` z4+Ll`OM|7BK6jqD{M8Mt!rN?~~LmqQENEn#b;9;q|VoD3Zh45Y0MT6^Weq6cVK_?f0qxj>%w z{Bh71L~QMWqy35-io&PvF6GFeRXiAV>W!O&1rzMMB;!E>$O5@Q1uB6Sn1CHLf+o-m zT7U;xf#?J`(HUqmx(IzARiPGi8`^>%K|9b3XfN7_{)$CmahL>~j?KlgvBg*kR*F># rR}1aJO~UQM&xMDChlL%YGLcqf6tN->HZU9l-^K46SubC&entF$Po;Ds literal 0 HcmV?d00001 diff --git a/Images/Tag.png b/Images/Tag.png new file mode 100644 index 0000000000000000000000000000000000000000..4d72ca61d5c8625b27d5775976203ae9851a5df6 GIT binary patch literal 527 zcmV+q0`UEbP)9E_>ky-rmma%$v7!D+YrBu?ZoT z@ktmbWI^6@NSKrrOgOGvvwVO1Sgmq{^)M2fKzuj0NIRNzAMneGy4^$SbUHPVq(KsB zBCR}ODE{^0j$Wp#dXxSKTCr63wxm?T3>N`^1_6SR62HLSTwiTt26G6Rv4s-Y z`GI{te@6Sc6lu2w1$IwJ@w!5O3ROv98sH}x1MrND^|AJVAK({gqV5G>`UiY~qpTrw RkqQ6+002ovPDHLkV1h(9;P?Ol literal 0 HcmV?d00001 diff --git a/PBGitHistoryView.xib b/PBGitHistoryView.xib index 1bdcd50..43cdaca 100644 --- a/PBGitHistoryView.xib +++ b/PBGitHistoryView.xib @@ -3,7 +3,7 @@ 1050 10C540 - 732 + 759 1038.25 458.00 @@ -15,12 +15,13 @@ YES - 732 - 732 + 759 + 759 YES + YES @@ -101,8 +102,8 @@ PBWebHistoryController - - 274 + + 4370 YES @@ -149,7 +150,7 @@ - 274 + 4370 YES @@ -164,7 +165,7 @@ YES - 256 + 4352 {852, 194} YES @@ -405,7 +406,7 @@ - 18 + 4114 {{0, 212}, {852, 186}} @@ -414,12 +415,12 @@ 1 - 274 + 4370 YES - 274 + 4370 YES @@ -484,17 +485,17 @@ Item 2 - 256 + 4352 YES - 274 + 4370 YES - 276 + 4372 YES @@ -504,7 +505,7 @@ YES - 256 + 4352 {191, 186} YES @@ -598,7 +599,7 @@ - 274 + 4370 YES @@ -609,7 +610,7 @@ 2322 - {543, 0} + {543, 112} @@ -913,6 +914,7 @@ {852, 432} + NSView @@ -936,7 +938,6 @@ 1E431E79-1591-49E7-9E17-49497CA4622A 7FFB691C-2D2F-49A9-997F-AE1AE8BFF3F1 86360841-A2B1-4802-845A-AE424521FE99 - 99C2C9EB-AE16-42A9-BE52-46CE903E9AF9 NSToolbarFlexibleSpaceItem NSToolbarSeparatorItem @@ -950,9 +951,11 @@ View selector - + 268 {{0, 14}, {87, 25}} + + 3 YES @@ -1009,9 +1012,11 @@ - + 265 {{0, 14}, {183, 22}} + + YES 343014976 @@ -1093,9 +1098,11 @@ Create Branch - + 268 {{21, 14}, {40, 25}} + + YES -2080244224 @@ -1126,94 +1133,6 @@ YES 0 - - - 99C2C9EB-AE16-42A9-BE52-46CE903E9AF9 - - Branch - Branch - - - - 268 - {{0, 14}, {134, 26}} - YES - - -2076049856 - 2048 - - - 109199615 - 1 - - - 400 - 75 - - - master - - 1048576 - 2147483647 - 1 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - _popUpItemAction: - - - YES - - OtherViews - - YES - - - - Item 2 - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - Item 3 - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - 1 - YES - YES - 2 - - - - - - {134, 25} - {134, 26} - YES - YES - 0 - YES - 0 - NSToolbarFlexibleSpaceItem @@ -1237,8 +1156,14 @@ 1048576 2147483647 - - + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + @@ -1264,8 +1189,8 @@ 1048576 2147483647 - - + + @@ -1274,7 +1199,6 @@ YES - @@ -1283,7 +1207,6 @@ YES - @@ -1743,14 +1666,6 @@ 260 - - - branchPopUp - - - - 268 - predicate3: filterPredicate @@ -2181,7 +2096,6 @@ - History Toolbar @@ -2265,59 +2179,6 @@ - - 114 - - - YES - - - - - - 119 - - - YES - - - - - - 120 - - - YES - - - - - - 121 - - - YES - - - - - - - - 124 - - - - - 123 - - - - - 122 - - - 287 @@ -2344,19 +2205,10 @@ 113.IBEditorWindowLastContentRect 113.IBPluginDependency 113.editorWindowContentRectSynchronizationRect - 114.IBPluginDependency 116.IBPluginDependency 117.IBPluginDependency 118.IBPluginDependency - 119.IBPluginDependency 12.IBPluginDependency - 120.IBPluginDependency - 121.IBEditorWindowLastContentRect - 121.IBPluginDependency - 121.editorWindowContentRectSynchronizationRect - 122.IBPluginDependency - 123.IBPluginDependency - 124.IBPluginDependency 13.IBPluginDependency 14.IBPluginDependency 15.CustomClassName @@ -2431,7 +2283,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{312, 366}, {616, 227}} + {{312, 424}, {616, 169}} com.apple.InterfaceBuilder.CocoaPlugin {{132, 614}, {616, 0}} com.apple.InterfaceBuilder.CocoaPlugin @@ -2440,15 +2292,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{725, 616}, {134, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - {{848, 458}, {116, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin PBQLOutlineView com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2522,7 +2365,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{321, 67}, {852, 432}} + {{486, 542}, {852, 432}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2557,6 +2400,13 @@ YES + + NSOutlineView + + IBProjectSource + NSOutlineViewExt.h + + PBCollapsibleSplitView PBNiceSplitView @@ -2596,12 +2446,14 @@ YES createBranch: + createTag: openFilesAction: openSelectedFile: refresh: setDetailedView: setRawView: setTreeView: + showAddRemoteSheet: showCommitsFromTree: showInFinderAction: toggleQuickView: @@ -2618,6 +2470,8 @@ id id id + id + id @@ -2705,12 +2559,40 @@ YES changeBranch: + checkout: + cherryPick: + copyPatch: + copySHA: createBranch: + createTag: + fetchRemote: + merge: + pullRemote: + pushDefaultRemoteForRef: + pushToRemote: + pushUpdatesToRemote: + rebaseActiveBranch: + rebaseHeadBranch: + showTagInfoSheet: YES NSMenuItem PBRefMenuItem + PBRefMenuItem + PBRefMenuItem + PBRefMenuItem + PBRefMenuItem + PBRefMenuItem + PBRefMenuItem + PBRefMenuItem + PBRefMenuItem + PBRefMenuItem + PBRefMenuItem + PBRefMenuItem + PBRefMenuItem + PBRefMenuItem + PBRefMenuItem @@ -2959,14 +2841,6 @@ AppKit.framework/Headers/NSMenuItem.h - - NSMenuItemCell - NSButtonCell - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItemCell.h - - NSObject @@ -3316,14 +3190,6 @@ AppKit.framework/Headers/NSPopUpButton.h - - NSPopUpButtonCell - NSMenuItemCell - - IBFrameworkSource - AppKit.framework/Headers/NSPopUpButtonCell.h - - NSResponder @@ -3562,6 +3428,7 @@ 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx @@ -3577,5 +3444,18 @@ YES GitX.xcodeproj 3 + + YES + + YES + AddBranchTemplate + NSQuickLookTemplate + + + YES + {25, 13} + {19, 11} + + diff --git a/PBGitRevSpecifier.h b/PBGitRevSpecifier.h index bc2724c..7c822ab 100644 --- a/PBGitRevSpecifier.h +++ b/PBGitRevSpecifier.h @@ -23,6 +23,7 @@ - (PBGitRef *) ref; - (BOOL) hasPathLimiter; - (BOOL) hasLeftRight; +- (NSString *) title; - (BOOL) isEqualTo: (PBGitRevSpecifier*) other; - (BOOL) isAllBranchesRev; diff --git a/PBGitRevSpecifier.m b/PBGitRevSpecifier.m index 398a175..910140f 100644 --- a/PBGitRevSpecifier.m +++ b/PBGitRevSpecifier.m @@ -85,6 +85,28 @@ return [parameters componentsJoinedByString:@" "]; } +- (NSString *) title +{ + NSString *title = nil; + + if ([self.description isEqualToString:@"HEAD"]) + title = @"detached HEAD"; + else if ([self isSimpleRef]) + title = [[self ref] shortName]; + else if ([self.description hasPrefix:@"-S"]) + title = [self.description substringFromIndex:[@"-S" length]]; + else if ([self.description hasPrefix:@"HEAD -- "]) + title = [self.description substringFromIndex:[@"HEAD -- " length]]; + else if ([self.description hasPrefix:@"-- "]) + title = [self.description substringFromIndex:[@"-- " length]]; + else if ([self.description hasPrefix:@"--left-right "]) + title = [self.description substringFromIndex:[@"--left-right " length]]; + else + title = self.description; + + return [NSString stringWithFormat:@"\"%@\"", title]; +} + - (BOOL) hasPathLimiter; { for (NSString* param in parameters) diff --git a/PBGitSVBranchItem.h b/PBGitSVBranchItem.h new file mode 100644 index 0000000..c5e4538 --- /dev/null +++ b/PBGitSVBranchItem.h @@ -0,0 +1,19 @@ +// +// PBGitSVBranchItem.h +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import +#import "PBSourceViewItem.h" + + +@interface PBGitSVBranchItem : PBSourceViewItem { + +} + ++ (id)branchItemWithRevSpec:(PBGitRevSpecifier *)revSpecifier; + +@end diff --git a/PBGitSVBranchItem.m b/PBGitSVBranchItem.m new file mode 100644 index 0000000..6723096 --- /dev/null +++ b/PBGitSVBranchItem.m @@ -0,0 +1,33 @@ +// +// PBGitSVBranchItem.m +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import "PBGitSVBranchItem.h" + + +@implementation PBGitSVBranchItem + + ++ (id)branchItemWithRevSpec:(PBGitRevSpecifier *)revSpecifier +{ + PBGitSVBranchItem *item = [self itemWithTitle:[[revSpecifier description] lastPathComponent]]; + item.revSpecifier = revSpecifier; + + return item; +} + + +- (NSImage *) icon +{ + static NSImage *branchImage = nil; + if (!branchImage) + branchImage = [NSImage imageNamed:@"Branch.png"]; + + return branchImage; +} + +@end diff --git a/PBGitSVFolderItem.h b/PBGitSVFolderItem.h new file mode 100644 index 0000000..5d5882d --- /dev/null +++ b/PBGitSVFolderItem.h @@ -0,0 +1,19 @@ +// +// PBGitSVFolderItem.h +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import +#import "PBSourceViewItem.h" + + +@interface PBGitSVFolderItem : PBSourceViewItem { + +} + ++ (id)folderItemWithTitle:(NSString *)title; + +@end diff --git a/PBGitSVFolderItem.m b/PBGitSVFolderItem.m new file mode 100644 index 0000000..8332902 --- /dev/null +++ b/PBGitSVFolderItem.m @@ -0,0 +1,34 @@ +// +// PBGitSVFolderItem.m +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import "PBGitSVFolderItem.h" + + +@implementation PBGitSVFolderItem + + ++ (id)folderItemWithTitle:(NSString *)title +{ + PBGitSVFolderItem *item = [self itemWithTitle:title]; + + return item; +} + + +- (NSImage *) icon +{ + static NSImage *folderImage = nil; + if (!folderImage) { + folderImage = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kGenericFolderIcon)]; + [folderImage setSize:NSMakeSize(16,16)]; + } + + return folderImage; +} + +@end diff --git a/PBGitSVOtherRevItem.h b/PBGitSVOtherRevItem.h new file mode 100644 index 0000000..f3e6711 --- /dev/null +++ b/PBGitSVOtherRevItem.h @@ -0,0 +1,19 @@ +// +// PBGitSVOtherRevItem.h +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import +#import "PBSourceViewItem.h" + + +@interface PBGitSVOtherRevItem : PBSourceViewItem { + +} + ++ (id)otherItemWithRevSpec:(PBGitRevSpecifier *)revSpecifier; + +@end diff --git a/PBGitSVOtherRevItem.m b/PBGitSVOtherRevItem.m new file mode 100644 index 0000000..5cd280b --- /dev/null +++ b/PBGitSVOtherRevItem.m @@ -0,0 +1,34 @@ +// +// PBGitSVOtherRevItem.m +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import "PBGitSVOtherRevItem.h" +#import "PBGitRevSpecifier.h" + + +@implementation PBGitSVOtherRevItem + + ++ (id)otherItemWithRevSpec:(PBGitRevSpecifier *)revSpecifier +{ + PBGitSVOtherRevItem *item = [self itemWithTitle:[revSpecifier title]]; + item.revSpecifier = revSpecifier; + + return item; +} + + +- (NSImage *) icon +{ + static NSImage *otherRevImage = nil; + if (!otherRevImage) + otherRevImage = [NSImage imageNamed:@"Branch.png"]; + + return otherRevImage; +} + +@end diff --git a/PBGitSVRemoteBranchItem.h b/PBGitSVRemoteBranchItem.h new file mode 100644 index 0000000..e04fb33 --- /dev/null +++ b/PBGitSVRemoteBranchItem.h @@ -0,0 +1,19 @@ +// +// PBGitSVRemoteBranchItem.h +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import +#import "PBSourceViewItem.h" + + +@interface PBGitSVRemoteBranchItem : PBSourceViewItem { + +} + ++ (id)remoteBranchItemWithRevSpec:(PBGitRevSpecifier *)revSpecifier; + +@end diff --git a/PBGitSVRemoteBranchItem.m b/PBGitSVRemoteBranchItem.m new file mode 100644 index 0000000..d514f52 --- /dev/null +++ b/PBGitSVRemoteBranchItem.m @@ -0,0 +1,33 @@ +// +// PBGitSVRemoteBranchItem.m +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import "PBGitSVRemoteBranchItem.h" + + +@implementation PBGitSVRemoteBranchItem + + ++ (id)remoteBranchItemWithRevSpec:(PBGitRevSpecifier *)revSpecifier +{ + PBGitSVRemoteBranchItem *item = [self itemWithTitle:[[revSpecifier description] lastPathComponent]]; + item.revSpecifier = revSpecifier; + + return item; +} + + +- (NSImage *) icon +{ + static NSImage *remoteBranchImage = nil; + if (!remoteBranchImage) + remoteBranchImage = [NSImage imageNamed:@"RemoteBranch.png"]; + + return remoteBranchImage; +} + +@end diff --git a/PBGitSVRemoteItem.h b/PBGitSVRemoteItem.h new file mode 100644 index 0000000..a64084c --- /dev/null +++ b/PBGitSVRemoteItem.h @@ -0,0 +1,19 @@ +// +// PBGitSVRemoteItem.h +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import +#import "PBSourceViewItem.h" + + +@interface PBGitSVRemoteItem : PBSourceViewItem { + +} + ++ (id)remoteItemWithTitle:(NSString *)title; + +@end diff --git a/PBGitSVRemoteItem.m b/PBGitSVRemoteItem.m new file mode 100644 index 0000000..4ce251d --- /dev/null +++ b/PBGitSVRemoteItem.m @@ -0,0 +1,41 @@ +// +// PBGitSVRemoteItem.m +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import "PBGitSVRemoteItem.h" +#import "PBGitRef.h" + + +@implementation PBGitSVRemoteItem + + ++ (id)remoteItemWithTitle:(NSString *)title +{ + PBGitSVRemoteItem *item = [self itemWithTitle:title]; + + return item; +} + + +- (NSImage *) icon +{ + static NSImage *networkImage = nil; + if (!networkImage) { + networkImage = [NSImage imageNamed:NSImageNameNetwork]; + [networkImage setSize:NSMakeSize(16,16)]; + } + + return networkImage; +} + + +- (PBGitRef *) ref +{ + return [PBGitRef refFromString:[kGitXRemoteRefPrefix stringByAppendingString:self.title]]; +} + +@end diff --git a/PBGitSVStageItem.h b/PBGitSVStageItem.h new file mode 100644 index 0000000..8b37c91 --- /dev/null +++ b/PBGitSVStageItem.h @@ -0,0 +1,19 @@ +// +// PBGitSVStageItem.h +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import +#import "PBSourceViewItem.h" + + +@interface PBGitSVStageItem : PBSourceViewItem { + +} + ++ (id) stageItem; + +@end diff --git a/PBGitSVStageItem.m b/PBGitSVStageItem.m new file mode 100644 index 0000000..3ae1725 --- /dev/null +++ b/PBGitSVStageItem.m @@ -0,0 +1,32 @@ +// +// PBGitSVStageItem.m +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import "PBGitSVStageItem.h" + + +@implementation PBGitSVStageItem + + ++ (id) stageItem +{ + PBGitSVStageItem *item = [self itemWithTitle:@"Stage"]; + + return item; +} + + +- (NSImage *) icon +{ + static NSImage *stageImage = nil; + if (!stageImage) + stageImage = [NSImage imageNamed:@"StageView"]; + + return stageImage; +} + +@end diff --git a/PBGitSVTagItem.h b/PBGitSVTagItem.h new file mode 100644 index 0000000..a8e2aeb --- /dev/null +++ b/PBGitSVTagItem.h @@ -0,0 +1,19 @@ +// +// PBGitSVTagItem.h +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import +#import "PBSourceViewItem.h" + + +@interface PBGitSVTagItem : PBSourceViewItem { + +} + ++ (id)tagItemWithRevSpec:(PBGitRevSpecifier *)revSpecifier; + +@end diff --git a/PBGitSVTagItem.m b/PBGitSVTagItem.m new file mode 100644 index 0000000..818fde6 --- /dev/null +++ b/PBGitSVTagItem.m @@ -0,0 +1,33 @@ +// +// PBGitSVTagItem.m +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import "PBGitSVTagItem.h" + + +@implementation PBGitSVTagItem + + ++ (id)tagItemWithRevSpec:(PBGitRevSpecifier *)revSpecifier +{ + PBGitSVTagItem *item = [self itemWithTitle:[[revSpecifier description] lastPathComponent]]; + item.revSpecifier = revSpecifier; + + return item; +} + + +- (NSImage *) icon +{ + static NSImage *tagImage = nil; + if (!tagImage) + tagImage = [NSImage imageNamed:@"Tag.png"]; + + return tagImage; +} + +@end diff --git a/PBGitSidebarController.h b/PBGitSidebarController.h index 9bc7581..8e2677a 100644 --- a/PBGitSidebarController.h +++ b/PBGitSidebarController.h @@ -9,7 +9,7 @@ #import #import "PBViewController.h" -@class PBSourceViewAction, PBSourceViewItem; +@class PBSourceViewItem; @interface PBGitSidebarController : PBViewController { IBOutlet NSWindow *window; @@ -18,9 +18,9 @@ NSMutableArray *items; /* Specific things */ - PBSourceViewAction *commitAction; + PBSourceViewItem *stage; - PBSourceViewItem *branches, *remotes, *tags, *custom; + PBSourceViewItem *branches, *remotes, *tags, *others; } @property(readonly) NSMutableArray *items; diff --git a/PBGitSidebarController.m b/PBGitSidebarController.m index fd31fbc..c537e39 100644 --- a/PBGitSidebarController.m +++ b/PBGitSidebarController.m @@ -7,9 +7,8 @@ // #import "PBGitSidebarController.h" -#import "PBSourceViewItem.h" +#import "PBSourceViewItems.h" #import "NSOutlineViewExt.h" -#import "PBSourceViewAction.h" @interface PBGitSidebarController () @@ -75,7 +74,7 @@ - (void)addRevSpec:(PBGitRevSpecifier *)rev { if (![rev isSimpleRef]) { - [custom addChild:[PBSourceViewItem itemWithRevSpec:rev]]; + [others addChild:[PBSourceViewItem itemWithRevSpec:rev]]; return; } @@ -103,7 +102,7 @@ return; } - if (item == commitAction) + if (item == stage) [[repository windowController] showCommitView:self]; /* ... */ @@ -129,51 +128,42 @@ } // -// The next two methods are necessary to hide the triangle for uncollapsible items -// That is, items which should always be displayed, such as the action items. -// -- (BOOL)outlineView:(NSOutlineView *)outlineView shouldCollapseItem:(id)item +// The next method is necessary to hide the triangle for uncollapsible items +// That is, items which should always be displayed, such as the Project group. +// This also moves the group item to the left edge. +- (BOOL) outlineView:(NSOutlineView *)outlineView shouldShowOutlineCellForItem:(id)item { - return !([item isUncollapsible]); + return ![item isUncollapsible]; } -- (void)outlineView:(NSOutlineView *)outlineView willDisplayOutlineCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item -{ - [cell setTransparent:[item isUncollapsible]]; -} - - (void)populateList { - PBSourceViewItem *actions = [PBSourceViewItem groupItemWithTitle:@"Actions"]; + PBSourceViewItem *project = [PBSourceViewItem groupItemWithTitle:[repository projectName]]; + project.isUncollapsible = YES; - actions.isUncollapsible = YES; - - commitAction = [PBSourceViewAction itemWithTitle:@"Index / Commit"]; - commitAction.icon = [NSImage imageNamed:@"CommitViewTemplate"]; - [actions addChild:commitAction]; + stage = [PBGitSVStageItem stageItem]; + [project addChild:stage]; branches = [PBSourceViewItem groupItemWithTitle:@"Branches"]; remotes = [PBSourceViewItem groupItemWithTitle:@"Remotes"]; tags = [PBSourceViewItem groupItemWithTitle:@"Tags"]; - custom = [PBSourceViewItem groupItemWithTitle:@"Custom"]; + others = [PBSourceViewItem groupItemWithTitle:@"Other"]; for (PBGitRevSpecifier *rev in repository.branches) [self addRevSpec:rev]; - //[items addObject:actions]; - + [items addObject:project]; [items addObject:branches]; [items addObject:remotes]; [items addObject:tags]; - [items addObject:custom]; + [items addObject:others]; [sourceView reloadData]; + [sourceView expandItem:project]; [sourceView expandItem:branches expandChildren:YES]; - [sourceView expandItem:actions]; + [sourceView expandItem:remotes]; - NSAssert(branches == [sourceView itemAtRow:0], @"First item is not the Branches"); [sourceView reloadItem:nil reloadChildren:YES]; - } #pragma mark NSOutlineView Datasource methods diff --git a/PBGitSidebarView.xib b/PBGitSidebarView.xib index c264858..57a3096 100644 --- a/PBGitSidebarView.xib +++ b/PBGitSidebarView.xib @@ -1,24 +1,26 @@ - + 1050 - 9L31a - 677 - 949.54 - 353.00 + 10C540 + 759 + 1038.25 + 458.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 759 + YES - - + YES - com.apple.InterfaceBuilderKit com.apple.InterfaceBuilder.CocoaPlugin YES - + YES @@ -36,24 +38,6 @@ NSApplication - - 15 - 2 - {{196, 106}, {186, 404}} - 603979776 - Window - NSWindow - - {3.40282e+38, 3.40282e+38} - - - 274 - {186, 404} - - - {{0, 0}, {1280, 1002}} - {3.40282e+38, 3.40282e+38} - 4370 @@ -67,7 +51,7 @@ 4352 - {151, 352} + {153, 354} YES @@ -78,16 +62,16 @@ YES - 1.500000e+02 - 1.600000e+01 - 1.000000e+03 + 150 + 16 + 1000 - 75628032 - 0 + 75628096 + 2048 LucidaGrande - 1.100000e+01 + 11 3100 @@ -105,13 +89,13 @@ - 337772096 + 69336641 2048 Text Cell LucidaGrande - 1.300000e+01 - 1044 + 11 + 16 @@ -120,7 +104,7 @@ controlBackgroundColor 3 - MC42NjY2NjY2OQA + MC42NjY2NjY2NjY3AA @@ -130,20 +114,20 @@ - 3 + 1 YES - YES - 3.000000e+00 + 3 + 0.0 6 System _sourceListBackgroundColor 1 - MC44MzkyMTU3IDAuODY2NjY2NjcgMC44OTgwMzkyMgA + MC44MzkyMTU2OTU5IDAuODY2NjY2Njc0NiAwLjg5ODAzOTIyMTgAA @@ -155,14 +139,18 @@ MC41AA - 2.000000e+01 - -767557632 + 20 + 306184192 + + 4 15 0 YES 1 - 1.400000e+01 + 1 + NO + 12 {153, 354} @@ -179,17 +167,17 @@ _doScroller: - 9.969879e-01 + 0.99698790000000004 - 256 + -2147483392 {{-100, -100}, {196, 15}} 1 _doScroller: - 5.714286e-01 + 0.57142859999999995 {153, 354} @@ -201,21 +189,10 @@ QSAAAEEgAABBoAAAQaAAAA - - YES - YES - - - window - - - - 5 - view @@ -254,44 +231,28 @@ YES 0 - - YES - + -2 - - RmlsZSdzIE93bmVyA + + File's Owner -1 - + First Responder -3 - + Application - - 2 - - - YES - - - - - - 3 - - - 8 @@ -301,7 +262,7 @@ - + 9 @@ -336,30 +297,18 @@ - - 21 - - - YES - + YES - -1.IBPluginDependency - -2.IBPluginDependency -3.IBPluginDependency 10.IBPluginDependency 11.IBPluginDependency 13.IBPluginDependency 16.CustomClassName 16.IBPluginDependency - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - 2.IBWindowTemplateEditedContentRect - 2.NSWindowTemplate.visibleAtLaunch - 3.IBPluginDependency 8.IBEditorWindowLastContentRect 8.IBPluginDependency 9.IBPluginDependency @@ -367,18 +316,11 @@ YES com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilderKit - com.apple.InterfaceBuilderKit com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin PBIconAndTextCell com.apple.InterfaceBuilder.CocoaPlugin - {{297, 477}, {186, 404}} - com.apple.InterfaceBuilder.CocoaPlugin - {{297, 477}, {186, 404}} - - com.apple.InterfaceBuilder.CocoaPlugin {{105, 545}, {153, 354}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -386,9 +328,7 @@ YES - - YES - + YES @@ -396,9 +336,7 @@ YES - - YES - + YES @@ -409,12 +347,19 @@ YES + + NSOutlineView + + IBProjectSource + NSOutlineViewExt.h + + PBGitSidebarController PBViewController YES - + YES sourceView window @@ -451,8 +396,561 @@ + + YES + + NSActionCell + NSCell + + IBFrameworkSource + AppKit.framework/Headers/NSActionCell.h + + + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSCell + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSCell.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + Sparkle.framework/Headers/SUAppcast.h + + + + NSObject + + IBFrameworkSource + Sparkle.framework/Headers/SUUpdater.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSOutlineView + NSTableView + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSScrollView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSScrollView.h + + + + NSScroller + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSScroller.h + + + + NSTableColumn + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableColumn.h + + + + NSTableView + NSControl + + + + NSTextFieldCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSTextFieldCell.h + + + + NSToolbar + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbar.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSViewController + NSResponder + + view + NSView + + + IBFrameworkSource + AppKit.framework/Headers/NSViewController.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES GitX.xcodeproj 3 diff --git a/PBRefController.h b/PBRefController.h index fb11cdb..29ea030 100644 --- a/PBRefController.h +++ b/PBRefController.h @@ -42,8 +42,5 @@ - (NSArray *) menuItemsForRef:(PBGitRef *)ref; - (NSArray *) menuItemsForCommit:(PBGitCommit *)commit; -- (void) changeBranch:(NSMenuItem *)sender; -- (void) selectCurrentBranch; -- (void) updateBranchMenu; @end diff --git a/PBRefController.m b/PBRefController.m index e82a52e..adb4630 100644 --- a/PBRefController.m +++ b/PBRefController.m @@ -19,18 +19,14 @@ [commitList registerForDraggedTypes:[NSArray arrayWithObject:@"PBGitRef"]]; [historyController addObserver:self forKeyPath:@"repository.branches" options:0 context:@"branchChange"]; [historyController addObserver:self forKeyPath:@"repository.currentBranch" options:0 context:@"currentBranchChange"]; - [self updateBranchMenu]; - [self selectCurrentBranch]; } - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { if ([(NSString *)context isEqualToString: @"branchChange"]) { [commitController rearrangeObjects]; - [self updateBranchMenu]; } else if ([(NSString *)context isEqualToString:@"currentBranchChange"]) { - [self selectCurrentBranch]; [commitController rearrangeObjects]; } else { @@ -363,116 +359,4 @@ return YES; } -# pragma mark Branches menu - -- (void) updateBranchMenu -{ - if (!branchPopUp) - return; - - NSMutableArray *localBranches = [NSMutableArray array]; - NSMutableArray *remoteBranches = [NSMutableArray array]; - NSMutableArray *tags = [NSMutableArray array]; - NSMutableArray *other = [NSMutableArray array]; - - NSMenu *menu = [[NSMenu alloc] initWithTitle:@"Branch menu"]; - for (PBGitRevSpecifier *rev in historyController.repository.branches) - { - if (![rev isSimpleRef]) - { - [other addObject:rev]; - continue; - } - - NSString *ref = [rev simpleRef]; - - if ([ref hasPrefix:@"refs/heads"]) - [localBranches addObject:rev]; - else if ([ref hasPrefix:@"refs/tags"]) - [tags addObject:rev]; - else if ([ref hasPrefix:@"refs/remote"]) - [remoteBranches addObject:rev]; - } - - for (PBGitRevSpecifier *rev in localBranches) - { - NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:[rev description] action:@selector(changeBranch:) keyEquivalent:@""]; - [item setRepresentedObject:rev]; - [item setTarget:self]; - [menu addItem:item]; - } - - [menu addItem:[NSMenuItem separatorItem]]; - - // Remotes - NSMenu *remoteMenu = [[NSMenu alloc] initWithTitle:@"Remotes"]; - NSMenu *currentMenu = NULL; - for (PBGitRevSpecifier *rev in remoteBranches) - { - NSString *ref = [rev simpleRef]; - NSArray *components = [ref componentsSeparatedByString:@"/"]; - - NSString *remoteName = [components objectAtIndex:2]; - NSString *branchName = [[components subarrayWithRange:NSMakeRange(3, [components count] - 3)] componentsJoinedByString:@"/"]; - - if (![[currentMenu title] isEqualToString:remoteName]) - { - currentMenu = [[NSMenu alloc] initWithTitle:remoteName]; - NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:remoteName action:NULL keyEquivalent:@""]; - [item setSubmenu:currentMenu]; - [remoteMenu addItem:item]; - } - - NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:branchName action:@selector(changeBranch:) keyEquivalent:@""]; - [item setTarget:self]; - [item setRepresentedObject:rev]; - [currentMenu addItem:item]; - } - - NSMenuItem *remoteItem = [[NSMenuItem alloc] initWithTitle:@"Remotes" action:NULL keyEquivalent:@""]; - [remoteItem setSubmenu:remoteMenu]; - [menu addItem:remoteItem]; - - // Tags - NSMenu *tagMenu = [[NSMenu alloc] initWithTitle:@"Tags"]; - for (PBGitRevSpecifier *rev in tags) - { - NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:[rev description] action:@selector(changeBranch:) keyEquivalent:@""]; - [item setTarget:self]; - [item setRepresentedObject:rev]; - [tagMenu addItem:item]; - } - - NSMenuItem *tagItem = [[NSMenuItem alloc] initWithTitle:@"Tags" action:NULL keyEquivalent:@""]; - [tagItem setSubmenu:tagMenu]; - [menu addItem:tagItem]; - - - // Others - [menu addItem:[NSMenuItem separatorItem]]; - - for (PBGitRevSpecifier *rev in other) - { - NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:[rev description] action:@selector(changeBranch:) keyEquivalent:@""]; - [item setRepresentedObject:rev]; - [item setTarget:self]; - [menu addItem:item]; - } - - [[branchPopUp cell] setMenu: menu]; -} - -- (void) changeBranch:(NSMenuItem *)sender -{ - PBGitRevSpecifier *rev = [sender representedObject]; - historyController.repository.currentBranch = rev; -} - -- (void) selectCurrentBranch -{ - PBGitRevSpecifier *rev = historyController.repository.currentBranch; - if (rev) - [branchPopUp setTitle:[rev description]]; -} - @end diff --git a/PBSourceViewItem.h b/PBSourceViewItem.h index 1748f5a..399f8e7 100644 --- a/PBSourceViewItem.h +++ b/PBSourceViewItem.h @@ -9,6 +9,7 @@ #import @class PBGitRevSpecifier; +@class PBGitRef; @interface PBSourceViewItem : NSObject { NSMutableArray *children; @@ -26,6 +27,7 @@ + (id)itemWithTitle:(NSString *)title; - (void)addChild:(PBSourceViewItem *)child; +- (void)removeChild:(PBSourceViewItem *)child; // This adds the ref to the path, which should match the item's title, // so "refs/heads/pu/pb/sidebar" would have the path [@"pu", @"pb", @"sidebare"] @@ -33,11 +35,12 @@ - (void)addRev:(PBGitRevSpecifier *)revSpecifier toPath:(NSArray *)path; - (PBSourceViewItem *)findRev:(PBGitRevSpecifier *)rev; -- (NSImage *)icon; +- (PBGitRef *) ref; @property(retain) NSString *title; @property(readonly) NSMutableArray *children; @property(assign) BOOL isGroupItem, isUncollapsible; @property(retain) PBGitRevSpecifier *revSpecifier; @property(retain) PBSourceViewItem *parent; +@property(readonly) NSImage *icon; @end diff --git a/PBSourceViewItem.m b/PBSourceViewItem.m index b7f4045..5e81501 100644 --- a/PBSourceViewItem.m +++ b/PBSourceViewItem.m @@ -7,10 +7,12 @@ // #import "PBSourceViewItem.h" -#import "PBGitRevSpecifier.h" +#import "PBSourceViewItems.h" +#import "PBGitRef.h" @implementation PBSourceViewItem @synthesize parent, title, isGroupItem, children, revSpecifier, isUncollapsible; +@dynamic icon; - (id)init { @@ -21,33 +23,52 @@ return self; } -+ (id)groupItemWithTitle:(NSString *)title ++ (id)itemWithTitle:(NSString *)title { PBSourceViewItem *item = [[[self class] alloc] init]; item.title = title; + return item; +} + ++ (id)groupItemWithTitle:(NSString *)title +{ + PBSourceViewItem *item = [self itemWithTitle:[title uppercaseString]]; item.isGroupItem = YES; return item; } + (id)itemWithRevSpec:(PBGitRevSpecifier *)revSpecifier { - PBSourceViewItem *item = [[[self class] alloc] init]; - item.revSpecifier = revSpecifier; + PBGitRef *ref = [revSpecifier ref]; - return item; -} + if ([ref isTag]) + return [PBGitSVTagItem tagItemWithRevSpec:revSpecifier]; + else if ([ref isBranch]) + return [PBGitSVBranchItem branchItemWithRevSpec:revSpecifier]; + else if ([ref isRemoteBranch]) + return [PBGitSVRemoteBranchItem remoteBranchItemWithRevSpec:revSpecifier]; -+ (id)itemWithTitle:(NSString *)title; -{ - PBSourceViewItem *item = [[[self class] alloc] init]; - item.title = title; - return item; + return [PBGitSVOtherRevItem otherItemWithRevSpec:revSpecifier]; } - (void)addChild:(PBSourceViewItem *)child { + if (!child) + return; + [self.children addObject:child]; child.parent = self; + [self.children sortUsingDescriptors:[NSArray arrayWithObject:[[NSSortDescriptor alloc] initWithKey:@"title" ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)]]]; +} + +- (void)removeChild:(PBSourceViewItem *)child +{ + if (!child) + return; + + [self.children removeObject:child]; + if (!self.isGroupItem && ([self.children count] == 0)) + [self.parent removeChild:self]; } - (void)addRev:(PBGitRevSpecifier *)theRevSpecifier toPath:(NSArray *)path @@ -65,7 +86,10 @@ node = child; if (!node) { - node = [PBSourceViewItem itemWithTitle:firstTitle]; + if ([firstTitle isEqualToString:[[theRevSpecifier ref] remoteName]]) + node = [PBGitSVRemoteItem remoteItemWithTitle:firstTitle]; + else + node = [PBGitSVFolderItem folderItemWithTitle:firstTitle]; [self addChild:node]; } @@ -85,6 +109,11 @@ return nil; } +- (NSImage *) icon +{ + return nil; +} + - (NSString *)title { if (title) @@ -93,21 +122,17 @@ return [[revSpecifier description] lastPathComponent]; } -- (NSImage *)icon +- (NSString *) stringValue { - if ([self isGroupItem]) - return nil; + return self.title; +} - if (self.parent && !self.parent.parent && [self.parent.title isEqualToString:@"Remotes"]) - return [NSImage imageNamed:@"remote"]; +- (PBGitRef *) ref +{ + if (self.revSpecifier) + return [self.revSpecifier ref]; - if (self.parent && !self.parent.parent && [self.parent.title isEqualToString:@"Tags"]) - return [NSImage imageNamed:@"tag"]; - - if ([[self children] count]) - return [NSImage imageNamed:@"folder"]; - - return [NSImage imageNamed:@"branch"]; + return nil; } @end diff --git a/PBSourceViewItems.h b/PBSourceViewItems.h new file mode 100644 index 0000000..8589d6b --- /dev/null +++ b/PBSourceViewItems.h @@ -0,0 +1,19 @@ +// +// PBSourceViewItems.h +// GitX +// +// Created by Nathan Kinsinger on 3/2/10. +// Copyright 2010 Nathan Kinsinger. All rights reserved. +// + +#import "PBSourceViewItem.h" + +#import "PBGitSVStageItem.h" + +#import "PBGitRevSpecifier.h" +#import "PBGitSVBranchItem.h" +#import "PBGitSVRemoteItem.h" +#import "PBGitSVRemoteBranchItem.h" +#import "PBGitSVTagItem.h" +#import "PBGitSVOtherRevItem.h" +#import "PBGitSVFolderItem.h" \ No newline at end of file