Skip to content

Commit

Permalink
Leopard version dedicated code removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Francois Moy committed Mar 15, 2010
1 parent 0348ae4 commit 9806162
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 100 deletions.
4 changes: 0 additions & 4 deletions Classes/SMLDummyView.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ - (id)initWithFrame:(NSRect)frame
smultronImage = [NSImage imageNamed:@"SMLMainIcon.icns"];
[[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationHigh];
[smultronImage setSize:NSMakeSize(128.0, 128.0)];
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5)
[[smultronImage bestRepresentationForDevice:nil] setSize:NSMakeSize(128.0, 128.0)];
#else
[[smultronImage bestRepresentationForRect:NSMakeRect(0.0, 0.0, 128.0, 128.0) context:nil hints:nil] setSize:NSMakeSize(128.0, 128.0)];
#endif

attributes = [[NSMutableDictionary alloc] init];
[attributes setValue:[NSFont boldSystemFontOfSize:20] forKey:NSFontAttributeName];
Expand Down
24 changes: 1 addition & 23 deletions Classes/SMLMainController.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,7 @@ - (void)awakeFromNib
checkForUpdates = YES;
} else {
NSDate *lastCheckDate = [NSUnarchiver unarchiveObjectWithData:[SMLDefaults valueForKey:@"LastCheckForUpdateDate"]];
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5)
if ([[SMLDefaults valueForKey:@"CheckForUpdatesInterval"] integerValue] == SMLCheckForUpdatesDaily) {
if ([[lastCheckDate addTimeInterval:(60 * 60 * 24)] compare:[NSDate date]] == NSOrderedAscending) {
checkForUpdates = YES;
}
} else if ([[SMLDefaults valueForKey:@"CheckForUpdatesInterval"] integerValue] == SMLCheckForUpdatesWeekly) {
if ([[lastCheckDate addTimeInterval:(60 * 60 * 24 * 7)] compare:[NSDate date]] == NSOrderedAscending) {
checkForUpdates = YES;
}
} else if ([[SMLDefaults valueForKey:@"CheckForUpdatesInterval"] integerValue] == SMLCheckForUpdatesMonthly) {
if ([[lastCheckDate addTimeInterval:(60 * 60 * 24 * 30)] compare:[NSDate date]] == NSOrderedAscending) {
checkForUpdates = YES;
}
}
#else

if ([[SMLDefaults valueForKey:@"CheckForUpdatesInterval"] integerValue] == SMLCheckForUpdatesDaily) {
if ([[NSDate dateWithTimeInterval:(60 * 60 * 24) sinceDate:lastCheckDate] compare:[NSDate date]] == NSOrderedAscending) {
checkForUpdates = YES;
Expand All @@ -131,7 +117,6 @@ - (void)awakeFromNib
checkForUpdates = YES;
}
}
#endif
}


Expand Down Expand Up @@ -172,10 +157,6 @@ - (void)checkForUpdateInSeparateThread
if (connected) {
NSDictionary *dictionary = [NSDictionary dictionaryWithContentsOfURL:[NSURL URLWithString:@"http://github.com/downloads/jfmoy/Smultron/checkForUpdate.plist"]];
if (dictionary) {
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5)
dictionary = [dictionary objectForKey:@"leopard"];
if (dictionary) {
#endif
float thisVersion = THISVERSION;
float latestVersion = [[dictionary valueForKey:@"latestVersion"] floatValue];
if (latestVersion > thisVersion) {
Expand All @@ -186,9 +167,6 @@ - (void)checkForUpdateInSeparateThread

// Store the last update date.
[SMLDefaults setValue:[NSArchiver archivedDataWithRootObject:[NSDate date]] forKey:@"LastCheckForUpdateDate"];
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5)
}
#endif
}
}
[checkUpdatePool drain];
Expand Down
13 changes: 0 additions & 13 deletions Classes/SMLStandardHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,6 @@ Unless required by applicable law or agreed to in writing, software distributed
#import <sys/mount.h>
#import <sys/xattr.h>


