Revision: 2598
http://skim-app.svn.sourceforge.net/skim-app/?rev=2598&view=rev
Author: hofman
Date: 2007-07-31 11:38:56 -0700 (Tue, 31 Jul 2007)
Log Message:
-----------
Add a gradient view behind the search views. Put the progressIndicator for
searching as a bar in the status bar.
Modified Paths:
--------------
trunk/Dutch.lproj/Localizable.strings
trunk/Dutch.lproj/MainMenu.nib/info.nib
trunk/Dutch.lproj/MainMenu.nib/keyedobjects.nib
trunk/Dutch.lproj/MainWindow.nib/classes.nib
trunk/Dutch.lproj/MainWindow.nib/data.dependency
trunk/Dutch.lproj/MainWindow.nib/info.nib
trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib
trunk/Dutch.lproj/NotesDocument.nib/info.nib
trunk/Dutch.lproj/NotesDocument.nib/keyedobjects.nib
trunk/Dutch.lproj/PreferenceWindow.nib/info.nib
trunk/Dutch.lproj/PreferenceWindow.nib/keyedobjects.nib
trunk/English.lproj/MainWindow.nib/classes.nib
trunk/English.lproj/MainWindow.nib/info.nib
trunk/English.lproj/MainWindow.nib/keyedobjects.nib
trunk/French.lproj/Localizable.strings
trunk/French.lproj/MainWindow.nib/classes.nib
trunk/French.lproj/MainWindow.nib/info.nib
trunk/French.lproj/MainWindow.nib/keyedobjects.nib
trunk/Italian.lproj/Localizable.strings
trunk/Italian.lproj/MainWindow.nib/classes.nib
trunk/Italian.lproj/MainWindow.nib/info.nib
trunk/Italian.lproj/MainWindow.nib/keyedobjects.nib
trunk/SKMainWindowController.h
trunk/SKMainWindowController.m
trunk/SKStatusBar.h
trunk/SKStatusBar.m
trunk/Skim.xcodeproj/project.pbxproj
Added Paths:
-----------
trunk/BDSKGradientView.h
trunk/BDSKGradientView.m
Added: trunk/BDSKGradientView.h
===================================================================
--- trunk/BDSKGradientView.h (rev 0)
+++ trunk/BDSKGradientView.h 2007-07-31 18:38:56 UTC (rev 2598)
@@ -0,0 +1,60 @@
+//
+// BDSKGradientView.h
+// Bibdesk
+//
+// Created by Adam Maxwell on 10/26/05.
+/*
+ This software is Copyright (c) 2005,2006,2007
+ Adam Maxwell. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of Adam Maxwell nor the names of any
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
[EMAIL PROTECTED] BDSKGradientView : NSView
+{
+ @private
+ CIColor *startColor;
+ CIColor *endColor;
+ BOOL drawsGradient;
+}
+
+- (void)setLowerColor:(NSColor *)color;
+- (void)setUpperColor:(NSColor *)color;
+
+// for subclassers
+- (CIColor *)lowerColor;
+- (CIColor *)upperColor;
+
+- (BOOL)drawsGradient;
+- (void)setDrawsGradient:(BOOL)flag;
+
[EMAIL PROTECTED]
Added: trunk/BDSKGradientView.m
===================================================================
--- trunk/BDSKGradientView.m (rev 0)
+++ trunk/BDSKGradientView.m 2007-07-31 18:38:56 UTC (rev 2598)
@@ -0,0 +1,116 @@
+//
+// BDSKGradientView.m
+// Bibdesk
+//
+// Created by Adam Maxwell on 10/26/05.
+/*
+ This software is Copyright (c) 2005,2006,2007
+ Adam Maxwell. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of Adam Maxwell nor the names of any
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "BDSKGradientView.h"
+#import "NSBezierPath_CoreImageExtensions.h"
+#import "CIImage_BDSKExtensions.h"
+
[EMAIL PROTECTED] BDSKGradientView (Private)
+
+- (void)setDefaultColors;
+
[EMAIL PROTECTED]
+
[EMAIL PROTECTED] BDSKGradientView
+
+- (id)initWithFrame:(NSRect)frame
+{
+ self = [super initWithFrame:frame];
+ [self setDefaultColors];
+ drawsGradient = YES;
+ return self;
+}
+
+- (void)dealloc
+{
+ [endColor release];
+ [startColor release];
+ [super dealloc];
+}
+
+- (void)drawRect:(NSRect)aRect
+{
+ // fill entire view, not just the (possibly clipped) aRect
+ if (drawsGradient)
+ [[NSBezierPath bezierPathWithRect:[self bounds]]
fillPathVerticallyWithStartColor:[self upperColor] endColor:[self lowerColor]];
+}
+
+// -[CIColor initWithColor:] fails (returns nil) with +[NSColor gridColor]
rdar://problem/4789043
+- (void)setLowerColor:(NSColor *)color
+{
+ [endColor autorelease];
+ endColor = [[CIColor colorWithNSColor:color] retain];
+}
+
+- (void)setUpperColor:(NSColor *)color
+{
+ [startColor autorelease];
+ startColor = [[CIColor colorWithNSColor:color] retain];
+}
+
+- (CIColor *)lowerColor { return endColor; }
+- (CIColor *)upperColor { return startColor; }
+
+- (BOOL)drawsGradient {
+ return drawsGradient;
+}
+
+- (void)setDrawsGradient:(BOOL)flag {
+ if (drawsGradient != flag) {
+ drawsGradient = flag;
+ [self setNeedsDisplay:YES];
+ }
+}
+
+
+// required in order for redisplay to work properly with the controls
+- (BOOL)isOpaque{ return [self drawsGradient]; }
+- (BOOL)isFlipped { return NO; }
+
[EMAIL PROTECTED]
+
[EMAIL PROTECTED] BDSKGradientView (Private)
+
+// provides an example implementation
+- (void)setDefaultColors
+{
+ [self setLowerColor:[NSColor colorWithCalibratedWhite:0.75 alpha:1.0]];
+ [self setUpperColor:[NSColor colorWithCalibratedWhite:0.9 alpha:1.0]];
+}
+
[EMAIL PROTECTED]
Modified: trunk/Dutch.lproj/Localizable.strings
===================================================================
(Binary files differ)
Modified: trunk/Dutch.lproj/MainMenu.nib/info.nib
===================================================================
--- trunk/Dutch.lproj/MainMenu.nib/info.nib 2007-07-31 15:25:03 UTC (rev
2597)
+++ trunk/Dutch.lproj/MainMenu.nib/info.nib 2007-07-31 18:38:56 UTC (rev
2598)
@@ -7,14 +7,10 @@
<key>IBEditorPositions</key>
<dict>
<key>29</key>
- <string>140 614 635 44 0 0 1440 938 </string>
+ <string>140 614 542 44 0 0 1440 938 </string>
</dict>
<key>IBFramework Version</key>
<string>446.1</string>
- <key>IBOpenObjects</key>
- <array>
- <integer>29</integer>
- </array>
<key>IBSystem Version</key>
<string>8R218</string>
</dict>
Modified: trunk/Dutch.lproj/MainMenu.nib/keyedobjects.nib
===================================================================
(Binary files differ)
Modified: trunk/Dutch.lproj/MainWindow.nib/classes.nib
===================================================================
--- trunk/Dutch.lproj/MainWindow.nib/classes.nib 2007-07-31 15:25:03 UTC
(rev 2597)
+++ trunk/Dutch.lproj/MainWindow.nib/classes.nib 2007-07-31 18:38:56 UTC
(rev 2598)
@@ -12,6 +12,7 @@
SUPERCLASS = NSView;
},
{CLASS = BDSKEdgeView; LANGUAGE = ObjC; SUPERCLASS =
BDSKContainerView; },
+ {CLASS = BDSKGradientView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
{
CLASS = BDSKImagePopUpButton;
LANGUAGE = ObjC;
@@ -123,8 +124,6 @@
currentRightSideView = NSView;
displayBoxPopUpButton = NSPopUpButton;
findArrayController = NSArrayController;
- findCollapsibleView = BDSKCollapsibleView;
- findEdgeView = BDSKEdgeView;
findTableView = NSTableView;
findView = NSView;
leftSideButton = NSSegmentedControl;
@@ -132,6 +131,7 @@
leftSideContentBox = NSBox;
leftSideContentView = NSView;
leftSideEdgeView = BDSKEdgeView;
+ leftSideGradientView = BDSKGradientView;
markupPopUpButton = BDSKImagePopUpButton;
noteArrayController = NSArrayController;
noteOutlineView = SKNoteOutlineView;
@@ -155,12 +155,12 @@
rightSideContentBox = NSBox;
rightSideContentView = NSView;
rightSideEdgeView = BDSKEdgeView;
+ rightSideGradientView = BDSKGradientView;
scaleField = NSTextField;
searchField = NSSearchField;
snapshotArrayController = NSArrayController;
snapshotTableView = SKSnapshotTableView;
snapshotView = NSView;
- spinner = NSProgressIndicator;
splitView = SKSplitView;
thumbnailArrayController = NSArrayController;
thumbnailTableView = SKThumbnailTableView;
Modified: trunk/Dutch.lproj/MainWindow.nib/data.dependency
===================================================================
--- trunk/Dutch.lproj/MainWindow.nib/data.dependency 2007-07-31 15:25:03 UTC
(rev 2597)
+++ trunk/Dutch.lproj/MainWindow.nib/data.dependency 2007-07-31 18:38:56 UTC
(rev 2598)
@@ -4,6 +4,7 @@
<dict>
<key>IBPaletteDependency</key>
<array>
+ <string>Controllers</string>
<string>PDFKit</string>
</array>
</dict>
Modified: trunk/Dutch.lproj/MainWindow.nib/info.nib
===================================================================
--- trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-07-31 15:25:03 UTC (rev
2597)
+++ trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-07-31 18:38:56 UTC (rev
2598)
@@ -29,14 +29,6 @@
<array>
<integer>208</integer>
</array>
- <key>IBOpenObjects</key>
- <array>
- <integer>168</integer>
- <integer>224</integer>
- <integer>256</integer>
- <integer>511</integer>
- <integer>5</integer>
- </array>
<key>IBSystem Version</key>
<string>8R218</string>
</dict>
Modified: trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib
===================================================================
(Binary files differ)
Modified: trunk/Dutch.lproj/NotesDocument.nib/info.nib
===================================================================
--- trunk/Dutch.lproj/NotesDocument.nib/info.nib 2007-07-31 15:25:03 UTC
(rev 2597)
+++ trunk/Dutch.lproj/NotesDocument.nib/info.nib 2007-07-31 18:38:56 UTC
(rev 2598)
@@ -6,10 +6,6 @@
<string>69 58 356 240 0 0 1440 938 </string>
<key>IBFramework Version</key>
<string>446.1</string>
- <key>IBOpenObjects</key>
- <array>
- <integer>5</integer>
- </array>
<key>IBSystem Version</key>
<string>8R218</string>
</dict>
Modified: trunk/Dutch.lproj/NotesDocument.nib/keyedobjects.nib
===================================================================
(Binary files differ)
Modified: trunk/Dutch.lproj/PreferenceWindow.nib/info.nib
===================================================================
--- trunk/Dutch.lproj/PreferenceWindow.nib/info.nib 2007-07-31 15:25:03 UTC
(rev 2597)
+++ trunk/Dutch.lproj/PreferenceWindow.nib/info.nib 2007-07-31 18:38:56 UTC
(rev 2598)
@@ -8,10 +8,6 @@
<string>446.1</string>
<key>IBLockedObjects</key>
<array/>
- <key>IBOpenObjects</key>
- <array>
- <integer>5</integer>
- </array>
<key>IBSystem Version</key>
<string>8R218</string>
</dict>
Modified: trunk/Dutch.lproj/PreferenceWindow.nib/keyedobjects.nib
===================================================================
(Binary files differ)
Modified: trunk/English.lproj/MainWindow.nib/classes.nib
===================================================================
--- trunk/English.lproj/MainWindow.nib/classes.nib 2007-07-31 15:25:03 UTC
(rev 2597)
+++ trunk/English.lproj/MainWindow.nib/classes.nib 2007-07-31 18:38:56 UTC
(rev 2598)
@@ -12,6 +12,7 @@
SUPERCLASS = NSView;
},
{CLASS = BDSKEdgeView; LANGUAGE = ObjC; SUPERCLASS =
BDSKContainerView; },
+ {CLASS = BDSKGradientView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
{
CLASS = BDSKImagePopUpButton;
LANGUAGE = ObjC;
@@ -123,8 +124,6 @@
currentRightSideView = NSView;
displayBoxPopUpButton = NSPopUpButton;
findArrayController = NSArrayController;
- findCollapsibleView = BDSKCollapsibleView;
- findEdgeView = BDSKEdgeView;
findTableView = NSTableView;
findView = NSView;
leftSideButton = NSSegmentedControl;
@@ -132,6 +131,7 @@
leftSideContentBox = NSBox;
leftSideContentView = NSView;
leftSideEdgeView = BDSKEdgeView;
+ leftSideGradientView = BDSKGradientView;
markupPopUpButton = BDSKImagePopUpButton;
noteArrayController = NSArrayController;
noteOutlineView = SKNoteOutlineView;
@@ -155,12 +155,12 @@
rightSideContentBox = NSBox;
rightSideContentView = NSView;
rightSideEdgeView = BDSKEdgeView;
+ rightSideGradientView = BDSKGradientView;
scaleField = NSTextField;
searchField = NSSearchField;
snapshotArrayController = NSArrayController;
snapshotTableView = SKSnapshotTableView;
snapshotView = NSView;
- spinner = NSProgressIndicator;
splitView = SKSplitView;
thumbnailArrayController = NSArrayController;
thumbnailTableView = SKThumbnailTableView;
Modified: trunk/English.lproj/MainWindow.nib/info.nib
===================================================================
--- trunk/English.lproj/MainWindow.nib/info.nib 2007-07-31 15:25:03 UTC (rev
2597)
+++ trunk/English.lproj/MainWindow.nib/info.nib 2007-07-31 18:38:56 UTC (rev
2598)
@@ -31,20 +31,20 @@
</array>
<key>IBOpenObjects</key>
<array>
+ <integer>687</integer>
+ <integer>633</integer>
+ <integer>585</integer>
+ <integer>168</integer>
+ <integer>224</integer>
+ <integer>314</integer>
+ <integer>553</integer>
+ <integer>511</integer>
<integer>502</integer>
- <integer>511</integer>
- <integer>224</integer>
- <integer>585</integer>
+ <integer>694</integer>
+ <integer>539</integer>
<integer>208</integer>
- <integer>539</integer>
<integer>5</integer>
- <integer>687</integer>
- <integer>168</integer>
<integer>256</integer>
- <integer>694</integer>
- <integer>633</integer>
- <integer>553</integer>
- <integer>314</integer>
</array>
<key>IBSystem Version</key>
<string>8R218</string>
Modified: trunk/English.lproj/MainWindow.nib/keyedobjects.nib
===================================================================
(Binary files differ)
Modified: trunk/French.lproj/Localizable.strings
===================================================================
(Binary files differ)
Modified: trunk/French.lproj/MainWindow.nib/classes.nib
===================================================================
--- trunk/French.lproj/MainWindow.nib/classes.nib 2007-07-31 15:25:03 UTC
(rev 2597)
+++ trunk/French.lproj/MainWindow.nib/classes.nib 2007-07-31 18:38:56 UTC
(rev 2598)
@@ -12,6 +12,7 @@
SUPERCLASS = NSView;
},
{CLASS = BDSKEdgeView; LANGUAGE = ObjC; SUPERCLASS =
BDSKContainerView; },
+ {CLASS = BDSKGradientView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
{
CLASS = BDSKImagePopUpButton;
LANGUAGE = ObjC;
@@ -123,8 +124,6 @@
currentRightSideView = NSView;
displayBoxPopUpButton = NSPopUpButton;
findArrayController = NSArrayController;
- findCollapsibleView = BDSKCollapsibleView;
- findEdgeView = BDSKEdgeView;
findTableView = NSTableView;
findView = NSView;
leftSideButton = NSSegmentedControl;
@@ -132,6 +131,7 @@
leftSideContentBox = NSBox;
leftSideContentView = NSView;
leftSideEdgeView = BDSKEdgeView;
+ leftSideGradientView = BDSKGradientView;
markupPopUpButton = BDSKImagePopUpButton;
noteArrayController = NSArrayController;
noteOutlineView = SKNoteOutlineView;
@@ -155,12 +155,12 @@
rightSideContentBox = NSBox;
rightSideContentView = NSView;
rightSideEdgeView = BDSKEdgeView;
+ rightSideGradientView = BDSKGradientView;
scaleField = NSTextField;
searchField = NSSearchField;
snapshotArrayController = NSArrayController;
snapshotTableView = SKSnapshotTableView;
snapshotView = NSView;
- spinner = NSProgressIndicator;
splitView = SKSplitView;
thumbnailArrayController = NSArrayController;
thumbnailTableView = SKThumbnailTableView;
Modified: trunk/French.lproj/MainWindow.nib/info.nib
===================================================================
--- trunk/French.lproj/MainWindow.nib/info.nib 2007-07-31 15:25:03 UTC (rev
2597)
+++ trunk/French.lproj/MainWindow.nib/info.nib 2007-07-31 18:38:56 UTC (rev
2598)
@@ -31,16 +31,16 @@
</array>
<key>IBOpenObjects</key>
<array>
+ <integer>502</integer>
+ <integer>224</integer>
+ <integer>168</integer>
+ <integer>5</integer>
+ <integer>660</integer>
+ <integer>511</integer>
+ <integer>314</integer>
+ <integer>661</integer>
<integer>256</integer>
- <integer>314</integer>
- <integer>5</integer>
<integer>633</integer>
- <integer>661</integer>
- <integer>511</integer>
- <integer>168</integer>
- <integer>502</integer>
- <integer>660</integer>
- <integer>224</integer>
</array>
<key>IBSystem Version</key>
<string>8R218</string>
Modified: trunk/French.lproj/MainWindow.nib/keyedobjects.nib
===================================================================
(Binary files differ)
Modified: trunk/Italian.lproj/Localizable.strings
===================================================================
(Binary files differ)
Modified: trunk/Italian.lproj/MainWindow.nib/classes.nib
===================================================================
--- trunk/Italian.lproj/MainWindow.nib/classes.nib 2007-07-31 15:25:03 UTC
(rev 2597)
+++ trunk/Italian.lproj/MainWindow.nib/classes.nib 2007-07-31 18:38:56 UTC
(rev 2598)
@@ -12,6 +12,7 @@
SUPERCLASS = NSView;
},
{CLASS = BDSKEdgeView; LANGUAGE = ObjC; SUPERCLASS =
BDSKContainerView; },
+ {CLASS = BDSKGradientView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
{
CLASS = BDSKImagePopUpButton;
LANGUAGE = ObjC;
@@ -123,8 +124,6 @@
currentRightSideView = NSView;
displayBoxPopUpButton = NSPopUpButton;
findArrayController = NSArrayController;
- findCollapsibleView = BDSKCollapsibleView;
- findEdgeView = BDSKEdgeView;
findTableView = NSTableView;
findView = NSView;
leftSideButton = NSSegmentedControl;
@@ -132,6 +131,7 @@
leftSideContentBox = NSBox;
leftSideContentView = NSView;
leftSideEdgeView = BDSKEdgeView;
+ leftSideGradientView = BDSKGradientView;
markupPopUpButton = BDSKImagePopUpButton;
noteArrayController = NSArrayController;
noteOutlineView = SKNoteOutlineView;
@@ -155,12 +155,12 @@
rightSideContentBox = NSBox;
rightSideContentView = NSView;
rightSideEdgeView = BDSKEdgeView;
+ rightSideGradientView = BDSKGradientView;
scaleField = NSTextField;
searchField = NSSearchField;
snapshotArrayController = NSArrayController;
snapshotTableView = SKSnapshotTableView;
snapshotView = NSView;
- spinner = NSProgressIndicator;
splitView = SKSplitView;
thumbnailArrayController = NSArrayController;
thumbnailTableView = SKThumbnailTableView;
Modified: trunk/Italian.lproj/MainWindow.nib/info.nib
===================================================================
--- trunk/Italian.lproj/MainWindow.nib/info.nib 2007-07-31 15:25:03 UTC (rev
2597)
+++ trunk/Italian.lproj/MainWindow.nib/info.nib 2007-07-31 18:38:56 UTC (rev
2598)
@@ -31,19 +31,19 @@
</array>
<key>IBOpenObjects</key>
<array>
- <integer>256</integer>
- <integer>314</integer>
+ <integer>511</integer>
<integer>224</integer>
+ <integer>5</integer>
+ <integer>502</integer>
+ <integer>539</integer>
<integer>208</integer>
+ <integer>677</integer>
+ <integer>256</integer>
+ <integer>168</integer>
<integer>628</integer>
- <integer>677</integer>
- <integer>502</integer>
- <integer>5</integer>
+ <integer>553</integer>
<integer>676</integer>
- <integer>553</integer>
- <integer>511</integer>
- <integer>539</integer>
- <integer>168</integer>
+ <integer>314</integer>
</array>
<key>IBSystem Version</key>
<string>8R218</string>
Modified: trunk/Italian.lproj/MainWindow.nib/keyedobjects.nib
===================================================================
(Binary files differ)
Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h 2007-07-31 15:25:03 UTC (rev 2597)
+++ trunk/SKMainWindowController.h 2007-07-31 18:38:56 UTC (rev 2598)
@@ -64,7 +64,7 @@
} SKPDFViewState;
@class PDFOutline, SKThumbnail;
[EMAIL PROTECTED] SKPDFView, SKOutlineView, SKNoteOutlineView,
SKThumbnailTableView, SKSnapshotTableView, SKSplitView, BDSKCollapsibleView,
BDSKEdgeView, BDSKImagePopUpButton, SKColorSwatch, SKStatusBar;
[EMAIL PROTECTED] SKPDFView, SKOutlineView, SKNoteOutlineView,
SKThumbnailTableView, SKSnapshotTableView, SKSplitView, BDSKCollapsibleView,
BDSKEdgeView, BDSKGradientView, BDSKImagePopUpButton, SKColorSwatch,
SKStatusBar;
@class SKFullScreenWindow, SKNavigationWindow, SKSideWindow,
SKSnapshotWindowController;
@interface SKMainWindowController : NSWindowController {
@@ -77,6 +77,7 @@
IBOutlet NSView *leftSideContentView;
IBOutlet BDSKEdgeView *leftSideEdgeView;
IBOutlet BDSKCollapsibleView *leftSideCollapsibleView;
+ IBOutlet BDSKGradientView *leftSideGradientView;
IBOutlet NSSegmentedControl *leftSideButton;
IBOutlet NSSearchField *searchField;
@@ -84,6 +85,7 @@
IBOutlet NSView *rightSideContentView;
IBOutlet BDSKEdgeView *rightSideEdgeView;
IBOutlet BDSKCollapsibleView *rightSideCollapsibleView;
+ IBOutlet BDSKGradientView *rightSideGradientView;
IBOutlet NSSegmentedControl *rightSideButton;
IBOutlet NSSearchField *noteSearchField;
@@ -113,9 +115,6 @@
IBOutlet NSArrayController *findArrayController;
IBOutlet NSTableView *findTableView;
IBOutlet NSView *findView;
- IBOutlet BDSKEdgeView *findEdgeView;
- IBOutlet BDSKCollapsibleView *findCollapsibleView;
- IBOutlet NSProgressIndicator *spinner;
NSMutableArray *searchResults;
BOOL findPanelFind;
CFMutableSetRef temporaryAnnotations;
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2007-07-31 15:25:03 UTC (rev 2597)
+++ trunk/SKMainWindowController.m 2007-07-31 18:38:56 UTC (rev 2598)
@@ -55,6 +55,7 @@
#import "SKPDFView.h"
#import "BDSKCollapsibleView.h"
#import "BDSKEdgeView.h"
+#import "BDSKGradientView.h"
#import "SKPDFAnnotationNote.h"
#import "SKSplitView.h"
#import "NSScrollView_SKExtensions.h"
@@ -242,14 +243,10 @@
[leftSideCollapsibleView setCollapseEdges:BDSKMaxXEdgeMask |
BDSKMinYEdgeMask];
[leftSideCollapsibleView setMinSize:NSMakeSize(111.0,
NSHeight([leftSideCollapsibleView frame]))];
- [findCollapsibleView setCollapseEdges:BDSKMaxXEdgeMask | BDSKMinYEdgeMask];
- [findCollapsibleView setMinSize:NSMakeSize(50.0,
NSHeight([findCollapsibleView frame]))];
-
[rightSideCollapsibleView setCollapseEdges:BDSKMaxXEdgeMask |
BDSKMinYEdgeMask];
[rightSideCollapsibleView setMinSize:NSMakeSize(111.0,
NSHeight([rightSideCollapsibleView frame]))];
[pdfContentBox setEdges:BDSKMinXEdgeMask | BDSKMaxXEdgeMask |
BDSKMinYEdgeMask];
- [findEdgeView setEdges:BDSKMaxXEdgeMask];
[leftSideEdgeView setEdges:BDSKMinXEdgeMask | BDSKMaxXEdgeMask];
[rightSideEdgeView setEdges:BDSKMinXEdgeMask | BDSKMaxXEdgeMask];
@@ -281,8 +278,6 @@
[self displayOutlineView];
[self displayNoteView];
- [spinner setUsesThreadedAnimation:YES];
-
// Set up the tool bar
[self setupToolbar];
@@ -1884,7 +1879,7 @@
[leftSideWindow setMainView:leftSideContentView];
[leftSideEdgeView setEdges:BDSKNoEdgeMask];
- [findEdgeView setEdges:BDSKNoEdgeMask];
+ [leftSideGradientView setDrawsGradient:NO];
if ([self isPresentation]) {
savedLeftSidePaneState = [self leftSidePaneState];
@@ -1916,6 +1911,7 @@
[rightSideWindow setMainView:rightSideContentView];
[rightSideEdgeView setEdges:BDSKNoEdgeMask];
+ [rightSideGradientView setDrawsGradient:NO];
if ([self isPresentation]) {
[rightSideWindow expand];
@@ -1939,7 +1935,7 @@
[leftSideContentBox addSubview:leftSideContentView];
[leftSideEdgeView setEdges:BDSKMinXEdgeMask | BDSKMaxXEdgeMask];
- [findEdgeView setEdges:BDSKMinXEdgeMask | BDSKMaxXEdgeMask];
+ [leftSideGradientView setDrawsGradient:YES];
if ([self isPresentation]) {
[self setLeftSidePaneState:savedLeftSidePaneState];
@@ -1960,6 +1956,7 @@
[rightSideContentBox addSubview:rightSideContentView];
[rightSideEdgeView setEdges:BDSKMinXEdgeMask | BDSKMaxXEdgeMask];
+ [rightSideGradientView setDrawsGradient:YES];
if ([self isPresentation]) {
[rightSideWindow setLevel:NSFloatingWindowLevel];
@@ -2322,23 +2319,26 @@
- (void)documentDidBeginDocumentFind:(NSNotification *)note {
if (findPanelFind == NO) {
[findArrayController removeObjects:searchResults];
- [spinner startAnimation:nil];
+ [[[[findTableView tableColumns] objectAtIndex:1] headerCell]
setStringValue:[NSLocalizedString(@"Searching", @"Message in search table
header") stringByAppendingEllipsis]];
+ [statusBar setProgressIndicatorStyle:SKProgressIndicatorBarStyle];
+ [[statusBar progressIndicator] setMaxValue:[[note object] pageCount]];
+ [[statusBar progressIndicator] setDoubleValue:0.0];
+ [statusBar startAnimation:self];
}
}
- (void)documentDidEndDocumentFind:(NSNotification *)note {
if (findPanelFind == NO) {
- [spinner stopAnimation:nil];
[self willChangeValueForKey:@"searchResults"];
[self didChangeValueForKey:@"searchResults"];
+ [[[[findTableView tableColumns] objectAtIndex:1] headerCell]
setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%i Results",
@"Message in search table header"), [searchResults count]]];
+ [statusBar stopAnimation:self];
+ [statusBar setProgressIndicatorStyle:SKProgressIndicatorNone];
}
}
- (void)documentDidEndPageFind:(NSNotification *)note {
- if (findPanelFind == NO) {
- double pageIndex = [[[note userInfo]
objectForKey:@"PDFDocumentPageIndex"] doubleValue];
- [spinner setDoubleValue: pageIndex / [[pdfView document] pageCount]];
- }
+ [[statusBar progressIndicator] setDoubleValue:[[[note userInfo]
objectForKey:@"PDFDocumentPageIndex"] doubleValue]];
}
- (void)didMatchString:(PDFSelection *)instance {
Modified: trunk/SKStatusBar.h
===================================================================
--- trunk/SKStatusBar.h 2007-07-31 15:25:03 UTC (rev 2597)
+++ trunk/SKStatusBar.h 2007-07-31 18:38:56 UTC (rev 2598)
@@ -37,11 +37,19 @@
*/
#import <Cocoa/Cocoa.h>
+#import "BDSKGradientView.h"
+typedef enum {
+ SKProgressIndicatorNone = -1,
+ SKProgressIndicatorBarStyle = NSProgressIndicatorBarStyle,
+ SKProgressIndicatorSpinningStyle = NSProgressIndicatorSpinningStyle
+} SKProgressIndicatorStyle;
+
@interface SKStatusBar : NSControl {
id leftCell;
id rightCell;
+ NSProgressIndicator *progressIndicator;
int state;
}
@@ -70,4 +78,12 @@
- (int)state;
- (void)setState:(int)newState;
+- (NSProgressIndicator *)progressIndicator;
+
+- (SKProgressIndicatorStyle)progressIndicatorStyle;
+- (void)setProgressIndicatorStyle:(SKProgressIndicatorStyle)style;
+
+- (void)startAnimation:(id)sender;
+- (void)stopAnimation:(id)sender;
+
@end
Modified: trunk/SKStatusBar.m
===================================================================
--- trunk/SKStatusBar.m 2007-07-31 15:25:03 UTC (rev 2597)
+++ trunk/SKStatusBar.m 2007-07-31 18:38:56 UTC (rev 2598)
@@ -39,10 +39,11 @@
#import "SKStatusBar.h"
#import "NSBezierPath_CoreImageExtensions.h"
-#define LEFT_MARGIN 5.0
-#define RIGHT_MARGIN 15.0
+#define LEFT_MARGIN 5.0
+#define RIGHT_MARGIN 15.0
+#define SEPARATION 2.0
+#define PROGRESSBAR_WIDTH 100.0
-
@implementation SKStatusBar
+ (CIColor *)lowerColor{
@@ -70,6 +71,7 @@
[rightCell setFont:[NSFont labelFontOfSize:0]];
[rightCell setAlignment:NSRightTextAlignment];
[rightCell setControlView:self];
+ progressIndicator = nil;
}
return self;
}
@@ -86,11 +88,14 @@
- (void)drawRect:(NSRect)rect {
NSRect textRect, ignored;
+ float rightMargin = RIGHT_MARGIN;
[[NSBezierPath bezierPathWithRect:[self bounds]]
fillPathVerticallyWithStartColor:[[self class] upperColor] endColor:[[self
class] lowerColor]];
+ if (progressIndicator)
+ rightMargin += NSWidth([progressIndicator frame]) + SEPARATION;
NSDivideRect([self bounds], &ignored, &textRect, LEFT_MARGIN, NSMinXEdge);
- NSDivideRect(textRect, &ignored, &textRect, RIGHT_MARGIN, NSMaxXEdge);
+ NSDivideRect(textRect, &ignored, &textRect, rightMargin, NSMaxXEdge);
if (textRect.size.width < 0.0)
textRect.size.width = 0.0;
@@ -229,4 +234,62 @@
}
}
+#pragma mark Progress indicator
+
+- (NSProgressIndicator *)progressIndicator {
+ return progressIndicator;
+}
+
+- (SKProgressIndicatorStyle)progressIndicatorStyle {
+ if (progressIndicator == nil)
+ return SKProgressIndicatorNone;
+ else
+ return [progressIndicator style];
+}
+
+- (void)setProgressIndicatorStyle:(SKProgressIndicatorStyle)style {
+ if (style == SKProgressIndicatorNone) {
+ if (progressIndicator == nil)
+ return;
+ [progressIndicator removeFromSuperview];
+ progressIndicator = nil;
+ } else {
+ if (progressIndicator && (int)[progressIndicator style] ==
style)
+ return;
+ if(progressIndicator == nil) {
+ progressIndicator = [[NSProgressIndicator alloc] init];
+ } else {
+ [progressIndicator retain];
+ [progressIndicator removeFromSuperview];
+ }
+ [progressIndicator setAutoresizingMask:NSViewMinXMargin |
NSViewMinYMargin | NSViewMaxYMargin];
+ [progressIndicator setStyle:style];
+ [progressIndicator setControlSize:NSSmallControlSize];
+ [progressIndicator setIndeterminate:style ==
NSProgressIndicatorSpinningStyle];
+ [progressIndicator setDisplayedWhenStopped:style ==
NSProgressIndicatorBarStyle];
+ [progressIndicator sizeToFit];
+
+ NSRect rect, ignored;
+ NSSize size = [progressIndicator frame].size;
+ if (size.width < 0.01) size.width = PROGRESSBAR_WIDTH;
+ NSDivideRect([self bounds], &ignored, &rect, RIGHT_MARGIN, NSMaxXEdge);
+ NSDivideRect(rect, &rect, &ignored, size.width, NSMaxXEdge);
+ rect.origin.y = floorf(NSMidY(rect) - 0.5 * size.height);
+ rect.size.height = size.height;
+ [progressIndicator setFrame:rect];
+
+ [self addSubview:progressIndicator];
+ [progressIndicator release];
+ }
+ [[self superview] setNeedsDisplayInRect:[self frame]];
+}
+
+- (void)startAnimation:(id)sender {
+ [progressIndicator startAnimation:sender];
+}
+
+- (void)stopAnimation:(id)sender {
+ [progressIndicator stopAnimation:sender];
+}
+
@end
Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj 2007-07-31 15:25:03 UTC (rev
2597)
+++ trunk/Skim.xcodeproj/project.pbxproj 2007-07-31 18:38:56 UTC (rev
2598)
@@ -72,6 +72,7 @@
CE2082E40C5E09DC009D3EFB /* ResizeLeftUpCursor.tiff in
Resources */ = {isa = PBXBuildFile; fileRef = CE2082E00C5E09DC009D3EFB /*
ResizeLeftUpCursor.tiff */; };
CE2082E50C5E09DC009D3EFB /* ResizeRightDownCursor.tiff in
Resources */ = {isa = PBXBuildFile; fileRef = CE2082E10C5E09DC009D3EFB /*
ResizeRightDownCursor.tiff */; };
CE2082E60C5E09DC009D3EFB /* ResizeRightUpCursor.tiff in
Resources */ = {isa = PBXBuildFile; fileRef = CE2082E20C5E09DC009D3EFB /*
ResizeRightUpCursor.tiff */; };
+ CE2093910C5F9A8D009D3EFB /* BDSKGradientView.m in Sources */ =
{isa = PBXBuildFile; fileRef = CE20938F0C5F9A8D009D3EFB /* BDSKGradientView.m
*/; };
CE2BD83E0BD4132B00A5F4DB /* Sparkle.framework in Frameworks */
= {isa = PBXBuildFile; fileRef = CE2BD82A0BD4132B00A5F4DB /* Sparkle.framework
*/; };
CE2BD8450BD4135600A5F4DB /* Sparkle.framework in CopyFiles */ =
{isa = PBXBuildFile; fileRef = CE2BD82A0BD4132B00A5F4DB /* Sparkle.framework
*/; };
CE2DE4920B85D48F00D0DA12 /* SKThumbnail.m in Sources */ = {isa
= PBXBuildFile; fileRef = CE2DE4910B85D48F00D0DA12 /* SKThumbnail.m */; };
@@ -369,6 +370,8 @@
CE2082E00C5E09DC009D3EFB /* ResizeLeftUpCursor.tiff */ = {isa =
PBXFileReference; lastKnownFileType = image.tiff; name =
ResizeLeftUpCursor.tiff; path = Images/ResizeLeftUpCursor.tiff; sourceTree =
"<group>"; };
CE2082E10C5E09DC009D3EFB /* ResizeRightDownCursor.tiff */ =
{isa = PBXFileReference; lastKnownFileType = image.tiff; name =
ResizeRightDownCursor.tiff; path = Images/ResizeRightDownCursor.tiff;
sourceTree = "<group>"; };
CE2082E20C5E09DC009D3EFB /* ResizeRightUpCursor.tiff */ = {isa
= PBXFileReference; lastKnownFileType = image.tiff; name =
ResizeRightUpCursor.tiff; path = Images/ResizeRightUpCursor.tiff; sourceTree =
"<group>"; };
+ CE20938E0C5F9A8D009D3EFB /* BDSKGradientView.h */ = {isa =
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path =
BDSKGradientView.h; sourceTree = "<group>"; };
+ CE20938F0C5F9A8D009D3EFB /* BDSKGradientView.m */ = {isa =
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc;
path = BDSKGradientView.m; sourceTree = "<group>"; };
CE2BD8170BD4127A00A5F4DB /* Sparkle.xcodeproj */ = {isa =
PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name =
Sparkle.xcodeproj; path = vendorsrc/andymatuschak/Sparkle/Sparkle.xcodeproj;
sourceTree = "<group>"; };
CE2BD82A0BD4132B00A5F4DB /* Sparkle.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; path =
Sparkle.framework; sourceTree = BUILT_PRODUCTS_DIR; };
CE2DE4900B85D48F00D0DA12 /* SKThumbnail.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
SKThumbnail.h; sourceTree = "<group>"; };
@@ -898,6 +901,8 @@
CE0710140B89BDD600733CC8 /* BDSKContainerView.m
*/,
CE0710150B89BDD600733CC8 /* BDSKEdgeView.h */,
CE0710160B89BDD600733CC8 /* BDSKEdgeView.m */,
+ CE20938E0C5F9A8D009D3EFB /* BDSKGradientView.h
*/,
+ CE20938F0C5F9A8D009D3EFB /* BDSKGradientView.m
*/,
F98DC2640BA090D8008E46EC /*
BDSKImagePopUpButton.h */,
F98DC2650BA090D8008E46EC /*
BDSKImagePopUpButton.m */,
F98DC2660BA090D8008E46EC /*
BDSKImagePopUpButtonCell.h */,
@@ -1395,6 +1400,7 @@
CECDC4FF0C5966A80026AAEC /*
NSImage_BDSKExtensions.m in Sources */,
CECDD2990C5B68580026AAEC /*
SKCenteredTextFieldCell.m in Sources */,
CECDDBAE0C5BB9600026AAEC /* SKFindTableView.m
in Sources */,
+ CE2093910C5F9A8D009D3EFB /* BDSKGradientView.m
in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit