Branch: refs/heads/master Author: Matthew Brush matt@geany.org Committer: Matthew Brush matt@geany.org Date: Mon, 19 Aug 2013 03:59:31 UTC Commit: 4e924817b36e491d3f04aa7f4857bd175c8f3d7e https://github.com/geany/geany/commit/4e924817b36e491d3f04aa7f4857bd175c8f3d...
Log Message: ----------- Use empty string on win32 when no print command
In the preferences dialog it would show a single quote because the print command couldn't be found and the NULL prematurely terminated the g_strconcat() call, leaving a single quote in the print command entry.
Thanks to Lex for finding where the problem was.
Modified Paths: -------------- src/keyfile.c
Modified: src/keyfile.c 11 files changed, 9 insertions(+), 2 deletions(-) =================================================================== @@ -916,8 +916,15 @@ static void load_dialog_prefs(GKeyFile *config) /* printing */ tmp_string2 = g_find_program_in_path(GEANY_DEFAULT_TOOLS_PRINTCMD); #ifdef G_OS_WIN32 - /* single quote paths on Win32 for g_spawn_command_line_async */ - tmp_string = g_strconcat("'", tmp_string2, "' '%f'", NULL); + if (!EMPTY(tmp_string2)) + { + /* single quote paths on Win32 for g_spawn_command_line_async */ + tmp_string = g_strconcat("'", tmp_string2, "' '%f'", NULL); + } + else + { + tmp_string = g_strdup(""); + } #else tmp_string = g_strconcat(tmp_string2, " %f", NULL); #endif
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).