From cb2919df1f18505c7bdbe187019862e8b934a6af Mon Sep 17 00:00:00 2001 From: Bibiko Date: Mon, 16 Aug 2010 12:32:26 +0000 Subject: =?UTF-8?q?=E2=80=A2=C2=A0added=20chance=20to=20export/import=20th?= =?UTF-8?q?e=20color=20theme=20of=20the=20Query=20Editor=20in=20Prefs=20>?= =?UTF-8?q?=20Editor=20>=20Gear=20menu=20as=20normal=20plist=20file=20-=20?= =?UTF-8?q?file=20extension=20is=20spTheme=20-=20can=20also=20import=20Tex?= =?UTF-8?q?tMate=20theme=20tmTheme=20files=20directly=20=E2=80=A2=20added?= =?UTF-8?q?=20the=20chance=20to=20set=20the=20selection=20color=20in=20the?= =?UTF-8?q?=20Query=20Editor=20=E2=80=A2=20fixed=20code=20for=20setting=20?= =?UTF-8?q?the=20insertion=20point=20color=20=E2=80=A2=20changed=20the=20w?= =?UTF-8?q?ay=20how=20the=20query=20highlight=20color=20will=20be=20drawn?= =?UTF-8?q?=20-=20now=20it=20also=20supports=20colors=20with=20an=20alpha?= =?UTF-8?q?=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Interfaces/English.lproj/Preferences.xib | 833 ++++++++++++++++++++++++++---- Resources/Plists/PreferenceDefaults.plist | 2 + Source/SPColorAdditions.h | 34 ++ Source/SPColorAdditions.m | 93 ++++ Source/SPConstants.h | 2 + Source/SPConstants.m | 2 + Source/SPPreferenceController.h | 3 + Source/SPPreferenceController.m | 261 ++++++++++ Source/SPTextView.m | 15 +- sequel-pro.xcodeproj/project.pbxproj | 6 + 10 files changed, 1147 insertions(+), 104 deletions(-) create mode 100644 Source/SPColorAdditions.h create mode 100644 Source/SPColorAdditions.m diff --git a/Interfaces/English.lproj/Preferences.xib b/Interfaces/English.lproj/Preferences.xib index 08a3fb4f..82a09c77 100644 --- a/Interfaces/English.lproj/Preferences.xib +++ b/Interfaces/English.lproj/Preferences.xib @@ -21,7 +21,7 @@ YES - + YES @@ -59,11 +59,9 @@ {3.40282e+38, 3.40282e+38} {580, 50} - + 256 {580, 172} - - {{0, 0}, {1440, 878}} {580, 72} @@ -606,7 +604,7 @@ 12 {{202.5, 176}, {360, 5}} - {{1, 0}, {358, 5}} + {{2.5, 0}, {355, 5}} {0, 0} @@ -1499,7 +1497,7 @@ NSView - + 274 YES @@ -2669,7 +2667,6 @@ {580, 381} - NSView @@ -3278,14 +3275,87 @@ AQAAAAA NSView - + 268 YES + + + 268 + {{32, 20}, {24, 24}} + + YES + + 71433792 + 134350848 + + + -2034089729 + 162 + + + 400 + 75 + + + YES + + + 1048576 + 2147483647 + 1 + + NSImage + NSAdvanced + + + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + Export Color Scheme… + + 1048576 + 2147483647 + + + _popUpItemAction: + 2 + + + + + Import Color Scheme… + + 1048576 + 2147483647 + + + _popUpItemAction: + 1 + + + + + + YES + 1 + YES + YES + + 268 - {{407, 75}, {23, 19}} + {{407, 88}, {23, 19}} YES @@ -3357,7 +3427,7 @@ AQAAAAA 268 - {{269, 77}, {133, 17}} + {{269, 90}, {133, 17}} YES @@ -3373,7 +3443,7 @@ AQAAAAA 268 - {{437, 73}, {15, 22}} + {{437, 86}, {15, 22}} YES @@ -3398,7 +3468,7 @@ AQAAAAA NSColor pasteboard type - {{204, 219}, {44, 23}} + {{204, 232}, {44, 23}} YES YES @@ -3417,7 +3487,7 @@ AQAAAAA NSColor pasteboard type - {{204, 248}, {44, 23}} + {{204, 261}, {44, 23}} YES YES @@ -3436,7 +3506,7 @@ AQAAAAA NSColor pasteboard type - {{204, 161}, {44, 23}} + {{204, 174}, {44, 23}} YES YES @@ -3455,7 +3525,7 @@ AQAAAAA NSColor pasteboard type - {{204, 132}, {44, 23}} + {{204, 145}, {44, 23}} YES YES @@ -3474,7 +3544,7 @@ AQAAAAA NSColor pasteboard type - {{204, 306}, {44, 23}} + {{204, 319}, {44, 23}} YES YES @@ -3493,7 +3563,7 @@ AQAAAAA NSColor pasteboard type - {{204, 190}, {44, 23}} + {{204, 203}, {44, 23}} YES YES @@ -3512,7 +3582,26 @@ AQAAAAA NSColor pasteboard type - {{204, 103}, {44, 23}} + {{204, 116}, {44, 23}} + + YES + YES + + 1 + MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{204, 58}, {44, 23}} YES YES @@ -3521,6 +3610,22 @@ AQAAAAA MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + 268 + {{17, 62}, {181, 17}} + + YES + + 68288064 + 71304192 + Selection: + + + + + + 268 @@ -3531,7 +3636,7 @@ AQAAAAA NSColor pasteboard type - {{204, 74}, {44, 23}} + {{204, 87}, {44, 23}} YES YES @@ -3550,7 +3655,7 @@ AQAAAAA NSColor pasteboard type - {{204, 335}, {44, 23}} + {{204, 348}, {44, 23}} YES YES @@ -3569,7 +3674,7 @@ AQAAAAA NSColor pasteboard type - {{204, 277}, {44, 23}} + {{204, 290}, {44, 23}} YES @@ -3580,7 +3685,7 @@ AQAAAAA 268 - {{17, 222}, {182, 17}} + {{17, 235}, {182, 17}} YES @@ -3596,7 +3701,7 @@ AQAAAAA 268 - {{17, 193}, {182, 17}} + {{17, 206}, {182, 17}} YES @@ -3612,7 +3717,7 @@ AQAAAAA 268 - {{17, 251}, {182, 17}} + {{17, 264}, {182, 17}} YES @@ -3628,7 +3733,7 @@ AQAAAAA 268 - {{17, 106}, {182, 17}} + {{17, 119}, {182, 17}} YES @@ -3644,7 +3749,7 @@ AQAAAAA 268 - {{17, 78}, {181, 17}} + {{17, 91}, {181, 17}} YES @@ -3660,7 +3765,7 @@ AQAAAAA 268 - {{17, 164}, {182, 17}} + {{17, 177}, {182, 17}} YES @@ -3676,7 +3781,7 @@ AQAAAAA 268 - {{17, 338}, {182, 17}} + {{17, 351}, {182, 17}} YES @@ -3692,7 +3797,7 @@ AQAAAAA 268 - {{17, 135}, {182, 17}} + {{17, 148}, {182, 17}} YES @@ -3708,7 +3813,7 @@ AQAAAAA 268 - {{17, 309}, {182, 17}} + {{17, 322}, {182, 17}} YES @@ -3724,7 +3829,7 @@ AQAAAAA 268 - {{17, 377}, {182, 17}} + {{17, 390}, {182, 17}} YES @@ -3740,7 +3845,7 @@ AQAAAAA 268 - {{69, 32}, {185, 32}} + {{69, 14}, {185, 32}} YES @@ -3760,7 +3865,7 @@ AQAAAAA 268 - {{433, 367}, {133, 32}} + {{433, 380}, {133, 32}} YES @@ -3780,7 +3885,7 @@ AQAAAAA 268 - {{204, 375}, {207, 19}} + {{204, 388}, {207, 19}} YES @@ -3797,7 +3902,7 @@ AQAAAAA 268 - {{17, 280}, {182, 17}} + {{17, 293}, {182, 17}} YES @@ -3813,7 +3918,7 @@ AQAAAAA 268 - {{270, 337}, {292, 18}} + {{270, 350}, {292, 18}} YES @@ -3835,7 +3940,7 @@ AQAAAAA 268 - {{270, 308}, {292, 18}} + {{270, 321}, {292, 18}} YES @@ -3857,7 +3962,7 @@ AQAAAAA 268 - {{270, 250}, {292, 18}} + {{270, 263}, {292, 18}} YES @@ -3879,7 +3984,7 @@ AQAAAAA 268 - {{270, 279}, {292, 18}} + {{270, 292}, {292, 18}} YES @@ -3901,7 +4006,7 @@ AQAAAAA 268 - {{270, 193}, {292, 18}} + {{270, 206}, {292, 18}} YES @@ -3923,7 +4028,7 @@ AQAAAAA 268 - {{270, 106}, {292, 18}} + {{270, 119}, {292, 18}} YES @@ -3945,7 +4050,7 @@ AQAAAAA 268 - {{270, 164}, {292, 18}} + {{270, 177}, {292, 18}} YES @@ -3967,7 +4072,7 @@ AQAAAAA 268 - {{370, 139}, {29, 19}} + {{370, 152}, {29, 19}} YES @@ -4040,7 +4145,7 @@ AQAAAAA 268 - {{269, 141}, {96, 14}} + {{269, 154}, {96, 14}} YES @@ -4056,7 +4161,7 @@ AQAAAAA 268 - {{405, 137}, {15, 22}} + {{405, 150}, {15, 22}} YES @@ -4074,7 +4179,7 @@ AQAAAAA 268 - {{423, 141}, {140, 14}} + {{423, 154}, {140, 14}} YES @@ -4090,7 +4195,7 @@ AQAAAAA -2147483380 - {{270, 44}, {292, 18}} + {{270, 57}, {292, 18}} YES @@ -4112,7 +4217,7 @@ AQAAAAA 268 - {{370, 225}, {29, 19}} + {{370, 238}, {29, 19}} YES @@ -4185,7 +4290,7 @@ AQAAAAA 268 - {{269, 227}, {96, 14}} + {{269, 240}, {96, 14}} YES @@ -4201,7 +4306,7 @@ AQAAAAA 268 - {{405, 223}, {15, 22}} + {{405, 236}, {15, 22}} YES @@ -4219,7 +4324,7 @@ AQAAAAA 268 - {{423, 227}, {140, 14}} + {{423, 240}, {140, 14}} YES @@ -4235,7 +4340,7 @@ AQAAAAA 12 - {{204, 364}, {356, 5}} + {{204, 377}, {356, 5}} {0, 0} @@ -4255,10 +4360,15 @@ AQAAAAA NO - {580, 415} + {580, 428} + NSView + + YES + CustomQueryEditorSelectionColor + YES @@ -6661,6 +6771,42 @@ AQAAAAA 1642 + + + exportColorScheme: + + + + 1675 + + + + importColorScheme: + + + + 1676 + + + + value: values.CustomQueryEditorSelectionColor + + + + + + value: values.CustomQueryEditorSelectionColor + value + values.CustomQueryEditorSelectionColor + + NSValueTransformerName + NSUnarchiveFromData + + 2 + + + 1681 + @@ -7624,6 +7770,9 @@ AQAAAAA + + + Editor @@ -9436,6 +9585,69 @@ AQAAAAA + + 1669 + + + YES + + + + + + 1670 + + + YES + + + + + + 1671 + + + YES + + + + + + + + 1672 + + + + + 1673 + + + + + 1674 + + + + + 1677 + + + YES + + + + + + 1678 + + + + + 1679 + + + @@ -9702,6 +9914,18 @@ AQAAAAA 1636.IBPluginDependency 1639.IBPluginDependency 1640.IBPluginDependency + 1669.IBAttributePlaceholdersKey + 1669.IBPluginDependency + 1670.IBPluginDependency + 1671.IBEditorWindowLastContentRect + 1671.IBPluginDependency + 1672.IBPluginDependency + 1673.IBAttributePlaceholdersKey + 1673.IBPluginDependency + 1674.IBPluginDependency + 1677.IBPluginDependency + 1678.IBPluginDependency + 1679.IBPluginDependency 17.IBEditorWindowLastContentRect 17.IBPluginDependency 17.IBUserGuides @@ -10233,6 +10457,31 @@ AQAAAAA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Export/Import Color Scheme + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{214, 248}, {184, 71}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + YES + + + YES + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin {{194, 257}, {580, 300}} com.apple.InterfaceBuilder.CocoaPlugin @@ -10523,7 +10772,7 @@ AQAAAAA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{194, 185}, {580, 415}} + {{1328, 433}, {580, 428}} com.apple.InterfaceBuilder.CocoaPlugin YES @@ -10584,7 +10833,7 @@ AQAAAAA - 1642 + 1681 @@ -11084,55 +11333,435 @@ AQAAAAA - SUUpdater - NSObject + SPPreferenceController + NSWindowController - checkForUpdates: - id - - - checkForUpdates: - - checkForUpdates: - id + YES + + YES + addFavorite: + changeFont: + displayAutoUpdatePreferences: + displayEditorPreferences: + displayFavoritePreferences: + displayGeneralPreferences: + displayNetworkPreferences: + displayNotificationPreferences: + displayTablePreferences: + duplicateFavorite: + exportColorScheme: + favoriteTypeDidChange: + importColorScheme: + makeSelectedFavoriteDefault: + removeFavorite: + reverseFavoritesSortOrder: + setDefaultColors: + showCustomQueryFontPanel: + showGlobalResultTableFontPanel: + sortFavorites: + updateDefaultFavorite: - - - delegate - id - - - delegate - - delegate - id + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id - - - - - YES - - BWAnchoredButtonBar - NSView - - IBFrameworkSource - BWToolkitFramework.framework/Headers/BWAnchoredButtonBar.h - - - - BWAnchoredPopUpButton - NSPopUpButton - - IBFrameworkSource - BWToolkitFramework.framework/Headers/BWAnchoredPopUpButton.h - - - - BWAnchoredPopUpButtonCell - NSPopUpButtonCell - + + YES + + YES + addFavorite: + changeFont: + displayAutoUpdatePreferences: + displayEditorPreferences: + displayFavoritePreferences: + displayGeneralPreferences: + displayNetworkPreferences: + displayNotificationPreferences: + displayTablePreferences: + duplicateFavorite: + exportColorScheme: + favoriteTypeDidChange: + importColorScheme: + makeSelectedFavoriteDefault: + removeFavorite: + reverseFavoritesSortOrder: + setDefaultColors: + showCustomQueryFontPanel: + showGlobalResultTableFontPanel: + sortFavorites: + updateDefaultFavorite: + + + YES + + addFavorite: + id + + + changeFont: + id + + + displayAutoUpdatePreferences: + id + + + displayEditorPreferences: + id + + + displayFavoritePreferences: + id + + + displayGeneralPreferences: + id + + + displayNetworkPreferences: + id + + + displayNotificationPreferences: + id + + + displayTablePreferences: + id + + + duplicateFavorite: + id + + + exportColorScheme: + id + + + favoriteTypeDidChange: + id + + + importColorScheme: + id + + + makeSelectedFavoriteDefault: + id + + + removeFavorite: + id + + + reverseFavoritesSortOrder: + id + + + setDefaultColors: + id + + + showCustomQueryFontPanel: + id + + + showGlobalResultTableFontPanel: + id + + + sortFavorites: + id + + + updateDefaultFavorite: + id + + + + + YES + + YES + autoUpdateView + defaultFavoritePopup + editorFontName + editorView + favoriteHostTextField + favoriteHostTextFieldSSH + favoriteNameTextField + favoriteUserTextField + favoriteUserTextFieldSSH + favoriteUserTextFieldSocket + favoritesController + favoritesSortByMenuItem + favoritesTabView + favoritesTableView + favoritesView + generalView + globalResultTableFontName + networkView + notificationsView + preferencesWindow + socketPasswordField + splitViewButtonBar + sshPasswordField + sshSQLPasswordField + standardPasswordField + tableCell + tablesView + + + YES + NSView + NSPopUpButton + NSTextField + NSView + NSTextField + NSTextField + NSTextField + NSTextField + NSTextField + NSTextField + NSArrayController + NSMenuItem + NSTabView + NSTableView + NSView + NSView + NSTextField + NSView + NSView + NSWindow + NSSecureTextField + BWAnchoredButtonBar + NSSecureTextField + NSSecureTextField + NSSecureTextField + id + NSView + + + + YES + + YES + autoUpdateView + defaultFavoritePopup + editorFontName + editorView + favoriteHostTextField + favoriteHostTextFieldSSH + favoriteNameTextField + favoriteUserTextField + favoriteUserTextFieldSSH + favoriteUserTextFieldSocket + favoritesController + favoritesSortByMenuItem + favoritesTabView + favoritesTableView + favoritesView + generalView + globalResultTableFontName + networkView + notificationsView + preferencesWindow + socketPasswordField + splitViewButtonBar + sshPasswordField + sshSQLPasswordField + standardPasswordField + tableCell + tablesView + + + YES + + autoUpdateView + NSView + + + defaultFavoritePopup + NSPopUpButton + + + editorFontName + NSTextField + + + editorView + NSView + + + favoriteHostTextField + NSTextField + + + favoriteHostTextFieldSSH + NSTextField + + + favoriteNameTextField + NSTextField + + + favoriteUserTextField + NSTextField + + + favoriteUserTextFieldSSH + NSTextField + + + favoriteUserTextFieldSocket + NSTextField + + + favoritesController + NSArrayController + + + favoritesSortByMenuItem + NSMenuItem + + + favoritesTabView + NSTabView + + + favoritesTableView + NSTableView + + + favoritesView + NSView + + + generalView + NSView + + + globalResultTableFontName + NSTextField + + + networkView + NSView + + + notificationsView + NSView + + + preferencesWindow + NSWindow + + + socketPasswordField + NSSecureTextField + + + splitViewButtonBar + BWAnchoredButtonBar + + + sshPasswordField + NSSecureTextField + + + sshSQLPasswordField + NSSecureTextField + + + standardPasswordField + NSSecureTextField + + + tableCell + id + + + tablesView + NSView + + + + + IBDocumentRelativeSource + ../../Source/SPPreferenceController.h + + + + SUUpdater + NSObject + + checkForUpdates: + id + + + checkForUpdates: + + checkForUpdates: + id + + + + delegate + id + + + delegate + + delegate + id + + + + + + + YES + + BWAnchoredButtonBar + NSView + + IBFrameworkSource + BWToolkitFramework.framework/Headers/BWAnchoredButtonBar.h + + + + BWAnchoredPopUpButton + NSPopUpButton + + IBFrameworkSource + BWToolkitFramework.framework/Headers/BWAnchoredPopUpButton.h + + + + BWAnchoredPopUpButtonCell + NSPopUpButtonCell + IBFrameworkSource BWToolkitFramework.framework/Headers/BWAnchoredPopUpButtonCell.h @@ -11931,6 +12560,7 @@ AQAAAAA YES NSActionTemplate + NSAdvanced NSMenuCheckmark NSMenuMixedState NSSwitch @@ -11938,7 +12568,8 @@ AQAAAAA YES - {10, 10} + {15, 15} + {32, 32} {9, 8} {7, 2} {15, 15} diff --git a/Resources/Plists/PreferenceDefaults.plist b/Resources/Plists/PreferenceDefaults.plist index 0fc3adc8..3d090f1d 100644 --- a/Resources/Plists/PreferenceDefaults.plist +++ b/Resources/Plists/PreferenceDefaults.plist @@ -74,6 +74,8 @@ BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmg3zv/T6DfO/9PoN87/0+AYY= CustomQueryEditorHighlightQueryColor BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMChARmZmZmgzMzcz+DMzNzP4MzM3M/AYY= + CustomQueryEditorSelectionColor + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMChARmZmZmg7a1NT+D1tVVPwEBhg== CustomQueryHighlightCurrentQuery CustomQueryAutoIndent diff --git a/Source/SPColorAdditions.h b/Source/SPColorAdditions.h new file mode 100644 index 00000000..58508f62 --- /dev/null +++ b/Source/SPColorAdditions.h @@ -0,0 +1,34 @@ +// +// $Id$ +// +// SPColorAdditions.h +// sequel-pro +// +// Created by Hans-Jörg Bibiko on August 16, 2010 +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at + +#import + + +@interface NSColor (SPColorAdditions) + ++ (NSColor *)colorWithRGBHexString:(NSString *)hexString ignoreAlpha:(BOOL)ignoreAlpha; ++ (NSColor *)colorWithRGBHexString:(NSString *)hexString; +- (NSString *)rgbHexString; + +@end diff --git a/Source/SPColorAdditions.m b/Source/SPColorAdditions.m new file mode 100644 index 00000000..e2e22c16 --- /dev/null +++ b/Source/SPColorAdditions.m @@ -0,0 +1,93 @@ +// +// $Id$ +// +// SPColorAdditions.m +// sequel-pro +// +// Created by Hans-Jörg Bibiko on August 16, 2010 +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at + +#import "SPColorAdditions.h" + + +@implementation NSColor (SPColorAdditions) + +/* + * Convert self by using the NSCalibratedRGBColorSpace color space in a NSString + * #RRGGBBAA or if the alpha value is zero to #RRGGBB + */ +- (NSString *)rgbHexString +{ + + CGFloat red, green, blue, alpha; + NSString *redHexValue, *greenHexValue, *blueHexValue, *alphaHexValue; + NSColor *aColor = [self colorUsingColorSpaceName:NSCalibratedRGBColorSpace]; + + if(aColor) { + [aColor getRed:&red green:&green blue:&blue alpha:&alpha]; + redHexValue = [NSString stringWithFormat:@"%02X", (NSInteger)(red * 255.0f)]; + greenHexValue = [NSString stringWithFormat:@"%02X", (NSInteger)(green * 255.0f)]; + blueHexValue = [NSString stringWithFormat:@"%02X", (NSInteger)(blue * 255.0f)]; + alphaHexValue = [NSString stringWithFormat:@"%02X", (NSInteger)(alpha * 255.0f)]; + if([alphaHexValue isEqualToString:@"FF"]) alphaHexValue = @""; + return [NSString stringWithFormat:@"#%@%@%@%@", redHexValue, greenHexValue, blueHexValue, alphaHexValue]; + } + + return @""; + +} + ++ (NSColor *)colorWithRGBHexString:(NSString *)hexString +{ + return [self colorWithRGBHexString:hexString ignoreAlpha:NO]; +} + ++ (NSColor *)colorWithRGBHexString:(NSString *)hexString ignoreAlpha:(BOOL)ignoreAlpha +{ + NSCharacterSet *hexCharSet = [NSCharacterSet characterSetWithCharactersInString:@"1234567890abcdefABCDEF"]; + NSString *initHexString = ( [hexString hasPrefix:@"#"] ) ? [hexString substringFromIndex:1] : hexString; + if(ignoreAlpha && [initHexString length] == 8) + initHexString = [initHexString substringToIndex:6]; + NSScanner *scanner = [NSScanner scannerWithString:initHexString]; + NSString *code = nil; + + [scanner scanCharactersFromSet:hexCharSet intoString:&code]; + + if( [code length] == 8 ) { // decode colors like #ffee33aa + NSUInteger color = 0; + scanner = [NSScanner scannerWithString:code]; + if( ! [scanner scanHexInt:&color] ) return nil; + return [self colorWithCalibratedRed:( ( ( color >> 24 ) & 0xff ) / 255. ) green:( ( ( color >> 16 ) & 0xff ) / 255. ) blue:( ( ( color >> 8) & 0xff ) / 255. ) alpha:( ( color & 0xff ) / 255. )]; + } + else if( [code length] == 6 ) { // decode colors like #ffee33 + NSUInteger color = 0; + scanner = [NSScanner scannerWithString:code]; + if( ! [scanner scanHexInt:&color] ) return nil; + return [self colorWithCalibratedRed:( ( ( color >> 16 ) & 0xff ) / 255. ) green:( ( ( color >> 8 ) & 0xff ) / 255. ) blue:( ( color & 0xff ) / 255. ) alpha:1.]; + } + else if( [code length] == 3 ) { // decode short-hand colors like #fe3 + NSUInteger color = 0; + scanner = [NSScanner scannerWithString:code]; + if( ! [scanner scanHexInt:&color] ) return nil; + return [self colorWithCalibratedRed:( ( ( ( ( color >> 8 ) & 0xf ) << 4 ) | ( ( color >> 8 ) & 0xf ) ) / 255. ) green:( ( ( ( ( color >> 4 ) & 0xf ) << 4 ) | ( ( color >> 4 ) & 0xf ) ) / 255. ) blue:( ( ( ( color & 0xf ) << 4 ) | ( color & 0xf ) ) / 255. ) alpha:1.]; + } + + return nil; +} + +@end diff --git a/Source/SPConstants.h b/Source/SPConstants.h index 89f35361..58630aa6 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -222,6 +222,7 @@ extern NSString *SPQueryFavortiesPasteboardDragType; extern NSString *SPFileExtensionDefault; extern NSString *SPFileExtensionSQL; extern NSString *SPBundleFileExtension; +extern NSString *SPColorThemeFileExtension; // Filenames extern NSString *SPHTMLPrintTemplate; @@ -284,6 +285,7 @@ extern NSString *SPCustomQueryEditorQuoteColor; extern NSString *SPCustomQueryEditorBacktickColor; extern NSString *SPCustomQueryEditorVariableColor; extern NSString *SPCustomQueryEditorHighlightQueryColor; +extern NSString *SPCustomQueryEditorSelectionColor; extern NSString *SPCustomQueryAutoIndent; extern NSString *SPCustomQueryAutoPairCharacters; extern NSString *SPCustomQueryAutoUppercaseKeywords; diff --git a/Source/SPConstants.m b/Source/SPConstants.m index cb5ea82f..f9865eb6 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -46,6 +46,7 @@ NSString *SPContentFilterPasteboardDragType = @"SPContentFilterPasteboard"; NSString *SPFileExtensionDefault = @"spf"; NSString *SPBundleFileExtension = @"spfs"; NSString *SPFileExtensionSQL = @"sql"; +NSString *SPColorThemeFileExtension = @"spTheme"; // Filenames NSString *SPHTMLPrintTemplate = @"sequel-pro-print-template"; @@ -107,6 +108,7 @@ NSString *SPCustomQueryEditorQuoteColor = @"CustomQueryEditorQuoteColor NSString *SPCustomQueryEditorBacktickColor = @"CustomQueryEditorBacktickColor"; NSString *SPCustomQueryEditorVariableColor = @"CustomQueryEditorVariableColor"; NSString *SPCustomQueryEditorHighlightQueryColor = @"CustomQueryEditorHighlightQueryColor"; +NSString *SPCustomQueryEditorSelectionColor = @"CustomQueryEditorSelectionColor"; NSString *SPCustomQueryAutoIndent = @"CustomQueryAutoIndent"; NSString *SPCustomQueryAutoPairCharacters = @"CustomQueryAutoPairCharacters"; NSString *SPCustomQueryAutoUppercaseKeywords = @"CustomQueryAutoUppercaseKeywords"; diff --git a/Source/SPPreferenceController.h b/Source/SPPreferenceController.h index cf9d2cc1..d5e22fd5 100644 --- a/Source/SPPreferenceController.h +++ b/Source/SPPreferenceController.h @@ -102,6 +102,9 @@ - (IBAction)sortFavorites:(id)sender; - (IBAction)reverseFavoritesSortOrder:(id)sender; - (IBAction)makeSelectedFavoriteDefault:(id)sender; +- (IBAction)exportColorScheme:(id)sender; +- (IBAction)importColorScheme:(id)sender; + // Toolbar item IBAction methods - (IBAction)displayGeneralPreferences:(id)sender; diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index 81fa4af8..e1c77c20 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -29,6 +29,7 @@ #import "SPKeychain.h" #import "SPDatabaseDocument.h" #import "SPConnectionController.h" +#import "SPColorAdditions.h" @interface SPPreferenceController (PrivateAPI) @@ -500,6 +501,43 @@ [self updateDefaultFavoritePopup]; } +- (IBAction)exportColorScheme:(id)sender +{ + NSSavePanel *panel = [NSSavePanel savePanel]; + + [panel setRequiredFileType:SPColorThemeFileExtension]; + + [panel setExtensionHidden:NO]; + [panel setAllowsOtherFileTypes:NO]; + [panel setCanSelectHiddenExtension:YES]; + [panel setCanCreateDirectories:YES]; + + [panel beginSheetForDirectory:nil + file:[NSString stringWithFormat:@"myTheme.%@", SPColorThemeFileExtension] + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(panelDidEnd:returnCode:contextInfo:) + contextInfo:@"exportColorScheme"]; +} + +- (IBAction)importColorScheme:(id)sender +{ + NSOpenPanel *panel = [NSOpenPanel openPanel]; + [panel setCanSelectHiddenExtension:YES]; + [panel setDelegate:self]; + [panel setCanChooseDirectories:NO]; + [panel setAllowsMultipleSelection:NO]; + + [panel beginSheetForDirectory:nil + file:@"" + types:[NSArray arrayWithObjects:SPColorThemeFileExtension, @"tmTheme", nil] + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(panelDidEnd:returnCode:contextInfo:) + contextInfo:@"importColorScheme"]; + +} + #pragma mark - #pragma mark Toolbar item IBAction methods @@ -1220,6 +1258,7 @@ [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.506 green:0.263 blue:0.000 alpha:1.000]] forKey:SPCustomQueryEditorNumericColor]; [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.500 green:0.500 blue:0.500 alpha:1.000]] forKey:SPCustomQueryEditorVariableColor]; [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.950 green:0.950 blue:0.950 alpha:1.000]] forKey:SPCustomQueryEditorHighlightQueryColor]; + [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0.7098 green:0.8352 blue:1.000 alpha:1.000]] forKey:SPCustomQueryEditorSelectionColor]; [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor blackColor]] forKey:SPCustomQueryEditorTextColor]; [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor blackColor]] forKey:SPCustomQueryEditorCaretColor]; [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor whiteColor]] forKey:SPCustomQueryEditorBackgroundColor]; @@ -1285,7 +1324,229 @@ return YES; } +/** + * Save panel did end method. + */ +- (void)panelDidEnd:(NSSavePanel *)panel returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo +{ + + if([contextInfo isEqualToString:@"exportColorScheme"]) { + if (returnCode == NSOKButton) { + + // Build plist dictionary + NSMutableDictionary *scheme = [NSMutableDictionary dictionary]; + NSMutableDictionary *mainsettings = [NSMutableDictionary dictionary]; + NSMutableArray *settings = [NSMutableArray array]; + CGFloat red, green, blue, alpha; + NSInteger redInt, greenInt, blueInt, alphaInt; + NSString *redHexValue, *greenHexValue, *blueHexValue, *alphaHexValue; + + [prefs synchronize]; + + NSColor *aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]]; + [mainsettings setObject:[aColor rgbHexString] forKey:@"background"]; + + aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorCaretColor]]; + [mainsettings setObject:[aColor rgbHexString] forKey:@"caret"]; + + aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]]; + [mainsettings setObject:[aColor rgbHexString] forKey:@"foreground"]; + + aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorHighlightQueryColor]]; + [mainsettings setObject:[aColor rgbHexString] forKey:@"lineHighlight"]; + + aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSelectionColor]]; + [mainsettings setObject:[aColor rgbHexString] forKey:@"selection"]; + + [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys:mainsettings, @"settings", nil]]; + + aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorCommentColor]]; + [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys: + @"Comment", @"name", + [NSDictionary dictionaryWithObjectsAndKeys: + [aColor rgbHexString], @"foreground", + nil + ], @"settings", + nil + ]]; + + aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorQuoteColor]]; + [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys: + @"String", @"name", + [NSDictionary dictionaryWithObjectsAndKeys: + [aColor rgbHexString], @"foreground", + nil + ], @"settings", + nil + ]]; + + aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSQLKeywordColor]]; + [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys: + @"Keyword", @"name", + [NSDictionary dictionaryWithObjectsAndKeys: + [aColor rgbHexString], @"foreground", + nil + ], @"settings", + nil + ]]; + + aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBacktickColor]]; + [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys: + @"User-defined constant", @"name", + [NSDictionary dictionaryWithObjectsAndKeys: + [aColor rgbHexString], @"foreground", + nil + ], @"settings", + nil + ]]; + + aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorNumericColor]]; + [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys: + @"Number", @"name", + [NSDictionary dictionaryWithObjectsAndKeys: + [aColor rgbHexString], @"foreground", + nil + ], @"settings", + nil + ]]; + + aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorVariableColor]]; + [settings addObject:[NSDictionary dictionaryWithObjectsAndKeys: + @"Variable", @"name", + [NSDictionary dictionaryWithObjectsAndKeys: + [aColor rgbHexString], @"foreground", + nil + ], @"settings", + nil + ]]; + + [scheme setObject:settings forKey:@"settings"]; + + NSString *err = nil; + NSData *plist = [NSPropertyListSerialization dataFromPropertyList:scheme + format:NSPropertyListXMLFormat_v1_0 + errorDescription:&err]; + + if(err != nil) { + NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while converting color scheme data", @"error while converting color scheme data")] + defaultButton:NSLocalizedString(@"OK", @"OK button") + alternateButton:nil + otherButton:nil + informativeTextWithFormat:err]; + + [alert setAlertStyle:NSCriticalAlertStyle]; + [alert runModal]; + return; + } + + NSError *error = nil; + [plist writeToFile:[panel filename] options:NSAtomicWrite error:&error]; + if (error) [[NSAlert alertWithError:error] runModal]; + + } + } + else if([contextInfo isEqualToString:@"importColorScheme"]) { + if (returnCode == NSOKButton) { + NSString *filename = [[panel filenames] objectAtIndex:0]; + NSError *readError = nil; + NSString *convError = nil; + NSPropertyListFormat format; + + NSDictionary *theme = nil; + + NSData *pData = [NSData dataWithContentsOfFile:filename options:NSUncachedRead error:&readError]; + + theme = [[NSPropertyListSerialization propertyListFromData:pData + mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&convError] retain]; + + if(!theme || readError != nil || [convError length] || !(format == NSPropertyListXMLFormat_v1_0 || format == NSPropertyListBinaryFormat_v1_0)) { + NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading data file", @"error while reading data file")] + defaultButton:NSLocalizedString(@"OK", @"OK button") + alternateButton:nil + otherButton:nil + informativeTextWithFormat:NSLocalizedString(@"File couldn't be read.", @"error while reading data file")]; + + [alert setAlertStyle:NSCriticalAlertStyle]; + [alert runModal]; + if (theme) [theme release]; + return; + } + + if([theme objectForKey:@"settings"] + && [[theme objectForKey:@"settings"] isKindOfClass:[NSArray class]] + && [[theme objectForKey:@"settings"] count] + && [[[theme objectForKey:@"settings"] objectAtIndex:0] isKindOfClass:[NSDictionary class]] + && [[[theme objectForKey:@"settings"] objectAtIndex:0] objectForKey:@"settings"]) { + + NSInteger counter = 0; + for(NSDictionary *dict in [theme objectForKey:@"settings"]) { + if(counter == 0) { + if([dict objectForKey:@"settings"]) { + NSDictionary *dic = [dict objectForKey:@"settings"]; + if([dic objectForKey:@"background"]) + [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"background"]]] forKey:SPCustomQueryEditorBackgroundColor]; + if([dic objectForKey:@"caret"]) + [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"caret"]]] forKey:SPCustomQueryEditorCaretColor]; + if([dic objectForKey:@"foreground"]) + [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"foreground"]]] forKey:SPCustomQueryEditorTextColor]; + if([dic objectForKey:@"lineHighlight"]) + [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"lineHighlight"]]] forKey:SPCustomQueryEditorHighlightQueryColor]; + if([dic objectForKey:@"selection"]) + [prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithRGBHexString:[dic objectForKey:@"selection"]]] forKey:SPCustomQueryEditorSelectionColor]; + } else { + continue; + } + } else { + if([dict objectForKey:@"name"] && [dict objectForKey:@"settings"] && [[dict objectForKey:@"settings"] isKindOfClass:[NSDictionary class]] && [[dict objectForKey:@"settings"] objectForKey:@"foreground"]) { + if([[dict objectForKey:@"name"] isEqualToString:@"Comment"]) + [prefs setObject:[NSArchiver archivedDataWithRootObject: + [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]] + forKey:SPCustomQueryEditorCommentColor]; + else if([[dict objectForKey:@"name"] isEqualToString:@"String"]) + [prefs setObject:[NSArchiver archivedDataWithRootObject: + [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]] + forKey:SPCustomQueryEditorQuoteColor]; + else if([[dict objectForKey:@"name"] isEqualToString:@"Keyword"]) + [prefs setObject:[NSArchiver archivedDataWithRootObject: + [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]] + forKey:SPCustomQueryEditorSQLKeywordColor]; + else if([[dict objectForKey:@"name"] isEqualToString:@"User-defined constant"]) + [prefs setObject:[NSArchiver archivedDataWithRootObject: + [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]] + forKey:SPCustomQueryEditorBacktickColor]; + else if([[dict objectForKey:@"name"] isEqualToString:@"Number"]) + [prefs setObject:[NSArchiver archivedDataWithRootObject: + [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]] + forKey:SPCustomQueryEditorNumericColor]; + else if([[dict objectForKey:@"name"] isEqualToString:@"Variable"]) + [prefs setObject:[NSArchiver archivedDataWithRootObject: + [NSColor colorWithRGBHexString:[[dict objectForKey:@"settings"] objectForKey:@"foreground"]]] + forKey:SPCustomQueryEditorVariableColor]; + } + } + counter++; + } + + [theme release]; + + } else { + + NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading data file", @"error while reading data file")] + defaultButton:NSLocalizedString(@"OK", @"OK button") + alternateButton:nil + otherButton:nil + informativeTextWithFormat:NSLocalizedString(@"No color theme data found.", @"error that no color theme found")]; + + [alert setAlertStyle:NSInformationalAlertStyle]; + [alert runModal]; + [theme release]; + return; + + } + } + } +} #pragma mark - /** diff --git a/Source/SPTextView.m b/Source/SPTextView.m index a8ba29c8..9501992a 100644 --- a/Source/SPTextView.m +++ b/Source/SPTextView.m @@ -168,11 +168,14 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) [self setNumericColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorNumericColor]]]; [self setVariableColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorVariableColor]]]; [self setOtherTextColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]]]; - [self setTextColor:[self otherTextColor]]; - [self setInsertionPointColor:[self otherTextColor]]; + [self setTextColor:otherTextColor]; + [self setInsertionPointColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorCaretColor]]]; [self setShouldHiliteQuery:[prefs boolForKey:SPCustomQueryHighlightCurrentQuery]]; + [self setSelectedTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSelectionColor]], NSBackgroundColorAttributeName, nil]]; // Register observers for the when editor background colors preference changes + [prefs addObserver:self forKeyPath:SPCustomQueryEditorSelectionColor options:NSKeyValueObservingOptionNew context:NULL]; + [prefs addObserver:self forKeyPath:SPCustomQueryEditorCaretColor options:NSKeyValueObservingOptionNew context:NULL]; [prefs addObserver:self forKeyPath:SPCustomQueryEditorFont options:NSKeyValueObservingOptionNew context:NULL]; [prefs addObserver:self forKeyPath:SPCustomQueryEditorBackgroundColor options:NSKeyValueObservingOptionNew context:NULL]; [prefs addObserver:self forKeyPath:SPCustomQueryEditorHighlightQueryColor options:NSKeyValueObservingOptionNew context:NULL]; @@ -209,6 +212,12 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) } else if ([keyPath isEqualToString:SPCustomQueryEditorHighlightQueryColor]) { [self setQueryHiliteColor:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]]]; [self setNeedsDisplay:YES]; + } else if ([keyPath isEqualToString:SPCustomQueryEditorCaretColor]) { + [self setInsertionPointColor:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]]]; + [self setNeedsDisplay:YES]; + } else if ([keyPath isEqualToString:SPCustomQueryEditorSelectionColor]) { + [self setSelectedTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]], NSBackgroundColorAttributeName, nil]]; + [self setNeedsDisplay:YES]; } else if ([keyPath isEqualToString:SPCustomQueryHighlightCurrentQuery]) { [self setShouldHiliteQuery:[[change objectForKey:NSKeyValueChangeNewKey] boolValue]]; [self setNeedsDisplay:YES]; @@ -2743,7 +2752,7 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) inTextContainer: [self textContainer] rectCount: &rectCount ]; [[self queryHiliteColor] setFill]; - NSRectFillList(queryRects, rectCount); + NSRectFillListUsingOperation(queryRects, rectCount, NSCompositeSourceOver); } // Highlight snippets coming from the Query Favorite text macro diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj index 79980eb9..8b6c7445 100644 --- a/sequel-pro.xcodeproj/project.pbxproj +++ b/sequel-pro.xcodeproj/project.pbxproj @@ -353,6 +353,7 @@ BC675A17107203BA00C5ACD4 /* ContentFilterManager.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC675A15107203BA00C5ACD4 /* ContentFilterManager.xib */; }; BC6D709D120C4C97008027B5 /* SPEditorTokens.h in Headers */ = {isa = PBXBuildFile; fileRef = 179F15040F7C433C00579954 /* SPEditorTokens.h */; }; BC6D709E120C4C9F008027B5 /* SPEditorTokens.l in Sources */ = {isa = PBXBuildFile; fileRef = 179F15050F7C433C00579954 /* SPEditorTokens.l */; }; + BC85F5D012193B7D00E255B5 /* SPColorAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = BC85F5CF12193B7D00E255B5 /* SPColorAdditions.m */; }; BC8B0DAF104004F900FC02EC /* EncodingPopupView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC8B0DAD104004F900FC02EC /* EncodingPopupView.xib */; }; BC8C8532100E0A8000D7A129 /* SPTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8C8531100E0A8000D7A129 /* SPTableView.m */; }; BC93FBBD11514ADE005F1D9F /* Navigator.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC93FBBB11514ADE005F1D9F /* Navigator.xib */; }; @@ -985,6 +986,8 @@ BC675A121072039C00C5ACD4 /* SPContentFilterManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPContentFilterManager.h; sourceTree = ""; }; BC675A131072039C00C5ACD4 /* SPContentFilterManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPContentFilterManager.m; sourceTree = ""; }; BC675A16107203BA00C5ACD4 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/ContentFilterManager.xib; sourceTree = ""; }; + BC85F5CE12193B7D00E255B5 /* SPColorAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPColorAdditions.h; sourceTree = ""; }; + BC85F5CF12193B7D00E255B5 /* SPColorAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPColorAdditions.m; sourceTree = ""; }; BC8B0DAE104004F900FC02EC /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/EncodingPopupView.xib; sourceTree = ""; }; BC8C8530100E0A8000D7A129 /* SPTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPTableView.h; sourceTree = ""; }; BC8C8531100E0A8000D7A129 /* SPTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPTableView.m; sourceTree = ""; }; @@ -2130,6 +2133,8 @@ 5870868310FA3E9C00D58E1C /* SPDataStorage.m */, 589582131154F8F400EDCC28 /* SPMainThreadTrampoline.h */, 589582141154F8F400EDCC28 /* SPMainThreadTrampoline.m */, + BC85F5CE12193B7D00E255B5 /* SPColorAdditions.h */, + BC85F5CF12193B7D00E255B5 /* SPColorAdditions.m */, ); name = "Category Additions"; sourceTree = ""; @@ -2743,6 +2748,7 @@ 17AF787B11FC41C00073D043 /* SPExportFilenameUtilities.m in Sources */, 17F90E481210B42700274C98 /* SPExportFile.m in Sources */, 17F90E4B1210B43A00274C98 /* SPExportFileUtilities.m in Sources */, + BC85F5D012193B7D00E255B5 /* SPColorAdditions.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; -- cgit v1.2.3