From 871015103e76d90b44f9fca9e126e1cff5827c79 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Fri, 11 Nov 1994 23:37:06 +0000 Subject: Correct bug with XawAsciiSourceFreeString(). --- clients/xzwrite/edit_window.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'clients') diff --git a/clients/xzwrite/edit_window.c b/clients/xzwrite/edit_window.c index 4f48e45..0cfc0c7 100644 --- a/clients/xzwrite/edit_window.c +++ b/clients/xzwrite/edit_window.c @@ -21,15 +21,15 @@ void send_message() { char *buf; int ret; + Widget text_source; /* I should do more interesting things with these error conditions */ - XtVaGetValues(editor, - XtNstring, (XtArgVal) &buf, - NULL); + XtVaGetValues(editor, XtNstring, (XtArgVal) &buf, + XTNtextSource, (XtArgVal) &text_source, NULL); ret = zeph_send_message(¤t_dest, buf); - XawAsciiSourceFreeString(editor); + XawAsciiSourceFreeString(text_source); switch (ret) { case SEND_OK: @@ -45,6 +45,9 @@ void send_message() /* Only the second argument matters */ if (defs.close_on_send) XtCallActionProc(toplevel, "CloseSend", NULL, NULL, 0); + + if (defs.clear_on_send) + XTCallActionProc(toplevel, "ClearEditor", NULL, NULL, 0); } void edit_set_title(dest) @@ -111,13 +114,13 @@ void edit_yank_next() void edit_yank_store() { char *buf; + Widget text_source; - XtVaGetValues(editor, - XtNstring, (XtArgVal) &buf, - NULL); + XtVaGetValues(editor, XtNstring, (XtArgVal) &buf, + XtNtextSource, (XtArgVal) &text_source, NULL); if (buf != NULL && *buf != '\0') yank_store(¤t_dest, buf); - XawAsciiSourceFreeString(editor); + XawAsciiSourceFreeString(text_source); } -- cgit v1.2.3