Commit e1e6e6bf1b629d36eeadfb30d9dc2310f4b62876

Authored by perry.werneck@gmail.com
1 parent 2e7c9ab1

Corrigindo problema na leitura da tabela de cores

src/pw3270/colors.c
@@ -585,7 +585,7 @@ static void load_color_scheme(GKeyFile *conf, const gchar *group, GdkRGBA *clr) @@ -585,7 +585,7 @@ static void load_color_scheme(GKeyFile *conf, const gchar *group, GdkRGBA *clr)
585 for(f=0;f<V3270_COLOR_COUNT;f++) 585 for(f=0;f<V3270_COLOR_COUNT;f++)
586 { 586 {
587 if(f) 587 if(f)
588 - g_string_append_c(str,','); 588 + g_string_append_c(str,';');
589 g_string_append_printf(str,"%s",gdk_rgba_to_string(v3270_get_color(widget,f))); 589 g_string_append_printf(str,"%s",gdk_rgba_to_string(v3270_get_color(widget,f)));
590 } 590 }
591 set_string_to_config("terminal","colors","%s",str->str); 591 set_string_to_config("terminal","colors","%s",str->str);
src/pw3270/v3270/widget.c
@@ -1276,7 +1276,13 @@ void v3270_set_color_table(GdkRGBA *table, const gchar *colors) @@ -1276,7 +1276,13 @@ void v3270_set_color_table(GdkRGBA *table, const gchar *colors)
1276 1276
1277 trace("colors=[%s]",colors); 1277 trace("colors=[%s]",colors);
1278 1278
1279 - clr = g_strsplit(colors,",",V3270_COLOR_COUNT+1); 1279 + if(strchr(colors,':'))
  1280 + clr = g_strsplit(colors,":",V3270_COLOR_COUNT+1);
  1281 + else if(strchr(colors,';'))
  1282 + clr = g_strsplit(colors,";",V3270_COLOR_COUNT+1);
  1283 + else
  1284 + clr = g_strsplit(colors,",",V3270_COLOR_COUNT+1);
  1285 +
1280 cnt = g_strv_length(clr); 1286 cnt = g_strv_length(clr);
1281 1287
1282 switch(cnt) 1288 switch(cnt)