Commit 0e87618b2201f085c399cfe36da033b4b92b1e7d
1 parent
d79b3aec
Exists in
master
and in
5 other branches
Ajustes de compatibilidade com glib/gtk mais novos
Showing
2 changed files
with
5 additions
and
3 deletions
Show diff stats
src/gtk/common/config.c
@@ -64,6 +64,7 @@ | @@ -64,6 +64,7 @@ | ||
64 | 64 | ||
65 | /*--[ Implement ]------------------------------------------------------------------------------------*/ | 65 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
66 | 66 | ||
67 | +/* | ||
67 | #ifdef WIN32 | 68 | #ifdef WIN32 |
68 | 69 | ||
69 | gchar * get_last_error_msg(void) | 70 | gchar * get_last_error_msg(void) |
@@ -91,6 +92,7 @@ gchar * get_last_error_msg(void) | @@ -91,6 +92,7 @@ gchar * get_last_error_msg(void) | ||
91 | } | 92 | } |
92 | 93 | ||
93 | #endif // WIN32 | 94 | #endif // WIN32 |
95 | +*/ | ||
94 | 96 | ||
95 | #ifdef WIN_REGISTRY_ENABLED | 97 | #ifdef WIN_REGISTRY_ENABLED |
96 | 98 | ||
@@ -445,7 +447,7 @@ void set_boolean_to_config(const gchar *group, const gchar *key, gboolean val) | @@ -445,7 +447,7 @@ void set_boolean_to_config(const gchar *group, const gchar *key, gboolean val) | ||
445 | 447 | ||
446 | if(rc != ERROR_SUCCESS) | 448 | if(rc != ERROR_SUCCESS) |
447 | { | 449 | { |
448 | - gchar *msg = get_last_error_msg(); | 450 | + gchar *msg = g_win32_error_message(GetLastError()); |
449 | g_warning("Error \"%s\" when setting key HKCU\\%s\\%s",msg,path,key); | 451 | g_warning("Error \"%s\" when setting key HKCU\\%s\\%s",msg,path,key); |
450 | g_free(msg); | 452 | g_free(msg); |
451 | } | 453 | } |
@@ -453,7 +455,7 @@ void set_boolean_to_config(const gchar *group, const gchar *key, gboolean val) | @@ -453,7 +455,7 @@ void set_boolean_to_config(const gchar *group, const gchar *key, gboolean val) | ||
453 | } | 455 | } |
454 | else | 456 | else |
455 | { | 457 | { |
456 | - gchar *msg = get_last_error_msg(); | 458 | + gchar *msg = g_win32_error_message(GetLastError()); |
457 | g_warning("Error \"%s\" when creating key HKCU\\%s",msg,path); | 459 | g_warning("Error \"%s\" when creating key HKCU\\%s",msg,path); |
458 | g_free(msg); | 460 | g_free(msg); |
459 | } | 461 | } |
src/gtk/globals.h
@@ -29,13 +29,13 @@ | @@ -29,13 +29,13 @@ | ||
29 | 29 | ||
30 | #include <pw3270.h> | 30 | #include <pw3270.h> |
31 | #include <lib3270/config.h> | 31 | #include <lib3270/config.h> |
32 | - #include <gtk/gtk.h> | ||
33 | 32 | ||
34 | #define ENABLE_NLS | 33 | #define ENABLE_NLS |
35 | #define GETTEXT_PACKAGE PACKAGE_NAME | 34 | #define GETTEXT_PACKAGE PACKAGE_NAME |
36 | 35 | ||
37 | #include <libintl.h> | 36 | #include <libintl.h> |
38 | #include <glib/gi18n.h> | 37 | #include <glib/gi18n.h> |
38 | + #include <gtk/gtk.h> | ||
39 | 39 | ||
40 | #include "v3270/v3270.h" | 40 | #include "v3270/v3270.h" |
41 | 41 |