Allow suppressing some of the modal warnings

This allows the user to suppress the display of some of the warning dialogs (like "Confirm before Push"). They can be reset with Reset Warnings in the General preferences.
This commit is contained in:
Nathan Kinsinger
2010-11-13 15:49:00 -07:00
parent e168123c0e
commit 62319b8cd9
6 changed files with 375 additions and 84 deletions
+293 -64
View File
@@ -2,18 +2,16 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">10C540</string>
<string key="IBDocument.InterfaceBuilderVersion">759</string>
<string key="IBDocument.AppKitVersion">1038.25</string>
<string key="IBDocument.HIToolboxVersion">458.00</string>
<string key="IBDocument.SystemVersion">10H574</string>
<string key="IBDocument.InterfaceBuilderVersion">804</string>
<string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">759</string>
<string key="NS.object.0">804</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="62"/>
<integer value="87"/>
<integer value="1"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
@@ -45,21 +43,74 @@
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextField" id="63761450">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 22}, {166, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="467740597">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">Reset all dialog warnings:</string>
<object class="NSFont" key="NSSupport" id="734450335">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
<reference key="NSControlView" ref="63761450"/>
<object class="NSColor" key="NSBackgroundColor" id="124675276">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="716218002">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlTextColor</string>
<object class="NSColor" key="NSColor" id="367847822">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
</object>
<object class="NSButton" id="83909567">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{182, 12}, {137, 32}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="265220935">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Reset Warnings</string>
<reference key="NSSupport" ref="734450335"/>
<reference key="NSControlView" ref="83909567"/>
<int key="NSButtonFlags">-2038021889</int>
<int key="NSButtonFlags2">129</int>
<reference key="NSAlternateImage" ref="734450335"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
<object class="NSTextField" id="25030403">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{248, 100}, {41, 22}}</string>
<string key="NSFrame">{{248, 118}, {41, 22}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1045854608">
<int key="NSCellFlags">-1804468671</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<object class="NSFont" key="NSSupport" id="734450335">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
<reference key="NSSupport" ref="734450335"/>
<reference key="NSControlView" ref="25030403"/>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSColor" key="NSBackgroundColor">
@@ -75,17 +126,14 @@
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">textColor</string>
<object class="NSColor" key="NSColor" id="367847822">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
<reference key="NSColor" ref="367847822"/>
</object>
</object>
</object>
<object class="NSTextField" id="258144035">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{121, 102}, {122, 17}}</string>
<string key="NSFrame">{{121, 120}, {122, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1031567029">
@@ -94,27 +142,14 @@
<string key="NSContents">Display at column:</string>
<reference key="NSSupport" ref="734450335"/>
<reference key="NSControlView" ref="258144035"/>
<object class="NSColor" key="NSBackgroundColor" id="124675276">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="716218002">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlTextColor</string>
<reference key="NSColor" ref="367847822"/>
</object>
<reference key="NSBackgroundColor" ref="124675276"/>
<reference key="NSTextColor" ref="716218002"/>
</object>
</object>
<object class="NSButton" id="968361983">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{18, 125}, {273, 18}}</string>
<string key="NSFrame">{{18, 143}, {273, 18}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="782438225">
@@ -141,7 +176,7 @@
<object class="NSTextField" id="441589300">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 74}, {99, 17}}</string>
<string key="NSFrame">{{17, 92}, {99, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="31526941">
@@ -165,7 +200,7 @@
<string>NSFilenamesPboardType</string>
</object>
</object>
<string key="NSFrame">{{121, 70}, {179, 22}}</string>
<string key="NSFrame">{{121, 88}, {179, 22}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPathCell" key="NSCell" id="331807888">
@@ -187,7 +222,7 @@
<object class="NSTextField" id="617839596">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{118, 20}, {192, 42}}</string>
<string key="NSFrame">{{118, 52}, {192, 28}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="453728129">
@@ -203,7 +238,7 @@
<object class="NSButton" id="1032928366">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{306, 74}, {54, 14}}</string>
<string key="NSFrame">{{306, 92}, {54, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="806993456">
@@ -228,7 +263,7 @@
<object class="NSButton" id="910887184">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{18, 150}, {203, 18}}</string>
<string key="NSFrame">{{18, 168}, {203, 18}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="709654045">
@@ -250,7 +285,7 @@
<object class="NSButton" id="160081910">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{18, 175}, {279, 18}}</string>
<string key="NSFrame">{{18, 193}, {279, 18}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="876763316">
@@ -272,7 +307,7 @@
<object class="NSButton" id="68472633">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{18, 200}, {207, 18}}</string>
<string key="NSFrame">{{18, 218}, {207, 18}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="456188813">
@@ -292,12 +327,12 @@
</object>
</object>
</object>
<string key="NSFrameSize">{400, 236}</string>
<string key="NSFrameSize">{400, 254}</string>
<reference key="NSSuperview"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="970459672">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -306,7 +341,6 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{39, 45}, {82, 14}}</string>
<reference key="NSSuperview" ref="970459672"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="439589942">
<int key="NSCellFlags">68288064</int>
@@ -323,7 +357,6 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{18, 103}, {260, 18}}</string>
<reference key="NSSuperview" ref="970459672"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="853304857">
<int key="NSCellFlags">-2080244224</int>
@@ -346,7 +379,6 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{130, 78}, {102, 22}}</string>
<reference key="NSSuperview" ref="970459672"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="646744412">
<int key="NSCellFlags">-2076049856</int>
@@ -434,7 +466,6 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{39, 80}, {89, 17}}</string>
<reference key="NSSuperview" ref="970459672"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="642787685">
<int key="NSCellFlags">68288064</int>
@@ -451,7 +482,6 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{130, 45}, {251, 14}}</string>
<reference key="NSSuperview" ref="970459672"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="617642330">
<int key="NSCellFlags">68288064</int>
@@ -489,7 +519,6 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{128, 13}, {96, 28}}</string>
<reference key="NSSuperview" ref="970459672"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="329053853">
<int key="NSCellFlags">67239424</int>
@@ -507,12 +536,10 @@
</object>
</object>
<string key="NSFrameSize">{400, 139}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="351117501">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -540,22 +567,16 @@
</object>
</object>
<string key="NSFrameSize">{239, 54}</string>
<reference key="NSSuperview"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomObject" id="844257713">
<string key="NSClassName">SUUpdater</string>
</object>
<object class="NSUserDefaultsController" id="557723770">
<object class="NSMutableArray" key="NSDeclaredKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>PBCommitMessageViewHasVerticalLine</string>
<string>PBCommitMessageViewVerticalLineLength</string>
</object>
<bool key="NSSharedInstance">YES</bool>
</object>
<object class="NSCustomView" id="263788152">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -649,7 +670,6 @@
</object>
</object>
<string key="NSFrameSize">{400, 116}</string>
<reference key="NSSuperview"/>
<string key="NSClassName">NSView</string>
</object>
</object>
@@ -1051,6 +1071,14 @@
</object>
<int key="connectionID">135</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">resetAllDialogWarnings:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="83909567"/>
</object>
<int key="connectionID">140</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -1094,6 +1122,8 @@
<reference ref="968361983"/>
<reference ref="258144035"/>
<reference ref="25030403"/>
<reference ref="83909567"/>
<reference ref="63761450"/>
</object>
<reference key="parent" ref="0"/>
<string key="objectName">General</string>
@@ -1485,6 +1515,34 @@
<reference key="object" ref="1045854608"/>
<reference key="parent" ref="25030403"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">136</int>
<reference key="object" ref="83909567"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="265220935"/>
</object>
<reference key="parent" ref="1005"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">137</int>
<reference key="object" ref="63761450"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="467740597"/>
</object>
<reference key="parent" ref="1005"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">138</int>
<reference key="object" ref="467740597"/>
<reference key="parent" ref="63761450"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">139</int>
<reference key="object" ref="265220935"/>
<reference key="parent" ref="83909567"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -1515,6 +1573,13 @@
<string>13.IBPluginDependency</string>
<string>130.IBPluginDependency</string>
<string>131.IBPluginDependency</string>
<string>136.IBAttributePlaceholdersKey</string>
<string>136.IBPluginDependency</string>
<string>136.IBViewBoundsToFrameTransform</string>
<string>137.IBPluginDependency</string>
<string>137.IBViewBoundsToFrameTransform</string>
<string>138.IBPluginDependency</string>
<string>139.IBPluginDependency</string>
<string>14.IBPluginDependency</string>
<string>15.IBEditorWindowLastContentRect</string>
<string>15.IBPluginDependency</string>
@@ -1558,7 +1623,7 @@
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{845, 648}, {400, 236}}</string>
<string>{{845, 630}, {400, 254}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableArray">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1588,6 +1653,24 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableDictionary">
<string key="NS.key.0">ToolTip</string>
<object class="IBToolTipAttribute" key="NS.object.0">
<string key="name">ToolTip</string>
<reference key="object" ref="83909567"/>
<string key="toolTip">Resets the of the "Don't show this again" preferences.</string>
</object>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDXwAAwggAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCaAAAwegAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{443, 712}, {103, 71}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1652,7 +1735,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">135</int>
<int key="maxID">140</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -1665,6 +1748,13 @@
<string key="minorKey">DBPrefsWindowController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSApplication</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">NSApplication+GitXScripting.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">PBPrefsWindowController</string>
<string key="superclassName">DBPrefsWindowController</string>
@@ -1673,6 +1763,7 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>checkGitValidity:</string>
<string>resetAllDialogWarnings:</string>
<string>resetGitPath:</string>
<string>showHideAllFiles:</string>
</object>
@@ -1681,6 +1772,36 @@
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>checkGitValidity:</string>
<string>resetAllDialogWarnings:</string>
<string>resetGitPath:</string>
<string>showHideAllFiles:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">checkGitValidity:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">resetAllDialogWarnings:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">resetGitPath:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">showHideAllFiles:</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
@@ -1704,6 +1825,45 @@
<string>NSView</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>badGitPathIcon</string>
<string>generalPrefsView</string>
<string>gitPathController</string>
<string>gitPathOpenAccessory</string>
<string>integrationPrefsView</string>
<string>updatesPrefsView</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">badGitPathIcon</string>
<string key="candidateClassName">NSImageView</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">generalPrefsView</string>
<string key="candidateClassName">NSView</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">gitPathController</string>
<string key="candidateClassName">NSPathControl</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">gitPathOpenAccessory</string>
<string key="candidateClassName">NSView</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">integrationPrefsView</string>
<string key="candidateClassName">NSView</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">updatesPrefsView</string>
<string key="candidateClassName">NSView</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">PBPrefsWindowController.h</string>
@@ -1733,10 +1893,24 @@
<string key="NS.key.0">checkForUpdates:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">checkForUpdates:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">checkForUpdates:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">delegate</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">delegate</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">delegate</string>
<string key="candidateClassName">id</string>
</object>
</object>
<reference key="sourceIdentifier" ref="657347130"/>
</object>
</object>
@@ -2125,6 +2299,27 @@
<string key="minorKey">Foundation.framework/Headers/NSURLDownload.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">QuartzCore.framework/Headers/CIImageProvider.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -2332,6 +2527,13 @@
<string key="NS.key.0">showWindow:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">showWindow:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">showWindow:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSWindowController.h</string>
@@ -2344,10 +2546,24 @@
<string key="NS.key.0">checkForUpdates:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">checkForUpdates:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">checkForUpdates:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">delegate</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">delegate</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">delegate</string>
<string key="candidateClassName">id</string>
</object>
</object>
<reference key="sourceIdentifier" ref="639617919"/>
</object>
</object>
@@ -2370,8 +2586,21 @@
<string key="IBDocument.LastKnownRelativeProjectPath">../GitX.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="NS.key.0">NSStopProgressFreestandingTemplate</string>
<string key="NS.object.0">{83, 83}</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSMenuCheckmark</string>
<string>NSMenuMixedState</string>
<string>NSStopProgressFreestandingTemplate</string>
<string>NSSwitch</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{9, 8}</string>
<string>{7, 2}</string>
<string>{83, 83}</string>
<string>{15, 15}</string>
</object>
</object>
</data>
</archive>
+6 -2
View File
@@ -24,8 +24,6 @@
+ (void) setShouldCheckoutBranch:(BOOL)shouldCheckout;
+ (NSString *) recentCloneDestination;
+ (void) setRecentCloneDestination:(NSString *)path;
+ (BOOL) suppressAcceptDropRef;
+ (void) setSuppressAcceptDropRef:(BOOL)suppress;
+ (BOOL) showStageView;
+ (void) setShowStageView:(BOOL)suppress;
+ (BOOL) openPreviousDocumentsOnLaunch;
@@ -37,4 +35,10 @@
+ (NSInteger)historySearchMode;
+ (void)setHistorySearchMode:(NSInteger)mode;
// Suppressed Dialog Warnings
+ (void)suppressDialogWarningForDialog:(NSString *)dialog;
+ (BOOL)isDialogWarningSuppressedForDialog:(NSString *)dialog;
+ (void)resetAllDialogWarnings;
@end
+35 -11
View File
@@ -21,12 +21,12 @@
#define kShowOpenPanelOnLaunch @"PBShowOpenPanelOnLaunch"
#define kShouldCheckoutBranch @"PBShouldCheckoutBranch"
#define kRecentCloneDestination @"PBRecentCloneDestination"
#define kSuppressAcceptDropRef @"PBSuppressAcceptDropRef"
#define kShowStageView @"PBShowStageView"
#define kOpenPreviousDocumentsOnLaunch @"PBOpenPreviousDocumentsOnLaunch"
#define kPreviousDocumentPaths @"PBPreviousDocumentPaths"
#define kBranchFilterState @"PBBranchFilter"
#define kHistorySearchMode @"PBHistorySearchMode"
#define kSuppressedDialogWarnings @"Suppressed Dialog Warnings"
@implementation PBGitDefaults
@@ -125,16 +125,6 @@
[[NSUserDefaults standardUserDefaults] setObject:path forKey:kRecentCloneDestination];
}
+ (BOOL) suppressAcceptDropRef
{
return [[NSUserDefaults standardUserDefaults] boolForKey:kSuppressAcceptDropRef];
}
+ (void) setSuppressAcceptDropRef:(BOOL)suppress
{
return [[NSUserDefaults standardUserDefaults] setBool:suppress forKey:kSuppressAcceptDropRef];
}
+ (BOOL) showStageView
{
return [[NSUserDefaults standardUserDefaults] boolForKey:kShowStageView];
@@ -185,4 +175,38 @@
}
// Suppressed Dialog Warnings
//
// Represents dialogs where the user has checked the "Do not show this message again" checkbox.
// Keep these together in an array to make it easier to reset all the warnings.
+ (NSSet *)suppressedDialogWarnings
{
NSSet *suppressedDialogWarnings = [NSSet setWithArray:[[NSUserDefaults standardUserDefaults] arrayForKey:kSuppressedDialogWarnings]];
if (suppressedDialogWarnings == nil)
suppressedDialogWarnings = [NSSet set];
return suppressedDialogWarnings;
}
+ (void)suppressDialogWarningForDialog:(NSString *)dialog
{
NSSet *suppressedDialogWarnings = [[self suppressedDialogWarnings] setByAddingObject:dialog];
[[NSUserDefaults standardUserDefaults] setObject:[suppressedDialogWarnings allObjects] forKey:kSuppressedDialogWarnings];
}
+ (BOOL)isDialogWarningSuppressedForDialog:(NSString *)dialog
{
return [[self suppressedDialogWarnings] containsObject:dialog];
}
+ (void)resetAllDialogWarnings
{
[[NSUserDefaults standardUserDefaults] setObject:nil forKey:kSuppressedDialogWarnings];
[[NSUserDefaults standardUserDefaults] synchronize];
}
@end
+1
View File
@@ -27,5 +27,6 @@
- (void)pathCell:(NSPathCell *)pathCell willDisplayOpenPanel:(NSOpenPanel *)openPanel;
- (IBAction) showHideAllFiles: sender;
- (IBAction) resetGitPath: sender;
- (IBAction)resetAllDialogWarnings:(id)sender;
@end
+6
View File
@@ -8,6 +8,7 @@
#import "PBPrefsWindowController.h"
#import "PBGitRepository.h"
#import "PBGitDefaults.h"
#define kPreferenceViewIdentifier @"PBGitXPreferenceViewIdentifier"
@@ -68,6 +69,11 @@
gitPathOpenPanel = openPanel;
}
- (IBAction)resetAllDialogWarnings:(id)sender
{
[PBGitDefaults resetAllDialogWarnings];
}
#pragma mark -
#pragma mark Git Path open panel actions
+34 -7
View File
@@ -14,6 +14,13 @@
#import "PBGitDefaults.h"
#import "PBDiffWindowController.h"
#define kDialogAcceptDroppedRef @"Accept Dropped Ref"
#define kDialogConfirmPush @"Confirm Push"
#define kDialogDeleteRef @"Delete Ref"
@implementation PBRefController
- (void)awakeFromNib
@@ -45,13 +52,18 @@
#pragma mark Push
- (void) showConfirmPushRefSheet:(PBGitRef *)ref remote:(PBGitRef *)remoteRef
- (void)showConfirmPushRefSheet:(PBGitRef *)ref remote:(PBGitRef *)remoteRef
{
if ((!ref && !remoteRef)
|| (ref && ![ref isBranch] && ![ref isRemoteBranch])
|| (remoteRef && !([remoteRef refishType] == kGitXRemoteType)))
return;
if ([PBGitDefaults isDialogWarningSuppressedForDialog:kDialogConfirmPush]) {
[historyController.repository beginPushRef:ref toRemote:remoteRef];
return;
}
NSString *description = nil;
if (ref && remoteRef)
description = [NSString stringWithFormat:@"Push %@ '%@' to remote %@", [ref refishType], [ref shortName], [remoteRef remoteName]];
@@ -66,6 +78,7 @@
alternateButton:@"Cancel"
otherButton:nil
informativeTextWithFormat:@"Are you sure you want to %@?", sdesc];
[alert setShowsSuppressionButton:YES];
NSMutableDictionary *info = [NSMutableDictionary dictionary];
if (ref)
@@ -79,10 +92,13 @@
contextInfo:info];
}
- (void) confirmPushRefSheetDidEnd:(NSAlert *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
- (void)confirmPushRefSheetDidEnd:(NSAlert *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
[[sheet window] orderOut:nil];
if ([[sheet suppressionButton] state] == NSOnState)
[PBGitDefaults suppressDialogWarningForDialog:kDialogConfirmPush];
if (returnCode == NSAlertDefaultReturn) {
PBGitRef *ref = [(NSDictionary *)contextInfo objectForKey:kGitXBranchType];
PBGitRef *remoteRef = [(NSDictionary *)contextInfo objectForKey:kGitXRemoteType];
@@ -230,12 +246,18 @@
#pragma mark Remove a branch, remote or tag
- (void) showDeleteRefSheet:(PBRefMenuItem *)sender
- (void)showDeleteRefSheet:(PBRefMenuItem *)sender
{
if ([[sender refish] refishType] == kGitXCommitType)
return;
PBGitRef *ref = (PBGitRef *)[sender refish];
if ([PBGitDefaults isDialogWarningSuppressedForDialog:kDialogDeleteRef]) {
[historyController.repository deleteRef:ref];
return;
}
NSString *ref_desc = [NSString stringWithFormat:@"%@ '%@'", [ref refishType], [ref shortName]];
NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:@"Delete %@?", ref_desc]
@@ -243,6 +265,7 @@
alternateButton:@"Cancel"
otherButton:nil
informativeTextWithFormat:@"Are you sure you want to remove the %@?", ref_desc];
[alert setShowsSuppressionButton:YES];
[alert beginSheetModalForWindow:[historyController.repository.windowController window]
modalDelegate:self
@@ -250,10 +273,13 @@
contextInfo:ref];
}
- (void) deleteRefSheetDidEnd:(NSAlert *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
- (void)deleteRefSheetDidEnd:(NSAlert *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
[[sheet window] orderOut:nil];
if ([[sheet suppressionButton] state] == NSOnState)
[PBGitDefaults suppressDialogWarningForDialog:kDialogDeleteRef];
if (returnCode == NSAlertDefaultReturn) {
PBGitRef *ref = (PBGitRef *)contextInfo;
[historyController.repository deleteRef:ref];
@@ -347,6 +373,7 @@
[dropCommit addRef:ref];
[oldCommit removeRef:ref];
[historyController.commitList reloadData];
}
- (BOOL)tableView:(NSTableView *)aTableView
@@ -379,7 +406,7 @@
dropCommit, @"dropCommit",
nil];
if ([PBGitDefaults suppressAcceptDropRef]) {
if ([PBGitDefaults isDialogWarningSuppressedForDialog:kDialogAcceptDroppedRef]) {
[self dropRef:dropInfo];
return YES;
}
@@ -404,7 +431,7 @@
return YES;
}
- (void) acceptDropInfoAlertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
- (void)acceptDropInfoAlertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
{
[[alert window] orderOut:nil];
@@ -412,7 +439,7 @@
[self dropRef:contextInfo];
if ([[alert suppressionButton] state] == NSOnState)
[PBGitDefaults setSuppressAcceptDropRef:YES];
[PBGitDefaults suppressDialogWarningForDialog:kDialogAcceptDroppedRef];
}
@end