summaryrefslogtreecommitdiff
path: root/cocoa/PSMTabBarControl/PSMTabBarControl.m
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-02-08 21:10:51 +0000
committerVincent Sanders <vince@kyllikki.org>2016-02-08 21:20:13 +0000
commit405965d871d00c2fe679bb066290afa11e23b95b (patch)
tree60bed8dbf0432c833c4e9bae70826c48243fd5aa /cocoa/PSMTabBarControl/PSMTabBarControl.m
parentdf2d62a872ebd9af169f943931c155f12b763c12 (diff)
downloadnetsurf-405965d871d00c2fe679bb066290afa11e23b95b.tar.gz
netsurf-405965d871d00c2fe679bb066290afa11e23b95b.tar.bz2
Update Mac OS X cocoa frontend to build using SDK 10.10
Diffstat (limited to 'cocoa/PSMTabBarControl/PSMTabBarControl.m')
-rw-r--r--cocoa/PSMTabBarControl/PSMTabBarControl.m13
1 files changed, 9 insertions, 4 deletions
diff --git a/cocoa/PSMTabBarControl/PSMTabBarControl.m b/cocoa/PSMTabBarControl/PSMTabBarControl.m
index 3a7e0c6d4..cb0e0342c 100644
--- a/cocoa/PSMTabBarControl/PSMTabBarControl.m
+++ b/cocoa/PSMTabBarControl/PSMTabBarControl.m
@@ -6,6 +6,8 @@
// Copyright 2005 Positive Spin Media. All rights reserved.
//
+#import <objc/runtime.h>
+
#import "PSMTabBarControl.h"
#import "PSMTabBarCell.h"
#import "PSMOverflowPopUpButton.h"
@@ -67,7 +69,8 @@
#pragma mark -
#pragma mark Characteristics
-+ (NSBundle *)bundle;
+
++ (NSBundle *)bundle
{
static NSBundle *bundle = nil;
if(!bundle) {
@@ -174,7 +177,7 @@
}
}
-+ (Class) defaultStyleClass;
++ (Class) defaultStyleClass
{
return [PSMUnifiedTabStyle class];
}
@@ -350,7 +353,9 @@
- (void)setStyleNamed:(NSString *)name {
Class styleClass = NSClassFromString( [NSString stringWithFormat: @"PSM%@TabStyle", [name capitalizedString]] );
- if (styleClass == Nil) styleClass = [isa defaultStyleClass];
+ if (styleClass == Nil) {
+ styleClass = object_getClass([PSMTabBarControl defaultStyleClass]);
+ }
id <PSMTabStyle> newStyle = [[styleClass alloc] init];
[self setStyle:newStyle];
@@ -369,7 +374,7 @@
_tabBarWidth = 120;
}
- if(lastOrientation != _orientation) {
+ if (lastOrientation != _orientation) {
[[self style] setOrientation:_orientation];
[self _positionOverflowMenu]; //move the overflow popup button to the right place