aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Frameworks/PSMTabBar/PSMTabBarControl.m9
-rw-r--r--Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m66
-rw-r--r--Resources/English.lproj/DBView.stringsbin118618 -> 119050 bytes
-rw-r--r--Resources/English.lproj/IndexesView.stringsbin3656 -> 3872 bytes
-rw-r--r--Source/SPDatabaseDocument.m4
-rw-r--r--sequel-pro.xcodeproj/project.pbxproj4
6 files changed, 39 insertions, 44 deletions
diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m
index 3650fc93..1023444d 100644
--- a/Frameworks/PSMTabBar/PSMTabBarControl.m
+++ b/Frameworks/PSMTabBar/PSMTabBarControl.m
@@ -141,7 +141,7 @@
_cellMaxWidth = 280;
_cellOptimumWidth = 130;
_tearOffStyle = PSMTabBarTearOffAlphaWindow;
- style = [[PSMMetalTabStyle alloc] init];
+ style = [[PSMSequelProTabStyle alloc] init];
// the overflow button/menu
NSRect overflowButtonRect = NSMakeRect([self frame].size.width - [style rightMarginForTabBarControl] + 1, 0, [style rightMarginForTabBarControl] - 1, [self frame].size.height);
@@ -369,9 +369,6 @@
{
id <PSMTabStyle> newStyle;
- // Hardcode style to Metal
- name = @"Metal";
-
if ([name isEqualToString:@"Aqua"]) {
//newStyle = [[PSMAquaTabStyle alloc] init];
@@ -385,13 +382,13 @@
//newStyle = [[PSMCardTabStyle alloc] init];
} else if ([name isEqualToString:@"Metal"]) {
- newStyle = [[PSMMetalTabStyle alloc] init];
+ //newStyle = [[PSMMetalTabStyle alloc] init];
} else if ([name isEqualToString:@"SequelPro"]) {
newStyle = [[PSMSequelProTabStyle alloc] init];
} else {
- newStyle = [[PSMMetalTabStyle alloc] init];
+ newStyle = [[PSMSequelProTabStyle alloc] init];
}
[self setStyle:newStyle];
diff --git a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m
index 97d23023..70ceb943 100644
--- a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m
+++ b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m
@@ -27,10 +27,10 @@
#import "PSMTabBarControl.h"
#import "NSBezierPath_AMShading.h"
-#define kPSMMetalObjectCounterRadius 7.0
-#define kPSMMetalCounterMinWidth 20
-#define kPSMMetalTabCornerRadius 4.5
-#define MARGIN_X 10
+#define kPSMSequelProObjectCounterRadius 7.0
+#define kPSMSequelProCounterMinWidth 20
+#define kPSMSequelProTabCornerRadius 4.5
+#define MARGIN_X 7
@implementation PSMSequelProTabStyle
@@ -91,7 +91,7 @@
- (CGFloat)rightMarginForTabBarControl
{
- return 0.0f;
+ return 24.0f;
}
- (CGFloat)topMarginForTabBarControl
@@ -206,13 +206,13 @@
}
CGFloat countWidth = [[self attributedObjectCountValueForTabCell:cell] size].width;
- countWidth += (2 * kPSMMetalObjectCounterRadius - 6.0);
- if (countWidth < kPSMMetalCounterMinWidth) {
- countWidth = kPSMMetalCounterMinWidth;
+ countWidth += (2 * kPSMSequelProObjectCounterRadius - 6.0);
+ if (countWidth < kPSMSequelProCounterMinWidth) {
+ countWidth = kPSMSequelProCounterMinWidth;
}
NSRect result;
- result.size = NSMakeSize(countWidth, 2 * kPSMMetalObjectCounterRadius); // temp
+ result.size = NSMakeSize(countWidth, 2 * kPSMSequelProObjectCounterRadius); // temp
result.origin.x = cellFrame.origin.x + cellFrame.size.width - MARGIN_X - result.size.width;
result.origin.y = cellFrame.origin.y + MARGIN_Y + 1.0;
@@ -480,20 +480,20 @@
if ([cell state] == NSOnState) {
// draw top left arc
- center = NSMakePoint(aRect.origin.x - kPSMMetalTabCornerRadius + 0.5, aRect.origin.y + kPSMMetalTabCornerRadius);
- [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMMetalTabCornerRadius startAngle:270 endAngle:360 clockwise:NO];
+ center = NSMakePoint(aRect.origin.x - kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + kPSMSequelProTabCornerRadius);
+ [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMSequelProTabCornerRadius startAngle:270 endAngle:360 clockwise:NO];
// draw bottom left arc
- center = NSMakePoint(aRect.origin.x + kPSMMetalTabCornerRadius + 0.5, aRect.origin.y + aRect.size.height - kPSMMetalTabCornerRadius);
- [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMMetalTabCornerRadius startAngle:180 endAngle:90 clockwise:YES];
+ center = NSMakePoint(aRect.origin.x + kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + aRect.size.height - kPSMSequelProTabCornerRadius);
+ [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMSequelProTabCornerRadius startAngle:180 endAngle:90 clockwise:YES];
// draw bottom right arc
- center = NSMakePoint(aRect.origin.x + aRect.size.width - kPSMMetalTabCornerRadius - 0.5, aRect.origin.y + aRect.size.height - kPSMMetalTabCornerRadius );
- [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMMetalTabCornerRadius startAngle:90 endAngle:0 clockwise:YES];
+ center = NSMakePoint(aRect.origin.x + aRect.size.width - kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + aRect.size.height - kPSMSequelProTabCornerRadius );
+ [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMSequelProTabCornerRadius startAngle:90 endAngle:0 clockwise:YES];
// draw top right arc
- center = NSMakePoint(aRect.origin.x + aRect.size.width + kPSMMetalTabCornerRadius - 0.5, aRect.origin.y + kPSMMetalTabCornerRadius);
- [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMMetalTabCornerRadius startAngle:180 endAngle:270 clockwise:NO];
+ center = NSMakePoint(aRect.origin.x + aRect.size.width + kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + kPSMSequelProTabCornerRadius);
+ [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMSequelProTabCornerRadius startAngle:180 endAngle:270 clockwise:NO];
// Set up a fill bezier with the pieced-together path
[fillBezier appendBezierPath:outlineBezier];
@@ -523,8 +523,8 @@
// Add a bottom line to the tab, with a slight inner glow
outlineBezier = [NSBezierPath bezierPath];
- [outlineBezier moveToPoint:NSMakePoint(aRect.origin.x + (2 * kPSMMetalTabCornerRadius), aRect.origin.y + aRect.size.height - 0.5)];
- [outlineBezier lineToPoint:NSMakePoint(aRect.origin.x + aRect.size.width - (2 * kPSMMetalTabCornerRadius), aRect.origin.y + aRect.size.height - 0.5)];
+ [outlineBezier moveToPoint:NSMakePoint(aRect.origin.x + (2 * kPSMSequelProTabCornerRadius), aRect.origin.y + aRect.size.height - 0.5)];
+ [outlineBezier lineToPoint:NSMakePoint(aRect.origin.x + aRect.size.width - (2 * kPSMSequelProTabCornerRadius), aRect.origin.y + aRect.size.height - 0.5)];
shadow = [[NSShadow alloc] init];
[shadow setShadowBlurRadius:1];
[shadow setShadowColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.3]];
@@ -545,24 +545,24 @@
//lineColor = [NSColor greenColor];
// draw bottom right arc
- center = NSMakePoint(aRect.origin.x + aRect.size.width - kPSMMetalTabCornerRadius - 0.5, aRect.origin.y + aRect.size.height - kPSMMetalTabCornerRadius);
- [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMMetalTabCornerRadius startAngle:90 endAngle:0 clockwise:YES];
+ center = NSMakePoint(aRect.origin.x + aRect.size.width - kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + aRect.size.height - kPSMSequelProTabCornerRadius);
+ [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMSequelProTabCornerRadius startAngle:90 endAngle:0 clockwise:YES];
// draw top right arc
- center = NSMakePoint(aRect.origin.x + aRect.size.width + kPSMMetalTabCornerRadius - 0.5, aRect.origin.y + kPSMMetalTabCornerRadius);
- [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMMetalTabCornerRadius startAngle:180 endAngle:270 clockwise:NO];
+ center = NSMakePoint(aRect.origin.x + aRect.size.width + kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + kPSMSequelProTabCornerRadius);
+ [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMSequelProTabCornerRadius startAngle:180 endAngle:270 clockwise:NO];
// Don't draw the left edge for the leftmost tab
} else if ([[tabBar cells] objectAtIndex:0] != cell) {
//lineColor = [NSColor redColor];
// draw top left arc
- center = NSMakePoint(aRect.origin.x - kPSMMetalTabCornerRadius + 0.5, aRect.origin.y + kPSMMetalTabCornerRadius);
- [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMMetalTabCornerRadius startAngle:270 endAngle:360 clockwise:NO];
+ center = NSMakePoint(aRect.origin.x - kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + kPSMSequelProTabCornerRadius);
+ [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMSequelProTabCornerRadius startAngle:270 endAngle:360 clockwise:NO];
// draw bottom left arc
- center = NSMakePoint(aRect.origin.x + kPSMMetalTabCornerRadius + 0.5, aRect.origin.y + aRect.size.height - kPSMMetalTabCornerRadius);
- [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMMetalTabCornerRadius startAngle:180 endAngle:90 clockwise:YES];
+ center = NSMakePoint(aRect.origin.x + kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + aRect.size.height - kPSMSequelProTabCornerRadius);
+ [outlineBezier appendBezierPathWithArcWithCenter:center radius:kPSMSequelProTabCornerRadius startAngle:180 endAngle:90 clockwise:YES];
}
[lineColor set];
@@ -639,7 +639,7 @@
// label rect
NSRect labelRect;
labelRect.origin.x = cellFrame.origin.x + MARGIN_X + insetLabelWidth;
- labelRect.size.width = cellFrame.size.width - (labelRect.origin.x - cellFrame.origin.x) - insetLabelWidth;
+ labelRect.size.width = cellFrame.size.width - (labelRect.origin.x - cellFrame.origin.x) - insetLabelWidth - MARGIN_X;
labelRect.size.height = cellFrame.size.height;
labelRect.origin.y = cellFrame.origin.y + MARGIN_Y;
@@ -659,11 +659,11 @@
if ([cell state] == NSOnState) {
//myRect.origin.y -= 1.0;
}
- [path moveToPoint:NSMakePoint(myRect.origin.x + kPSMMetalObjectCounterRadius, myRect.origin.y)];
- [path lineToPoint:NSMakePoint(myRect.origin.x + myRect.size.width - kPSMMetalObjectCounterRadius, myRect.origin.y)];
- [path appendBezierPathWithArcWithCenter:NSMakePoint(myRect.origin.x + myRect.size.width - kPSMMetalObjectCounterRadius, myRect.origin.y + kPSMMetalObjectCounterRadius) radius:kPSMMetalObjectCounterRadius startAngle:270.0 endAngle:90.0];
- [path lineToPoint:NSMakePoint(myRect.origin.x + kPSMMetalObjectCounterRadius, myRect.origin.y + myRect.size.height)];
- [path appendBezierPathWithArcWithCenter:NSMakePoint(myRect.origin.x + kPSMMetalObjectCounterRadius, myRect.origin.y + kPSMMetalObjectCounterRadius) radius:kPSMMetalObjectCounterRadius startAngle:90.0 endAngle:270.0];
+ [path moveToPoint:NSMakePoint(myRect.origin.x + kPSMSequelProObjectCounterRadius, myRect.origin.y)];
+ [path lineToPoint:NSMakePoint(myRect.origin.x + myRect.size.width - kPSMSequelProObjectCounterRadius, myRect.origin.y)];
+ [path appendBezierPathWithArcWithCenter:NSMakePoint(myRect.origin.x + myRect.size.width - kPSMSequelProObjectCounterRadius, myRect.origin.y + kPSMSequelProObjectCounterRadius) radius:kPSMSequelProObjectCounterRadius startAngle:270.0 endAngle:90.0];
+ [path lineToPoint:NSMakePoint(myRect.origin.x + kPSMSequelProObjectCounterRadius, myRect.origin.y + myRect.size.height)];
+ [path appendBezierPathWithArcWithCenter:NSMakePoint(myRect.origin.x + kPSMSequelProObjectCounterRadius, myRect.origin.y + kPSMSequelProObjectCounterRadius) radius:kPSMSequelProObjectCounterRadius startAngle:90.0 endAngle:270.0];
[path fill];
// draw attributed string centered in area
diff --git a/Resources/English.lproj/DBView.strings b/Resources/English.lproj/DBView.strings
index dd17cbf7..df94e250 100644
--- a/Resources/English.lproj/DBView.strings
+++ b/Resources/English.lproj/DBView.strings
Binary files differ
diff --git a/Resources/English.lproj/IndexesView.strings b/Resources/English.lproj/IndexesView.strings
index 6ac6d7e9..4eee2844 100644
--- a/Resources/English.lproj/IndexesView.strings
+++ b/Resources/English.lproj/IndexesView.strings
Binary files differ
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index a36591e8..6b2b22f1 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -3541,11 +3541,13 @@
[tabTitle appendString:[self name]];
}
- // If a database is selected, add to the window - and other tabs if host is the same but table is set
+ // If a database is selected, add to the window - and other tabs if host is the same but db different or table is not set
if ([self database]) {
[windowTitle appendFormat:@"/%@", [self database]];
if (frontTableDocument == self
+ || ![frontTableDocument getConnection]
|| [[frontTableDocument name] isNotEqualTo:[self name]]
+ || [[frontTableDocument database] isNotEqualTo:[self database]]
|| ![[self table] length])
{
if ([tabTitle length]) [tabTitle appendString:@"/"];
diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj
index 4bb87056..d832cd08 100644
--- a/sequel-pro.xcodeproj/project.pbxproj
+++ b/sequel-pro.xcodeproj/project.pbxproj
@@ -224,8 +224,6 @@
58B9076C11BD9B34000826E5 /* PSMTabDragWindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = 58B9072C11BD9B34000826E5 /* PSMTabDragWindowController.h */; };
58B9076D11BD9B34000826E5 /* PSMTabDragWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B9072D11BD9B34000826E5 /* PSMTabDragWindowController.m */; };
58B9076E11BD9B34000826E5 /* PSMTabStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 58B9072E11BD9B34000826E5 /* PSMTabStyle.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 58B9077511BD9B34000826E5 /* PSMMetalTabStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 58B9073611BD9B34000826E5 /* PSMMetalTabStyle.h */; };
- 58B9077611BD9B34000826E5 /* PSMMetalTabStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B9073711BD9B34000826E5 /* PSMMetalTabStyle.m */; };
58B9077E11BD9B64000826E5 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 58B9077D11BD9B64000826E5 /* Carbon.framework */; };
58B907CA11BDA541000826E5 /* PSMTabBar.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 58B906E611BD989A000826E5 /* PSMTabBar.framework */; };
58B907FB11BDA5A9000826E5 /* PSMTabBar.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 58B906E611BD989A000826E5 /* PSMTabBar.framework */; };
@@ -2019,7 +2017,6 @@
58B9076A11BD9B34000826E5 /* PSMTabDragWindow.h in Headers */,
58B9076C11BD9B34000826E5 /* PSMTabDragWindowController.h in Headers */,
58B9076E11BD9B34000826E5 /* PSMTabStyle.h in Headers */,
- 58B9077511BD9B34000826E5 /* PSMMetalTabStyle.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2390,7 +2387,6 @@
58B9076911BD9B34000826E5 /* PSMTabDragView.m in Sources */,
58B9076B11BD9B34000826E5 /* PSMTabDragWindow.m in Sources */,
58B9076D11BD9B34000826E5 /* PSMTabDragWindowController.m in Sources */,
- 58B9077611BD9B34000826E5 /* PSMMetalTabStyle.m in Sources */,
B55F8E6211C67D53006A3386 /* PSMSequelProTabStyle.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;