Commit 98c4d197b1f4bb59fd4a23e97d80b398c6981ab6
1 parent
47df3d57
Exists in
master
and in
5 other branches
Resolvendo conflito no nome da ação "Reset"; reset de teclado passa a chamar "kybdreset"
Showing
3 changed files
with
15 additions
and
6 deletions
Show diff stats
src/include/lib3270/action_table.h
src/lib3270/kybd.c
| ... | ... | @@ -1123,8 +1123,12 @@ static void defer_unlock(H3270 *hSession) |
| 1123 | 1123 | ps_process(hSession); |
| 1124 | 1124 | } |
| 1125 | 1125 | |
| 1126 | -/* | |
| 1126 | +/** | |
| 1127 | 1127 | * Reset keyboard lock. |
| 1128 | + * | |
| 1129 | + * @param hSession Session handle. | |
| 1130 | + * @param explicit Explicit request from the keyboard. | |
| 1131 | + * | |
| 1128 | 1132 | */ |
| 1129 | 1133 | void do_reset(H3270 *hSession, Boolean explicit) |
| 1130 | 1134 | { |
| ... | ... | @@ -1132,12 +1136,16 @@ void do_reset(H3270 *hSession, Boolean explicit) |
| 1132 | 1136 | * If explicit (from the keyboard) and there is typeahead or |
| 1133 | 1137 | * a half-composed key, simply flush it. |
| 1134 | 1138 | */ |
| 1135 | - | |
| 1136 | 1139 | if (explicit |
| 1137 | 1140 | #if defined(X3270_FT) /*[*/ |
| 1138 | 1141 | || lib3270_get_ft_state(hSession) != LIB3270_FT_STATE_NONE |
| 1139 | 1142 | #endif /*]*/ |
| 1140 | 1143 | ) { |
| 1144 | + | |
| 1145 | + if (flush_ta(hSession)) | |
| 1146 | + return; | |
| 1147 | + | |
| 1148 | +/* | |
| 1141 | 1149 | Boolean half_reset = False; |
| 1142 | 1150 | |
| 1143 | 1151 | if (flush_ta(hSession)) |
| ... | ... | @@ -1145,6 +1153,7 @@ void do_reset(H3270 *hSession, Boolean explicit) |
| 1145 | 1153 | |
| 1146 | 1154 | if (half_reset) |
| 1147 | 1155 | return; |
| 1156 | +*/ | |
| 1148 | 1157 | } |
| 1149 | 1158 | |
| 1150 | 1159 | /* Always clear insert mode. */ |
| ... | ... | @@ -1185,7 +1194,7 @@ void do_reset(H3270 *hSession, Boolean explicit) |
| 1185 | 1194 | |
| 1186 | 1195 | } |
| 1187 | 1196 | |
| 1188 | -LIB3270_ACTION( reset ) | |
| 1197 | +LIB3270_ACTION( kybdreset ) | |
| 1189 | 1198 | { |
| 1190 | 1199 | lib3270_unselect(hSession); |
| 1191 | 1200 | do_reset(hSession,True); | ... | ... |
ui/00default.xml
| ... | ... | @@ -204,8 +204,8 @@ |
| 204 | 204 | <accelerator action='toggle' id='insert' key='Insert' group='online' /> |
| 205 | 205 | |
| 206 | 206 | <accelerator action='firstfield' key='Home' group='online' /> |
| 207 | - <!-- accelerator action='Reset' key='<Shift><Ctrl>r' group='online' /--> | |
| 208 | - <!-- accelerator name="return" action='activate' key='return' /--> | |
| 207 | + <accelerator action='kybdreset' key='<Shift><Ctrl>r' group='online' /> | |
| 208 | + <accelerator name="return" action='activate' key='return' /> | |
| 209 | 209 | <accelerator name="KP_enter" action='activate' key='KP_Enter' /> |
| 210 | 210 | <accelerator action='Break' key='Escape' group='online' /> |
| 211 | 211 | <accelerator action='Attn' key='<shift>Escape' group='online' /> | ... | ... |