comparison 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
comparison
equal deleted inserted replaced
767:e73d30e0c896 768:ff51413f098d
15 15
16 #include "main.h" 16 #include "main.h"
17 #include "rcfile.h" 17 #include "rcfile.h"
18 18
19 #include "bar_exif.h" 19 #include "bar_exif.h"
20 #include "editors.h"
20 #include "filefilter.h" 21 #include "filefilter.h"
21 #include "secure_save.h" 22 #include "secure_save.h"
22 #include "slideshow.h" 23 #include "slideshow.h"
23 #include "ui_fileops.h" 24 #include "ui_fileops.h"
24 25
905 if (is_numbered_option(option, "external_", &i)) 906 if (is_numbered_option(option, "external_", &i))
906 { 907 {
907 if (i > 0 && i <= GQ_EDITOR_SLOTS) 908 if (i > 0 && i <= GQ_EDITOR_SLOTS)
908 { 909 {
909 const gchar *ptr; 910 const gchar *ptr;
911
910 i--; 912 i--;
911 g_free(options->editor[i].name); 913 editor_set_name(i, quoted_value(value_all, &ptr));
912 g_free(options->editor[i].command); 914 editor_set_command(i, quoted_value(ptr, NULL));
913
914 options->editor[i].name = quoted_value(value_all, &ptr);
915 options->editor[i].command = quoted_value(ptr, NULL);
916 } 915 }
917 continue; 916 continue;
918 } 917 }
919 918
920 /* Exif */ 919 /* Exif */