You can subscribe to this list here.
2006 |
Jan
|
Feb
(52) |
Mar
(83) |
Apr
(37) |
May
(23) |
Jun
(9) |
Jul
(10) |
Aug
(30) |
Sep
(4) |
Oct
(9) |
Nov
(10) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(3) |
Feb
(20) |
Mar
(3) |
Apr
|
May
(10) |
Jun
(17) |
Jul
(11) |
Aug
(6) |
Sep
(6) |
Oct
|
Nov
(15) |
Dec
(15) |
2008 |
Jan
(12) |
Feb
(1) |
Mar
(13) |
Apr
(7) |
May
(4) |
Jun
(37) |
Jul
(9) |
Aug
(7) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
(1) |
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2010 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
|
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(4) |
Nov
(6) |
Dec
(2) |
2011 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
(3) |
Oct
(3) |
Nov
(6) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Andrew M. <fit...@us...> - 2006-08-29 01:28:57
|
Update of /cvsroot/radmind/radmind-assistant/rte In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27059 Modified Files: RXPrefs.h RXPrefs.m Log Message: Basic filter support. Index: RXPrefs.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/RXPrefs.m,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** RXPrefs.m 14 Jul 2006 14:27:24 -0000 1.9 --- RXPrefs.m 29 Aug 2006 01:28:54 -0000 1.10 *************** *** 25,28 **** --- 25,29 ---- #import "RXPrefs.h" #import "NSPanel(Resizing).h" + #import "UMArrayController.h" #include <CoreFoundation/CoreFoundation.h> *************** *** 33,47 **** --- 34,72 ---- #define RTEPrefToolbarGeneralIdentifier @"RTEPrefToolbarGeneral" + #define RTEPrefToolbarFilterIdentifier @"RTEPrefToolbarFilters" #define RTEPrefToolbarAdvancedIdentifier @"RTEPrefToolbarAdvanced" @implementation RXPrefs + + ( void )initialize + { + [[ NSUserDefaults standardUserDefaults ] registerDefaults: + [ NSDictionary dictionaryWithObject: [ NSNumber numberWithInt: 0 ] + forKey: @"RTECaseSensitive" ]]; + } + - ( id )init { self = [ super init ]; + if ( self ) { + if ( [[ NSApp delegate ] respondsToSelector: + @selector( transcriptFilters ) ] ) { + transcriptFilters = [[ NSApp delegate ] performSelector: + @selector( transcriptFilters ) ]; + } + } return( self ); } + - ( void )observeValueForKeyPath: ( NSString * )keyPath + ofObject: ( id )object change: ( NSDictionary * )change + context: ( void * )context + { + NSLog( @"keyPath: %@", keyPath ); + NSLog( @"object: %@", object ); + NSLog( @"%@", [ object valueForKeyPath: keyPath ] ); + } + - ( void )toolbarSetup { *************** *** 70,73 **** --- 95,103 ---- } + [ filterController addObserver: self + forKeyPath: @"arrangedObjects.filterName" + options: 0 + context: NULL ]; + [ prefPanel center ]; } *************** *** 102,105 **** --- 132,146 ---- [ preftbarItem setAction: @selector( showAdvancedPreferences: ) ]; [ preftbarItem setTarget: self ]; + } else if ( [ itemIdent isEqualToString: RTEPrefToolbarFilterIdentifier ] ) { + [ preftbarItem setLabel: + NSLocalizedString( @"Filters", @"Filters" ) ]; + [ preftbarItem setPaletteLabel: + NSLocalizedString( @"Filters", @"Filters" ) ]; + [ preftbarItem setToolTip: + NSLocalizedString( @"Show Filter Preferences", + @"Show Filter Preferences" ) ]; + [ preftbarItem setImage: [ NSImage imageNamed: @"advancedprefs.png" ]]; + [ preftbarItem setAction: @selector( showFilterPreferences: ) ]; + [ preftbarItem setTarget: self ]; } *************** *** 116,119 **** --- 157,161 ---- NSArray *tmp = [ NSArray arrayWithObjects: RTEPrefToolbarGeneralIdentifier, + RTEPrefToolbarFilterIdentifier, RTEPrefToolbarAdvancedIdentifier, nil ]; *************** *** 125,128 **** --- 167,171 ---- NSArray *tmp = [ NSArray arrayWithObjects: RTEPrefToolbarGeneralIdentifier, + RTEPrefToolbarFilterIdentifier, RTEPrefToolbarAdvancedIdentifier, nil ]; *************** *** 135,138 **** --- 178,182 ---- NSArray *tmp = [ NSArray arrayWithObjects: RTEPrefToolbarGeneralIdentifier, + RTEPrefToolbarFilterIdentifier, RTEPrefToolbarAdvancedIdentifier, nil ]; *************** *** 157,160 **** --- 201,220 ---- } + - ( void )showFilterPreferences: ( id )sender + { + NSTabViewItem *item; + int index; + + index = [ prefTabView indexOfTabViewItemWithIdentifier: @"Filters" ]; + item = [ prefTabView tabViewItemAtIndex: index ]; + + [ prefTabView selectTabViewItemWithIdentifier: @"DummyTab" ]; + [ prefPanel resizeForContentView: prefFilterPreferencesBox ]; + [ item setView: prefFilterPreferencesBox ]; + [ prefTabView selectTabViewItemWithIdentifier: @"Filters" ]; + [ prefPanel setTitle: NSLocalizedString( @"Filter Preferences", + @"Filter Preferences" ) ]; + } + - ( void )showAdvancedPreferences: ( id )sender { Index: RXPrefs.h =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/RXPrefs.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** RXPrefs.h 14 Jul 2006 14:27:24 -0000 1.9 --- RXPrefs.h 29 Aug 2006 01:28:54 -0000 1.10 *************** *** 25,36 **** --- 25,42 ---- #import <Cocoa/Cocoa.h> + @class UMArrayController; + @interface RXPrefs : NSObject { IBOutlet NSPanel *prefPanel; IBOutlet NSTabView *prefTabView; + IBOutlet UMArrayController *filterController; /* IBOutlet NSButton *prefWarnDirDelete; */ /* general preferences */ IBOutlet NSBox *prefGeneralPreferencesBox; + + /* filter preferences */ + IBOutlet NSBox *prefFilterPreferencesBox; /* advanced preferences */ *************** *** 39,42 **** --- 45,50 ---- IBOutlet NSTextField *prefTimeoutField; IBOutlet NSStepper *prefTimeoutStepper; + + NSMutableArray *transcriptFilters; } |
From: Andrew M. <fit...@us...> - 2006-08-29 01:28:27
|
Update of /cvsroot/radmind/radmind-assistant/rte In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26652 Modified Files: RXAuthRW.m Log Message: Fix for hang occurring when sending dictionary containing attributed string across threads. Index: RXAuthRW.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/RXAuthRW.m,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** RXAuthRW.m 26 Apr 2006 14:02:27 -0000 1.19 --- RXAuthRW.m 29 Aug 2006 01:28:24 -0000 1.20 *************** *** 298,303 **** } if ( action == FSDIFF ) { ! [ transcriptLines addObject: [ NSMutableDictionary dictionaryForLine: ! [ NSString stringWithUTF8String: buf ]]]; if ( [ transcriptLines count ] % 100 == 0 ) { --- 298,303 ---- } if ( action == FSDIFF ) { ! [ transcriptLines addObject: ! [ NSString stringWithUTF8String: buf ]]; if ( [ transcriptLines count ] % 100 == 0 ) { *************** *** 367,371 **** case FSDIFF: ! [ rxt addLines: transcriptLines fromThreadWithID: [ self threadID ]]; break; --- 367,374 ---- case FSDIFF: ! if ( [ transcriptLines count ] ) { ! [ rxt addLines: transcriptLines ! fromThreadWithID: [ self threadID ]]; ! } break; *************** *** 380,386 **** if ( transcriptLines != nil ) { ! [ transcriptLines release ]; } - if ( twhichOutput != nil ) { [ twhichOutput release ]; --- 383,388 ---- if ( transcriptLines != nil ) { ! [ transcriptLines release ]; } if ( twhichOutput != nil ) { [ twhichOutput release ]; |
From: Andrew M. <fit...@us...> - 2006-08-29 01:26:55
|
Update of /cvsroot/radmind/radmind-assistant/rte In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26258 Modified Files: RXAppController.h RXAppController.m Log Message: Filter support. Index: RXAppController.h =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/RXAppController.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RXAppController.h 7 Mar 2005 14:53:46 -0000 1.4 --- RXAppController.h 29 Aug 2006 01:26:52 -0000 1.5 *************** *** 29,35 **** --- 29,38 ---- @interface RXAppController : NSObject { + IBOutlet NSMenuItem *filtersMenuItem; + @private RXPrefs *prefController; NSString *_rteUserName; + NSMutableArray *_rteFilters; } *************** *** 37,40 **** --- 40,50 ---- - ( NSString * )sessionUserName; + - ( NSMutableArray * )readTranscriptFilters; + - ( NSMutableArray * )transcriptFilters; + - ( void )createFilterMenu; + + @end + @interface NSObject(RTEApplicationFilterDelegate) + - ( NSDictionary * )filterWithTag: ( int )tag; @end Index: RXAppController.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/RXAppController.m,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RXAppController.m 7 Mar 2005 14:53:46 -0000 1.6 --- RXAppController.m 29 Aug 2006 01:26:52 -0000 1.7 *************** *** 24,27 **** --- 24,28 ---- #import "RXAppController.h" + #import "UMArrayController.h" #include <CoreFoundation/CoreFoundation.h> *************** *** 36,41 **** { self = [ super init ]; ! prefController = nil; ! _rteUserName = nil; return( self ); --- 37,44 ---- { self = [ super init ]; ! if ( self ) { ! prefController = nil; ! _rteUserName = nil; ! _rteFilters = nil; } return( self ); *************** *** 130,134 **** --- 133,304 ---- _rteUserName = [[ NSString stringWithUTF8String: pw->pw_name ] retain ]; } + + _rteFilters = [[ self readTranscriptFilters ] retain ]; + [ self createFilterMenu ]; + } + + #pragma mark Trancript Filter handling + - ( NSMutableArray * )transcriptFilters + { + return( _rteFilters ); + } + + - ( NSMutableArray * )readTranscriptFilters + { + NSMutableDictionary *filter; + NSMutableArray *transcriptFilters = nil; + NSArray *tmp; + NSString *path; + unsigned int i, tag = 0; + + /* first check app bundle, read any available filters */ + if (( tmp = [[ NSBundle mainBundle ] + pathsForResourcesOfType: @"transcriptFilter" + inDirectory: @"Filters" ] ) != nil ) { + for ( i = 0; i < [ tmp count ]; i++, tag++ ) { + if (( filter = [ NSMutableDictionary dictionaryWithContentsOfFile: + [ tmp objectAtIndex: i ]] ) == nil ) { + NSLog( @"Couldn't read %@, skipping", + [ tmp objectAtIndex: i ] ); + continue; + } + + /* set tag for menu item */ + [ filter setObject: [ NSNumber numberWithInt: tag ] + forKey: @"menuTag" ]; + + /* user cannot modify these */ + [ filter setObject: [ NSNumber numberWithBool: YES ] + forKey: @"immutable" ]; + + if ( transcriptFilters == nil ) { + transcriptFilters = [ NSMutableArray array ]; + } + [ transcriptFilters addObject: filter ]; + } + } + + /* then check the global App Support folder */ + if ( floor( NSAppKitVersionNumber ) <= NSAppKitVersionNumber10_3 ) { + /* 10.3 doesn't have NSApplicationSupportDirectory defined */ + tmp = [ NSArray arrayWithObject: @"/Library/Application Support" ]; + } else { + tmp = NSSearchPathForDirectoriesInDomains( + NSApplicationSupportDirectory, NSLocalDomainMask, YES ); + } + if ( tmp ) { + path = [[ tmp objectAtIndex: 0 ] stringByAppendingPathComponent: + @"Radmind Transcript Editor" ]; + path = [ path stringByAppendingPathComponent: @"Filters" ]; + tmp = [[ NSFileManager defaultManager ] + directoryContentsAtPath: path ]; + for ( i = 0; i < [ tmp count ]; i++ ) { + if (( filter = [ NSMutableDictionary dictionaryWithContentsOfFile: + [ tmp objectAtIndex: i ]] ) == nil ) { + NSLog( @"Couldn't read %@, skipping", + [ tmp objectAtIndex: i ] ); + continue; + } + + /* user cannot modify these */ + [ filter setObject: [ NSNumber numberWithBool: YES ] + forKey: @"immutable" ]; + + if ( transcriptFilters == nil ) { + transcriptFilters = [ NSMutableArray array ]; + } + [ transcriptFilters addObject: filter ]; + } + } + + /* finally, check user App Support folder */ + if ( floor( NSAppKitVersionNumber ) <= NSAppKitVersionNumber10_3 ) { + /* 10.3 doesn't have NSApplicationSupportDirectory defined */ + tmp = [ NSArray arrayWithObject: + [ @"~/Library/Application Support" stringByExpandingTildeInPath ]]; + } else { + tmp = NSSearchPathForDirectoriesInDomains( + NSApplicationSupportDirectory, NSUserDomainMask, YES ); + } + if ( tmp ) { + path = [[ tmp objectAtIndex: 0 ] stringByAppendingPathComponent: + @"Radmind Transcript Editor" ]; + path = [ path stringByAppendingPathComponent: @"Filters" ]; + tmp = [[ NSFileManager defaultManager ] + directoryContentsAtPath: path ]; + for ( i = 0; i < [ tmp count ]; i++ ) { + if (( filter = [ NSMutableDictionary dictionaryWithContentsOfFile: + [ tmp objectAtIndex: i ]] ) == nil ) { + NSLog( @"Couldn't read %@, skipping", + [ tmp objectAtIndex: i ] ); + continue; + } + + if ( transcriptFilters == nil ) { + transcriptFilters = [ NSMutableArray array ]; + } + [ transcriptFilters addObject: filter ]; + } + } + + /* XXX sort filters */ + + return( transcriptFilters ); + } + + - ( NSMutableDictionary * )filterWithTag: ( int )tag + { + unsigned int i; + + for ( i = 0; i < [[ self transcriptFilters ] count ]; i++ ) { + if ( [[[[ self transcriptFilters ] objectAtIndex: i ] + objectForKey: @"menuTag" ] intValue ] == tag ) { + break; + } + } + if ( i >= [[ self transcriptFilters ] count ] ) { + return( nil ); + } + + return( [[ self transcriptFilters ] objectAtIndex: i ] ); + } + + - ( void )createFilterMenu + { + NSMenu *newFilterMenu; + NSMenuItem *item; + NSMutableArray *filters = [ self transcriptFilters ]; + NSString *title; + unsigned int i; + + if ( filters == nil || [ filters count ] == 0 ) { + return; + } + + newFilterMenu = [[ NSMenu alloc ] initWithTitle: + NSLocalizedString( @"Filters", @"Filters" ) ]; + for ( i = 0; i < [ filters count ]; i++ ) { + title = [[ filters objectAtIndex: i ] objectForKey: @"filterName" ]; + if ( title == nil ) { + title = NSLocalizedString( @"Untitled Filter", @"Untitled Filter" ); + } + + item = [[ NSMenuItem alloc ] initWithTitle: title + action: @selector( applyFilterToTranscript: ) + keyEquivalent: @"" ]; + if ( item == nil ) { + NSLog( @"Couldn't create menu item with title %@", title ); + continue; + } + [ item setTag: [[[ filters objectAtIndex: i ] + objectForKey: @"menuTag" ] intValue ]]; + + [ newFilterMenu insertItem: item atIndex: i ]; + } + + [ filtersMenuItem setSubmenu: newFilterMenu ]; + [ newFilterMenu autorelease ]; } @end + \ No newline at end of file |
From: Andrew M. <fit...@us...> - 2006-08-29 01:26:12
|
Update of /cvsroot/radmind/radmind-assistant/rte In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25850 Modified Files: NSMutableDictionary(RXAdditions).m Log Message: Handle setting ellipsis truncation in displayedPath attributed string. Index: NSMutableDictionary(RXAdditions).m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/NSMutableDictionary(RXAdditions).m,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NSMutableDictionary(RXAdditions).m 17 Aug 2004 15:54:05 -0000 1.7 --- NSMutableDictionary(RXAdditions).m 29 Aug 2006 01:26:08 -0000 1.8 *************** *** 1,3 **** --- 1,4 ---- #import "NSMutableDictionary(RXAdditions).h" + #import <Cocoa/Cocoa.h> #include <sys/param.h> *************** *** 153,156 **** --- 154,158 ---- NSMutableDictionary *dict; CFRange range = { 0, 0 }; + static NSMutableParagraphStyle *style = nil; if ( [ line characterAtIndex: 0 ] == '\n' ) { *************** *** 194,197 **** --- 196,205 ---- } + /* set appropriate linebreak mode for display */ + if ( style == nil ) { + style = [[ NSParagraphStyle defaultParagraphStyle ] mutableCopy ]; + [ style setLineBreakMode: NSLineBreakByTruncatingMiddle ]; + } + dict = [ NSMutableDictionary dictionaryForType: type atTIndex: 0 *************** *** 200,203 **** --- 208,225 ---- line: l ]; + if ( dict ) { + NSMutableAttributedString *attrString; + + if ( [ dict objectForKey: @"path" ] != nil ) { + attrString = [[ NSMutableAttributedString alloc ] initWithString: + [ dict objectForKey: @"path" ]]; + [ attrString addAttribute: NSParagraphStyleAttributeName + value: style + range: NSMakeRange( 0, [[ attrString string ] length ] ) ]; + [ dict setObject: attrString forKey: @"displayedPath" ]; + [ attrString release ]; + } + } + return( dict ); } |
From: Andrew M. <fit...@us...> - 2006-08-29 01:25:26
|
Update of /cvsroot/radmind/radmind-assistant/rte In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25827 Added Files: UMArrayController.h UMArrayController.m Log Message: NSArrayController custom subclass. --- NEW FILE: UMArrayController.m --- #import "UMArrayController.h" @implementation UMArrayController - ( id )init { self = [ super init ]; if ( self ) { _umSearchTerm = nil; } return( self ); } - ( NSString * )searchTerm { return( _umSearchTerm ); } - ( void )setSearchTerm: ( NSString * )searchTerm { if ( _umSearchTerm != nil ) { [ _umSearchTerm release ]; _umSearchTerm = nil; } if ( searchTerm ) { _umSearchTerm = [ searchTerm retain ]; } } /* NSSearchField-related methods */ - ( void )search: ( id )sender { if ( ![ sender isKindOfClass: [ NSSearchField class ]]) { return; } [ self setSearchTerm: [ sender stringValue ]]; [ self rearrangeObjects ]; } /* set up delegation for arranging methods? */ - ( NSArray * )arrangeObjects: ( NSArray * )objects { NSMutableArray *alternateObjects; NSAutoreleasePool *pool; NSString *lowercaseTerm, *lowercaseString; int i; if ( [ self searchTerm ] == nil || [[ self searchTerm ] isEqualToString: @"" ] ) { return( [ super arrangeObjects: objects ] ); } lowercaseTerm = [[ self searchTerm ] lowercaseString ]; alternateObjects = [ NSMutableArray arrayWithCapacity: [ objects count ]]; pool = [[ NSAutoreleasePool alloc ] init ]; for ( i = 0; i < [ objects count ]; i++ ) { id obj = [ objects objectAtIndex: i ]; if ( i && ( i % 20 == 0 )) { [ pool release ]; pool = [[ NSAutoreleasePool alloc ] init ]; } lowercaseString = [[ obj valueForKeyPath: @"hostidString" ] lowercaseString ]; if ( [ lowercaseString rangeOfString: lowercaseTerm ].location != NSNotFound ) { [ alternateObjects addObject: obj ]; continue; } lowercaseString = [[ obj valueForKeyPath: @"keytype" ] lowercaseString ]; if ( [ lowercaseString rangeOfString: lowercaseTerm ].location != NSNotFound ) { [ alternateObjects addObject: obj ]; continue; } lowercaseString = [[[ obj valueForKeyPath: @"key" ] string ] lowercaseString ]; if ( [ lowercaseString rangeOfString: lowercaseTerm ].location != NSNotFound ) { [ alternateObjects addObject: obj ]; continue; } } [ pool release ]; return( [ super arrangeObjects: alternateObjects ] ); } - ( void )addObject: ( id )object { int row = [[ self arrangedObjects ] count ]; [ object setObject: @"Untitled Filter" forKey: @"filterName" ]; [ super addObject: object ]; [ tableView editColumn: 0 row: row withEvent: nil select: YES ]; } @end --- NEW FILE: UMArrayController.h --- #import <Cocoa/Cocoa.h> @interface UMArrayController : NSArrayController { IBOutlet id tableView; NSString *_umSearchTerm; } - ( void )search: ( id )sender; @end |
From: Andrew M. <fit...@us...> - 2006-08-29 01:24:50
|
Update of /cvsroot/radmind/radmind-assistant/rte In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25427 Removed Files: RTEAuditor.m RTEAuditor.h Log Message: Superceded by RTEFilter class. --- RTEAuditor.h DELETED --- --- RTEAuditor.m DELETED --- |
From: Andrew M. <fit...@us...> - 2006-08-29 01:24:15
|
Update of /cvsroot/radmind/radmind-assistant/rte In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25008 Added Files: RTEFilter.h RTEFilter.m Log Message: New filtering class supercedes RTEAuditor. --- NEW FILE: RTEFilter.m --- /* * Copyright (c) 2005 Regents of The University of Michigan. * All Rights Reserved. */ #import "RTEFilter.h" #import "UMWildcard.h" #include <sys/stat.h> //define WORLDWRITABLE ( S_IWUSR | S_IWGRP | S_IWOTH ) @implementation RTEFilter - ( id )init { if (( self = [ super init ] ) == nil ) { NSLog( @"%@ %@ failed.", [ self class ], NSStringFromSelector( _cmd )); return( nil ); } _rteFilterResults = nil; _rteFilteredTranscript = nil; return( self ); } /* accessor methods */ - ( id )filteredTranscriptContents { return( _rteFilteredTranscript ); } - ( void )setFilteredTranscriptContents: ( id )contents { if ( _rteFilteredTranscript != nil ) { [ _rteFilteredTranscript release ]; _rteFilteredTranscript = nil; } if ( contents == nil ) { return; } _rteFilteredTranscript = [ contents retain ]; } /* return YES if line is potentially dangerous */ - ( BOOL )auditLine: ( NSMutableDictionary * )line { NSString *owner, *modeString; NSString *objectType = @"unknown"; mode_t mode; int type; if ( line == nil ) { return( NO ); } owner = [ line objectForKey: @"owner" ]; modeString = [ line objectForKey: @"perm" ]; type = [[ line objectForKey: @"type" ] characterAtIndex: 0 ]; if ( modeString == nil || [ modeString characterAtIndex: 0 ] == '-' ) { return( NO ); } errno = 0; mode = strtol( [ modeString UTF8String ], NULL, 8 ); if ( errno ) { NSLog( @"strtol %@: %s", modeString, strerror( errno )); return( NO ); } if ( [ owner isEqualToString: @"0" ] ) { if ( mode & S_ISUID ) { [ line setObject: NSLocalizedString( @"setuid root", @"setuid root" ) forKey: @"RTEAuditorAnalysis" ]; return( YES ); } if ( mode & S_ISGID ) { [ line setObject: NSLocalizedString( @"setgid root", @"setgid root" ) forKey: @"RTEAuditorAnalysis" ]; return( YES ); } } if (( mode & S_IWOTH ) && !( mode & S_ISVTX )) { switch ( type ) { default: case 'a': case 'f': objectType = NSLocalizedString( @"file", @"file" ); break; case 'd': objectType = NSLocalizedString( @"directory", @"directory" ); break; } [ line setObject: [ NSString stringWithFormat: NSLocalizedString( @"Unprotected world-writable %@", @"Unprotected world-writable %@" ), objectType ] forKey: @"RTEAuditorAnalysis" ]; return( YES ); } return( NO ); } /* * Parse the dictionary for potentially insecure lines. * Return an array of problem lines. */ - ( NSMutableArray * )auditTranscriptContents: ( id )transcript { int i; if ( transcript == nil || ! [ transcript isKindOfClass: [ NSArray class ]] ) { return( nil ); } [ self setFilteredTranscriptContents: transcript ]; _rteFilterResults = [[ NSMutableArray alloc ] init ]; for ( i = 0; i < [ transcript count ]; i++ ) { if ( [ self auditLine: [ transcript objectAtIndex: i ]] ) { [ _rteFilterResults addObject: [ transcript objectAtIndex: i ]]; } } [ self setFilteredTranscriptContents: nil ]; return( _rteFilterResults ); } - ( NSMutableArray * )filterTranscript: ( id )transcript withFilterPatterns: ( NSArray * )patterns { NSMutableIndexSet *indexes; NSMutableArray *results = nil; unsigned int i, j; if ( transcript == nil || ![ transcript isKindOfClass: [ NSArray class ]] ) { return( nil ); } [ self setFilteredTranscriptContents: transcript ]; _rteFilterResults = [[ NSMutableArray alloc ] init ]; indexes = [[[ NSMutableIndexSet alloc ] init ] autorelease ]; for ( i = 0; i < [ transcript count ]; i++ ) { for ( j = 0; j < [ patterns count ]; j++ ) { if ( [ self filterLine: [ transcript objectAtIndex: i ] withFilterPattern: [ patterns objectAtIndex: j ]] ) { continue; } [ indexes addIndex: i ]; } } if ( [ indexes count ] > 0 ) { results = [[ NSMutableArray alloc ] initWithArray: [ transcript objectsAtIndexes: indexes ]]; [ results autorelease ]; } return( results ); } - ( BOOL )filterLine: ( NSDictionary * )transcriptLine withFilterPattern: ( NSDictionary * )filterPattern { NSArray *lineKeys, *filterKeys; NSString *lineValue; id tmp; BOOL filter = YES, caseSensitive = NO; BOOL negateBoolean = NO; unsigned int i; lineKeys = [ transcriptLine allKeys ]; filterKeys = [ filterPattern allKeys ]; /* XXX could be moved to parent method */ if (( tmp = [ filterPattern objectForKey: @"caseSensitive" ] ) != nil ) { caseSensitive = [ tmp boolValue ]; } if (( tmp = [ filterPattern objectForKey: @"negateBoolean" ] ) != nil ) { negateBoolean = [ tmp boolValue ]; } for ( i = 0; i < [ filterKeys count ]; i++ ) { if (( lineValue = [ transcriptLine objectForKey: [ filterKeys objectAtIndex: i ]] ) == nil ) { continue; } filter = [ lineValue matchesWildcard: [ filterPattern objectForKey: [ filterKeys objectAtIndex: i ]] caseSensitive: caseSensitive ]; if ( negateBoolean ) { filter = !filter; } if ( filter == NO ) { break; } } return( filter ); } - ( void )dealloc { if ( _rteFilteredTranscript != nil ) { [ _rteFilteredTranscript release ]; _rteFilteredTranscript = nil; } if ( _rteFilterResults != nil ) { [ _rteFilterResults release ]; _rteFilterResults = nil; } [ super dealloc ]; } @end --- NEW FILE: RTEFilter.h --- /* * Copyright (c) 2005 Regents of The University of Michigan. * All Rights Reserved. */ #import <Foundation/Foundation.h> @interface RTEFilter : NSObject { @private NSArray *_rteFilteredTranscript; NSMutableArray *_rteFilterResults; } - ( id )filteredTranscriptContents; - ( void )setFilteredTranscriptContents: ( id )contents; - ( BOOL )auditLine: ( NSMutableDictionary * )line; - ( NSMutableArray * )auditTranscriptContents: ( id )transcript; - ( NSMutableArray * )filterTranscript: ( id )transcript withFilterPatterns: ( NSArray * )patterns; - ( BOOL )filterLine: ( NSDictionary * )transcriptLine withFilterPattern: ( NSDictionary * )filterPattern; @end |
From: Andrew M. <fit...@us...> - 2006-08-04 16:32:15
|
Update of /cvsroot/radmind/radmind/man In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13893 Modified Files: radmind.8 Log Message: Updated manpage for wildcard patch #1488099. Index: radmind.8 =================================================================== RCS file: /cvsroot/radmind/radmind/man/radmind.8,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** radmind.8 7 Feb 2006 16:32:01 -0000 1.32 --- radmind.8 4 Aug 2006 15:58:03 -0000 1.33 *************** *** 58,63 **** with a '#', it is ignored and treated as an in-line comment. .sp ! Lines that are blank or begin with '#' are ignored. '*' is a wildcard and ! will match any string. A number range can be given by "<\c .IR min -\c --- 58,64 ---- with a '#', it is ignored and treated as an in-line comment. .sp ! Lines that are blank or begin with '#' are ignored. There are several ! supported wildcard patterns similar to shell globbing. ! '*' will match any string. A number range can be given by "<\c .IR min -\c *************** *** 67,72 **** is the lower bound and .I max ! is the upper bound. '\\' ! can be used to escape any character. .sp A client is only given access to command files and transcripts --- 68,77 ---- is the lower bound and .I max ! is the upper bound. '?' matches any single character. The square bracket ! character list, "[abcd]", ! will match any single character within the brackets. Comma-separated ! values contained in curly braces, "{riverrun,past,Eve}" ! will match the first whole string found. '\\' ! can be used to escape any character. .sp A client is only given access to command files and transcripts |
From: Andrew M. <fit...@us...> - 2006-08-04 15:21:15
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv31458 Modified Files: wildcard.c Log Message: Committing [ 1488099 ] Additional wildcard patterns Index: wildcard.c =================================================================== RCS file: /cvsroot/radmind/radmind/wildcard.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** wildcard.c 19 Jul 2004 18:53:06 -0000 1.10 --- wildcard.c 4 Aug 2006 15:21:11 -0000 1.11 *************** *** 15,19 **** { int min, max; ! int i; for (;;) { --- 15,20 ---- { int min, max; ! int i, match; ! char *tmp; for (;;) { *************** *** 66,69 **** --- 67,172 ---- break; + case '?' : + wild++; + p++; + break; + + case '[' : + wild++; + match = 0; + + while ( isalnum((int)*wild )) { + if ( *wild == *p ) { + match = 1; + break; + } + wild++; + } + if ( *wild != ']' ) { + while ( *wild ) { + if ( *wild == ']' ) { + break; + } + wild++; + } + if ( *wild == '\0' ) { + return( 0 ); + } + } + p++; + wild++; + + if ( match == 0 ) { + return( 0 ); + } + break; + + case '{' : + wild++; + tmp = p; + match = 1; + + while ( *wild == ',' ) wild++; + while ( isprint((int)*wild )) { + if ( *wild == ',' ) { + if ( match ) { + break; + } + + match = 1; + wild++; + p = tmp; + } + while ( *wild == ',' ) wild++; + + if ( *wild == '}' ) { + break; + } + + if ( sensitive ) { + if ( *wild != *p ) { + match = 0; + } + } else { + if ( tolower( *wild ) != tolower( *p )) { + match = 0; + } + } + + if ( !match ) { + /* find next , or } or NUL */ + while ( *wild ) { + wild++; + if ( *wild == ',' || *wild == '}' ) { + break; + } + } + } else { + wild++, p++; + } + } + + if ( !match ) { + return( 0 ); + } + + /* verify remaining format */ + if ( *wild != '}' ) { + while ( *wild ) { + if ( *wild == '}' ) { + break; + } + wild++; + } + if ( *wild == '\0' ) { + return( 0 ); + } + } + if ( *wild++ != '}' ) { + return( 0 ); + } + + break; + case '\\' : wild++; |
From: Andrew M. <fit...@us...> - 2006-08-02 00:00:13
|
Update of /cvsroot/radmind/radmind-assistant In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1098 Modified Files: rumd.c Log Message: If we can't read prefs from global domain, try reading from user domain. Use fileno() rather than passing fd and FILE pointer to readline(). Index: rumd.c =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rumd.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** rumd.c 22 Nov 2005 20:19:46 -0000 1.8 --- rumd.c 2 Aug 2006 00:00:09 -0000 1.9 *************** *** 22,25 **** --- 22,26 ---- #define RADMIND_PREFS CFSTR( "/Library/Preferences/edu.umich.radmind" ) #define OLD_PREFS CFSTR("/Library/Preferences/edu.umich.radmindassistant") + #define USER_PREFS CFSTR( "edu.umich.radmindassistant" ) #define HOST_PREF CFSTR( "radmindhost" ) #define TLS_PREF CFSTR( "tlslevel" ) *************** *** 30,34 **** void term( int ); int inprogress( void ); ! char *readline( int, FILE * ); int hup_signal = 0; --- 31,35 ---- void term( int ); int inprogress( void ); ! char *readline( FILE * ); int hup_signal = 0; *************** *** 69,81 **** char * ! readline( int fd, FILE *of ) { static char buf[ LINE_MAX ]; fd_set readmask; ! int len; memset( buf, '\0', sizeof( buf )); setbuf( of, NULL ); /* read the first line of output, if any, from ktcheck */ --- 70,87 ---- char * ! readline( FILE *of ) { static char buf[ LINE_MAX ]; fd_set readmask; ! int fd, len; ! ! if ( of == NULL ) { ! return( NULL ); ! } memset( buf, '\0', sizeof( buf )); setbuf( of, NULL ); + fd = fileno( of ); /* read the first line of output, if any, from ktcheck */ *************** *** 124,128 **** static void ! read_prefs() { CFArrayRef keys = NULL; --- 130,134 ---- static void ! read_prefs( void ) { CFArrayRef keys = NULL; *************** *** 132,135 **** --- 138,142 ---- CFStringRef path; CFStringRef global_id = RADMIND_PREFS; + CFStringRef consoleUser = NULL; const CFStringRef user = kCFPreferencesCurrentUser; const CFStringRef host = kCFPreferencesAnyHost; *************** *** 139,142 **** --- 146,150 ---- }; int lvl; + uid_t uid; if (( keys = CFArrayCreate( kCFAllocatorDefault, *************** *** 149,158 **** if ( CFDictionaryGetCount( dict ) == 0 || dict == NULL ) { /* try old prefs instead */ ! CFRelease( dict ); global_id = OLD_PREFS; dict = CFPreferencesCopyMultiple( keys, global_id, user, host ); if ( CFDictionaryGetCount( dict ) == 0 || dict == NULL ) { ! /* use default values */ ! syslog( LOG_ERR, "CFPreferencesCopyMultiple failed" ); } } --- 157,202 ---- if ( CFDictionaryGetCount( dict ) == 0 || dict == NULL ) { /* try old prefs instead */ ! if ( dict ) { ! CFRelease( dict ); dict = NULL; ! } ! global_id = OLD_PREFS; dict = CFPreferencesCopyMultiple( keys, global_id, user, host ); if ( CFDictionaryGetCount( dict ) == 0 || dict == NULL ) { ! if ( dict ) { ! CFRelease( dict ); dict = NULL; ! } ! ! /* one last try before giving up. grab prefs from console user */ ! if (( consoleUser = SCDynamicStoreCopyConsoleUser( NULL, ! &uid, NULL )) != NULL ) { ! /* drop privileges */ ! if ( seteuid( uid ) != 0 ) { ! syslog( LOG_ERR, "seteuid %d: %m", uid ); ! } else { ! global_id = USER_PREFS; ! dict = CFPreferencesCopyMultiple( keys, ! global_id, user, host ); ! ! /* resume running as root */ ! if ( seteuid( 0 ) != 0 ) { ! syslog( LOG_ERR, "seteuid 0: %m. Exiting." ); ! exit( 2 ); ! } ! ! if ( CFDictionaryGetCount( dict ) == 0 || dict == NULL ) { ! /* no good, use defaults */ ! syslog( LOG_ERR, "CFPreferencesCopyMultiple failed" ); ! syslog( LOG_ERR, "Using default values" ); ! ! if ( dict ) { ! CFRelease( dict ); dict = NULL; ! } ! } ! } ! } ! if ( consoleUser != NULL ) { ! CFRelease( consoleUser ); ! } } } *************** *** 471,479 **** if ( SCNetworkCheckReachabilityByName( radmind_server, &flags ) == FALSE ) { ! syslog( LOG_ERR, "SCNetworkCheckReachabilityByName failed\n" ); continue; } if ( ! ( flags & kSCNetworkFlagsReachable )) { ! syslog( LOG_ERR, "Network not available\n" ); continue; } --- 515,523 ---- if ( SCNetworkCheckReachabilityByName( radmind_server, &flags ) == FALSE ) { ! syslog( LOG_ERR, "SCNetworkCheckReachabilityByName failed" ); continue; } if ( ! ( flags & kSCNetworkFlagsReachable )) { ! syslog( LOG_ERR, "Network not available" ); continue; } *************** *** 545,549 **** } } else { ! line = readline( ofd[ 0 ], of ); if ( fclose( of ) != 0 ) { syslog( LOG_ERR, "fclose: %m" ); --- 589,593 ---- } } else { ! line = readline( of ); if ( fclose( of ) != 0 ) { syslog( LOG_ERR, "fclose: %m" ); |
From: Andrew M. <fit...@us...> - 2006-08-01 22:58:03
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8993 Modified Files: RSMLoadsetManager.m Log Message: Check class of object passed to -checkInLoadset: and use appropriate methods. Fix: [ 1529700 ] Verify and Check-in still checks in a failed loadset. Exit status of lcksum checked in every case before check-in. Index: RSMLoadsetManager.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLoadsetManager.m,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** RSMLoadsetManager.m 1 Aug 2006 16:43:04 -0000 1.45 --- RSMLoadsetManager.m 1 Aug 2006 22:57:59 -0000 1.46 *************** *** 620,624 **** NSString *newpath = nil; ! loadsetPath = [ loadset objectForKey: @"RadmindServerItemPath" ]; newpath = [ NSString stringWithFormat: @"%@/%@", @"/var/radmind/transcript", [ loadsetPath lastPathComponent ]]; --- 620,632 ---- NSString *newpath = nil; ! if ( [ loadset isKindOfClass: [ NSDictionary class ]] ) { ! loadsetPath = [ loadset objectForKey: @"RadmindServerItemPath" ]; ! } else if ( [ loadset isKindOfClass: [ NSString class ]] ) { ! loadsetPath = loadset; ! } else { ! NSLog( @"Unexpected object type %@", [ loadset class ] ); ! return; ! } ! newpath = [ NSString stringWithFormat: @"%@/%@", @"/var/radmind/transcript", [ loadsetPath lastPathComponent ]]; *************** *** 1355,1364 **** case RA_TRANSCRIPT_VERIFY: ! if ( status != 0 && ( ! assistFirstPositiveCheckIn || ! assistFirstNegativeCheckIn )) { ! NSBeginAlertSheet( [ NSString stringWithFormat: @"%@: incorrect", ! [[ self transcript ] lastPathComponent ]], ! @"OK", @"", @"", transcriptWindow, self, NULL, NULL, nil, ! @"" ); ! } else if ( ! assistFirstPositiveCheckIn ) { NSBeginAlertSheet( [ NSString stringWithFormat: @"%@: verified", [[ self transcript ] lastPathComponent ]], --- 1363,1378 ---- case RA_TRANSCRIPT_VERIFY: ! if ( status != 0 ) { ! NSBeginAlertSheet( [ NSString stringWithFormat: @"%@: incorrect", ! [[ self transcript ] lastPathComponent ]], ! @"OK", @"", @"", transcriptWindow, self, NULL, NULL, nil, ! @"%@ contained some errors that need correcting. Please verify " ! @"that the loadset was uploaded correctly. If you created the loadset " ! @"without checksums, select the loadset, and click the Update button. " ! @"When the loadset has been updated, drag the loadset to the " ! @"Production Loadsets pane to check it in. From there you can drag " ! @"and drop it to the command file of your choice.", [ self transcript ] ); ! return; ! } else if ( ! assistFirstPositiveCheckIn ) { NSBeginAlertSheet( [ NSString stringWithFormat: @"%@: verified", [[ self transcript ] lastPathComponent ]], *************** *** 1366,1384 **** @"" ); } ! if ( [ _checkedInTranscripts count ] == 1 && [ _tmpTranscripts count ] == 1 && assistFirstPositiveCheckIn ) { - if ( status != 0 ) { - NSBeginAlertSheet( [ NSString stringWithFormat: @"%@: incorrect", - [[ self transcript ] lastPathComponent ]], - @"OK", @"", @"", transcriptWindow, self, NULL, NULL, nil, - @"%@ contained some errors that need correcting. Please verify " - @"that the loadset was uploaded correctly. If you created the loadset " - @"without checksums, select the loadset, and click the Update button. " - @"When the loadset has been updated, drag the loadset to the " - @"Production Loadsets pane to check it in. From there you can drag " - @"and drop it to the command file of your choice.", [ self transcript ] ); - return; - } [ self checkInLoadset: [ _tmpTranscripts objectAtIndex: 0 ]]; } else if ( [ _tmpTranscripts count ] >= 1 && completeCheckInOfLoadset ) { --- 1380,1386 ---- @"" ); } ! if ( [ _checkedInTranscripts count ] == 1 && [ _tmpTranscripts count ] == 1 && assistFirstPositiveCheckIn ) { [ self checkInLoadset: [ _tmpTranscripts objectAtIndex: 0 ]]; } else if ( [ _tmpTranscripts count ] >= 1 && completeCheckInOfLoadset ) { |
From: Patrick M. <ume...@us...> - 2006-08-01 20:13:42
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10369 Modified Files: lcksum.c Log Message: Return correct exit value when checking multiple transcripts. Index: lcksum.c =================================================================== RCS file: /cvsroot/radmind/radmind/lcksum.c,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** lcksum.c 1 Aug 2006 17:27:45 -0000 1.75 --- lcksum.c 1 Aug 2006 20:13:38 -0000 1.76 *************** *** 503,507 **** main( int argc, char **argv ) { ! int c, i, err = 0, rc = 0; extern int optind; char *tpath = NULL; --- 503,507 ---- main( int argc, char **argv ) { ! int c, i, err = 0; extern int optind; char *tpath = NULL; *************** *** 591,599 **** tpath = argv[ i ]; ! if (( rc = do_lcksum( tpath )) == 1 && !updatetran ) { ! exit( 1 ); } } ! return( rc ); } --- 591,611 ---- tpath = argv[ i ]; ! switch ( do_lcksum( tpath )) { ! case 2: ! exit( 2 ); ! break; ! ! case 1: ! err = 1; ! if ( !updatetran ) { ! exit( 1 ); ! } ! break; ! ! default: ! break; } } ! exit( err ); } |
From: Andrew M. <fit...@us...> - 2006-08-01 17:27:51
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9751 Modified Files: lcksum.c Log Message: Exit with 1 if verification fails. Index: lcksum.c =================================================================== RCS file: /cvsroot/radmind/radmind/lcksum.c,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** lcksum.c 1 Aug 2006 17:24:51 -0000 1.74 --- lcksum.c 1 Aug 2006 17:27:45 -0000 1.75 *************** *** 592,596 **** if (( rc = do_lcksum( tpath )) == 1 && !updatetran ) { ! exit( 2 ); } } --- 592,596 ---- if (( rc = do_lcksum( tpath )) == 1 && !updatetran ) { ! exit( 1 ); } } |
From: Patrick M. <ume...@us...> - 2006-08-01 17:24:55
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8527 Modified Files: lcksum.c Log Message: Using exit to be constant. Index: lcksum.c =================================================================== RCS file: /cvsroot/radmind/radmind/lcksum.c,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** lcksum.c 1 Aug 2006 17:15:50 -0000 1.73 --- lcksum.c 1 Aug 2006 17:24:51 -0000 1.74 *************** *** 195,199 **** if ( !S_ISREG( st.st_mode )) { fprintf( stderr, "%s: not a regular file\n", tpath ); ! return( 2 ); } --- 195,199 ---- if ( !S_ISREG( st.st_mode )) { fprintf( stderr, "%s: not a regular file\n", tpath ); ! exit( 2 ); } |
From: Andrew M. <fit...@us...> - 2006-08-01 17:15:53
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4959 Modified Files: lcksum.c Log Message: Fixed exit values broken by patch #1448910. Index: lcksum.c =================================================================== RCS file: /cvsroot/radmind/radmind/lcksum.c,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** lcksum.c 17 Mar 2006 19:50:16 -0000 1.72 --- lcksum.c 1 Aug 2006 17:15:50 -0000 1.73 *************** *** 503,507 **** main( int argc, char **argv ) { ! int c, i, err = 0; extern int optind; char *tpath = NULL; --- 503,507 ---- main( int argc, char **argv ) { ! int c, i, err = 0, rc = 0; extern int optind; char *tpath = NULL; *************** *** 591,599 **** tpath = argv[ i ]; ! if ( do_lcksum( tpath ) == 2 ) { exit( 2 ); } } ! return( 0 ); } --- 591,599 ---- tpath = argv[ i ]; ! if (( rc = do_lcksum( tpath )) == 1 && !updatetran ) { exit( 2 ); } } ! return( rc ); } |
From: Patrick M. <ume...@us...> - 2006-08-01 16:48:09
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27720 Modified Files: aclocal.m4 configure Log Message: Ran autoconf Index: aclocal.m4 =================================================================== RCS file: /cvsroot/radmind/radmind/aclocal.m4,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** aclocal.m4 23 May 2006 16:18:03 -0000 1.15 --- aclocal.m4 1 Aug 2006 16:48:05 -0000 1.16 *************** *** 120,124 **** [ AC_ARG_ENABLE(universal_binaries, ! AC_HELP_STRING([--enable-universal_binaries], [build universal binaries (default=no)]), ,[enable_universal_binaries=no]) if test "${enable_universal_binaries}" = "yes"; then --- 120,124 ---- [ AC_ARG_ENABLE(universal_binaries, ! AC_HELP_STRING([--enable-universal-binaries], [build universal binaries (default=no)]), ,[enable_universal_binaries=no]) if test "${enable_universal_binaries}" = "yes"; then Index: configure =================================================================== RCS file: /cvsroot/radmind/radmind/configure,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** configure 23 May 2006 16:18:03 -0000 1.47 --- configure 1 Aug 2006 16:48:05 -0000 1.48 *************** *** 857,861 **** --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ! --enable-universal_binaries build universal binaries (default=no) --disable-largefile omit support for large files --- 857,861 ---- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ! --enable-universal-binaries build universal binaries (default=no) --disable-largefile omit support for large files |
From: Andrew M. <fit...@us...> - 2006-08-01 16:43:07
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25699 Modified Files: RSMLoadsetManager.m Log Message: Fix for exception thrown because code treated dictionary like string. Index: RSMLoadsetManager.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLoadsetManager.m,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** RSMLoadsetManager.m 9 Apr 2006 20:00:28 -0000 1.44 --- RSMLoadsetManager.m 1 Aug 2006 16:43:04 -0000 1.45 *************** *** 596,600 **** @"-d", [[ self delegate ] sessionTmpDirectory ], @"--", nil ]; args = [ args arrayByAddingObjectsFromArray: objectsToDelete ]; - message = [ NSString stringWithFormat: @"Deleting..." ]; break; --- 596,599 ---- *************** *** 618,624 **** - ( void )checkInLoadset: ( id )loadset { ! NSString *loadsetPath = loadset; NSString *newpath = nil; newpath = [ NSString stringWithFormat: @"%@/%@", @"/var/radmind/transcript", [ loadsetPath lastPathComponent ]]; --- 617,624 ---- - ( void )checkInLoadset: ( id )loadset { ! NSString *loadsetPath; NSString *newpath = nil; + loadsetPath = [ loadset objectForKey: @"RadmindServerItemPath" ]; newpath = [ NSString stringWithFormat: @"%@/%@", @"/var/radmind/transcript", [ loadsetPath lastPathComponent ]]; |
From: Andrew M. <fit...@us...> - 2006-08-01 15:57:06
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7502 Modified Files: rsmauthtool.c Log Message: Fix: [ 1532501 ] Cannot delete multiple loadsets in Server Manager. Loop through args to a_rmloadset to delete all passed-in paths. Index: rsmauthtool.c =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/rsmauthtool.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** rsmauthtool.c 14 Dec 2005 03:38:34 -0000 1.15 --- rsmauthtool.c 1 Aug 2006 15:57:02 -0000 1.16 *************** *** 275,313 **** a_rmloadset( int ac, char *av[] ) { - char fpath[ MAXPATHLEN ]; - char *tpath = av[ 0 ]; struct stat st; ! if ( tpath2fpath( tpath, fpath, MAXPATHLEN ) != 0 ) { ! return( 2 ); ! } ! if ( lstat( tpath, &st ) != 0 ) { ! fprintf( stderr, "lstat %s: %s\n", tpath, strerror( errno )); ! return( 2 ); ! } ! ! if ( S_ISDIR( st.st_mode )) { ! if ( rmdirs( tpath ) != 0 ) { ! fprintf( stderr, "delete %s: %s\n", tpath, strerror( errno )); return( 2 ); } ! } else { ! if ( unlink( tpath ) < 0 ) { ! fprintf( stderr, "unlink %s: %s\n", tpath, strerror( errno )); return( 2 ); } ! } ! ! if ( lstat( fpath, &st ) == 0 ) { if ( S_ISDIR( st.st_mode )) { ! if ( rmdirs( fpath ) != 0 ) { ! fprintf( stderr, "delete %s: %s\n", fpath, strerror( errno )); return( 2 ); } } ! } else if ( errno != ENOENT ) { ! fprintf( stderr, "lstat %s: %s\n", fpath, strerror( errno )); ! return( 2 ); } --- 275,323 ---- a_rmloadset( int ac, char *av[] ) { struct stat st; + char fpath[ MAXPATHLEN ]; + char *tpath; + int i; ! for ( i = 0; i < ac; i++ ) { ! memset( fpath, '\0', MAXPATHLEN ); ! tpath = av[ i ]; ! if ( tpath2fpath( tpath, fpath, MAXPATHLEN ) != 0 ) { return( 2 ); } ! ! if ( lstat( tpath, &st ) != 0 ) { ! fprintf( stderr, "lstat %s: %s\n", tpath, strerror( errno )); return( 2 ); } ! if ( S_ISDIR( st.st_mode )) { ! if ( rmdirs( tpath ) != 0 ) { ! fprintf( stderr, "delete %s: %s\n", tpath, strerror( errno )); ! return( 2 ); ! } ! } else { ! if ( unlink( tpath ) < 0 ) { ! fprintf( stderr, "unlink %s: %s\n", tpath, strerror( errno )); return( 2 ); } } ! ! if ( lstat( fpath, &st ) == 0 ) { ! if ( S_ISDIR( st.st_mode )) { ! if ( rmdirs( fpath ) != 0 ) { ! fprintf( stderr, "delete %s: %s\n", ! fpath, strerror( errno )); ! return( 2 ); ! } ! } else if ( unlink( fpath ) < 0 ) { ! fprintf( stderr, "unlink %s: %s\n", ! fpath, strerror( errno )); ! } ! } else if ( errno != ENOENT ) { ! fprintf( stderr, "lstat %s: %s\n", fpath, strerror( errno )); ! return( 2 ); ! } } |
From: Andrew M. <fit...@us...> - 2006-07-19 20:17:57
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29121 Modified Files: ra.sh Log Message: Added -I for case-insensitive sessions. Fixed lapply -w usage in auto. Index: ra.sh =================================================================== RCS file: /cvsroot/radmind/radmind/ra.sh,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** ra.sh 31 May 2006 21:08:08 -0000 1.30 --- ra.sh 19 Jul 2006 20:17:51 -0000 1.31 *************** *** 163,167 **** esac ! fsdiff -A ${FPROGRESS} ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then cleanup --- 163,167 ---- esac ! fsdiff -A ${CASE} ${FPROGRESS} ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then cleanup *************** *** 223,227 **** fi ! lapply ${PROGRESS} -w ${TLSLEVEL} -h ${SERVER} ${CHECKSUM} ${FTMP} case "$?" in 0) ;; --- 223,227 ---- fi ! lapply ${CASE} ${PROGRESS} -w ${TLSLEVEL} -h ${SERVER} ${CHECKSUM} ${FTMP} case "$?" in 0) ;; *************** *** 261,265 **** fi ! while getopts %ch:lqr:tU:Vw: opt; do case $opt in %) PROGRESS="-%" --- 261,265 ---- fi ! while getopts %ch:Ilqr:tU:Vw: opt; do case $opt in %) PROGRESS="-%" *************** *** 276,279 **** --- 276,282 ---- ;; + I) CASE="-I" + ;; + l) USERAUTH="-l" ;; *************** *** 392,396 **** fi FTMP="${TMPDIR}/${TNAME}" ! fsdiff -C ${FPROGRESS} ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then cleanup --- 395,399 ---- fi FTMP="${TMPDIR}/${TNAME}" ! fsdiff -C ${CASE} ${FPROGRESS} ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then cleanup *************** *** 445,449 **** esac ! fsdiff -C ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then cleanup --- 448,452 ---- esac ! fsdiff -C ${CASE} ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then cleanup *************** *** 464,468 **** exit 1 fi ! fsdiff -C ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then echo Auto failure: `hostname` fsdiff --- 467,471 ---- exit 1 fi ! fsdiff -C ${CASE} ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then echo Auto failure: `hostname` fsdiff *************** *** 481,485 **** if [ $? -eq 1 ]; then while true; do ! fsdiff -A ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then echo Auto failure: `hostname`: fsdiff --- 484,488 ---- if [ $? -eq 1 ]; then while true; do ! fsdiff -A ${CASE} ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then echo Auto failure: `hostname`: fsdiff *************** *** 488,493 **** fi if [ -s ${FTMP} ]; then ! lapply -w ${PROGRESS} ${TLSLEVEL} -h ${SERVER} -q ${CHECKSUM} \ ! ${FTMP} 2>&1 > ${LTMP} case $? in 0) --- 491,496 ---- fi if [ -s ${FTMP} ]; then ! lapply -w ${TLSLEVEL} ${CASE} ${PROGRESS} -h ${SERVER} \ ! -q ${CHECKSUM} ${FTMP} 2>&1 > ${LTMP} case $? in 0) *************** *** 537,541 **** esac ! fsdiff -A ${FPROGRESS} ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then cleanup --- 540,544 ---- esac ! fsdiff -A ${CASE} ${FPROGRESS} ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then cleanup *************** *** 550,554 **** dopreapply ${FTMP} ! lapply ${PROGRESS} -w ${TLSLEVEL} -h ${SERVER} ${CHECKSUM} ${FTMP} case "$?" in 0) ;; --- 553,557 ---- dopreapply ${FTMP} ! lapply ${CASE} ${PROGRESS} -w ${TLSLEVEL} -h ${SERVER} ${CHECKSUM} ${FTMP} case "$?" in 0) ;; |
From: Andrew M. <fit...@us...> - 2006-07-19 19:27:03
|
Update of /cvsroot/radmind/radmind/man In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9446 Modified Files: lmerge.1 Log Message: Added -I option to summary; fixed typo. Index: lmerge.1 =================================================================== RCS file: /cvsroot/radmind/radmind/man/lmerge.1,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** lmerge.1 14 Jun 2005 14:13:54 -0000 1.7 --- lmerge.1 19 Jul 2006 19:26:59 -0000 1.8 *************** *** 5,9 **** .SH SYNOPSIS .B lmerge ! .RB [ \-ivV ] [ .BI \-D\ path --- 5,9 ---- .SH SYNOPSIS .B lmerge ! .RB [ \-IiVv ] [ .BI \-D\ path *************** *** 16,20 **** .B lmerge .B \-f ! .RB [ \-ivV ] [ .BI \-D\ path --- 16,20 ---- .B lmerge .B \-f ! .RB [ \-IiVv ] [ .BI \-D\ path *************** *** 26,30 **** .B lmerge .B \-n ! .RB [ \-ivV ] [ .BI \-D\ path --- 26,30 ---- .B lmerge .B \-n ! .RB [ \-IiVv ] [ .BI \-D\ path *************** *** 93,97 **** .TP 19 .BI \-I ! be case insensitive when compairing paths. .TP 19 .B \-n --- 93,97 ---- .TP 19 .BI \-I ! path comparisons are case-insensitive. .TP 19 .B \-n |
From: Andrew M. <fit...@us...> - 2006-07-14 14:54:08
|
Update of /cvsroot/radmind/radmind-assistant/English.lproj/Preferences.nib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5847 Modified Files: info.nib keyedobjects.nib objects.nib Log Message: Rebound userauth. Index: info.nib =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/English.lproj/Preferences.nib/info.nib,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** info.nib 14 Jul 2006 14:31:48 -0000 1.15 --- info.nib 14 Jul 2006 14:54:01 -0000 1.16 *************** *** 4,8 **** <dict> <key>IBDocumentLocation</key> ! <string>747 19 362 373 0 0 1440 878 </string> <key>IBEditorPositions</key> <dict> --- 4,8 ---- <dict> <key>IBDocumentLocation</key> ! <string>587 199 362 373 0 0 1440 878 </string> <key>IBEditorPositions</key> <dict> *************** *** 24,29 **** <key>IBOpenObjects</key> <array> ! <integer>40</integer> ! <integer>12</integer> </array> <key>IBSystem Version</key> --- 24,28 ---- <key>IBOpenObjects</key> <array> ! <integer>83</integer> </array> <key>IBSystem Version</key> Index: objects.nib =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/English.lproj/Preferences.nib/objects.nib,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 Binary files /tmp/cvsgArNFF and /tmp/cvs89ECJw differ Index: keyedobjects.nib =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/English.lproj/Preferences.nib/keyedobjects.nib,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 Binary files /tmp/cvssVb5SM and /tmp/cvsNx088D differ |
From: Andrew M. <fit...@us...> - 2006-07-14 14:31:52
|
Update of /cvsroot/radmind/radmind-assistant/English.lproj/Preferences.nib In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30559 Modified Files: classes.nib info.nib keyedobjects.nib objects.nib Log Message: NSUserDefaultsController bindings for most preferences. Index: info.nib =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/English.lproj/Preferences.nib/info.nib,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** info.nib 24 Apr 2006 15:21:07 -0000 1.14 --- info.nib 14 Jul 2006 14:31:48 -0000 1.15 *************** *** 4,31 **** <dict> <key>IBDocumentLocation</key> ! <string>61 290 362 373 0 0 1440 878 </string> <key>IBEditorPositions</key> <dict> <key>105</key> ! <string>471 459 498 318 0 0 1440 878 </string> <key>12</key> ! <string>264 666 498 166 0 0 1440 878 </string> <key>151</key> ! <string>471 460 498 289 0 0 1440 878 </string> <key>22</key> <string>471 398 498 377 0 0 1440 878 </string> <key>40</key> ! <string>471 503 498 202 0 0 1440 878 </string> <key>45</key> ! <string>471 444 498 204 0 0 1440 878 </string> </dict> <key>IBFramework Version</key> ! <string>443.0</string> <key>IBOpenObjects</key> <array> ! <integer>83</integer> </array> <key>IBSystem Version</key> ! <string>8I1119</string> </dict> </plist> --- 4,32 ---- <dict> <key>IBDocumentLocation</key> ! <string>747 19 362 373 0 0 1440 878 </string> <key>IBEditorPositions</key> <dict> <key>105</key> ! <string>471 427 498 318 0 0 1440 878 </string> <key>12</key> ! <string>471 503 498 166 0 0 1440 878 </string> <key>151</key> ! <string>469 442 498 289 0 0 1440 878 </string> <key>22</key> <string>471 398 498 377 0 0 1440 878 </string> <key>40</key> ! <string>471 485 498 202 0 0 1440 878 </string> <key>45</key> ! <string>471 484 498 204 0 0 1440 878 </string> </dict> <key>IBFramework Version</key> ! <string>446.1</string> <key>IBOpenObjects</key> <array> ! <integer>40</integer> ! <integer>12</integer> </array> <key>IBSystem Version</key> ! <string>8J2135a</string> </dict> </plist> Index: objects.nib =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/English.lproj/Preferences.nib/objects.nib,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 Binary files /tmp/cvspBR5dD and /tmp/cvsbOkcF3 differ Index: classes.nib =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/English.lproj/Preferences.nib/classes.nib,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** classes.nib 24 Apr 2006 15:21:07 -0000 1.10 --- classes.nib 14 Jul 2006 14:31:48 -0000 1.11 *************** *** 16,38 **** setAuthorizationTimeout = id; setAutomationConfiguration = id; - setCaseSensitivity = id; - setCompressionLevel = id; setDefaultServer = id; - setFsdiffPath = id; setGlobalPreferences = id; setPort = id; setTLSLevel = id; setTranscriptEditor = id; - setUseChecksums = id; - setUsername = id; - toggleAlwaysPostApplySwitch = id; - toggleAlwaysPreApplySwitch = id; - toggleEnableScheduleSwitch = id; - toggleForceLockRemoval = id; - toggleIgnoreUploadErrors = id; - toggleRadmindUpdateMonitor = id; toggleSessionRights = id; - toggleUserAuth = id; - toggleUserManagement = id; visitiHookHomepage = id; }; --- 16,25 ---- *************** *** 41,54 **** OUTLETS = { advancedPrefsView = NSView; - autoContinueIfInterruptedSwitch = NSButton; - autoEnableLoginHookSwitch = NSButton; - autoEnableLogoutHookSwitch = NSButton; - autoEnableScheduleSwitch = NSButton; - autoSchedulePopUpButton = NSPopUpButton; automationPrefsView = NSView; contentBox = NSBox; generalPrefsView = NSView; - prefAlwaysPostApply = NSButton; - prefAlwaysPreApply = NSButton; prefCaseSensitivityPopUp = NSPopUpButton; prefDefineRightsSwitch = NSButton; --- 28,34 ---- *************** *** 56,65 **** prefEditRadmindListSheet = NSPanel; prefEnableRadmindUpdateMonitor = NSButton; - prefEnableUserAuth = NSButton; - prefFsdiffPath = NSPopUpButton; - prefGlobalCksum = NSMatrix; prefGlobalPreferencesDateField = NSTextField; - prefIgnoreLcreateErrors = NSButton; - prefLapplyForce = NSButton; prefMaxDiskUsageField = NSTextField; prefMaxHomeLifeField = NSTextField; --- 36,40 ---- *************** *** 72,82 **** prefServerCompressionSummary = NSTextField; prefServerPortSummary = NSTextField; - prefTLSLevel = NSPopUpButton; - prefTemplateUserNameField = NSTextField; prefTimeoutField = NSTextField; prefTimeoutStepper = NSStepper; prefTransEditor = NSPopUpButton; - prefUserAuthName = NSTextField; - prefUserManagementSwitch = NSButton; securityPrefsView = NSView; transcriptPrefsView = NSView; --- 47,53 ---- Index: keyedobjects.nib =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/English.lproj/Preferences.nib/keyedobjects.nib,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 Binary files /tmp/cvsXbrjnZ and /tmp/cvsYFXxIq differ |
From: Andrew M. <fit...@us...> - 2006-07-14 14:30:55
|
Update of /cvsroot/radmind/radmind-assistant In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30150 Modified Files: RCMPreferences.h RCMPreferences.m Log Message: Using NSUserDefaultsController bindings for most preferences. Index: RCMPreferences.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/RCMPreferences.m,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** RCMPreferences.m 1 May 2006 18:39:38 -0000 1.44 --- RCMPreferences.m 14 Jul 2006 14:30:45 -0000 1.45 *************** *** 39,44 **** --- 39,46 ---- [ prefRadmindHost removeAllItems ]; + #ifdef notdef [ prefRadmindServerTable setDataSource: self ]; [ prefRadmindServerTable setDelegate: self ]; + #endif notdef [ self toolbarSetup ]; [ self showGeneralPreferences: nil ]; *************** *** 234,241 **** - ( void )prefsReload { ! NSUserDefaults *defaults = ! [ NSUserDefaults standardUserDefaults ]; ! NSString *fsdiffpath = [ defaults objectForKey: ! @"runfrompath" ]; NSString *radmind = [ defaults objectForKey: @"radmindhost" ]; --- 236,240 ---- - ( void )prefsReload { ! NSUserDefaults *defaults = [ NSUserDefaults standardUserDefaults ]; NSString *radmind = [ defaults objectForKey: @"radmindhost" ]; *************** *** 243,266 **** NSString *editor = [ defaults objectForKey: @"transeditor" ]; - BOOL userauth = [ defaults boolForKey: - @"userauth" ]; - BOOL dontremovelocks = [ defaults boolForKey: @"DontRemoveFileLocks" ]; - BOOL errors = [ defaults boolForKey: @"DieOnErrorsDuringUpload" ]; - BOOL preapply = [ defaults boolForKey: @"RAAlwaysPreProcess" ]; - BOOL postapply = [ defaults boolForKey: @"RAAlwaysPostProcess" ]; - BOOL caseInsensitive = [ defaults boolForKey: @"RACaseInsensitive" ]; BOOL rum = [ defaults boolForKey: @"RadmindUpdateMonitorEnabled" ]; - NSString *username = [ defaults stringForKey: - @"username" ]; NSArray *alteditors = [ defaults objectForKey: @"alteditors" ]; - NSNumber *tlsLevel = [ defaults objectForKey: - @"tlslevel" ]; NSDictionary *serverInfo = nil; int i = 0; - if ( tlsLevel != nil ) { - [ prefTLSLevel selectItemAtIndex: [ tlsLevel intValue ]]; - } - [ prefRadmindHost removeAllItems ]; [ prefRadmindHost setEnabled: NO ]; --- 242,250 ---- *************** *** 332,347 **** [ prefEnableRadmindUpdateMonitor setState: NSOffState ]; } ! ! if ( userauth ) { ! [ prefEnableUserAuth setState: NSOnState ]; ! [ prefUserAuthName setEnabled: YES ]; ! } ! if ( username != nil ) { ! [ prefUserAuthName setStringValue: username ]; ! } ! ! if ( fsdiffpath != nil ) { ! [ prefFsdiffPath selectItemWithTitle: fsdiffpath ]; ! } if ( alteditors != nil ) { for ( i = 0; i < [ alteditors count ]; i++ ) { --- 316,320 ---- [ prefEnableRadmindUpdateMonitor setState: NSOffState ]; } ! if ( alteditors != nil ) { for ( i = 0; i < [ alteditors count ]; i++ ) { *************** *** 354,382 **** [ prefTransEditor selectItemWithTitle: editor ]; } - if ( caseInsensitive == NO ) { - [ prefCaseSensitivityPopUp selectItemAtIndex: 1 ]; - } - - if ( [ defaults boolForKey: @"cksum" ] ) { - [ prefGlobalCksum selectCellAtRow: 1 column: 0 ]; - } else { - [ prefGlobalCksum selectCellAtRow: 0 column: 0 ]; - } - - if ( dontremovelocks == NO ) { - [ prefLapplyForce setState: NSOnState ]; - } - if ( errors == NO ) { - [ prefIgnoreLcreateErrors setState: NSOnState ]; - } - - if ( preapply == YES ) { - [ prefAlwaysPreApply setState: NSOnState ]; - } - if ( postapply == YES ) { - [ prefAlwaysPostApply setState: NSOnState ]; - } - - [ defaults synchronize ]; } --- 327,330 ---- *************** *** 455,491 **** - ( void )showUserManagementSettings: ( id )sender { - NSString *templateUserName = nil; - int maxlife, maxusage; - if ( [[ prefPanel contentView ] isEqualTo: userManagementView ] ) { return; } - - [ prefUserManagementSwitch setState: - [[ NSUserDefaults standardUserDefaults ] - boolForKey: @"RAUserManagementEnabled" ]]; - - if (( templateUserName = [[ NSUserDefaults standardUserDefaults ] - objectForKey: @"UMTemplateUserName" ] ) != nil ) { - [ prefTemplateUserNameField setStringValue: templateUserName ]; - } - - if (( maxlife = [[[[[ NSUserDefaults standardUserDefaults ] - objectForKey: @"UMMaxHomeLife" ] - componentsSeparatedByString: @" " ] - objectAtIndex: 0 ] intValue ] ) == 0 ) { - maxlife = 24; - } - - if (( maxusage = [[ NSUserDefaults standardUserDefaults ] - integerForKey: @"UMMaxDiskUsage" ] ) == 0 ) { - maxusage = 75; - } - - [ prefMaxHomeLifeField setStringValue: - [ NSString stringWithFormat: @"%d", maxlife ]]; - [ prefMaxDiskUsageField setStringValue: - [ NSString stringWithFormat: @"%d", maxusage ]]; - [ contentBox setContentView: nil ]; [ prefPanel resizeForContentView: userManagementView ]; --- 403,409 ---- *************** *** 544,567 **** - ( void )showAutomationPreferences: ( id )sender { ! NSUserDefaults *defaults = [ NSUserDefaults standardUserDefaults ]; ! ! [ autoEnableScheduleSwitch setState: ! [ defaults boolForKey: @"RAEnablePeriodic" ]]; ! if ( [ autoEnableScheduleSwitch state ] == NSOnState ) { ! [ autoSchedulePopUpButton setEnabled: YES ]; ! } else { ! [ autoSchedulePopUpButton setEnabled: NO ]; ! } ! ! [ autoSchedulePopUpButton selectItemAtIndex: ! [ defaults integerForKey: @"RAPeriodicType" ]]; ! ! [ autoEnableLoginHookSwitch setState: ! [ defaults boolForKey: @"RAEnableLoginHook" ]]; ! [ autoEnableLogoutHookSwitch setState: ! [ defaults boolForKey: @"RAEnableLogoutHook" ]]; ! [ autoContinueIfInterruptedSwitch setState: ! [ defaults boolForKey: @"RAContinueOnReboot" ]]; ! if ( [[ prefPanel contentView ] isEqualTo: automationPrefsView ] ) { return; --- 462,466 ---- - ( void )showAutomationPreferences: ( id )sender { ! if ( [[ prefPanel contentView ] isEqualTo: automationPrefsView ] ) { return; *************** *** 582,586 **** @"Radmind Assistant: Automation Preferences" ) ]; ! if ( ! [ defaults boolForKey: @"RAHideAutomationWarning" ] ) { NSBeginAlertSheet( NSLocalizedString( @"Warning: Setting up Radmind automation " @"involves installing several components " --- 481,486 ---- @"Radmind Assistant: Automation Preferences" ) ]; ! if ( ! [[ NSUserDefaults standardUserDefaults ] ! boolForKey: @"RAHideAutomationWarning" ] ) { NSBeginAlertSheet( NSLocalizedString( @"Warning: Setting up Radmind automation " @"involves installing several components " *************** *** 628,692 **** } - - ( IBAction )toggleUserAuth: ( id )sender - { - if ( ! [ prefUserAuthName isEnabled ] ) { - [ prefUserAuthName setEnabled: YES ]; - [[ NSUserDefaults standardUserDefaults ] setBool: YES forKey: @"userauth" ]; - } else { - [ prefUserAuthName setEnabled: NO ]; - [[ NSUserDefaults standardUserDefaults ] setBool: NO forKey: @"userauth" ]; - } - } - - - ( IBAction )toggleForceLockRemoval: ( id )sender - { - BOOL force = NO; - - if ( [ prefLapplyForce state ] == NSOnState ) { - force = NO; - } else { - force = YES; - } - - [[ NSUserDefaults standardUserDefaults ] setBool: force forKey: @"DontRemoveFileLocks" ]; - } - - - ( IBAction )toggleIgnoreUploadErrors: ( id )sender - { - BOOL errors = NO; - - if ( [ prefIgnoreLcreateErrors state ] == NSOnState ) { - errors = NO; - } else { - errors = YES; - } - - [[ NSUserDefaults standardUserDefaults ] setBool: errors forKey: @"DieOnErrorsDuringUpload" ]; - } - - - ( IBAction )toggleAlwaysPreApplySwitch: ( id )sender - { - BOOL always = YES; - - if ( [ prefAlwaysPreApply state ] == NSOnState ) { - always = NO; - } - - [[ NSUserDefaults standardUserDefaults ] setBool: always - forKey: @"RAAlwaysPreProcess" ]; - } - - - ( IBAction )toggleAlwaysPostApplySwitch: ( id )sender - { - BOOL always = YES; - - if ( [ prefAlwaysPostApply state ] == NSOnState ) { - always = NO; - } - - [[ NSUserDefaults standardUserDefaults ] setBool: always - forKey: @"RAAlwaysPostProcess" ]; - } - - ( IBAction )manageScripts: ( id )sender { --- 528,531 ---- *************** *** 700,716 **** } - - ( IBAction )setUsername: ( id )sender - { - [[ NSUserDefaults standardUserDefaults ] setObject: [ prefUserAuthName stringValue ] - forKey: @"username" ]; - } - - - ( IBAction )setTLSLevel: ( id )sender - { - [[ NSUserDefaults standardUserDefaults ] - setObject: [ NSNumber numberWithInt: [ prefTLSLevel indexOfSelectedItem ]] - forKey: @"tlslevel" ]; - } - - ( IBAction )manageCertificates: ( id )sender { --- 539,542 ---- *************** *** 724,735 **** } - - ( IBAction )setUseChecksums: ( id )sender - { - BOOL useCksums = ( BOOL )[ sender selectedRow ]; - - [[ NSUserDefaults standardUserDefaults ] setBool: useCksums - forKey: @"cksum" ]; - } - - ( IBAction )editRadmindServerList: ( id )sender { --- 550,553 ---- *************** *** 973,1000 **** } - - ( IBAction )setCaseSensitivity: ( id )sender - { - BOOL caseInsensitive; - int index; - - index = [ sender indexOfSelectedItem ]; - caseInsensitive = ( BOOL )( ! index ); - - [[ NSUserDefaults standardUserDefaults ] - setBool: caseInsensitive forKey: @"RACaseInsensitive" ]; - } - - /* automation configuration actions */ - - ( IBAction )toggleEnableScheduleSwitch: ( id )sender - { - BOOL enabled = NO; - - if ( [ sender state ] == NSOnState ) { - enabled = YES; - } - - [ autoSchedulePopUpButton setEnabled: enabled ]; - } - - ( IBAction )visitiHookHomepage: ( id )sender { --- 791,794 ---- *************** *** 1007,1014 **** - ( IBAction )setAutomationConfiguration: ( id )sender { ! BOOL enableSchedule = [ autoEnableScheduleSwitch state ]; ! BOOL enableLoginHook = [ autoEnableLoginHookSwitch state ]; ! BOOL enableLogoutHook = [ autoEnableLogoutHookSwitch state ]; ! BOOL continueOnReboot = [ autoContinueIfInterruptedSwitch state ]; int periodicType = 0; int rc; --- 801,809 ---- - ( IBAction )setAutomationConfiguration: ( id )sender { ! NSUserDefaults *defaults = [ NSUserDefaults standardUserDefaults ]; ! BOOL enableSchedule = [ defaults boolForKey: @"RAEnablePeriodic" ]; ! BOOL enableLoginHook = [ defaults boolForKey: @"RAEnableLoginHook" ]; ! BOOL enableLogoutHook = [ defaults boolForKey: @"RAEnableLogoutHook" ]; ! BOOL continueOnReboot = [ defaults boolForKey: @"RAContinueOnReboot" ]; int periodicType = 0; int rc; *************** *** 1033,1039 **** [[ NSUserDefaults standardUserDefaults ] setBool: YES forKey: @"RAEnableLoginHook" ]; - } else { - [[ NSUserDefaults standardUserDefaults ] setBool: NO - forKey: @"RAEnableLoginHook" ]; } --- 828,831 ---- *************** *** 1083,1095 **** /* install or remove scripts in periodic dir */ if ( enableSchedule ) { ! periodicType = ( [ autoSchedulePopUpButton indexOfSelectedItem ] + 1 ); ! [[ NSUserDefaults standardUserDefaults ] setBool: YES ! forKey: @"RAEnablePeriodic" ]; ! [[ NSUserDefaults standardUserDefaults ] ! setInteger: [ autoSchedulePopUpButton indexOfSelectedItem ] ! forKey: @"RAPeriodicType" ]; } else { - [[ NSUserDefaults standardUserDefaults ] setBool: NO - forKey: @"RAEnablePeriodic" ]; [[ NSUserDefaults standardUserDefaults ] setInteger: 0 --- 875,881 ---- /* install or remove scripts in periodic dir */ if ( enableSchedule ) { ! periodicType = [[ NSUserDefaults standardUserDefaults ] ! integerForKey: @"RAPeriodicType" ] + 1; } else { [[ NSUserDefaults standardUserDefaults ] setInteger: 0 *************** *** 1141,1157 **** } - - ( IBAction )toggleUserManagement: ( id )sender - { - BOOL userManagement = ( BOOL )[ sender state ]; - - [[ NSUserDefaults standardUserDefaults ] setBool: userManagement - forKey: @"RAUserManagementEnabled" ]; - [[ NSUserDefaults standardUserDefaults ] synchronize ]; - } - - ( IBAction )saveUserManagementSettings: ( id )sender { ! NSString *templateUserName = nil; ! unsigned int maxlife, maxusage; int rc; NSArray *array = nil; --- 927,933 ---- } - ( IBAction )saveUserManagementSettings: ( id )sender { ! NSUserDefaults *defaults = [ NSUserDefaults standardUserDefaults ]; int rc; NSArray *array = nil; *************** *** 1159,1203 **** RAAuthExec *rae = nil; ! if ( ! [[ prefTemplateUserNameField stringValue ] length ] ) { ! [ prefTemplateUserNameField setStringValue: @"template" ]; } ! if ( ! [[ prefMaxHomeLifeField stringValue ] length ] || ! [ prefMaxHomeLifeField intValue ] == 0 ) { ! [ prefMaxHomeLifeField setStringValue: @"24" ]; } ! if ( ! [[ prefMaxDiskUsageField stringValue ] length ] || ! [ prefMaxDiskUsageField intValue ] < 25 ) { ! [ prefMaxHomeLifeField setStringValue: @"75" ]; } ! templateUserName = [ prefTemplateUserNameField stringValue ]; ! maxlife = [ prefMaxHomeLifeField intValue ]; ! maxusage = [ prefMaxDiskUsageField intValue ]; ! ! if ( [[ NSUserDefaults standardUserDefaults ] ! boolForKey: @"RAUserManagementEnabled" ] ) { ! [[ NSUserDefaults standardUserDefaults ] setObject: templateUserName ! forKey: @"UMTemplateUserName" ]; ! [[ NSUserDefaults standardUserDefaults ] setObject: [ NSString stringWithFormat: ! @"/var/%@", templateUserName ] ! forKey: @"UMTemplateHome" ]; ! [[ NSUserDefaults standardUserDefaults ] setObject: [ NSString stringWithFormat: ! @"%d hours ago", maxlife ] ! forKey: @"UMMaxHomeLife" ]; ! [[ NSUserDefaults standardUserDefaults ] setInteger: maxusage ! forKey: @"UMMaxDiskUsage" ]; ! /* make sure scripts ignore current user */ ! [[ NSUserDefaults standardUserDefaults ] setObject: NSUserName() ! forKey: @"UMIgnoredUser" ]; ! [[ NSUserDefaults standardUserDefaults ] synchronize ]; /* create user and install scripts */ ! [ autoEnableLoginHookSwitch setState: NSOnState ]; ! [ autoEnableLogoutHookSwitch setState: NSOnState]; ! [ autoEnableScheduleSwitch setState: NSOnState ]; [ self setAutomationConfiguration: nil ]; --- 935,967 ---- RAAuthExec *rae = nil; ! if ( ![ defaults stringForKey: @"UMTemplateUserName" ] ) { ! [ defaults setObject: @"templateuser" forKey: @"UMTemplateUserName" ]; } ! if ( ![ defaults stringForKey: @"UMMaxHomeLife" ] ) { ! [ defaults setObject: @"24 hours ago" forKey: @"UMMaxHomeLife" ]; } ! if ( ![ defaults integerForKey: @"UMMaxDiskUsage" ] || ! [ defaults integerForKey: @"UMMaxDiskUsage" ] < 25 ) { ! [ defaults setInteger: 75 forKey: @"UMMaxDiskUsage" ]; } ! if ( [ defaults boolForKey: @"RAUserManagementEnabled" ] ) { ! [ defaults setObject: ! [ NSString stringWithFormat: @"/var/%@", ! [ defaults stringForKey: @"UMTemplateUserName" ]] ! forKey: @"UMTemplateHome" ]; ! /* make sure scripts ignore current user */ ! [ defaults setObject: NSUserName() forKey: @"UMIgnoredUser" ]; ! [ defaults synchronize ]; /* create user and install scripts */ ! [ defaults setBool: YES forKey: @"RAEnablePeriodic" ]; ! [ defaults setBool: YES forKey: @"RAEnableLoginHook" ]; ! [ defaults setBool: YES forKey: @"RAEnableLogoutHook" ]; ! [ defaults setBool: YES forKey: @"RAContinueOnReboot" ]; [ self setAutomationConfiguration: nil ]; *************** *** 1205,1209 **** scriptpath = [[ NSBundle mainBundle ] pathForResource: @"useradd" ofType: @"sh" ]; array = [ NSArray arrayWithObjects: @"-A", ! @"ExecuteCommand", @"--", scriptpath, templateUserName, nil ]; rc = [ rae executeTool: -1 --- 969,974 ---- scriptpath = [[ NSBundle mainBundle ] pathForResource: @"useradd" ofType: @"sh" ]; array = [ NSArray arrayWithObjects: @"-A", ! @"ExecuteCommand", @"--", scriptpath, ! [ defaults stringForKey: @"UMTemplateUserName" ], nil ]; rc = [ rae executeTool: -1 *************** *** 1268,1272 **** @"e.g., after a certain period of time has passed, " @"the copy will be removed." ), ! NSLocalizedString( @"OK", @"OK" ), @"", @"", templateUserName ); } else { [[ NSUserDefaults standardUserDefaults ] removeObjectForKey: @"UMTemplateUserName" ]; --- 1033,1037 ---- @"e.g., after a certain period of time has passed, " @"the copy will be removed." ), ! NSLocalizedString( @"OK", @"OK" ), @"", @"", [ defaults stringForKey: @"UMTemplateUserName" ] ); } else { [[ NSUserDefaults standardUserDefaults ] removeObjectForKey: @"UMTemplateUserName" ]; *************** *** 1279,1283 **** scriptpath = [[ NSBundle mainBundle ] pathForResource: @"userdelete" ofType: @"sh" ]; ! array = [ NSArray arrayWithObjects: @"-x", scriptpath, templateUserName, nil ]; rc = [ rae executeTool: -1 --- 1044,1050 ---- scriptpath = [[ NSBundle mainBundle ] pathForResource: @"userdelete" ofType: @"sh" ]; ! array = [ NSArray arrayWithObjects: @"-x", scriptpath, ! [[ NSUserDefaults standardUserDefaults ] ! stringForKey: @"UMTemplateUserName" ], nil ]; rc = [ rae executeTool: -1 Index: RCMPreferences.h =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/RCMPreferences.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** RCMPreferences.h 24 Apr 2006 15:20:16 -0000 1.25 --- RCMPreferences.h 14 Jul 2006 14:30:44 -0000 1.26 *************** *** 36,58 **** /* general prefs view */ IBOutlet NSView *generalPrefsView; - IBOutlet NSMatrix *prefGlobalCksum; IBOutlet NSPopUpButton *prefRadmindHost; IBOutlet NSTextField *prefServerCompressionSummary; IBOutlet NSTextField *prefServerPortSummary; IBOutlet NSButton *prefEnableRadmindUpdateMonitor; - IBOutlet NSButton *prefLapplyForce; - IBOutlet NSButton *prefIgnoreLcreateErrors; - IBOutlet NSButton *prefAlwaysPreApply; - IBOutlet NSButton *prefAlwaysPostApply; /* security prefs view */ IBOutlet NSView *securityPrefsView; - IBOutlet NSPopUpButton *prefTLSLevel; - IBOutlet NSButton *prefEnableUserAuth; - IBOutlet NSTextField *prefUserAuthName; /* transcript prefs view */ IBOutlet NSView *transcriptPrefsView; - IBOutlet NSPopUpButton *prefFsdiffPath; IBOutlet NSPopUpButton *prefTransEditor; IBOutlet NSPopUpButton *prefCaseSensitivityPopUp; --- 36,49 ---- *************** *** 60,75 **** /* automation prefs view */ IBOutlet NSView *automationPrefsView; - IBOutlet NSButton *autoEnableScheduleSwitch; - IBOutlet NSPopUpButton *autoSchedulePopUpButton; - IBOutlet NSButton *autoEnableLoginHookSwitch; - IBOutlet NSButton *autoEnableLogoutHookSwitch; - IBOutlet NSButton *autoContinueIfInterruptedSwitch; /* user management view */ IBOutlet NSView *userManagementView; - IBOutlet NSButton *prefUserManagementSwitch; - IBOutlet NSTextField *prefTemplateUserNameField; - IBOutlet NSTextField *prefMaxHomeLifeField; - IBOutlet NSTextField *prefMaxDiskUsageField; /* advanced prefs view */ --- 51,57 ---- *************** *** 80,85 **** IBOutlet NSStepper *prefTimeoutStepper; - @private NSMutableArray *radmindServerList; RACertificateManager *certificateManager; RAScriptManager *scriptManager; --- 62,68 ---- IBOutlet NSStepper *prefTimeoutStepper; NSMutableArray *radmindServerList; + + @private RACertificateManager *certificateManager; RAScriptManager *scriptManager; *************** *** 94,102 **** - ( IBAction )setDefaultServer: ( id )sender; - ( IBAction )setPort: ( id )sender; - - ( IBAction )setUseChecksums: ( id )sender; - - ( IBAction )toggleForceLockRemoval: ( id )sender; - - ( IBAction )toggleIgnoreUploadErrors: ( id )sender; - - ( IBAction )toggleAlwaysPreApplySwitch: ( id )sender; - - ( IBAction )toggleAlwaysPostApplySwitch: ( id )sender; - ( IBAction )manageScripts: ( id )sender; --- 77,80 ---- *************** *** 107,127 **** /* security prefs actions */ - - ( IBAction )toggleUserAuth: ( id )sender; - - ( IBAction )setUsername: ( id )sender; - - ( IBAction )setTLSLevel: ( id )sender; - ( IBAction )manageCertificates: ( id )sender; /* transcript prefs actions */ - ( IBAction )setTranscriptEditor: ( id )sender; - - ( IBAction )setFsdiffPath: ( id )sender; - - ( IBAction )setCaseSensitivity: ( id )sender; /* automation configuration actions */ - - ( IBAction )toggleEnableScheduleSwitch: ( id )sender; - ( IBAction )visitiHookHomepage: ( id )sender; - ( IBAction )setAutomationConfiguration: ( id )sender; /* user management actions */ - - ( IBAction )toggleUserManagement: ( id )sender; - ( IBAction )saveUserManagementSettings: ( id )sender; --- 85,98 ---- |
From: Andrew M. <fit...@us...> - 2006-07-14 14:28:28
|
Update of /cvsroot/radmind/radmind-assistant/rte In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29312 Modified Files: RXTranscript.m Log Message: Using KVO to watch for font size changes. Index: RXTranscript.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/RXTranscript.m,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** RXTranscript.m 10 Jul 2006 20:01:51 -0000 1.109 --- RXTranscript.m 14 Jul 2006 14:28:24 -0000 1.110 *************** *** 163,175 **** } ! - ( void )fontSizeChanged: ( id )sender { ! fontsize = [[ NSUserDefaults standardUserDefaults ] floatForKey: @"RTETextFontSize" ]; ! if ( fontsize > 72.0 || fontsize < 8.0 ) { ! fontsize = 12.0; } - - [ tContentsTableView setRowHeight: ( fontsize + 5.0 ) ]; - [ tContentsTableView reloadData ]; } --- 163,177 ---- } ! - ( void )observeValueForKeyPath: ( NSString * )keyPath ! ofObject: ( id )object ! change: ( NSDictionary * )change ! context: ( void * )context { ! if ( [ keyPath isEqualToString: @"values.RTETextFontSize" ] && ! [ object isKindOfClass: [ NSUserDefaultsController class ]] ) { ! fontsize = [[ object valueForKeyPath: keyPath ] floatValue ]; ! [ tContentsTableView setRowHeight: ( fontsize + 5.0 ) ]; ! [ tContentsTableView reloadData ]; } } *************** *** 203,210 **** name: NSControlTextDidChangeNotification object: nil ]; ! [[ NSDistributedNotificationCenter defaultCenter ] addObserver: self ! selector: @selector( fontSizeChanged: ) ! name: RTEFontSizeChangedNotification ! object: nil ]; lindex = 0; --- 205,214 ---- name: NSControlTextDidChangeNotification object: nil ]; ! ! [[ NSUserDefaultsController sharedUserDefaultsController ] ! addObserver: self ! forKeyPath: @"values.RTETextFontSize" ! options: NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld ! context: NULL ]; lindex = 0; *************** *** 690,694 **** [ tContentsTableView setNextKeyView: tbSearchField ]; [ tContentsTableView sizeLastColumnToFit ]; ! [[ NSNotificationCenter defaultCenter ] addObserver: self selector: @selector( textChanged: ) --- 694,698 ---- [ tContentsTableView setNextKeyView: tbSearchField ]; [ tContentsTableView sizeLastColumnToFit ]; ! [[ NSNotificationCenter defaultCenter ] addObserver: self selector: @selector( textChanged: ) |
From: Andrew M. <fit...@us...> - 2006-07-14 14:27:27
|
Update of /cvsroot/radmind/radmind-assistant/rte In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv28899 Modified Files: RXPrefs.h RXPrefs.m Log Message: NSDefaultsController handles most preferences now. Index: RXPrefs.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/RXPrefs.m,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** RXPrefs.m 25 Apr 2006 18:14:26 -0000 1.8 --- RXPrefs.m 14 Jul 2006 14:27:24 -0000 1.9 *************** *** 196,294 **** } - - ( void )reloadDefaults - { - NSUserDefaults *defaults = [ NSUserDefaults standardUserDefaults ]; - NSString *basepath = [ defaults objectForKey: @"RTEBasePath" ]; - BOOL wildcard = [ defaults boolForKey: @"RTEWildcardSearches" ]; - float fontsize = [ defaults floatForKey: @"RTETextFontSize" ]; - - if ( basepath == nil ) { - basepath = @"/"; - } - - if ( fontsize <= 0.0 ) { - fontsize = 12.0; - [ defaults setFloat: 12.0 forKey: @"RTETextFontSize" ]; - } - - [ prefBasePathPopUp selectItemWithTitle: basepath ]; - [ prefTranscriptFontSizeStepper setFloatValue: fontsize ]; - [ prefTranscriptFontSize setFloatValue: fontsize ]; - - if ( wildcard ) { - [ prefWildcardSwitch setState: NSOnState ]; - } else { - [ prefWildcardSwitch setState: NSOffState ]; - } - } - - ( void )displayPreferencesPane { - [ self reloadDefaults ]; [ prefPanel makeKeyAndOrderFront: nil ]; } - - ( IBAction )prefSetBasePath: ( id )sender - { - NSString *basepath = nil; - - if ( ! [ sender isKindOfClass: [ NSPopUpButton class ]] ) { - NSBeep(); - return; - } - - basepath = [ sender titleOfSelectedItem ]; - - [[ NSUserDefaults standardUserDefaults ] setObject: basepath - forKey: @"RTEBasePath" ]; - } - - - ( IBAction )toggleWildcardSearches: ( id )sender - { - BOOL wildcard = NO; - - if ( [ sender state ] == NSOnState ) { - wildcard = YES; - } - - [[ NSUserDefaults standardUserDefaults ] - setBool: wildcard forKey: @"RTEWildcardSearches" ]; - } - - - ( IBAction )setTranscriptFontSize: ( id )sender - { - float fontsize; - - if (( fontsize = [ sender floatValue ] ) <= 0 || - fontsize > 72 ) { - fontsize = 12.0; - } - - [[ NSUserDefaults standardUserDefaults ] setFloat: fontsize - forKey: @"RTETextFontSize" ]; - [[ NSUserDefaults standardUserDefaults ] synchronize ]; - - [[ NSDistributedNotificationCenter defaultCenter ] - postNotificationName: RTEFontSizeChangedNotification - object: nil ]; - } - - - ( IBAction )changeTranscriptFontSize: ( id )sender - { - if ( ! [ sender isKindOfClass: [ NSStepper class ]] ) { - NSBeep(); - return; - } - - [ prefTranscriptFontSize setFloatValue: [ sender floatValue ]]; - - [ NSObject cancelPreviousPerformRequestsWithTarget: self - selector: @selector( setTranscriptFontSize: ) - object: prefTranscriptFontSize ]; - [ self performSelector: @selector( setTranscriptFontSize: ) - withObject: prefTranscriptFontSize - afterDelay: 1.0 ]; - } - /* advanced preferences */ - ( IBAction )toggleSessionRights: ( id )sender --- 196,204 ---- Index: RXPrefs.h =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rte/RXPrefs.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** RXPrefs.h 25 Apr 2006 18:14:26 -0000 1.8 --- RXPrefs.h 14 Jul 2006 14:27:24 -0000 1.9 *************** *** 25,30 **** #import <Cocoa/Cocoa.h> - #define RTEFontSizeChangedNotification @"RTEFontSizeChangedNotification" - @interface RXPrefs : NSObject { --- 25,28 ---- *************** *** 35,42 **** /* general preferences */ IBOutlet NSBox *prefGeneralPreferencesBox; - IBOutlet NSPopUpButton *prefBasePathPopUp; - IBOutlet NSButton *prefWildcardSwitch; - IBOutlet NSTextField *prefTranscriptFontSize; - IBOutlet NSStepper *prefTranscriptFontSizeStepper; /* advanced preferences */ --- 33,36 ---- *************** *** 51,60 **** - ( void )showAdvancedPreferences: ( id )sender; - /* general preferences actions */ - - ( IBAction )prefSetBasePath: ( id )sender; - - ( IBAction )toggleWildcardSearches: ( id )sender; - - ( IBAction )setTranscriptFontSize: ( id )sender; - - ( IBAction )changeTranscriptFontSize: ( id )sender; - /* advanced preferences actions */ - ( IBAction )toggleSessionRights: ( id )sender; --- 45,48 ---- |