From 1fa1c4dc99d44e4e97cc966ac53e74409b109554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Berg?= Date: Wed, 24 Mar 2010 18:41:56 +0100 Subject: [PATCH 1/3] Add Cmd+Shift+F for "Reveal in Finder" and Cmd+Shift+T for "Open Terminal". --- English.lproj/MainMenu.xib | 213 ++++++++++++++++++++++++++++++++----- 1 file changed, 188 insertions(+), 25 deletions(-) diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib index bec5dd0..a70e278 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -3,15 +3,16 @@ 1050 10C540 - 762 + 740 1038.25 458.00 com.apple.InterfaceBuilder.CocoaPlugin - 762 + 740 YES + YES @@ -709,7 +710,8 @@ Open in Terminal - + T + 1048576 2147483647 @@ -717,7 +719,8 @@ Reveal in Finder - + F + 1048576 2147483647 @@ -2323,7 +2326,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{624, 493}, {240, 243}} + {{522, 787}, {240, 243}} com.apple.InterfaceBuilder.CocoaPlugin {{455, 493}, {243, 243}} @@ -2384,7 +2387,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{552, 706}, {420, 20}} + {{419, 1030}, {420, 20}} com.apple.InterfaceBuilder.CocoaPlugin {{297, 739}, {329, 20}} @@ -2442,7 +2445,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{668, 623}, {206, 113}} + {{566, 917}, {206, 113}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2704,6 +2707,14 @@ PBGitCommitController.h + + PBGitGradientBarView + NSView + + IBProjectSource + PBGitGradientBarView.h + + PBGitHistoryController PBViewController @@ -2711,13 +2722,16 @@ YES YES + cherryPick: createBranch: createTag: + merge: openFilesAction: openSelectedFile: + rebase: refresh: + setBranchFilter: setDetailedView: - setRawView: setTreeView: showAddRemoteSheet: showCommitsFromTree: @@ -2738,30 +2752,49 @@ id id id + id + id + id YES YES + allBranchesFilterItem + cherryPickButton commitController commitList fileBrowser historySplitView + localRemoteBranchesFilterItem + mergeButton + rebaseButton refController + scopeBarView searchField + selectedBranchFilterItem treeController + upperToolbarView webView YES + NSButton + NSButton NSArrayController NSTableView NSOutlineView PBCollapsibleSplitView + NSButton + NSButton + NSButton PBRefController + PBGitGradientBarView NSSearchField + NSButton NSTreeController + PBGitGradientBarView id @@ -2819,6 +2852,7 @@ YES cloneTo: openInTerminal: + refresh: revealInFinder: showCommitView: showHistoryView: @@ -2830,6 +2864,7 @@ id id id + id @@ -2870,7 +2905,6 @@ YES openSelectedFile: - refresh: setDetailedView: setRawView: setTreeView: @@ -2883,7 +2917,6 @@ id id id - id @@ -2929,13 +2962,13 @@ copySHA: createBranch: createTag: + diffWithHEAD: fetchRemote: merge: pullRemote: pushDefaultRemoteForRef: pushToRemote: pushUpdatesToRemote: - rebaseActiveBranch: rebaseHeadBranch: showTagInfoSheet: @@ -2966,6 +2999,9 @@ commitController commitList historyController + pullItem + pushItem + rebaseItem YES @@ -2973,6 +3009,9 @@ NSArrayController PBCommitList PBGitHistoryController + KBPopUpToolbarItem + KBPopUpToolbarItem + KBPopUpToolbarItem @@ -2995,6 +3034,34 @@ PBRepositoryDocumentController NSDocumentController + + YES + + YES + cloneURL: + hideClone: + showClone: + + + YES + id + id + id + + + + YES + + YES + cloneURLField + cloneWindow + + + YES + NSTextField + NSWindow + + IBProjectSource PBRepositoryDocumentController.h @@ -3011,6 +3078,10 @@ PBViewController NSViewController + + refresh: + id + IBProjectSource PBViewController.h @@ -3553,6 +3624,55 @@ Foundation.framework/Headers/NSURLDownload.h + + NSObject + + IBFrameworkSource + ImageKit.framework/Headers/IKImageBrowserView.h + + + + NSObject + + IBFrameworkSource + ImageKit.framework/Headers/ImageKitDeprecated.h + + + + NSObject + + IBFrameworkSource + PDFKit.framework/Headers/PDFDocument.h + + + + NSObject + + IBFrameworkSource + PDFKit.framework/Headers/PDFView.h + + + + NSObject + + IBFrameworkSource + QuartzComposer.framework/Headers/QCCompositionParameterView.h + + + + NSObject + + IBFrameworkSource + QuartzComposer.framework/Headers/QCCompositionPickerView.h + + + + NSObject + + IBFrameworkSource + QuartzFilters.framework/Headers/QuartzFilterManager.h + + NSObject @@ -3816,6 +3936,63 @@ AppKit.framework/Headers/NSWindowController.h + + PDFView + NSView + + YES + + YES + goBack: + goForward: + goToFirstPage: + goToLastPage: + goToNextPage: + goToPreviousPage: + selectAll: + takeBackgroundColorFrom: + zoomIn: + zoomOut: + + + YES + id + id + id + id + id + id + id + id + id + id + + + + + + QCView + NSView + + YES + + YES + play: + start: + stop: + + + YES + id + id + id + + + + IBFrameworkSource + QuartzComposer.framework/Headers/QCView.h + + SUUpdater NSObject @@ -3871,7 +4048,6 @@ 0 - IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx @@ -3887,18 +4063,5 @@ YES ../GitX.xcodeproj 3 - - YES - - YES - NSMenuCheckmark - NSMenuMixedState - - - YES - {9, 8} - {7, 2} - - From 00545fbe73b453ab8866ae8b243cdd90816da87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Berg?= Date: Wed, 24 Mar 2010 18:43:51 +0100 Subject: [PATCH 2/3] Add a preference option for truncating very large info sheet content texts when they exceed a user-configurable limit. --- English.lproj/Preferences.xib | 438 ++++++++++++++++++++++++---------- PBGitDefaults.h | 2 + PBGitDefaults.m | 16 ++ PBGitWindowController.m | 4 +- 4 files changed, 326 insertions(+), 134 deletions(-) diff --git a/English.lproj/Preferences.xib b/English.lproj/Preferences.xib index 95363b5..367ef75 100644 --- a/English.lproj/Preferences.xib +++ b/English.lproj/Preferences.xib @@ -46,104 +46,22 @@ 268 YES - + 268 - {{18, 173}, {144, 18}} + {{294, 160}, {38, 17}} YES - - -2080244224 - 0 - Show relative dates + + 68288064 + 272630784 + chars LucidaGrande 13 1044 - - 1211912703 - 2 - - NSImage - NSSwitch - - - NSSwitch - - - - 200 - 25 - - - - - 268 - {{18, 198}, {233, 18}} - - YES - - -2080244224 - 0 - Auto refresh on application focus - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{248, 122}, {41, 22}} - - YES - - -1804468671 - 272630784 - - - - YES - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 6 - System - textColor - - 3 - MAA - - - - - - - 268 - {{121, 124}, {122, 17}} - - YES - - 68288064 - 272630784 - Display at column: - - + 6 System @@ -157,14 +75,167 @@ 6 System controlTextColor + + 3 + MAA + + + + + + + 268 + {{248, 158}, {41, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + + 268 + {{121, 160}, {122, 17}} + + YES + + 68288064 + 71304192 + Truncate to: + + + + + + + + + 268 + {{18, 185}, {273, 18}} + + YES + + -2080244224 + 0 + Truncate large info sheet messages + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + + 268 + {{18, 210}, {144, 18}} + + YES + + -2080244224 + 0 + Show relative dates + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{18, 235}, {233, 18}} + + YES + + -2080244224 + 0 + Auto refresh on application focus + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{248, 101}, {41, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{121, 103}, {122, 17}} + + YES + + 68288064 + 272630784 + Display at column: + + + + + + 268 - {{18, 147}, {273, 18}} + {{18, 130}, {273, 18}} YES @@ -175,7 +246,7 @@ 1211912703 2 - + @@ -186,7 +257,7 @@ 268 - {{17, 96}, {99, 17}} + {{17, 74}, {99, 17}} YES @@ -210,7 +281,7 @@ NSFilenamesPboardType - {{121, 92}, {179, 22}} + {{121, 70}, {179, 22}} YES @@ -232,7 +303,7 @@ 268 - {{118, 42}, {192, 42}} + {{118, 20}, {192, 42}} YES @@ -248,7 +319,7 @@ 268 - {{306, 96}, {54, 14}} + {{306, 74}, {54, 14}} YES @@ -273,7 +344,7 @@ 268 - {{18, 223}, {203, 18}} + {{18, 261}, {203, 18}} YES @@ -284,7 +355,7 @@ 1211912703 2 - + @@ -295,7 +366,7 @@ 268 - {{18, 248}, {279, 18}} + {{18, 286}, {279, 18}} YES @@ -306,7 +377,7 @@ 1211912703 2 - + @@ -317,7 +388,7 @@ 268 - {{18, 273}, {207, 18}} + {{18, 311}, {207, 18}} YES @@ -328,7 +399,7 @@ 1211912703 2 - + @@ -337,7 +408,7 @@ - {397, 309} + {378, 347} NSView @@ -376,7 +447,7 @@ 1211912703 2 - + @@ -568,7 +639,7 @@ 1211912703 2 - + @@ -585,11 +656,6 @@ SUUpdater - - YES - PBRefreshAutomatically - PBShowRelativeDates - YES @@ -611,7 +677,7 @@ 1211912703 2 - + @@ -633,7 +699,7 @@ 1211912703 2 - + @@ -655,7 +721,7 @@ 1211912703 2 - + @@ -677,7 +743,7 @@ 1211912703 2 - + @@ -1125,6 +1191,42 @@ 147 + + + value: values.PBTruncateInfoText + + + + + + value: values.PBTruncateInfoText + value + values.PBTruncateInfoText + 2 + + + 156 + + + + value: values.PBTruncateInfoTextSize + + + + + + value: values.PBTruncateInfoTextSize + value + values.PBTruncateInfoTextSize + + NSValidatesImmediately + + + 2 + + + 158 + @@ -1162,6 +1264,7 @@ + @@ -1169,7 +1272,10 @@ - + + + + General @@ -1589,6 +1695,62 @@ + + 148 + + + YES + + + + + + 149 + + + YES + + + + + + 150 + + + YES + + + + + + 151 + + + + + 152 + + + + + 153 + + + + + 159 + + + YES + + + + + + 160 + + + @@ -1624,9 +1786,17 @@ 14.IBPluginDependency 144.IBPluginDependency 145.IBPluginDependency + 148.IBPluginDependency + 149.IBPluginDependency 15.IBEditorWindowLastContentRect 15.IBPluginDependency + 150.IBPluginDependency + 151.IBPluginDependency + 152.IBPluginDependency + 153.IBPluginDependency + 159.IBPluginDependency 16.IBPluginDependency + 160.IBPluginDependency 17.IBPluginDependency 18.IBPluginDependency 19.IBPluginDependency @@ -1666,15 +1836,25 @@ YES com.apple.InterfaceBuilder.CocoaPlugin - {{610, 665}, {397, 309}} + {{610, 627}, {378, 347}} com.apple.InterfaceBuilder.CocoaPlugin YES - 121 + 20 0 + + + 358 + 0 + + + + 26 + 1 + {628, 654} {{217, 442}, {480, 272}} @@ -1701,6 +1881,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin {{443, 712}, {103, 71}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -1714,6 +1896,12 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin {{384, 683}, {400, 139}} com.apple.InterfaceBuilder.CocoaPlugin @@ -1764,7 +1952,7 @@ - 147 + 160 @@ -2244,13 +2432,6 @@ ImageKit.framework/Headers/IKImageBrowserView.h - - NSObject - - IBFrameworkSource - ImageKit.framework/Headers/IKSaveOptions.h - - NSObject @@ -2293,13 +2474,6 @@ QuartzFilters.framework/Headers/QuartzFilterManager.h - - NSObject - - IBFrameworkSource - QuickLookUI.framework/Headers/QLPreviewPanel.h - - NSObject @@ -2534,7 +2708,7 @@ com.apple.InterfaceBuilder.CocoaPlugin.macosx - + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 diff --git a/PBGitDefaults.h b/PBGitDefaults.h index 7fb627a..013eb15 100644 --- a/PBGitDefaults.h +++ b/PBGitDefaults.h @@ -12,6 +12,8 @@ } + (int) commitMessageViewVerticalLineLength; ++ (NSInteger) truncateInfoTextSize; ++ (BOOL) truncateInfoText; + (BOOL) commitMessageViewHasVerticalLine; + (BOOL) isGistEnabled; + (BOOL) isGravatarEnabled; diff --git a/PBGitDefaults.m b/PBGitDefaults.m index 23e992a..34e4206 100644 --- a/PBGitDefaults.m +++ b/PBGitDefaults.m @@ -27,6 +27,8 @@ #define kPreviousDocumentPaths @"PBPreviousDocumentPaths" #define kBranchFilterState @"PBBranchFilter" #define kShowRelativeDates @"PBShowRelativeDates" +#define kTruncateInfoText @"PBTruncateInfoText" +#define kTruncateInfoTextSize @"PBTruncateInfoTextSize" @implementation PBGitDefaults @@ -59,6 +61,10 @@ forKey:kOpenPreviousDocumentsOnLaunch]; [defaultValues setObject:[NSNumber numberWithBool:YES] forKey:kShowRelativeDates]; + [defaultValues setObject:[NSNumber numberWithBool:YES] + forKey:kTruncateInfoText]; + [defaultValues setObject:[NSNumber numberWithInteger:1000] + forKey:kTruncateInfoTextSize]; [[NSUserDefaults standardUserDefaults] registerDefaults:defaultValues]; } @@ -67,6 +73,16 @@ return [[NSUserDefaults standardUserDefaults] integerForKey:kCommitMessageViewVerticalLineLength]; } ++ (BOOL) truncateInfoText +{ + return [[NSUserDefaults standardUserDefaults] boolForKey:kTruncateInfoText]; +} + ++ (NSInteger) truncateInfoTextSize +{ + return [[NSUserDefaults standardUserDefaults] integerForKey:kTruncateInfoTextSize]; +} + + (BOOL) commitMessageViewHasVerticalLine { return [[NSUserDefaults standardUserDefaults] boolForKey:kCommitMessageViewHasVerticalLine]; diff --git a/PBGitWindowController.m b/PBGitWindowController.m index b1ade92..16bf1e7 100644 --- a/PBGitWindowController.m +++ b/PBGitWindowController.m @@ -111,8 +111,8 @@ - (void)showMessageSheet:(NSString *)messageText infoText:(NSString *)infoText { - if ([infoText length] > SHEET_INFOTEXT_CHAR_LIMIT) { - infoText = [infoText truncateToLength:SHEET_INFOTEXT_CHAR_LIMIT mode:PBNSStringTruncateModeCenter indicator:@" ... "]; + if ([PBGitDefaults truncateInfoText] && ([infoText length] > [PBGitDefaults truncateInfoTextSize])) { + infoText = [infoText truncateToLength:[PBGitDefaults truncateInfoTextSize] mode:PBNSStringTruncateModeCenter indicator:@" ... "]; } [[NSAlert alertWithMessageText:messageText defaultButton:nil From 1488bebd2e68c07f6341982c04a99a1fe0ecf5e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Berg?= Date: Wed, 24 Mar 2010 18:44:10 +0100 Subject: [PATCH 3/3] Small tweak to the response of the Context diff slider. --- html/views/commit/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/views/commit/index.html b/html/views/commit/index.html index a87c5f9..ef8b5e2 100644 --- a/html/views/commit/index.html +++ b/html/views/commit/index.html @@ -15,8 +15,8 @@