2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: ErrorDialog.c /main/5 1996/10/15 14:46:17 rswiston $ */
25 /*******************************************************************************
28 Associated Header file: ErrorDialog.h
29 *******************************************************************************/
37 #define CONTEXT_MACRO_ACCESS 1
38 #include "ErrorDialog.h"
39 #undef CONTEXT_MACRO_ACCESS
41 /******************************************************************************/
42 /* activateCB_ErrorDialog_OkButton */
43 /******************************************************************************/
44 void activateCB_ErrorDialog_OkButton( Widget UxWidget,
45 XtPointer UxClientData,
46 XtPointer UxCallbackArg)
49 XtDestroyWidget(XtParent(UxWidget));
52 /******************************************************************************/
53 /* display_error_message - display desired message in error dialog */
54 /* INPUT: char *message - message to display in dialog box */
56 /******************************************************************************/
57 void display_error_message (Widget parent, char *message)
60 ErrorDialog = XmCreateErrorDialog(parent, "errorDialog", NULL, 0);
61 XtUnmanageChild (XmMessageBoxGetChild (ErrorDialog, XmDIALOG_CANCEL_BUTTON));
62 XtUnmanageChild (XmMessageBoxGetChild (ErrorDialog, XmDIALOG_HELP_BUTTON));
64 XtAddCallback( ErrorDialog, XmNokCallback,
65 (XtCallbackProc) activateCB_ErrorDialog_OkButton,
68 XtVaSetValues (ErrorDialog,
69 RES_CONVERT(XmNdialogTitle, GETMESSAGE(6, 31, "Create Action - Error")),
70 RES_CONVERT(XmNmessageString, message),
73 XtManageChild (ErrorDialog);
76 /*******************************************************************************
78 *******************************************************************************/