Commit 7f24770a27d486eb20dc01ef6db5a27fbf0f32ff

Authored by perry.werneck@gmail.com
1 parent 4330eeae

Implementando diálogos de transferencia de arquivos

Showing 2 changed files with 175 additions and 67 deletions   Show diff stats
@@ -5,8 +5,8 @@ msgid "" @@ -5,8 +5,8 @@ msgid ""
5 msgstr "" 5 msgstr ""
6 "Project-Id-Version: pw3270 5.0\n" 6 "Project-Id-Version: pw3270 5.0\n"
7 "Report-Msgid-Bugs-To: \n" 7 "Report-Msgid-Bugs-To: \n"
8 -"POT-Creation-Date: 2012-05-08 07:23-0300\n"  
9 -"PO-Revision-Date: 2012-05-08 07:19-0300\n" 8 +"POT-Creation-Date: 2012-05-08 09:06-0300\n"
  9 +"PO-Revision-Date: 2012-05-08 09:03-0300\n"
10 "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" 10 "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n"
11 "Language-Team: Português do Brasil <>\n" 11 "Language-Team: Português do Brasil <>\n"
12 "Language: pt_BR\n" 12 "Language: pt_BR\n"
@@ -123,7 +123,7 @@ msgstr &quot;Ação falhou&quot; @@ -123,7 +123,7 @@ msgstr &quot;Ação falhou&quot;
123 msgid "Add to copy" 123 msgid "Add to copy"
124 msgstr "Adicionar à cópia" 124 msgstr "Adicionar à cópia"
125 125
126 -#: filetransfer.c:182 126 +#: filetransfer.c:190
127 msgid "Add/Remove _CR at end of line" 127 msgid "Add/Remove _CR at end of line"
128 msgstr "Adicionar/Remover _CR no final da linha" 128 msgstr "Adicionar/Remover _CR no final da linha"
129 129
@@ -144,6 +144,11 @@ msgstr &quot;Atributo \&quot;%s\&quot; é invalido ou indefinido&quot; @@ -144,6 +144,11 @@ msgstr &quot;Atributo \&quot;%s\&quot; é invalido ou indefinido&quot;
144 msgid "Auto-Reconnect" 144 msgid "Auto-Reconnect"
145 msgstr "Reconectar automaticamente" 145 msgstr "Reconectar automaticamente"
146 146
  147 +#: filetransfer.c:407
  148 +#, fuzzy
  149 +msgid "Avblock"
  150 +msgstr "Avblock"
  151 +
147 #: colors.c:351 152 #: colors.c:351
148 msgid "Background" 153 msgid "Background"
149 msgstr "Fundo" 154 msgstr "Fundo"
@@ -212,7 +217,7 @@ msgstr &quot;Não foi possível carregar %s&quot; @@ -212,7 +217,7 @@ msgstr &quot;Não foi possível carregar %s&quot;
212 msgid "Can't load file" 217 msgid "Can't load file"
213 msgstr "Não foi possível carregar arquivo" 218 msgstr "Não foi possível carregar arquivo"
214 219
215 -#: ft.c:238 220 +#: ft.c:244
216 msgid "Can't open local file" 221 msgid "Can't open local file"
217 msgstr "Não foi possível abrir arquivo local" 222 msgstr "Não foi possível abrir arquivo local"
218 223
@@ -264,15 +269,15 @@ msgstr &quot;&quot; @@ -264,15 +269,15 @@ msgstr &quot;&quot;
264 msgid "Can't set lib3270 I/O handlers" 269 msgid "Can't set lib3270 I/O handlers"
265 msgstr "Não foi possível registrar manipuladores de I/O 3270" 270 msgstr "Não foi possível registrar manipuladores de I/O 3270"
266 271
267 -#: filetransfer.c:307 272 +#: filetransfer.c:316
268 msgid "Can't start download" 273 msgid "Can't start download"
269 msgstr "Não foi possível iniciar o download" 274 msgstr "Não foi possível iniciar o download"
270 275
271 -#: filetransfer.c:284 276 +#: filetransfer.c:294
272 msgid "Can't start file transfer" 277 msgid "Can't start file transfer"
273 msgstr "Não foi possível iniciar transferência de arquivo" 278 msgstr "Não foi possível iniciar transferência de arquivo"
274 279
275 -#: filetransfer.c:347 280 +#: filetransfer.c:374
276 msgid "Can't start upload" 281 msgid "Can't start upload"
277 msgstr "Não foi possível iniciar upload" 282 msgstr "Não foi possível iniciar upload"
278 283
@@ -348,7 +353,11 @@ msgstr &quot;Atual (%s)&quot; @@ -348,7 +353,11 @@ msgstr &quot;Atual (%s)&quot;
348 msgid "Custom colors" 353 msgid "Custom colors"
349 msgstr "Cores personalizadas" 354 msgstr "Cores personalizadas"
350 355
351 -#: filetransfer.c:231 356 +#: filetransfer.c:406
  357 +msgid "Cylinders"
  358 +msgstr "Cilindros"
  359 +
  360 +#: filetransfer.c:241
