Commit 88a1c6fa9f753c2066a7e1cddeec2530480ceefc
1 parent
a10eda22
Exists in
master
and in
1 other branch
Tracing dialog response.
Showing
2 changed files
with
15 additions
and
6 deletions
Show diff stats
src/core/popup.c
@@ -66,7 +66,15 @@ int lib3270_popup_translated(H3270 *hSession, const LIB3270_POPUP *popup, unsign | @@ -66,7 +66,15 @@ int lib3270_popup_translated(H3270 *hSession, const LIB3270_POPUP *popup, unsign | ||
66 | translated.body = dgettext(GETTEXT_PACKAGE,popup->body); | 66 | translated.body = dgettext(GETTEXT_PACKAGE,popup->body); |
67 | } | 67 | } |
68 | 68 | ||
69 | - return hSession->cbk.popup(hSession,&translated,wait); | 69 | + int rc = hSession->cbk.popup(hSession,&translated,wait); |
70 | + | ||
71 | + debug("%s - User response was '%s' (rc=%d)",__FUNCTION__,strerror(rc),rc); | ||
72 | + | ||
73 | + if(rc) { | ||
74 | + lib3270_write_trace(hSession,"User response was '%s' (rc=%d)",strerror(rc),rc); | ||
75 | + } | ||
76 | + | ||
77 | + return rc; | ||
70 | } | 78 | } |
71 | 79 | ||
72 | /// @brief Pop up an error dialog. | 80 | /// @brief Pop up an error dialog. |
src/core/properties/boolean.c
@@ -219,20 +219,21 @@ const LIB3270_INT_PROPERTY * lib3270_get_boolean_properties_list(void) { | @@ -219,20 +219,21 @@ const LIB3270_INT_PROPERTY * lib3270_get_boolean_properties_list(void) { | ||
219 | } | 219 | } |
220 | 220 | ||
221 | int lib3270_set_boolean_property(H3270 *hSession, const char *name, int value, int seconds) { | 221 | int lib3270_set_boolean_property(H3270 *hSession, const char *name, int value, int seconds) { |
222 | - size_t ix; | ||
223 | - const LIB3270_INT_PROPERTY * properties; | ||
224 | 222 | ||
225 | if(seconds) { | 223 | if(seconds) { |
226 | lib3270_wait_for_ready(hSession, seconds); | 224 | lib3270_wait_for_ready(hSession, seconds); |
227 | } | 225 | } |
228 | 226 | ||
229 | - properties = lib3270_get_boolean_properties_list(); | 227 | + size_t ix; |
228 | + const LIB3270_INT_PROPERTY * properties = lib3270_get_boolean_properties_list(); | ||
230 | for(ix = 0; properties[ix].name; ix++) { | 229 | for(ix = 0; properties[ix].name; ix++) { |
231 | if(!strcasecmp(name,properties[ix].name)) { | 230 | if(!strcasecmp(name,properties[ix].name)) { |
232 | - if(properties[ix].set) | 231 | + if(properties[ix].set) { |
232 | + lib3270_write_event_trace(hSession,"%s %s\n",(value ? "Enabling" : "Disabling"),properties[ix].name); | ||
233 | return properties[ix].set(hSession, value); | 233 | return properties[ix].set(hSession, value); |
234 | - else | 234 | + } else { |
235 | return errno = EPERM; | 235 | return errno = EPERM; |
236 | + } | ||
236 | } | 237 | } |
237 | 238 | ||
238 | } | 239 | } |