· 7 years ago · May 28, 2018, 04:16 AM
1/*!
2 * \file about.c
3 * \brief About dialog for a Motif/Lesstif application.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License,
8 * or (at your option) any later version.\n\n
9 * This program is distributed in the hope that it will be useful, but
10 * <b>WITHOUT ANY WARRANTY</b>; without even the implied warranty of
11 * <b>MERCHANTABILITY</b> or <b>FITNESS FOR A PARTICULAR PURPOSE</b>.\n
12 * See the GNU General Public License for more details.\n\n
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to:\n
15 * Free Software Foundation, Inc.,\n
16 * 59 Temple Place,\n
17 * Suite 330,\n
18 * Boston,\n
19 * MA 02111 USA.
20 */
21
22static int
23About (int argc, char **argv, int x, int y)
24{
25 static Widget about = 0;
26 if (!about)
27 {
28 Cardinal n = 0;
29 XmString xs = XmStringCreateLocalized (GetInfoString ());
30 stdarg (XmNmessageString, xs);
31 stdarg (XmNtitle, "About ...");
32 about = XmCreateInformationDialog (mainwind, "about", args, n);
33 XtUnmanageChild (XmMessageBoxGetChild (about, XmDIALOG_CANCEL_BUTTON));
34 XtUnmanageChild (XmMessageBoxGetChild (about, XmDIALOG_HELP_BUTTON));
35 }
36 wait_for_dialog (about);
37 return 0;
38}