5 * Rob Zimmermann. All rights reserved.
7 * Keith Bostic. All rights reserved.
9 * See the LICENSE file for redistribution information.
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 #include <sys/types.h>
19 #include <sys/queue.h>
22 #include <X11/Intrinsic.h>
23 #include <Xm/MessageB.h>
25 #include <bitstring.h>
31 #include "../common/common.h"
32 #include "../ipc/ip.h"
36 void vi_fatal_message(Widget parent
, String str
)
38 Widget db
= XmCreateErrorDialog( parent
, "Fatal", NULL
, 0 );
39 XmString msg
= XmStringCreateSimple( str
);
41 XtVaSetValues( XtParent(db
),
46 XmNmessageString
, msg
,
49 XtAddCallback( XtParent(db
), XmNpopdownCallback
, __vi_cancel_cb
, 0 );
51 XtUnmanageChild( XmMessageBoxGetChild( db
, XmDIALOG_CANCEL_BUTTON
) );
52 XtUnmanageChild( XmMessageBoxGetChild( db
, XmDIALOG_HELP_BUTTON
) );
54 __vi_modal_dialog( db
);
60 void vi_info_message(Widget parent
, String str
)
62 static Widget db
= NULL
;
63 XmString msg
= XmStringCreateSimple( str
);
66 db
= XmCreateInformationDialog( parent
, "Information", NULL
, 0 );
68 XtVaSetValues( XtParent(db
),
69 XmNtitle
, "Information",
73 XmNmessageString
, msg
,
76 XtAddCallback( XtParent(db
), XmNpopdownCallback
, __vi_cancel_cb
, 0 );
78 XtUnmanageChild( XmMessageBoxGetChild( db
, XmDIALOG_CANCEL_BUTTON
) );
79 XtUnmanageChild( XmMessageBoxGetChild( db
, XmDIALOG_HELP_BUTTON
) );
81 __vi_modal_dialog( db
);