Commit 6a064b262dca21ea3162c6fcca058cbd3da28de0
1 parent
8f4944f5
Exists in
v5.2
Fixing windows build.
Showing
1 changed file
with
6 additions
and
3 deletions
Show diff stats
src/pw3270/common/config.c
@@ -477,9 +477,9 @@ void set_string_to_config(const gchar *group, const gchar *key, const gchar *fmt | @@ -477,9 +477,9 @@ void set_string_to_config(const gchar *group, const gchar *key, const gchar *fmt | ||
477 | set_string(group,key,fmt,args); | 477 | set_string(group,key,fmt,args); |
478 | va_end(args); | 478 | va_end(args); |
479 | } | 479 | } |
480 | - else if(g_key_file_has_key(program_config,group,key,NULL)) | ||
481 | - { | ||
482 | #ifdef ENABLE_WINDOWS_REGISTRY | 480 | #ifdef ENABLE_WINDOWS_REGISTRY |
481 | + else | ||
482 | + { | ||
483 | 483 | ||
484 | gchar * path = g_strdup_printf("%s\\%s\\%s",registry_path,g_get_application_name(),group); | 484 | gchar * path = g_strdup_printf("%s\\%s\\%s",registry_path,g_get_application_name(),group); |
485 | HKEY hKey; | 485 | HKEY hKey; |
@@ -493,10 +493,13 @@ void set_string_to_config(const gchar *group, const gchar *key, const gchar *fmt | @@ -493,10 +493,13 @@ void set_string_to_config(const gchar *group, const gchar *key, const gchar *fmt | ||
493 | 493 | ||
494 | g_free(path); | 494 | g_free(path); |
495 | 495 | ||
496 | + } | ||
496 | #else | 497 | #else |
498 | + else if(g_key_file_has_key(program_config,group,key,NULL)) | ||
499 | + { | ||
497 | g_key_file_remove_key(program_config,group,key,NULL); | 500 | g_key_file_remove_key(program_config,group,key,NULL); |
498 | -#endif | ||
499 | } | 501 | } |
502 | +#endif | ||
500 | } | 503 | } |
501 | 504 | ||
502 | void set_boolean_to_config(const gchar *group, const gchar *key, gboolean val) | 505 | void set_boolean_to_config(const gchar *group, const gchar *key, gboolean val) |