Commit 8f3b8e5e55f2e6b4555f08bee9ef12445d2e0f7a
1 parent
5365dc0b
Exists in
master
Incluindo opção para desativar o beep do emulador por pedido de usuário.
Para: "'lidiachamelete@bb.com.br'" <lidiachamelete@bb.com.br> De: Raul Rodrigues de Souza <Raul@presidencia.gov.br> Data: 09/03/2012 11:47 AM Assunto: Bip PW32370 Bom dia, Gostaria de saber se tem como tirar o bip do emulador. Ats. Raul Rodrigues
Showing
9 changed files
with
31 additions
and
10 deletions
Show diff stats
Makefile.in
| ... | ... | @@ -100,7 +100,16 @@ $(BINDIR)/Release/%@EXEEXT@: $(OBJDIR)/Release/%@OBJEXT@ |
| 100 | 100 | $(BINDIR)/pot/%.pot: src/plugins/%/* |
| 101 | 101 | @$(MAKE) -C $(dir $<) $@ |
| 102 | 102 | |
| 103 | -$(BINDIR)/pot/%.pot: src/%/* | |
| 103 | +$(BINDIR)/pot/lib.pot: src/lib/*.c | |
| 104 | + @$(MAKE) -C $(dir $<) $@ | |
| 105 | + | |
| 106 | +$(BINDIR)/pot/gtk2.pot: src/gtk2/*.c | |
| 107 | + @$(MAKE) -C $(dir $<) $@ | |
| 108 | + | |
| 109 | +$(BINDIR)/pot/rexx.pot: src/plugins/rexx/*.c | |
| 110 | + @$(MAKE) -C $(dir $<) $@ | |
| 111 | + | |
| 112 | +$(BINDIR)/pot/java.pot: src/plugins/java/*.c | |
| 104 | 113 | @$(MAKE) -C $(dir $<) $@ |
| 105 | 114 | |
| 106 | 115 | $(BINDIR)/Release/$(localedir)/%/LC_MESSAGES/$(PACKAGE_NAME).mo: po/%.po | ... | ... |
po/pt_BR.po
| ... | ... | @@ -103,6 +103,10 @@ msgstr "Copiar anexando" |
| 103 | 103 | msgid "Add/Remove CR at end of line" |
| 104 | 104 | msgstr "Inserir/Remover CR no final da linha" |
| 105 | 105 | |
| 106 | +#: ui/default.xml:110 | |
| 107 | +msgid "Alert sound" | |
| 108 | +msgstr "Aviso sonoro" | |
| 109 | + | |
| 106 | 110 | #: filetransfer.c:393 |
| 107 | 111 | msgid "Append" |
| 108 | 112 | msgstr "Adicionar" | ... | ... |
src/gtk2/actions.c
| ... | ... | @@ -386,8 +386,6 @@ |
| 386 | 386 | { |
| 387 | 387 | int idx = ((int) id) + N_TOGGLES; |
| 388 | 388 | |
| 389 | - Trace("*************** %p %p %p ",toggle_action[idx].reset, toggle_action[idx].set, toggle_action[idx].toggle); | |
| 390 | - | |
| 391 | 389 | if(toggle_action[idx].reset) |
| 392 | 390 | gtk_action_set_visible(toggle_action[idx].reset,visible && gui_toggle_state[id]); |
| 393 | 391 | ... | ... |
src/gtk2/actions1.c
src/gtk2/gui.h
| ... | ... | @@ -126,7 +126,8 @@ |
| 126 | 126 | GUI_TOGGLE_KEEP_SELECTED, |
| 127 | 127 | GUI_TOGGLE_UNDERLINE, |
| 128 | 128 | GUI_TOGGLE_CONNECT_ON_STARTUP, |
| 129 | - GUI_TOGGKE_KP_ALTERNATIVE, /**< Keypad +/- move to next/previous field */ | |
| 129 | + GUI_TOGGLE_KP_ALTERNATIVE, /**< Keypad +/- move to next/previous field */ | |
| 130 | + GUI_TOGGLE_BEEP, | |
| 130 | 131 | |
| 131 | 132 | GUI_TOGGLE_COUNT |
| 132 | 133 | }; |
| ... | ... | @@ -136,7 +137,8 @@ |
| 136 | 137 | #define TOGGLED_SMART_PASTE gui_toggle_state[GUI_TOGGLE_SMART_PASTE] |
| 137 | 138 | #define TOGGLED_UNDERLINE gui_toggle_state[GUI_TOGGLE_UNDERLINE] |
| 138 | 139 | #define TOGGLED_CONNECT_ON_STARTUP gui_toggle_state[GUI_TOGGLE_CONNECT_ON_STARTUP] |
| 139 | - #define TOGGLED_KP_ALTERNATIVE gui_toggle_state[GUI_TOGGKE_KP_ALTERNATIVE] | |
| 140 | + #define TOGGLED_KP_ALTERNATIVE gui_toggle_state[GUI_TOGGLE_KP_ALTERNATIVE] | |
| 141 | + #define TOGGLED_BEEP gui_toggle_state[GUI_TOGGLE_BEEP] | |
| 140 | 142 | |
| 141 | 143 | LOCAL_EXTERN gboolean gui_toggle_state[GUI_TOGGLE_COUNT]; |
| 142 | 144 | LOCAL_EXTERN const gchar * gui_toggle_name[GUI_TOGGLE_COUNT+1]; | ... | ... |
src/gtk2/screen.c
| ... | ... | @@ -91,6 +91,14 @@ |
| 91 | 91 | |
| 92 | 92 | /*---[ Globals ]-------------------------------------------------------------------------------------------*/ |
| 93 | 93 | |
| 94 | + static void ring_bell(void) | |
| 95 | + { | |
| 96 | + if(TOGGLED_BEEP) | |
| 97 | + { | |
| 98 | + gdk_beep(); | |
| 99 | + } | |
| 100 | + } | |
| 101 | + | |
| 94 | 102 | const struct lib3270_screen_callbacks program_screen_callbacks = |
| 95 | 103 | { |
| 96 | 104 | sizeof(struct lib3270_screen_callbacks), |
| ... | ... | @@ -107,7 +115,7 @@ |
| 107 | 115 | addch, // void (*addch)(int row, int col, unsigned char c, int attr); |
| 108 | 116 | set_charset, // void (*charset)(char *dcs); |
| 109 | 117 | settitle, // void (*title)(char *text); |
| 110 | - gdk_beep, // void (*ring_bell)(void); | |
| 118 | + ring_bell, // void (*ring_bell)(void); | |
| 111 | 119 | redraw, // void (*redraw)(void); |
| 112 | 120 | update_cursor_position, // void (*move_cursor)(H3270 *session, unsigned short row, unsigned short col, unsigned char c, unsigned short attr); |
| 113 | 121 | SetSuspended, // int (*set_suspended)(int state); | ... | ... |
src/gtk2/toggle.c
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | /*---[ Globals ]------------------------------------------------------------------------------------------------*/ |
| 36 | 36 | |
| 37 | 37 | gboolean gui_toggle_state[GUI_TOGGLE_COUNT] = { 0 }; |
| 38 | - const gchar * gui_toggle_name[GUI_TOGGLE_COUNT+1] = { "Bold", "KeepSelected", "Underline", "AutoConnect", "KPAlternative", NULL }; | |
| 38 | + const gchar * gui_toggle_name[GUI_TOGGLE_COUNT+1] = { "Bold", "KeepSelected", "Underline", "AutoConnect", "KPAlternative", "Beep", NULL }; | |
| 39 | 39 | |
| 40 | 40 | /*---[ Implement ]----------------------------------------------------------------------------------------------*/ |
| 41 | 41 | ... | ... |
src/include/lib3270/api.h
| ... | ... | @@ -117,7 +117,6 @@ |
| 117 | 117 | #define LUNAME_SIZE 16 |
| 118 | 118 | #define FULL_MODEL_NAME_SIZE 13 |
| 119 | 119 | |
| 120 | - | |
| 121 | 120 | /* State change IDs. */ |
| 122 | 121 | typedef enum _lib3270_state |
| 123 | 122 | { |
| ... | ... | @@ -189,7 +188,6 @@ |
| 189 | 188 | struct lib3270_state_callback; |
| 190 | 189 | |
| 191 | 190 | typedef struct _h3270 H3270; |
| 192 | - | |
| 193 | 191 | struct _h3270 |
| 194 | 192 | { |
| 195 | 193 | unsigned short sz; /**< Struct size */ | ... | ... |
ui/default.xml
| ... | ... | @@ -107,6 +107,7 @@ |
| 107 | 107 | <menuitem action='Toggle' id='Underline' label='Show Underline' /> |
| 108 | 108 | <menuitem action='Toggle' id='KeepSelected' label='Keep selected' /> |
| 109 | 109 | <menuitem action='Toggle' id='SmartPaste' label='Smart paste' /> |
| 110 | + <menuitem action='Toggle' id='Beep' label='Alert sound' /> | |
| 110 | 111 | <menuitem action='Toggle' id='KPAlternative' label='Use +/- for field navigation' /> |
| 111 | 112 | </menu> |
| 112 | 113 | ... | ... |