3 * Rob Zimmermann. All rights reserved.
5 * Keith Bostic. All rights reserved.
7 * See the LICENSE file for redistribution information.
13 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 $";
16 #include <sys/types.h>
17 #include <sys/queue.h>
20 #include <X11/Intrinsic.h>
21 #include <Xm/MessageB.h>
23 #include <bitstring.h>
29 #include "../common/common.h"
30 #include "../ipc/ip.h"
34 void vi_fatal_message(Widget parent
, String str
)
36 Widget db
= XmCreateErrorDialog( parent
, "Fatal", NULL
, 0 );
37 XmString msg
= XmStringCreateSimple( str
);
39 XtVaSetValues( XtParent(db
),
44 XmNmessageString
, msg
,
47 XtAddCallback( XtParent(db
), XmNpopdownCallback
, __vi_cancel_cb
, 0 );
49 XtUnmanageChild( XmMessageBoxGetChild( db
, XmDIALOG_CANCEL_BUTTON
) );
50 XtUnmanageChild( XmMessageBoxGetChild( db
, XmDIALOG_HELP_BUTTON
) );
52 __vi_modal_dialog( db
);
58 void vi_info_message(Widget parent
, String str
)
60 static Widget db
= NULL
;
61 XmString msg
= XmStringCreateSimple( str
);
64 db
= XmCreateInformationDialog( parent
, "Information", NULL
, 0 );
66 XtVaSetValues( XtParent(db
),
67 XmNtitle
, "Information",
71 XmNmessageString
, msg
,
74 XtAddCallback( XtParent(db
), XmNpopdownCallback
, __vi_cancel_cb
, 0 );
76 XtUnmanageChild( XmMessageBoxGetChild( db
, XmDIALOG_CANCEL_BUTTON
) );
77 XtUnmanageChild( XmMessageBoxGetChild( db
, XmDIALOG_HELP_BUTTON
) );
79 __vi_modal_dialog( db
);