352 msgid "DFT B_uffer size:" 361 msgid "DFT B_uffer size:"
353 msgstr "Tamanho do b_uffer DFT:" 362 msgstr "Tamanho do b_uffer DFT:"
354 363
@@ -376,6 +385,15 @@ msgstr &quot;&quot; @@ -376,6 +385,15 @@ msgstr &quot;&quot;
376 msgid "Debug window updates" 385 msgid "Debug window updates"
377 msgstr "" 386 msgstr ""
378 387
  388 +#: filetransfer.c:396 filetransfer.c:404
  389 +#, fuzzy
  390 +msgid "Default"
  391 +msgstr "Default"
  392 +
  393 +#: ft.c:212
  394 +msgid "Disconnected from host"
  395 +msgstr "Desconectado do servidor"
  396 +
379 #: telnet.c:1260 397 #: telnet.c:1260
380 msgid "EOR received when not in 3270 mode, ignored." 398 msgid "EOR received when not in 3270 mode, ignored."
381 msgstr "EOR recebido fora do modo 3270, ignorado." 399 msgstr "EOR recebido fora do modo 3270, ignorado."
@@ -437,18 +455,22 @@ msgstr &quot;&quot; @@ -437,18 +455,22 @@ msgstr &quot;&quot;
437 msgid "Fields" 455 msgid "Fields"
438 msgstr "" 456 msgstr ""
439 457
440 -#: filetransfer.c:287 458 +#: filetransfer.c:297
441 msgid "File transfer error" 459 msgid "File transfer error"
442 msgstr "Erro na transferência de arquivos" 460 msgstr "Erro na transferência de arquivos"
443 461
444 -#: filetransfer.c:307 filetransfer.c:347 ft.c:213 462 +#: filetransfer.c:316 filetransfer.c:374 ft.c:219
445 msgid "File transfer is already active" 463 msgid "File transfer is already active"
446 msgstr "Transferência de arquivos já está ativa" 464 msgstr "Transferência de arquivos já está ativa"
447 465
448 -#: ft.c:220 466 +#: ft.c:226
449 msgid "File transfer is already active in this session" 467 msgid "File transfer is already active in this session"
450 msgstr "Transferência de arquivos já está ativa nesta sessão" 468 msgstr "Transferência de arquivos já está ativa nesta sessão"
451 469
  470 +#: filetransfer.c:397
  471 +msgid "Fixed"
  472 +msgstr "Fixo"
  473 +
