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

macosx: improve handling of module lists within the simple preferenences (close #8440)

parent c5ca8aa0
...@@ -389,7 +389,7 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam ...@@ -389,7 +389,7 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
p_parser = p_list[i_index]; p_parser = p_list[i_index];
if (module_provides(p_parser, p_item->psz_type)) { if (module_provides(p_parser, p_item->psz_type)) {
[object addItemWithTitle: [NSString stringWithUTF8String: _(module_GetLongName(p_parser)) ?: ""]]; [object addItemWithTitle: [NSString stringWithUTF8String: _(module_GetLongName(p_parser)) ?: ""]];
if (p_item->value.psz && !strcmp(p_item->value.psz, module_get_object(p_parser))) if (p_item->value.psz && !strcmp(p_item->value.psz, module_get_name(p_parser, false)))
[object selectItem: [object lastItem]]; [object selectItem: [object lastItem]];
} }
} }
...@@ -751,16 +751,19 @@ static inline void save_module_list(intf_thread_t * p_intf, id object, const cha ...@@ -751,16 +751,19 @@ static inline void save_module_list(intf_thread_t * p_intf, id object, const cha
p_parser = p_list[i_module_index]; p_parser = p_list[i_module_index];
if (p_item->i_type == CONFIG_ITEM_MODULE && module_provides(p_parser, p_item->psz_type)) { if (p_item->i_type == CONFIG_ITEM_MODULE && module_provides(p_parser, p_item->psz_type)) {
if ([objectTitle isEqualToString: _NS(module_GetLongName(p_parser))]) if ([objectTitle isEqualToString: _NS(module_GetLongName(p_parser))]) {
{ config_PutPsz(p_intf, name, strdup(module_get_name(p_parser, false)));
config_PutPsz(p_intf, name, strdup(module_get_object(p_parser)));
break; break;
} }
} }
} }
module_list_free(p_list); module_list_free(p_list);
if ([objectTitle isEqualToString: _NS("Default")]) if ([objectTitle isEqualToString: _NS("Default")]) {
config_PutPsz(p_intf, name, ""); if (!strcmp(name, "vout"))
config_PutPsz(p_intf, name, "");
else
config_PutPsz(p_intf, name, "none");
}
} }
- (void)saveChangedSettings - (void)saveChangedSettings
......
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