Commit 2fe7f67e authored by sumpfralle's avatar sumpfralle

added visualization for visible/invisible models in list

* icons based on http://www.openclipart.org/detail/67411/occhio-01 by emilie.rollandin (Public Domain)


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@1106 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 5fd1649b
...@@ -25,14 +25,13 @@ ...@@ -25,14 +25,13 @@
<property name="model">ModelList</property> <property name="model">ModelList</property>
<property name="headers_visible">False</property> <property name="headers_visible">False</property>
<child> <child>
<object class="GtkTreeViewColumn" id="treeviewcolumn1"> <object class="GtkTreeViewColumn" id="ModelVisibleColumn">
<property name="title">column</property> <property name="title">column</property>
<property name="clickable">True</property> <property name="clickable">True</property>
<child> <child>
<object class="GtkCellRendererToggle" id="ModelVisibleToggle"/> <object class="GtkCellRendererPixbuf" id="ModelVisibleSymbol">
<attributes> <property name="stock_size">2</property>
<attribute name="active">2</attribute> </object>
</attributes>
</child> </child>
</object> </object>
</child> </child>
...@@ -40,7 +39,9 @@ ...@@ -40,7 +39,9 @@
<object class="GtkTreeViewColumn" id="treeviewcolumn2"> <object class="GtkTreeViewColumn" id="treeviewcolumn2">
<property name="title">column</property> <property name="title">column</property>
<child> <child>
<object class="GtkCellRendererText" id="cellrenderertext1"/> <object class="GtkCellRendererText" id="ModelNameColumn">
<property name="editable">True</property>
</object>
<attributes> <attributes>
<attribute name="text">1</attribute> <attribute name="text">1</attribute>
</attributes> </attributes>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="265.67999"
height="148.41624"
viewBox="0 0 265.67998 148.41624"
enable-background="new 0 0 595.28 841.89"
xml:space="preserve"
inkscape:version="0.48.1 r9760"
sodipodi:docname="visible_off.svg"><title
id="title2877">Occhio verde</title><metadata
id="metadata69"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>Occhio verde</dc:title><dc:creator><cc:Agent><dc:title>Arch. Emilie Rollandin</dc:title></cc:Agent></dc:creator><cc:license
rdf:resource="http://creativecommons.org/licenses/by/3.0/" /></cc:Work><cc:License
rdf:about="http://creativecommons.org/licenses/by/3.0/"><cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" /><cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" /><cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" /><cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" /><cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /></cc:License></rdf:RDF></metadata><defs
id="defs67"><inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 420.94501 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="595.28003 : 420.94501 : 1"
inkscape:persp3d-origin="297.64001 : 280.63 : 1"
id="perspective71" /><linearGradient
inkscape:collect="always"
xlink:href="#SVGID_1_"
id="linearGradient6024"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.959,-0.2836,-0.2836,0.959,847.8336,92.959)"
x1="393.37891"
y1="523.66412"
x2="495.46289"
y2="523.66412" /><linearGradient
inkscape:collect="always"
xlink:href="#SVGID_2_"
id="linearGradient6026"
gradientUnits="userSpaceOnUse"
x1="225.959"
y1="478.47659"
x2="326.14059"
y2="478.47659" /></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1440"
inkscape:window-height="825"
id="namedview65"
showgrid="false"
inkscape:zoom="2.2425732"
inkscape:cx="147.52112"
inkscape:cy="80.793259"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<linearGradient
id="SVGID_1_"
gradientUnits="userSpaceOnUse"
x1="393.37891"
y1="523.66412"
x2="495.46289"
y2="523.66412"
gradientTransform="matrix(-0.959,-0.2836,-0.2836,0.959,847.8336,92.959)">
<stop
offset="0.0547"
style="stop-color:#D3D9BE"
id="stop16" />
<stop
offset="0.1934"
style="stop-color:#A9C38D"
id="stop18" />
<stop
offset="0.263"
style="stop-color:#A3C186"
id="stop20" />
<stop
offset="0.3682"
style="stop-color:#90B975"
id="stop22" />
<stop
offset="0.4959"
style="stop-color:#6BAC5A"
id="stop24" />
<stop
offset="0.6402"
style="stop-color:#229D3D"
id="stop26" />
<stop
offset="0.6606"
style="stop-color:#009B39"
id="stop28" />
<stop
offset="0.9964"
style="stop-color:#0A6930"
id="stop30" />
</linearGradient>
<linearGradient
id="SVGID_2_"
gradientUnits="userSpaceOnUse"
x1="225.959"
y1="478.47659"
x2="326.14059"
y2="478.47659">
<stop
offset="0.0547"
style="stop-color:#D3D9BE"
id="stop47" />
<stop
offset="0.1934"
style="stop-color:#A9C38D"
id="stop49" />
<stop
offset="0.263"
style="stop-color:#A3C186"
id="stop51" />
<stop
offset="0.3682"
style="stop-color:#90B975"
id="stop53" />
<stop
offset="0.4959"
style="stop-color:#6BAC5A"
id="stop55" />
<stop
offset="0.6402"
style="stop-color:#229D3D"
id="stop57" />
<stop
offset="0.6606"
style="stop-color:#009B39"
id="stop59" />
<stop
offset="0.9964"
style="stop-color:#0A6930"
id="stop61" />
</linearGradient>
<g
id="g6009"
transform="translate(-160.26701,-391.98211)"><path
id="path3"
d="m 294.032,540.223 c -13.823,-1.489 -27.537,-6.111 -40.729,-11.432 -15.84,-6.389 -29.609,-18.18 -44.979,-25.647 -11.587,-5.632 -28.667,-11.182 -38.924,1.106 19.517,-33.419 41.483,-61.041 73.661,-73.197 18.407,-6.953 41.322,-9.923 59.837,-2.354 16.928,6.919 34.903,18.076 49.492,31.049 6.577,5.849 13.975,12.766 19.146,20.529 3.183,4.774 5.602,10.427 9.179,14.624 -8.426,0.333 -16.328,12.329 -23.578,17.062 -11.307,7.384 -22.343,17.624 -34.677,22.267 -9.009,3.388 -18.933,7.014 -28.428,5.993 z"
inkscape:connector-curvature="0"
style="fill:#ffffff" /><path
id="path5"
d="m 211.6,470.32 c 0.916,-7.375 4.112,-14.859 8.044,-20.291 2.084,-2.877 4.258,-4.683 6.687,-6.906 2.888,-2.649 5.391,-5.534 8.862,-6.986 -6.322,1.941 -13.109,6.066 -18.861,10.013 -5.878,4.033 -11.47,8.449 -16.646,13.89 -4.899,5.142 -9.58,11.685 -13.607,17.935 -2.754,4.285 -5.661,11.637 -1.096,15.724 4.865,4.354 11.336,5.561 16.775,8.183 6.187,2.979 13.331,7.285 19.988,7.943 2.827,0.281 4.689,0.468 7.461,1.772 3.229,1.52 6.63,2.891 10.117,2.518 -2.916,-2.435 -6.134,-4.373 -9.149,-6.581 -2.396,-1.753 -4.519,-3.808 -6.515,-6.255 -3.438,-4.221 -6.448,-8.951 -9.238,-14.02 -2.814,-5.115 -3.586,-10.806 -2.822,-16.939 z"
inkscape:connector-curvature="0"
style="fill:#f4f4f4" /><path
id="path7"
d="m 203.055,468.817 c 2.295,-8.347 7.73,-15.934 12.995,-20.879 1.965,-1.843 4.178,-3.323 6.054,-5.276 -3.307,1.961 -6.595,4.113 -9.825,6.34 -3.759,2.59 -7.26,6.113 -10.688,9.324 -3.379,3.169 -6.548,6.37 -9.146,10.623 -2.042,3.334 -4.955,5.978 -6.94,9.571 -1.391,2.518 -3.122,5.813 -2.696,9.021 0.46,3.471 3.817,5.755 5.913,7.549 2.3,1.979 5.087,2.712 7.63,4.015 4.419,2.271 8.574,4.836 12.839,7.518 5.94,3.738 11.956,5.74 18.458,7.54 -1.534,-1.875 -4.114,-2.971 -6.075,-3.952 -3.094,-1.546 -5.607,-3.784 -8.033,-6.658 -6.14,-7.267 -12.367,-17.409 -11.543,-28.72 0.148,-2.029 0.515,-4.045 1.057,-6.016 z"
inkscape:connector-curvature="0"
style="fill:#e0e0e0" /><path
id="path9"
d="m 343.567,501.013 c -1.056,2.926 -2.523,5.622 -4.448,7.937 -3.094,3.721 -6.623,6.381 -10.187,9.264 -1.708,1.383 -4.441,3.008 -5.683,5.03 2.656,-1.706 6.348,-1.876 9.248,-2.663 7.87,-2.151 15.788,-6.134 23.077,-10.442 4.897,-2.892 13.567,-7.598 15.443,-14.831 2.351,-9.085 -6.309,-17.932 -10.57,-23.293 -7.067,-8.899 -14.718,-16.243 -23.065,-23.022 -3.17,-2.577 -6.901,-4.552 -10.43,-6.228 9.75,9.908 18.11,26.606 18.745,42.971 0.207,5.29 -0.432,10.583 -2.13,15.277 z"
inkscape:connector-curvature="0"
style="fill:#f4f4f4" /><path
id="path11"
d="m 349.962,508.251 c -1.611,1.455 -3.253,2.879 -4.677,4.799 1.336,0.202 2.847,-0.536 4.149,-1.038 3.1,-1.2 6.205,-2.464 9.136,-4.242 2.471,-1.491 3.557,-3.559 5.525,-5.729 3.128,-3.453 11.064,-7.826 7.414,-14.528 -2.719,-4.986 -6.815,-8.287 -10.625,-11.766 -3.91,-3.563 -7.146,-8.12 -11.014,-11.686 -3.021,-2.779 -6.131,-5.322 -9.096,-8.174 5.579,9.58 13.854,18.229 16.342,30.269 1.052,5.069 0.482,10.681 -1.609,15.179 -1.44,3.103 -3.468,5.035 -5.545,6.916 z"
inkscape:connector-curvature="0"
style="fill:#e0e0e0" /><path
id="path13"
d="m 345.583,446.615 c -4.683,-5.215 -9.62,-9.816 -15.226,-12.592 -26.061,-12.95 -52.547,-16.702 -79.676,-6.107 -11.516,4.482 -23,8.926 -33.871,17.003 -9.793,7.281 -19.799,10.175 -28.129,20.557 -3.808,4.747 -7.12,10.085 -10.6,15.21 -1.88,2.771 -9.541,10.17 -10.038,13.319 7.826,-49.594 35.774,-85.611 74.631,-97.163 21.685,-6.446 44.926,-6.698 66.208,0.558 41.161,14.032 65.07,63.984 110.26,68.996 -10.247,5.921 -25.498,14.445 -36.827,12.544 -15.004,-2.524 -25.092,-19.354 -36.732,-32.325 z"
inkscape:connector-curvature="0"
style="fill:#fde8d8" /><path
id="path32"
d="m 257.471,429.142 c 29.52,-3.487 87.91,0.046 64.37,52.784 -10.83,24.267 -36.983,34.983 -59.791,29.84 -16.335,-3.685 -31.849,-22.343 -34.766,-40.647 -1.342,-8.403 -1.066,-17.043 -0.169,-25.521 1.512,-14.268 20.378,-15.278 30.356,-16.456 z"
style="fill:url(#linearGradient6024)"
inkscape:connector-curvature="0" /><path
id="path34"
d="m 297.705,450.317 c 7.99,33.093 -33.19,49.197 -42.828,19.683 -9.451,-28.893 34.154,-55.624 42.828,-19.683 z"
inkscape:connector-curvature="0"
style="fill:#13110c" /><path
id="path36"
d="m 287.965,466.845 c 3.021,-9.293 15.078,-17.983 19.172,-6.874 2.508,6.797 3.25,16.393 -3.21,19.87 -3.878,2.087 -12.51,0.061 -15.289,-4.131 -1.683,-2.533 -1.691,-5.733 -0.673,-8.865 z"
inkscape:connector-curvature="0"
style="fill:#ffffff" /><path
id="path38"
d="m 244.867,423.225 c -16.579,7.807 -35.071,19.887 -48.617,34.558 -5.398,5.84 -10.786,13.043 -15.411,19.911 -4.861,7.228 -9.226,19.479 -15.298,24.923 17.871,-16.037 31.885,-39.551 51.214,-52.677 19.793,-13.423 41.896,-21.986 64.499,-19.11 17.709,2.249 32.588,2.801 47.907,16.302 9.531,8.416 17.377,18.582 25.736,28.694 7.39,8.94 17.775,15.184 27.607,18.786 15.495,5.676 31.052,-4.564 43.443,-15.115 -7.113,8.043 -20.393,7.964 -29.309,6.557 -10.104,-1.601 -16.4,-10.025 -24.491,-18.018 -25.249,-24.931 -47.549,-51.856 -81.269,-53.546 -15.979,-0.805 -30.979,1.655 -46.011,8.735 z"
inkscape:connector-curvature="0"
style="fill:#13110c" /><path
id="path40"
d="m 343.06,504.764 c -2.142,0.883 -4.38,1.839 -6.735,2.886 -25.104,11.097 -63.693,11.509 -90.543,3.47 -14.537,-4.353 -25.807,-11.37 -39.404,-16.527 -16.022,-6.091 -37.796,-3.376 -46.111,10.634 18.83,-6.896 31.207,-10.988 51.483,-4.543 16.582,5.274 31.153,14.17 48.185,18.37 15.965,3.928 29.439,4.225 45.71,3.604 11.396,-0.428 26.109,0.563 31.645,10.152 -3.593,-6.221 -11.537,-12.412 -17.705,-15.713 9.778,1.798 19.384,8.449 24.663,14.852 -2.097,-7.141 -10.645,-12.228 -17.916,-16.204 11.985,0.961 23.334,6.567 31.188,13.769 -3.438,-5.891 -15.028,-13.138 -23.29,-13.172 14.172,-0.773 29.215,6.376 37.643,15.073 -3.37,-10.21 -19.971,-18.366 -32.702,-18.585 13.402,-2.587 24.96,1.471 36.628,5.33 -5.975,-3.76 -13.023,-7.264 -20.674,-8.438 9.45,-3.149 21.563,0.076 29.498,4.545 -6.225,-4.642 -14.201,-10.165 -23.227,-9.947 -0.31,0.144 -0.299,0.152 0.032,0.026 13.055,-4.066 27.921,-5.208 41.253,-1.142 -26.41,-8.056 -38.122,-7.304 -59.621,1.56 z"
inkscape:connector-curvature="0"
style="fill:#13110c" /><path
id="path42"
d="m 348.8,461.576 c 15.276,26.222 50.632,13.192 65.928,-5.786 -16.571,15.641 -49.753,18.069 -65.921,1.884 17.227,5.013 45.147,-1.476 53.072,-23.814 -19.995,26.604 -50.883,13.37 -73.785,5.881 12.2,8.602 40.651,3.67 42.151,-17.61 -9.925,20.55 -39.27,15.457 -54.241,10.215 13.283,0.963 26.092,-7.722 31.009,-23.692 -14.941,27.023 -39.131,8.575 -57.152,17.568 22.925,10.134 47.109,28.256 69.591,47.226 L 348.8,461.576 z"
inkscape:connector-curvature="0"
style="fill:#13110c" /><path
id="path63"
d="m 232.271,488.273 c -2.528,-5.009 -4.789,-11.611 -5.481,-16.51 -0.563,-3.991 -0.833,-8.061 -0.831,-12.192 0.004,-4.544 1.491,-10.175 0.682,-14.333 4.567,-2.297 12.487,-0.141 17.548,-0.785 -4.911,0.627 -11.877,1.244 -16.168,3.968 5.154,0.289 10.995,-0.254 16.393,-0.324 -5.155,1.673 -10.969,1.821 -15.951,3.684 6.045,0.232 12.172,-1.238 18.154,0 -6.431,0.398 -13.654,3.29 -19.718,5.553 5.494,-1.229 11.189,-1.6 16.848,-1.674 -5.75,2.641 -11.933,4.769 -17.282,8.318 5.613,-1.342 12.316,-5.274 18.208,-3.633 -2.296,4.37 -12.113,6.593 -16.229,9.418 5.8,0.351 11.682,-5.285 17.998,-4.784 -3.55,4.832 -11.579,6.755 -16.01,11.148 5.349,-2.793 10.612,-5.875 16.44,-7.264 -2.004,4.742 -9.99,7.521 -13.402,11.166 3.831,-1.509 6.901,-4.802 10.988,-5.979 -1.842,4.344 -7.928,6.126 -9.657,10.845 3.665,-0.304 8.267,-5.411 12.071,-6.758 -1.928,4.492 -6.936,7.39 -8.543,12.369 4.121,-2.071 8.075,-6.064 12.243,-8.476 -2.386,3.574 -8.664,8.604 -8.475,13.368 4.228,-3.784 8.286,-7.836 12.937,-11.165 -2.591,4.634 -8.017,10.221 -9.205,15.302 2.554,-1.311 3.929,-5.313 5.647,-7.78 2.112,-3.032 4.71,-6.08 7.763,-7.973 -2.644,5.437 -7.324,11.164 -8.276,17.461 3.135,-3.832 5.396,-8.72 8.299,-12.822 -0.84,6.101 -3.57,11.636 -3.718,17.956 2.904,-4.808 5.006,-11.595 9.416,-15.102 -1.592,4.891 -3.872,9.64 -1.691,14.852 2.233,-3.979 2.624,-9.515 4.529,-13.809 -0.339,4.17 -1.647,9.647 -0.45,13.576 1.155,-4.621 3.092,-8.313 4.737,-12.603 0.393,4.71 -1.248,8.855 0.381,13.513 0.841,-4.169 2,-8.368 2.878,-12.536 0.527,3.953 0.668,10.725 2.805,13.814 0.911,-3.199 0.999,-6.873 0.971,-10.213 2.094,2.294 1.647,6.995 3.896,9.232 0.428,-2.886 0.534,-6.438 0.131,-9.232 0.933,2.693 0.816,6.111 2.949,8.009 0.005,-2.284 -0.429,-4.753 -0.861,-6.966 1.807,2.782 3.712,5.304 5.764,7.879 -0.02,-3.279 -0.584,-6.651 -1.127,-9.836 1.392,2.798 2.968,6.077 5.763,7.391 0.136,-3.669 -1.81,-7.994 -3.466,-11.104 2.075,1.708 4.643,3.878 6.515,5.754 -1.741,-2.083 -3.341,-5.115 -4.37,-7.71 3.337,2.26 6.377,4.688 9.861,6.795 -0.096,-3.301 -2.017,-7.084 -3.776,-9.704 -0.078,-0.083 -0.081,-0.079 -0.011,0.015 2.955,2.446 6.124,4.568 9.756,5.544 -0.486,-2.876 -1.88,-7.229 -3.888,-9.223 2.818,1.351 7.385,4.896 10.341,2.894 -1.996,-1.944 -4.347,-4.014 -6.404,-5.808 2.823,1.123 5.71,2.466 8.73,2.899 -2.192,-1.177 -5.77,-2.905 -6.742,-5.332 2.548,0.398 7.842,2.137 9.918,0.213 -1.662,-2.701 -5.78,-2.227 -6.837,-5.772 1.99,0.715 4.642,1.65 6.565,0.652 -0.71,-2.863 -4.381,-3.4 -6.352,-5.028 1.985,0.668 7.11,1.321 8.325,-0.544 -1.861,-1.638 -4.464,-1.265 -6.505,-2.493 2.347,-0.479 5.018,-0.529 7.413,-0.519 -1.537,-1.905 -4.674,-2.595 -6.748,-3.877 1.496,0.178 3.063,0.521 4.522,-0.036 -0.697,-1.268 -2.176,-1.808 -3.651,-1.889 1.414,-0.459 2.9,-0.641 4.335,-0.678 -0.943,-0.119 -2.322,-0.541 -3.237,-0.8 1.207,-0.445 2.673,-0.621 3.889,-1.214 -1.306,-1.392 -3.78,-1.365 -5.251,-2.64 0.836,-0.067 1.548,-0.351 2.434,-0.293 -0.069,-0.019 -1.281,-0.54 -1.729,-0.675 1.831,-0.035 4.233,-0.273 5.729,-0.521 -0.322,3.002 0.923,6.39 1.087,9.48 0.229,4.342 -0.316,8.042 -0.883,12.261 -0.745,5.549 -2.746,10.105 -5.56,14.802 -6.76,11.289 -15.02,15.43 -26.396,19.587 -14.315,5.229 -29.281,4.51 -42.82,-2.499 -6.547,-3.391 -12.161,-8.814 -16.314,-15.338 -0.618,-0.967 -1.238,-2.074 -1.844,-3.272 z"
style="fill:url(#linearGradient6026)"
inkscape:connector-curvature="0" /></g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="265.67999"
height="148.41624"
id="svg6074"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="visible_off.svg">
<defs
id="defs6076">
<linearGradient
inkscape:collect="always"
xlink:href="#SVGID_1_"
id="linearGradient6024"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.959,-0.2836,-0.2836,0.959,847.8336,92.959)"
x1="393.37891"
y1="523.66412"
x2="495.46289"
y2="523.66412" />
<linearGradient
id="SVGID_1_"
gradientUnits="userSpaceOnUse"
x1="393.37891"
y1="523.66412"
x2="495.46289"
y2="523.66412"
gradientTransform="matrix(-0.959,-0.2836,-0.2836,0.959,847.8336,92.959)">
<stop
offset="0.0547"
style="stop-color:#D3D9BE"
id="stop16" />
<stop
offset="0.1934"
style="stop-color:#A9C38D"
id="stop18" />
<stop
offset="0.263"
style="stop-color:#A3C186"
id="stop20" />
<stop
offset="0.3682"
style="stop-color:#90B975"
id="stop22" />
<stop
offset="0.4959"
style="stop-color:#6BAC5A"
id="stop24" />
<stop
offset="0.6402"
style="stop-color:#229D3D"
id="stop26" />
<stop
offset="0.6606"
style="stop-color:#009B39"
id="stop28" />
<stop
offset="0.9964"
style="stop-color:#0A6930"
id="stop30" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#SVGID_2_"
id="linearGradient6026"
gradientUnits="userSpaceOnUse"
x1="225.959"
y1="478.47659"
x2="326.14059"
y2="478.47659" />
<linearGradient
id="SVGID_2_"
gradientUnits="userSpaceOnUse"
x1="225.959"
y1="478.47659"
x2="326.14059"
y2="478.47659">
<stop
offset="0.0547"
style="stop-color:#D3D9BE"
id="stop47" />
<stop
offset="0.1934"
style="stop-color:#A9C38D"
id="stop49" />
<stop
offset="0.263"
style="stop-color:#A3C186"
id="stop51" />
<stop
offset="0.3682"
style="stop-color:#90B975"
id="stop53" />
<stop
offset="0.4959"
style="stop-color:#6BAC5A"
id="stop55" />
<stop
offset="0.6402"
style="stop-color:#229D3D"
id="stop57" />
<stop
offset="0.6606"
style="stop-color:#009B39"
id="stop59" />
<stop
offset="0.9964"
style="stop-color:#0A6930"
id="stop61" />
</linearGradient>
<linearGradient
y2="478.47659"
x2="326.14059"
y1="478.47659"
x1="225.959"
gradientUnits="userSpaceOnUse"
id="linearGradient6072"
xlink:href="#SVGID_2_"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
xlink:href="#SVGID_2_"
id="linearGradient6158"
gradientUnits="userSpaceOnUse"
x1="225.959"
y1="478.47659"
x2="326.14059"
y2="478.47659"
gradientTransform="translate(-160.26701,511.96382)" />
<linearGradient
inkscape:collect="always"
xlink:href="#SVGID_1_"
id="linearGradient6166"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.959,-0.2836,-0.2836,0.959,687.56659,604.92282)"
x1="393.37891"
y1="523.66412"
x2="495.46289"
y2="523.66412" />
<linearGradient
inkscape:collect="always"
xlink:href="#SVGID_1_-3"
id="linearGradient3063"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.959,-0.2836,-0.2836,0.959,687.56659,-299.02311)"
x1="393.37891"
y1="523.66412"
x2="495.46289"
y2="523.66412" />
<linearGradient
id="SVGID_1_-3"
gradientUnits="userSpaceOnUse"
x1="393.37891"
y1="523.66412"
x2="495.46289"
y2="523.66412"
gradientTransform="matrix(-0.959,-0.2836,-0.2836,0.959,847.8336,92.959)">
<stop
offset="0.0547"
style="stop-color:#D3D9BE"
id="stop16-8" />
<stop
offset="0.1934"
style="stop-color:#A9C38D"
id="stop18-8" />
<stop
offset="0.263"
style="stop-color:#A3C186"
id="stop20-3" />
<stop
offset="0.3682"
style="stop-color:#90B975"
id="stop22-1" />
<stop
offset="0.4959"
style="stop-color:#6BAC5A"
id="stop24-8" />
<stop
offset="0.6402"
style="stop-color:#229D3D"
id="stop26-9" />
<stop
offset="0.6606"
style="stop-color:#009B39"
id="stop28-6" />
<stop
offset="0.9964"
style="stop-color:#0A6930"
id="stop30-4" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#SVGID_2_-3"
id="linearGradient3055"
gradientUnits="userSpaceOnUse"
x1="225.959"
y1="478.47659"
x2="326.14059"
y2="478.47659"
gradientTransform="translate(-160.26701,-391.98211)" />
<linearGradient
id="SVGID_2_-3"
gradientUnits="userSpaceOnUse"
x1="225.959"
y1="478.47659"
x2="326.14059"
y2="478.47659">
<stop
offset="0.0547"
style="stop-color:#D3D9BE"
id="stop47-3" />
<stop
offset="0.1934"
style="stop-color:#A9C38D"
id="stop49-3" />
<stop
offset="0.263"
style="stop-color:#A3C186"
id="stop51-8" />
<stop
offset="0.3682"
style="stop-color:#90B975"
id="stop53-6" />
<stop
offset="0.4959"
style="stop-color:#6BAC5A"
id="stop55-0" />
<stop
offset="0.6402"
style="stop-color:#229D3D"
id="stop57-4" />
<stop
offset="0.6606"
style="stop-color:#009B39"
id="stop59-8" />
<stop
offset="0.9964"
style="stop-color:#0A6930"
id="stop61-8" />
</linearGradient>
<linearGradient
y2="478.47659"
x2="326.14059"
y1="478.47659"
x1="225.959"
gradientTransform="translate(-160.26701,-391.98211)"
gradientUnits="userSpaceOnUse"
id="linearGradient3112"
xlink:href="#SVGID_2_-3"
inkscape:collect="always" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.979899"
inkscape:cx="180.81523"
inkscape:cy="48.806946"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1440"
inkscape:window-height="825"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1" />
<metadata
id="metadata6079">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(1e-5,-903.94593)">
<path
style="fill:#ffffff"
inkscape:connector-curvature="0"
d="m 133.76499,1052.1868 c -13.823,-1.489 -27.537,-6.111 -40.729,-11.432 -15.84,-6.389 -29.609,-18.18 -44.979,-25.647 -11.587,-5.632 -28.667,-11.182 -38.924,1.106 19.517,-33.41898 41.483,-61.04098 73.661,-73.19698 18.407,-6.953 41.322,-9.923 59.837,-2.354 16.928,6.919 34.903,18.076 49.492,31.049 6.577,5.849 13.975,12.766 19.146,20.529 3.183,4.774 5.602,10.42698 9.179,14.62398 -8.426,0.333 -16.328,12.329 -23.578,17.062 -11.307,7.384 -22.343,17.624 -34.677,22.267 -9.009,3.388 -18.933,7.014 -28.428,5.993 z"
id="path3" />
<path
style="fill:#f4f4f4"
inkscape:connector-curvature="0"
d="m 51.33299,982.28382 c 0.916,-7.375 4.112,-14.859 8.044,-20.291 2.084,-2.877 4.258,-4.683 6.687,-6.906 2.888,-2.649 5.391,-5.534 8.862,-6.986 -6.322,1.941 -13.109,6.066 -18.861,10.013 -5.878,4.033 -11.47,8.449 -16.646,13.89 -4.899,5.142 -9.58,11.685 -13.607,17.935 -2.754,4.285 -5.661,11.63698 -1.096,15.72398 4.865,4.354 11.336,5.561 16.775,8.183 6.187,2.979 13.331,7.285 19.988,7.943 2.827,0.281 4.689,0.468 7.461,1.772 3.229,1.52 6.63,2.891 10.117,2.518 -2.916,-2.435 -6.134,-4.373 -9.149,-6.581 -2.396,-1.753 -4.519,-3.808 -6.515,-6.255 -3.438,-4.221 -6.448,-8.951 -9.238,-14.01998 -2.814,-5.115 -3.586,-10.806 -2.822,-16.939 z"
id="path5" />
<path
style="fill:#e0e0e0"
inkscape:connector-curvature="0"
d="m 42.78799,980.78082 c 2.295,-8.347 7.73,-15.934 12.995,-20.879 1.965,-1.843 4.178,-3.323 6.054,-5.276 -3.307,1.961 -6.595,4.113 -9.825,6.34 -3.759,2.59 -7.26,6.113 -10.688,9.324 -3.379,3.169 -6.548,6.37 -9.146,10.623 -2.042,3.334 -4.955,5.978 -6.94,9.571 -1.391,2.518 -3.122,5.813 -2.696,9.021 0.46,3.47098 3.817,5.75498 5.913,7.54898 2.3,1.979 5.087,2.712 7.63,4.015 4.419,2.271 8.574,4.836 12.839,7.518 5.94,3.738 11.956,5.74 18.458,7.54 -1.534,-1.875 -4.114,-2.971 -6.075,-3.952 -3.094,-1.546 -5.607,-3.784 -8.033,-6.658 -6.14,-7.267 -12.367,-17.40898 -11.543,-28.71998 0.148,-2.029 0.515,-4.045 1.057,-6.016 z"
id="path7" />
<path
style="fill:#f4f4f4"
inkscape:connector-curvature="0"
d="m 183.29999,1012.9768 c -1.056,2.926 -2.523,5.622 -4.448,7.937 -3.094,3.721 -6.623,6.381 -10.187,9.264 -1.708,1.383 -4.441,3.008 -5.683,5.03 2.656,-1.706 6.348,-1.876 9.248,-2.663 7.87,-2.151 15.788,-6.134 23.077,-10.442 4.897,-2.892 13.567,-7.598 15.443,-14.831 2.351,-9.08498 -6.309,-17.93198 -10.57,-23.29298 -7.067,-8.899 -14.718,-16.243 -23.065,-23.022 -3.17,-2.577 -6.901,-4.552 -10.43,-6.228 9.75,9.908 18.11,26.606 18.745,42.971 0.207,5.28998 -0.432,10.58298 -2.13,15.27698 z"
id="path9" />
<path
style="fill:#e0e0e0"
inkscape:connector-curvature="0"
d="m 189.69499,1020.2148 c -1.611,1.455 -3.253,2.879 -4.677,4.799 1.336,0.202 2.847,-0.536 4.149,-1.038 3.1,-1.2 6.205,-2.464 9.136,-4.242 2.471,-1.491 3.557,-3.559 5.525,-5.729 3.128,-3.453 11.064,-7.826 7.414,-14.52798 -2.719,-4.986 -6.815,-8.287 -10.625,-11.766 -3.91,-3.563 -7.146,-8.12 -11.014,-11.686 -3.021,-2.779 -6.131,-5.322 -9.096,-8.174 5.579,9.58 13.854,18.229 16.342,30.269 1.052,5.06898 0.482,10.68098 -1.609,15.17898 -1.44,3.103 -3.468,5.035 -5.545,6.916 z"
id="path11" />
<path
style="fill:#fde8d8"
inkscape:connector-curvature="0"
d="m 185.31599,958.57882 c -4.683,-5.215 -9.62,-9.816 -15.226,-12.592 -26.061,-12.95 -52.547,-16.702 -79.676,-6.107 -11.516,4.482 -23,8.926 -33.871,17.003 -9.793,7.281 -19.799,10.175 -28.129,20.557 -3.808,4.747 -7.12,10.085 -10.6,15.21 -1.88,2.771 -9.541,10.16998 -10.038,13.31898 7.826,-49.59398 35.774,-85.61098 74.631,-97.16298 21.685,-6.446 44.926,-6.698 66.208,0.558 41.161,14.032 65.07,63.984 110.26,68.996 -10.247,5.921 -25.498,14.445 -36.827,12.544 -15.004,-2.524 -25.092,-19.354 -36.732,-32.325 z"
id="path13" />
<path
style="fill:#13110c"
inkscape:connector-curvature="0"
d="m 84.59999,935.18882 c -16.579,7.807 -35.071,19.887 -48.617,34.558 -5.398,5.84 -10.786,13.043 -15.411,19.911 -4.861,7.228 -9.226,19.47898 -15.298,24.92298 17.871,-16.03698 31.885,-39.55098 51.214,-52.67698 19.793,-13.423 41.896,-21.986 64.499,-19.11 17.709,2.249 32.588,2.801 47.907,16.302 9.531,8.416 17.377,18.582 25.736,28.694 7.39,8.94 17.775,15.18398 27.607,18.78598 15.495,5.676 31.052,-4.564 43.443,-15.11498 -7.113,8.043 -20.393,7.964 -29.309,6.557 -10.104,-1.601 -16.4,-10.025 -24.491,-18.018 -25.249,-24.931 -47.549,-51.856 -81.269,-53.546 -15.979,-0.805 -30.979,1.655 -46.011,8.735 z"
id="path38" />
<path
style="fill:#13110c"
inkscape:connector-curvature="0"
d="m 182.79299,1016.7278 c -2.142,0.883 -4.38,1.839 -6.735,2.886 -25.104,11.097 -63.693,11.509 -90.543,3.47 -14.537,-4.353 -25.807,-11.37 -39.404,-16.527 -16.022,-6.091 -37.796,-3.376 -46.111,10.634 18.83,-6.896 31.207,-10.988 51.483,-4.543 16.582,5.274 31.153,14.17 48.185,18.37 15.965,3.928 29.439,4.225 45.71,3.604 11.396,-0.428 26.109,0.563 31.645,10.152 -3.593,-6.221 -11.537,-12.412 -17.705,-15.713 9.778,1.798 19.384,8.449 24.663,14.852 -2.097,-7.141 -10.645,-12.228 -17.916,-16.204 11.985,0.961 23.334,6.567 31.188,13.769 -3.438,-5.891 -15.028,-13.138 -23.29,-13.172 14.172,-0.773 29.215,6.376 37.643,15.073 -3.37,-10.21 -19.971,-18.366 -32.702,-18.585 13.402,-2.587 24.96,1.471 36.628,5.33 -5.975,-3.76 -13.023,-7.264 -20.674,-8.438 9.45,-3.149 21.563,0.076 29.498,4.545 -6.225,-4.642 -14.201,-10.165 -23.227,-9.947 -0.31,0.144 -0.299,0.152 0.032,0.026 13.055,-4.066 27.921,-5.208 41.253,-1.142 -26.41,-8.056 -38.122,-7.304 -59.621,1.56 z"
id="path40" />
<path
style="fill:#13110c"
inkscape:connector-curvature="0"
d="m 188.53299,973.53982 c 15.276,26.222 50.632,13.192 65.928,-5.786 -16.571,15.641 -49.753,18.069 -65.921,1.884 17.227,5.013 45.147,-1.476 53.072,-23.814 -19.995,26.604 -50.883,13.37 -73.785,5.881 12.2,8.602 40.651,3.67 42.151,-17.61 -9.925,20.55 -39.27,15.457 -54.241,10.215 13.283,0.963 26.092,-7.722 31.009,-23.692 -14.941,27.023 -39.131,8.575 -57.152,17.568 22.925,10.134 47.109,28.256 69.591,47.226 l -10.652,-11.872 z"
id="path42" />
<g
transform="translate(-5.9716316e-6,903.94593)"
id="g3071"
style="opacity:0.2">
<path
id="path32"
d="m 97.20399,37.15989 c 29.52,-3.487 87.91,0.046 64.37,52.784 -10.83,24.267 -36.983,34.983 -59.791,29.84 -16.335,-3.685 -31.849,-22.343 -34.766,-40.647 -1.342,-8.403 -1.066,-17.043 -0.169,-25.521 1.512,-14.268 20.378,-15.278 30.356,-16.456 z"
style="fill:url(#linearGradient3063)"
inkscape:connector-curvature="0" />
<path
id="path34"
d="m 137.43799,58.33489 c 7.99,33.093 -33.19,49.197 -42.828,19.683 -9.451,-28.893 34.154,-55.624 42.828,-19.683 z"
inkscape:connector-curvature="0"
style="fill:#13110c" />
<path
id="path36"
d="m 127.69799,74.86289 c 3.021,-9.293 15.078,-17.983 19.172,-6.874 2.508,6.797 3.25,16.393 -3.21,19.87 -3.878,2.087 -12.51,0.061 -15.289,-4.131 -1.683,-2.533 -1.691,-5.733 -0.673,-8.865 z"
inkscape:connector-curvature="0"
style="fill:#ffffff" />
<path
id="path63"
d="m 72.00399,96.29089 c -2.528,-5.009 -4.789,-11.611 -5.481,-16.51 -0.563,-3.991 -0.833,-8.061 -0.831,-12.192 0.004,-4.544 1.491,-10.175 0.682,-14.333 4.567,-2.297 12.487,-0.141 17.548,-0.785 -4.911,0.627 -11.877,1.244 -16.168,3.968 5.154,0.289 10.995,-0.254 16.393,-0.324 -5.155,1.673 -10.969,1.821 -15.951,3.684 6.045,0.232 12.172,-1.238 18.154,0 -6.431,0.398 -13.654,3.29 -19.718,5.553 5.494,-1.229 11.189,-1.6 16.848,-1.674 -5.75,2.641 -11.933,4.769 -17.282,8.318 5.613,-1.342 12.316,-5.274 18.208,-3.633 -2.296,4.37 -12.113,6.593 -16.229,9.418 5.8,0.351 11.682,-5.285 17.998,-4.784 -3.55,4.832 -11.579,6.755 -16.01,11.148 5.349,-2.793 10.612,-5.875 16.44,-7.264 -2.004,4.742 -9.99,7.521 -13.402,11.166 3.831,-1.509 6.901,-4.802 10.988,-5.979 -1.842,4.344 -7.928,6.126 -9.657,10.845 3.665,-0.304 8.267,-5.411 12.071,-6.758 -1.928,4.492 -6.936,7.39 -8.543,12.369 4.121,-2.071 8.075,-6.064 12.243,-8.476 -2.386,3.574 -8.664,8.604 -8.475,13.368 4.228,-3.784 8.286,-7.836 12.937,-11.165 -2.591,4.634 -8.017,10.221 -9.205,15.302 2.554,-1.311 3.929,-5.313 5.647,-7.78 2.112,-3.032 4.71,-6.08 7.763,-7.973 -2.644,5.437 -7.324,11.164 -8.276,17.461 3.135,-3.832 5.396,-8.72 8.299,-12.822 -0.84,6.101 -3.57,11.636 -3.718,17.956 2.904,-4.808 5.006,-11.595 9.416,-15.102 -1.592,4.891 -3.872,9.64 -1.691,14.852 2.233,-3.979 2.624,-9.515 4.529,-13.809 -0.339,4.17 -1.647,9.647 -0.45,13.576 1.155,-4.621 3.092,-8.313 4.737,-12.603 0.393,4.71 -1.248,8.855 0.381,13.513 0.841,-4.169 2,-8.368 2.878,-12.536 0.527,3.953 0.668,10.725 2.805,13.814 0.911,-3.199 0.999,-6.873 0.971,-10.213 2.094,2.294 1.647,6.995 3.896,9.232 0.428,-2.886 0.534,-6.438 0.131,-9.232 0.933,2.693 0.816,6.111 2.949,8.009 0.005,-2.284 -0.429,-4.753 -0.861,-6.966 1.807,2.782 3.712,5.304 5.764,7.879 -0.02,-3.279 -0.584,-6.651 -1.127,-9.836 1.392,2.798 2.968,6.077 5.763,7.391 0.136,-3.669 -1.81,-7.994 -3.466,-11.104 2.075,1.708 4.643,3.878 6.515,5.754 -1.741,-2.083 -3.341,-5.115 -4.37,-7.71 3.337,2.26 6.377,4.688 9.861,6.795 -0.096,-3.301 -2.017,-7.084 -3.776,-9.704 -0.078,-0.083 -0.081,-0.079 -0.011,0.015 2.955,2.446 6.124,4.568 9.756,5.544 -0.486,-2.876 -1.88,-7.229 -3.888,-9.223 2.818,1.351 7.385,4.896 10.341,2.894 -1.996,-1.944 -4.347,-4.014 -6.404,-5.808 2.823,1.123 5.71,2.466 8.73,2.899 -2.192,-1.177 -5.77,-2.905 -6.742,-5.332 2.548,0.398 7.842,2.137 9.918,0.213 -1.662,-2.701 -5.78,-2.227 -6.837,-5.772 1.99,0.715 4.642,1.65 6.565,0.652 -0.71,-2.863 -4.381,-3.4 -6.352,-5.028 1.985,0.668 7.11,1.321 8.325,-0.544 -1.861,-1.638 -4.464,-1.265 -6.505,-2.493 2.347,-0.479 5.018,-0.529 7.413,-0.519 -1.537,-1.905 -4.674,-2.595 -6.748,-3.877 1.496,0.178 3.063,0.521 4.522,-0.036 -0.697,-1.268 -2.176,-1.808 -3.651,-1.889 1.414,-0.459 2.9,-0.641 4.335,-0.678 -0.943,-0.119 -2.322,-0.541 -3.237,-0.8 1.207,-0.445 2.673,-0.621 3.889,-1.214 -1.306,-1.392 -3.78,-1.365 -5.251,-2.64 0.836,-0.067 1.548,-0.351 2.434,-0.293 -0.069,-0.019 -1.281,-0.54 -1.729,-0.675 1.831,-0.035 4.233,-0.273 5.729,-0.521 -0.322,3.002 0.923,6.39 1.087,9.48 0.229,4.342 -0.316,8.042 -0.883,12.261 -0.745,5.549 -2.746,10.105 -5.56,14.802 -6.76,11.289 -15.02,15.43 -26.396,19.587 -14.315,5.229 -29.281,4.51 -42.82,-2.499 -6.547,-3.391 -12.161,-8.814 -16.314,-15.338 -0.618,-0.967 -1.238,-2.074 -1.844,-3.272 z"
style="fill:url(#linearGradient3112)"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>
...@@ -29,11 +29,13 @@ import pycam.Plugins ...@@ -29,11 +29,13 @@ import pycam.Plugins
class Models(pycam.Plugins.ListPluginBase): class Models(pycam.Plugins.ListPluginBase):
UI_FILE = "models.ui" UI_FILE = "models.ui"
COLUMN_VISIBLE = 2 COLUMN_ID, COLUMN_NAME, COLUMN_VISIBLE = range(3)
ICONS = {"visible": "visible.svg", "hidden": "visible_off.svg"}
def setup(self): def setup(self):
if self.gui: if self.gui:
import gtk import gtk
self._gtk = gtk
model_frame = self.gui.get_object("ModelBox") model_frame = self.gui.get_object("ModelBox")
model_frame.unparent() model_frame.unparent()
self.core.register_ui("main", "Models", model_frame, -50) self.core.register_ui("main", "Models", model_frame, -50)
...@@ -42,7 +44,7 @@ class Models(pycam.Plugins.ListPluginBase): ...@@ -42,7 +44,7 @@ class Models(pycam.Plugins.ListPluginBase):
for index in range(model_handling_obj.get_n_pages()): for index in range(model_handling_obj.get_n_pages()):
model_handling_obj.remove_page(0) model_handling_obj.remove_page(0)
def add_model_handling_item(item, name): def add_model_handling_item(item, name):
model_handling_obj.append_page(item, gtk.Label(name)) model_handling_obj.append_page(item, self._gtk.Label(name))
self.core.register_ui_section("model_handling", self.core.register_ui_section("model_handling",
add_model_handling_item, clear_model_handling_obj) add_model_handling_item, clear_model_handling_obj)
self._modelview = self.gui.get_object("ModelView") self._modelview = self.gui.get_object("ModelView")
...@@ -52,8 +54,13 @@ class Models(pycam.Plugins.ListPluginBase): ...@@ -52,8 +54,13 @@ class Models(pycam.Plugins.ListPluginBase):
(self.ACTION_CLEAR, "ModelDeleteAll")): (self.ACTION_CLEAR, "ModelDeleteAll")):
self.register_list_action_button(action, self._modelview, self.register_list_action_button(action, self._modelview,
self.gui.get_object(obj_name)) self.gui.get_object(obj_name))
self.gui.get_object("ModelVisibleToggle").connect("toggled", self._modelview.connect("row-activated",
self._list_action_toggle, self.COLUMN_VISIBLE) self._list_action_toggle_custom, self.COLUMN_VISIBLE)
self.gui.get_object("ModelVisibleColumn").set_cell_data_func(
self.gui.get_object("ModelVisibleSymbol"),
self._visualize_visible_state)
self.gui.get_object("ModelNameColumn").connect("edited",
self._edit_model_name)
self._treemodel = self.gui.get_object("ModelList") self._treemodel = self.gui.get_object("ModelList")
self._treemodel.clear() self._treemodel.clear()
def update_model(): def update_model():
...@@ -72,6 +79,26 @@ class Models(pycam.Plugins.ListPluginBase): ...@@ -72,6 +79,26 @@ class Models(pycam.Plugins.ListPluginBase):
self.core.add_item("models", lambda: self) self.core.add_item("models", lambda: self)
return True return True
def _edit_model_name(self, cell, path, new_text):
path = int(path)
if new_text != self._treemodel[path][self.COLUMN_NAME]:
self._treemodel[path][self.COLUMN_NAME] = new_text
def _visualize_visible_state(self, column, cell, model, m_iter):
visible = model.get_value(m_iter, self.COLUMN_VISIBLE)
if visible:
cell.set_property("pixbuf", self.ICONS["visible"])
else:
cell.set_property("pixbuf", self.ICONS["hidden"])
def _list_action_toggle_custom(self, treeview, path, clicked_column,
force_column=None):
if force_column is None:
column = self._modelview.get_columns().index(clicked_column)
else:
column = force_column
self._list_action_toggle(clicked_column, str(path[0]), column)
def _list_action_toggle(self, widget, path, column): def _list_action_toggle(self, widget, path, column):
path = int(path) path = int(path)
model = self._treemodel model = self._treemodel
......
...@@ -23,7 +23,9 @@ along with PyCAM. If not, see <http://www.gnu.org/licenses/>. ...@@ -23,7 +23,9 @@ along with PyCAM. If not, see <http://www.gnu.org/licenses/>.
import os import os
import imp import imp
import inspect import inspect
# TODO: load these modules only on demand
import gtk import gtk
import gobject
import pycam.Utils.log import pycam.Utils.log
import pycam.Utils.locations import pycam.Utils.locations
...@@ -36,6 +38,8 @@ class PluginBase(object): ...@@ -36,6 +38,8 @@ class PluginBase(object):
UI_FILE = None UI_FILE = None
DEPENDS = [] DEPENDS = []
ICONS = {}
ICON_SIZE = 23
def __init__(self, core, name): def __init__(self, core, name):
self.enabled = True self.enabled = True
...@@ -52,6 +56,20 @@ class PluginBase(object): ...@@ -52,6 +56,20 @@ class PluginBase(object):
self.gui.add_from_file(gtk_build_file) self.gui.add_from_file(gtk_build_file)
except RuntimeError: except RuntimeError:
self.gui = None self.gui = None
for key in self.ICONS:
icon_location = pycam.Utils.locations.get_ui_file_location(
self.ICONS[key])
if icon_location:
try:
pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(
icon_location, self.ICON_SIZE, self.ICON_SIZE)
except gobject.GError:
self.ICONS[key] = None
else:
self.ICONS[key] = pixbuf
else:
self.log.debug("Failed to locate icon: %s" % self.ICONS[key])
self.ICONS[key] = None
def setup(self): def setup(self):
raise NotImplementedError(("Module %s (%s) does not implement " + \ raise NotImplementedError(("Module %s (%s) does not implement " + \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment