Package: gtk
Function gtk-dialog-set-alternative-button-order
Lambda Listgtk-dialog-set-alternative-button-order (dialog response) ArgumentsDetails
Sets an alternative button order. If the gtk-alternative-button-order setting is set to true, the dialog buttons are reordered according to the order of the
response IDs passed to this function. By default, GTK dialogs use the button order advocated by the GNOME Human Interface Guidelines with the affirmative button at the far right, and the cancel button left of it. But the built-in GTK dialogs and message dialogs do provide an alternative button order, which is more suitable on some platforms, e.g. Windows. Examples(let (;; Create a dialog with three buttons (dialog (gtk-dialog-new-with-buttons "Demo Dialog" nil ; No Parent window '(:modal) "gtk-cancel" :cancel "gtk-ok" :ok "gtk-apply" :apply))) ;; Set the default button. (gtk-widget-grab-default (gtk-dialog-widget-for-response dialog :ok)) ;; Allow alternative button order for the default screen. (setf (gtk-settings-gtk-alternative-button-order (gtk-settings-default)) t) ;; Set the alternative button order. (gtk-dialog-set-alternative-button-order dialog '(:ok :cancel :apply)) ...) Warning | See also |
2021-9-26