File: integration.jl

package info (click to toggle)
sawfish 1%3A1.3.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 11,636 kB
  • ctags: 1,327
  • sloc: lisp: 22,765; ansic: 15,810; sh: 10,203; makefile: 675; perl: 19
file content (66 lines) | stat: -rw-r--r-- 2,403 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
;; gnome-int.jl -- more GNOME integration
;; $Id: integration.jl,v 1.20 2003/08/14 06:55:36 jsh Exp $

;; Copyright (C) 2000 John Harper <john@dcs.warwick.ac.uk>

;; This file is part of sawmill.

;; sawmill is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; sawmill is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with sawmill; see the file COPYING.  If not, write to
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

(define-structure sawfish.wm.gnome.integration ()

    (open rep
	  sawfish.wm.state.gnome
;; FIXME: add support for GNOME 2 applications
	  sawfish.wm.gnome.menus
	  sawfish.wm.menus
	  sawfish.wm.custom
	  sawfish.wm.commands.help
	  sawfish.wm.commands.xterm)

  (define-structure-alias gnome-int sawfish.wm.gnome.integration)

  ;; delete the `Restart' and `Quit' items from the root menu
  (let ((restart (rassoc '(restart) root-menu))
	(quit (rassoc '(quit) root-menu))
	(programs (rassoc 'apps-menu root-menu)))
    (when restart
      (setq root-menu (delq restart root-menu)))
    (when quit
      (setq root-menu (delq quit root-menu)))
    ;; FIXME: until GNOME 2 applications are supported
;;    (when programs
;;      (setq root-menu (delq programs root-menu)))
    (when (null (last root-menu))
      (setq root-menu (delq (last root-menu) root-menu))))

  ;; this option was removed for gnome2
  (put 'gnome-use-capplet 'custom-obsolete t)

  ;; invoke the GNOME terminal instead of xterm
  (unless (variable-customized-p 'xterm-program)
    (setq xterm-program "x-terminal-emulator"))

  ;; use the GNOME help browser and url launcher
  (setq help-display-info-function help-call-info-gnome)
  (setq display-url-command "gnome-moz-remote --newwin '%s'")

  ;; add some GNOME help menus
  (let ((menu (assoc (_ "_Help") root-menu)))
    (when menu
      (nconc menu `(()
		    (,(_ "_GNOME Help...") gnome-help-browser)
		    (,(_ "GNOME WWW...") gnome-www-page)
		    (,(_ "About GNOME...") gnome-about))))))