]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Fixed the tokens update and update .gitignore for MacOSX packaging file
authorClaudio Bisegni <Claudio.Bisegni@lnf.infn.it>
Fri, 28 Aug 2009 19:16:52 +0000 (21:16 +0200)
committerDerrick Brashear <shadow|account-1000005@unknown>
Thu, 17 Dec 2009 06:45:44 +0000 (22:45 -0800)
Fixed the tokens update on preference pane if operation is made with NSStatusItem.
Has been updated the src/packaging/MacOS/.gitingore for CellServDB file and src/libafs/.gitignore has been added afs.x86_darwin_100.plist.

Change-Id: Ie91e6e224fcaf9efa840c1153d168139aecb2584
Reviewed-on: http://gerrit.openafs.org/372
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-on: http://gerrit.openafs.org/956

src/libafs/.gitignore
src/packaging/MacOS/.gitignore
src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSBackgrounderDelegate.m
src/platform/DARWIN/AFSPreference/AFSCommanderPref.h
src/platform/DARWIN/AFSPreference/AFSCommanderPref.m
src/platform/DARWIN/AFSPreference/global.h

index 607091f7369cef1995ea08ad646d91dfa7430d52..d87f88a216a10dbf959e41c154ae154aae276114 100644 (file)
@@ -11,6 +11,7 @@
 !/MakefileProto.*.in
 /afs
 /afs.x86_darwin_90.plist
+/afs.x86_darwin_100.plist
 /afsint
 /asm
 /asm-generic
index eeb90c63c9f178043355e8df4e13d3c5ced655fd..90a6fcbf9b73b0be885b5bc6d3fd628463ae0af3 100644 (file)
@@ -8,6 +8,7 @@
 
 !/Makefile
 
+/CellServDB
 .DS_Store
 *.mode1v3
 *.pbxuser
index 1ff2daf05b4217839b982b73d09668f822a5b54a..77251d79919ea7ca696c3b8af35b81a6ef317aab 100644 (file)
        //Dispose afs manager
        [afsPropMngr release];
        [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAfsCommanderID 
-                                                                                                                                  object:kMenuExtraEventOccured];
+                                                                                                                                  object:kMExtraTokenOperation];
 }
 
 // -------------------------------------------------------------------------------
        [afsMngr unlog:nil];
        [self updateAfsStatus:nil];
        [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAfsCommanderID 
-                                                                                                                                  object:kMenuExtraEventOccured];
+                                                                                                                                  object:kMExtraTokenOperation];
 }
 
 
index df673728931958179323d657b4b15bfc83298666..9180d3bc186adcc501d4dfaa46279a59d469582b 100644 (file)
@@ -136,6 +136,7 @@ int CoreMenuExtraRemoveMenuExtra(void *menuExtra, int whoCares);
 - (void) writePreferenceFile;
 - (void) readPreferenceFile;
 - (void) refreshGui:(NSNotification *)notification;
+- (void) refreshTokensNotify:(NSNotification*)notification;
 - (void) afsVolumeMountChange:(NSNotification *)notification;
 - (void)tabView:(NSTabView *)tabView willSelectTabViewItem: (NSTabViewItem *)tabViewItem;
 @end
index b562acd1e689cd096b28f46902830d2a81ee98d8..f7181c1bb08b95578ea2d8b6eb7f881d0008f3fc 100644 (file)
        afsProperty = [[AFSPropertyManager alloc] init];
        
        // register preference pane to detect menuextra killed by user
-/*     [[NSDistributedNotificationCenter defaultCenter] addObserver:self 
-                                                                                                               selector:@selector(mextraChangeActivation:) 
-                                                                                                                       name:kAfsCommanderID 
-                                                                                                                 object:kMExtraClosedNotification];*/
+       [[NSDistributedNotificationCenter defaultCenter] addObserver:self
+                                                                                                               selector:@selector(refreshTokensNotify:)
+                                                                                                                       name:kAfsCommanderID
+                                                                                                                 object:kMExtraTokenOperation];
         
        [[NSDistributedNotificationCenter defaultCenter] addObserver:self 
                                                                                                                selector:@selector(refreshGui:) 
        [self writePreferenceFile];
        
        // unregister preference pane to detect menuextra killed by user
-       [[NSDistributedNotificationCenter defaultCenter] removeObserver:self 
-                                                                                                                          name:kAfsCommanderID 
+       [[NSDistributedNotificationCenter defaultCenter] removeObserver:self
+                                                                                                                          name:kAfsCommanderID
                                                                                                                         object:kMExtraClosedNotification];
-       [[NSDistributedNotificationCenter defaultCenter] removeObserver:self 
-                                                                                                                          name:kAfsCommanderID 
+       [[NSDistributedNotificationCenter defaultCenter] removeObserver:self
+                                                                                                                          name:kAfsCommanderID
+                                                                                                                        object:kMExtraTokenOperation];
+       [[NSDistributedNotificationCenter defaultCenter] removeObserver:self
+                                                                                                                          name:kAfsCommanderID
                                                                                                                         object:kMenuExtraEventOccured];
        [[[NSWorkspace sharedWorkspace] notificationCenter] removeObserver:self 
                                                                                                                                  name:NSWorkspaceDidMountNotification object:nil];
 - (void) refreshGui:(NSNotification *)notification{
        BOOL afsIsUp = [afsProperty checkAfsStatus];
        [self setAfsStatus];
-       [self refreshTokens:nil];
        [tokensButton setEnabled:afsIsUp];
        [unlogButton setEnabled:afsIsUp];
 }
 
+// -------------------------------------------------------------------------------
+//  -(void) refreshTokensNotify:(NSNotification*)notification
+// -------------------------------------------------------------------------------
+-(void) refreshTokensNotify:(NSNotification*)notification {
+       [self refreshTokens:nil];
+}
+
 // -------------------------------------------------------------------------------
 //  afsVolumeMountChange: Track the afs volume state change
 // -------------------------------------------------------------------------------
index 3a8d9bdb2cf6049d88b36a340a9dd5ba4aa1c50e..d695592fe486aafa3ee7fd36b18a0fd2732a022f 100644 (file)
@@ -57,6 +57,8 @@
 #define kMenuExtraEventOccured @"menu_extra_event_occured"
 // Changed preference notification key
 #define kMExtraClosedNotification @"preference_changed"
+// Changed preference notification key
+#define kMExtraTokenOperation @"kMExtraTokenOperation"
 // Update MenuExtra AfsState notification key
 #define kMExtraAFSStateChange @"menu_extra_afs_state_change"
 // Update MenuExtra for show menu notification key