chiark / gitweb /
Imported Upstream version 1.0.0
[e16] / src / about.c
1 /*
2  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
3  * Copyright (C) 2004-2009 Kim Woelders
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy
6  * of this software and associated documentation files (the "Software"), to
7  * deal in the Software without restriction, including without limitation the
8  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9  * sell copies of the Software, and to permit persons to whom the Software is
10  * furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies of the Software, its documentation and marketing & publicity
14  * materials, and acknowledgment shall be given in the documentation, materials
15  * and software packages that this Software was used.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20  * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 #include "E.h"
25 #include "dialog.h"
26
27 #if ENABLE_DIALOGS
28
29 static void
30 _DlgFillAbout(Dialog * d, DItem * table, void *data __UNUSED__)
31 {
32    DItem              *di;
33    char                buf[1024];
34
35    Esnprintf(buf, sizeof(buf), _("About Enlightenment e16 version %s"),
36              e_wm_version);
37    DialogSetTitle(d, buf);
38
39    DialogItemTableSetOptions(table, 2, 0, 0, 0);
40
41    di = DialogAddItem(table, DITEM_IMAGE);
42    DialogItemImageSetFile(di, "pix/about.png");
43
44    di = DialogAddItem(table, DITEM_TEXT);
45    Esnprintf(buf, sizeof(buf),
46              _("Welcome to Enlightenment e16\n" "version %s.\n"
47                "If you find a bug, please do not\n"
48                "hesitate to send in a bug report.\n"
49                "We hope you enjoy the software.\n" "\n"
50                "The Rasterman - raster@rasterman.com\n"
51                "Mandrake - mandrake@mandrake.net\n"
52                "Kim Woelders - kim@woelders.dk\n"), e_wm_version);
53    DialogItemSetText(di, buf);
54
55    DialogBindKey(d, "Return", DialogCallbackClose, 0, NULL);
56    DialogBindKey(d, "Escape", DialogCallbackClose, 0, NULL);
57 }
58
59 static const DialogDef DlgAbout = {
60    "ABOUT_ENLIGHTENMENT",
61    NULL,
62    NULL,
63    SOUND_NONE,
64    NULL,
65    NULL,
66    _DlgFillAbout,
67    DLG_OK | DLG_NO_SEPARATOR, DialogCallbackClose,
68 };
69
70 void
71 About(void)
72 {
73    DialogShowSimple(&DlgAbout, NULL);
74 }
75
76 #endif /* ENABLE_DIALOGS */