X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lisp%2Fdialog.el;h=db1ed86b6210dcde63f0588f27551cdc8b58f744;hb=426fe636212336bb32a5e6f187c4d623709fa57d;hp=03a993190e2f8b34568fa84d8c26c14f3971c7ba;hpb=98a6e4055a1fa624c592ac06f79287d55196ca37;p=chise%2Fxemacs-chise.git diff --git a/lisp/dialog.el b/lisp/dialog.el index 03a9931..db1ed86 100644 --- a/lisp/dialog.el +++ b/lisp/dialog.el @@ -189,12 +189,10 @@ The keywords allowed for `general' are :spec The widget spec -- anything that can be passed to `make-glyph'. - :title The title of the frame. :parent The frame is made a child of this frame (defaults to the selected frame). - :properties Additional properties of the frame, as well as `dialog-frame-plist'. @@ -264,6 +262,18 @@ The keywords allowed are --------------------------------------------------------------------------- +For type `directory': + +The keywords allowed are + +:initial-directory + The initial directory to be selected in the dialog box (defaults to the + current buffer's `default-directory). +:title + The title of the dialog box (defaults to \"Open\"). + +--------------------------------------------------------------------------- + For type `print': This invokes the Windows standard Print dialog. @@ -276,43 +286,53 @@ The keywords allowed are An 'msprinter device. :print-settings A printer settings object. +:allow-selection + t or nil -- whether the \"Selection\" button is enabled (defaults to nil). +:allow-pages + t or nil -- whether the \"Pages\" button and associated edit controls + are enabled (defaults to t). +:selected-page-button + `all', `selection', or `pages' -- which page button is initially + selected. -Exactly one of these keywords must be given. +Exactly one of :device and :print-settings must be given. The function brings up the Print dialog, where the user can -select a different printer and/or change printer options. Connection +select a different printer and/or change printer options. Connection name can change as a result of selecting a different printer device. If -a printer is specified, then changes are stored into the settings object +a device is specified, then changes are stored into the settings object currently selected into that printer. If a settings object is supplied, -then changes are recorded into it, and, it it is selected into a +then changes are recorded into it, and, it is selected into a printer, then changes are propagated to that printer too. Return value is nil if the user has canceled the dialog. Otherwise, it is a new plist, with the following properties: - name Printer device name, even if unchanged by the user. - from-page First page to print, 1-based. If not specified by the user, - then this value is not included in the plist. - to-page Last page to print, inclusive, 1-based. If not specified by - the user, then this value is not included in the plist. - copies Number of copies to print. Always returned. + name Printer device name, even if unchanged by the user. + from-page First page to print, 1-based. Returned if + `selected-page-button' is `pages'. + user, then this value is not included in the plist. + to-page Last page to print, inclusive, 1-based. Returned if + `selected-page-button' is `pages'. + copies Number of copies to print. Always returned. + selected-page-button Which page button was selected (`all', `selection', + or `pages'). The DEVICE is destroyed and an error is signaled in case of initialization problem with the new printer. -See also the `page-setup' and `print-setup' dialog boxes. +See also the `page-setup' dialog box type. --------------------------------------------------------------------------- For type `page-setup': This invokes the Windows standard Page Setup dialog. -This dialog is usually invoked in response to the Page Setup command, and -used to choose such parameters as page orientation, print margins etc. -Note that this dialog contains the \"Printer\" button, which invokes -the Printer Setup dialog (see `msprinter-print-setup-dialog') so that the -user can update the printer options or even select a different printer -as well. +This dialog is usually invoked in response to the Page Setup command, +and used to choose such parameters as page orientation, print margins +etc. Note that this dialog contains the \"Printer\" button, which +invokes the Printer Setup dialog so that the user can update the +printer options or even select a different printer as well. The keywords allowed are @@ -328,9 +348,9 @@ Exactly one of these keywords must be given. The function brings up the Page Setup dialog, where the user can select a different printer and/or change printer options. Connection name can change as a result of selecting a different printer -device. If a printer is specified, then changes are stored into the +device. If a device is specified, then changes are stored into the settings object currently selected into that printer. If a settings -object is supplied, then changes are recorded into it, and, it it is +object is supplied, then changes are recorded into it, and, it is selected into a printer, then changes are propagated to that printer too. @@ -341,45 +361,13 @@ is used to initialize the dialog. Return value is nil if the user has canceled the dialog. Otherwise, it is a new plist, containing the new list of properties. +NOTE: The margin properties (returned by this function) are *NOT* stored +into the print-settings or device object. + The DEVICE is destroyed and an error is signaled in case of initialization problem with the new printer. -See also the `print' and `print-setup' dialogs. - ---------------------------------------------------------------------------- - -For type `print-setup': - -This invokes the Windows standard Print Setup dialog. -This dialog is usually invoked when the user selects the Printer Setup -command. - -The keywords allowed are - -:device - An 'msprinter device. -:print-settings - A printer settings object. - -Exactly one of these keywords must be given. - -The function brings up the Print Setup dialog, where the user -can select a different printer and/or change printer options. -Connection name can change as a result of selecting a different printer -device. If a printer is specified, then changes are stored into the -settings object currently selected into that printer. If a settings -object is supplied, then changes are recorded into it, and, it it is -selected into a printer, then changes are propagated to that printer -too. - -Return value is nil if the user has canceled the dialog. Otherwise, it -is a new plist, with the following properties: - name Printer device name, even if unchanged by the user. - -The printer device is destroyed and an error is signaled if new printer -is selected by the user, but cannot be initialized. - -See also the `print' and `page-setup' dialogs. +See also the `print' dialog box type. --------------------------------------------------------------------------- @@ -641,15 +629,16 @@ The keywords allowed are (let ((newbuf (generate-new-buffer " *dialog box*"))) (set-buffer-dedicated-frame newbuf frame) (set-frame-property frame 'dialog-box-buffer newbuf) + (set-window-buffer (frame-root-window frame) newbuf) (with-current-buffer newbuf - (setq frame-title-format cl-title) - (make-local-hook 'delete-frame-hook) - (add-hook 'delete-frame-hook - #'(lambda (frame) - (kill-buffer - (frame-property - frame - 'dialog-box-buffer)))))) + (set (make-local-variable 'frame-title-format) + cl-title) + (add-local-hook 'delete-frame-hook + #'(lambda (frame) + (kill-buffer + (frame-property + frame + 'dialog-box-buffer)))))) frame))) (if cl-modal (dialog-box-modal-loop '(create-dialog-box-frame))