Changeset 1595


Ignore:
Timestamp:
Oct 26, 2009, 12:56:39 PM (15 years ago)
Author:
gah
Message:
 
Location:
trunk/gui/scripts
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/xyprint.tcl

    r1593 r1595  
    118118            -command [itcl::code $this Done 0] \
    119119            -compound left \
    120             -image [Rappture::icon dialog-cancel]
     120            -image [Rappture::icon cancel]
    121121    }
    122122    blt::table $itk_interior \
    123123        0,0 $itk_component(preview) -cspan 2 -fill both \
    124124        1,0 $itk_component(tabs) -fill both -cspan 2 \
    125         2,0 $itk_component(cancel) -padx 2 -pady 2 -width .9i -fill y \
    126         2,1 $itk_component(ok) -padx 2 -pady 2 -width .9i -fill y
     125        2,1 $itk_component(cancel) -padx 2 -pady 2 -width .9i -fill y \
     126        2,0 $itk_component(ok) -padx 2 -pady 2 -width .9i -fill y
    127127    blt::table configure $itk_interior r1 -resize none
    128128    blt::table configure $itk_interior r1 -resize both
     
    211211
    212212    if { $format == "eps" } {
    213         set cmd [list | eps2eps -dEPSCrop - - << $psdata]
     213        set cmd [list | eps2eps - - << $psdata]
    214214    } elseif { $format == "pdf" } {
    215215        set cmd [list | eps2eps - - << $psdata | ps2pdf - -]
     
    320320    $_clone legend configure \
    321321        -position right \
    322         -font "*-helvetica-medium-r-normal-*-12-*" \
     322        -font "*-helvetica-medium-r-normal-*-10-*" \
    323323        -hide yes -borderwidth 0 -background white -relief solid \
    324324        -anchor nw -activeborderwidth 0
     
    331331            -majorticks {} -minorticks {}
    332332        $_clone axis configure $axis \
    333             -tickfont "*-helvetica-medium-r-normal-*-12-*" \
    334             -titlefont "*-helvetica-medium-r-normal-*-12-*"
     333            -tickfont "*-helvetica-medium-r-normal-*-10-*" \
     334            -titlefont "*-helvetica-medium-r-normal-*-10-*"
    335335    }
    336336    #$_clone grid off
     
    928928    # Create stanza associated with tool and plot title.
    929929    # General settings
    930     append out "set settings(general-format) $_settings($this-general-format)\n"
    931     append out "set settings(general-style) $_settings($this-general-style)\n"
    932     append out "set settings(general-remember) 1"
     930    append out "\n"
     931    append out "set settings(\$tool:\$label) \{\n"
     932    append out "  set general(format) $_settings($this-general-format)\n"
     933    append out "  set general(style) $_settings($this-general-style)\n"
     934    append out "  set general(remember) 1\n"
    933935
    934936    # Layout settings
    935     append out "\$graph configure "
    936     foreach opt {
    937         -width -height -leftmargin -rightmargin -topmargin -bottommargin } {
    938         append out "$opt [Pixels2Inches [$_clone cget $opt]] "
    939     }
    940     append out "\n"
    941    
     937    append out "  \$graph configure \\\n"
     938    append out "    -width \"[Pixels2Inches [$_clone cget -width]]\" \\\n"
     939    append out "    -height \"[Pixels2Inches [$_clone cget -height]]\" \\\n"
     940    append out "    -leftmargin \"[Pixels2Inches [$_clone cget -leftmargin]]\" \\\n"
     941    append out "    -rightmargin \"[Pixels2Inches [$_clone cget -rightmargin]]\" \\\n"
     942    append out "    -topmargin \"[Pixels2Inches [$_clone cget -topmargin]]\" \\\n"
     943    append out "    -bottommargin \"[Pixels2Inches [$_clone cget -bottommargin]]\"\\\n"
     944    append out "    -plotpadx \"[Pixels2Inches [$_clone cget -plotpadx]]\" \\\n"
     945    append out "    -plotpady \"[Pixels2Inches [$_clone cget -plotpady]]\" \n"
     946
    942947    # Legend settings
    943     append out "\$graph legend configure "
    944     foreach opt { -hide -position -anchor -borderwidth } {
    945         append out " $opt [$_clone legend cget $opt] "
    946     }
    947     append out "\n"
     948    append out "  \$graph legend configure \\\n"
     949    append out "    -position \"[$_clone legend cget -position]\" \\\n"
     950    append out "    -anchor \"[$_clone legend cget -anchor]\" \\\n"
     951    append out "    -borderwidth \"[$_clone legend cget -borderwidth]\" \\\n"
     952    append out "    -hide \"[$_clone legend cget -hide]\" \n"
    948953   
    949954    # Element settings
    950955    foreach elem [$_clone element show] {
    951         append out "if \{ \[\$graph element exists $elem\] \} \{\n"
    952         set cmd {}
    953         lappend cmd {$graph} "element" $elem
    954         lappend cmd "-symbol" [$_clone element cget $elem -symbol]
    955         lappend cmd "-color"  [$_clone element cget $elem -color]
    956         lappend cmd "-dashes" [$_clone element cget $elem -dashes]
    957         lappend cmd "-hide"   [$_clone element cget $elem -hide]
    958         lappend cmd "-label"  [$_clone element cget $elem -label]
    959         append out " $cmd\n"
    960         append out "\}\n"
     956        append out "  if \{ \[\$graph element exists \"$elem\"\] \} \{\n"
     957        append out "    \$graph element configure \"$elem\" \\\n"
     958        append out "      -symbol \"[$_clone element cget $elem -symbol]\" \\\n"
     959        append out "      -color \"[$_clone element cget $elem -color]\" \\\n"
     960        append out "      -dashes \"[$_clone element cget $elem -dashes]\" \\\n"
     961        append out "      -hide \"[$_clone element cget $elem -hide]\" \\\n"
     962        append out "      -label \"[$_clone element cget $elem -label]\" \n"
     963        append out "  \}\n"
    961964    }
    962965   
    963966    # Axis settings
    964     append out "\$graph configure "
    965     append out "-plotpadx [Pixels2Inches [$_clone cget -plotpadx]] "
    966     append out "-plotpady  [Pixels2Inches [$_clone cget -plotpady]]"
    967     append out "\n"
    968    
    969967    foreach axis [$_clone axis names] {
    970968        if { [$_clone axis cget $axis -hide] } {
    971969            continue
    972970        }
    973         append out "if \{ \[\$graph axis names \"$axis\"\] == \"$axis\" \} \{\n"
    974         set cmd {}
    975         lappend cmd {$graph} "axis" "configure" $axis
    976         foreach opt {-hide -min -max -title -stepsize -loose -subdivisions} {
    977             lappend cmd $opt [$_clone axis cget $axis $opt]
    978         }
    979         append out "$cmd\n"
     971        append out "  if \{ \[\$graph axis names \"$axis\"\] == \"$axis\" \} \{\n"
     972        append out "    \$graph axis configure \"$axis\" \\\n"
     973        append out "      -hide \"[$_clone axis cget $axis -hide]\" \\\n"
     974        append out "      -min \"[$_clone axis cget $axis -min]\" \\\n"
     975        append out "      -max \"[$_clone axis cget $axis -max]\" \\\n"
     976        append out "      -loose \"[$_clone axis cget $axis -loose]\" \\\n"
     977        append out "      -title \"[$_clone axis cget $axis -title]\" \\\n"
     978        append out "      -stepsize \"[$_clone axis cget $axis -stepsize]\" \\\n"
     979        append out "      -subdivisions \"[$_clone axis cget $axis -subdivisions]\"\n"
    980980        set hide [$_clone marker cget ${axis}-zero -hide]
    981         append out "\$graph marker configure ${axis}-zero -hide $hide\n"
    982         append out "\}\n"
     981        append out "    \$graph marker configure \"${axis}-zero\" -hide $hide\n"
     982        append out "  \}\n"
    983983    }   
    984984    set cmd {}
    985     append out "\$graph grid configure "
    986     foreach opt { -hide -mapx -mapy } {
    987         append out " $opt [$_clone grid cget $opt] "
    988     }
    989     append out "\n"
     985    append out "  \$graph grid configure \\\n"
     986    append out "    -hide \"[$_clone grid cget -hide]\" \\\n"
     987    append out "    -mapx \"[$_clone grid cget -mapx]\" \\\n"
     988    append out "    -mapy \"[$_clone grid cget -mapy]\"\n"
    990989    append out "\}\n"
    991990    # Write the settings out
  • trunk/gui/scripts/xyresult.tcl

    r1593 r1595  
    495495                    -value csv
    496496                pack $inner.csv -anchor w
    497                 radiobutton $inner.image -text "Image" \
     497                radiobutton $inner.image -text "Image (PS/PDF/PNG/JPEG)" \
    498498                    -variable Rappture::XyResult::_downloadPopup(format) \
    499499                    -value image
     
    561561                    if { ![winfo exists $popup] } {
    562562                        # Create a popup for the print dialog
    563                         Rappture::Balloon $popup -title "Print Settings..."
     563                        Rappture::Balloon $popup -title "Save as image..."
    564564                        set inner [$popup component inner]
    565565                        # Create the print dialog widget and add it to the
Note: See TracChangeset for help on using the changeset viewer.