452 #: glue.c:327 474 #: glue.c:327
453 msgid "Forces monochrome display" 475 msgid "Forces monochrome display"
454 msgstr "Força tela monocromática" 476 msgstr "Força tela monocromática"
@@ -473,11 +495,11 @@ msgstr &quot;Verde&quot; @@ -473,11 +495,11 @@ msgstr &quot;Verde&quot;
473 msgid "Help" 495 msgid "Help"
474 msgstr "Ajuda" 496 msgstr "Ajuda"
475 497
476 -#: ft.c:461 498 +#: ft.c:467
477 msgid "Host disconnected, transfer cancelled" 499 msgid "Host disconnected, transfer cancelled"
478 -msgstr "Host desconectou, transferência cancelada" 500 +msgstr "Servidor desconectou, transferência cancelada"
479 501
480 -#: filetransfer.c:181 502 +#: filetransfer.c:189
481 msgid "Host is T_SO" 503 msgid "Host is T_SO"
482 msgstr "Servidor é T_SO" 504 msgstr "Servidor é T_SO"
483 505
@@ -563,7 +585,7 @@ msgstr &quot;Normal/Protegido&quot; @@ -563,7 +585,7 @@ msgstr &quot;Normal/Protegido&quot;
563 msgid "Normal/Unprotected" 585 msgid "Normal/Unprotected"
564 msgstr "Normal/Desprotegido" 586 msgstr "Normal/Desprotegido"
565 587
566 -#: ft.c:468 588 +#: ft.c:474
567 msgid "Not in 3270 mode, transfer cancelled" 589 msgid "Not in 3270 mode, transfer cancelled"
568 msgstr "Não está no modo 3270, transferência cancelada" 590 msgstr "Não está no modo 3270, transferência cancelada"
569 591
@@ -669,10 +691,14 @@ msgstr &quot;Púrpura&quot; @@ -669,10 +691,14 @@ msgstr &quot;Púrpura&quot;
669 msgid "Receive file" 691 msgid "Receive file"
670 msgstr "Receber arquivo" 692 msgstr "Receber arquivo"
671 693
672 -#: filetransfer.c:313 694 +#: filetransfer.c:322
673 msgid "Receive file from host" 695 msgid "Receive file from host"
674 msgstr "Receber arquivo do servidor" 696 msgstr "Receber arquivo do servidor"
675 697
  698 +#: filetransfer.c:417
  699 +msgid "Record format"
  700 +msgstr "Formato de registro"
  701 +
676 #: colors.c:353 702 #: colors.c:353
677 msgid "Red" 703 msgid "Red"
678 msgstr "Vermelho" 704 msgstr "Vermelho"
@@ -745,11 +771,11 @@ msgstr &quot;Selecionar tudo&quot; @@ -745,11 +771,11 @@ msgstr &quot;Selecionar tudo&quot;
745 msgid "Select by rectangles" 771 msgid "Select by rectangles"
746 msgstr "Seleção retangular" 772 msgstr "Seleção retangular"
747 773
748 -#: filetransfer.c:86 774 +#: filetransfer.c:94
749 msgid "Select file to receive" 775 msgid "Select file to receive"
750 msgstr "Selecione arquivo a receber" 776 msgstr "Selecione arquivo a receber"
751 777
752 -#: filetransfer.c:86 778 +#: filetransfer.c:94
753 msgid "Select file to send" 779 msgid "Select file to send"
754 msgstr "Selecione arquivo a enviar" 780 msgstr "Selecione arquivo a enviar"
755 781
@@ -773,6 +799,10 @@ msgstr &quot;Frente da seleção&quot; @@ -773,6 +799,10 @@ msgstr &quot;Frente da seleção&quot;
773 msgid "Send file" 799 msgid "Send file"
774 msgstr "Enviar arquivo" 800 msgstr "Enviar arquivo"
775 801
  802 +#: filetransfer.c:380
  803 +msgid "Send file to host"
  804 +msgstr "Enviar arquivo para o servidor"
  805 +
776 #: ui/00default.xml:103 806 #: ui/00default.xml:103
777 msgid "Send/Receive" 807 msgid "Send/Receive"
778 msgstr "Enviar/Receber" 808 msgstr "Enviar/Receber"
@@ -817,6 +847,10 @@ msgstr &quot;Erro ao ler dados da rede&quot; @@ -817,6 +847,10 @@ msgstr &quot;Erro ao ler dados da rede&quot;
817 msgid "Socket write error" 847 msgid "Socket write error"
818 msgstr "Erro ao enviar dados para a rede" 848 msgstr "Erro ao enviar dados para a rede"
819 849
  850 +#: filetransfer.c:418
  851 +msgid "Space allocation units"
  852 +msgstr "Space allocation units"
  853 +
820 #: host.c:351 854 #: host.c:351
821 msgid "Space in LU name" 855 msgid "Space in LU name"
822 msgstr "Espaço no nome da LU" 856 msgstr "Espaço no nome da LU"
@@ -843,7 +877,7 @@ msgstr &quot;O arquivo já existe, substituir?&quot; @@ -843,7 +877,7 @@ msgstr &quot;O arquivo já existe, substituir?&quot;
843 msgid "The name of the default TCP port to connect" 877 msgid "The name of the default TCP port to connect"
844 msgstr "Nome da porta TCP para conectar" 878 msgstr "Nome da porta TCP para conectar"
845 879
846 -#: ft.c:228 880 +#: ft.c:234
847 msgid "The remote file name is invalid" 881 msgid "The remote file name is invalid"
848 msgstr "O nome do arquivo remoto não é válido" 882 msgstr "O nome do arquivo remoto não é válido"
849 883
@@ -894,6 +928,10 @@ msgstr &quot;&quot; @@ -894,6 +928,10 @@ msgstr &quot;&quot;
894 msgid "Track Cursor" 928 msgid "Track Cursor"
895 msgstr "Mostrar posição do cursor" 929 msgstr "Mostrar posição do cursor"
896 930
  931 +#: filetransfer.c:405
  932 +msgid "Tracks"
  933 +msgstr "Trilhas"
  934 +
897 #: ft_cut.c:359 935 #: ft_cut.c:359
898 msgid "Transfer cancelled by host" 936 msgid "Transfer cancelled by host"
899 msgstr "Transferência cancelada pelo servidor" 937 msgstr "Transferência cancelada pelo servidor"
@@ -902,7 +940,7 @@ msgstr &quot;Transferência cancelada pelo servidor&quot; @@ -902,7 +940,7 @@ msgstr &quot;Transferência cancelada pelo servidor&quot;
902 msgid "Transfer cancelled by user" 940 msgid "Transfer cancelled by user"
903 msgstr "Transferência cancelada pelo usuário" 941 msgstr "Transferência cancelada pelo usuário"
904 942
905 -#: filetransfer.c:188 943 +#: filetransfer.c:196
906 msgid "Transfer options" 944 msgid "Transfer options"
907 msgstr "Opções de transferência" 945 msgstr "Opções de transferência"
908 946
@@ -930,10 +968,14 @@ msgstr &quot;Não é possível conectar em servidores seguros&quot; @@ -930,10 +968,14 @@ msgstr &quot;Não é possível conectar em servidores seguros&quot;
930 msgid "Unable to paste text" 968 msgid "Unable to paste text"
931 msgstr "Incapaz de colar texto" 969 msgstr "Incapaz de colar texto"
932 970
933 -#: ft.c:322 971 +#: ft.c:328
934 msgid "Unable to send file-transfer request" 972 msgid "Unable to send file-transfer request"
935 msgstr "Não foi possível enviar a requisição de transferência de arquivo" 973 msgstr "Não foi possível enviar a requisição de transferência de arquivo"
936 974
  975 +#: filetransfer.c:399
  976 +msgid "Undefined"
  977 +msgstr "Indefinido"
  978 +
937 #: uiparser/menubar.c:46 uiparser/toolbar.c:55 uiparser/popup.c:51 979 #: uiparser/menubar.c:46 uiparser/toolbar.c:55 uiparser/popup.c:51
938 #, c-format 980 #, c-format
939 msgid "Unexpected action attribute in <%s>" 981 msgid "Unexpected action attribute in <%s>"
@@ -1016,6 +1058,10 @@ msgstr &quot;Número de porta ou serviço desconhecido: %s&quot; @@ -1016,6 +1058,10 @@ msgstr &quot;Número de porta ou serviço desconhecido: %s&quot;
1016 msgid "Use +/- for field navigation" 1058 msgid "Use +/- for field navigation"
1017 msgstr "Usar teclas +/- para navegar por campos" 1059 msgstr "Usar teclas +/- para navegar por campos"
1018 1060
  1061 +#: filetransfer.c:398
  1062 +msgid "Variable"
  1063 +msgstr "Variável"
  1064 +
1019 #: dialog.c:565 1065 #: dialog.c:565
1020 #, c-format 1066 #, c-format
1021 msgid "Version %s - Revision %s" 1067 msgid "Version %s - Revision %s"
@@ -1093,11 +1139,11 @@ msgstr &quot;X Aguarde&quot; @@ -1093,11 +1139,11 @@ msgstr &quot;X Aguarde&quot;
1093 msgid "Yellow" 1139 msgid "Yellow"
1094 msgstr "Amarelo" 1140 msgstr "Amarelo"
1095 1141
1096 -#: filetransfer.c:183 1142 +#: filetransfer.c:191
1097 msgid "_Append" 1143 msgid "_Append"
1098 msgstr "_Acrescentar" 1144 msgstr "_Acrescentar"
1099 1145
1100 -#: filetransfer.c:154 1146 +#: filetransfer.c:162
1101 msgid "_Browse" 1147 msgid "_Browse"
1102 msgstr "_Procurar" 1148 msgstr "_Procurar"
1103 1149
@@ -1121,7 +1167,7 @@ msgstr &quot;_Arquivo&quot; @@ -1121,7 +1167,7 @@ msgstr &quot;_Arquivo&quot;
1121 msgid "_Font:" 1167 msgid "_Font:"
1122 msgstr "_Fonte:" 1168 msgstr "_Fonte:"
1123 1169
1124 -#: filetransfer.c:114 1170 +#: filetransfer.c:122
1125 msgid "_Host file name:" 1171 msgid "_Host file name:"
1126 msgstr "Arquivo no _Servidor:" 1172 msgstr "Arquivo no _Servidor:"
1127 1173
@@ -1129,7 +1175,7 @@ msgstr &quot;Arquivo no _Servidor:&quot; @@ -1129,7 +1175,7 @@ msgstr &quot;Arquivo no _Servidor:&quot;
1129 msgid "_Hostname:" 1175 msgid "_Hostname:"
1130 msgstr "Nome do _Host:" 1176 msgstr "Nome do _Host:"
1131 1177
1132 -#: filetransfer.c:114 1178 +#: filetransfer.c:122
1133 msgid "_Local file name:" 1179 msgid "_Local file name:"
1134 msgstr "Arquivo _local:" 1180 msgstr "Arquivo _local:"
1135 1181
@@ -1145,16 +1191,15 @@ msgstr &quot;Opções&quot; @@ -1145,16 +1191,15 @@ msgstr &quot;Opções&quot;
1145 msgid "_Port:" 1191 msgid "_Port:"
1146 msgstr "_Porta:" 1192 msgstr "_Porta:"
1147 1193
1148 -#: filetransfer.c:184  
1149 -#, fuzzy 1194 +#: filetransfer.c:192
1150 msgid "_Remap ASCII Characters" 1195 msgid "_Remap ASCII Characters"
1151 -msgstr "_Remap ASCII Characters" 1196 +msgstr "_Remapear caracteres ASCII"
1152 1197
1153 #: dialog.c:295 1198 #: dialog.c:295
1154 msgid "_Secure connection" 1199 msgid "_Secure connection"
1155 msgstr "Conexão _Segura" 1200 msgstr "Conexão _Segura"
1156 1201
1157 -#: filetransfer.c:180 1202 +#: filetransfer.c:188
1158 msgid "_Text file" 1203 msgid "_Text file"
1159 msgstr "Arquivo _texto" 1204 msgstr "Arquivo _texto"
1160 1205
src/pw3270/filetransfer.c
@@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
43 const gchar * name; 43 const gchar * name;
44 GtkWidget * dialog; 44 GtkWidget * dialog;
45 GtkEntry * file[2]; 45 GtkEntry * file[2];
46 - GtkEntry * dft; 46 + GtkEntry * parm[5];
47 }; 47 };
48 48
49 struct ftoption 49 struct ftoption
@@ -125,6 +125,8 @@ static void add_file_fields(GObject *action, struct ftdialog *dlg) @@ -125,6 +125,8 @@ static void add_file_fields(GObject *action, struct ftdialog *dlg)
125 GtkWidget * widget; 125 GtkWidget * widget;
126 int f; 126 int f;
127 127
  128 + gtk_container_set_border_width(GTK_CONTAINER(table),2);
  129 +
