[Github-comments] [geany] Fix for "Open in New Window". (#637)

zhekov notifications at xxxxx
Sat Sep 5 16:37:09 UTC 2015


>  void utils_start_new_geany_instance(const gchar *doc_path)
>  {
> -	const gchar *command = is_osx_bundle() ? "open" : "geany";
> -	gchar *exec_path = g_find_program_in_path(command);
> +	gchar **argv;
> +	int i, persistent;
> +	int argc;
> +	GError *error = NULL;
> +
> +	for (i = 0, persistent = 0; optentries[i].long_name; i++)
> +		if (optentries_aux[i].persistent)
> +			persistent++;
> +
> +	argv = g_new0(gchar *, persistent + 5);  /* exectuable, -i, --, doc_path, NULL */
> +	argv[0] = g_build_filename(utils_resource_dir(RESOURCE_DIR_PREFIX), "bin", "geany", NULL);

utils_resource_dir() already handles the windows "prefix".

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/637/files#r38812437
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20150905/1305bd0a/attachment.html>


More information about the Github-comments mailing list