Commit 80670b469deb3da9ba7973e6a95405adaffea607
1 parent
868f86d8
Exists in
master
and in
5 other branches
Corrigindo diálogo de "paste text file" no windows.
Showing
5 changed files
with
102 additions
and
38 deletions
Show diff stats
locale/pt_BR.po
| ... | ... | @@ -5,7 +5,7 @@ msgid "" |
| 5 | 5 | msgstr "" |
| 6 | 6 | "Project-Id-Version: pw3270 5.0\n" |
| 7 | 7 | "Report-Msgid-Bugs-To: \n" |
| 8 | -"POT-Creation-Date: 2017-08-10 10:21-0300\n" | |
| 8 | +"POT-Creation-Date: 2017-08-21 09:51-0300\n" | |
| 9 | 9 | "PO-Revision-Date: 2017-02-15 17:08-0200\n" |
| 10 | 10 | "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" |
| 11 | 11 | "Language-Team: Português <perry.werneck@gmail.com>\n" |
| ... | ... | @@ -119,7 +119,7 @@ msgstr "Alerta 3270" |
| 119 | 119 | msgid "3270 screen" |
| 120 | 120 | msgstr "Tela 3270" |
| 121 | 121 | |
| 122 | -#: dialog.c:523 | |
| 122 | +#: dialog.c:531 | |
| 123 | 123 | #, c-format |
| 124 | 124 | msgid "3270 terminal emulator for GTK %d.%d" |
| 125 | 125 | msgstr "Emulador 3270 para GTK+ %d.%d" |
| ... | ... | @@ -363,7 +363,7 @@ msgstr "Azul" |
| 363 | 363 | msgid "Bold" |
| 364 | 364 | msgstr "Negrito" |
| 365 | 365 | |
| 366 | -#: dialog.c:530 | |
| 366 | +#: dialog.c:538 | |
| 367 | 367 | msgid "Brazilian Public Software Portal" |
| 368 | 368 | msgstr "Portal do Software Público Brasileiro" |
| 369 | 369 | |
| ... | ... | @@ -419,6 +419,11 @@ msgstr "Não foi possível conectar a %s" |
| 419 | 419 | msgid "Can't connect to %s:%s" |
| 420 | 420 | msgstr "Não foi possível conectar a %s:%s" |
| 421 | 421 | |
| 422 | +#: main.c:70 | |
| 423 | +#, fuzzy | |
| 424 | +msgid "Can't connect to DBUS server" | |
| 425 | +msgstr "Não foi possível conectar a %s" | |
| 426 | + | |
| 422 | 427 | #: selection.c:425 |
| 423 | 428 | #, c-format |
| 424 | 429 | msgid "Can't convert line %d from %s to %s" |
| ... | ... | @@ -433,6 +438,10 @@ msgstr "Recortar não permitido em seleção retangular" |
| 433 | 438 | msgid "Can't determine value for environment variable \"%s\" " |
| 434 | 439 | msgstr "Não consigo determinar o valor da variável de ambiente \"%s\" " |
| 435 | 440 | |
| 441 | +#: main.c:115 | |
| 442 | +msgid "Can't get DBUS object name" | |
| 443 | +msgstr "" | |
| 444 | + | |
| 436 | 445 | #: ft.c:413 |
| 437 | 446 | msgid "Can't get file size" |
| 438 | 447 | msgstr "Não foi possível obter o tamanho do arquivo" |
| ... | ... | @@ -654,6 +663,11 @@ msgstr "Configurar host" |
| 654 | 663 | msgid "Connect on startup" |
| 655 | 664 | msgstr "Conectar ao iniciar" |
| 656 | 665 | |
| 666 | +#: gobject.c:205 | |
| 667 | +#, fuzzy | |
| 668 | +msgid "Connecting to host" | |
| 669 | +msgstr "Não foi possível conectar ao servidor" | |
| 670 | + | |
| 657 | 671 | #: connect.c:215 connect.c:311 connect.c:320 connect.c:382 connect.c:397 |
| 658 | 672 | #: connect.c:413 connect.c:427 connect.c:447 connect.c:461 connect.c:477 |
| 659 | 673 | #: connect.c:573 |
| ... | ... | @@ -1353,10 +1367,6 @@ msgstr "Colar próximo" |
| 1353 | 1367 | msgid "Paste text file" |
| 1354 | 1368 | msgstr "Colar arquivo texto" |
| 1355 | 1369 | |
| 1356 | -#: dialog.c:428 | |
| 1357 | -msgid "Paste text file contents" | |
| 1358 | -msgstr "Colar conteúdo de arquivo texto" | |
| 1359 | - | |
| 1360 | 1370 | #: toggles.c:128 00default.xml:120 |
| 1361 | 1371 | msgid "Paste with left margin" |
| 1362 | 1372 | msgstr "Colar com margem esquerda" |
| ... | ... | @@ -1913,6 +1923,11 @@ msgstr "Iniciar transferência de arquivo" |
| 1913 | 1923 | msgid "Starting" |
| 1914 | 1924 | msgstr "Iniciando" |
| 1915 | 1925 | |
| 1926 | +#: gobject.c:193 | |
| 1927 | +#, c-format | |
| 1928 | +msgid "State %04d can't accept requests" | |
| 1929 | +msgstr "" | |
| 1930 | + | |
| 1916 | 1931 | #: security.c:237 |
| 1917 | 1932 | msgid "Subject issuer mismatch" |
| 1918 | 1933 | msgstr "Divergência na identidade do emissor" |
| ... | ... | @@ -2175,7 +2190,7 @@ msgstr "Não encontrei configuração para a tabela de caracteres \"%s\"" |
| 2175 | 2190 | msgid "This is a host program error." |
| 2176 | 2191 | msgstr "Este é um erro no programa do host." |
| 2177 | 2192 | |
| 2178 | -#: dialog.c:472 | |
| 2193 | +#: dialog.c:480 | |
| 2179 | 2194 | msgid "" |
| 2180 | 2195 | "This program is free software; you can redistribute it and/or modify it " |
| 2181 | 2196 | "under the terms of the GNU General Public License as published by the Free " |
| ... | ... | @@ -2398,6 +2413,11 @@ msgstr "Valor de cor inválido ou inesperado: \"%s\"" |
| 2398 | 2413 | msgid "Unexpected or unknown security status" |
| 2399 | 2414 | msgstr "Estado de segurança inesperado ou desconhecido." |
| 2400 | 2415 | |
| 2416 | +#: gobject.c:208 | |
| 2417 | +#, fuzzy, c-format | |
| 2418 | +msgid "Unexpected state %04d" | |
| 2419 | +msgstr "Alvo inesperado \"%s\"" | |
| 2420 | + | |
| 2401 | 2421 | #: actions.c:391 |
| 2402 | 2422 | #, c-format |
| 2403 | 2423 | msgid "Unexpected target \"%s\"" |
| ... | ... | @@ -2460,7 +2480,7 @@ msgstr "Use the keys +/- from keypad to select editable fields" |
| 2460 | 2480 | msgid "Variable" |
| 2461 | 2481 | msgstr "Variável" |
| 2462 | 2482 | |
| 2463 | -#: dialog.c:513 dialog.c:515 | |
| 2483 | +#: dialog.c:521 dialog.c:523 | |
| 2464 | 2484 | #, c-format |
| 2465 | 2485 | msgid "Version %s-%s" |
| 2466 | 2486 | msgstr "Versão %s-%s" |
| ... | ... | @@ -2742,7 +2762,7 @@ msgstr "ioctlsocket(FIONBIO) failed." |
| 2742 | 2762 | msgid "setsockopt(SO_OOBINLINE) has failed" |
| 2743 | 2763 | msgstr "setsockopt(SO_OOBINLINE) has failed" |
| 2744 | 2764 | |
| 2745 | -#: dialog.c:533 | |
| 2765 | +#: dialog.c:541 | |
| 2746 | 2766 | msgid "translator-credits" |
| 2747 | 2767 | msgstr "translator-credits" |
| 2748 | 2768 | |
| ... | ... | @@ -2802,10 +2822,6 @@ msgstr "translator-credits" |
| 2802 | 2822 | #~ "32768. Valores maiores trazem maior performance, porem, nem todos os " |
| 2803 | 2823 | #~ "hosts podem suportá-los." |
| 2804 | 2824 | |
| 2805 | -#, fuzzy | |
| 2806 | -#~ msgid "Can't connect to DBUS server" | |
| 2807 | -#~ msgstr "Não foi possível conectar a %s" | |
| 2808 | - | |
| 2809 | 2825 | #~ msgid "Can't start download." |
| 2810 | 2826 | #~ msgstr "Não foi possível iniciar o download." |
| 2811 | 2827 | |
| ... | ... | @@ -2842,10 +2858,6 @@ msgstr "translator-credits" |
| 2842 | 2858 | #~ msgid "Complete" |
| 2843 | 2859 | #~ msgstr "Completo" |
| 2844 | 2860 | |
| 2845 | -#, fuzzy | |
| 2846 | -#~ msgid "Connecting to host" | |
| 2847 | -#~ msgstr "Não foi possível conectar ao servidor" | |
| 2848 | - | |
| 2849 | 2861 | #~ msgid "Copiar tudo" |
| 2850 | 2862 | #~ msgstr "Copiar tudo" |
| 2851 | 2863 | |
| ... | ... | @@ -2990,6 +3002,9 @@ msgstr "translator-credits" |
| 2990 | 3002 | #~ msgid "Passthru Proxy: send error" |
| 2991 | 3003 | #~ msgstr "Passthru Proxy: Erro ao enviar" |
| 2992 | 3004 | |
| 3005 | +#~ msgid "Paste text file contents" | |
| 3006 | +#~ msgstr "Colar conteúdo de arquivo texto" | |
| 3007 | + | |
| 2993 | 3008 | #~ msgid "Proxy server (type:host[:port])" |
| 2994 | 3009 | #~ msgstr "Servidor proxy (tipo:nome[:port])" |
| 2995 | 3010 | |
| ... | ... | @@ -3208,10 +3223,6 @@ msgstr "translator-credits" |
| 3208 | 3223 | #~ msgid "Unexpected element <%s>" |
| 3209 | 3224 | #~ msgstr "Elemento <%s> inesperado" |
| 3210 | 3225 | |
| 3211 | -#, fuzzy | |
| 3212 | -#~ msgid "Unexpected state %04d" | |
| 3213 | -#~ msgstr "Alvo inesperado \"%s\"" | |
| 3214 | - | |
| 3215 | 3226 | #~ msgid "" |
| 3216 | 3227 | #~ "Unknown host:\n" |
| 3217 | 3228 | #~ "%s" | ... | ... |
locale/pw3270.pot
| ... | ... | @@ -9,7 +9,7 @@ msgstr "" |
| 9 | 9 | "#-#-#-#-# lib3270.pot (PACKAGE VERSION) #-#-#-#-#\n" |
| 10 | 10 | "Project-Id-Version: PACKAGE VERSION\n" |
| 11 | 11 | "Report-Msgid-Bugs-To: \n" |
| 12 | -"POT-Creation-Date: 2017-08-16 15:19-0300\n" | |
| 12 | +"POT-Creation-Date: 2017-08-21 09:51-0300\n" | |
| 13 | 13 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 14 | 14 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 15 | 15 | "Language-Team: LANGUAGE <LL@li.org>\n" |
| ... | ... | @@ -20,7 +20,7 @@ msgstr "" |
| 20 | 20 | "#-#-#-#-# pw3270.pot (PACKAGE VERSION) #-#-#-#-#\n" |
| 21 | 21 | "Project-Id-Version: PACKAGE VERSION\n" |
| 22 | 22 | "Report-Msgid-Bugs-To: \n" |
| 23 | -"POT-Creation-Date: 2017-08-16 15:19-0300\n" | |
| 23 | +"POT-Creation-Date: 2017-08-21 09:51-0300\n" | |
| 24 | 24 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 25 | 25 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 26 | 26 | "Language-Team: LANGUAGE <LL@li.org>\n" |
| ... | ... | @@ -39,6 +39,17 @@ msgstr "" |
| 39 | 39 | "MIME-Version: 1.0\n" |
| 40 | 40 | "Content-Type: text/plain; charset=CHARSET\n" |
| 41 | 41 | "Content-Transfer-Encoding: 8bit\n" |
| 42 | +"#-#-#-#-# dbus3270.pot (PACKAGE VERSION) #-#-#-#-#\n" | |
| 43 | +"Project-Id-Version: PACKAGE VERSION\n" | |
| 44 | +"Report-Msgid-Bugs-To: \n" | |
| 45 | +"POT-Creation-Date: 2017-08-21 09:51-0300\n" | |
| 46 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
| 47 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
| 48 | +"Language-Team: LANGUAGE <LL@li.org>\n" | |
| 49 | +"Language: \n" | |
| 50 | +"MIME-Version: 1.0\n" | |
| 51 | +"Content-Type: text/plain; charset=CHARSET\n" | |
| 52 | +"Content-Transfer-Encoding: 8bit\n" | |
| 42 | 53 | |
| 43 | 54 | #: window.c:329 |
| 44 | 55 | #, c-format |
| ... | ... | @@ -140,7 +151,7 @@ msgstr "" |
| 140 | 151 | msgid "3270 screen" |
| 141 | 152 | msgstr "" |
| 142 | 153 | |
| 143 | -#: dialog.c:523 | |
| 154 | +#: dialog.c:531 | |
| 144 | 155 | #, c-format |
| 145 | 156 | msgid "3270 terminal emulator for GTK %d.%d" |
| 146 | 157 | msgstr "" |
| ... | ... | @@ -368,7 +379,7 @@ msgstr "" |
| 368 | 379 | msgid "Bold" |
| 369 | 380 | msgstr "" |
| 370 | 381 | |
| 371 | -#: dialog.c:530 | |
| 382 | +#: dialog.c:538 | |
| 372 | 383 | msgid "Brazilian Public Software Portal" |
| 373 | 384 | msgstr "" |
| 374 | 385 | |
| ... | ... | @@ -424,6 +435,10 @@ msgstr "" |
| 424 | 435 | msgid "Can't connect to %s:%s" |
| 425 | 436 | msgstr "" |
| 426 | 437 | |
| 438 | +#: main.c:70 | |
| 439 | +msgid "Can't connect to DBUS server" | |
| 440 | +msgstr "" | |
| 441 | + | |
| 427 | 442 | #: selection.c:425 |
| 428 | 443 | #, c-format |
| 429 | 444 | msgid "Can't convert line %d from %s to %s" |
| ... | ... | @@ -438,6 +453,10 @@ msgstr "" |
| 438 | 453 | msgid "Can't determine value for environment variable \"%s\" " |
| 439 | 454 | msgstr "" |
| 440 | 455 | |
| 456 | +#: main.c:115 | |
| 457 | +msgid "Can't get DBUS object name" | |
| 458 | +msgstr "" | |
| 459 | + | |
| 441 | 460 | #: ft.c:413 |
| 442 | 461 | msgid "Can't get file size" |
| 443 | 462 | msgstr "" |
| ... | ... | @@ -647,6 +666,10 @@ msgstr "" |
| 647 | 666 | msgid "Connect on startup" |
| 648 | 667 | msgstr "" |
| 649 | 668 | |
| 669 | +#: gobject.c:205 | |
| 670 | +msgid "Connecting to host" | |
| 671 | +msgstr "" | |
| 672 | + | |
| 650 | 673 | #: connect.c:215 connect.c:311 connect.c:320 connect.c:382 connect.c:397 |
| 651 | 674 | #: connect.c:413 connect.c:427 connect.c:447 connect.c:461 connect.c:477 |
| 652 | 675 | #: connect.c:573 |
| ... | ... | @@ -1321,10 +1344,6 @@ msgstr "" |
| 1321 | 1344 | msgid "Paste text file" |
| 1322 | 1345 | msgstr "" |
| 1323 | 1346 | |
| 1324 | -#: dialog.c:428 | |
| 1325 | -msgid "Paste text file contents" | |
| 1326 | -msgstr "" | |
| 1327 | - | |
| 1328 | 1347 | #: toggles.c:128 00default.xml:120 |
| 1329 | 1348 | msgid "Paste with left margin" |
| 1330 | 1349 | msgstr "" |
| ... | ... | @@ -1861,6 +1880,11 @@ msgstr "" |
| 1861 | 1880 | msgid "Starting" |
| 1862 | 1881 | msgstr "" |
| 1863 | 1882 | |
| 1883 | +#: gobject.c:193 | |
| 1884 | +#, c-format | |
| 1885 | +msgid "State %04d can't accept requests" | |
| 1886 | +msgstr "" | |
| 1887 | + | |
| 1864 | 1888 | #: security.c:237 |
| 1865 | 1889 | msgid "Subject issuer mismatch" |
| 1866 | 1890 | msgstr "" |
| ... | ... | @@ -2082,7 +2106,7 @@ msgstr "" |
| 2082 | 2106 | msgid "This is a host program error." |
| 2083 | 2107 | msgstr "" |
| 2084 | 2108 | |
| 2085 | -#: dialog.c:472 | |
| 2109 | +#: dialog.c:480 | |
| 2086 | 2110 | msgid "" |
| 2087 | 2111 | "This program is free software; you can redistribute it and/or modify it " |
| 2088 | 2112 | "under the terms of the GNU General Public License as published by the Free " |
| ... | ... | @@ -2292,6 +2316,11 @@ msgstr "" |
| 2292 | 2316 | msgid "Unexpected or unknown security status" |
| 2293 | 2317 | msgstr "" |
| 2294 | 2318 | |
| 2319 | +#: gobject.c:208 | |
| 2320 | +#, c-format | |
| 2321 | +msgid "Unexpected state %04d" | |
| 2322 | +msgstr "" | |
| 2323 | + | |
| 2295 | 2324 | #: actions.c:391 |
| 2296 | 2325 | #, c-format |
| 2297 | 2326 | msgid "Unexpected target \"%s\"" |
| ... | ... | @@ -2354,7 +2383,7 @@ msgstr "" |
| 2354 | 2383 | msgid "Variable" |
| 2355 | 2384 | msgstr "" |
| 2356 | 2385 | |
| 2357 | -#: dialog.c:513 dialog.c:515 | |
| 2386 | +#: dialog.c:521 dialog.c:523 | |
| 2358 | 2387 | #, c-format |
| 2359 | 2388 | msgid "Version %s-%s" |
| 2360 | 2389 | msgstr "" |
| ... | ... | @@ -2618,6 +2647,6 @@ msgstr "" |
| 2618 | 2647 | msgid "setsockopt(SO_OOBINLINE) has failed" |
| 2619 | 2648 | msgstr "" |
| 2620 | 2649 | |
| 2621 | -#: dialog.c:533 | |
| 2650 | +#: dialog.c:541 | |
| 2622 | 2651 | msgid "translator-credits" |
| 2623 | 2652 | msgstr "" | ... | ... |
src/include/pw3270.h
| ... | ... | @@ -84,7 +84,7 @@ |
| 84 | 84 | |
| 85 | 85 | LIB3270_EXPORT gchar * pw3270_get_datadir(const gchar *first_element, ...); |
| 86 | 86 | |
| 87 | - LIB3270_EXPORT gchar * pw3270_file_chooser(GtkFileChooserAction action, const gchar *name, const gchar *title, const gchar *file, const gchar *ext); | |
| 87 | + LIB3270_EXPORT gchar * pw3270_file_chooser(GtkFileChooserAction action, const gchar *name, const gchar *title, const gchar *file); | |
| 88 | 88 | |
| 89 | 89 | LIB3270_EXPORT void pw3270_set_host_charset(GtkWidget *widget, const gchar *name); |
| 90 | 90 | ... | ... |
src/pw3270/dialog.c
| ... | ... | @@ -410,6 +410,32 @@ |
| 410 | 410 | |
| 411 | 411 | void paste_file_action(GtkAction *action, GtkWidget *widget) |
| 412 | 412 | { |
| 413 | + const gchar * name = g_object_get_data(G_OBJECT(action),"filename"); | |
| 414 | + const gchar * charset = g_object_get_data(G_OBJECT(action),"charset"); | |
| 415 | + | |
| 416 | + trace("Action %s activated on widget %p",gtk_action_get_name(action),widget); | |
| 417 | + | |
| 418 | + if(name) { | |
| 419 | + | |
| 420 | + // Tem nome pre-definido, colca direto | |
| 421 | + paste_filename(widget,name,charset); | |
| 422 | + return; | |
| 423 | + | |
| 424 | + } | |
| 425 | + | |
| 426 | + | |
| 427 | + gchar * filename = pw3270_file_chooser( GTK_FILE_CHOOSER_ACTION_OPEN, | |
| 428 | + "paste", | |
| 429 | + g_object_get_data(G_OBJECT(action),"title"), | |
| 430 | + name | |
| 431 | + ); | |
| 432 | + | |
| 433 | + if(filename) { | |
| 434 | + paste_filename(widget,filename,charset); | |
| 435 | + g_free(filename); | |
| 436 | + } | |
| 437 | + | |
| 438 | + /* | |
| 413 | 439 | const gchar * user_title = g_object_get_data(G_OBJECT(action),"title"); |
| 414 | 440 | const gchar * filename = g_object_get_data(G_OBJECT(action),"filename"); |
| 415 | 441 | gchar * encattr = NULL; |
| ... | ... | @@ -458,6 +484,7 @@ |
| 458 | 484 | |
| 459 | 485 | if(encattr) |
| 460 | 486 | g_free(encattr); |
| 487 | + */ | |
| 461 | 488 | } |
| 462 | 489 | |
| 463 | 490 | G_GNUC_INTERNAL void about_dialog_action(GtkAction *action, GtkWidget *widget) |
| ... | ... | @@ -564,7 +591,7 @@ static gpointer select_file(struct file *fl) { |
| 564 | 591 | } |
| 565 | 592 | #endif // _WIN32 |
| 566 | 593 | |
| 567 | - LIB3270_EXPORT gchar * pw3270_file_chooser(GtkFileChooserAction action, const gchar *name, const gchar *title, const gchar *file, const gchar *ext) | |
| 594 | + LIB3270_EXPORT gchar * pw3270_file_chooser(GtkFileChooserAction action, const gchar *name, const gchar *title, const gchar *file) | |
| 568 | 595 | { |
| 569 | 596 | gchar * filename = NULL; |
| 570 | 597 | ... | ... |
src/pw3270/v3270ft/private.h
| ... | ... | @@ -183,9 +183,6 @@ |
| 183 | 183 | G_GNUC_INTERNAL guint v3270ftprogress_signal[V3270FTPROGRESS_SIGNAL_COUNT]; |
| 184 | 184 | |
| 185 | 185 | |
| 186 | -// G_GNUC_INTERNAL void v3270ft_store(v3270ft *dialog, struct v3270ft_entry *info); | |
| 187 | -// G_GNUC_INTERNAL void v3270ft_restore(v3270ft *dialog, struct v3270ft_entry *info); | |
| 188 | - | |
| 189 | 186 | G_GNUC_INTERNAL void v3270ft_update_actions(v3270ft *dialog); |
| 190 | 187 | G_GNUC_INTERNAL void v3270ft_update_state(struct v3270ft_entry *entry); |
| 191 | 188 | G_GNUC_INTERNAL void v3270ft_set_active(v3270ft *dialog, GList * active); | ... | ... |