#import "LastCompletedSyncTransformer.h"
@implementation pithos_macosAppDelegate
-@synthesize pithosBrowserController, alwaysNo, aboutVersion, activated, currentPithosAccount, pithosAccounts, pithosAccountsDictionary, syncPithosAccount;
+@synthesize pithosBrowserController, alwaysNo, activated, currentPithosAccount, pithosAccounts, pithosAccountsDictionary, syncPithosAccount;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
[[NSAppleEventManager sharedAppleEventManager] setEventHandler:self
andEventID:kAEGetURL];
userDefaults = [[NSUserDefaults standardUserDefaults] retain];
-
- NSString *stringURL = [userDefaults stringForKey:@"aboutURL"];
- NSURL *testURL = (stringURL) ? [NSURL URLWithString:stringURL] : nil;
- if (!testURL || !testURL.scheme || !testURL.host) {
- [userDefaults setObject:@"https://pithos.dev.grnet.gr/docs/pithos" forKey:@"aboutURL"];
- [userDefaults synchronize];
- }
syncTimeInterval = [userDefaults doubleForKey:@"syncTimeInterval"];
if (syncTimeInterval <= 0.0) {
}
#pragma mark -
-#pragma mark Properties
-
-- (NSString *)aboutVersion {
- return [NSString stringWithFormat:@"About Pithos+ %@ (%@)",
- [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"],
- [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]];
-}
-
-#pragma mark -
#pragma mark NSMenuDelegate
- (void)menuNeedsUpdate:(NSMenu *)menu {
[NSApp activateIgnoringOtherApps:YES];
}
-- (IBAction)aboutPithos:(id)sender {
- [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[userDefaults stringForKey:@"aboutURL"]]];
-}
-
- (void)sync {
if (!activated || ![pithosAccounts count])
return;