| | 451 | | static int backwards_compatibility(const char *module, CONFIG_NODE *node, |
| | 452 | | CONFIG_NODE *parent) |
| | 453 | | { |
| | 454 | | const char *new_key, *new_module; |
| | 455 | | CONFIG_NODE *new_node; |
| | 456 | | char *new_value; |
| | 457 | | |
| | 458 | | new_value = NULL; new_key = NULL; new_module = NULL;
|
| | 459 | | |
| | 460 | | |
| | 461 | | if (strcmp(module, "fe-text") == 0) { |
| | 462 | | if (g_ascii_strcasecmp(node->key, "term_type") == 0 || |
| | 463 | | |
| | 464 | | g_ascii_strcasecmp(node->key, "term_charset") == 0) { |
| | 465 | | new_module = "fe-common/core"; |
| | 466 | | new_key = "term_charset"; |
| | 467 | | new_value = !is_valid_charset(node->value) ? NULL :
|
| | 468 | | g_strdup(node->value); |
| | 469 | | new_node = iconfig_node_traverse("settings", FALSE);
|
| | 470 | | new_node = new_node == NULL ? NULL :
|
| | 471 | | config_node_section(new_node, new_module, -1); |
| | 472 | | |
| | 473 | | config_node_set_str(mainconfig, new_node, |
| | 474 | | new_key, new_value); |
| | 475 | | |
| | 476 | | config_node_set_str(mainconfig, parent, |
| | 477 | | node->key, NULL);
|
| | 478 | | g_free(new_value); |
| | 479 | | config_changed = TRUE;
|
| | 480 | | return new_key != NULL;
|
| | 481 | | } else if (g_ascii_strcasecmp(node->key, "actlist_moves") == 0 && |
| | 482 | | node->value != NULL && g_ascii_strcasecmp(node->value, "yes") == 0) {
|
| | 483 | | config_node_set_str(mainconfig, parent, "actlist_sort", "recent"); |
| | 484 | | config_node_set_str(mainconfig, parent, node->key, NULL);
|
| | 485 | | config_changed = TRUE;
|
| | 486 | | return TRUE;
|
| | 487 | | } |
| | 488 | | } |
| Never True: new_key != (void*)0 | 489 | | return new_key != NULL; | Problem | | Never True: new_key != (void*)0 |
|
| | 490 | | } |