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 static QString
aboutMsg() 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; QString msg;
msg.sprintf( msg.sprintf(
// format // format
"Qt NetHack is a version of NetHack\n" "Qt NetHack is a version of NetHack built using" // no newline
"built using" // no newline
#ifdef KDE #ifdef KDE
" KDE and" // ditto " KDE and" // ditto
#endif #endif
" the Qt %d GUI toolkit.\n" " the Qt %d GUI toolkit.\n" // short Qt version
"\nThis is NetHack %s%s.\n" "\n"
"\nNetHack's Qt interface originally developed by Warwick Allison.\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" "\n"
#if 0 #if 0
"Homepage:\n http://trolls.troll.no/warwick/nethack/\n" //obsolete "Homepage:\n http://trolls.troll.no/warwick/nethack/\n" //obsolete
@@ -463,14 +468,14 @@ aboutMsg()
#else #else
"Qt:\n http://www.troll.no/\n" // obsolete "Qt:\n http://www.troll.no/\n" // obsolete
#endif #endif
"NetHack:\n %s\n", "NetHack:\n %s\n", // DEVTEAM_URL
// arguments // arguments
#ifdef QT_VERSION_MAJOR #ifdef QT_VERSION_MAJOR
QT_VERSION_MAJOR, QT_VERSION_MAJOR,
#else #else
5, // Qt version macro should exist; if not, assume Qt5 5, // Qt version macro should exist; if not, assume Qt5
#endif #endif
getversionstring(vbuf), /* nethack version */ vbuf, // nethack version
#ifdef QT_VERSION_STR #ifdef QT_VERSION_STR
" with Qt " QT_VERSION_STR, " with Qt " QT_VERSION_STR,
#else #else