aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PSMTabBar/PSMTabBarControl.m
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks/PSMTabBar/PSMTabBarControl.m')
-rw-r--r--Frameworks/PSMTabBar/PSMTabBarControl.m34
1 files changed, 30 insertions, 4 deletions
diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m
index 4c92624e..a9268a78 100644
--- a/Frameworks/PSMTabBar/PSMTabBarControl.m
+++ b/Frameworks/PSMTabBar/PSMTabBarControl.m
@@ -472,6 +472,32 @@
[self update];
}
+
+
+- (id)createNewTabTarget
+{
+ return _createNewTabTarget;
+}
+
+- (void)setCreateNewTabTarget:(id)object
+{
+ _createNewTabTarget = object;
+ [[self addTabButton] setTarget:object];
+}
+
+- (SEL)createNewTabAction
+{
+ return _createNewTabAction;
+}
+
+- (void)setCreateNewTabAction:(SEL)selector
+{
+ _createNewTabAction = selector;
+ [[self addTabButton] setAction:selector];
+}
+
+
+
- (NSInteger)cellMinWidth
{
return _cellMinWidth;
@@ -567,12 +593,12 @@
_selectsTabsOnMouseDown = value;
}
-- (BOOL)doubleClickCreatesTab
+- (BOOL)createsTabOnDoubleClick;
{
return _createsTabOnDoubleClick;
}
-- (void)setDoubleClickCreatesTab:(BOOL)value
+- (void)setCreatesTabOnDoubleClick:(BOOL)value
{
_createsTabOnDoubleClick = value;
}
@@ -1311,8 +1337,8 @@
} else {
if ([theEvent clickCount] == 2) {
// fire create new tab
- if ([self doubleClickCreatesTab] && [[self addTabButton] target] != nil && [[self addTabButton] action] != nil) {
- [[[self addTabButton] target] performSelector:[[self addTabButton] action]];
+ if ([self createsTabOnDoubleClick] && [self createNewTabTarget] != nil && [self createNewTabAction] != nil) {
+ [[self createNewTabTarget] performSelector:[self createNewTabAction]];
}
return;
}