mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 21:16:22 +00:00
Create call_external() helper function
This commit is contained in:
@@ -8871,15 +8871,7 @@ cmd_urlopen(ProfWin *window, const char *const command, gchar **args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//TODO: make function. see src/xmpp/avatar.c
|
||||
GString *cmd = g_string_new("");
|
||||
|
||||
g_string_append_printf(cmd, "%s %s > /dev/null 2>&1", "xdg-open", args[0]);
|
||||
cons_show("Calling: %s", cmd->str);
|
||||
FILE *stream = popen(cmd->str, "r");
|
||||
|
||||
pclose(stream);
|
||||
g_string_free(cmd, TRUE);
|
||||
call_external("xdg-open", args[0]);
|
||||
} else {
|
||||
cons_show("urlopen not supported in this window");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user