Commit 7727b019c9bba64aa444c7dc4136945daef20aa5
1 parent
f7c504e3
Exists in
master
and in
1 other branch
Adding buttons in the new standard popup dialog.
Showing
2 changed files
with
66 additions
and
30 deletions
Show diff stats
locale/pt_BR.po
... | ... | @@ -5,8 +5,8 @@ msgid "" |
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: pw3270 5.0\n" |
7 | 7 | "Report-Msgid-Bugs-To: \n" |
8 | -"POT-Creation-Date: 2020-07-16 15:51-0300\n" | |
9 | -"PO-Revision-Date: 2020-07-06 16:12-0300\n" | |
8 | +"POT-Creation-Date: 2020-07-22 16:02-0300\n" | |
9 | +"PO-Revision-Date: 2020-07-23 11:06-0300\n" | |
10 | 10 | "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" |
11 | 11 | "Language-Team: Português <>\n" |
12 | 12 | "Language: pt_BR\n" |
... | ... | @@ -228,7 +228,7 @@ msgstr "Não foi possível registrar manipuladores de I/O 3270" |
228 | 228 | msgid "Can't start file transfer session" |
229 | 229 | msgstr "Não foi possível iniciar transferência de arquivo" |
230 | 230 | |
231 | -#: src/terminal/callbacks.c:396 src/filetransfer/v3270ftprogress.c:433 | |
231 | +#: src/terminal/callbacks.c:412 src/filetransfer/v3270ftprogress.c:433 | |
232 | 232 | #: src/filetransfer/transfer.c:89 src/dialogs/load.c:111 |
233 | 233 | #: src/dialogs/save/save.c:117 src/dialogs/settings/host.c:401 |
234 | 234 | msgid "Cancel" |
... | ... | @@ -302,7 +302,7 @@ msgstr "Comando a executar" |
302 | 302 | msgid "Connection" |
303 | 303 | msgstr "Conexão" |
304 | 304 | |
305 | -#: src/terminal/callbacks.c:397 | |
305 | +#: src/terminal/callbacks.c:413 | |
306 | 306 | msgid "Continue" |
307 | 307 | msgstr "Continuar" |
308 | 308 | |
... | ... | @@ -339,6 +339,10 @@ msgstr "" |
339 | 339 | msgid "Creates a file with variable-length records." |
340 | 340 | msgstr "Cria arquivo com registros de tamanho variável." |
341 | 341 | |
342 | +#: src/dialogs/popups.c:78 | |
343 | +msgid "Critical Error" | |
344 | +msgstr "Erro crítico" | |
345 | + | |
342 | 346 | #: src/dialogs/settings/colors.c:180 |
343 | 347 | msgid "Cross hair cursor" |
344 | 348 | msgstr "Cursor mira" |
... | ... | @@ -405,7 +409,7 @@ msgstr "Turquesa Escuro" |
405 | 409 | msgid "Default" |
406 | 410 | msgstr "Padrão" |
407 | 411 | |
408 | -#: src/dialogs/popups.c:149 | |
412 | +#: src/dialogs/popups.c:223 | |
409 | 413 | msgid "Don't ask again" |
410 | 414 | msgstr "Não perguntar de novo" |
411 | 415 | |
... | ... | @@ -425,7 +429,7 @@ msgstr "Emulação" |
425 | 429 | msgid "Enabled" |
426 | 430 | msgstr "Habilitado" |
427 | 431 | |
428 | -#: src/dialogs/popups.c:56 src/dialogs/popups.c:85 | |
432 | +#: src/dialogs/popups.c:70 | |
429 | 433 | msgid "Error" |
430 | 434 | msgstr "Erro" |
431 | 435 | |
... | ... | @@ -580,6 +584,10 @@ msgstr "Copiar imagem" |
580 | 584 | msgid "Increase the font size" |
581 | 585 | msgstr "Aumenta o tamanho da fonte" |
582 | 586 | |
587 | +#: src/dialogs/popups.c:54 | |
588 | +msgid "Information" | |
589 | +msgstr "Informação" | |
590 | + | |
583 | 591 | #: src/terminal/actions/table.c:153 |
584 | 592 | msgid "Input current clipboard contents to screen" |
585 | 593 | msgstr "Insere conteúdo da área de transferência" |
... | ... | @@ -596,7 +604,7 @@ msgstr "Intensificado/Protegido" |
596 | 604 | msgid "Intensified/Unprotected" |
597 | 605 | msgstr "Intensificado/Desprotegido" |
598 | 606 | |
599 | -#: src/terminal/callbacks.c:424 | |
607 | +#: src/terminal/callbacks.c:454 | |
600 | 608 | msgid "Invalid callback table, possible version mismatch in lib3270" |
601 | 609 | msgstr "" |
602 | 610 | "Tabela de callbacks inválida, possível divergência de versão na lib3270" |
... | ... | @@ -686,7 +694,7 @@ msgstr "Próxima página" |
686 | 694 | msgid "No active transfer" |
687 | 695 | msgstr "Nenhuma transferência ativa" |
688 | 696 | |
689 | -#: src/terminal/properties/get.c:198 | |
697 | +#: src/terminal/properties/get.c:203 | |
690 | 698 | msgid "No host defined" |
691 | 699 | msgstr "Nenhum servidor definido" |
692 | 700 | |
... | ... | @@ -754,10 +762,6 @@ msgstr "Estado normal na OIA" |
754 | 762 | msgid "Open" |
755 | 763 | msgstr "Abrir" |
756 | 764 | |
757 | -#: src/dialogs/popups.c:116 | |
758 | -msgid "Operation failed" | |
759 | -msgstr "Operação falhou" | |
760 | - | |
761 | 765 | #: src/dialogs/save/convenience.c:65 src/dialogs/save/convenience.c:93 |
762 | 766 | msgid "Operation has failed" |
763 | 767 | msgstr "Operação falhou" |
... | ... | @@ -1097,6 +1101,10 @@ msgstr "" |
1097 | 1101 | msgid "Secondary space" |
1098 | 1102 | msgstr "Secondary space" |
1099 | 1103 | |
1104 | +#: src/dialogs/popups.c:86 | |
1105 | +msgid "Security alert" | |
1106 | +msgstr "Alerta de segurança" | |
1107 | + | |
1100 | 1108 | #: src/filetransfer/v3270ft.c:303 src/filetransfer/settings.c:209 |
1101 | 1109 | #: src/dialogs/save/save.c:98 src/dialogs/save/save.c:118 |
1102 | 1110 | #: src/dialogs/settings/host.c:402 |
... | ... | @@ -1325,7 +1333,7 @@ msgstr "" |
1325 | 1333 | "Tabela de callbacks para transferência de arquivos inválida, possível " |
1326 | 1334 | "divergência de versão na lib3270" |
1327 | 1335 | |
1328 | -#: src/terminal/callbacks.c:391 | |
1336 | +#: src/terminal/callbacks.c:407 | |
1329 | 1337 | #, c-format |
1330 | 1338 | msgid "The error code was %d" |
1331 | 1339 | msgstr "O código de erro foi %d" |
... | ... | @@ -1476,10 +1484,14 @@ msgstr "Fila de transferências" |
1476 | 1484 | msgid "Transfer speed" |
1477 | 1485 | msgstr "Velocidade de transferência" |
1478 | 1486 | |
1479 | -#: src/terminal/properties/init.c:250 | |
1487 | +#: src/terminal/properties/init.c:249 | |
1480 | 1488 | msgid "True if the terminal has copy blocks" |
1481 | 1489 | msgstr "Verdadeiro se o terminal tiver blocos copiados" |
1482 | 1490 | |
1491 | +#: src/terminal/properties/init.c:264 | |
1492 | +msgid "True if the timer indicator is active" | |
1493 | +msgstr "Verdadeiro se indicador de tempo estiver ativo" | |
1494 | + | |
1483 | 1495 | #: src/filetransfer/transfer.c:84 |
1484 | 1496 | msgid "Try again with the same file." |
1485 | 1497 | msgstr "Tente de novo com o mesmo arquivo." |
... | ... | @@ -1532,6 +1544,10 @@ msgstr "Usar espaço inseparável" |
1532 | 1544 | msgid "Variable" |
1533 | 1545 | msgstr "Variável" |
1534 | 1546 | |
1547 | +#: src/dialogs/popups.c:62 | |
1548 | +msgid "Warning" | |
1549 | +msgstr "Alerta" | |
1550 | + | |
1535 | 1551 | #: src/dialogs/tools.c:172 |
1536 | 1552 | msgid "Western Europe (ISO 8859-1)" |
1537 | 1553 | msgstr "Europa ocidental (ISO 8859-1)" |
... | ... | @@ -1722,8 +1738,9 @@ msgid "_Apply" |
1722 | 1738 | msgstr "_Aplicar" |
1723 | 1739 | |
1724 | 1740 | #: src/selection/linux/paste.c:84 src/selection/linux/paste.c:118 |
1725 | -#: src/dialogs/load.c:205 src/dialogs/load.c:224 src/dialogs/linux/select.c:51 | |
1726 | -#: src/dialogs/linux/select.c:77 src/dialogs/print/settingsdialog.c:410 | |
1741 | +#: src/dialogs/popups.c:118 src/dialogs/load.c:205 src/dialogs/load.c:224 | |
1742 | +#: src/dialogs/linux/select.c:51 src/dialogs/linux/select.c:77 | |
1743 | +#: src/dialogs/print/settingsdialog.c:410 | |
1727 | 1744 | #: src/dialogs/print/settingsdialog.c:429 src/dialogs/save/save.c:342 |
1728 | 1745 | #: src/dialogs/save/save.c:361 src/dialogs/settings/dialog.c:231 |
1729 | 1746 | msgid "_Cancel" |
... | ... | @@ -1735,6 +1752,7 @@ msgstr "Tabela de _Caracteres" |
1735 | 1752 | |
1736 | 1753 | #: src/trace/tracewindow.c:125 src/dialogs/transfer.c:163 |
1737 | 1754 | #: src/dialogs/transfer.c:183 src/dialogs/security.c:235 |
1755 | +#: src/dialogs/popups.c:77 | |
1738 | 1756 | msgid "_Close" |
1739 | 1757 | msgstr "_Close" |
1740 | 1758 | |
... | ... | @@ -1770,6 +1788,11 @@ msgstr "Arquivo _local:" |
1770 | 1788 | msgid "_Model" |
1771 | 1789 | msgstr "_Modelo" |
1772 | 1790 | |
1791 | +#: src/dialogs/popups.c:53 src/dialogs/popups.c:61 src/dialogs/popups.c:69 | |
1792 | +#: src/dialogs/popups.c:85 | |
1793 | +msgid "_Ok" | |
1794 | +msgstr "_Ok" | |
1795 | + | |
1773 | 1796 | #: src/filetransfer/v3270ft.c:333 |
1774 | 1797 | msgid "_Operation" |
1775 | 1798 | msgstr "_Operação:" |
... | ... | @@ -2763,9 +2786,6 @@ msgstr "Diminui o tamanho da fonte" |
2763 | 2786 | #~ msgid "Incorrect request code: file transfer canceled" |
2764 | 2787 | #~ msgstr "Código de requisição incorreto, transferência cancelada" |
2765 | 2788 | |
2766 | -#~ msgid "Informations" | |
2767 | -#~ msgstr "Informações" | |
2768 | - | |
2769 | 2789 | #~ msgid "Input method" |
2770 | 2790 | #~ msgstr "Método de entrada" |
2771 | 2791 | |
... | ... | @@ -2952,6 +2972,9 @@ msgstr "Diminui o tamanho da fonte" |
2952 | 2972 | #~ "Permitida apenas uma opção dentre TRACKS, CYLINDERS, AVBLOCK: " |
2953 | 2973 | #~ "Transferência cancelada" |
2954 | 2974 | |
2975 | +#~ msgid "Operation failed" | |
2976 | +#~ msgstr "Operação falhou" | |
2977 | + | |
2955 | 2978 | #~ msgid "Option '%c:' is not supported" |
2956 | 2979 | #~ msgstr "Opção não suportada: '%c:'" |
2957 | 2980 | |
... | ... | @@ -3349,9 +3372,6 @@ msgstr "Diminui o tamanho da fonte" |
3349 | 3372 | #~ msgid "Secure connection was successful." |
3350 | 3373 | #~ msgstr "Conexão segura efetuada com sucesso." |
3351 | 3374 | |
3352 | -#~ msgid "Security error" | |
3353 | -#~ msgstr "Erro de segurança" | |
3354 | - | |
3355 | 3375 | #~ msgid "Security warning" |
3356 | 3376 | #~ msgstr "Alerta de segurança" |
3357 | 3377 | ... | ... |
src/dialogs/popups.c
... | ... | @@ -43,14 +43,14 @@ |
43 | 43 | // Popup settings. |
44 | 44 | static const struct _settings { |
45 | 45 | GtkMessageType type; |
46 | - GtkButtonsType buttons; | |
46 | + const gchar *button; | |
47 | 47 | const gchar *title; |
48 | 48 | } settings[LIB3270_NOTIFY_USER] = { |
49 | 49 | |
50 | 50 | // LIB3270_NOTIFY_INFO - Simple information dialog. |
51 | 51 | { |
52 | 52 | .type = GTK_MESSAGE_INFO, |
53 | - .buttons = GTK_BUTTONS_OK, | |
53 | + .button = N_("_Ok"), | |
54 | 54 | .title = N_("Information") |
55 | 55 | |
56 | 56 | }, |
... | ... | @@ -58,7 +58,7 @@ |
58 | 58 | // LIB3270_NOTIFY_WARNING - Warning message. |
59 | 59 | { |
60 | 60 | .type = GTK_MESSAGE_WARNING, |
61 | - .buttons = GTK_BUTTONS_OK, | |
61 | + .button = N_("_Ok"), | |
62 | 62 | .title = N_("Warning") |
63 | 63 | |
64 | 64 | }, |
... | ... | @@ -66,7 +66,7 @@ |
66 | 66 | // LIB3270_NOTIFY_ERROR - Error message. |
67 | 67 | { |
68 | 68 | .type = GTK_MESSAGE_ERROR, |
69 | - .buttons = GTK_BUTTONS_OK, | |
69 | + .button = N_("_Ok"), | |
70 | 70 | .title = N_("Error") |
71 | 71 | |
72 | 72 | }, |
... | ... | @@ -74,7 +74,7 @@ |
74 | 74 | // LIB3270_NOTIFY_CRITICAL - Critical error, user can abort application. |
75 | 75 | { |
76 | 76 | .type = GTK_MESSAGE_ERROR, |
77 | - .buttons = GTK_BUTTONS_CLOSE, | |
77 | + .button = N_("_Close"), | |
78 | 78 | .title = N_("Critical Error") |
79 | 79 | |
80 | 80 | }, |
... | ... | @@ -82,12 +82,11 @@ |
82 | 82 | // LIB3270_NOTIFY_SECURE - Secure host dialog. |
83 | 83 | { |
84 | 84 | .type = GTK_MESSAGE_OTHER, |
85 | - .buttons = GTK_BUTTONS_OK, | |
85 | + .button = N_("_Ok"), | |
86 | 86 | .title = N_("Security alert") |
87 | 87 | |
88 | 88 | } |
89 | 89 | |
90 | - | |
91 | 90 | }; |
92 | 91 | |
93 | 92 | // Create dialog |
... | ... | @@ -96,7 +95,7 @@ |
96 | 95 | GTK_WINDOW(gtk_widget_get_toplevel(widget)), |
97 | 96 | GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT, |
98 | 97 | settings[popup->type].type, |
99 | - settings[popup->type].buttons, | |
98 | + GTK_BUTTONS_NONE, | |
100 | 99 | "%s",popup->summary |
101 | 100 | ); |
102 | 101 | |
... | ... | @@ -114,6 +113,21 @@ |
114 | 113 | if(wait) { |
115 | 114 | |
116 | 115 | // Wait for response. |
116 | + if(popup->label) { | |
117 | + | |
118 | + gtk_dialog_add_button(GTK_DIALOG(dialog), _("_Cancel"), GTK_RESPONSE_CANCEL); | |
119 | + gtk_dialog_add_button(GTK_DIALOG(dialog), popup->label, GTK_RESPONSE_APPLY); | |
120 | + gtk_dialog_set_default_response( | |
121 | + GTK_DIALOG(dialog), | |
122 | + (popup->type == LIB3270_NOTIFY_SECURE ? GTK_RESPONSE_CANCEL : GTK_RESPONSE_APPLY) | |
123 | + ); | |
124 | + | |
125 | + } else { | |
126 | + | |
127 | + gtk_dialog_add_button(GTK_DIALOG(dialog), g_dgettext(GETTEXT_PACKAGE,settings[popup->type].button), GTK_RESPONSE_OK); | |
128 | + | |
129 | + } | |
130 | + | |
117 | 131 | gtk_widget_show_all(dialog); |
118 | 132 | gint rc = gtk_dialog_run(GTK_DIALOG(dialog)); |
119 | 133 | gtk_widget_destroy(dialog); |
... | ... | @@ -125,6 +139,8 @@ |
125 | 139 | g_signal_connect(dialog,"close",G_CALLBACK(gtk_widget_destroy),NULL); |
126 | 140 | g_signal_connect(dialog,"response",G_CALLBACK(gtk_widget_destroy),NULL); |
127 | 141 | |
142 | + gtk_dialog_add_button(GTK_DIALOG(dialog), settings[popup->type].button, GTK_RESPONSE_OK); | |
143 | + | |
128 | 144 | gtk_widget_show_all(dialog); |
129 | 145 | |
130 | 146 | return GTK_RESPONSE_NONE; | ... | ... |