Commit 5c269dc4a486ec63e827a2304a8fb36d30baedf8
1 parent
ecc977ad
Exists in
master
and in
1 other branch
Addin property with the OIA-Timer state.
Showing
6 changed files
with
39 additions
and
16 deletions
Show diff stats
locale/pt_BR.po
@@ -5,7 +5,7 @@ msgid "" | @@ -5,7 +5,7 @@ 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: 2020-07-06 16:11-0300\n" | 8 | +"POT-Creation-Date: 2020-07-16 15:51-0300\n" |
9 | "PO-Revision-Date: 2020-07-06 16:12-0300\n" | 9 | "PO-Revision-Date: 2020-07-06 16:12-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 <>\n" | 11 | "Language-Team: Português <>\n" |
@@ -59,15 +59,15 @@ msgstr "_Adicionar ao arquivo" | @@ -59,15 +59,15 @@ msgstr "_Adicionar ao arquivo" | ||
59 | msgid "About security" | 59 | msgid "About security" |
60 | msgstr "Sobre a segurança" | 60 | msgstr "Sobre a segurança" |
61 | 61 | ||
62 | -#: src/dialogs/settings/accelerator.c:191 | 62 | +#: src/dialogs/settings/accelerator.c:196 |
63 | msgid "Accelerator" | 63 | msgid "Accelerator" |
64 | msgstr "Atalho" | 64 | msgstr "Atalho" |
65 | 65 | ||
66 | -#: src/dialogs/settings/accelerator.c:329 | 66 | +#: src/dialogs/settings/accelerator.c:334 |
67 | msgid "Accelerator is in use" | 67 | msgid "Accelerator is in use" |
68 | msgstr "Atalho está em uso" | 68 | msgstr "Atalho está em uso" |
69 | 69 | ||
70 | -#: src/dialogs/settings/accelerator.c:240 | 70 | +#: src/dialogs/settings/accelerator.c:245 |
71 | msgid "Accelerators" | 71 | msgid "Accelerators" |
72 | msgstr "Atalhos" | 72 | msgstr "Atalhos" |
73 | 73 | ||
@@ -88,7 +88,7 @@ msgstr "Adicionar à cópia" | @@ -88,7 +88,7 @@ msgstr "Adicionar à cópia" | ||
88 | msgid "Address or name of the host to connect." | 88 | msgid "Address or name of the host to connect." |
89 | msgstr "Endereço ou nome do host a conectar." | 89 | msgstr "Endereço ou nome do host a conectar." |
90 | 90 | ||
91 | -#: src/dialogs/settings/accelerator.c:201 | 91 | +#: src/dialogs/settings/accelerator.c:206 |
92 | msgid "Alternative" | 92 | msgid "Alternative" |
93 | msgstr "Alternativa" | 93 | msgstr "Alternativa" |
94 | 94 | ||
@@ -120,7 +120,7 @@ msgstr "Adiciona seleção na área de transferência" | @@ -120,7 +120,7 @@ msgstr "Adiciona seleção na área de transferência" | ||
120 | msgid "Appends the source file to the destination file." | 120 | msgid "Appends the source file to the destination file." |
121 | msgstr "Adiciona conteúdo do arquivo origem ao final do arquivo destino." | 121 | msgstr "Adiciona conteúdo do arquivo origem ao final do arquivo destino." |
122 | 122 | ||
123 | -#: src/dialogs/settings/accelerator.c:311 | 123 | +#: src/dialogs/settings/accelerator.c:316 |
124 | #, c-format | 124 | #, c-format |
125 | msgid "Assign it to action (<b>%s</b>)?" | 125 | msgid "Assign it to action (<b>%s</b>)?" |
126 | msgstr "Associar com a ação (<b>%s</b>)?" | 126 | msgstr "Associar com a ação (<b>%s</b>)?" |
@@ -613,8 +613,8 @@ msgstr "Escopo de mapeamento inválido" | @@ -613,8 +613,8 @@ msgstr "Escopo de mapeamento inválido" | ||
613 | msgid "Invalid state" | 613 | msgid "Invalid state" |
614 | msgstr "Estado inválido" | 614 | msgstr "Estado inválido" |
615 | 615 | ||
616 | -#: src/dialogs/settings/accelerator.c:145 | ||
617 | -#: src/dialogs/settings/accelerator.c:239 | 616 | +#: src/dialogs/settings/accelerator.c:150 |
617 | +#: src/dialogs/settings/accelerator.c:244 | ||
618 | msgid "Keyboard accelerators" | 618 | msgid "Keyboard accelerators" |
619 | msgstr "Atalhos de teclado" | 619 | msgstr "Atalhos de teclado" |
620 | 620 | ||
@@ -670,7 +670,7 @@ msgstr "Monocromático" | @@ -670,7 +670,7 @@ msgstr "Monocromático" | ||
670 | msgid "Mustard" | 670 | msgid "Mustard" |
671 | msgstr "Mostarda" | 671 | msgstr "Mostarda" |
672 | 672 | ||
673 | -#: src/dialogs/settings/accelerator.c:153 | 673 | +#: src/dialogs/settings/accelerator.c:158 |
674 | msgid "Name" | 674 | msgid "Name" |
675 | msgstr "Nome" | 675 | msgstr "Nome" |
676 | 676 | ||
@@ -950,7 +950,7 @@ msgstr "Formato de registro" | @@ -950,7 +950,7 @@ msgstr "Formato de registro" | ||
950 | msgid "Red" | 950 | msgid "Red" |
951 | msgstr "Vermelho" | 951 | msgstr "Vermelho" |
952 | 952 | ||
953 | -#: src/dialogs/settings/accelerator.c:454 | 953 | +#: src/dialogs/settings/accelerator.c:459 |
954 | msgid "Rejected by action" | 954 | msgid "Rejected by action" |
955 | msgstr "Rejeitado pela ação" | 955 | msgstr "Rejeitado pela ação" |
956 | 956 | ||
@@ -1257,7 +1257,7 @@ msgstr "Tipo de situação" | @@ -1257,7 +1257,7 @@ msgstr "Tipo de situação" | ||
1257 | msgid "State of the dynamic font spacing" | 1257 | msgid "State of the dynamic font spacing" |
1258 | msgstr "Estado do espaçamento dinâmico" | 1258 | msgstr "Estado do espaçamento dinâmico" |
1259 | 1259 | ||
1260 | -#: src/dialogs/settings/accelerator.c:171 | 1260 | +#: src/dialogs/settings/accelerator.c:176 |
1261 | msgid "Summary" | 1261 | msgid "Summary" |
1262 | msgstr "Sumário" | 1262 | msgstr "Sumário" |
1263 | 1263 | ||
@@ -1304,7 +1304,7 @@ msgstr "" | @@ -1304,7 +1304,7 @@ msgstr "" | ||
1304 | msgid "The EBCDIC host character set. " | 1304 | msgid "The EBCDIC host character set. " |
1305 | msgstr "A tabela de caracteres EBCDIC." | 1305 | msgstr "A tabela de caracteres EBCDIC." |
1306 | 1306 | ||
1307 | -#: src/dialogs/settings/accelerator.c:450 | 1307 | +#: src/dialogs/settings/accelerator.c:455 |
1308 | #, c-format | 1308 | #, c-format |
1309 | msgid "The action \"%s\" can't manage alternative keys" | 1309 | msgid "The action \"%s\" can't manage alternative keys" |
1310 | msgstr "A ação \"%s\" não permite uso de atalho alternativo" | 1310 | msgstr "A ação \"%s\" não permite uso de atalho alternativo" |
@@ -1389,12 +1389,12 @@ msgstr "Operação de impressão está em andamento" | @@ -1389,12 +1389,12 @@ msgstr "Operação de impressão está em andamento" | ||
1389 | msgid "The print settings should be stored." | 1389 | msgid "The print settings should be stored." |
1390 | msgstr "Configuração de impressão deve ser armazenada" | 1390 | msgstr "Configuração de impressão deve ser armazenada" |
1391 | 1391 | ||
1392 | -#: src/dialogs/settings/accelerator.c:304 | 1392 | +#: src/dialogs/settings/accelerator.c:309 |
1393 | #, c-format | 1393 | #, c-format |
1394 | msgid "The selected accelerator is in use by action <b>%s</b> (<b>%s</b>)" | 1394 | msgid "The selected accelerator is in use by action <b>%s</b> (<b>%s</b>)" |
1395 | msgstr "O atalho selecionado está em uso pela ação <b>%s</b> (<b>%s</b>)" | 1395 | msgstr "O atalho selecionado está em uso pela ação <b>%s</b> (<b>%s</b>)" |
1396 | 1396 | ||
1397 | -#: src/dialogs/settings/accelerator.c:324 | 1397 | +#: src/dialogs/settings/accelerator.c:329 |
1398 | msgid "The selected accelerator is in use by the same action" | 1398 | msgid "The selected accelerator is in use by the same action" |
1399 | msgstr "O atalho selecionado está em uso na mesma ação" | 1399 | msgstr "O atalho selecionado está em uso na mesma ação" |
1400 | 1400 |
src/include/terminal.h
src/terminal/drawing/oia.c
@@ -827,6 +827,7 @@ struct timer_info | @@ -827,6 +827,7 @@ struct timer_info | ||
827 | static void release_timer(struct timer_info *info) | 827 | static void release_timer(struct timer_info *info) |
828 | { | 828 | { |
829 | info->terminal->timer = NULL; | 829 | info->terminal->timer = NULL; |
830 | + g_object_notify_by_pspec(G_OBJECT(info->terminal),GTK_V3270_GET_CLASS(info->terminal)->properties.has_timer); | ||
830 | 831 | ||
831 | if(info->terminal->surface) | 832 | if(info->terminal->surface) |
832 | { | 833 | { |
@@ -1051,6 +1052,8 @@ void v3270_start_timer(GtkWidget *widget) | @@ -1051,6 +1052,8 @@ void v3270_start_timer(GtkWidget *widget) | ||
1051 | terminal->timer = g_timeout_source_new(100); | 1052 | terminal->timer = g_timeout_source_new(100); |
1052 | g_source_set_callback(terminal->timer,(GSourceFunc) update_timer, info, (GDestroyNotify) release_timer); | 1053 | g_source_set_callback(terminal->timer,(GSourceFunc) update_timer, info, (GDestroyNotify) release_timer); |
1053 | 1054 | ||
1055 | + g_object_notify_by_pspec(G_OBJECT(terminal),GTK_V3270_GET_CLASS(widget)->properties.has_timer); | ||
1056 | + | ||
1054 | g_source_attach(terminal->timer,NULL); | 1057 | g_source_attach(terminal->timer,NULL); |
1055 | g_source_unref(terminal->timer); | 1058 | g_source_unref(terminal->timer); |
1056 | 1059 |
src/terminal/properties/get.c
@@ -146,6 +146,11 @@ | @@ -146,6 +146,11 @@ | ||
146 | case V3270_PROPERTY_HAS_COPY: | 146 | case V3270_PROPERTY_HAS_COPY: |
147 | g_value_set_boolean(value,window->selection.blocks != NULL); | 147 | g_value_set_boolean(value,window->selection.blocks != NULL); |
148 | break; | 148 | break; |
149 | + | ||
150 | + case V3270_PROPERTY_HAS_TIMER: | ||
151 | + g_value_set_boolean(value,window->timer != NULL); | ||
152 | + break; | ||
153 | + | ||
149 | default: | 154 | default: |
150 | G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); | 155 | G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); |
151 | 156 |
src/terminal/properties/init.c
@@ -242,7 +242,6 @@ | @@ -242,7 +242,6 @@ | ||
242 | klass->properties.settings[V3270_SETTING_SELECTION_OPTIONS] | 242 | klass->properties.settings[V3270_SETTING_SELECTION_OPTIONS] |
243 | ); | 243 | ); |
244 | 244 | ||
245 | - | ||
246 | klass->properties.has_copy = | 245 | klass->properties.has_copy = |
247 | g_param_spec_boolean( | 246 | g_param_spec_boolean( |
248 | "has_copy", | 247 | "has_copy", |
@@ -258,6 +257,20 @@ | @@ -258,6 +257,20 @@ | ||
258 | klass->properties.has_copy | 257 | klass->properties.has_copy |
259 | ); | 258 | ); |
260 | 259 | ||
260 | + klass->properties.has_timer = | ||
261 | + g_param_spec_boolean( | ||
262 | + "has_timer", | ||
263 | + "has_timer", | ||
264 | + _( "True if the timer indicator is active" ), | ||
265 | + FALSE, | ||
266 | + G_PARAM_READABLE | ||
267 | + ); | ||
268 | + | ||
269 | + g_object_class_install_property( | ||
270 | + gobject_class, | ||
271 | + V3270_PROPERTY_HAS_TIMER, | ||
272 | + klass->properties.has_timer | ||
273 | + ); | ||
261 | 274 | ||
262 | // | 275 | // |
263 | // Create dynamic properties | 276 | // Create dynamic properties |
src/terminal/properties/private.h
@@ -59,8 +59,9 @@ | @@ -59,8 +59,9 @@ | ||
59 | V3270_PROPERTY_TERMINAL_COLORS = 10, ///< @brief Terminal colors. | 59 | V3270_PROPERTY_TERMINAL_COLORS = 10, ///< @brief Terminal colors. |
60 | V3270_PROPERTY_SELECTION_OPTIONS = 11, | 60 | V3270_PROPERTY_SELECTION_OPTIONS = 11, |
61 | V3270_PROPERTY_HAS_COPY = 12, ///< @brief Terminal has copy. | 61 | V3270_PROPERTY_HAS_COPY = 12, ///< @brief Terminal has copy. |
62 | + V3270_PROPERTY_HAS_TIMER = 13, ///< @brief Timer indicator state. | ||
62 | 63 | ||
63 | - V3270_PROPERTY_DYNAMIC = 13 ///< @brief Id of the first LIB3270 internal property. | 64 | + V3270_PROPERTY_DYNAMIC = 14 ///< @brief Id of the first LIB3270 internal property. |
64 | }; | 65 | }; |
65 | 66 | ||
66 | G_GNUC_INTERNAL void v3270_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); | 67 | G_GNUC_INTERNAL void v3270_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); |