~ubuntu-branches/ubuntu/natty/sawfish/natty

« back to all changes in this revision

Viewing changes to lisp/sawfish/wm/ext/match-window.jl

  • Committer: Bazaar Package Importer
  • Author(s): Luis Rodrigo Gallardo Cruz
  • Date: 2009-11-23 09:05:20 UTC
  • mfrom: (0.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20091123090520-m588qe37wtxzr2b5
Tags: upstream-1.5.3
ImportĀ upstreamĀ versionĀ 1.5.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
;; Copyright (C) 1999 John Harper <john@dcs.warwick.ac.uk>
5
5
 
6
 
;; This file is part of sawmill.
 
6
;; This file is part of sawfish.
7
7
 
8
 
;; sawmill is free software; you can redistribute it and/or modify it
 
8
;; sawfish is free software; you can redistribute it and/or modify it
9
9
;; under the terms of the GNU General Public License as published by
10
10
;; the Free Software Foundation; either version 2, or (at your option)
11
11
;; any later version.
12
12
 
13
 
;; sawmill is distributed in the hope that it will be useful, but
 
13
;; sawfish is distributed in the hope that it will be useful, but
14
14
;; WITHOUT ANY WARRANTY; without even the implied warranty of
15
15
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
16
;; GNU General Public License for more details.
17
17
 
18
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
 
19
;; along with sawfish; see the file COPYING.  If not, write to
20
20
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21
21
 
22
22
;; Commentary:
68
68
 
69
69
  (i18n-defvar match-window-properties
70
70
    `((placement ,(_ "Placement")
71
 
       (avoid boolean)
72
71
       (ignore-program-position boolean)
73
72
       (place-mode ,(lambda () `(choice ,@placement-modes)))
74
73
       (position (pair number number))
77
76
       (viewport (pair (number 1) (number 1)))
78
77
       (depth (number -16 16))
79
78
       (placement-weight number)
 
79
       (fixed-position boolean)
80
80
       (maximized (choice all vertical horizontal)))
81
81
      (focus ,(_ "Focus")
82
82
       (raise-on-focus boolean)
88
88
       (frame-type ,(lambda () `(choice ,@(mapcar car match-window-types))))
89
89
       (frame-style ,(lambda () `(symbol ,@(find-all-frame-styles t)))))
90
90
      (state ,(_ "State")
 
91
       (avoid boolean)
91
92
       (ignored boolean)
92
93
       (iconified boolean)
93
94
       (shaded boolean)
98
99
       (ungrouped boolean)
99
100
       (cycle-skip boolean)
100
101
       (window-list-skip boolean)
101
 
       (task-list-skip boolean))
 
102
       (task-list-skip boolean)
 
103
       (never-iconify boolean)
 
104
       (never-maximize boolean))
102
105
      (other ,(_ "Other")
103
106
       (unique-name boolean)
104
107
       (auto-gravity boolean)
148
151
    :group match-window
149
152
    :require sawfish.wm.ext.match-window)
150
153
 
151
 
  ;; used by sawmill-ui when grabbing property values
 
154
  ;; used by sawfish-ui when grabbing property values
152
155
  (define (match-window-grab-x-property real-prop)
153
156
    (let ((window (select-window))
154
157
          prop)
243
246
    (let ((prop-cache '()))
244
247
 
245
248
      ;; Get the X property P of window W, uses a cache, will
246
 
      ;; reformat properties with a match-window-formatter property 
 
249
      ;; reformat properties with a match-window-formatter property
247
250
      (define (get-prop p)
248
251
        (let
249
252
            ((tem (assq p prop-cache)))
312
315
 
313
316
  (define-match-window-formatter 'WM_CLASS
314
317
   (lambda (vec)
315
 
     (format nil "%s/%s" (aref vec 1) (aref vec 0))))
 
318
     (format nil "%s/%s" (and (> (length vec) 1) (aref vec 1)) (aref vec 0))))
316
319
 
317
320
  (define-match-window-formatter 'WM_COMMAND
318
321
   (lambda (vec)