File xscreensaver-disable-upgrade-nagging-message.patch of Package xscreensaver.24904
Index: xscreensaver-5.22/driver/demo-Gtk.c
===================================================================
--- xscreensaver-5.22/driver/demo-Gtk.c
+++ xscreensaver-5.22/driver/demo-Gtk.c
@@ -5297,20 +5297,6 @@ main (int argc, char **argv)
the_network_is_not_the_computer (s);
- if (senescent_p())
- warning_dialog (s->toplevel_widget,
- _("Warning:\n\n"
- "This version of xscreensaver is VERY OLD!\n"
- "Please upgrade!\n"
- "\n"
- "http://www.jwz.org/xscreensaver/\n"
- "\n"
- "(If this is the latest version that your distro ships, then\n"
- "your distro is doing you a disservice. Build from source.)\n"
- ),
- D_NONE, 7);
-
-
/* Run the Gtk event loop, and not the Xt event loop. This means that
if there were Xt timers or fds registered, they would never get serviced,
and if there were any Xt widgets, they would never have events delivered.
Index: xscreensaver-5.22/driver/lock.c
===================================================================
--- xscreensaver-5.22/driver/lock.c
+++ xscreensaver-5.22/driver/lock.c
@@ -487,11 +487,6 @@ make_passwd_window (saver_info *si,
* room for the dialog to grow without going off the edge of the screen. */
max_string_width_px *= 0.75;
- if (!info_msg && senescent_p())
- info_msg = ("\n"
- "This version of XScreenSaver\n"
- "is very old! Please upgrade!\n");
-
pw->info_label = mlstring_new(info_msg ? info_msg : pw->body_label,
pw->label_font, max_string_width_px);
Index: xscreensaver-5.22/driver/prefs.c
===================================================================
--- xscreensaver-5.22/driver/prefs.c
+++ xscreensaver-5.22/driver/prefs.c
@@ -1649,44 +1649,3 @@ stop_the_insanity (saver_preferences *p)
if (p->pointer_hysteresis < 0) p->pointer_hysteresis = 0;
if (p->pointer_hysteresis > 100) p->pointer_hysteresis = 100;
}
-
-
-/* Getting very tired of bug reports of already-fixed bugs due to
- Linux distros shipping multi-year-old versions.
- */
-Bool
-senescent_p (void)
-{
- time_t now = time ((time_t *) 0);
- struct tm *tm = localtime (&now);
- char *s, mon[4], year[5];
- int m, y, months;
- s = strchr (screensaver_id, '-');
- s++;
- strncpy (mon, s, 3);
- s = strchr (s, '-');
- s++;
- strncpy (year, s, 4);
- mon[3] = 0;
- year[4] = 0;
- if (!strcmp(mon, "Jan")) m = 0;
- else if (!strcmp(mon, "Feb")) m = 1;
- else if (!strcmp(mon, "Mar")) m = 2;
- else if (!strcmp(mon, "Apr")) m = 3;
- else if (!strcmp(mon, "May")) m = 4;
- else if (!strcmp(mon, "Jun")) m = 5;
- else if (!strcmp(mon, "Jul")) m = 6;
- else if (!strcmp(mon, "Aug")) m = 7;
- else if (!strcmp(mon, "Sep")) m = 8;
- else if (!strcmp(mon, "Oct")) m = 9;
- else if (!strcmp(mon, "Nov")) m = 10;
- else if (!strcmp(mon, "Dec")) m = 11;
- else abort();
-
- y = (year[0]-'0')*1000 + (year[1]-'0')*100 + (year[2]-'0')*10 +(year[3]-'0');
-
- months = ((((tm->tm_year + 1900) * 12) + tm->tm_mon) -
- (y * 12 + m));
-
- return (months > 12);
-}
Index: xscreensaver-5.22/driver/prefs.h
===================================================================
--- xscreensaver-5.22/driver/prefs.h
+++ xscreensaver-5.22/driver/prefs.h
@@ -20,7 +20,6 @@ extern int write_init_file (Display *,
saver_preferences *, const char *version_string,
Bool verbose_p);
const char *init_file_name (void);
-extern Bool senescent_p (void);
extern screenhack *parse_screenhack (const char *line);
extern void free_screenhack (screenhack *);
Index: xscreensaver-5.22/driver/splash.c
===================================================================
--- xscreensaver-5.22/driver/splash.c
+++ xscreensaver-5.22/driver/splash.c
@@ -114,8 +114,6 @@ struct splash_dialog_data {
char *heading_label;
char *body_label;
char *body2_label;
- char *body3_label;
- char *body4_label;
char *demo_label;
#ifdef PREFS_BUTTON
char *prefs_label;
@@ -167,20 +165,6 @@ make_splash_dialog (saver_info *si)
Colormap cmap;
char *f;
- Bool whine = senescent_p ();
-
- if (whine)
- {
- /* If locking is not enabled, make sure they see the message. */
- if (!p->lock_p)
- {
- si->prefs.splash_p = True;
- if (si->prefs.splash_duration < 5000)
- si->prefs.splash_duration = 5000;
- }
- si->prefs.splash_duration += 3000;
- }
-
if (si->sp_data)
return;
if (!si->prefs.splash_p ||
@@ -220,12 +204,6 @@ make_splash_dialog (saver_info *si)
- if (whine)
- {
- sp->body3_label = strdup("WARNING: This version is very old!");
- sp->body4_label = strdup("Please upgrade!");
- }
-
if (!sp->heading_label)
sp->heading_label = strdup("ERROR: REESOURCES NOT INSTALLED CORRECTLY");
if (!sp->body_label)
@@ -337,20 +315,6 @@ make_splash_dialog (saver_info *si)
if (overall.width > sp->width) sp->width = overall.width;
sp->height += ascent + descent;
- /* Measure the optional body3_label. */
- if (sp->body3_label)
- {
- XTextExtents (sp->heading_font,
- sp->body3_label, strlen(sp->body3_label),
- &direction, &ascent, &descent, &overall);
- if (overall.width > sp->width) sp->width = overall.width;
- XTextExtents (sp->heading_font,
- sp->body4_label, strlen(sp->body4_label),
- &direction, &ascent, &descent, &overall);
- if (overall.width > sp->width) sp->width = overall.width;
- sp->height += (ascent + descent) * 5;
- }
-
{
Dimension w2 = 0, w3 = 0, w4 = 0;
Dimension h2 = 0, h3 = 0, h4 = 0;
@@ -549,24 +513,6 @@ draw_splash_window (saver_info *si)
sp->body2_label, strlen(sp->body2_label));
y1 += sp->body_font->descent;
- if (sp->body3_label)
- {
- XSetFont (si->dpy, gc1, sp->heading_font->fid);
- y1 += sp->heading_font->ascent + sp->heading_font->descent;
- y1 += sp->heading_font->ascent;
- sw = string_width (sp->heading_font, sp->body3_label);
- x2 = (x1 + ((x3 - x1 - sw) / 2));
- XDrawString (si->dpy, si->splash_dialog, gc1, x2, y1,
- sp->body3_label, strlen(sp->body3_label));
- y1 += sp->heading_font->descent + sp->heading_font->ascent;
- sw = string_width (sp->heading_font, sp->body4_label);
- x2 = (x1 + ((x3 - x1 - sw) / 2));
- XDrawString (si->dpy, si->splash_dialog, gc1, x2, y1,
- sp->body4_label, strlen(sp->body4_label));
- y1 += sp->heading_font->descent;
- XSetFont (si->dpy, gc1, sp->body_font->fid);
- }
-
/* The buttons
*/
XSetForeground (si->dpy, gc1, sp->button_foreground);
@@ -731,8 +677,6 @@ destroy_splash_window (saver_info *si)
if (sp->heading_label) free (sp->heading_label);
if (sp->body_label) free (sp->body_label);
if (sp->body2_label) free (sp->body2_label);
- if (sp->body3_label) free (sp->body3_label);
- if (sp->body4_label) free (sp->body4_label);
if (sp->demo_label) free (sp->demo_label);
#ifdef PREFS_BUTTON
if (sp->prefs_label) free (sp->prefs_label);
Index: xscreensaver-5.22/driver/xscreensaver.c
===================================================================
--- xscreensaver-5.22/driver/xscreensaver.c
+++ xscreensaver-5.22/driver/xscreensaver.c
@@ -784,17 +784,6 @@ print_banner (saver_info *si)
"\n",
blurb());
- if (p->verbose_p && senescent_p ())
- fprintf (stderr, "\n"
- "*************************************"
- "**************************************\n"
- "%s: Warning: this version of xscreensaver is VERY OLD!\n"
- "%s: Please upgrade! http://www.jwz.org/xscreensaver/\n"
- "*************************************"
- "**************************************\n"
- "\n",
- blurb(), blurb());
-
if (p->verbose_p)
{
if (!si->uid_message || !*si->uid_message)