128 for(f=0;f<2;f++) 130 for(f=0;f<2;f++)
129 { 131 {
130 const gchar *val; 132 const gchar *val;
@@ -242,45 +244,71 @@ static void setup_dft(GObject *action, struct ftdialog *dlg, GtkWidget **label) @@ -242,45 +244,71 @@ static void setup_dft(GObject *action, struct ftdialog *dlg, GtkWidget **label)
242 244
243 gtk_misc_set_alignment(GTK_MISC(*label),0,.5); 245 gtk_misc_set_alignment(GTK_MISC(*label),0,.5);
244 246
245 - dlg->dft = GTK_ENTRY(gtk_entry_new());  
246 - gtk_entry_set_max_length(dlg->dft,10);  
247 - gtk_entry_set_width_chars(dlg->dft,10);  
248 -  
249 - gtk_label_set_mnemonic_widget(GTK_LABEL(*label),GTK_WIDGET(dlg->dft));  
250 -  
251 - if(val)  
252 - {  
253 - gtk_entry_set_text(dlg->dft,val);  
254 - }  
255 - else  
256 - {  
257 - val = get_string_from_config(dlg->name,"dft","");  
258 - gtk_entry_set_text(dlg->dft,val);  
259 - g_free(val);  
260 - } 247 + dlg->parm[4] = GTK_ENTRY(gtk_entry_new());
  248 + gtk_widget_set_name(GTK_WIDGET(dlg->parm[4]),"dftsize");
  249 + gtk_entry_set_max_length(dlg->parm[4],10);
  250 + gtk_entry_set_width_chars(dlg->parm[4],10);
261 251
  252 + gtk_label_set_mnemonic_widget(GTK_LABEL(*label),GTK_WIDGET(dlg->parm[4]));
262 253
263 } 254 }
264 255
265 -static gboolean run_ft_dialog(GtkWidget *widget, struct ftdialog *dlg) 256 +static gboolean run_ft_dialog(GObject *action, GtkWidget *widget, struct ftdialog *dlg)
266 { 257 {
267 H3270FT * ft = NULL; 258 H3270FT * ft = NULL;
268 const char * msg = NULL; 259 const char * msg = NULL;
  260 + int f;
  261 + int parm[G_N_ELEMENTS(dlg->parm)];
269 262
270 gtk_widget_show_all(dlg->dialog); 263 gtk_widget_show_all(dlg->dialog);
271 264
  265 + for(f=0;f<G_N_ELEMENTS(dlg->parm);f++)
  266 + {
  267 + if(dlg->parm[f])
  268 + {
  269 + const gchar *name = gtk_widget_get_name(GTK_WIDGET(dlg->parm[f]));
  270 + const gchar *attr = g_object_get_data(action,name);
  271 + if(attr)
  272 + {
  273 + gtk_entry_set_text(dlg->parm[f],attr);
  274 + }
  275 + else
  276 + {
  277 + gchar *ptr = get_string_from_config(dlg->name,name,"");
  278 + gtk_entry_set_text(dlg->parm[f],ptr);
  279 + g_free(ptr);
  280 + }
  281 + }
  282 + }
  283 +
272 if(gtk_dialog_run(GTK_DIALOG(dlg->dialog)) != GTK_RESPONSE_ACCEPT) 284 if(gtk_dialog_run(GTK_DIALOG(dlg->dialog)) != GTK_RESPONSE_ACCEPT)
273 return FALSE; 285 return FALSE;
274 286
  287 + for(f=0;f<G_N_ELEMENTS(dlg->parm);f++)
  288 + {
  289 + if(dlg->parm[f])
  290 + {
  291 + parm[f] = atoi(gtk_entry_get_text(dlg->parm[f]));
  292 + set_string_to_config(dlg->name,gtk_widget_get_name(GTK_WIDGET(dlg->parm[f])),"%d",parm[f]);
  293 + }
  294 + else
  295 + {
  296 + parm[f] = 0;
  297 + }
  298 + }
  299 +
  300 + set_string_to_config(dlg->name,"local","%s",gtk_entry_get_text(dlg->file[0]));
  301 + set_string_to_config(dlg->name,"remote","%s",gtk_entry_get_text(dlg->file[1]));
  302 +
275 ft = lib3270_ft_start( v3270_get_session(widget), 303 ft = lib3270_ft_start( v3270_get_session(widget),
276 dlg->option, 304 dlg->option,
277 gtk_entry_get_text(dlg->file[0]), 305 gtk_entry_get_text(dlg->file[0]),
278 gtk_entry_get_text(dlg->file[1]), 306 gtk_entry_get_text(dlg->file[1]),
279 - 0,  
280 - 0,  
281 - 0,  
282 - 0,  
283 - atoi(gtk_entry_get_text(dlg->dft)), 307 + parm[0], // lrecl
  308 + parm[2], // blksize
  309 + parm[1], // primspace
  310 + parm[3], // secspace
  311 + parm[4], // dft
284 &msg ); 312 &msg );
285 313
286 trace("%s ft=%p msg=%p",__FUNCTION__,ft,&msg); 314 trace("%s ft=%p msg=%p",__FUNCTION__,ft,&msg);
@@ -326,7 +354,7 @@ void download_action(GtkAction *action, GtkWidget *widget) @@ -326,7 +354,7 @@ void download_action(GtkAction *action, GtkWidget *widget)
326 GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, \ 354 GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, \
327 NULL ); 355 NULL );
328 356
329 - dlg.name = "download"; 357 + dlg.name = gtk_action_get_name(action);
330 dlg.option = LIB3270_FT_OPTION_RECEIVE; 358 dlg.option = LIB3270_FT_OPTION_RECEIVE;
331 add_file_fields(G_OBJECT(action),&dlg); 359 add_file_fields(G_OBJECT(action),&dlg);
332 add_transfer_options(G_OBJECT(action),&dlg); 360 add_transfer_options(G_OBJECT(action),&dlg);
@@ -336,14 +364,16 @@ void download_action(GtkAction *action, GtkWidget *widget) @@ -336,14 +364,16 @@ void download_action(GtkAction *action, GtkWidget *widget)
336 GtkWidget *hbox = gtk_hbox_new(FALSE,2); 364 GtkWidget *hbox = gtk_hbox_new(FALSE,2);
337 GtkWidget *label = NULL; 365 GtkWidget *label = NULL;
338 366
  367 + gtk_container_set_border_width(GTK_CONTAINER(hbox),4);
  368 +
339 setup_dft(G_OBJECT(action),&dlg,&label); 369 setup_dft(G_OBJECT(action),&dlg,&label);
340 370
341 gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0); 371 gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0);
342 - gtk_box_pack_start(GTK_BOX(hbox),GTK_WIDGET(dlg.dft),FALSE,FALSE,0); 372 + gtk_box_pack_start(GTK_BOX(hbox),GTK_WIDGET(dlg.parm[4]),FALSE,FALSE,0);
343 gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg.dialog))),hbox,FALSE,FALSE,2); 373 gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg.dialog))),hbox,FALSE,FALSE,2);
344 } 374 }
345 375
346 - run_ft_dialog(widget,&dlg); 376 + run_ft_dialog(G_OBJECT(action),widget,&dlg);
347 377
348 gtk_widget_destroy(dlg.dialog); 378 gtk_widget_destroy(dlg.dialog);
349 379
@@ -384,7 +414,7 @@ void upload_action(GtkAction *action, GtkWidget *widget) @@ -384,7 +414,7 @@ void upload_action(GtkAction *action, GtkWidget *widget)
384 GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, \ 414 GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, \
385 NULL ); 415 NULL );
386 416
387 - dlg.name = "upload"; 417 + dlg.name = gtk_action_get_name(action);
388 dlg.option = LIB3270_FT_OPTION_SEND; 418 dlg.option = LIB3270_FT_OPTION_SEND;
389 add_file_fields(G_OBJECT(action),&dlg); 419 add_file_fields(G_OBJECT(action),&dlg);
390 add_transfer_options(G_OBJECT(action),&dlg); 420 add_transfer_options(G_OBJECT(action),&dlg);
@@ -454,27 +484,60 @@ void upload_action(GtkAction *action, GtkWidget *widget) @@ -454,27 +484,60 @@ void upload_action(GtkAction *action, GtkWidget *widget)
454 gtk_box_pack_start(GTK_BOX(box),frame,TRUE,TRUE,2); 484 gtk_box_pack_start(GTK_BOX(box),frame,TRUE,TRUE,2);
455 } 485 }
456 486
  487 + gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg.dialog))),box,TRUE,TRUE,2);
  488 + }
