[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx: [338] branches/fusegl/fuse/fusepb
Brought to you by:
fredm
From: <fr...@us...> - 2007-04-06 01:54:58
|
Revision: 338 http://svn.sourceforge.net/fuse-for-macosx/?rev=338&view=rev Author: fredm Date: 2007-04-05 18:54:59 -0700 (Thu, 05 Apr 2007) Log Message: ----------- Move settings reset to Emulator object. Modified Paths: -------------- branches/fusegl/fuse/fusepb/controllers/FuseController.m branches/fusegl/fuse/fusepb/models/Emulator.h branches/fusegl/fuse/fusepb/models/Emulator.m branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.h branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.m Modified: branches/fusegl/fuse/fusepb/controllers/FuseController.m =================================================================== --- branches/fusegl/fuse/fusepb/controllers/FuseController.m 2007-04-06 01:42:18 UTC (rev 337) +++ branches/fusegl/fuse/fusepb/controllers/FuseController.m 2007-04-06 01:54:59 UTC (rev 338) @@ -698,7 +698,7 @@ - (IBAction)save_options:(id)sender { - [[DisplayOpenGLView instance] saveOptions]; + [[DisplayOpenGLView instance] settingsSave]; } - (IBAction)fullscreen:(id)sender @@ -847,9 +847,7 @@ if( error != NSAlertAlternateReturn ) return; - [NSUserDefaults resetStandardUserDefaults]; - - error = settings_defaults( &settings_current ); + error = [[DisplayOpenGLView instance] settingsResetDefaults]; if( error ) ui_error( UI_ERROR_ERROR, "Error resetting preferences" ); } Modified: branches/fusegl/fuse/fusepb/models/Emulator.h =================================================================== --- branches/fusegl/fuse/fusepb/models/Emulator.h 2007-04-06 01:42:18 UTC (rev 337) +++ branches/fusegl/fuse/fusepb/models/Emulator.h 2007-04-06 01:54:59 UTC (rev 338) @@ -86,7 +86,8 @@ -(void) profileStart; -(void) profileFinish:(const char *)filename; --(void) saveOptions; +-(void) settingsSave; +-(int) settingsResetDefaults; -(void) fullscreen; Modified: branches/fusegl/fuse/fusepb/models/Emulator.m =================================================================== --- branches/fusegl/fuse/fusepb/models/Emulator.m 2007-04-06 01:42:18 UTC (rev 337) +++ branches/fusegl/fuse/fusepb/models/Emulator.m 2007-04-06 01:54:59 UTC (rev 338) @@ -278,11 +278,17 @@ profile_finish( filename ); } --(void) saveOptions +-(void) settingsSave { settings_write_config( &settings_current ); } +-(int) settingsResetDefaults +{ + [NSUserDefaults resetStandardUserDefaults]; + return settings_defaults( &settings_current ); +} + -(void) fullscreen { settings_current.full_screen = 1; Modified: branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.h =================================================================== --- branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.h 2007-04-06 01:42:18 UTC (rev 337) +++ branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.h 2007-04-06 01:54:59 UTC (rev 338) @@ -122,7 +122,8 @@ -(void) profileStart; -(void) profileFinish:(const char *)filename; --(void) saveOptions; +-(void) settingsSave; +-(int) settingsResetDefaults; -(void) fullscreen; Modified: branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.m =================================================================== --- branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.m 2007-04-06 01:42:18 UTC (rev 337) +++ branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.m 2007-04-06 01:54:59 UTC (rev 338) @@ -659,11 +659,16 @@ [proxy_emulator profileFinish:filename]; } --(void) saveOptions +-(void) settingsSave { - [proxy_emulator saveOptions]; + [proxy_emulator settingsSave]; } +-(int) settingsResetDefaults +{ + return [proxy_emulator settingsResetDefaults]; +} + -(void) fullscreen { [proxy_emulator fullscreen]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |