Qt's "about nethack"

Update the 'about' popup to reflect current information.

When I start Qt nethack on OSX 10.11, the horizontal application
menu for nethack that's rendered across the top of the desktop won't
respond to mouse clicks, not even if I click on nethack's title bar
or inside its game window first.  But if I give another application
focus (which swaps top-edge menu to one for that other application)
and then click on nethack's title bar to give focus back to nethack
(which also swaps back to the top menu for it), clicking on that menu
begins working.  I have no idea what's going on there.

Picking "nethack" in the application menu gives a pull down menu with
"about nethack" as the first entry.  When choosing that, the revised
popup looks like

 | Qt NetHack is a version of NetHack
 | built using the Qt 5 GUI toolkit.
 |
 | This is NetHack 3.7.0-22 with Qt 5.11.3.
 |
 | NetHack's Qt interface originally developed by
 | Warwick Allison.
 |
 | Qt:
 |      https://qt.io/
 | NetHack:
 |      https://www.nethack.org/

The line with Warwick's name is wrapping and I don't know how to
make the popup wide enough to avoid that.  The old edition had a
"Homepage" URL for him instead of that sentence but the URL was out
of date.  It also had an obsolete URL for Qt and none at all for
NetHack itself.
This commit is contained in:
PatR
2020-08-02 11:49:41 -07:00
parent 30da367b80
commit 09d9d002c7

View File

@@ -439,23 +439,44 @@ static const char * cast_c_xpm[] UNUSED = {
static QString
aboutMsg()
{
char vbuf[BUFSZ];
QString msg;
msg.sprintf(
"Qt NetHack is a version of NetHack built\n"
// format
"Qt NetHack is a version of NetHack\n"
"built using" // no newline
#ifdef KDE
"using KDE and the Qt GUI toolkit.\n"
" 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"
"\n"
#if 0
"Homepage:\n http://trolls.troll.no/warwick/nethack/\n" //obsolete
#endif
#ifdef KDE
"KDE:\n https://kde.org/\n"
#endif
#if 1
"Qt:\n https://qt.io/\n"
#else
"using the Qt GUI toolkit.\n"
"Qt:\n http://www.troll.no/\n" // obsolete
#endif
"This is version %d.%d.%d\n\n"
"Homepage:\n http://trolls.troll.no/warwick/nethack/\n\n"
#ifdef KDE
"KDE:\n http://www.kde.org\n"
"NetHack:\n %s\n",
// arguments
#ifdef QT_VERSION_MAJOR
QT_VERSION_MAJOR,
#else
5, // Qt version macro should exist; if not, assume Qt5
#endif
"Qt:\n http://www.troll.no",
VERSION_MAJOR,
VERSION_MINOR,
PATCHLEVEL);
version_string(vbuf), /* nethack version */
#ifdef QT_VERSION_STR
" with Qt " QT_VERSION_STR,
#else
"",
#endif
DEVTEAM_URL);
return msg;
}