reuse launch_browser function
This commit is contained in:
parent
2202d24468
commit
8163fa1e6d
|
@ -136,8 +136,7 @@ static void launch_url(const char *text, search_panel_info *info) {
|
||||||
unsigned long id = strtoul(text, &end, 10);
|
unsigned long id = strtoul(text, &end, 10);
|
||||||
|
|
||||||
if (!errno && end != text && *end == '\0' && id && id <= info->url_list.size()) {
|
if (!errno && end != text && *end == '\0' && id && id <= info->url_list.size()) {
|
||||||
browser_cmd[1] = info->url_list[id - 1].url;
|
launch_browser(info->url_list[id - 1].url);
|
||||||
g_spawn_async(NULL, browser_cmd, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
|
|
||||||
} else {
|
} else {
|
||||||
g_printerr("url hint invalid\n");
|
g_printerr("url hint invalid\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue