commit 544b6f52411f5e25aed9c5d9fb4619eb08e3714a
Author: Miltiadis Vasilakis <mvasilak@gmail.com>
Date:   Thu Mar 1 18:10:20 2012 +0200

    Make activityFacility update interval a user default. Move refresh button to context menu. UI changes.

diff --git a/pithos-macos/pithos_macosAppDelegate.m b/pithos-macos/pithos_macosAppDelegate.m
index 4730bf1..b173673 100644
--- a/pithos-macos/pithos_macosAppDelegate.m
+++ b/pithos-macos/pithos_macosAppDelegate.m
@@ -46,7 +46,7 @@
 #import "LastCompletedSyncTransformer.h"
 
 @implementation pithos_macosAppDelegate
-@synthesize pithosBrowserController, alwaysNo, activated, currentPithosAccount, pithosAccounts, pithosAccountsDictionary, syncPithosAccount;
+@synthesize pithosBrowserController, alwaysNo, activated, currentPithosAccount, pithosAccounts, pithosAccountsDictionary, syncPithosAccount, activityFacilityTimeInterval;
 
 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
     [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self 
@@ -62,7 +62,14 @@
         [userDefaults setDouble:syncTimeInterval forKey:@"syncTimeInterval"];
         [userDefaults synchronize];
     }
-    
+
+    activityFacilityTimeInterval = [userDefaults doubleForKey:@"activityFacilityTimeInterval"];
+    if (activityFacilityTimeInterval <= 0.0) {
+        activityFacilityTimeInterval = 0.05;
+        [userDefaults setDouble:activityFacilityTimeInterval forKey:@"activityFacilityTimeInterval"];
+        [userDefaults synchronize];
+    }
+
     NSData *tmpData = [userDefaults objectForKey:@"pithosAccounts"];
     NSArray *tmpArray;
     if (tmpData && (tmpArray = [NSKeyedUnarchiver unarchiveObjectWithData:tmpData]))
@@ -224,12 +231,15 @@
                              [[[[LastCompletedSyncTransformer alloc] init] autorelease] transformedValue:pithosAccount.syncLastCompleted]];
             if ([pithosAccount isEqualTo:syncPithosAccount] && [pithosAccount.syncDaemon isSyncing])
                 menuItemTitle = [menuItemTitle stringByAppendingString:@" (syncing)"];
-            menuItem = [[[NSMenuItem alloc] initWithTitle:menuItemTitle 
-                                                   action:@selector(menuChangeSyncActive:) 
-                                            keyEquivalent:@""] autorelease];
-            [menuItem setRepresentedObject:pithosAccount];
-            [menuItem setEnabled:pithosAccount.active];
-            [menuItem setState:((pithosAccount.active && pithosAccount.syncActive) ? NSOnState : NSOffState)];
+//            menuItem = [[[NSMenuItem alloc] initWithTitle:menuItemTitle 
+//                                                   action:@selector(menuChangeSyncActive:) 
+//                                            keyEquivalent:@""] autorelease];
+//            [menuItem setRepresentedObject:pithosAccount];
+//            [menuItem setEnabled:pithosAccount.active];
+//            [menuItem setState:((pithosAccount.active && pithosAccount.syncActive) ? NSOnState : NSOffState)];
+            menuItem = [[[NSMenuItem alloc] initWithTitle:menuItemTitle action:nil keyEquivalent:@""] autorelease];
+            [menuItem setEnabled:NO];
+            [menuItem setState:NO];
             [menu addItem:menuItem];
         }
         [menu addItem:[NSMenuItem separatorItem]];
@@ -373,14 +383,14 @@
     }
 }
 
-- (void)menuChangeSyncActive:(NSMenuItem *)sender {
-    PithosAccount *pithosAccount = (PithosAccount *)[sender representedObject];
-    if (!pithosAccount.active)
-        return;
-    pithosAccount.syncActive = !pithosAccount.syncActive;
-    if (pithosPreferencesController && [pithosPreferencesController.selectedPithosAccount isEqualTo:pithosAccount])
-        pithosPreferencesController.syncActive = pithosAccount.syncActive;
-    [self savePithosAccounts:self];
-}
+//- (void)menuChangeSyncActive:(NSMenuItem *)sender {
+//    PithosAccount *pithosAccount = (PithosAccount *)[sender representedObject];
+//    if (!pithosAccount.active)
+//        return;
+//    pithosAccount.syncActive = !pithosAccount.syncActive;
+//    if (pithosPreferencesController && [pithosPreferencesController.selectedPithosAccount isEqualTo:pithosAccount])
+//        pithosPreferencesController.syncActive = pithosAccount.syncActive;
+//    [self savePithosAccounts:self];
+//}
 
 @end
