Annotation of hatari/src/gui-sdl/dlgAbout.c, revision 1.1.1.11

1.1       root        1: /*
                      2:   Hatari - dlgAbout.c
                      3: 
1.1.1.9   root        4:   This file is distributed under the GNU General Public License, version 2
                      5:   or at your option any later version. Read the file gpl.txt for details.
1.1       root        6: 
                      7:   Show information about the program and its license.
                      8: */
1.1.1.6   root        9: const char DlgAbout_fileid[] = "Hatari dlgAbout.c : " __DATE__ " " __TIME__;
1.1       root       10: 
                     11: #include "main.h"
1.1.1.9   root       12: #include "version.h"
1.1.1.2   root       13: #include "dialog.h"
1.1       root       14: #include "sdlgui.h"
                     15: 
1.1.1.10  root       16: static char aboutstr[] = PROG_NAME;
1.1       root       17: 
                     18: /* The "About"-dialog: */
                     19: static SGOBJ aboutdlg[] =
                     20: {
                     21:        { SGBOX, 0, 0, 0,0, 40,25, NULL },
1.1.1.10  root       22:        { SGTEXT, 0, 0, 13,1, 12,1, aboutstr },
1.1.1.6   root       23:        { SGTEXT, 0, 0, 13,2, 12,1, "=============" },
1.1.1.5   root       24:        { SGTEXT, 0, 0, 1,4, 38,1, "Written by Thomas Huth and many other" },
                     25:        { SGTEXT, 0, 0, 1,5, 38,1, "people around the world." },
1.1       root       26:        { SGTEXT, 0, 0, 2,7, 34,1, "Please see the docs for more info!" },
                     27:        { SGTEXT, 0, 0, 1,9, 38,1, "This program is free software; you can" },
                     28:        { SGTEXT, 0, 0, 1,10, 38,1, "redistribute it and/or modify it under" },
                     29:        { SGTEXT, 0, 0, 1,11, 38,1, "the terms of the GNU General Public" },
                     30:        { SGTEXT, 0, 0, 1,12, 38,1, "License as published by the Free Soft-" },
                     31:        { SGTEXT, 0, 0, 1,13, 38,1, "ware Foundation; either version 2 of" },
                     32:        { SGTEXT, 0, 0, 1,14, 38,1, "the License, or (at your option) any" },
                     33:        { SGTEXT, 0, 0, 1,15, 38,1, "later version." },
                     34:        { SGTEXT, 0, 0, 1,17, 38,1, "This program is distributed in the" },
                     35:        { SGTEXT, 0, 0, 1,18, 38,1, "hope that it will be useful, but" },
                     36:        { SGTEXT, 0, 0, 1,19, 38,1, "WITHOUT ANY WARRANTY. See the GNU Ge-" },
                     37:        { SGTEXT, 0, 0, 1,20, 38,1, "neral Public License for more details." },
1.1.1.7   root       38:        { SGBUTTON, SG_DEFAULT, 0, 16,23, 8,1, "OK" },
1.1       root       39:        { -1, 0, 0, 0,0, 0,0, NULL }
                     40: };
                     41: 
                     42: 
                     43: /*-----------------------------------------------------------------------*/
1.1.1.8   root       44: /**
                     45:  * Show the "about" dialog:
                     46:  */
1.1       root       47: void Dialog_AboutDlg(void)
                     48: {
1.1.1.10  root       49:        if ((int)strlen(aboutstr) > aboutdlg[0].w)
                     50:        {
                     51:                /* Shorten the name if it is too long */
                     52:                char *p = strrchr(aboutstr, '(');
                     53:                if (p)
                     54:                        *(p-1) = 0;
                     55:        }
                     56:        /* Center the program name title string */
                     57:        aboutdlg[1].x = (aboutdlg[0].w - strlen(aboutstr)) / 2;
1.1.1.7   root       58: 
1.1       root       59:        SDLGui_CenterDlg(aboutdlg);
1.1.1.11! root       60:        SDLGui_DoDialog(aboutdlg, NULL,false);
1.1       root       61: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.