aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPWindowController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPWindowController.m')
-rw-r--r--Source/SPWindowController.m36
1 files changed, 17 insertions, 19 deletions
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m
index 282ebda5..ed538312 100644
--- a/Source/SPWindowController.m
+++ b/Source/SPWindowController.m
@@ -39,9 +39,9 @@ enum {
#import <PSMTabBar/PSMTabBarControl.h>
#import <PSMTabBar/PSMTabStyle.h>
-@interface SPWindowController (PrivateAPI)
+@interface SPWindowController ()
-- (void) _updateProgressIndicatorForItem:(NSTabViewItem *)theItem;
+- (void)_updateProgressIndicatorForItem:(NSTabViewItem *)theItem;
@end
@@ -212,6 +212,7 @@ enum {
*/
- (IBAction) moveSelectedTabInNewWindow:(id)sender
{
+
static NSPoint cascadeLocation = {.x = 0, .y = 0};
SPDatabaseDocument *selectedDocument = [[tabView selectedTabViewItem] identifier];
@@ -274,6 +275,7 @@ enum {
[newWindowController tabView:[tabBar tabView] didDropTabViewItem:[selectedCell representedObject] inTabBar:control];
[newWindow makeKeyAndOrderFront:nil];
+
}
/**
@@ -584,8 +586,8 @@ enum {
// Draw the background flipped, which is actually the right way up
NSAffineTransform *transform = [NSAffineTransform transform];
- [transform translateXBy:0.0 yBy:[[[self window] contentView] frame].size.height];
- [transform scaleXBy:1.0 yBy:-1.0];
+ [transform translateXBy:0.0f yBy:[[[self window] contentView] frame].size.height];
+ [transform scaleXBy:1.0f yBy:-1.0f];
[transform concat];
[(id <PSMTabStyle>)[[aTabView delegate] style] drawBackgroundInRect:tabFrame];
[viewImage unlockFocus];
@@ -784,20 +786,25 @@ enum {
return [selectedTableDocument performSelector:theSelector withObject:theObject];
}
-@end
-
-@implementation SPWindowController (PrivateAPI)
+/**
+ * When receiving an update for a bound value - an observed value on the
+ * document - ask the tab bar control to redraw as appropriate.
+ */
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
+{
+ [tabBar update];
+}
/**
* Binds a tab bar item's progress indicator to the represented
* tableDocument.
*/
-- (void) _updateProgressIndicatorForItem:(NSTabViewItem *)theItem
+- (void)_updateProgressIndicatorForItem:(NSTabViewItem *)theItem
{
PSMTabBarCell *theCell = [[tabBar cells] objectAtIndex:[tabView indexOfTabViewItem:theItem]];
[[theCell indicator] setControlSize:NSSmallControlSize];
SPDatabaseDocument *theDocument = [theItem identifier];
-
+
[[theCell indicator] setHidden:NO];
NSMutableDictionary *bindingOptions = [NSMutableDictionary dictionary];
[bindingOptions setObject:NSNegateBooleanTransformerName forKey:@"NSValueTransformerName"];
@@ -806,13 +813,4 @@ enum {
[theDocument addObserver:self forKeyPath:@"isProcessing" options:0 context:nil];
}
-/**
- * When receiving an update for a bound value - an observed value on the
- * document - ask the tab bar control to redraw as appropriate.
- */
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
-{
- [tabBar update];
-}
-
-@end \ No newline at end of file
+@end