X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fscreenhack.c;h=089e76b44b9dfed76537cd3ae1a52062c2e59cb6;hp=52344a35a74a319f09fdbea2c9e8b0e787e6d2ed;hb=4ade52359b6eba3621566dac79793a33aa4c915f;hpb=ff35d056d723c9a5ffe728dbba5f1c25e141be04 diff --git a/hacks/screenhack.c b/hacks/screenhack.c index 52344a35..089e76b4 100644 --- a/hacks/screenhack.c +++ b/hacks/screenhack.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1992-2012 Jamie Zawinski +/* xscreensaver, Copyright (c) 1992-2013 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -727,13 +727,17 @@ main (int argc, char **argv) { char *v = (char *) strdup(strchr(screensaver_id, ' ')); char *s1, *s2, *s3, *s4; + const char *ot = get_string_resource (dpy, "title", "Title"); s1 = (char *) strchr(v, ' '); s1++; s2 = (char *) strchr(s1, ' '); s3 = (char *) strchr(v, '('); s3++; s4 = (char *) strchr(s3, ')'); *s2 = 0; *s4 = 0; - sprintf (version, "%s: from the XScreenSaver %s distribution (%s.)", + if (ot && !*ot) ot = 0; + sprintf (version, "%.50s%s%s: from the XScreenSaver %s distribution (%s)", + (ot ? ot : ""), + (ot ? ": " : ""), progclass, s1, s3); free(v); }