From 96a222823ac3fed134eba79e6ccfaf847a204445 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 5 Jan 2011 00:16:33 +0000 Subject: - Tweak tab bar background colour when the window is in the background to decrease contrast --- Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Frameworks') diff --git a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m index 9ec84db8..c748a4df 100644 --- a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m +++ b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m @@ -409,7 +409,7 @@ // When the window is in the background, tone down the colours if (![[tabBar window] isMainWindow] || ![NSApp isActive]) { - backgroundCalibratedWhite = 0.685; + backgroundCalibratedWhite = 0.73; lineCalibratedWhite = 0.49; shadowAlpha = 0.3; } @@ -514,7 +514,7 @@ fillColor = [NSColor colorWithCalibratedWhite:0.81 alpha:1.0]; shadowColor = [NSColor colorWithCalibratedWhite:0.0 alpha:0.4]; } else { - fillColor = [NSColor colorWithCalibratedWhite:0.685 alpha:1.0]; + fillColor = [NSColor colorWithCalibratedWhite:0.73 alpha:1.0]; shadowColor = [NSColor colorWithCalibratedWhite:0.0 alpha:0.7]; } } @@ -533,7 +533,7 @@ topLeftArcCenter = NSMakePoint(aRect.origin.x - kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + kPSMSequelProTabCornerRadius); topRightArcCenter = NSMakePoint(aRect.origin.x + aRect.size.width + kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + kPSMSequelProTabCornerRadius); bottomLeftArcCenter = NSMakePoint(aRect.origin.x + kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + aRect.size.height - kPSMSequelProTabCornerRadius); - bottomRightArcCenter = NSMakePoint(aRect.origin.x + aRect.size.width - kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + aRect.size.height - kPSMSequelProTabCornerRadius ); + bottomRightArcCenter = NSMakePoint(aRect.origin.x + aRect.size.width - kPSMSequelProTabCornerRadius + 0.5, aRect.origin.y + aRect.size.height - kPSMSequelProTabCornerRadius); // Construct the outline path if (drawLeftEdge) { -- cgit v1.2.3 From e395b5d52a5d54de62ad9bf8cef2535307a00df1 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Sun, 9 Jan 2011 22:55:18 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20SP's=20internal=20spatial=20wkt=20c?= =?UTF-8?q?alculation=20for=20large=20amount=20of=20data=20points?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MCPKit/MCPFoundationKit/MCPGeometryData.m | 86 +++++++++++----------- 1 file changed, 43 insertions(+), 43 deletions(-) (limited to 'Frameworks') diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.m b/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.m index aafdba0e..7c2bce60 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.m @@ -103,11 +103,11 @@ - (NSString*)wktString { char byteOrder; - UInt32 geoType, srid, numberOfItems, numberOfSubItems, numberOfSubSubItems, numberOfCollectionItems; + uint32_t geoType, srid, numberOfItems, numberOfSubItems, numberOfSubSubItems, numberOfCollectionItems; st_point_2d aPoint; - NSUInteger i, j, k, n; // Loop counter for numberOf...Items - NSUInteger ptr = BUFFER_START; // pointer to geoBuffer while parsing + uint32_t i, j, k, n; // Loop counter for numberOf...Items + uint32_t ptr = BUFFER_START; // pointer to geoBuffer while parsing NSMutableString *wkt = [NSMutableString string]; @@ -135,7 +135,7 @@ case wkb_linestring: [wkt setString:@"LINESTRING("]; - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(i=0; i < numberOfItems; i++) { memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); @@ -148,10 +148,10 @@ case wkb_polygon: [wkt setString:@"POLYGON("]; - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(i=0; i < numberOfItems; i++) { - numberOfSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; [wkt appendString:@"("]; for(j=0; j < numberOfSubItems; j++) { @@ -167,7 +167,7 @@ case wkb_multipoint: [wkt setString:@"MULTIPOINT("]; - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for(i=0; i < numberOfItems; i++) { memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); @@ -180,10 +180,10 @@ case wkb_multilinestring: [wkt setString:@"MULTILINESTRING("]; - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for(i=0; i < numberOfItems; i++) { - numberOfSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; [wkt appendString:@"("]; for(j=0; j < numberOfSubItems; j++) { @@ -200,14 +200,14 @@ case wkb_multipolygon: [wkt setString:@"MULTIPOLYGON("]; - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for(i=0; i < numberOfItems; i++) { - numberOfSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; [wkt appendString:@"("]; for(j=0; j < numberOfSubItems; j++) { - numberOfSubSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; [wkt appendString:@"("]; for(k=0; k < numberOfSubSubItems; k++) { @@ -250,7 +250,7 @@ case wkb_linestring: [wkt appendString:@"LINESTRING("]; - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(i=0; i < numberOfItems; i++) { memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); @@ -262,10 +262,10 @@ case wkb_polygon: [wkt appendString:@"POLYGON("]; - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(i=0; i < numberOfItems; i++) { - numberOfSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; [wkt appendString:@"("]; for(j=0; j < numberOfSubItems; j++) { @@ -280,7 +280,7 @@ case wkb_multipoint: [wkt appendString:@"MULTIPOINT("]; - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for(i=0; i < numberOfItems; i++) { memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); @@ -293,10 +293,10 @@ case wkb_multilinestring: [wkt appendString:@"MULTILINESTRING("]; - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for(i=0; i < numberOfItems; i++) { - numberOfSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; [wkt appendString:@"("]; for(j=0; j < numberOfSubItems; j++) { @@ -313,14 +313,14 @@ case wkb_multipolygon: [wkt appendString:@"MULTIPOLYGON("]; - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for(i=0; i < numberOfItems; i++) { - numberOfSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; [wkt appendString:@"("]; for(j=0; j < numberOfSubItems; j++) { - numberOfSubSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; [wkt appendString:@"("]; for(k=0; k < numberOfSubSubItems; k++) { @@ -368,10 +368,10 @@ NSUInteger i, j, k, n; // Loop counter for numberOf...Items NSUInteger ptr = BUFFER_START; // pointer to geoBuffer while parsing - double x_min = 1e999; - double x_max = -1e999; - double y_min = 1e999; - double y_max = -1e999; + double x_min = 1e998; + double x_max = -1e998; + double y_min = 1e998; + double y_max = -1e998; NSMutableArray *coordinates = [NSMutableArray array]; NSMutableArray *subcoordinates = [NSMutableArray array]; @@ -419,7 +419,7 @@ break; case wkb_linestring: - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(i=0; i < numberOfItems; i++) { memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); @@ -443,10 +443,10 @@ break; case wkb_polygon: - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(i=0; i < numberOfItems; i++) { - numberOfSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(j=0; j < numberOfSubItems; j++) { memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); @@ -474,7 +474,7 @@ break; case wkb_multipoint: - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for(i=0; i < numberOfItems; i++) { memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); @@ -499,10 +499,10 @@ break; case wkb_multilinestring: - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for(i=0; i < numberOfItems; i++) { - numberOfSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(j=0; j < numberOfSubItems; j++) { memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); @@ -531,13 +531,13 @@ break; case wkb_multipolygon: - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for(i=0; i < numberOfItems; i++) { - numberOfSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(j=0; j < numberOfSubItems; j++) { - numberOfSubSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(k=0; k < numberOfSubSubItems; k++) { memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); @@ -594,7 +594,7 @@ break; case wkb_linestring: - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(i=0; i < numberOfItems; i++) { memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); @@ -610,10 +610,10 @@ break; case wkb_polygon: - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(i=0; i < numberOfItems; i++) { - numberOfSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(j=0; j < numberOfSubItems; j++) { memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); @@ -630,7 +630,7 @@ break; case wkb_multipoint: - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for(i=0; i < numberOfItems; i++) { memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); @@ -645,10 +645,10 @@ break; case wkb_multilinestring: - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for(i=0; i < numberOfItems; i++) { - numberOfSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(j=0; j < numberOfSubItems; j++) { memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); @@ -667,13 +667,13 @@ break; case wkb_multipolygon: - numberOfItems = geoBuffer[ptr]; + memcpy(&numberOfItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32+WKB_HEADER_SIZE; for(i=0; i < numberOfItems; i++) { - numberOfSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(j=0; j < numberOfSubItems; j++) { - numberOfSubSubItems = geoBuffer[ptr]; + memcpy(&numberOfSubSubItems, &geoBuffer[ptr], SIZEOF_STORED_UINT32); ptr += SIZEOF_STORED_UINT32; for(k=0; k < numberOfSubSubItems; k++) { memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); -- cgit v1.2.3 From d33b67301a41a9855271b41170f417de73616d11 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Sun, 9 Jan 2011 23:15:38 +0000 Subject: =?UTF-8?q?=E2=80=A2=20changed=20spatial=20SRIDs=20to=20int32=20as?= =?UTF-8?q?=20it=20is=20declared=20in=20http://www.opengeospatial.org/stan?= =?UTF-8?q?dards/sfa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MCPKit/MCPFoundationKit/MCPGeometryData.m | 34 ++++++++++++---------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'Frameworks') diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.m b/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.m index 7c2bce60..00d7d44f 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPGeometryData.m @@ -103,7 +103,8 @@ - (NSString*)wktString { char byteOrder; - uint32_t geoType, srid, numberOfItems, numberOfSubItems, numberOfSubSubItems, numberOfCollectionItems; + uint32_t geoType, numberOfItems, numberOfSubItems, numberOfSubSubItems, numberOfCollectionItems; + int32_t srid; st_point_2d aPoint; uint32_t i, j, k, n; // Loop counter for numberOf...Items @@ -130,7 +131,7 @@ case wkb_point: memcpy(&aPoint, &geoBuffer[ptr], POINT_DATA_SIZE); - return [NSString stringWithFormat:@"POINT(%.16g %.16g)%@", aPoint.x, aPoint.y, (srid) ? [NSString stringWithFormat:@",%u",srid]: @""]; + return [NSString stringWithFormat:@"POINT(%.16g %.16g)%@", aPoint.x, aPoint.y, (srid) ? [NSString stringWithFormat:@",%d",srid]: @""]; break; case wkb_linestring: @@ -142,7 +143,7 @@ [wkt appendFormat:@"%.16g %.16g%@", aPoint.x, aPoint.y, (i < numberOfItems-1) ? @"," : @""]; ptr += POINT_DATA_SIZE; } - [wkt appendFormat:@")%@", (srid) ? [NSString stringWithFormat:@",%u",srid]: @""]; + [wkt appendFormat:@")%@", (srid) ? [NSString stringWithFormat:@",%d",srid]: @""]; return wkt; break; @@ -161,7 +162,7 @@ } [wkt appendFormat:@")%@", (i < numberOfItems-1) ? @"," : @""]; } - [wkt appendFormat:@")%@", (srid) ? [NSString stringWithFormat:@",%u",srid]: @""]; + [wkt appendFormat:@")%@", (srid) ? [NSString stringWithFormat:@",%d",srid]: @""]; return wkt; break; @@ -174,7 +175,7 @@ [wkt appendFormat:@"%.16g %.16g%@", aPoint.x, aPoint.y, (i < numberOfItems-1) ? @"," : @""]; ptr += POINT_DATA_SIZE+WKB_HEADER_SIZE; } - [wkt appendFormat:@")%@", (srid) ? [NSString stringWithFormat:@",%u",srid]: @""]; + [wkt appendFormat:@")%@", (srid) ? [NSString stringWithFormat:@",%d",srid]: @""]; return wkt; break; @@ -194,7 +195,7 @@ ptr += WKB_HEADER_SIZE; [wkt appendFormat:@")%@", (i < numberOfItems-1) ? @"," : @""]; } - [wkt appendFormat:@")%@", (srid) ? [NSString stringWithFormat:@",%u",srid]: @""]; + [wkt appendFormat:@")%@", (srid) ? [NSString stringWithFormat:@",%d",srid]: @""]; return wkt; break; @@ -220,7 +221,7 @@ ptr += WKB_HEADER_SIZE; [wkt appendFormat:@")%@", (i < numberOfItems-1) ? @"," : @""]; } - [wkt appendFormat:@")%@", (srid) ? [NSString stringWithFormat:@",%u",srid]: @""]; + [wkt appendFormat:@")%@", (srid) ? [NSString stringWithFormat:@",%d",srid]: @""]; return wkt; break; @@ -342,7 +343,7 @@ } [wkt appendString:(n < numberOfCollectionItems-1) ? @"," : @""]; } - [wkt appendFormat:@")%@", (srid) ? [NSString stringWithFormat:@",%u",srid]: @""]; + [wkt appendFormat:@")%@", (srid) ? [NSString stringWithFormat:@",%d",srid]: @""]; return wkt; break; @@ -362,11 +363,12 @@ { char byteOrder; - UInt32 geoType, srid, numberOfItems, numberOfSubItems, numberOfSubSubItems, numberOfCollectionItems; + uint32_t geoType, numberOfItems, numberOfSubItems, numberOfSubSubItems, numberOfCollectionItems; + int32_t srid; st_point_2d aPoint; - NSUInteger i, j, k, n; // Loop counter for numberOf...Items - NSUInteger ptr = BUFFER_START; // pointer to geoBuffer while parsing + uint32_t i, j, k, n; // Loop counter for numberOf...Items + uint32_t ptr = BUFFER_START; // pointer to geoBuffer while parsing double x_min = 1e998; double x_max = -1e998; @@ -413,7 +415,7 @@ [NSNumber numberWithDouble:y_max], nil], @"bbox", coordinates, @"coordinates", - [NSNumber numberWithUnsignedInt:srid], @"srid", + [NSNumber numberWithInt:srid], @"srid", @"POINT", @"type", nil]; break; @@ -468,7 +470,7 @@ [NSNumber numberWithDouble:y_max], nil], @"bbox", coordinates, @"coordinates", - [NSNumber numberWithUnsignedInt:srid], @"srid", + [NSNumber numberWithInt:srid], @"srid", @"POLYGON", @"type", nil]; break; @@ -493,7 +495,7 @@ [NSNumber numberWithDouble:y_max], nil], @"bbox", coordinates, @"coordinates", - [NSNumber numberWithUnsignedInt:srid], @"srid", + [NSNumber numberWithInt:srid], @"srid", @"MULTIPOINT", @"type", nil]; break; @@ -525,7 +527,7 @@ [NSNumber numberWithDouble:y_max], nil], @"bbox", coordinates, @"coordinates", - [NSNumber numberWithUnsignedInt:srid], @"srid", + [NSNumber numberWithInt:srid], @"srid", @"MULTILINESTRING", @"type", nil]; break; @@ -561,7 +563,7 @@ [NSNumber numberWithDouble:y_max], nil], @"bbox", coordinates, @"coordinates", - [NSNumber numberWithUnsignedInt:srid], @"srid", + [NSNumber numberWithInt:srid], @"srid", @"MULTIPOLYGON", @"type", nil]; break; -- cgit v1.2.3 From eec292b2a6a348f061630bebc5bfd7d39aa57ea0 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Fri, 14 Jan 2011 01:04:22 +0000 Subject: - Fix problems correctly resetting state when a query affects no rows on creating new tables; this could be responsible for -release errors in SPDataStorage, as well as out-of-bounds errors in SPDataStorage or SPTableContent. - Fix incorrect reporting of affected rows in MCPKit due to the use of meta/status queries; only track affected rows for framework-usage queries (already largely implemented in previous revisions) --- Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Frameworks') diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m index af5e6123..3556e9d7 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m @@ -1899,13 +1899,14 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails) } /** - * Returns the number of affected rows by the last query. + * Returns the number of affected rows by the last query. Only actual queries + * supplied via queryString:, streamingQueryString:, streamingQueryString:useLowMemoryBlockingStreaming: + * or queryString:usingEncoding:streamingResult: will have their affected rows + * returned, not any "meta" type queries. */ - (my_ulonglong)affectedRows { - if (mConnected) { - return mysql_affected_rows(mConnection); - } + if (mConnected) return lastQueryAffectedRows; return 0; } -- cgit v1.2.3 From 735706ae233348a072a6fcaee806e7c5def9477e Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sun, 16 Jan 2011 20:36:27 +0000 Subject: - Change window change notifications from key change notifications to main change notifications - fixes issues with tab bars showing incorrect colours when displaying sheets --- Frameworks/PSMTabBar/PSMTabBarControl.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Frameworks') diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m index a9268a78..8debd774 100644 --- a/Frameworks/PSMTabBar/PSMTabBarControl.m +++ b/Frameworks/PSMTabBar/PSMTabBarControl.m @@ -265,8 +265,8 @@ } if (aWindow) { - [center addObserver:self selector:@selector(windowStatusDidChange:) name:NSWindowDidBecomeKeyNotification object:aWindow]; - [center addObserver:self selector:@selector(windowStatusDidChange:) name:NSWindowDidResignKeyNotification object:aWindow]; + [center addObserver:self selector:@selector(windowStatusDidChange:) name:NSWindowDidBecomeMainNotification object:aWindow]; + [center addObserver:self selector:@selector(windowStatusDidChange:) name:NSWindowDidResignMainNotification object:aWindow]; [center addObserver:self selector:@selector(windowDidUpdate:) name:NSWindowDidUpdateNotification object:aWindow]; [center addObserver:self selector:@selector(windowDidMove:) name:NSWindowDidMoveNotification object:aWindow]; } -- cgit v1.2.3 From 326ad6df4b8c99b3dd103ad2a27de6dc09309191 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 20 Jan 2011 09:51:23 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20several=20memory=20leaks=20in=20PSM?= =?UTF-8?q?TabBar=20for=20NSMutableParagraphStyle=20(thanks=20to=20report?= =?UTF-8?q?=20i957)=20and=20NSShadows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m | 5 +++-- Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m | 7 ++++--- Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m | 4 ++-- Frameworks/PSMTabBar/Styles/PSMMetalTabStyle.m | 5 +++-- Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m | 10 +++++++--- Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m | 7 ++++--- 6 files changed, 23 insertions(+), 15 deletions(-) (limited to 'Frameworks') diff --git a/Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m index be5cf82d..3bda9cf5 100644 --- a/Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m +++ b/Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m @@ -399,7 +399,7 @@ // Paragraph Style for Truncating Long Text static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil; if (!TruncatingTailParagraphStyle) { - TruncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain]; + TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail]; } [attrStr addAttribute:NSParagraphStyleAttributeName value:TruncatingTailParagraphStyle range:range]; @@ -995,11 +995,12 @@ NSMutableParagraphStyle *centeredParagraphStyle = nil; if (!centeredParagraphStyle) { - centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain]; + centeredParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [centeredParagraphStyle setAlignment:NSCenterTextAlignment]; } [attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range]; + [centeredParagraphStyle release]; [attrStr drawInRect:labelRect]; return; } diff --git a/Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m index f2618fe5..901f3b4a 100644 --- a/Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m +++ b/Frameworks/PSMTabBar/Styles/PSMAquaTabStyle.m @@ -312,12 +312,12 @@ // Paragraph Style for Truncating Long Text static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil; if (!TruncatingTailParagraphStyle) { - TruncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain]; + TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail]; [TruncatingTailParagraphStyle setAlignment:NSCenterTextAlignment]; } [attrStr addAttribute:NSParagraphStyleAttributeName value:TruncatingTailParagraphStyle range:range]; - + return attrStr; } @@ -414,10 +414,11 @@ [attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range]; NSMutableParagraphStyle *centeredParagraphStyle = nil; if (!centeredParagraphStyle) { - centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain]; + centeredParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [centeredParagraphStyle setAlignment:NSCenterTextAlignment]; } [attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range]; + [centeredParagraphStyle release]; [attrStr drawInRect:labelRect]; return; } diff --git a/Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m index 31da000c..56c3a173 100644 --- a/Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m +++ b/Frameworks/PSMTabBar/Styles/PSMCardTabStyle.m @@ -298,11 +298,11 @@ // Paragraph Style for Truncating Long Text static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil; if (!TruncatingTailParagraphStyle) { - TruncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain]; + TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail]; } [attrStr addAttribute:NSParagraphStyleAttributeName value:TruncatingTailParagraphStyle range:range]; - + return attrStr; } diff --git a/Frameworks/PSMTabBar/Styles/PSMMetalTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMMetalTabStyle.m index 443179ce..db9bbd86 100644 --- a/Frameworks/PSMTabBar/Styles/PSMMetalTabStyle.m +++ b/Frameworks/PSMTabBar/Styles/PSMMetalTabStyle.m @@ -327,7 +327,7 @@ // Paragraph Style for Truncating Long Text static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil; if (!TruncatingTailParagraphStyle) { - TruncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain]; + TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail]; [TruncatingTailParagraphStyle setAlignment:NSCenterTextAlignment]; } @@ -592,10 +592,11 @@ [attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range]; NSMutableParagraphStyle *centeredParagraphStyle = nil; if (!centeredParagraphStyle) { - centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain]; + centeredParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [centeredParagraphStyle setAlignment:NSCenterTextAlignment]; } [attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range]; + [centeredParagraphStyle release]; [attrStr drawInRect:labelRect]; return; } diff --git a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m index c748a4df..48db93c3 100644 --- a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m +++ b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m @@ -337,7 +337,7 @@ // Paragraph Style for Truncating Long Text static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil; if (!TruncatingTailParagraphStyle) { - TruncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain]; + TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail]; [TruncatingTailParagraphStyle setAlignment:NSCenterTextAlignment]; } @@ -375,10 +375,11 @@ NSMutableParagraphStyle *centeredParagraphStyle = nil; if (!centeredParagraphStyle) { - centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain]; + centeredParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [centeredParagraphStyle setAlignment:NSCenterTextAlignment]; } [attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range]; + [centeredParagraphStyle release]; [attrStr drawInRect:labelRect]; return; } @@ -594,6 +595,7 @@ [shadow setShadowOffset:NSMakeSize(0, 1)]; [shadow set]; [outlineBezier stroke]; + [shadow release]; // Add the shadow over the tops of background tabs } else if (drawLeftEdge || drawRightEdge) { @@ -632,12 +634,14 @@ // Draw, and then restore the previous graphics state [outlineBezier stroke]; + [shadow release]; CGContextRestoreGState(context); } [NSGraphicsContext restoreGraphicsState]; - [self drawInteriorWithTabCell:cell inView:[cell controlView]]; + [self drawInteriorWithTabCell:cell inView:[cell controlView]]; + } diff --git a/Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m index 13fb0994..76b5efc1 100644 --- a/Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m +++ b/Frameworks/PSMTabBar/Styles/PSMUnifiedTabStyle.m @@ -297,11 +297,11 @@ // Paragraph Style for Truncating Long Text static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil; if (!TruncatingTailParagraphStyle) { - TruncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain]; + TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail]; } [attrStr addAttribute:NSParagraphStyleAttributeName value:TruncatingTailParagraphStyle range:range]; - + return attrStr; } @@ -540,10 +540,11 @@ [attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range]; NSMutableParagraphStyle *centeredParagraphStyle = nil; if (!centeredParagraphStyle) { - centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain]; + centeredParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [centeredParagraphStyle setAlignment:NSCenterTextAlignment]; } [attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range]; + [centeredParagraphStyle release]; [attrStr drawInRect:labelRect]; return; } -- cgit v1.2.3 From 522967b4bab102760ae9b910777634a439c72a0a Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sun, 23 Jan 2011 22:34:47 +0000 Subject: - Add a customised version of BWToolKit, incorporating Robert Payne's patch from http://bwalkin.lighthouseapp.com/projects/36323/tickets/34-split-view-doesnt-resize-subview-properly-during-a-toggle-uncollapse-after-manual-collapse#ticket-34-15 in order to fix NSSPlitView resizing of subviews - this addresses Issue #959 --- .../Versions/A/BWToolkitFramework | Bin 951356 -> 954312 bytes .../Versions/A/Headers/BWSplitView.h | 1 + 2 files changed, 1 insertion(+) (limited to 'Frameworks') diff --git a/Frameworks/BWToolkitFramework.framework/Versions/A/BWToolkitFramework b/Frameworks/BWToolkitFramework.framework/Versions/A/BWToolkitFramework index 8fea2fcd..81254dd3 100755 Binary files a/Frameworks/BWToolkitFramework.framework/Versions/A/BWToolkitFramework and b/Frameworks/BWToolkitFramework.framework/Versions/A/BWToolkitFramework differ diff --git a/Frameworks/BWToolkitFramework.framework/Versions/A/Headers/BWSplitView.h b/Frameworks/BWToolkitFramework.framework/Versions/A/Headers/BWSplitView.h index ed9731a6..e0d32f67 100644 --- a/Frameworks/BWToolkitFramework.framework/Versions/A/Headers/BWSplitView.h +++ b/Frameworks/BWToolkitFramework.framework/Versions/A/Headers/BWSplitView.h @@ -16,6 +16,7 @@ NSMutableDictionary *minValues, *maxValues, *minUnits, *maxUnits; NSMutableDictionary *resizableSubviewPreferredProportion, *nonresizableSubviewPreferredSize; NSArray *stateForLastPreferredCalculations; + NSMutableArray *uncollapsedSizes; int collapsiblePopupSelection; float uncollapsedSize; -- cgit v1.2.3