[Geany-Devel] win32 right click on tab --> Open in New Window not working

Colomban Wendling lists.ban at xxxxx
Tue Mar 17 12:37:47 UTC 2015

Le 17/03/2015 11:16, Jiří Techet a écrit :
> […]
> I don't use Windows myself but did some work in this area recently to
> make it work it on os x so I'm familiar with the code a bit. I think the
> only thing you need to do is to put the location of geany.exe into your
> PATH environment variable so geany can find it (it just tries to run
> geany without checking any additional paths).

What about this?

> void utils_start_new_geany_instance(const gchar *doc_path)
> {
> 	gchar *exec_path = g_build_filename(utils_resource_dir(RESOURCE_DIR_PREFIX), "bin", "geany", NULL);
> 	gchar *argv[] = { exec_path, "-i", doc_path, NULL };
> 	GError *err = NULL;
> 	if (!utils_spawn_async(NULL, argv, NULL, 0, NULL, NULL, NULL, &err))
> 	{
> 		g_printerr("Unable to open new window: %s", err->message);
> 		g_error_free(err);
> 	}
> 	g_free(exec_path);
> }

It should work on Windows, and has one additional advantage: it spawns
the same Geany installation as the running one, no matter the PATH.
Would something like this work on OSX?  If it doesn't, we probably could
keep the current thing there.

What do you think?


More information about the Devel mailing list