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

« back to all changes in this revision

Viewing changes to gui/tcltk/gis.m/mapprint.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:
28
28
        variable orient
29
29
        variable paper
30
30
        variable paper_preset
 
31
        variable paper_presetlv
31
32
        variable pdffile
32
33
        variable pght
33
34
        variable pgwd
54
55
        variable docht
55
56
        variable paper
56
57
        variable paper_preset
 
58
        variable paper_presetlv
57
59
        variable printmode
58
60
        variable printer
59
61
        variable gsexists
75
77
        set psprint::docht 10
76
78
        set psprint::paper "preset"
77
79
        set psprint::paper_preset "letter"
 
80
        set psprint::paper_presetlv ""
78
81
        set psprint::printer ""
79
82
        set psprint::gsexists 1
80
83
        set psprint::orient "landscape"
218
221
        variable pght
219
222
        variable paper
220
223
        variable paper_preset
 
224
        variable paper_presetlv
221
225
        variable printmode
222
226
        variable printer
223
227
        variable gsexists
264
268
        Label $row.b -anchor w -text [G_msg "Preset paper type"]
265
269
        ComboBox $row.c -label "" -width 20  -textvariable psprint::paper_preset \
266
270
                -values {"letter" "a4" "legal" "11x17" "a3" "ledger" "a0" "a1" "a2" } \
267
 
                -modifycmd psprint::paper
 
271
                -modifycmd psprint::paper \
 
272
                -labels [list [G_msg "letter"] [G_msg "A4"] [G_msg "legal"] [G_msg "11x17"] [G_msg "A3"] [G_msg "ledger"] [G_msg "A0"] [G_msg "A1"] [G_msg "A2"]] \
 
273
                -labelsvariable psprint::paper_presetlv
268
274
        pack $row.a $row.b $row.c -side left;
269
275
        pack $row -side top -fill x -expand no -anchor n
270
276
        
337
343
                -state $psprint::gsstate 
338
344
        Entry $row.c -width 30 -textvariable psprint::pdffile  -state $gsstate
339
345
        Button $row.d -text [G_msg "Browse"]  -command { set psprint::pdffile \
340
 
                [tk_getSaveFile -title "Output PDF file" -defaultextension ".pdf"]} \
 
346
                [tk_getSaveFile -initialdir $Gm::last_directory -title "Output PDF file" -defaultextension ".pdf"]} \
341
347
                -state $psprint::gsstate
342
348
        pack $row.a $row.b $row.c $row.d -side left;
343
349
        pack $row -side top -fill x -expand no -anchor n
349
355
        Label $row.b -anchor w -text [G_msg "Save to EPS file               "] 
350
356
        Entry $row.c -width 30 -textvariable psprint::epsfile 
351
357
        Button $row.d -text [G_msg "Browse"] -command { set psprint::epsfile \
352
 
               [ tk_getSaveFile -title "Output EPS file" -defaultextension ".eps"] }
 
358
               [ tk_getSaveFile -initialdir $Gm::last_directory -title "Output EPS file" -defaultextension ".eps"] }
353
359
        pack $row.a $row.b $row.c $row.d -side left;
354
360
        pack $row -side top -fill x -expand no -anchor n
355
361
        
448
454
                if {[catch {exec $cmd  $format -sDEVICE#pdfwrite -r$res -sNOPAUSE -sOutputFile#$pdffile -dBATCH -- $tmppsfile} error]} {
449
455
                        GmLib::errmsg $error
450
456
                }
451
 
                 
 
457
                set Gm::last_directory [file dirname $pdffile]
452
458
        }
453
459
 
454
460
        # output to eps file
458
464
                } else {
459
465
                        $cv postscript -file "$epsfile" -rotate 1
460
466
                }
 
467
                set Gm::last_directory [file dirname $epsfile]
461
468
        }
462
469
        
463
470
        psprint::clean