~ubuntu-branches/ubuntu/lucid/sawfish/lucid-updates

« back to all changes in this revision

Viewing changes to lisp/sawfish/ui/main.jl.in

  • Committer: Bazaar Package Importer
  • Author(s): Christian Marillat
  • Date: 2002-01-20 17:42:28 UTC
  • Revision ID: james.westby@ubuntu.com-20020120174228-4q1ydztbkvfq1ht2
Tags: upstream-1.0.1.20020116
ImportĀ upstreamĀ versionĀ 1.0.1.20020116

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# I tried: `REP_LOAD_PATH=... exec ...' but solaris /bin/sh won't play along
 
4
 
 
5
REP_LOAD_PATH="__nokogiridir__"
 
6
export REP_LOAD_PATH
 
7
 
 
8
exec rep "$0" "$@"
 
9
 
 
10
!#
 
11
 
 
12
#| nokogiri-main.jl -- entry point
 
13
 
 
14
   $Id: main.jl.in,v 1.10 2000/11/18 00:32:43 jsh Exp $
 
15
 
 
16
   Copyright (C) 2000 John Harper <john@dcs.warwick.ac.uk>
 
17
 
 
18
   This file is part of sawfish.
 
19
 
 
20
   sawfish is free software; you can redistribute it and/or modify it
 
21
   under the terms of the GNU General Public License as published by
 
22
   the Free Software Foundation; either version 2, or (at your option)
 
23
   any later version.
 
24
 
 
25
   sawfish is distributed in the hope that it will be useful, but
 
26
   WITHOUT ANY WARRANTY; without even the implied warranty of
 
27
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
28
   GNU General Public License for more details.
 
29
 
 
30
   You should have received a copy of the GNU General Public License
 
31
   along with sawfish; see the file COPYING.  If not, write to
 
32
   the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 
33
|#
 
34
 
 
35
(structure ()
 
36
 
 
37
    (open rep
 
38
          rep.system
 
39
          rep.io.streams
 
40
          sawfish.gtk.widget
 
41
          sawfish.ui.i18n
 
42
          sawfish.ui.shell
 
43
          sawfish.ui.group
 
44
          sawfish.ui.user-level)
 
45
 
 
46
  (define socket-id nil)
 
47
 
 
48
  (when (get-command-line-option "--help")
 
49
    (write standard-output "\
 
50
usage: sawfish-ui [OPTIONS...]\n
 
51
where OPTIONS are any of:\n
 
52
  --group=GROUP-NAME
 
53
  --flatten
 
54
  --single-level
 
55
  --socket-id=WINDOW-ID\n")
 
56
    (throw 'quit 0))
 
57
 
 
58
  (let ((group (get-command-line-option "--group" t)))
 
59
    (when group
 
60
      (setq group (read-from-string group))
 
61
      (set-top-group (if (listp group) group `(root ,group)))))
 
62
 
 
63
  (let ((level (get-command-line-option "--user-level" t)))
 
64
    (when level
 
65
      (setq *nokogiri-user-level* (read-from-string level))))
 
66
 
 
67
  (when (get-command-line-option "--flatten")
 
68
    (setq *nokogiri-flatten-groups* t))
 
69
 
 
70
  (when (get-command-line-option "--single-level")
 
71
    (setq *nokogiri-single-level* t))
 
72
 
 
73
  (let ((id (get-command-line-option "--socket-id" t)))
 
74
    (when id
 
75
      (setq socket-id (string->number id))))
 
76
 
 
77
  (setq interrupt-mode 'exit)
 
78
  (i18n-init)
 
79
  (add-widget-prefix 'sawfish.ui.widgets)
 
80
  (run-shell socket-id))
 
81
 
 
82
 
 
83
;; Local variables:
 
84
;; major-mode: lisp-mode
 
85
;; End: