more Qt "about nethack"

The presence of longer lines has made the 'about' box become wider
so combine the first two short lines into one longer one.

Switching to the longer nethack version string resulted in "This
is NetHack MacOSX Nethack ..." so remove the initial "NetHack"
from the 'about' box's format string.  That version string also
includes a final period; strip that off since "with Qt 5.x.y."
follows it to end the sentence.

Still some issues:

The application menu has first entry "nethack" which ought to be
capitalized but I haven't been able to figure out how to accomplish
that.

Some code in qt_main.cpp tries to add an extra instance of "about
NetHack" to the game window's "Help" menu but it doesn't show up.
This commit is contained in:
PatR
2020-08-05 10:55:10 -07:00
parent e426f99d25
commit b8b4fc70da

View File

@@ -439,18 +439,23 @@ static const char * cast_c_xpm[] UNUSED = {
static QString
aboutMsg()
{
char vbuf[BUFSZ];
char *p, vbuf[BUFSZ];
/* nethack's getversionstring() includes a final period
but we're using it mid-sentence so strip period off */
if ((p = strrchr(getversionstring(vbuf), '.')) != 0 && *(p + 1) == '\0')
*p = '\0';
QString msg;
msg.sprintf(
// format
"Qt NetHack is a version of NetHack\n"
"built using" // no newline
"Qt NetHack is a version of NetHack built using" // no newline
#ifdef KDE
" KDE and" // ditto
" KDE and" // ditto
#endif
" the Qt %d GUI toolkit.\n"
"\nThis is NetHack %s%s.\n"
"\nNetHack's Qt interface originally developed by Warwick Allison.\n"
" the Qt %d GUI toolkit.\n" // short Qt version
"\n"
"This is %s%s.\n" // long nethack version and full Qt version
"\n"
"NetHack's Qt interface originally developed by Warwick Allison.\n"
"\n"
#if 0
"Homepage:\n http://trolls.troll.no/warwick/nethack/\n" //obsolete
@@ -463,14 +468,14 @@ aboutMsg()
#else
"Qt:\n http://www.troll.no/\n" // obsolete
#endif
"NetHack:\n %s\n",
"NetHack:\n %s\n", // DEVTEAM_URL
// arguments
#ifdef QT_VERSION_MAJOR
QT_VERSION_MAJOR,
#else
5, // Qt version macro should exist; if not, assume Qt5
#endif
getversionstring(vbuf), /* nethack version */
vbuf, // nethack version
#ifdef QT_VERSION_STR
" with Qt " QT_VERSION_STR,
#else