diff --git a/src/pw3270/hostdialog.c b/src/pw3270/hostdialog.c index bee09a4..7c1994e 100644 --- a/src/pw3270/hostdialog.c +++ b/src/pw3270/hostdialog.c @@ -124,7 +124,11 @@ gboolean again = TRUE; int iHostType = 0; int iColorTable = 0; +#if GTK_CHECK_VERSION(3,0,0) + GtkGrid * grid = gtk_grid_new(); +#else GtkTable * table = GTK_TABLE(gtk_table_new(3,4,FALSE)); +#endif // GTK_CHECK_VERSION GtkEntry * host = GTK_ENTRY(gtk_entry_new()); GtkEntry * port = GTK_ENTRY(gtk_entry_new()); GtkToggleButton * sslcheck = GTK_TOGGLE_BUTTON(gtk_check_button_new_with_mnemonic( _( "_Secure connection" ) )); @@ -144,6 +148,40 @@ gtk_entry_set_width_chars(port,7); +#if GTK_CHECK_VERSION(3,0,0) + + gtk_grid_set_column_spacing(grid,5); + gtk_grid_set_row_spacing(grid,3); + + { + // Host info - GtkGrid version + struct _line + { + const gchar * label; + GtkWidget * widget; + } line[] = + { + { N_( "_Hostname:" ), GTK_WIDGET(host) }, + { N_( "_Port:" ), GTK_WIDGET(port) } + }; + + int f; + int c = 0; + + for(f=0;f