Home | History | Annotate | Line # | Download | only in motif_l
m_prompt.c revision 1.2.8.2
      1  1.2.8.2  tls /*-
      2  1.2.8.2  tls  * Copyright (c) 1996
      3  1.2.8.2  tls  *	Rob Zimmermann.  All rights reserved.
      4  1.2.8.2  tls  * Copyright (c) 1996
      5  1.2.8.2  tls  *	Keith Bostic.  All rights reserved.
      6  1.2.8.2  tls  *
      7  1.2.8.2  tls  * See the LICENSE file for redistribution information.
      8  1.2.8.2  tls  */
      9  1.2.8.2  tls 
     10  1.2.8.2  tls #include "config.h"
     11  1.2.8.2  tls 
     12  1.2.8.2  tls #include <sys/cdefs.h>
     13  1.2.8.2  tls #if 0
     14  1.2.8.2  tls #ifndef lint
     15  1.2.8.2  tls 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  1.2.8.2  tls #endif /* not lint */
     17  1.2.8.2  tls #else
     18  1.2.8.2  tls __RCSID("$NetBSD: m_prompt.c,v 1.2.8.2 2014/08/19 23:51:52 tls Exp $");
     19  1.2.8.2  tls #endif
     20  1.2.8.2  tls 
     21  1.2.8.2  tls #include <sys/types.h>
     22  1.2.8.2  tls #include <sys/queue.h>
     23  1.2.8.2  tls 
     24  1.2.8.2  tls #include <X11/X.h>
     25  1.2.8.2  tls #include <X11/Intrinsic.h>
     26  1.2.8.2  tls #include <Xm/MessageB.h>
     27  1.2.8.2  tls 
     28  1.2.8.2  tls #include <bitstring.h>
     29  1.2.8.2  tls #include <stdio.h>
     30  1.2.8.2  tls #include <stdlib.h>
     31  1.2.8.2  tls #include <string.h>
     32  1.2.8.2  tls 
     33  1.2.8.2  tls #undef LOCK_SUCCESS
     34  1.2.8.2  tls #include "../common/common.h"
     35  1.2.8.2  tls #include "../ipc/ip.h"
     36  1.2.8.2  tls #include "m_motif.h"
     37  1.2.8.2  tls 
     38  1.2.8.2  tls 
     39  1.2.8.2  tls void	vi_fatal_message(Widget parent, String str)
     41  1.2.8.2  tls {
     42  1.2.8.2  tls     Widget	db = XmCreateErrorDialog( parent, "Fatal", NULL, 0 );
     43  1.2.8.2  tls     XmString	msg = XmStringCreateSimple( str );
     44  1.2.8.2  tls 
     45  1.2.8.2  tls     XtVaSetValues( XtParent(db),
     46  1.2.8.2  tls 		   XmNtitle,		"Fatal",
     47  1.2.8.2  tls 		   0
     48  1.2.8.2  tls 		   );
     49  1.2.8.2  tls     XtVaSetValues( db,
     50  1.2.8.2  tls 		   XmNmessageString,	msg,
     51  1.2.8.2  tls 		   0
     52  1.2.8.2  tls 		   );
     53  1.2.8.2  tls     XtAddCallback( XtParent(db), XmNpopdownCallback, __vi_cancel_cb, 0 );
     54  1.2.8.2  tls 
     55  1.2.8.2  tls     XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_CANCEL_BUTTON ) );
     56  1.2.8.2  tls     XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_HELP_BUTTON ) );
     57  1.2.8.2  tls 
     58  1.2.8.2  tls     __vi_modal_dialog( db );
     59  1.2.8.2  tls 
     60  1.2.8.2  tls     exit(0);
     61  1.2.8.2  tls }
     62  1.2.8.2  tls 
     63  1.2.8.2  tls 
     64  1.2.8.2  tls void	vi_info_message(Widget parent, String str)
     66  1.2.8.2  tls {
     67  1.2.8.2  tls     static	Widget	db = NULL;
     68  1.2.8.2  tls     XmString	msg = XmStringCreateSimple( str );
     69  1.2.8.2  tls 
     70  1.2.8.2  tls     if ( db == NULL )
     71  1.2.8.2  tls 	db = XmCreateInformationDialog( parent, "Information", NULL, 0 );
     72  1.2.8.2  tls 
     73  1.2.8.2  tls     XtVaSetValues( XtParent(db),
     74  1.2.8.2  tls 		   XmNtitle,		"Information",
     75  1.2.8.2  tls 		   0
     76  1.2.8.2  tls 		   );
     77  1.2.8.2  tls     XtVaSetValues( db,
     78  1.2.8.2  tls 		   XmNmessageString,	msg,
     79  1.2.8.2  tls 		   0
     80  1.2.8.2  tls 		   );
     81  1.2.8.2  tls     XtAddCallback( XtParent(db), XmNpopdownCallback, __vi_cancel_cb, 0 );
     82  1.2.8.2  tls 
     83  1.2.8.2  tls     XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_CANCEL_BUTTON ) );
     84  1.2.8.2  tls     XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_HELP_BUTTON ) );
     85  1.2.8.2  tls 
     86                   __vi_modal_dialog( db );
     87               }
     88