|
From: Geisschaes <gei...@us...> - 2005-06-12 15:13:20
|
Update of /cvsroot/macattrick/macattrick In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23353 Modified Files: HistoryManager.m PreferencesController.h PreferencesController.m Log Message: history management added Index: PreferencesController.h =================================================================== RCS file: /cvsroot/macattrick/macattrick/PreferencesController.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PreferencesController.h 20 Jan 2005 20:46:01 -0000 1.3 --- PreferencesController.h 12 Jun 2005 15:12:39 -0000 1.4 *************** *** 29,32 **** --- 29,33 ---- #import <Cocoa/Cocoa.h> #import "FormulasViewController.h" + #import "HistoryController.h" @interface PreferencesController : NSWindowController *************** *** 34,37 **** --- 35,39 ---- IBOutlet NSUserDefaultsController *userDefaultsController; FormulasViewController *formulasViewController; + HistoryController *historyController; IBOutlet NSTabView *tabView; Index: HistoryManager.m =================================================================== RCS file: /cvsroot/macattrick/macattrick/HistoryManager.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HistoryManager.m 10 Jun 2005 15:49:20 -0000 1.1 --- HistoryManager.m 12 Jun 2005 15:12:39 -0000 1.2 *************** *** 32,36 **** - (NSArray*) historyDates { ! return [Properties formerDatesPathes]; } --- 32,43 ---- - (NSArray*) historyDates { ! NSArray *pathes = [Properties formerDatesPathes]; ! NSMutableArray *result = [[NSMutableArray alloc] initWithCapacity:[pathes count]]; ! NSEnumerator *en = [pathes objectEnumerator]; ! NSString *current = nil; ! while(current = [en nextObject]) { ! [result addObject: [current lastPathComponent]]; ! } ! return result; } Index: PreferencesController.m =================================================================== RCS file: /cvsroot/macattrick/macattrick/PreferencesController.m,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PreferencesController.m 6 Feb 2005 19:36:19 -0000 1.4 --- PreferencesController.m 12 Jun 2005 15:12:39 -0000 1.5 *************** *** 46,50 **** --- 46,54 ---- formulasViewController = [[FormulasViewController alloc] init]; } + if(!historyController) { + historyController = [[HistoryController alloc] init]; + } [[tabView tabViewItemAtIndex:2] setView:[formulasViewController formulasView]]; + [[tabView tabViewItemAtIndex:3] setView:[historyController historyView]]; } *************** *** 54,57 **** --- 58,62 ---- [userDefaultsController release]; [formulasViewController release]; + [historyController release]; [super dealloc]; } |