[o_prefs_window orderOut:self];
}
-- (IBAction)resetAll: (id)sender
-{
- NSBeginInformationalAlertSheet(_NS("Reset Preferences"), _NS("Cancel"),
- _NS("Continue"), nil, o_prefs_window, self,
- @selector(sheetDidEnd: returnCode: contextInfo:), NULL, nil, @"%@",
- _NS("Beware this will reset the VLC media player preferences.\n"
- "Are you sure you want to continue?"));
-}
-
-- (void)sheetDidEnd:(NSWindow *)o_sheet returnCode:(int)i_return
- contextInfo:(void *)o_context
-{
- if (i_return == NSAlertAlternateReturn) {
- /* reset VLC's config */
- config_ResetAll(p_intf);
- [_rootTreeItem resetView];
- config_SaveConfigFile(p_intf);
-
- /* reset OS X defaults */
- [NSUserDefaults resetStandardUserDefaults];
- [[NSUserDefaults standardUserDefaults] synchronize];
- }
-}
-
- (IBAction)buttonAction: (id)sender
{
[o_prefs_window orderOut: self];
}
}
- if (module_is_main(p_module) && CONFIG_ITEM(configType)) {
+ if (module_is_main(p_module) && (CONFIG_ITEM(configType) || configType == CONFIG_SECTION)) {
if (categoryItem && [self isSubCategoryGeneral:lastsubcat])
[[categoryItem options] addObject:[[VLCTreeLeafItem alloc] initWithConfigItem:&p_configs[j]]];
else if (subCategoryItem)
[[subCategoryItem options] addObject:[[VLCTreeLeafItem alloc] initWithConfigItem:&p_configs[j]]];
}
- else if (!module_is_main(p_module) && CONFIG_ITEM(configType)) {
+ else if (!module_is_main(p_module) && (CONFIG_ITEM(configType) || configType == CONFIG_SECTION)) {
if (![[subCategoryItem children] containsObject: pluginItem])
[[subCategoryItem children] addObject:pluginItem];
@implementation VLCTreePluginItem
- (id)initWithPlugin:(module_t *)plugin
{
- NSString * name = _NS(module_get_name(plugin, false)?:"");
+ NSString * name = _NS(module_get_name(plugin, false));
if (self = [super initWithName:name]) {
_configItems = module_config_get(plugin, &_configSize);
//_plugin = plugin;
- (id)initWithConfigItem: (module_config_t *) configItem
{
- NSString * name = _NS(configItem->psz_name);
+ NSString *name = toNSStr(configItem->psz_name);
self = [super initWithName:name];
- [name release];
if (self != nil)
_configItem = configItem;