From fd4606e2c634b8546af7a84486e3a7ba80104eca Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Fri, 26 Jul 2019 14:52:22 -0300 Subject: [PATCH] Default print and save methods now show a warning popup. --- src/core/session.c | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/src/core/session.c b/src/core/session.c index 4fed4d7..6c1f26a 100644 --- a/src/core/session.c +++ b/src/core/session.c @@ -195,12 +195,15 @@ static void set_cursor(H3270 GNUC_UNUSED(*session), LIB3270_POINTER GNUC_UNUSED( static int print(H3270 *session, LIB3270_CONTENT_OPTION GNUC_UNUSED(mode)) { lib3270_write_log(session, "print", "%s", "Printing is unavailable"); + lib3270_popup_dialog(session, LIB3270_NOTIFY_WARNING, _( "Can't print" ), _( "Unable to print" ), "%s", strerror(ENOTSUP)); + return errno = ENOTSUP; } static int save(H3270 *session, LIB3270_CONTENT_OPTION GNUC_UNUSED(mode), const char GNUC_UNUSED(*filename)) { lib3270_write_log(session, "save", "%s", "Saving is unavailable"); + lib3270_popup_dialog(session, LIB3270_NOTIFY_WARNING, _( "Can't save" ), _( "Unable to save" ), "%s", strerror(ENOTSUP)); return errno = ENOTSUP; } -- libgit2 0.21.2