3 * Rob Zimmermann. All rights reserved.
5 * Keith Bostic. All rights reserved.
7 * See the LICENSE file for redistribution information.
12 #include <sys/cdefs.h>
15 static const char sccsid
[] = "Id: m_prompt.c,v 8.8 2003/11/05 17:10:00 skimo Exp (Berkeley) Date: 2003/11/05 17:10:00 ";
18 __RCSID("$NetBSD: m_prompt.c,v 1.2 2014/01/26 21:43:45 christos Exp $");
21 #include <sys/types.h>
22 #include <sys/queue.h>
25 #include <X11/Intrinsic.h>
26 #include <Xm/MessageB.h>
28 #include <bitstring.h>
34 #include "../common/common.h"
35 #include "../ipc/ip.h"
39 void vi_fatal_message(Widget parent
, String str
)
41 Widget db
= XmCreateErrorDialog( parent
, "Fatal", NULL
, 0 );
42 XmString msg
= XmStringCreateSimple( str
);
44 XtVaSetValues( XtParent(db
),
49 XmNmessageString
, msg
,
52 XtAddCallback( XtParent(db
), XmNpopdownCallback
, __vi_cancel_cb
, 0 );
54 XtUnmanageChild( XmMessageBoxGetChild( db
, XmDIALOG_CANCEL_BUTTON
) );
55 XtUnmanageChild( XmMessageBoxGetChild( db
, XmDIALOG_HELP_BUTTON
) );
57 __vi_modal_dialog( db
);
63 void vi_info_message(Widget parent
, String str
)
65 static Widget db
= NULL
;
66 XmString msg
= XmStringCreateSimple( str
);
69 db
= XmCreateInformationDialog( parent
, "Information", NULL
, 0 );
71 XtVaSetValues( XtParent(db
),
72 XmNtitle
, "Information",
76 XmNmessageString
, msg
,
79 XtAddCallback( XtParent(db
), XmNpopdownCallback
, __vi_cancel_cb
, 0 );
81 XtUnmanageChild( XmMessageBoxGetChild( db
, XmDIALOG_CANCEL_BUTTON
) );
82 XtUnmanageChild( XmMessageBoxGetChild( db
, XmDIALOG_HELP_BUTTON
) );
84 __vi_modal_dialog( db
);