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

« back to all changes in this revision

Viewing changes to visualization/nviz/scripts/attPopup.tcl

  • 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:
42
42
    
43
43
    wm positionfrom $w program
44
44
    wm sizefrom $w program
45
 
    wm title $w "Attribute"
46
 
    wm iconname $w "Attribute"
 
45
    wm title $w [G_msg "Attribute"]
 
46
    wm iconname $w [G_msg "Attribute"]
47
47
    wm geometry $w ""
48
48
    wm maxsize $w 400 400
49
49
    wm minsize $w 150 100
85
85
    frame $w.f4
86
86
    
87
87
    # popup label
88
 
    label $w.f1.name -text "Change attribute: $att" 
 
88
    label $w.f1.name -text [format [G_msg "Change attribute: %s"] $att] 
89
89
    pack $w.f1.name -side top -fill both -expand yes -padx 4 -pady 3
90
90
    
91
91
    # left button
92
 
    button $w.f2.map -text "New map" -command "$cb1" -bd 1 -width 10
 
92
    button $w.f2.map -text [G_msg "New map"] -command "$cb1" -bd 1 -width 10
93
93
    pack $w.f2.map -side left -fill x -expand yes
94
94
    
95
95
    # right button
96
96
    if {"$att" == "mask"} then {
97
 
                button $w.f2.const -text "Remove mask" -command "$cb2" -bd 1 -width 10
98
 
                checkbutton $w.f2.invert -text "invert mask" -onvalue 1 \
 
97
                button $w.f2.const -text [G_msg "Remove mask"] -command "$cb2" -bd 1 -width 10
 
98
                checkbutton $w.f2.invert -text [G_msg "invert mask"] -onvalue 1 \
99
99
                        -offvalue 0 -variable attPopup_InvertMask
100
100
                set curr [Nget_current surf]
101
101
                set attPopup_InvertMask [Nsurf$curr get_mask_mode]
103
103
                        -pady 2 -before $w.f2.map
104
104
 
105
105
    } elseif {"$att" == "topography" } then {
106
 
                button $w.f2.const -text "New constant" -command "$cb2" -bd 1 -width 10
107
 
                checkbutton $w.f2.use_color -text "use as color" -onvalue 1 \
 
106
                button $w.f2.const -text [G_msg "New constant"] -command "$cb2" -bd 1 -width 10
 
107
                checkbutton $w.f2.use_color -text [G_msg "use as color"] -onvalue 1 \
108
108
                        -offvalue 0 -variable attPopup_UseColor
109
109
                set attPopup_UseColor 1
110
110
                pack $w.f2.use_color -side bottom -expand yes -fill both \
111
111
                        -pady 2 -before $w.f2.map
112
112
    } elseif {"$att" == "emission" } then {
113
 
        label $w.f2.const -text "Constant not supported" 
 
113
        label $w.f2.const -text [G_msg "Constant not supported"] 
114
114
    } else {
115
 
                button $w.f2.const -text "New constant" -command "$cb2" -bd 1 -width 10
 
115
                button $w.f2.const -text [G_msg "New constant"] -command "$cb2" -bd 1 -width 10
116
116
    }
117
117
    
118
118
    pack $w.f2.map $w.f2.const -side left -fill x -expand yes
119
119
    pack $w.f2 -side top -padx 3 -pady 3 -fill both -expand yes
120
120
    
121
121
    
122
 
    label $w.f3.status -text "Curr. value: " -fg black
 
122
    label $w.f3.status -text [G_msg "Curr. value: "] -fg black
123
123
    set attPopup_Status [get_curr_status $att]
124
124
    label $w.f3.info -textvariable attPopup_Status -fg black -font $nviztxtfont
125
125
    pack $w.f3.status $w.f3.info -side left -fill x -expand yes -padx 4 -pady 3
126
126
    pack $w.f3 -side top
127
127
    
128
 
    button $w.f4.accept -text "Accept"  -bd 1  -width 5 -default active\
 
128
    button $w.f4.accept -text [G_msg "Accept"]  -bd 1  -width 5 -default active\
129
129
                -command "ap_check_invert $att
130
130
                        if {$Nauto_draw == 1} {Ndraw_all}
131
131
                        destroy $w
132
132
                        "
133
 
    button $w.f4.cancel -text "Cancel"  -bd 1  -width 5\
 
133
    button $w.f4.cancel -text [G_msg "Cancel"]  -bd 1  -width 5\
134
134
                -command "set attPopup_Status \"no_change\" ; destroy $w"
135
135
    pack $w.f4.accept $w.f4.cancel -side left -fill none -expand yes
136
136
    pack $w.f4 -side top  -padx 3 -pady 4 -expand 1 -fill both
263
263
    set new [create_map_browser .browse_topo_file surf 1]
264
264
    if { $new == "" } then { return }
265
265
    
266
 
    puts "returned from create_map_browser"
 
266
    #puts "returned from create_map_browser"
267
267
    set attPopup_Type non_constant
268
268
    set attPopup_Status $new
269
269
}
316
316
        set curr_color "#000000"
317
317
    }
318
318
        
319
 
    set new_color [mkColorPopup .color_browse "Surface Color" $curr_color 1]
 
319
    set new_color [mkColorPopup .color_browse [G_msg "Surface Color"] $curr_color 1]
320
320
    
321
321
    # Finally pass the constant on to change the surface
322
322
    set new_color [expr [tcl_to_rgb $new_color] + 0]
459
459
    set return_val ''
460
460
    
461
461
    toplevel $w
462
 
    wm title $w "Constant"
 
462
    wm title $w [G_msg "Constant"]
463
463
#    tkwait visibility $w
464
464
#    focus $w
465
465
    
466
466
    set row2 [frame $w.constentry]
467
467
#    puts "CONSTANT: $w MODE: $mode"
468
 
    label $row2.title -text "Enter value:"
 
468
    label $row2.title -text [G_msg "Enter value:"]
469
469
    Entry $row2.const -bd 2 -relief sunken
470
470
    
471
471
    bind $w <Return> "set cp_done 1"
472
472
 
473
473
    set row3 [frame $w.buttons]
474
 
    button $row3.ok -bd 1 -width 5 -text "Accept" -command "set cp_done 1" -default active
475
 
    button $row3.cancel -bd 1 -width 5 -text "Cancel" -command "destroy $w"
 
474
    button $row3.ok -bd 1 -width 5 -text [G_msg "Accept"] -command "set cp_done 1" -default active
 
475
    button $row3.cancel -bd 1 -width 5 -text [G_msg "Cancel"] -command "destroy $w"
476
476
 
477
477
    pack $row2.title $row2.const -side top -fill both -expand 1 \
478
478
        -padx 4 -pady 4
509
509
    set cp_done 0
510
510
    
511
511
    toplevel $w
512
 
    wm title $w "Constant"
 
512
    wm title $w [G_msg "Constant"]
513
513
    tkwait visibility $w
514
514
    focus -force $w
515
515
    
516
 
    label $w.title -text "Use slider to set value" -width 25
 
516
    label $w.title -text [G_msg "Use slider to set value"] -width 25
517
517
    scale $w.constant -from 0 -to 255 -showvalue yes \
518
518
                -orient horizontal -activebackground gray80 \
519
519
                -background gray90
520
520
 
521
521
    set row3 [frame $w.buttons]
522
 
    button $row3.ok -bd 1 -width 5 -text "Accept" -command "set cp_done 1" -default active
523
 
    button $row3.cancel -bd 1 -width 5 -text "Cancel" -command "destroy $w"
 
522
    button $row3.ok -bd 1 -width 5 -text [G_msg "Accept"] -command "set cp_done 1" -default active
 
523
    button $row3.cancel -bd 1 -width 5 -text [G_msg "Cancel"] -command "destroy $w"
524
524
 
525
525
    pack $w.title -side top -fill both -expand 1 \
526
526
        -padx 4 -pady 4