~ubuntu-branches/ubuntu/precise/grass/precise

« back to all changes in this revision

Viewing changes to gui/wxpython/scripts/p.mon

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2011-04-13 17:08:41 UTC
  • mfrom: (8.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110413170841-ss1t9bic0d0uq0gz
Tags: 6.4.1-1
* New upstream version.
* Now build-dep on libjpeg-dev and current libreadline6-dev.
* Removed patch swig: obsolete.
* Policy bumped to 3.9.2, without changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
#%Module
4
 
#% description: To establish and control use of a graphics display monitor.
5
 
#% keywords: display
6
 
#%End
7
 
#%Flag
8
 
#% key: l
9
 
#% description: List all monitors
10
 
#%End
11
 
#%Flag
12
 
#% key: L
13
 
#% description: List all monitors (with current status)
14
 
#%End
15
 
#%Flag
16
 
#% key: p
17
 
#% description: Print name of currently selected monitor
18
 
#%End
19
 
#%Flag
20
 
#% key: r
21
 
#% description: Release currently selected monitor
22
 
#%End
23
 
#%Flag
24
 
#% key: s
25
 
#% description: Do not automatically select when starting
26
 
#%End
27
 
#%Option
28
 
#% key: start
29
 
#% type: string
30
 
#% required: no
31
 
#% multiple: no
32
 
#% description: Name of graphics monitor to start (p0-p9)
33
 
#%End
34
 
#%Option
35
 
#% key: stop
36
 
#% type: string
37
 
#% required: no
38
 
#% multiple: no
39
 
#% description: Name of graphics monitor to stop
40
 
#%End
41
 
#%Option
42
 
#% key: select
43
 
#% type: string
44
 
#% required: no
45
 
#% multiple: no
46
 
#% description: Name of graphics monitor to select
47
 
#%End
48
 
#%Option
49
 
#% key: unlock
50
 
#% type: string
51
 
#% required: no
52
 
#% multiple: no
53
 
#% description: Name of graphics monitor to unlock
54
 
#%End
55
 
 
56
 
if [ -z "$GISBASE" ] ; then
57
 
    echo "You must be in GRASS GIS to run this program." 1>&2
58
 
    exit 1
59
 
fi
60
 
 
61
 
if [ "$1" != "@ARGS_PARSED@" ] ; then
62
 
    exec g.parser "$0" "$@"
63
 
fi
64
 
 
65
 
# CODE GOES HERE
66
 
 
67
 
if [ -z "$PYTHONPATH" ] ; then
68
 
   PYTHONPATH="$GISBASE/etc/wxpython"
69
 
else
70
 
   PYTHONPATH="$GISBASE/etc/wxpython:$PYTHONPATH"
71
 
fi
72
 
export PYTHONPATH
73
 
 
74
 
start="$GIS_OPT_START"
75
 
select="$GIS_OPT_SELECT"
76
 
stop="$GIS_OPT_STOP"
77
 
unlock="$GIS_OPT_UNLOCK"
78
 
 
79
 
# create the command file
80
 
command_file="`g.tempfile pid=$$`"
81
 
g.gisenv set="GRASS_PYCMDFILE=${command_file}"
82
 
 
83
 
if [ -n "$start" ] ; then
84
 
    "$GRASS_PYTHON" "$PYTHONPATH/gui_modules/mapdisp.py" "$start" "${command_file}" &
85
 
fi
86
 
 
87
 
if [[ -n "$stop" || -n "$select" || -n "$unlock" ]] ; then
88
 
    g.message -w "Not implemented yet"
89
 
fi
90
 
 
91
 
exit 0