BathyScapheで画像のインラインプレビューを可能にするプラグイン
| Revision | f7e7e29b7136db6cd7c96f512752259201dfad49 (tree) |
|---|---|
| Time | 2012-07-22 17:41:11 |
| Author | masakih <masakih@user...> |
| Commiter | masakih |
[Mod] サムネイルのサイズを変更可能にした
| @@ -0,0 +1,21 @@ | ||
| 1 | +// | |
| 2 | +// BSIPreferenceWindowController.h | |
| 3 | +// BSInlinePreviewer | |
| 4 | +// | |
| 5 | +// Created by 堀 昌樹 on 12/07/22. | |
| 6 | +// Copyright (c) 2012年 __MyCompanyName__. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Cocoa/Cocoa.h> | |
| 10 | + | |
| 11 | +@class BSIThumbnailSizeView; | |
| 12 | +@interface BSIPreferenceWindowController : NSWindowController | |
| 13 | +{ | |
| 14 | + BSIThumbnailSizeView *sizeView; | |
| 15 | + NSSize _thumbailSize; | |
| 16 | +} | |
| 17 | +@property (assign, nonatomic) IBOutlet BSIThumbnailSizeView *sizeView; | |
| 18 | + | |
| 19 | +@property (nonatomic) NSSize thumbnailSize; | |
| 20 | +@property (readonly) NSString *sizeString; | |
| 21 | +@end |
| @@ -0,0 +1,81 @@ | ||
| 1 | +// | |
| 2 | +// BSIPreferenceWindowController.m | |
| 3 | +// BSInlinePreviewer | |
| 4 | +// | |
| 5 | +// Created by 堀 昌樹 on 12/07/22. | |
| 6 | +// Copyright (c) 2012年 __MyCompanyName__. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "BSIPreferenceWindowController.h" | |
| 10 | +#import "BSIThumbnailSizeView.h" | |
| 11 | + | |
| 12 | + | |
| 13 | +@interface BSIPreferenceWindowController () | |
| 14 | + | |
| 15 | +@end | |
| 16 | + | |
| 17 | +@implementation BSIPreferenceWindowController | |
| 18 | +@synthesize sizeView; | |
| 19 | + | |
| 20 | +- (id)init | |
| 21 | +{ | |
| 22 | + self = [super initWithWindowNibName:NSStringFromClass([self class])]; | |
| 23 | + return self; | |
| 24 | +} | |
| 25 | +//- (id)initWithWindow:(NSWindow *)window | |
| 26 | +//{ | |
| 27 | +// self = [super initWithWindow:window]; | |
| 28 | +// if (self) { | |
| 29 | +// // Initialization code here. | |
| 30 | +// } | |
| 31 | +// | |
| 32 | +// return self; | |
| 33 | +//} | |
| 34 | +// | |
| 35 | +- (void)windowDidLoad | |
| 36 | +{ | |
| 37 | + [super windowDidLoad]; | |
| 38 | + | |
| 39 | + [[self window] setFrameAutosaveName:@"com.masakih.BSInlinePreviewer.BSIPreferenceWindow"]; | |
| 40 | + [self willChangeValueForKey:@"sizeString"]; | |
| 41 | + self.sizeView.imageSize = _thumbailSize; | |
| 42 | + [self didChangeValueForKey:@"sizeString"]; | |
| 43 | + [sizeView addObserver:self | |
| 44 | + forKeyPath:@"imageSize" | |
| 45 | + options:0 | |
| 46 | + context:sizeView]; | |
| 47 | +} | |
| 48 | +- (NSSize)thumbnailSize | |
| 49 | +{ | |
| 50 | + return sizeView.imageSize; | |
| 51 | +} | |
| 52 | +- (void)setThumbnailSize:(NSSize)thumbnailSize | |
| 53 | +{ | |
| 54 | + if(NSEqualSizes(_thumbailSize, thumbnailSize)) return; | |
| 55 | + | |
| 56 | + _thumbailSize = thumbnailSize; | |
| 57 | + sizeView.imageSize = thumbnailSize; | |
| 58 | +} | |
| 59 | + | |
| 60 | +- (NSString *)sizeString | |
| 61 | +{ | |
| 62 | + return [NSString stringWithFormat:@"%.0f %C %.0f", self.thumbnailSize.width, 0x00D7, self.thumbnailSize.height]; | |
| 63 | +} | |
| 64 | + | |
| 65 | ++(NSSet *)keyPathsForValuesAffectingSizeString | |
| 66 | +{ | |
| 67 | + return [NSSet setWithObject:@"thumbnailSize"]; | |
| 68 | +} | |
| 69 | +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context | |
| 70 | +{ | |
| 71 | + if(context == sizeView) { | |
| 72 | + [self willChangeValueForKey:@"thumbnailSize"]; | |
| 73 | + _thumbailSize = sizeView.imageSize; | |
| 74 | + [self didChangeValueForKey:@"thumbnailSize"]; | |
| 75 | + return; | |
| 76 | + } | |
| 77 | + | |
| 78 | + [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; | |
| 79 | +} | |
| 80 | + | |
| 81 | +@end |
| @@ -0,0 +1,559 @@ | ||
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00"> | |
| 3 | + <data> | |
| 4 | + <int key="IBDocument.SystemTarget">1070</int> | |
| 5 | + <string key="IBDocument.SystemVersion">11E53</string> | |
| 6 | + <string key="IBDocument.InterfaceBuilderVersion">2182</string> | |
| 7 | + <string key="IBDocument.AppKitVersion">1138.47</string> | |
| 8 | + <string key="IBDocument.HIToolboxVersion">569.00</string> | |
| 9 | + <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> | |
| 10 | + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 11 | + <string key="NS.object.0">2182</string> | |
| 12 | + </object> | |
| 13 | + <array key="IBDocument.IntegratedClassDependencies"> | |
| 14 | + <string>NSTextField</string> | |
| 15 | + <string>NSView</string> | |
| 16 | + <string>NSWindowTemplate</string> | |
| 17 | + <string>NSCustomObject</string> | |
| 18 | + <string>NSCustomView</string> | |
| 19 | + <string>IBNSLayoutConstraint</string> | |
| 20 | + <string>NSTextFieldCell</string> | |
| 21 | + </array> | |
| 22 | + <array key="IBDocument.PluginDependencies"> | |
| 23 | + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 24 | + </array> | |
| 25 | + <object class="NSMutableDictionary" key="IBDocument.Metadata"> | |
| 26 | + <string key="NS.key.0">PluginDependencyRecalculationVersion</string> | |
| 27 | + <integer value="1" key="NS.object.0"/> | |
| 28 | + </object> | |
| 29 | + <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> | |
| 30 | + <object class="NSCustomObject" id="1001"> | |
| 31 | + <string key="NSClassName">BSIPreferenceWindowController</string> | |
| 32 | + </object> | |
| 33 | + <object class="NSCustomObject" id="1003"> | |
| 34 | + <string key="NSClassName">FirstResponder</string> | |
| 35 | + </object> | |
| 36 | + <object class="NSCustomObject" id="1004"> | |
| 37 | + <string key="NSClassName">NSApplication</string> | |
| 38 | + </object> | |
| 39 | + <object class="NSWindowTemplate" id="1005"> | |
| 40 | + <int key="NSWindowStyleMask">15</int> | |
| 41 | + <int key="NSWindowBacking">2</int> | |
| 42 | + <string key="NSWindowRect">{{196, 240}, {392, 300}}</string> | |
| 43 | + <int key="NSWTFlags">1618477056</int> | |
| 44 | + <string key="NSWindowTitle">Window</string> | |
| 45 | + <string key="NSWindowClass">NSWindow</string> | |
| 46 | + <nil key="NSViewClass"/> | |
| 47 | + <nil key="NSUserInterfaceItemIdentifier"/> | |
| 48 | + <object class="NSView" key="NSWindowView" id="1006"> | |
| 49 | + <reference key="NSNextResponder"/> | |
| 50 | + <int key="NSvFlags">256</int> | |
| 51 | + <array class="NSMutableArray" key="NSSubviews"> | |
| 52 | + <object class="NSTextField" id="504613367"> | |
| 53 | + <reference key="NSNextResponder" ref="1006"/> | |
| 54 | + <int key="NSvFlags">268</int> | |
| 55 | + <string key="NSFrame">{{17, 263}, {134, 17}}</string> | |
| 56 | + <reference key="NSSuperview" ref="1006"/> | |
| 57 | + <reference key="NSWindow"/> | |
| 58 | + <reference key="NSNextKeyView" ref="1014347823"/> | |
| 59 | + <string key="NSReuseIdentifierKey">_NS:1505</string> | |
| 60 | + <bool key="NSEnabled">YES</bool> | |
| 61 | + <object class="NSTextFieldCell" key="NSCell" id="361832360"> | |
| 62 | + <int key="NSCellFlags">68288064</int> | |
| 63 | + <int key="NSCellFlags2">272630784</int> | |
| 64 | + <string key="NSContents">サムネイルの大きさ:</string> | |
| 65 | + <object class="NSFont" key="NSSupport" id="161386795"> | |
| 66 | + <string key="NSName">LucidaGrande</string> | |
| 67 | + <double key="NSSize">13</double> | |
| 68 | + <int key="NSfFlags">1044</int> | |
| 69 | + </object> | |
| 70 | + <string key="NSCellIdentifier">_NS:1505</string> | |
| 71 | + <reference key="NSControlView" ref="504613367"/> | |
| 72 | + <object class="NSColor" key="NSBackgroundColor" id="527356786"> | |
| 73 | + <int key="NSColorSpace">6</int> | |
| 74 | + <string key="NSCatalogName">System</string> | |
| 75 | + <string key="NSColorName">controlColor</string> | |
| 76 | + <object class="NSColor" key="NSColor"> | |
| 77 | + <int key="NSColorSpace">3</int> | |
| 78 | + <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes> | |
| 79 | + </object> | |
| 80 | + </object> | |
| 81 | + <object class="NSColor" key="NSTextColor" id="155024420"> | |
| 82 | + <int key="NSColorSpace">6</int> | |
| 83 | + <string key="NSCatalogName">System</string> | |
| 84 | + <string key="NSColorName">controlTextColor</string> | |
| 85 | + <object class="NSColor" key="NSColor"> | |
| 86 | + <int key="NSColorSpace">3</int> | |
| 87 | + <bytes key="NSWhite">MAA</bytes> | |
| 88 | + </object> | |
| 89 | + </object> | |
| 90 | + </object> | |
| 91 | + </object> | |
| 92 | + <object class="NSCustomView" id="294162957"> | |
| 93 | + <reference key="NSNextResponder" ref="1006"/> | |
| 94 | + <int key="NSvFlags">268</int> | |
| 95 | + <string key="NSFrame">{{20, 20}, {352, 235}}</string> | |
| 96 | + <reference key="NSSuperview" ref="1006"/> | |
| 97 | + <reference key="NSWindow"/> | |
| 98 | + <reference key="NSNextKeyView"/> | |
| 99 | + <string key="NSReuseIdentifierKey">_NS:9</string> | |
| 100 | + <string key="NSClassName">BSIThumbnailSizeView</string> | |
| 101 | + </object> | |
| 102 | + <object class="NSTextField" id="1014347823"> | |
| 103 | + <reference key="NSNextResponder" ref="1006"/> | |
| 104 | + <int key="NSvFlags">268</int> | |
| 105 | + <string key="NSFrame">{{156, 263}, {219, 17}}</string> | |
| 106 | + <reference key="NSSuperview" ref="1006"/> | |
| 107 | + <reference key="NSWindow"/> | |
| 108 | + <reference key="NSNextKeyView" ref="294162957"/> | |
| 109 | + <string key="NSReuseIdentifierKey">_NS:1505</string> | |
| 110 | + <bool key="NSEnabled">YES</bool> | |
| 111 | + <object class="NSTextFieldCell" key="NSCell" id="105423156"> | |
| 112 | + <int key="NSCellFlags">68288064</int> | |
| 113 | + <int key="NSCellFlags2">272630784</int> | |
| 114 | + <string key="NSContents">Label</string> | |
| 115 | + <reference key="NSSupport" ref="161386795"/> | |
| 116 | + <string key="NSCellIdentifier">_NS:1505</string> | |
| 117 | + <reference key="NSControlView" ref="1014347823"/> | |
| 118 | + <reference key="NSBackgroundColor" ref="527356786"/> | |
| 119 | + <reference key="NSTextColor" ref="155024420"/> | |
| 120 | + </object> | |
| 121 | + </object> | |
| 122 | + </array> | |
| 123 | + <string key="NSFrameSize">{392, 300}</string> | |
| 124 | + <reference key="NSSuperview"/> | |
| 125 | + <reference key="NSWindow"/> | |
| 126 | + <reference key="NSNextKeyView" ref="504613367"/> | |
| 127 | + </object> | |
| 128 | + <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> | |
| 129 | + <string key="NSMaxSize">{10000000000000, 10000000000000}</string> | |
| 130 | + <bool key="NSWindowIsRestorable">YES</bool> | |
| 131 | + </object> | |
| 132 | + </array> | |
| 133 | + <object class="IBObjectContainer" key="IBDocument.Objects"> | |
| 134 | + <array class="NSMutableArray" key="connectionRecords"> | |
| 135 | + <object class="IBConnectionRecord"> | |
| 136 | + <object class="IBOutletConnection" key="connection"> | |
| 137 | + <string key="label">window</string> | |
| 138 | + <reference key="source" ref="1001"/> | |
| 139 | + <reference key="destination" ref="1005"/> | |
| 140 | + </object> | |
| 141 | + <int key="connectionID">3</int> | |
| 142 | + </object> | |
| 143 | + <object class="IBConnectionRecord"> | |
| 144 | + <object class="IBOutletConnection" key="connection"> | |
| 145 | + <string key="label">sizeView</string> | |
| 146 | + <reference key="source" ref="1001"/> | |
| 147 | + <reference key="destination" ref="294162957"/> | |
| 148 | + </object> | |
| 149 | + <int key="connectionID">32</int> | |
| 150 | + </object> | |
| 151 | + <object class="IBConnectionRecord"> | |
| 152 | + <object class="IBOutletConnection" key="connection"> | |
| 153 | + <string key="label">delegate</string> | |
| 154 | + <reference key="source" ref="1005"/> | |
| 155 | + <reference key="destination" ref="1001"/> | |
| 156 | + </object> | |
| 157 | + <int key="connectionID">4</int> | |
| 158 | + </object> | |
| 159 | + <object class="IBConnectionRecord"> | |
| 160 | + <object class="IBBindingConnection" key="connection"> | |
| 161 | + <string key="label">displayPatternValue1: sizeString</string> | |
| 162 | + <reference key="source" ref="1014347823"/> | |
| 163 | + <reference key="destination" ref="1001"/> | |
| 164 | + <object class="NSNibBindingConnector" key="connector"> | |
| 165 | + <reference key="NSSource" ref="1014347823"/> | |
| 166 | + <reference key="NSDestination" ref="1001"/> | |
| 167 | + <string key="NSLabel">displayPatternValue1: sizeString</string> | |
| 168 | + <string key="NSBinding">displayPatternValue1</string> | |
| 169 | + <string key="NSKeyPath">sizeString</string> | |
| 170 | + <object class="NSDictionary" key="NSOptions"> | |
| 171 | + <string key="NS.key.0">NSDisplayPattern</string> | |
| 172 | + <string key="NS.object.0">%{value1}@ ぐらい</string> | |
| 173 | + </object> | |
| 174 | + <int key="NSNibBindingConnectorVersion">2</int> | |
| 175 | + </object> | |
| 176 | + </object> | |
| 177 | + <int key="connectionID">68</int> | |
| 178 | + </object> | |
| 179 | + </array> | |
| 180 | + <object class="IBMutableOrderedSet" key="objectRecords"> | |
| 181 | + <array key="orderedObjects"> | |
| 182 | + <object class="IBObjectRecord"> | |
| 183 | + <int key="objectID">0</int> | |
| 184 | + <array key="object" id="0"/> | |
| 185 | + <reference key="children" ref="1000"/> | |
| 186 | + <nil key="parent"/> | |
| 187 | + </object> | |
| 188 | + <object class="IBObjectRecord"> | |
| 189 | + <int key="objectID">-2</int> | |
| 190 | + <reference key="object" ref="1001"/> | |
| 191 | + <reference key="parent" ref="0"/> | |
| 192 | + <string key="objectName">File's Owner</string> | |
| 193 | + </object> | |
| 194 | + <object class="IBObjectRecord"> | |
| 195 | + <int key="objectID">-1</int> | |
| 196 | + <reference key="object" ref="1003"/> | |
| 197 | + <reference key="parent" ref="0"/> | |
| 198 | + <string key="objectName">First Responder</string> | |
| 199 | + </object> | |
| 200 | + <object class="IBObjectRecord"> | |
| 201 | + <int key="objectID">-3</int> | |
| 202 | + <reference key="object" ref="1004"/> | |
| 203 | + <reference key="parent" ref="0"/> | |
| 204 | + <string key="objectName">Application</string> | |
| 205 | + </object> | |
| 206 | + <object class="IBObjectRecord"> | |
| 207 | + <int key="objectID">1</int> | |
| 208 | + <reference key="object" ref="1005"/> | |
| 209 | + <array class="NSMutableArray" key="children"> | |
| 210 | + <reference ref="1006"/> | |
| 211 | + </array> | |
| 212 | + <reference key="parent" ref="0"/> | |
| 213 | + </object> | |
| 214 | + <object class="IBObjectRecord"> | |
| 215 | + <int key="objectID">2</int> | |
| 216 | + <reference key="object" ref="1006"/> | |
| 217 | + <array class="NSMutableArray" key="children"> | |
| 218 | + <reference ref="504613367"/> | |
| 219 | + <reference ref="294162957"/> | |
| 220 | + <object class="IBNSLayoutConstraint" id="73386786"> | |
| 221 | + <reference key="firstItem" ref="504613367"/> | |
| 222 | + <int key="firstAttribute">3</int> | |
| 223 | + <int key="relation">0</int> | |
| 224 | + <reference key="secondItem" ref="1006"/> | |
| 225 | + <int key="secondAttribute">3</int> | |
| 226 | + <float key="multiplier">1</float> | |
| 227 | + <object class="IBNSLayoutSymbolicConstant" key="constant"> | |
| 228 | + <double key="value">20</double> | |
| 229 | + </object> | |
| 230 | + <float key="priority">1000</float> | |
| 231 | + <int key="scoringType">8</int> | |
| 232 | + <float key="scoringTypeFloat">29</float> | |
| 233 | + <int key="contentType">3</int> | |
| 234 | + <reference key="containingView" ref="1006"/> | |
| 235 | + </object> | |
| 236 | + <object class="IBNSLayoutConstraint" id="392589468"> | |
| 237 | + <reference key="firstItem" ref="1006"/> | |
| 238 | + <int key="firstAttribute">4</int> | |
| 239 | + <int key="relation">0</int> | |
| 240 | + <reference key="secondItem" ref="294162957"/> | |
| 241 | + <int key="secondAttribute">4</int> | |
| 242 | + <float key="multiplier">1</float> | |
| 243 | + <object class="IBNSLayoutSymbolicConstant" key="constant"> | |
| 244 | + <double key="value">20</double> | |
| 245 | + </object> | |
| 246 | + <float key="priority">1000</float> | |
| 247 | + <int key="scoringType">8</int> | |
| 248 | + <float key="scoringTypeFloat">29</float> | |
| 249 | + <int key="contentType">3</int> | |
| 250 | + <reference key="containingView" ref="1006"/> | |
| 251 | + </object> | |
| 252 | + <object class="IBNSLayoutConstraint" id="564137557"> | |
| 253 | + <reference key="firstItem" ref="1006"/> | |
| 254 | + <int key="firstAttribute">6</int> | |
| 255 | + <int key="relation">0</int> | |
| 256 | + <reference key="secondItem" ref="294162957"/> | |
| 257 | + <int key="secondAttribute">6</int> | |
| 258 | + <float key="multiplier">1</float> | |
| 259 | + <object class="IBNSLayoutSymbolicConstant" key="constant"> | |
| 260 | + <double key="value">20</double> | |
| 261 | + </object> | |
| 262 | + <float key="priority">1000</float> | |
| 263 | + <int key="scoringType">8</int> | |
| 264 | + <float key="scoringTypeFloat">29</float> | |
| 265 | + <int key="contentType">3</int> | |
| 266 | + <reference key="containingView" ref="1006"/> | |
| 267 | + </object> | |
| 268 | + <reference ref="1014347823"/> | |
| 269 | + <object class="IBNSLayoutConstraint" id="438833610"> | |
| 270 | + <reference key="firstItem" ref="294162957"/> | |
| 271 | + <int key="firstAttribute">3</int> | |
| 272 | + <int key="relation">0</int> | |
| 273 | + <reference key="secondItem" ref="504613367"/> | |
| 274 | + <int key="secondAttribute">4</int> | |
| 275 | + <float key="multiplier">1</float> | |
| 276 | + <object class="IBNSLayoutSymbolicConstant" key="constant"> | |
| 277 | + <double key="value">8</double> | |
| 278 | + </object> | |
| 279 | + <float key="priority">1000</float> | |
| 280 | + <int key="scoringType">6</int> | |
| 281 | + <float key="scoringTypeFloat">24</float> | |
| 282 | + <int key="contentType">3</int> | |
| 283 | + <reference key="containingView" ref="1006"/> | |
| 284 | + </object> | |
| 285 | + <object class="IBNSLayoutConstraint" id="1046472371"> | |
| 286 | + <reference key="firstItem" ref="294162957"/> | |
| 287 | + <int key="firstAttribute">5</int> | |
| 288 | + <int key="relation">0</int> | |
| 289 | + <reference key="secondItem" ref="1006"/> | |
| 290 | + <int key="secondAttribute">5</int> | |
| 291 | + <float key="multiplier">1</float> | |
| 292 | + <object class="IBNSLayoutSymbolicConstant" key="constant"> | |
| 293 | + <double key="value">20</double> | |
| 294 | + </object> | |
| 295 | + <float key="priority">1000</float> | |
| 296 | + <int key="scoringType">8</int> | |
| 297 | + <float key="scoringTypeFloat">29</float> | |
| 298 | + <int key="contentType">3</int> | |
| 299 | + <reference key="containingView" ref="1006"/> | |
| 300 | + </object> | |
| 301 | + <object class="IBNSLayoutConstraint" id="619533223"> | |
| 302 | + <reference key="firstItem" ref="504613367"/> | |
| 303 | + <int key="firstAttribute">5</int> | |
| 304 | + <int key="relation">0</int> | |
| 305 | + <reference key="secondItem" ref="1006"/> | |
| 306 | + <int key="secondAttribute">5</int> | |
| 307 | + <float key="multiplier">1</float> | |
| 308 | + <object class="IBNSLayoutSymbolicConstant" key="constant"> | |
| 309 | + <double key="value">20</double> | |
| 310 | + </object> | |
| 311 | + <float key="priority">1000</float> | |
| 312 | + <int key="scoringType">8</int> | |
| 313 | + <float key="scoringTypeFloat">29</float> | |
| 314 | + <int key="contentType">3</int> | |
| 315 | + <reference key="containingView" ref="1006"/> | |
| 316 | + </object> | |
| 317 | + <object class="IBNSLayoutConstraint" id="377278276"> | |
| 318 | + <reference key="firstItem" ref="1014347823"/> | |
| 319 | + <int key="firstAttribute">3</int> | |
| 320 | + <int key="relation">0</int> | |
| 321 | + <reference key="secondItem" ref="1006"/> | |
| 322 | + <int key="secondAttribute">3</int> | |
| 323 | + <float key="multiplier">1</float> | |
| 324 | + <object class="IBNSLayoutSymbolicConstant" key="constant"> | |
| 325 | + <double key="value">20</double> | |
| 326 | + </object> | |
| 327 | + <float key="priority">1000</float> | |
| 328 | + <int key="scoringType">8</int> | |
| 329 | + <float key="scoringTypeFloat">29</float> | |
| 330 | + <int key="contentType">3</int> | |
| 331 | + <reference key="containingView" ref="1006"/> | |
| 332 | + </object> | |
| 333 | + <object class="IBNSLayoutConstraint" id="652752287"> | |
| 334 | + <reference key="firstItem" ref="1006"/> | |
| 335 | + <int key="firstAttribute">6</int> | |
| 336 | + <int key="relation">0</int> | |
| 337 | + <reference key="secondItem" ref="1014347823"/> | |
| 338 | + <int key="secondAttribute">6</int> | |
| 339 | + <float key="multiplier">1</float> | |
| 340 | + <object class="IBNSLayoutSymbolicConstant" key="constant"> | |
| 341 | + <double key="value">20</double> | |
| 342 | + </object> | |
| 343 | + <float key="priority">1000</float> | |
| 344 | + <int key="scoringType">9</int> | |
| 345 | + <float key="scoringTypeFloat">40</float> | |
| 346 | + <int key="contentType">3</int> | |
| 347 | + <reference key="containingView" ref="1006"/> | |
| 348 | + </object> | |
| 349 | + <object class="IBNSLayoutConstraint" id="214252530"> | |
| 350 | + <reference key="firstItem" ref="1014347823"/> | |
| 351 | + <int key="firstAttribute">5</int> | |
| 352 | + <int key="relation">0</int> | |
| 353 | + <reference key="secondItem" ref="1006"/> | |
| 354 | + <int key="secondAttribute">5</int> | |
| 355 | + <float key="multiplier">1</float> | |
| 356 | + <object class="IBLayoutConstant" key="constant"> | |
| 357 | + <double key="value">159</double> | |
| 358 | + </object> | |
| 359 | + <float key="priority">1000</float> | |
| 360 | + <int key="scoringType">9</int> | |
| 361 | + <float key="scoringTypeFloat">40</float> | |
| 362 | + <int key="contentType">3</int> | |
| 363 | + <reference key="containingView" ref="1006"/> | |
| 364 | + </object> | |
| 365 | + </array> | |
| 366 | + <reference key="parent" ref="1005"/> | |
| 367 | + </object> | |
| 368 | + <object class="IBObjectRecord"> | |
| 369 | + <int key="objectID">5</int> | |
| 370 | + <reference key="object" ref="504613367"/> | |
| 371 | + <array class="NSMutableArray" key="children"> | |
| 372 | + <reference ref="361832360"/> | |
| 373 | + </array> | |
| 374 | + <reference key="parent" ref="1006"/> | |
| 375 | + </object> | |
| 376 | + <object class="IBObjectRecord"> | |
| 377 | + <int key="objectID">6</int> | |
| 378 | + <reference key="object" ref="361832360"/> | |
| 379 | + <reference key="parent" ref="504613367"/> | |
| 380 | + </object> | |
| 381 | + <object class="IBObjectRecord"> | |
| 382 | + <int key="objectID">11</int> | |
| 383 | + <reference key="object" ref="294162957"/> | |
| 384 | + <reference key="parent" ref="1006"/> | |
| 385 | + </object> | |
| 386 | + <object class="IBObjectRecord"> | |
| 387 | + <int key="objectID">29</int> | |
| 388 | + <reference key="object" ref="73386786"/> | |
| 389 | + <reference key="parent" ref="1006"/> | |
| 390 | + </object> | |
| 391 | + <object class="IBObjectRecord"> | |
| 392 | + <int key="objectID">33</int> | |
| 393 | + <reference key="object" ref="1014347823"/> | |
| 394 | + <array class="NSMutableArray" key="children"> | |
| 395 | + <reference ref="105423156"/> | |
| 396 | + </array> | |
| 397 | + <reference key="parent" ref="1006"/> | |
| 398 | + </object> | |
| 399 | + <object class="IBObjectRecord"> | |
| 400 | + <int key="objectID">34</int> | |
| 401 | + <reference key="object" ref="105423156"/> | |
| 402 | + <reference key="parent" ref="1014347823"/> | |
| 403 | + </object> | |
| 404 | + <object class="IBObjectRecord"> | |
| 405 | + <int key="objectID">39</int> | |
| 406 | + <reference key="object" ref="619533223"/> | |
| 407 | + <reference key="parent" ref="1006"/> | |
| 408 | + </object> | |
| 409 | + <object class="IBObjectRecord"> | |
| 410 | + <int key="objectID">44</int> | |
| 411 | + <reference key="object" ref="214252530"/> | |
| 412 | + <reference key="parent" ref="1006"/> | |
| 413 | + </object> | |
| 414 | + <object class="IBObjectRecord"> | |
| 415 | + <int key="objectID">41</int> | |
| 416 | + <reference key="object" ref="652752287"/> | |
| 417 | + <reference key="parent" ref="1006"/> | |
| 418 | + </object> | |
| 419 | + <object class="IBObjectRecord"> | |
| 420 | + <int key="objectID">31</int> | |
| 421 | + <reference key="object" ref="564137557"/> | |
| 422 | + <reference key="parent" ref="1006"/> | |
| 423 | + </object> | |
| 424 | + <object class="IBObjectRecord"> | |
| 425 | + <int key="objectID">30</int> | |
| 426 | + <reference key="object" ref="392589468"/> | |
| 427 | + <reference key="parent" ref="1006"/> | |
| 428 | + </object> | |
| 429 | + <object class="IBObjectRecord"> | |
| 430 | + <int key="objectID">40</int> | |
| 431 | + <reference key="object" ref="377278276"/> | |
| 432 | + <reference key="parent" ref="1006"/> | |
| 433 | + </object> | |
| 434 | + <object class="IBObjectRecord"> | |
| 435 | + <int key="objectID">38</int> | |
| 436 | + <reference key="object" ref="1046472371"/> | |
| 437 | + <reference key="parent" ref="1006"/> | |
| 438 | + </object> | |
| 439 | + <object class="IBObjectRecord"> | |
| 440 | + <int key="objectID">37</int> | |
| 441 | + <reference key="object" ref="438833610"/> | |
| 442 | + <reference key="parent" ref="1006"/> | |
| 443 | + </object> | |
| 444 | + </array> | |
| 445 | + </object> | |
| 446 | + <dictionary class="NSMutableDictionary" key="flattenedProperties"> | |
| 447 | + <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 448 | + <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 449 | + <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 450 | + <string key="1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 451 | + <string key="1.IBWindowTemplateEditedContentRect">{{357, 418}, {480, 270}}</string> | |
| 452 | + <boolean value="NO" key="1.NSWindowTemplate.visibleAtLaunch"/> | |
| 453 | + <boolean value="NO" key="11.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> | |
| 454 | + <string key="11.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 455 | + <array key="2.IBNSViewMetadataConstraints"> | |
| 456 | + <reference ref="73386786"/> | |
| 457 | + <reference ref="392589468"/> | |
| 458 | + <reference ref="564137557"/> | |
| 459 | + <reference ref="438833610"/> | |
| 460 | + <reference ref="1046472371"/> | |
| 461 | + <reference ref="619533223"/> | |
| 462 | + <reference ref="377278276"/> | |
| 463 | + <reference ref="652752287"/> | |
| 464 | + <reference ref="214252530"/> | |
| 465 | + </array> | |
| 466 | + <string key="2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 467 | + <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 468 | + <string key="30.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 469 | + <string key="31.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 470 | + <boolean value="NO" key="33.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> | |
| 471 | + <string key="33.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 472 | + <string key="34.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 473 | + <string key="37.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 474 | + <string key="38.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 475 | + <string key="39.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 476 | + <string key="40.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 477 | + <string key="41.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 478 | + <string key="44.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 479 | + <boolean value="NO" key="5.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> | |
| 480 | + <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 481 | + <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> | |
| 482 | + </dictionary> | |
| 483 | + <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/> | |
| 484 | + <nil key="activeLocalization"/> | |
| 485 | + <dictionary class="NSMutableDictionary" key="localizations"/> | |
| 486 | + <nil key="sourceID"/> | |
| 487 | + <int key="maxID">68</int> | |
| 488 | + </object> | |
| 489 | + <object class="IBClassDescriber" key="IBDocument.Classes"> | |
| 490 | + <array class="NSMutableArray" key="referencedPartialClassDescriptions"> | |
| 491 | + <object class="IBPartialClassDescription"> | |
| 492 | + <string key="className">BSIPreferenceWindowController</string> | |
| 493 | + <string key="superclassName">NSWindowController</string> | |
| 494 | + <object class="NSMutableDictionary" key="outlets"> | |
| 495 | + <string key="NS.key.0">sizeView</string> | |
| 496 | + <string key="NS.object.0">BSIThumbnailSizeView</string> | |
| 497 | + </object> | |
| 498 | + <object class="NSMutableDictionary" key="toOneOutletInfosByName"> | |
| 499 | + <string key="NS.key.0">sizeView</string> | |
| 500 | + <object class="IBToOneOutletInfo" key="NS.object.0"> | |
| 501 | + <string key="name">sizeView</string> | |
| 502 | + <string key="candidateClassName">BSIThumbnailSizeView</string> | |
| 503 | + </object> | |
| 504 | + </object> | |
| 505 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> | |
| 506 | + <string key="majorKey">IBProjectSource</string> | |
| 507 | + <string key="minorKey">./Classes/BSIPreferenceWindowController.h</string> | |
| 508 | + </object> | |
| 509 | + </object> | |
| 510 | + <object class="IBPartialClassDescription"> | |
| 511 | + <string key="className">BSIThumbnailSizeView</string> | |
| 512 | + <string key="superclassName">NSView</string> | |
| 513 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> | |
| 514 | + <string key="majorKey">IBProjectSource</string> | |
| 515 | + <string key="minorKey">./Classes/BSIThumbnailSizeView.h</string> | |
| 516 | + </object> | |
| 517 | + </object> | |
| 518 | + <object class="IBPartialClassDescription"> | |
| 519 | + <string key="className">NSLayoutConstraint</string> | |
| 520 | + <string key="superclassName">NSObject</string> | |
| 521 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> | |
| 522 | + <string key="majorKey">IBProjectSource</string> | |
| 523 | + <string key="minorKey">./Classes/NSLayoutConstraint.h</string> | |
| 524 | + </object> | |
| 525 | + </object> | |
| 526 | + <object class="IBPartialClassDescription"> | |
| 527 | + <string key="className">NSObject</string> | |
| 528 | + <dictionary class="NSMutableDictionary" key="actions"> | |
| 529 | + <string key="showPreviewerPreferences:">id</string> | |
| 530 | + <string key="togglePreviewPanel:">id</string> | |
| 531 | + </dictionary> | |
| 532 | + <dictionary class="NSMutableDictionary" key="actionInfosByName"> | |
| 533 | + <object class="IBActionInfo" key="showPreviewerPreferences:"> | |
| 534 | + <string key="name">showPreviewerPreferences:</string> | |
| 535 | + <string key="candidateClassName">id</string> | |
| 536 | + </object> | |
| 537 | + <object class="IBActionInfo" key="togglePreviewPanel:"> | |
| 538 | + <string key="name">togglePreviewPanel:</string> | |
| 539 | + <string key="candidateClassName">id</string> | |
| 540 | + </object> | |
| 541 | + </dictionary> | |
| 542 | + <object class="IBClassDescriptionSource" key="sourceIdentifier"> | |
| 543 | + <string key="majorKey">IBProjectSource</string> | |
| 544 | + <string key="minorKey">./Classes/NSObject.h</string> | |
| 545 | + </object> | |
| 546 | + </object> | |
| 547 | + </array> | |
| 548 | + </object> | |
| 549 | + <int key="IBDocument.localizationMode">0</int> | |
| 550 | + <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> | |
| 551 | + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults"> | |
| 552 | + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string> | |
| 553 | + <real value="1070" key="NS.object.0"/> | |
| 554 | + </object> | |
| 555 | + <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> | |
| 556 | + <int key="IBDocument.defaultPropertyAccessControl">3</int> | |
| 557 | + <bool key="IBDocument.UseAutolayout">YES</bool> | |
| 558 | + </data> | |
| 559 | +</archive> |
| @@ -0,0 +1,17 @@ | ||
| 1 | +// | |
| 2 | +// BSIThumbnailSizeView.h | |
| 3 | +// BSInlinePreviewer | |
| 4 | +// | |
| 5 | +// Created by 堀 昌樹 on 12/07/22. | |
| 6 | +// Copyright (c) 2012年 __MyCompanyName__. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Cocoa/Cocoa.h> | |
| 10 | + | |
| 11 | +@interface BSIThumbnailSizeView : NSView | |
| 12 | +{ | |
| 13 | + NSImageCell *cell; | |
| 14 | + NSSize _imageSize; | |
| 15 | +} | |
| 16 | +@property (nonatomic) NSSize imageSize; | |
| 17 | +@end |
| @@ -0,0 +1,73 @@ | ||
| 1 | +// | |
| 2 | +// BSIThumbnailSizeView.m | |
| 3 | +// BSInlinePreviewer | |
| 4 | +// | |
| 5 | +// Created by 堀 昌樹 on 12/07/22. | |
| 6 | +// Copyright (c) 2012年 __MyCompanyName__. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "BSIThumbnailSizeView.h" | |
| 10 | + | |
| 11 | +@implementation BSIThumbnailSizeView | |
| 12 | +@synthesize imageSize = _imageSize; | |
| 13 | + | |
| 14 | +- (NSImage *)notFoundImage | |
| 15 | +{ | |
| 16 | + NSBundle *myBundle = [NSBundle bundleForClass:[self class]]; | |
| 17 | + NSString *path = [myBundle pathForImageResource:@"notFound"]; | |
| 18 | + | |
| 19 | + if(!path) return nil; | |
| 20 | + | |
| 21 | + return [[[NSImage alloc] initWithContentsOfFile:path] autorelease]; | |
| 22 | +} | |
| 23 | +- (id)initWithFrame:(NSRect)frame | |
| 24 | +{ | |
| 25 | + self = [super initWithFrame:frame]; | |
| 26 | + if (self) { | |
| 27 | + cell = [[NSImageCell alloc] initImageCell:[self notFoundImage]]; | |
| 28 | + [cell setImageScaling:NSImageScaleProportionallyUpOrDown]; | |
| 29 | + [cell setImageAlignment:NSImageAlignCenter]; | |
| 30 | + [cell setImageFrameStyle:NSImageFramePhoto]; | |
| 31 | + | |
| 32 | + self.imageSize = NSMakeSize(200, 200); | |
| 33 | + } | |
| 34 | + | |
| 35 | + return self; | |
| 36 | +} | |
| 37 | + | |
| 38 | +- (void)drawRect:(NSRect)dirtyRect | |
| 39 | +{ | |
| 40 | + NSRect frame = [self frame]; | |
| 41 | + | |
| 42 | + NSRect imageRect; | |
| 43 | + imageRect.size = _imageSize; | |
| 44 | + imageRect.origin.x = (frame.size.width - _imageSize.width) * 0.5; | |
| 45 | + imageRect.origin.y = (frame.size.height - _imageSize.height) * 0.5; | |
| 46 | +// [cell drawWithFrame:imageRect inView:self]; | |
| 47 | + [cell drawInteriorWithFrame:imageRect inView:self]; | |
| 48 | + | |
| 49 | + frame.origin = NSZeroPoint; | |
| 50 | + [[NSColor controlShadowColor] set]; | |
| 51 | + NSBezierPath *path = [NSBezierPath bezierPathWithRect:frame]; | |
| 52 | + [path stroke]; | |
| 53 | +} | |
| 54 | + | |
| 55 | +- (void)magnifyWithEvent:(NSEvent *)event | |
| 56 | +{ | |
| 57 | + CGFloat scale = [event magnification] + 1.0; | |
| 58 | + NSSize newSize = self.imageSize; | |
| 59 | + newSize.height *= scale; | |
| 60 | + newSize.width *= scale; | |
| 61 | + if(newSize.height < 10 || newSize.width < 10) return; | |
| 62 | + | |
| 63 | + self.imageSize = newSize; | |
| 64 | + [self setNeedsDisplay:YES]; | |
| 65 | + | |
| 66 | +} | |
| 67 | + | |
| 68 | +- (void)setImageSize:(NSSize)imageSize | |
| 69 | +{ | |
| 70 | + if(NSEqualSizes(_imageSize, imageSize)) return; | |
| 71 | + _imageSize = imageSize; | |
| 72 | +} | |
| 73 | +@end |
| @@ -11,6 +11,8 @@ | ||
| 11 | 11 | |
| 12 | 12 | #import "BSPreviewPluginInterface.h" |
| 13 | 13 | |
| 14 | +@class BSIPreferenceWindowController; | |
| 15 | + | |
| 14 | 16 | @interface BSInlinePreviewer : NSObject <BSImagePreviewerProtocol, BSLinkPreviewing> |
| 15 | 17 | { |
| 16 | 18 | AppDefaults *preference; |
| @@ -28,12 +30,15 @@ | ||
| 28 | 30 | NSUInteger remainder; |
| 29 | 31 | |
| 30 | 32 | NSCache *cache; |
| 33 | + | |
| 34 | + BSIPreferenceWindowController *pref; | |
| 35 | + NSSize _previewSize; | |
| 31 | 36 | } |
| 32 | 37 | |
| 33 | 38 | @property (nonatomic) NSUInteger totalDownloads; |
| 34 | 39 | @property (nonatomic) NSUInteger remainder; |
| 40 | +@property (assign, nonatomic) NSSize previewSize; | |
| 35 | 41 | |
| 36 | -- (NSSize)previewSize; | |
| 37 | 42 | - (void)setTargetThreadView:(id)view; |
| 38 | 43 | - (id)targetThreadView; |
| 39 | 44 | - (void)setTargetTextStorage:(NSTextStorage *)ts; |
| @@ -9,6 +9,7 @@ | ||
| 9 | 9 | #import "BSInlinePreviewer.h" |
| 10 | 10 | #import "BSILinkInfomation.h" |
| 11 | 11 | |
| 12 | +#import "BSIPreferenceWindowController.h" | |
| 12 | 13 | |
| 13 | 14 | @interface BSInlinePreviewer(Private) |
| 14 | 15 | - (NSRange)linkRange; |
| @@ -32,7 +33,10 @@ | ||
| 32 | 33 | NSString *const BSInlinePreviewerPreviewed = @"BSInlinePreviewerPreviewed"; |
| 33 | 34 | const NSUInteger alreadyPreviewed = NSNotFound - 1; |
| 34 | 35 | |
| 36 | +static NSString *ThumbnailSizeKey = @"com.masakih.BSInlinePreviewer.thumbnailSize"; | |
| 37 | + | |
| 35 | 38 | @synthesize totalDownloads, remainder; |
| 39 | +@synthesize previewSize = _previewSize; | |
| 36 | 40 | |
| 37 | 41 | #pragma mark ## BSImagePreviewerProtocol |
| 38 | 42 | // Designated Initializer |
| @@ -56,6 +60,35 @@ const NSUInteger alreadyPreviewed = NSNotFound - 1; | ||
| 56 | 60 | - (void)setPreferences:(AppDefaults *)aPreferences |
| 57 | 61 | { |
| 58 | 62 | preference = aPreferences; |
| 63 | + NSSize size = NSSizeFromString([[aPreferences imagePreviewerPrefsDict] objectForKey:ThumbnailSizeKey]); | |
| 64 | + if(NSEqualSizes(size, NSZeroSize)) { | |
| 65 | + self.previewSize = NSMakeSize(100, 100); | |
| 66 | + } else { | |
| 67 | + self.previewSize = size; | |
| 68 | + } | |
| 69 | +} | |
| 70 | + | |
| 71 | +- (IBAction)showPreviewerPreferences:(id)sender | |
| 72 | +{ | |
| 73 | + if(!pref) { | |
| 74 | + pref = [[BSIPreferenceWindowController alloc] init]; | |
| 75 | + pref.thumbnailSize = self.previewSize; | |
| 76 | + [pref addObserver:self | |
| 77 | + forKeyPath:@"thumbnailSize" | |
| 78 | + options:0 | |
| 79 | + context:pref]; | |
| 80 | + } | |
| 81 | + [pref showWindow:nil]; | |
| 82 | +} | |
| 83 | + | |
| 84 | +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context | |
| 85 | +{ | |
| 86 | + if(context == pref) { | |
| 87 | + self.previewSize = pref.thumbnailSize; | |
| 88 | + [cache removeAllObjects]; | |
| 89 | + return; | |
| 90 | + } | |
| 91 | + [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; | |
| 59 | 92 | } |
| 60 | 93 | // Action |
| 61 | 94 | - (BOOL)showImageWithURL:(NSURL *)imageURL |
| @@ -196,6 +229,14 @@ const NSUInteger alreadyPreviewed = NSNotFound - 1; | ||
| 196 | 229 | } |
| 197 | 230 | |
| 198 | 231 | #pragma mark ## Accessor |
| 232 | + | |
| 233 | +- (void)setPreviewSize:(NSSize)previewSize | |
| 234 | +{ | |
| 235 | + _previewSize = previewSize; | |
| 236 | + NSMutableDictionary *dict = [preference imagePreviewerPrefsDict]; | |
| 237 | + [dict setObject:NSStringFromSize(previewSize) | |
| 238 | + forKey:ThumbnailSizeKey]; | |
| 239 | +} | |
| 199 | 240 | - (void)loadProgressPanel |
| 200 | 241 | { |
| 201 | 242 | if(progressPanel) return; |
| @@ -230,10 +271,7 @@ const NSUInteger alreadyPreviewed = NSNotFound - 1; | ||
| 230 | 271 | [progressPanel orderOut:self]; |
| 231 | 272 | [NSApp endSheet:progressPanel]; |
| 232 | 273 | } |
| 233 | -- (NSSize)previewSize | |
| 234 | -{ | |
| 235 | - return NSMakeSize(100.0, 100.0); | |
| 236 | -} | |
| 274 | + | |
| 237 | 275 | - (NSTimeInterval)timeoutInterval |
| 238 | 276 | { |
| 239 | 277 | return 20.0; |
| @@ -9,6 +9,9 @@ | ||
| 9 | 9 | /* Begin PBXBuildFile section */ |
| 10 | 10 | 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; |
| 11 | 11 | 8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; |
| 12 | + F43172A015BB9B6E00210D48 /* BSIPreferenceWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = F431729E15BB9B6E00210D48 /* BSIPreferenceWindowController.m */; }; | |
| 13 | + F43172A115BB9B6E00210D48 /* BSIPreferenceWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F431729F15BB9B6E00210D48 /* BSIPreferenceWindowController.xib */; }; | |
| 14 | + F43172A415BB9BFF00210D48 /* BSIThumbnailSizeView.m in Sources */ = {isa = PBXBuildFile; fileRef = F43172A315BB9BFF00210D48 /* BSIThumbnailSizeView.m */; }; | |
| 12 | 15 | F468C5C912201875009EFA3E /* BSILinkInfomation.m in Sources */ = {isa = PBXBuildFile; fileRef = F468C5C812201875009EFA3E /* BSILinkInfomation.m */; }; |
| 13 | 16 | F468C69D1220CA07009EFA3E /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F468C69C1220CA07009EFA3E /* WebKit.framework */; }; |
| 14 | 17 | F4C8070C0E53CCB000BF4144 /* BSInlinePreviewer.m in Sources */ = {isa = PBXBuildFile; fileRef = F4C8070B0E53CCB000BF4144 /* BSInlinePreviewer.m */; }; |
| @@ -25,6 +28,11 @@ | ||
| 25 | 28 | 8D5B49B6048680CD000E48DA /* BSInlinePreviewer.plugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BSInlinePreviewer.plugin; sourceTree = BUILT_PRODUCTS_DIR; }; |
| 26 | 29 | 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; |
| 27 | 30 | D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; }; |
| 31 | + F431729D15BB9B6E00210D48 /* BSIPreferenceWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BSIPreferenceWindowController.h; sourceTree = "<group>"; }; | |
| 32 | + F431729E15BB9B6E00210D48 /* BSIPreferenceWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BSIPreferenceWindowController.m; sourceTree = "<group>"; }; | |
| 33 | + F431729F15BB9B6E00210D48 /* BSIPreferenceWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BSIPreferenceWindowController.xib; sourceTree = "<group>"; }; | |
| 34 | + F43172A215BB9BFE00210D48 /* BSIThumbnailSizeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BSIThumbnailSizeView.h; sourceTree = "<group>"; }; | |
| 35 | + F43172A315BB9BFF00210D48 /* BSIThumbnailSizeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BSIThumbnailSizeView.m; sourceTree = "<group>"; }; | |
| 28 | 36 | F468C45612200CA2009EFA3E /* BSPreviewPluginInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BSPreviewPluginInterface.h; sourceTree = "<group>"; }; |
| 29 | 37 | F468C5C712201875009EFA3E /* BSILinkInfomation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BSILinkInfomation.h; sourceTree = "<group>"; }; |
| 30 | 38 | F468C5C812201875009EFA3E /* BSILinkInfomation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BSILinkInfomation.m; sourceTree = "<group>"; }; |
| @@ -90,6 +98,11 @@ | ||
| 90 | 98 | F4C8070B0E53CCB000BF4144 /* BSInlinePreviewer.m */, |
| 91 | 99 | F468C5C712201875009EFA3E /* BSILinkInfomation.h */, |
| 92 | 100 | F468C5C812201875009EFA3E /* BSILinkInfomation.m */, |
| 101 | + F431729D15BB9B6E00210D48 /* BSIPreferenceWindowController.h */, | |
| 102 | + F431729E15BB9B6E00210D48 /* BSIPreferenceWindowController.m */, | |
| 103 | + F431729F15BB9B6E00210D48 /* BSIPreferenceWindowController.xib */, | |
| 104 | + F43172A215BB9BFE00210D48 /* BSIThumbnailSizeView.h */, | |
| 105 | + F43172A315BB9BFF00210D48 /* BSIThumbnailSizeView.m */, | |
| 93 | 106 | ); |
| 94 | 107 | name = Classes; |
| 95 | 108 | sourceTree = "<group>"; |
| @@ -186,6 +199,7 @@ | ||
| 186 | 199 | 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */, |
| 187 | 200 | F4F1DC700E546EC800055177 /* notFound.png in Resources */, |
| 188 | 201 | F4FE88A010F772DD0076B366 /* Panel.xib in Resources */, |
| 202 | + F43172A115BB9B6E00210D48 /* BSIPreferenceWindowController.xib in Resources */, | |
| 189 | 203 | ); |
| 190 | 204 | runOnlyForDeploymentPostprocessing = 0; |
| 191 | 205 | }; |
| @@ -203,7 +217,7 @@ | ||
| 203 | 217 | ); |
| 204 | 218 | runOnlyForDeploymentPostprocessing = 0; |
| 205 | 219 | shellPath = /bin/sh; |
| 206 | - shellScript = "#dest=\"/Users/masaki/Library/Application support/BathyScaphe/PlugIns/\"\ndest=\"${INSTALL_PATH}\"/\nsrcname=${FULL_PRODUCT_NAME}\n\ncp -R ${CONFIGURATION_BUILD_DIR}/${srcname} \"${dest}\"\n"; | |
| 220 | + shellScript = "app=BathyScaphe\n\ndest=$HOME/Library/Application\\ Support/$app/PlugIns/\nsrc=$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.plugin\n\nif [ -d \"$dest/$PRODUCT_NAME.plugin\" ] ; then\nrm -fr \"$dest/$PRODUCT_NAME.plugin\"\nfi\n\necho \"Copy\"\ncp -R $src \"$dest\""; | |
| 207 | 221 | showEnvVarsInLog = 0; |
| 208 | 222 | }; |
| 209 | 223 | /* End PBXShellScriptBuildPhase section */ |
| @@ -215,6 +229,8 @@ | ||
| 215 | 229 | files = ( |
| 216 | 230 | F4C8070C0E53CCB000BF4144 /* BSInlinePreviewer.m in Sources */, |
| 217 | 231 | F468C5C912201875009EFA3E /* BSILinkInfomation.m in Sources */, |
| 232 | + F43172A015BB9B6E00210D48 /* BSIPreferenceWindowController.m in Sources */, | |
| 233 | + F43172A415BB9BFF00210D48 /* BSIThumbnailSizeView.m in Sources */, | |
| 218 | 234 | ); |
| 219 | 235 | runOnlyForDeploymentPostprocessing = 0; |
| 220 | 236 | }; |
| @@ -275,9 +291,9 @@ | ||
| 275 | 291 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; |
| 276 | 292 | GCC_WARN_ABOUT_RETURN_TYPE = YES; |
| 277 | 293 | GCC_WARN_UNUSED_VARIABLE = YES; |
| 278 | - MACOSX_DEPLOYMENT_TARGET = 10.5; | |
| 294 | + MACOSX_DEPLOYMENT_TARGET = 10.6; | |
| 279 | 295 | ONLY_ACTIVE_ARCH = YES; |
| 280 | - SDKROOT = macosx10.6; | |
| 296 | + SDKROOT = macosx10.7; | |
| 281 | 297 | }; |
| 282 | 298 | name = Debug; |
| 283 | 299 | }; |
| @@ -287,8 +303,8 @@ | ||
| 287 | 303 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; |
| 288 | 304 | GCC_WARN_ABOUT_RETURN_TYPE = YES; |
| 289 | 305 | GCC_WARN_UNUSED_VARIABLE = YES; |
| 290 | - MACOSX_DEPLOYMENT_TARGET = 10.5; | |
| 291 | - SDKROOT = macosx10.6; | |
| 306 | + MACOSX_DEPLOYMENT_TARGET = 10.6; | |
| 307 | + SDKROOT = macosx10.7; | |
| 292 | 308 | }; |
| 293 | 309 | name = Release; |
| 294 | 310 | }; |