Skip to content

Commit

Permalink
Remove the Quick Look button from the upper history toolbar and put i…
Browse files Browse the repository at this point in the history
…t in the file list's bar
  • Loading branch information
laullon committed Sep 18, 2010
1 parent 3a25496 commit a7faf4f
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 49 deletions.
1 change: 1 addition & 0 deletions GLFileView.h
Expand Up @@ -20,6 +20,7 @@
IBOutlet MGScopeBar *typeBar;
NSMutableArray *groups;
NSString *logFormat;
IBOutlet NSView *accessoryView;
}

- (void)showFile;
Expand Down
6 changes: 5 additions & 1 deletion GLFileView.m
Expand Up @@ -131,11 +131,15 @@ - (void)scopeBar:(MGScopeBar *)theScopeBar selectedStateChanged:(BOOL)selected f
startFile=identifier;
NSString *path = [NSString stringWithFormat:@"html/views/%@", identifier];
NSString *html = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:path];
NSLog(@"[FileViewerController scopeBar:selectedStateChanged] -> file: '%@' (%@)",html,identifier);
NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL fileURLWithPath:html]];
[[view mainFrame] loadRequest:request];
}

- (NSView *)accessoryViewForScopeBar:(MGScopeBar *)scopeBar
{
return accessoryView;
}

- (void) didLoad
{
[self showFile];
Expand Down
139 changes: 91 additions & 48 deletions PBGitHistoryView.xib
Expand Up @@ -21,7 +21,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="475"/>
<integer value="486"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
Expand Down Expand Up @@ -113,34 +113,6 @@
<int key="NSvFlags">266</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="16222431">
<reference key="NSNextResponder" ref="172148644"/>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{908, 3}, {37, 25}}</string>
<reference key="NSSuperview" ref="172148644"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="102056827">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">QuickLook</string>
<object class="NSFont" key="NSSupport" id="924107556">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
<reference key="NSControlView" ref="16222431"/>
<int key="NSButtonFlags">-2033958657</int>
<int key="NSButtonFlags2">163</int>
<object class="NSCustomResource" key="NSNormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSQuickLookTemplate</string>
</object>
<string key="NSAlternateContents"/>
<string type="base64-UTF8" key="NSKeyEquivalent">IA</string>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
<object class="NSSegmentedControl" id="802449565">
<reference key="NSNextResponder" ref="172148644"/>
<int key="NSvFlags">292</int>
Expand All @@ -150,7 +122,11 @@
<object class="NSSegmentedCell" key="NSCell" id="534046869">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">0</int>
<reference key="NSSupport" ref="924107556"/>
<object class="NSFont" key="NSSupport" id="924107556">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
<reference key="NSControlView" ref="802449565"/>
<object class="NSMutableArray" key="NSSegmentImages">
<bool key="EncodedWithXMLCoder">YES</bool>
Expand Down Expand Up @@ -1109,6 +1085,47 @@
<object class="NSCustomView" id="375746871">
<reference key="NSNextResponder" ref="891500945"/>
<int key="NSvFlags">266</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomView" id="951933530">
<reference key="NSNextResponder" ref="375746871"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="16222431">
<reference key="NSNextResponder" ref="951933530"/>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{41, 1.5}, {29, 19}}</string>
<reference key="NSSuperview" ref="951933530"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="102056827">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">QuickLook</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande-Bold</string>
<double key="NSSize">12</double>
<int key="NSfFlags">16</int>
</object>
<reference key="NSControlView" ref="16222431"/>
<int key="NSButtonFlags">147079423</int>
<int key="NSButtonFlags2">173</int>
<object class="NSCustomResource" key="NSNormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSQuickLookTemplate</string>
</object>
<string key="NSAlternateContents"/>
<string type="base64-UTF8" key="NSKeyEquivalent">IA</string>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
</object>
<string key="NSFrame">{{639, 0}, {84, 24}}</string>
<reference key="NSSuperview" ref="375746871"/>
<string key="NSClassName">NSView</string>
</object>
</object>
<string key="NSFrame">{{0, 211}, {723, 24}}</string>
<reference key="NSSuperview" ref="891500945"/>
<string key="NSClassName">MGScopeBar</string>
Expand Down Expand Up @@ -1957,6 +1974,14 @@
</object>
<int key="connectionID">485</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">accessoryView</string>
<reference key="source" ref="932676109"/>
<reference key="destination" ref="951933530"/>
</object>
<int key="connectionID">487</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
Expand Down Expand Up @@ -2303,7 +2328,6 @@
<reference ref="258088911"/>
<reference ref="1006113529"/>
<reference ref="502319102"/>
<reference ref="16222431"/>
<reference ref="802449565"/>
</object>
<reference key="parent" ref="319362431"/>
Expand Down Expand Up @@ -2445,20 +2469,6 @@
<reference key="object" ref="534046869"/>
<reference key="parent" ref="802449565"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">49</int>
<reference key="object" ref="16222431"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="102056827"/>
</object>
<reference key="parent" ref="172148644"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">50</int>
<reference key="object" ref="102056827"/>
<reference key="parent" ref="16222431"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">407</int>
<reference key="object" ref="246205303"/>
Expand Down Expand Up @@ -2562,10 +2572,34 @@
<reference key="object" ref="375746871"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="951933530"/>
</object>
<reference key="parent" ref="891500945"/>
<string key="objectName">TypeBar</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">486</int>
<reference key="object" ref="951933530"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="16222431"/>
</object>
<reference key="parent" ref="375746871"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">49</int>
<reference key="object" ref="16222431"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="102056827"/>
</object>
<reference key="parent" ref="951933530"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">50</int>
<reference key="object" ref="102056827"/>
<reference key="parent" ref="16222431"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
Expand Down Expand Up @@ -2676,6 +2710,7 @@
<string>46.IBPluginDependency</string>
<string>475.IBPluginDependency</string>
<string>48.IBPluginDependency</string>
<string>486.IBPluginDependency</string>
<string>49.IBAttributePlaceholdersKey</string>
<string>49.IBPluginDependency</string>
<string>50.IBPluginDependency</string>
Expand Down Expand Up @@ -2859,6 +2894,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<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">
Expand Down Expand Up @@ -2892,7 +2928,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">485</int>
<int key="maxID">487</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
Expand All @@ -2904,31 +2940,38 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>accessoryView</string>
<string>historyController</string>
<string>typeBar</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSView</string>
<string>PBGitHistoryController</string>
<string>PBGitGradientBarView</string>
<string>MGScopeBar</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>accessoryView</string>
<string>historyController</string>
<string>typeBar</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">accessoryView</string>
<string key="candidateClassName">NSView</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">historyController</string>
<string key="candidateClassName">PBGitHistoryController</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">typeBar</string>
<string key="candidateClassName">PBGitGradientBarView</string>
<string key="candidateClassName">MGScopeBar</string>
</object>
</object>
</object>
Expand Down

0 comments on commit a7faf4f

Please sign in to comment.