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

« back to all changes in this revision

Viewing changes to lisp/sawfish/wm/ext/beos-window-menu.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:
4
4
 
5
5
;; Copyright (C) 2000 John Harper <john@dcs.warwick.ac.uk>
6
6
 
7
 
;; This file is part of sawmill.
 
7
;; This file is part of sawfish.
8
8
 
9
 
;; sawmill is free software; you can redistribute it and/or modify it
 
9
;; sawfish is free software; you can redistribute it and/or modify it
10
10
;; under the terms of the GNU General Public License as published by
11
11
;; the Free Software Foundation; either version 2, or (at your option)
12
12
;; any later version.
13
13
 
14
 
;; sawmill is distributed in the hope that it will be useful, but
 
14
;; sawfish is distributed in the hope that it will be useful, but
15
15
;; WITHOUT ANY WARRANTY; without even the implied warranty of
16
16
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
17
;; GNU General Public License for more details.
18
18
 
19
19
;; You should have received a copy of the GNU General Public License
20
 
;; along with sawmill; see the file COPYING.  If not, write to
 
20
;; along with sawfish; see the file COPYING.  If not, write to
21
21
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22
22
 
23
23
(define-structure sawfish.wm.ext.beos-window-menu
25
25
    (export beos-window-menu)
26
26
 
27
27
    (open rep
 
28
          rep.util.utf8
28
29
          sawfish.wm.windows
29
30
          sawfish.wm.misc
30
31
          sawfish.wm.custom
38
39
 
39
40
  (define (abbreviate name #!optional len)
40
41
    (unless len (setq len 20))
41
 
    (if (> (length name) len)
42
 
        (concat (substring name 0 len) "...")
 
42
    (if (> (utf8-string-length name) len)
 
43
        (concat (utf8-substring name 0 len) "...")
43
44
      name))
44
45
 
45
46
  (define (make-label w)