Commit fd4606e2c634b8546af7a84486e3a7ba80104eca

Authored by Perry Werneck
1 parent 67a51e3a

Default print and save methods now show a warning popup.

Showing 1 changed file with 3 additions and 0 deletions   Show diff stats
src/core/session.c
... ... @@ -195,12 +195,15 @@ static void set_cursor(H3270 GNUC_UNUSED(*session), LIB3270_POINTER GNUC_UNUSED(
195 195 static int print(H3270 *session, LIB3270_CONTENT_OPTION GNUC_UNUSED(mode))
196 196 {
197 197 lib3270_write_log(session, "print", "%s", "Printing is unavailable");
  198 + lib3270_popup_dialog(session, LIB3270_NOTIFY_WARNING, _( "Can't print" ), _( "Unable to print" ), "%s", strerror(ENOTSUP));
  199 +
198 200 return errno = ENOTSUP;
199 201 }
200 202  
201 203 static int save(H3270 *session, LIB3270_CONTENT_OPTION GNUC_UNUSED(mode), const char GNUC_UNUSED(*filename))
202 204 {
203 205 lib3270_write_log(session, "save", "%s", "Saving is unavailable");
  206 + lib3270_popup_dialog(session, LIB3270_NOTIFY_WARNING, _( "Can't save" ), _( "Unable to save" ), "%s", strerror(ENOTSUP));
204 207 return errno = ENOTSUP;
205 208 }
206 209  
... ...