#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5)
@protocol NSTableViewDelegate <NSObject> @end
@protocol NSSplitViewDelegate <NSObject> @end
@protocol NSWindowDelegate <NSObject> @end
@protocol NSMenuDelegate <NSObject> @end
@protocol NSToolbarDelegate <NSObject> @end
@protocol NSApplicationDelegate <NSObject> @end
@protocol NSTableViewDataSource <NSObject> @end
@protocol NSTextStorageDelegate <NSObject> @end
@protocol NSOutlineViewDelegate <NSObject> @end
#endif

enum {
SMLDefaultsLineEndings = 0,
SMLUnixLineEndings = 1,
Expand Down
2 changes: 0 additions & 2 deletions Classes/SMLTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ - (void)setDefaults
[self setInsertionPointColor:[NSUnarchiver unarchiveObjectWithData:[SMLDefaults valueForKey:@"TextColourWell"]]];
[self setBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[SMLDefaults valueForKey:@"BackgroundColourWell"]]];

#if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5)
[self setAutomaticDataDetectionEnabled:YES];
[self setAutomaticTextReplacementEnabled:YES];
#endif

[self setPageGuideValues];

Expand Down
4 changes: 2 additions & 2 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<key>CFBundleSignature</key>
<string>SMUL</string>
<key>CFBundleVersion</key>
<string>3.6b1</string>
<string>3.7.1</string>
<key>ExcludeSyncKeys</key>
<array>
<string>PreferencesGeneralViewSavedFrame</string>
Expand All @@ -143,7 +143,7 @@
<string>HasInsertedDefaultCommands3</string>
</array>
<key>LSMinimumSystemVersion</key>
<string>10.6</string>
<string>10.5</string>
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSMainNibFile</key>
Expand Down
Binary file modified InfoPlist.strings
Binary file not shown.
56 changes: 0 additions & 56 deletions Smultron.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1842,59 +1842,6 @@
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
1FAF51021149D0F600636BB8 /* Release Leopard */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DEAD_CODE_STRIPPING = YES;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_ENABLE_OBJC_GC = required;
GCC_MODEL_TUNING = G5;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"$(HEADER_SEARCH_PATHS_QUOTED_FOR_PROJECT_1)",
"$(inherited)",
);
HEADER_SEARCH_PATHS_QUOTED_FOR_PROJECT_1 = "\"$(SRCROOT)/ICU/icu/\"";
MACOSX_DEPLOYMENT_TARGET = 10.5;
PREBINDING = NO;
SDKROOT = macosx10.5;
};
name = "Release Leopard";
};
1FAF51031149D0F600636BB8 /* Release Leopard */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)",
);
FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../SmultronSource\"";
FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)\"";
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
PRODUCT_NAME = Smultron;
WRAPPER_EXTENSION = app;
};
name = "Release Leopard";
};
1FAF51041149D0F600636BB8 /* Release Leopard */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
INSTALL_PATH = "$(HOME)/bin";
PREBINDING = NO;
PRODUCT_NAME = smultron;
ZERO_LINK = NO;
};
name = "Release Leopard";
};
7F5C266A0B73BF4000D2EDDC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -2012,7 +1959,6 @@
buildConfigurations = (
7F5C266A0B73BF4000D2EDDC /* Debug */,
7F5C266B0B73BF4000D2EDDC /* Release */,
1FAF51041149D0F600636BB8 /* Release Leopard */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
Expand All @@ -2022,7 +1968,6 @@
buildConfigurations = (
C05733C808A9546B00998B17 /* Debug */,
C05733C908A9546B00998B17 /* Release */,
1FAF51031149D0F600636BB8 /* Release Leopard */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
Expand All @@ -2032,7 +1977,6 @@
buildConfigurations = (
C05733CC08A9546B00998B17 /* Debug */,
C05733CD08A9546B00998B17 /* Release */,
1FAF51021149D0F600636BB8 /* Release Leopard */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
Expand Down

0 comments on commit 9806162

Please sign in to comment.