1
;; compat.jl -- aliases for obsolete functions
2
;; $Id: compat.jl,v 1.13 2000/09/11 07:44:42 john Exp $
4
;; Copyright (C) 1999 John Harper <john@dcs.warwick.ac.uk>
6
;; This file is part of sawmill.
8
;; sawmill is free software; you can redistribute it and/or modify it
9
;; under the terms of the GNU General Public License as published by
10
;; the Free Software Foundation; either version 2, or (at your option)
13
;; sawmill is distributed in the hope that it will be useful, but
14
;; WITHOUT ANY WARRANTY; without even the implied warranty of
15
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
;; GNU General Public License for more details.
18
;; You should have received a copy of the GNU General Public License
19
;; along with sawmill; see the file COPYING. If not, write to
20
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22
(define-structure sawfish.wm.util.compat
30
sawmill-lisp-lib-directory
31
sawmill-site-lisp-directory
32
sawmill-exec-directory
36
custom-set-frame-style)
44
;;; obsolete functions
46
(define (show-message #!optional text font fg bg position)
49
(setq attrs (cons (cons 'font font) attrs)))
51
(setq attrs (cons (cons 'fg fg) attrs)))
53
(setq attrs (cons (cons 'bg bg) attrs)))
55
(setq attrs (cons (cons 'position position) attrs)))
56
(display-message text attrs)))
58
(define ws-copy-window copy-window-to-workspace)
59
(define ws-move-window move-window-to-workspace)
60
(define ws-insert-workspace insert-workspace)
61
(define ws-remove-workspace remove-workspace)
63
;;; obsolete variables
65
(define sawmill-directory sawfish-directory)
66
(define sawmill-lisp-lib-directory sawfish-lisp-lib-directory)
67
(define sawmill-site-lisp-directory sawfish-site-lisp-directory)
68
(define sawmill-exec-directory sawfish-exec-directory)
69
(define sawmill-version sawfish-version)
73
(define (define-commands index)
74
(let ((fn (lambda (base)
75
(intern (format nil "%s:%d" base (1+ index))))))
76
(define-command (fn "select-workspace")
77
(lambda () (select-workspace-from-first index)))
78
(define-command (fn "send-to-workspace")
79
(lambda (w) (send-window-to-workspace-from-first w index)) #:spec "%W")
80
(define-command (fn "copy-to-workspace")
81
(lambda (w) (send-window-to-workspace-from-first w index t)) #:spec "%W")
82
(put (fn "select-workspace") 'deprecated-command t)
83
(put (fn "send-to-workspace") 'deprecated-command t)
84
(put (fn "copy-to-workspace") 'deprecated-command t)))
90
(define-command 'insert-workspace (command-ref 'insert-workspace-after))
91
(put 'insert-workspace 'deprecated-command t)
95
(put 'viewport-columns 'custom-obsolete t)
96
(put 'viewport-rows 'custom-obsolete t)
97
(put 'viewport-dimensions 'custom-obsolete t)
98
(put 'preallocated-workspaces 'custom-obsolete t)
99
(put 'iconify-whole-group 'custom-obsolete t)
100
(put 'uniconify-whole-group 'custom-obsolete t)
101
(put 'always-update-frames 'custom-obsolete t)
103
;;; obsolete custom setters
105
(define (custom-set-color var value #!optional req)
106
(custom-set-typed-variable var value 'color req))
107
(define (custom-set-font var value #!optional req)
108
(custom-set-typed-variable var value 'font req))
109
(define (custom-set-frame-style var value #!optional req)
110
(custom-set-typed-variable var value 'frame-style req))
112
(define-custom-setter 'custom-set-color custom-set-color)
113
(define-custom-setter 'custom-set-font custom-set-font)
114
(define-custom-setter 'custom-set-frame-style custom-set-frame-style))