aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2016-03-05 04:42:34 +0100
committerMax <post@wickenrode.com>2016-03-05 04:42:34 +0100
commit1e4d40f9a8dbc49e43d3e950a0a9121c7cb010f9 (patch)
tree25a806f17a066feac07b37b90760c0c7b85b525a /Source
parent2301018aeddd58ff0b2c90e2ae0dc88d213192c2 (diff)
parent96619853ae80f40e34c53105f08f79e89bb9df13 (diff)
downloadsequelpro-1e4d40f9a8dbc49e43d3e950a0a9121c7cb010f9.tar.gz
sequelpro-1e4d40f9a8dbc49e43d3e950a0a9121c7cb010f9.tar.bz2
sequelpro-1e4d40f9a8dbc49e43d3e950a0a9121c7cb010f9.zip
Merge branch 'master' of https://github.com/sequelpro/sequelpro
Diffstat (limited to 'Source')
-rw-r--r--Source/SPComboPopupButton.m6
-rw-r--r--Source/SPFileHandle.m2
-rw-r--r--Source/SPObjectAdditions.m71
3 files changed, 40 insertions, 39 deletions
diff --git a/Source/SPComboPopupButton.m b/Source/SPComboPopupButton.m
index 8c090911..3df3d6ec 100644
--- a/Source/SPComboPopupButton.m
+++ b/Source/SPComboPopupButton.m
@@ -129,9 +129,9 @@
CGContextSaveGState(context);
CGContextSetStrokeColor(context, lineColorParts);
- CGContextAddRect(context, CGRectMake(boundingLinePosition - 0.5, boundsRect.origin.y + heightIndent, 1.f, boundsRect.size.height - abs(2 * heightIndent)));
+ CGContextAddRect(context, CGRectMake(boundingLinePosition - 0.5, boundsRect.origin.y + heightIndent, 1.f, boundsRect.size.height - fabs(2 * heightIndent)));
CGContextClip(context);
- CGContextDrawLinearGradient(context, lineGradient, CGPointMake(boundingLinePosition - 0.5, boundsRect.origin.y + heightIndent), CGPointMake(boundingLinePosition - 0.5, boundsRect.origin.y + boundsRect.size.height - abs(heightIndent)), 0);
+ CGContextDrawLinearGradient(context, lineGradient, CGPointMake(boundingLinePosition - 0.5, boundsRect.origin.y + heightIndent), CGPointMake(boundingLinePosition - 0.5, boundsRect.origin.y + boundsRect.size.height - fabs(heightIndent)), 0);
CGContextRestoreGState(context);
CGGradientRelease(lineGradient);
@@ -281,7 +281,7 @@
// Custom tracking to be performed - indent the vertical button area slightly
- activeRect = NSMakeRect(cellFrame.origin.x, cellFrame.origin.y + heightIndent, cellFrame.size.width - [(SPComboPopupButton *)controlView lineOffset] + 1, cellFrame.size.height - fabsf(2 * heightIndent));
+ activeRect = NSMakeRect(cellFrame.origin.x, cellFrame.origin.y + heightIndent, cellFrame.size.width - [(SPComboPopupButton *)controlView lineOffset] + 1, cellFrame.size.height - fabs(2 * heightIndent));
// Continue tracking the mouse while it's down, updating the state as it enters and leaves the cell,
// until it is released; if still within the cell, perform a click.
diff --git a/Source/SPFileHandle.m b/Source/SPFileHandle.m
index 49bcd4a4..7da3d100 100644
--- a/Source/SPFileHandle.m
+++ b/Source/SPFileHandle.m
@@ -29,8 +29,8 @@
// More info at <https://github.com/sequelpro/sequelpro>
#import "SPFileHandle.h"
-#import "zlib.1.2.4.h"
#import "bzlib.h"
+#import "zlib.1.2.4.h"
#import "pthread.h"
// Define the maximum size of the background write buffer before the writing thread
diff --git a/Source/SPObjectAdditions.m b/Source/SPObjectAdditions.m
index bf8210ea..9dfe8559 100644
--- a/Source/SPObjectAdditions.m
+++ b/Source/SPObjectAdditions.m
@@ -51,38 +51,39 @@
@end
-#pragma mark -
-
-@interface NSAlert (ApplePrivate)
-
-- (IBAction)buttonPressed:(id)sender;
-
-@end
-
-@implementation NSAlert (SPAlertDebug)
-
-+ (void)load
-{
- static dispatch_once_t onceToken;
-
- dispatch_once(&onceToken, ^{
- Class alertClass = [self class];
-
- SEL orig = @selector(buttonPressed:);
- SEL exch = @selector(sp_buttonPressed:);
-
- Method origM = class_getInstanceMethod(alertClass, orig);
- Method exchM = class_getInstanceMethod(alertClass, exch);
-
- method_exchangeImplementations(origM, exchM);
- });
-}
-
-- (IBAction)sp_buttonPressed:(id)obj
-{
- NSLog(@"%s of %@ title=\n%@\ntext=\n%@",__func__,self,[self messageText],[self informativeText]);
-
- [self sp_buttonPressed:obj];
-}
-
-@end
+// method swizzling to try and reproduce #2297
+//#pragma mark -
+//
+//@interface NSAlert (ApplePrivate)
+//
+//- (IBAction)buttonPressed:(id)sender;
+//
+//@end
+//
+//@implementation NSAlert (SPAlertDebug)
+//
+//+ (void)load
+//{
+// static dispatch_once_t onceToken;
+//
+// dispatch_once(&onceToken, ^{
+// Class alertClass = [self class];
+//
+// SEL orig = @selector(buttonPressed:);
+// SEL exch = @selector(sp_buttonPressed:);
+//
+// Method origM = class_getInstanceMethod(alertClass, orig);
+// Method exchM = class_getInstanceMethod(alertClass, exch);
+//
+// method_exchangeImplementations(origM, exchM);
+// });
+//}
+//
+//- (IBAction)sp_buttonPressed:(id)obj
+//{
+// NSLog(@"%s of %@ title=\n%@\ntext=\n%@",__func__,self,[self messageText],[self informativeText]);
+//
+// [self sp_buttonPressed:obj];
+//}
+//
+//@end