Commit d7c556eb292bb6a734764474686b59b2e6b180fa
1 parent
68c9553f
Exists in
master
and in
5 other branches
Ajustes para compilar na versão antiga do GTK
Showing
2 changed files
with
19 additions
and
3 deletions
Show diff stats
src/lib3270/connect.c
@@ -28,8 +28,15 @@ | @@ -28,8 +28,15 @@ | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #if defined(_WIN32) | 30 | #if defined(_WIN32) |
31 | + | ||
32 | + // Compiling for WinXP or later: Expose getaddrinfo()/freeaddrinfo(). | ||
33 | + #undef _WIN32_WINNT | ||
34 | + #define _WIN32_WINNT 0x0501 | ||
35 | + | ||
31 | #include <winsock2.h> | 36 | #include <winsock2.h> |
32 | #include <windows.h> | 37 | #include <windows.h> |
38 | + #include <ws2tcpip.h> | ||
39 | + | ||
33 | #endif | 40 | #endif |
34 | 41 | ||
35 | #include "globals.h" | 42 | #include "globals.h" |
src/pw3270/v3270/hostselect.c
@@ -139,7 +139,7 @@ static void V3270HostSelectWidget_init(V3270HostSelectWidget *widget) | @@ -139,7 +139,7 @@ static void V3270HostSelectWidget_init(V3270HostSelectWidget *widget) | ||
139 | #if GTK_CHECK_VERSION(3,0,0) | 139 | #if GTK_CHECK_VERSION(3,0,0) |
140 | GtkGrid * grid = GTK_GRID(gtk_grid_new()); | 140 | GtkGrid * grid = GTK_GRID(gtk_grid_new()); |
141 | #else | 141 | #else |
142 | - GtkTable * grid = gtk_table_new(?,?,FALSE); | 142 | + GtkTable * grid = GTK_TABLE(gtk_table_new(3,4,FALSE)); |
143 | #endif // GTK_CHECK_VERSION | 143 | #endif // GTK_CHECK_VERSION |
144 | 144 | ||
145 | GtkWidget * label[ENTRY_COUNT] = | 145 | GtkWidget * label[ENTRY_COUNT] = |
@@ -219,10 +219,10 @@ static void V3270HostSelectWidget_init(V3270HostSelectWidget *widget) | @@ -219,10 +219,10 @@ static void V3270HostSelectWidget_init(V3270HostSelectWidget *widget) | ||
219 | gtk_entry_set_max_length(widget->entry[ENTRY_SRVCNAME],6); | 219 | gtk_entry_set_max_length(widget->entry[ENTRY_SRVCNAME],6); |
220 | gtk_entry_set_width_chars(widget->entry[ENTRY_SRVCNAME],7); | 220 | gtk_entry_set_width_chars(widget->entry[ENTRY_SRVCNAME],7); |
221 | 221 | ||
222 | - gtk_entry_set_placeholder_text(widget->entry[ENTRY_SRVCNAME],"telnet"); | ||
223 | - | ||
224 | #if GTK_CHECK_VERSION(3,0,0) | 222 | #if GTK_CHECK_VERSION(3,0,0) |
225 | 223 | ||
224 | + gtk_entry_set_placeholder_text(widget->entry[ENTRY_SRVCNAME],"telnet"); | ||
225 | + | ||
226 | gtk_widget_set_hexpand(GTK_WIDGET(widget->entry[ENTRY_HOSTNAME]),TRUE); | 226 | gtk_widget_set_hexpand(GTK_WIDGET(widget->entry[ENTRY_HOSTNAME]),TRUE); |
227 | gtk_widget_set_hexpand(GTK_WIDGET(widget->ssl),TRUE); | 227 | gtk_widget_set_hexpand(GTK_WIDGET(widget->ssl),TRUE); |
228 | gtk_widget_set_hexpand(GTK_WIDGET(expander),TRUE); | 228 | gtk_widget_set_hexpand(GTK_WIDGET(expander),TRUE); |
@@ -398,12 +398,21 @@ LIB3270_EXPORT void v3270_select_host(GtkWidget *widget) | @@ -398,12 +398,21 @@ LIB3270_EXPORT void v3270_select_host(GtkWidget *widget) | ||
398 | while(again) | 398 | while(again) |
399 | { | 399 | { |
400 | gtk_widget_set_sensitive(win,TRUE); | 400 | gtk_widget_set_sensitive(win,TRUE); |
401 | + | ||
402 | +#if GTK_CHECK_VERSION(2,18,0) | ||
401 | gtk_widget_set_visible(win,TRUE); | 403 | gtk_widget_set_visible(win,TRUE); |
404 | +#else | ||
405 | + gtk_widget_show(win); | ||
406 | +#endif | ||
402 | 407 | ||
403 | switch(gtk_dialog_run(GTK_DIALOG(win))) | 408 | switch(gtk_dialog_run(GTK_DIALOG(win))) |
404 | { | 409 | { |
405 | case GTK_RESPONSE_ACCEPT: | 410 | case GTK_RESPONSE_ACCEPT: |
411 | +#if GTK_CHECK_VERSION(2,18,0) | ||
406 | gtk_widget_set_visible(win,FALSE); | 412 | gtk_widget_set_visible(win,FALSE); |
413 | +#else | ||
414 | + gtk_widget_hide(win); | ||
415 | +#endif | ||
407 | gtk_widget_set_sensitive(win,FALSE); | 416 | gtk_widget_set_sensitive(win,FALSE); |
408 | again = v3270_host_select_apply(GTK_V3270HostSelectWidget(dialog)) != 0; | 417 | again = v3270_host_select_apply(GTK_V3270HostSelectWidget(dialog)) != 0; |
409 | break; | 418 | break; |