Branch: refs/heads/master Author: Dimitar Zhekov dimitar.zhekov@gmail.com Committer: Dimitar Zhekov dimitar.zhekov@gmail.com Date: Mon, 23 Mar 2015 18:02:43 UTC Commit: a3af98cfc99884c8040f1de0b5fa8d3f57421ddb https://github.com/geany/geany/commit/a3af98cfc99884c8040f1de0b5fa8d3f57421d...
Log Message: ----------- Altered keyfile.c to use the new spawning module
In particular, changed the default printcmd not to "single quote paths on Win32 for g_spawn_command_line_async", but use the native double quotes. Also fixed it not to g_strconcat(NULL, ...) if lpr is missing under Unix. It works, but glib says the first string must not be NULL, and the command becomes wrong anyway.
Modified Paths: -------------- src/keyfile.c
Modified: src/keyfile.c 13 lines changed, 7 insertions(+), 6 deletions(-) =================================================================== @@ -941,19 +941,20 @@ static void load_dialog_prefs(GKeyFile *config)
/* printing */ tmp_string2 = g_find_program_in_path(GEANY_DEFAULT_TOOLS_PRINTCMD); -#ifdef G_OS_WIN32 + if (!EMPTY(tmp_string2)) { - /* single quote paths on Win32 for g_spawn_command_line_async */ - tmp_string = g_strconcat("'", tmp_string2, "' '%f'", NULL); + #ifdef G_OS_WIN32 + tmp_string = g_strconcat(GEANY_DEFAULT_TOOLS_PRINTCMD, " "%f"", NULL); + #else + tmp_string = g_strconcat(GEANY_DEFAULT_TOOLS_PRINTCMD, " %f", NULL); + #endif } else { tmp_string = g_strdup(""); } -#else - tmp_string = g_strconcat(tmp_string2, " %f", NULL); -#endif + printing_prefs.external_print_cmd = utils_get_setting_string(config, "printing", "print_cmd", tmp_string); g_free(tmp_string); g_free(tmp_string2);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).