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>
Fri, 28 Aug 2009 20:05:50 +0000 (13:05 -0700)
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.

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

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 607091f..d87f88a 100644 (file)
@@ -11,6 +11,7 @@
 !/MakefileProto.*.in
 /afs
 /afs.x86_darwin_90.plist
+/afs.x86_darwin_100.plist
 /afsint
 /asm
 /asm-generic
index 7da76d1..1564103 100644 (file)
@@ -5,7 +5,7 @@
 /OpenAFS.Info.plist
 /OpenAFS.info
 /buildpkg.sh
-
+/CellServDB
 .DS_Store
 *.mode1v3
 *.pbxuser
index 1ff2daf..77251d7 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 df67372..9180d3b 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 b562acd..f7181c1 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
 // -------------------------------------------------------------------------------
 - (void) afsVolumeMountChange:(NSNotification *)notification{
index 3a8d9bd..d695592 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