Commit 3557e3cb8cf8e80b120a809dca38047a33cf96f8
1 parent
3df8901e
Exists in
master
and in
5 other branches
Implementando novo diálogo para seleção de servidor
Showing
2 changed files
with
35 additions
and
8 deletions
Show diff stats
src/lib3270/connect.c
| ... | ... | @@ -95,11 +95,14 @@ static void net_connected(H3270 *hSession) |
| 95 | 95 | } |
| 96 | 96 | else if(err) |
| 97 | 97 | { |
| 98 | + char buffer[4096]; | |
| 99 | + snprintf(buffer,4095,_( "Can't connect to %s" ), hSession->host.current ); | |
| 100 | + | |
| 98 | 101 | lib3270_disconnect(hSession); |
| 99 | 102 | lib3270_popup_dialog( hSession, |
| 100 | 103 | LIB3270_NOTIFY_ERROR, |
| 101 | - _( "Network error" ), | |
| 102 | - _( "Unable to connect to host." ), | |
| 104 | + _( "Connection failed" ), | |
| 105 | + buffer, | |
| 103 | 106 | #ifdef _WIN32 |
| 104 | 107 | _( "%s"), lib3270_win32_strerror(err) |
| 105 | 108 | #else | ... | ... |
src/pw3270/v3270/hostselect.c
| ... | ... | @@ -34,15 +34,14 @@ |
| 34 | 34 | |
| 35 | 35 | static const struct _host_type |
| 36 | 36 | { |
| 37 | - const gchar * name; | |
| 38 | 37 | const gchar * description; |
| 39 | 38 | LIB3270_OPTION option; |
| 40 | 39 | } host_type[] = |
| 41 | 40 | { |
| 42 | - { "S390", N_( "IBM S/390" ), LIB3270_OPTION_S390 }, | |
| 43 | - { "AS400", N_( "IBM AS/400" ), LIB3270_OPTION_AS400 }, | |
| 44 | - { "TSO", N_( "Other (TSO)" ), LIB3270_OPTION_TSO }, | |
| 45 | - { "VM/CMS", N_( "Other (VM/CMS)" ), 0 } | |
| 41 | + { N_( "IBM S/390" ), LIB3270_OPTION_S390 }, | |
| 42 | + { N_( "IBM AS/400" ), LIB3270_OPTION_AS400 }, | |
| 43 | + { N_( "Other (TSO)" ), LIB3270_OPTION_TSO }, | |
| 44 | + { N_( "Other (VM/CMS)" ), 0 } | |
| 46 | 45 | }; |
| 47 | 46 | |
| 48 | 47 | static const struct _colortable |
| ... | ... | @@ -276,7 +275,32 @@ static void V3270HostSelectWidget_init(V3270HostSelectWidget *widget) |
| 276 | 275 | gtk_table_set_row_spacings(grid,5); |
| 277 | 276 | gtk_table_set_col_spacings(grid,5); |
| 278 | 277 | |
| 279 | - #error Implementar | |
| 278 | + gtk_table_attach(grid,label[ENTRY_HOSTNAME],0,1,0,1,GTK_FILL,GTK_FILL,0,0); | |
| 279 | + gtk_table_attach(grid,GTK_WIDGET(widget->entry[ENTRY_HOSTNAME]),1,2,0,1,GTK_EXPAND|GTK_FILL,GTK_EXPAND|GTK_FILL,0,0); | |
| 280 | + | |
| 281 | + gtk_table_attach(grid,label[ENTRY_SRVCNAME],2,3,0,1,GTK_FILL,GTK_FILL,0,0); | |
| 282 | + gtk_table_attach(grid,GTK_WIDGET(widget->entry[ENTRY_SRVCNAME]),3,4,0,1,GTK_FILL,GTK_FILL,0,0); | |
| 283 | + | |
| 284 | + gtk_table_attach(grid,GTK_WIDGET(widget->ssl),1,2,1,2,GTK_FILL,GTK_FILL,0,0); | |
| 285 | + | |
| 286 | + { | |
| 287 | + GtkTable * opt = GTK_TABLE(gtk_table_new(G_N_ELEMENTS(comboLabel),2,FALSE)); | |
| 288 | + gtk_table_set_row_spacings(opt,5); | |
| 289 | + gtk_table_set_col_spacings(opt,5); | |
| 290 | + | |
| 291 | + for(f=0;f<G_N_ELEMENTS(comboLabel);f++) | |
| 292 | + { | |
| 293 | + GtkWidget *label = gtk_label_new_with_mnemonic(gettext(comboLabel[f])); | |
| 294 | + gtk_misc_set_alignment(GTK_MISC(label),0,0.5); | |
| 295 | + | |
| 296 | + gtk_table_attach(opt,label,0,1,f,f+1,GTK_FILL,GTK_FILL,0,0); | |
| 297 | + gtk_table_attach(opt,GTK_WIDGET(widget->combo[f]),1,2,f,f+1,GTK_FILL,GTK_FILL,0,0); | |
| 298 | + } | |
| 299 | + | |
| 300 | + gtk_container_add(GTK_CONTAINER(expander),GTK_WIDGET(opt)); | |
| 301 | + } | |
| 302 | + gtk_table_attach(grid,GTK_WIDGET(expander),1,2,2,3,GTK_FILL,GTK_FILL,0,0); | |
| 303 | + | |
| 280 | 304 | |
| 281 | 305 | #endif // GTK_CHECK_VERSION |
| 282 | 306 | ... | ... |