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.m20
1 files changed, 19 insertions, 1 deletions
diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m
index 53e48729..4c92624e 100644
--- a/Frameworks/PSMTabBar/PSMTabBarControl.m
+++ b/Frameworks/PSMTabBar/PSMTabBarControl.m
@@ -567,6 +567,16 @@
_selectsTabsOnMouseDown = value;
}
+- (BOOL)doubleClickCreatesTab
+{
+ return _createsTabOnDoubleClick;
+}
+
+- (void)setDoubleClickCreatesTab:(BOOL)value
+{
+ _createsTabOnDoubleClick = value;
+}
+
- (BOOL)automaticallyAnimates
{
return _automaticallyAnimates;
@@ -1298,7 +1308,15 @@
}
}
[self setNeedsDisplay:YES];
- }
+ } 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]];
+ }
+ return;
+ }
+ }
}
- (void)mouseDragged:(NSEvent *)theEvent