Compare commits
5 Commits
199833d603
...
af031acc38
Author | SHA1 | Date | |
---|---|---|---|
af031acc38 | |||
9f2544ee94 | |||
1f281119df | |||
bdb06c4d6e | |||
1fa2d75abd |
@ -321,6 +321,7 @@ static void load_mapping_clicked(GtkWidget *button, gpointer user_data)
|
|||||||
*/
|
*/
|
||||||
static void create_csv_line(LayerElement *layer_element, char *line_buffer, size_t max_len)
|
static void create_csv_line(LayerElement *layer_element, char *line_buffer, size_t max_len)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
GString *string;
|
GString *string;
|
||||||
gboolean export;
|
gboolean export;
|
||||||
const gchar *name;
|
const gchar *name;
|
||||||
@ -336,9 +337,19 @@ static void create_csv_line(LayerElement *layer_element, char *line_buffer, size
|
|||||||
layer_element_get_color(layer_element, &color);
|
layer_element_get_color(layer_element, &color);
|
||||||
|
|
||||||
/* print values to line */
|
/* print values to line */
|
||||||
g_string_printf(string, "%d,%lf,%lf,%lf,%lf,%d,%s\n",
|
g_string_printf(string, "%d:%lf:%lf:%lf:%lf:%d:%s\n",
|
||||||
layer, color.red, color.green,
|
layer, color.red, color.green,
|
||||||
color.blue, color.alpha, (export == TRUE ? 1 : 0), name);
|
color.blue, color.alpha, (export == TRUE ? 1 : 0), name);
|
||||||
|
/* Fix broken locale settings */
|
||||||
|
for (i = 0; string->str[i]; i++) {
|
||||||
|
if (string->str[i] == ',')
|
||||||
|
string->str[i] = '.';
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; string->str[i]; i++) {
|
||||||
|
if (string->str[i] == ':')
|
||||||
|
string->str[i] = ',';
|
||||||
|
}
|
||||||
|
|
||||||
if (string->len > (max_len-1)) {
|
if (string->len > (max_len-1)) {
|
||||||
printf("Layer Definition too long. Please shorten Layer Name!!\n");
|
printf("Layer Definition too long. Please shorten Layer Name!!\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user