From ad93154f88120c37081fc9f816b25a9410b3b89c Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Fri, 11 Dec 2009 01:01:04 +0000 Subject: Convert URL constants from #define's to extern's. --- Source/SPAppController.m | 10 +++++----- Source/SPConstants.h | 14 +++++++------- Source/SPConstants.m | 7 +++++++ 3 files changed, 19 insertions(+), 12 deletions(-) (limited to 'Source') diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 62255501..fb497621 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -363,7 +363,7 @@ */ - (IBAction)donate:(id)sender { - [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:SEQUEL_PRO_DONATIONS_URL]]; + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:SPDonationsURL]]; } /** @@ -371,7 +371,7 @@ */ - (IBAction)visitWebsite:(id)sender { - [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:SEQUEL_PRO_HOME_PAGE_URL]]; + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:SPHomePageURL]]; } /** @@ -379,7 +379,7 @@ */ - (IBAction)visitHelpWebsite:(id)sender { - [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:SEQUEL_PRO_DOCS_URL]]; + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:SPDocumentationURL]]; } /** @@ -387,7 +387,7 @@ */ - (IBAction)visitFAQWebsite:(id)sender { - [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:SEQUEL_PRO_FAQ_URL]]; + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:SPFAQURL]]; } /** @@ -395,7 +395,7 @@ */ - (IBAction)provideFeedback:(id)sender { - [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:SEQUEL_PRO_CONTACT_URL]]; + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:SPContactURL]]; } #pragma mark - diff --git a/Source/SPConstants.h b/Source/SPConstants.h index 38ffdc2d..44675888 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -28,13 +28,6 @@ #import -// URLs -#define SEQUEL_PRO_HOME_PAGE_URL @"http://www.sequelpro.com/" -#define SEQUEL_PRO_DONATIONS_URL @"http://www.sequelpro.com/donate.html" -#define SEQUEL_PRO_FAQ_URL @"http://www.sequelpro.com/frequently-asked-questions.html" -#define SEQUEL_PRO_DOCS_URL @"http://www.sequelpro.com/docs" -#define SEQUEL_PRO_CONTACT_URL @"http://www.sequelpro.com/docs/Contact_the_developers" - // Main toolbar constants #define MAIN_TOOLBAR_DATABASE_SELECTION @"DatabaseSelectToolbarItemIdentifier" #define MAIN_TOOLBAR_HISTORY_NAVIGATION @"HistoryNavigationToolbarItemIdentifier" @@ -184,6 +177,13 @@ extern NSString *SPQuickLookTypes; extern NSString *SPTableChangedNotification; extern NSString *SPBlobTextEditorSpellCheckingEnabled; +// URLs +extern NSString *SPHomePageURL; +extern NSString *SPDonationsURL; +extern NSString *SPFAQURL; +extern NSString *SPDocumentationURL; +extern NSString *SPContactURL; + // Toolbar constants // Preferences toolbar diff --git a/Source/SPConstants.m b/Source/SPConstants.m index 1f9e9482..7e864a51 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -136,6 +136,13 @@ NSString *SPQuickLookTypes = @"QuickLookTypes"; NSString *SPTableChangedNotification = @"SPTableSelectionChanged"; NSString *SPBlobTextEditorSpellCheckingEnabled = @"BlobTextEditorSpellCheckingEnabled"; +// URLs +NSString *SPHomePageURL = @"http://www.sequelpro.com/"; +NSString *SPDonationsURL = @"http://www.sequelpro.com/donate.html"; +NSString *SPFAQURL = @"http://www.sequelpro.com/docs/Frequently_Asked_Questions"; +NSString *SPDocumentationURL = @"http://www.sequelpro.com/docs/"; +NSString *SPContactURL = @"http://www.sequelpro.com/docs/Contact_the_developers"; + // Toolbar constants // Preferences toolbar -- cgit v1.2.3