Greetings,
Attempts to update packages through the "Tools->Packages->Update
Installed Packages" menu fail with the error message:
"Button descriptor is too small: ["Yes" (dialog-box-finish t)]
This is because yes-or-no-p-dialog-box calls make-dialog-box with an array
:buttons whose buttons are vectors with only two elements. The
documentation for the dialog box format clearly states that:
* The rest of the elements are descriptions of the dialog box's
buttons. Each one is a vector of three elements:
- The first element is the text of the button.
- The second element is the "callback".
- The third element is `t' or `nil', whether this button is
selectable.
Procedure popup-builtin-question-dialog (from dialog-gtk.el) verifies that
each button has length at least 3, and complains if it is not the case.
One solution (which I believe correct, but as it is the first time I'm
making any change to Xemacs I'll let others decide whether or not that's
true) is to add a third element "t" to each button. I am attaching a
patch.
**------------------------------------------------------------------------
** Patrice Belleville (patrice(a)cs.ubc.ca) (604) 822-9870
** Instructor and Departmental advisor, Department of Computer Science
**------------------------------------------------------------------------
--- dialog.el.orig Mon May 7 00:50:40 2001
+++ dialog.el Fri Jul 13 12:12:50 2001
@@ -46,10 +46,10 @@
(make-dialog-box 'question
:question prompt
:modal t
- :buttons '(["Yes" (dialog-box-finish t)]
- ["No" (dialog-box-finish nil)]
+ :buttons '(["Yes" (dialog-box-finish t) t]
+ ["No" (dialog-box-finish nil) t]
nil
- ["Cancel" (dialog-box-cancel)]))))
+ ["Cancel" (dialog-box-cancel) t]))))
;; FSF has a similar function `x-popup-dialog'.
(defun get-dialog-box-response (position contents)
Show replies by date