mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-28 05:14:34 +00:00
Restored Panther compatibility, courtesy Stuart Morgan.
This commit is contained in:
1 parent
1c1bb3a142
commit
f814653c06
3 files changed
+24
-7
No files matched your search
@@ -14,6 +14,8 @@
|
||||
#import <unistd.h>
|
||||
#import <sys/stat.h>
|
||||
#import <dirent.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
@implementation NSFileManager (SUAuthenticationAdditions)
|
||||
|
||||
|
||||
@@ -42,6 +42,12 @@ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMA
|
||||
|
||||
#import "RSS.h"
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4
|
||||
@interface NSError (TigerPlusMethods)
|
||||
- (NSString *)localizedFailureReason;
|
||||
@end
|
||||
#endif
|
||||
|
||||
// This comparator function is used to sort the RSS items by their published date.
|
||||
int compareNewsItems(id item1, id item2, void *context)
|
||||
{
|
||||
@@ -154,8 +160,13 @@ int compareNewsItems(id item1, id item2, void *context)
|
||||
|
||||
if (rssData == nil)
|
||||
{
|
||||
NSString *failureReason;
|
||||
if ([error respondsToSelector:@selector(localizedFailureReason)])
|
||||
failureReason = [error localizedFailureReason];
|
||||
else
|
||||
failureReason = [error localizedDescription];
|
||||
NSException *exception = [NSException exceptionWithName: @"RSSDownloadFailed"
|
||||
reason: [error localizedFailureReason] userInfo: [error userInfo] ];
|
||||
reason: failureReason userInfo: [error userInfo] ];
|
||||
[exception raise];
|
||||
}
|
||||
|
||||
@@ -664,11 +675,15 @@ int compareNewsItems(id item1, id item2, void *context)
|
||||
else if ([name isEqualTo: @"amp"])
|
||||
name = @"&";
|
||||
|
||||
else if ([name isEqualTo: @"rsquo"])
|
||||
name = [NSString stringWithUTF8String:"\u2019"];
|
||||
else if ([name isEqualTo: @"rsquo"]) {
|
||||
char rsquo[4] = { 0xe2, 0x80, 0x99, 0x0 };
|
||||
name = [NSString stringWithUTF8String: rsquo];
|
||||
}
|
||||
|
||||
else if ([name isEqualTo: @"lsquo"])
|
||||
name = [NSString stringWithUTF8String:"\u2018"];
|
||||
else if ([name isEqualTo: @"lsquo"]) {
|
||||
char lsquo[4] = { 0xe2, 0x80, 0x98, 0x0 };
|
||||
name = [NSString stringWithUTF8String: lsquo];
|
||||
}
|
||||
|
||||
else if ([name isEqualTo: @"apos"])
|
||||
name = @"'";
|
||||
|
||||
+2
-2
@@ -26,5 +26,5 @@
|
||||
@end
|
||||
|
||||
@interface NSObject (SUAppcastDelegate)
|
||||
- appcastDidFinishLoading:(SUAppcast *)appcast;
|
||||
@end
|
||||
- (void)appcastDidFinishLoading:(SUAppcast *)appcast;
|
||||
@end
|
||||
Reference in new issue
Block a user