457 489
  490 + {
  491 + // Add options
  492 + static const struct _fld
  493 + {
  494 + const gchar *name;
  495 + const gchar *label;
  496 + }
  497 + fld[] = { { "lrecl", N_( "LRECL:" ) },
  498 + { "primary", N_( "Primary space:" ) },
  499 + { "blksize", N_( "BLKSIZE:" ) },
  500 + { "secondary", N_( "Secondary space:" ) },
  501 + { "dftsize", N_( "DFT B_uffer size:" ) }
  502 + };
458 503
  504 + GtkTable * table = GTK_TABLE(gtk_table_new(2,2,FALSE));
459 505
460 - gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg.dialog))),box,TRUE,TRUE,2);  
461 - } 506 + int row, col, f;
462 507
  508 + gtk_container_set_border_width(GTK_CONTAINER(table),2);
463 509
  510 + row=0;
  511 + col=0;
  512 + for(f=0;f < 5;f++)
  513 + {
  514 + GtkWidget *label = gtk_label_new_with_mnemonic(gettext(fld[f].label));
464 515
465 - {  
466 - // Add dft option  
467 - GtkWidget *hbox = gtk_hbox_new(FALSE,2);  
468 - GtkWidget *label = NULL; 516 + gtk_misc_set_alignment(GTK_MISC(label),0,.5);
  517 + dlg.parm[f] = GTK_ENTRY(gtk_entry_new());
  518 +
  519 + gtk_widget_set_name(GTK_WIDGET(dlg.parm[f]),fld[f].name);
  520 +
  521 + gtk_label_set_mnemonic_widget(GTK_LABEL(label),GTK_WIDGET(dlg.parm[f]));
  522 +
  523 + gtk_table_attach(table,label,col,col+1,row,row+1,GTK_EXPAND|GTK_SHRINK|GTK_FILL,GTK_EXPAND|GTK_SHRINK|GTK_FILL,2,2);
  524 + gtk_table_attach(table,GTK_WIDGET(dlg.parm[f]),col+1,col+2,row,row+1,GTK_EXPAND|GTK_SHRINK|GTK_FILL,GTK_EXPAND|GTK_SHRINK|GTK_FILL,2,2);
  525 +
  526 + col += 2;
  527 + if(col++ > 3)
  528 + {
  529 + row++;
  530 + col=0;
  531 + }
  532 +
  533 + }
  534 +
  535 + gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg.dialog))),GTK_WIDGET(table),TRUE,TRUE,2);
469 536
470 - setup_dft(G_OBJECT(action),&dlg,&label);  
471 537
472 - gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0);  
473 - gtk_box_pack_start(GTK_BOX(hbox),GTK_WIDGET(dlg.dft),FALSE,FALSE,0);  
474 - gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg.dialog))),hbox,FALSE,FALSE,2);  
475 } 538 }
476 539
477 - run_ft_dialog(widget,&dlg); 540 + run_ft_dialog(G_OBJECT(action),widget,&dlg);
478 541
479 gtk_widget_destroy(dlg.dialog); 542 gtk_widget_destroy(dlg.dialog);
480 543