http://ftp.x.org/contrib/applications/xscreensaver-2.34.tar.gz
[xscreensaver] / driver / dialogs-Xm.c
index 0daa7b352ba9484fdf9ff0e095049aadbf0bf7dd..22aa97052c4b1c576926d52508c83c78d2a2f74f 100644 (file)
@@ -1,5 +1,5 @@
 /* dialogs-Xm.c --- Motif widgets for demo, options, and password dialogs.
- * xscreensaver, Copyright (c) 1993-1997 Jamie Zawinski <jwz@netscape.com>
+ * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
 
 #include "visual.h"    /* for visual_depth() */
 
-Widget passwd_dialog;
-Widget passwd_form;
-Widget roger_label;
-Widget passwd_label1;
-Widget passwd_label3;
-Widget passwd_text;
-Widget passwd_done;
-Widget passwd_cancel;
-
 Widget resources_dialog;
 Widget resources_form;
 Widget timeout_text;
@@ -80,129 +71,6 @@ Widget done;
 Widget restart;
 Widget spacer;
 
-
-void
-create_passwd_dialog(Widget parent, Visual *visual, Colormap colormap)
-{
-  Widget shell;
-  Widget  form1;
-  Widget   roger;
-  Widget   dialog;
-  Widget    form2;
-  Widget     label1, label2, label3;
-  Widget    text;
-  Widget    ok, cancel;
-  Widget w;
-  Arg al[64];
-  int ac = 0;
-
-  ac = 0;
-  XtSetArg (al[ac], XmNvisual, visual); ac++;
-  XtSetArg (al[ac], XmNcolormap, colormap); ac++;
-  XtSetArg (al[ac], XmNdepth, visual_depth(XtScreen(parent), visual)); ac++;
-
-  shell = XmCreateDialogShell (parent, "passwdDialog", al, ac);
-
-  form1 = XmCreateForm (shell, "form", 0, 0);
-
-  roger = XmCreateDrawnButton (form1, "rogerLabel", 0, 0);
-
-  dialog = XmCreateSelectionBox (form1, "passwdForm", al, ac);
-
-  form2 = XmCreateForm ( dialog, "form", 0, 0);
-  label1 = XmCreateLabel ( form2, "passwdLabel1", 0, 0);
-  label2 = XmCreateLabel ( form2, "passwdLabel2", 0, 0);
-  label3 = XmCreateLabel ( form2, "passwdLabel3", 0, 0);
-
-  text = XmSelectionBoxGetChild (dialog, XmDIALOG_TEXT);
-  ok = XmSelectionBoxGetChild (dialog, XmDIALOG_OK_BUTTON);
-  cancel = XmSelectionBoxGetChild (dialog, XmDIALOG_CANCEL_BUTTON);
-
-  w = XmSelectionBoxGetChild (dialog, XmDIALOG_LIST_LABEL);
-  if (w) XtUnmanageChild (w);
-  w = XmSelectionBoxGetChild (dialog, XmDIALOG_LIST);
-  if (w) XtUnmanageChild (XtParent(w));
-  w = XmSelectionBoxGetChild (dialog, XmDIALOG_SELECTION_LABEL);
-  if (w) XtUnmanageChild (w);
-  w = XmSelectionBoxGetChild (dialog, XmDIALOG_SEPARATOR);
-  if (w) XtUnmanageChild (w);
-  w = XmSelectionBoxGetChild (dialog, XmDIALOG_APPLY_BUTTON);
-  if (w) XtUnmanageChild (w);
-  w = XmSelectionBoxGetChild (dialog, XmDIALOG_HELP_BUTTON);
-  if (w) XtUnmanageChild (w);
-
-  XtVaSetValues(label1,
-               XmNtopAttachment, XmATTACH_FORM,
-               XmNleftAttachment, XmATTACH_FORM,
-               XmNrightAttachment, XmATTACH_FORM,
-               XmNbottomAttachment, XmATTACH_NONE,
-               0);
-  XtVaSetValues(label2,
-               XmNtopAttachment, XmATTACH_WIDGET,
-               XmNtopWidget, label1,
-               XmNleftAttachment, XmATTACH_FORM,
-               XmNrightAttachment, XmATTACH_FORM,
-               XmNbottomAttachment, XmATTACH_NONE,
-               0);
-  XtVaSetValues(label3,
-               XmNtopAttachment, XmATTACH_WIDGET,
-               XmNtopWidget, label2,
-               XmNleftAttachment, XmATTACH_FORM,
-               XmNrightAttachment, XmATTACH_FORM,
-               XmNbottomAttachment, XmATTACH_FORM,
-               0);
-
-  XtVaSetValues(roger,
-               XmNsensitive, FALSE,
-               XmNtopAttachment, XmATTACH_FORM,
-               XmNleftAttachment, XmATTACH_FORM,
-               XmNrightAttachment, XmATTACH_NONE,
-               XmNbottomAttachment, XmATTACH_FORM,
-               0);
-  XtVaSetValues(dialog,
-               XmNtopAttachment, XmATTACH_FORM,
-               XmNleftAttachment, XmATTACH_WIDGET,
-               XmNleftWidget, roger,
-               XmNrightAttachment, XmATTACH_FORM,
-               XmNbottomAttachment, XmATTACH_FORM,
-               0);
-
-  XtManageChild(label1);
-  XtManageChild(label2);
-  XtManageChild(label3);
-
-  XtManageChild(form2);
-  XtManageChild(text);
-  XtManageChild(ok);
-  XtManageChild(cancel);
-
-  XtManageChild(roger);
-  XtManageChild(dialog);
-
-  {
-    Dimension width = 0, height = 0;
-    XtRealizeWidget(form1);
-    XtVaGetValues(roger, XmNwidth, &width, XmNheight, &height, 0);
-    if (width == height)
-      ;
-    else if (width > height)
-      XtVaSetValues(roger, XmNwidth, width, XmNheight, width, 0);
-    else
-      XtVaSetValues(roger, XmNwidth, height, XmNheight, height, 0);
-  }
-
-  passwd_dialog = shell;
-  passwd_form = form1;
-  roger_label = roger;
-  passwd_label1 = label1;
-  passwd_label3 = label3;
-  passwd_text = text;
-  passwd_done = ok;
-  passwd_cancel = cancel;
-}
-
-
-
 void
 create_resources_dialog(Widget parent, Visual *visual, Colormap colormap)
 {