Mercurial > geeqie
diff src/rcfile.c @ 768:ff51413f098d
Use functions to set editors name and command and ensure they are
utf8-encoded.
Previously, non-utf8 strings from rc file caused some issues.
author | zas_ |
---|---|
date | Fri, 30 May 2008 08:39:52 +0000 |
parents | ae618ebec3e9 |
children | df541dc41707 |
line wrap: on
line diff
--- a/src/rcfile.c Fri May 30 08:36:23 2008 +0000 +++ b/src/rcfile.c Fri May 30 08:39:52 2008 +0000 @@ -17,6 +17,7 @@ #include "rcfile.h" #include "bar_exif.h" +#include "editors.h" #include "filefilter.h" #include "secure_save.h" #include "slideshow.h" @@ -907,12 +908,10 @@ if (i > 0 && i <= GQ_EDITOR_SLOTS) { const gchar *ptr; + i--; - g_free(options->editor[i].name); - g_free(options->editor[i].command); - - options->editor[i].name = quoted_value(value_all, &ptr); - options->editor[i].command = quoted_value(ptr, NULL); + editor_set_name(i, quoted_value(value_all, &ptr)); + editor_set_command(i, quoted_value(ptr, NULL)); } continue; }