Commit 8b290cc6 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* only save the affected modules (main, headphone, transform, adjust, invert,...

* only save the affected modules (main, headphone, transform, adjust, invert, motionblur, distort, clone, crop, normvol, headphone_channel_mixer, macosx) -- thanks to zorglub for the help (closes #382)
parent 5d06ca53
...@@ -769,18 +769,36 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -769,18 +769,36 @@ static VLCExtended *_o_sharedInstance = nil;
playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST, \ playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST, \
FIND_ANYWHERE ); FIND_ANYWHERE );
int returnedValue; int returnedValue;
NSArray * theModules;
theModules = [[NSArray alloc] initWithObjects: @"main", @"headphone", \
@"transform", @"adjust", @"invert", @"motionblur", @"distort", \
@"clone", @"crop", @"normvol", @"headphone_channel_mixer", @"macosx", \
nil];
unsigned int x = 0;
/* FIXME: we should only save the settings actually changed in this panel while ( x != [theModules count] )
* and no other. This would make the termination much quicker and is better
* for people who are using cmd-line-options (trac #382) -- FK (10/6/05) */
returnedValue = config_SaveConfigFile( p_playlist, NULL);
if (returnedValue == 0)
{ {
msg_Dbg(p_playlist, "VLCExtended: saved preferences successfully"); returnedValue = config_SaveConfigFile( p_playlist, [[theModules \
} else { objectAtIndex: x] UTF8String] );
msg_Dbg(p_playlist, "VLCExtended: error while saving the preferences " \
"(%i)" , returnedValue); if (returnedValue != 0)
{
msg_Err(p_playlist, "VLCExtended: error while saving the " \
"preferences of '%s' (%i)", [[theModules objectAtIndex: x] \
UTF8String] , returnedValue);
[theModules release];
vlc_object_release( p_playlist );
return;
}
x = ( x + 1 );
} }
msg_Dbg( p_playlist, "VLCExtended: saved certain preferences successfully" );
[theModules release];
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
@end @end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment