~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to lib/gtcltk/options.tcl

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
############################################################################
2
 
#
3
 
# LIBRARY:      options.tcl gui options
4
 
# AUTHOR(S):    Cedric Shock (cedricgrass AT shockfamily.net)
5
 
# PURPOSE:      Default options and load user options
6
 
# COPYRIGHT:    (C) 2006 GRASS Development Team
7
 
#
8
 
#               This program is free software under the GNU General Public
9
 
#               License (>=v2). Read the file COPYING that comes with GRASS
10
 
#               for details.
11
 
#
12
 
############################################################################
13
 
 
14
 
lappend auto_path $env(GISBASE)/bwidget
15
 
package require -exact BWidget 1.2.1
16
 
 
17
 
# set background color and help font
18
 
# These globals are still used in a few places by things in gis.m
19
 
set bgcolor HoneyDew2
20
 
 
21
 
##############################################################################
22
 
# Create fonts
23
 
 
24
 
proc fontcreate {font args} {
25
 
        if {[lsearch [font names] $font] == -1} {
26
 
                eval font create $font $args
27
 
        } else {
28
 
                eval font configure $font $args
29
 
        }
30
 
}
31
 
 
32
 
fontcreate balloon-help -family Helvetica -size -12
33
 
fontcreate default -family Helvetica -size -12
34
 
fontcreate textfont -family Courier -size -12
35
 
fontcreate bolddefault -family Helvetica -size 12 -weight bold
36
 
fontcreate introfont -family Helvetica -size 14 -weight bold
37
 
 
38
 
global bolddefault
39
 
global introfont
40
 
global textfont
41
 
global default
42
 
 
43
 
##############################################################################
44
 
# Configure balloon help:
45
 
 
46
 
DynamicHelp::configure -font balloon-help -fg black -bg "#FFFF77"
47
 
 
48
 
##############################################################################
49
 
# Configure almost everything using the options database
50
 
 
51
 
# Font to use everywhere
52
 
option add *font default
53
 
# Font in labelframes of labels in bwidgets is prefixed with label:
54
 
option add *labelfont default
55
 
 
56
 
# Various background colors
57
 
option add *background #dddddd
58
 
option add *activeBackground #dddddd
59
 
option add *highlightBackground #dddddd
60
 
option add *ButtonBox.background HoneyDew2
61
 
option add *ButtonBox*add.highlightBackground HoneyDew2
62
 
option add *MainFrame.background HoneyDew2
63
 
option add *PanedWindow.background HoneyDew2
64
 
option add *Menu.background HoneyDew2
65
 
option add *listbox.background white
66
 
option add *addindicator.background white
67
 
 
68
 
# Things that are selected:
69
 
option add *selectBackground #ffff9b
70
 
option add *selectForeground black
71
 
 
72
 
# Menus use active instead of selected
73
 
option add *Menu.activeBackground #ffff9b
74
 
option add *Menu.activeForeground black
75
 
 
76
 
# Scrollbar trough color
77
 
option add *troughColor HoneyDew3
78
 
 
79
 
# Entry widgets and text widgets should have a white background
80
 
option add *Entry.background white
81
 
option add *entry.background white
82
 
option add *Entry.highlightbackground #dddddd
83
 
option add *entrybg white
84
 
option add *Text.background white
85
 
option add *Entry.font textfont
86
 
option add *Text.font textfont
87
 
 
88
 
# Options for map canvases
89
 
option add *mapcanvas.background #eeeeee
90
 
option add *mapcanvas.insertbackground black
91
 
option add *mapcanvas.selectbackground #c4c4c4
92
 
option add *mapcanvas.selectforeground black
93
 
 
94
 
 
95
 
##############################################################################
96
 
# Platform specific default settings:
97
 
# keycontrol is control key used in copy-paste bindings
98
 
 
99
 
set keycontrol "Control"
100
 
 
101
 
if {[info exists env(osxaqua)]} {
102
 
    set osxaqua $env(osxaqua)
103
 
} else {
104
 
    set osxaqua "0"
105
 
}
106
 
 
107
 
if { $osxaqua == "1"} {
108
 
    set keycontrol "Command"
109
 
}
110
 
 
111
 
if {[info exists env(OS)] && $env(OS) == "Windows_NT"} {
112
 
    set mingw "1"
113
 
} else {
114
 
    set mingw "0"
115
 
}