UI: Add support for "More Info" link from service

(Jim) Allows the ability to get a link from the service's settings about
a specific service selection the user chooses and display it as a "More
Info" button that the user can click to find out more information about
that particular service.
This commit is contained in:
Maya Venkatraman
2020-10-12 21:20:12 -07:00
committed by jp9000
parent c574b65488
commit 41f4a0b0b9
8 changed files with 138 additions and 6 deletions

View File

@@ -370,6 +370,15 @@ static void fill_servers(obs_property_t *servers_prop, json_t *service,
}
}
static void fill_more_info_link(json_t *service, obs_data_t *settings)
{
const char *more_info_link;
more_info_link = get_string_val(service, "more_info_link");
if (more_info_link)
obs_data_set_string(settings, "more_info_link", more_info_link);
}
static inline json_t *find_service(json_t *root, const char *name,
const char **p_new_name)
{
@@ -432,7 +441,7 @@ static bool service_selected(obs_properties_t *props, obs_property_t *p,
}
fill_servers(obs_properties_get(props, "server"), service, name);
fill_more_info_link(service, settings);
return true;
}