ftp://netsw.org/x11/tools/desktop/xscreensaver-4.07.tar.gz
[xscreensaver] / driver / demo-Xm.c
index bf7e0520dc7d582d21c305c04a54681fc373f408..b1b08f867326077fb918d994be2af41dd7ddf2dd 100644 (file)
@@ -72,6 +72,9 @@
 # ifndef XmNtextField          /* Lesstif 0.89.4 bug */
 #  undef HAVE_XMCOMBOBOX
 # endif
+# if (XmVersion < 2001)                /* Lesstif has two personalities these days */
+#  undef HAVE_XMCOMBOBOX
+# endif
 #endif /* HAVE_XMCOMBOBOX */
 
 #include "version.h"
@@ -351,8 +354,13 @@ about_menu_cb (Widget button, XtPointer client_data, XtPointer ignored)
   *s2 = 0;
   s2 += 2;
 
-  sprintf (buf, "%s\n%s\n\n"
-           "For updates, check http://www.jwz.org/xscreensaver/",
+  sprintf (buf, "%s\n%s\n"
+           "\n"
+           "This is the Motif version of \"xscreensaver-demo\".  The Motif\n"
+           "version is no longer maintained.  Please use the GTK version\n"
+           "instead, which has many more features.\n"
+           "\n"
+           "For xscreensaver updates, check http://www.jwz.org/xscreensaver/",
            s, s2);
   free (s);
 
@@ -1012,6 +1020,10 @@ populate_prefs_page (Widget top, prefs_pair *pair)
          }
       }
 
+#ifdef HAVE_XF86VMODE_GAMMA
+    found_any_writable_cells = True;  /* if we can gamma fade, go for it */
+#endif
+
     XtVaSetValues (name_to_widget (top, "fadeSecondsLabel"), XtNsensitive,
                            found_any_writable_cells, 0);
     XtVaSetValues (name_to_widget (top, "fadeTicksLabel"), XtNsensitive,
@@ -1259,6 +1271,7 @@ get_hack_blurb (screenhack *hack)
     }
   else
     {
+# if 0
       static int doc_installed = 0;
       if (doc_installed == 0)
         {
@@ -1279,7 +1292,16 @@ get_hack_blurb (screenhack *hack)
                   "To fix this problem, delete that file, or "
                   "install a current version (either will work.)");
       else
-        doc_string = strdup ("");
+# endif /* 0 */
+        doc_string = strdup (
+           "\n"
+           "This is the Motif version of \"xscreensaver-demo\".  The Motif "
+           "version is no longer maintained.  Please use the GTK version "
+           "instead, which has many more features."
+           "\n\n"
+           "If you were running the GTK version, there would be a preview "
+           "of this screen saver mode displayed here, along with graphical "
+           "configuration options.");
     }
 
   return doc_string;
@@ -1648,10 +1670,8 @@ static int
 demo_ehandler (Display *dpy, XErrorEvent *error)
 {
   fprintf (stderr, "\nX error in %s:\n", progname);
-  if (XmuPrintDefaultErrorMessage (dpy, error, stderr))
-    exit (-1);
-  else
-    fprintf (stderr, " (nonfatal.)\n");
+  XmuPrintDefaultErrorMessage (dpy, error, stderr);
+  exit (-1);
   return 0;
 }