Commit e1e0e53d3de88e0355dee3d07f3253137f98c0cc
1 parent
b5ae960d
Exists in
master
and in
1 other branch
Ajustes para compilar na versão antiga do GTK
Showing
1 changed file
with
12 additions
and
3 deletions
Show diff stats
hostselect.c
... | ... | @@ -139,7 +139,7 @@ static void V3270HostSelectWidget_init(V3270HostSelectWidget *widget) |
139 | 139 | #if GTK_CHECK_VERSION(3,0,0) |
140 | 140 | GtkGrid * grid = GTK_GRID(gtk_grid_new()); |
141 | 141 | #else |
142 | - GtkTable * grid = gtk_table_new(?,?,FALSE); | |
142 | + GtkTable * grid = GTK_TABLE(gtk_table_new(3,4,FALSE)); | |
143 | 143 | #endif // GTK_CHECK_VERSION |
144 | 144 | |
145 | 145 | GtkWidget * label[ENTRY_COUNT] = |
... | ... | @@ -219,10 +219,10 @@ static void V3270HostSelectWidget_init(V3270HostSelectWidget *widget) |
219 | 219 | gtk_entry_set_max_length(widget->entry[ENTRY_SRVCNAME],6); |
220 | 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 | 222 | #if GTK_CHECK_VERSION(3,0,0) |
225 | 223 | |
224 | + gtk_entry_set_placeholder_text(widget->entry[ENTRY_SRVCNAME],"telnet"); | |
225 | + | |
226 | 226 | gtk_widget_set_hexpand(GTK_WIDGET(widget->entry[ENTRY_HOSTNAME]),TRUE); |
227 | 227 | gtk_widget_set_hexpand(GTK_WIDGET(widget->ssl),TRUE); |
228 | 228 | gtk_widget_set_hexpand(GTK_WIDGET(expander),TRUE); |
... | ... | @@ -398,12 +398,21 @@ LIB3270_EXPORT void v3270_select_host(GtkWidget *widget) |
398 | 398 | while(again) |
399 | 399 | { |
400 | 400 | gtk_widget_set_sensitive(win,TRUE); |
401 | + | |
402 | +#if GTK_CHECK_VERSION(2,18,0) | |
401 | 403 | gtk_widget_set_visible(win,TRUE); |
404 | +#else | |
405 | + gtk_widget_show(win); | |
406 | +#endif | |
402 | 407 | |
403 | 408 | switch(gtk_dialog_run(GTK_DIALOG(win))) |
404 | 409 | { |
405 | 410 | case GTK_RESPONSE_ACCEPT: |
411 | +#if GTK_CHECK_VERSION(2,18,0) | |
406 | 412 | gtk_widget_set_visible(win,FALSE); |
413 | +#else | |
414 | + gtk_widget_hide(win); | |
415 | +#endif | |
407 | 416 | gtk_widget_set_sensitive(win,FALSE); |
408 | 417 | again = v3270_host_select_apply(GTK_V3270HostSelectWidget(dialog)) != 0; |
409 | 418 | break; | ... | ... |