From: Ben Pfaff <blp@cs.stanford.edu> Date: Thu, 5 Sep 2013 04:42:59 +0000 (-0700) Subject: psppire-var-sheet: Add icons for role column too. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1c7615c39c76a0aa0ab0b7bfb42d56e020173a8;p=pspp psppire-var-sheet: Add icons for role column too. Some of the changes here reflect the way that all three combo box columns now include a pixbuf, allowing greater code reuse. Artwork contributed by Bastian Diaz. --- diff --git a/Smake b/Smake index a664d91aeb..306e115e42 100644 --- a/Smake +++ b/Smake @@ -152,7 +152,13 @@ src/ui/gui/icons/categories/16x16/variable-ordinal.png \ src/ui/gui/icons/categories/16x16/align-right.png \ src/ui/gui/icons/categories/16x16/variable-date-nominal.png \ src/ui/gui/icons/categories/16x16/variable-date-ordinal.png \ -src/ui/gui/icons/categories/16x16/variable-string-scale.png +src/ui/gui/icons/categories/16x16/variable-string-scale.png \ +src/ui/gui/icons/categories/16x16/variable-role-partition.png \ +src/ui/gui/icons/categories/16x16/variable-role-target.png \ +src/ui/gui/icons/categories/16x16/variable-role-split.png \ +src/ui/gui/icons/categories/16x16/variable-role-input.png \ +src/ui/gui/icons/categories/16x16/variable-role-none.png \ +src/ui/gui/icons/categories/16x16/variable-role-both.png MIMETYPE_ICONS = \ src/ui/gui/icons/mimetypes/32x32/application-x-spss-por.png \ diff --git a/src/ui/gui/artwork/categories/16x16/variable-role-both.svg b/src/ui/gui/artwork/categories/16x16/variable-role-both.svg new file mode 100644 index 0000000000..2e1791f1cb --- /dev/null +++ b/src/ui/gui/artwork/categories/16x16/variable-role-both.svg @@ -0,0 +1,114 @@ +<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="15.992429" + height="15.992429" + id="svg2" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="role-target.svg"> + <title + id="title2985">role icons</title> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="11.2" + inkscape:cx="35.043452" + inkscape:cy="6.1061886" + 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="1366" + inkscape:window-height="711" + inkscape:window-x="0" + inkscape:window-y="28" + inkscape:window-maximized="1" /> + <metadata + id="metadata7"> + <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>role icons</dc:title> + <dc:creator> + <cc:Agent> + <dc:title>Bastián DÃaz</dc:title> + </cc:Agent> + </dc:creator> + <dc:description>Iconos symbólicos para GNU PSPP, basados en los iconos del proyecto GNOME</dc:description> + <cc:license + rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/by-sa/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:requires + rdf:resource="http://creativecommons.org/ns#ShareAlike" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + inkscape:label="Capa 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-237.85896,-518.41395)"> + <g + transform="translate(82.858961,494.41395)" + id="g4166"> + <path + transform="matrix(0.9691116,0,0,0.9691116,68.539162,1.5005274)" + d="m 105,32 c 0,3.865993 -3.13401,7 -7,7 -3.865993,0 -7,-3.134007 -7,-7 0,-3.865993 3.134007,-7 7,-7 3.86599,0 7,3.134007 7,7 z" + sodipodi:ry="7" + sodipodi:rx="7" + sodipodi:cy="32" + sodipodi:cx="98" + id="path3090-1" + style="opacity:0.35;fill:none;stroke:#555753;stroke-width:1.453125;stroke-miterlimit:4;stroke-dasharray:none" + sodipodi:type="arc" /> + <path + transform="matrix(0.58676677,0,0,0.58676677,106.00896,13.735563)" + d="m 105,32 c 0,3.865993 -3.13401,7 -7,7 -3.865993,0 -7,-3.134007 -7,-7 0,-3.865993 3.134007,-7 7,-7 3.86599,0 7,3.134007 7,7 z" + sodipodi:ry="7" + sodipodi:rx="7" + sodipodi:cy="32" + sodipodi:cx="98" + id="path3090-9-0" + style="opacity:0.35;fill:none;stroke:#555753;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none" + sodipodi:type="arc" /> + <path + inkscape:connector-curvature="0" + id="path4161" + d="m 155,24 0,1.9375 5.03125,5.0625 1.25,1.25 -2.5,-0.03125 c -0.35971,0.0064 -0.72034,0.159163 -0.96875,0.40625 l -0.96875,0.96875 0.9375,0.9375 c 0.2976,0.299236 0.62522,0.46126 1,0.46875 l 7.125,-0.03125 0.0625,-7.125 c -0.005,-0.374817 -0.13986,-0.700766 -0.4375,-1 l -0.96875,-0.96875 -0.96875,0.96875 c -0.24841,0.247087 -0.36669,0.640332 -0.375,1 l -0.0313,2.4375 L 163,30.09375 156.9375,24 155,24 z" + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#555753;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> + </g> + </g> +</svg> diff --git a/src/ui/gui/artwork/categories/16x16/variable-role-input.svg b/src/ui/gui/artwork/categories/16x16/variable-role-input.svg new file mode 100644 index 0000000000..dda324452f --- /dev/null +++ b/src/ui/gui/artwork/categories/16x16/variable-role-input.svg @@ -0,0 +1,111 @@ +<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="16" + height="16" + id="svg2" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="Documento nuevo 1"> + <title + id="title2985">role icons</title> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="3.959798" + inkscape:cx="74.108081" + inkscape:cy="1.6357042" + 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="1366" + inkscape:window-height="711" + inkscape:window-x="0" + inkscape:window-y="28" + inkscape:window-maximized="1" /> + <metadata + id="metadata7"> + <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>role icons</dc:title> + <dc:creator> + <cc:Agent> + <dc:title>Bastián DÃaz</dc:title> + </cc:Agent> + </dc:creator> + <dc:description>Iconos symbólicos para GNU PSPP, basados en los iconos del proyecto GNOME</dc:description> + <cc:license + rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/by-sa/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:requires + rdf:resource="http://creativecommons.org/ns#ShareAlike" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + inkscape:label="Capa 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-237.71429,-518.6479)"> + <g + transform="translate(212.71429,494.6479)" + id="g4030"> + <g + transform="matrix(0.81516552,0.81952607,-0.81952607,0.81516552,59.970238,-6.448087)" + id="g3956"> + <path + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#555753;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" + id="path15405" + d="m 2,39 0,2 10,0 0,-2 -10,0 z" + inkscape:connector-curvature="0" /> + <path + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#555753;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans" + sodipodi:nodetypes="ccccccccccccc" + id="rect3217-6-2-2-4-85-5" + d="m 9.0002,36 0,1 c 0,0.25689 0.12983,0.52846 0.3125,0.71875 L 11.59395,40 9.3127,42.28125 C 9.13003,42.47154 9.0002,42.74311 9.0002,43 l 0,1 1,0 c 0.30945,0 0.55232,-0.0903 0.75,-0.28125 L 14.40645,40 10.7502,36.28125 C 10.55252,36.0903 10.30965,36 10.0002,36 z" + inkscape:connector-curvature="0" /> + </g> + <rect + style="opacity:0;fill:#555753;fill-opacity:1;fill-rule:evenodd;stroke:none" + id="rect3960" + width="16" + height="16" + x="25" + y="24" /> + </g> + </g> +</svg> diff --git a/src/ui/gui/artwork/categories/16x16/variable-role-none.svg b/src/ui/gui/artwork/categories/16x16/variable-role-none.svg new file mode 100644 index 0000000000..811455f960 --- /dev/null +++ b/src/ui/gui/artwork/categories/16x16/variable-role-none.svg @@ -0,0 +1,109 @@ +<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="16" + height="16" + id="svg2" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="role-both.svg"> + <title + id="title2985">role icons</title> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="11.2" + inkscape:cx="34.472023" + inkscape:cy="4.6418998" + 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="1366" + inkscape:window-height="711" + inkscape:window-x="0" + inkscape:window-y="28" + inkscape:window-maximized="1" /> + <metadata + id="metadata7"> + <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>role icons</dc:title> + <dc:creator> + <cc:Agent> + <dc:title>Bastián DÃaz</dc:title> + </cc:Agent> + </dc:creator> + <dc:description>Iconos symbólicos para GNU PSPP, basados en los iconos del proyecto GNOME</dc:description> + <cc:license + rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/by-sa/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:requires + rdf:resource="http://creativecommons.org/ns#ShareAlike" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + inkscape:label="Capa 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-238.43039,-516.94209)"> + <g + transform="translate(18.430389,492.94209)" + id="g3865"> + <g + id="g3091"> + <path + inkscape:connector-curvature="0" + d="m 228.00734,25.02074 c -3.86004,0 -7.00729,3.16598 -7.00729,7.01026 0,3.84428 3.14725,6.97868 7.00729,6.97868 3.86004,0 7.00729,-3.1344 7.00729,-6.97868 0,-3.84428 -3.14725,-7.01026 -7.00729,-7.01026 z m 0,2.02098 c 2.77694,0 5.00973,2.22368 5.00973,4.98928 0,2.7656 -2.23279,4.9577 -5.00973,4.9577 -2.77695,0 -5.00974,-2.1921 -5.00974,-4.9577 0,-2.7656 2.23279,-4.98928 5.00974,-4.98928 z" + id="path4222" + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#555753;fill-opacity:1;stroke:none;stroke-width:1.97519779;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> + <path + inkscape:connector-curvature="0" + d="m 231.4063,27.4375 -8,8 1.40625,1.40625 8,-8 -1.40625,-1.40625 z" + id="path4992" + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#555753;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> + </g> + <rect + y="24" + x="220" + height="16" + width="16" + id="rect3095" + style="opacity:0;fill:#555753;fill-opacity:1;fill-rule:evenodd;stroke:none" /> + </g> + </g> +</svg> diff --git a/src/ui/gui/artwork/categories/16x16/variable-role-partition.svg b/src/ui/gui/artwork/categories/16x16/variable-role-partition.svg new file mode 100644 index 0000000000..e1473290ff --- /dev/null +++ b/src/ui/gui/artwork/categories/16x16/variable-role-partition.svg @@ -0,0 +1,120 @@ +<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="16" + height="16" + id="svg2" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="role-none.svg"> + <title + id="title2985">role icons</title> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="11.2" + inkscape:cx="34.079166" + inkscape:cy="4.5168998" + 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="1366" + inkscape:window-height="711" + inkscape:window-x="0" + inkscape:window-y="28" + inkscape:window-maximized="1" /> + <metadata + id="metadata7"> + <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>role icons</dc:title> + <dc:creator> + <cc:Agent> + <dc:title>Bastián DÃaz</dc:title> + </cc:Agent> + </dc:creator> + <dc:description>Iconos symbólicos para GNU PSPP, basados en los iconos del proyecto GNOME</dc:description> + <cc:license + rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/by-sa/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:requires + rdf:resource="http://creativecommons.org/ns#ShareAlike" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + inkscape:label="Capa 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-238.82325,-516.81709)"> + <g + transform="translate(-46.176753,492.81709)" + id="g3072"> + <path + sodipodi:end="4.712389" + sodipodi:start="0" + transform="matrix(1.399999,0,0,1.1666666,-116.79971,-4.3333312)" + d="m 297,32 c 0,3.313708 -2.23858,6 -5,6 -2.76142,0 -5,-2.686292 -5,-6 0,-3.313708 2.23858,-6 5,-6 0,0 0,0 0,0 l 0,6 z" + sodipodi:ry="6" + sodipodi:rx="5" + sodipodi:cy="32" + sodipodi:cx="292" + id="path4449" + style="fill:#555753;fill-opacity:1;fill-rule:evenodd;stroke:none" + sodipodi:type="arc" /> + <path + sodipodi:end="6.2831853" + sodipodi:start="4.712389" + transform="matrix(1.399999,0,0,1.1666666,-114.79971,-6.3333312)" + d="m 292,26 c 2.76142,0 5,2.686292 5,6 l -5,0 z" + sodipodi:ry="6" + sodipodi:rx="5" + sodipodi:cy="32" + sodipodi:cx="292" + id="path4449-5" + style="fill:#555753;fill-opacity:1;fill-rule:evenodd;stroke:none" + sodipodi:type="arc" /> + <rect + y="24" + x="285" + height="16" + width="16" + id="rect4469" + style="opacity:0;fill:#555753;fill-opacity:1;fill-rule:evenodd;stroke:none" /> + </g> + </g> +</svg> diff --git a/src/ui/gui/artwork/categories/16x16/variable-role-split.svg b/src/ui/gui/artwork/categories/16x16/variable-role-split.svg new file mode 100644 index 0000000000..41623fe8e1 --- /dev/null +++ b/src/ui/gui/artwork/categories/16x16/variable-role-split.svg @@ -0,0 +1,122 @@ +<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="15.999988" + height="16.000021" + id="svg2" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="role-partition.svg"> + <title + id="title2985">role icons</title> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="44.8" + inkscape:cx="7.7245245" + inkscape:cy="15.746385" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="true" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:window-width="1366" + inkscape:window-height="711" + inkscape:window-x="0" + inkscape:window-y="28" + inkscape:window-maximized="1" + inkscape:snap-bbox="true"> + <inkscape:grid + type="xygrid" + id="grid3179" + empspacing="5" + visible="true" + enabled="true" + snapvisiblegridlinesonly="true" + originx="8.0000001e-07px" + originy="1.7269649e-05px" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <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>role icons</dc:title> + <dc:creator> + <cc:Agent> + <dc:title>Bastián DÃaz</dc:title> + </cc:Agent> + </dc:creator> + <dc:description>Iconos symbólicos para GNU PSPP, basados en los iconos del proyecto GNOME</dc:description> + <cc:license + rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/by-sa/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:requires + rdf:resource="http://creativecommons.org/ns#ShareAlike" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + inkscape:label="Capa 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-239.21611,-517.10727)"> + <g + transform="matrix(0.99999925,0,0,1.0039229,-40.783681,11.130136)" + style="display:inline" + id="g6595" + inkscape:export-filename="/home/raizen/Dropbox/Proyectos/GNU PSPP/PSPPire artwork/icons/actions/16x16/data-split-file.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <path + inkscape:connector-curvature="0" + id="rect3025" + d="m 281.15626,503.99999 c -0.63923,0 -1.15625,0.51702 -1.15625,1.15625 l 0,1.15625 0,1.15625 0,2.3125 0,1.15625 1.15625,0 3.46875,0 1.15625,0 3.4375,0 1.15625,0 3.46875,0 1.15625,0 0,-4.625 0,-1.15625 c 0,-0.63923 -0.51702,-1.15625 -1.15625,-1.15625 l -12.6875,0 z m 0,3.46875 3.46875,0 0,2.3125 -3.46875,0 0,-2.3125 z m 4.625,0 3.4375,0 0,2.3125 -3.4375,0 0,-2.3125 z m 4.59375,0 3.46875,0 0,2.3125 -3.46875,0 0,-2.3125 z" + style="fill:#555753;fill-opacity:1;stroke:none;display:inline" /> + <path + inkscape:connector-curvature="0" + id="rect3025-1" + d="m 281.15626,512.99999 c -0.63923,0 -1.15625,0.51702 -1.15625,1.15625 l 0,1.15625 0,1.15625 0,2.3125 0,1.15625 1.15625,0 3.46875,0 1.15625,0 3.4375,0 1.15625,0 3.46875,0 1.15625,0 0,-4.625 0,-1.15625 c 0,-0.63923 -0.51702,-1.15625 -1.15625,-1.15625 l -12.6875,0 z m 0,3.46875 3.46875,0 0,2.3125 -3.46875,0 0,-2.3125 z m 4.625,0 3.4375,0 0,2.3125 -3.4375,0 0,-2.3125 z m 4.59375,0 3.46875,0 0,2.3125 -3.46875,0 0,-2.3125 z" + style="fill:#555753;fill-opacity:1;stroke:none;display:inline" /> + <rect + transform="translate(20,-20.000008)" + y="524" + x="260" + height="15" + width="16" + id="rect6593" + style="opacity:0;fill:#555753;fill-opacity:1;fill-rule:evenodd;stroke:none" /> + </g> + </g> +</svg> diff --git a/src/ui/gui/artwork/categories/16x16/variable-role-target.svg b/src/ui/gui/artwork/categories/16x16/variable-role-target.svg new file mode 100644 index 0000000000..9c3e67df79 --- /dev/null +++ b/src/ui/gui/artwork/categories/16x16/variable-role-target.svg @@ -0,0 +1,119 @@ +<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="14.96066" + height="14.96066" + id="svg2" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="role-input.svg"> + <title + id="title2985">role icons</title> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="11.2" + inkscape:cx="35.972023" + inkscape:cy="5.5244698" + 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="1366" + inkscape:window-height="711" + inkscape:window-x="0" + inkscape:window-y="28" + inkscape:window-maximized="1" /> + <metadata + id="metadata7"> + <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>role icons</dc:title> + <dc:creator> + <cc:Agent> + <dc:title>Bastián DÃaz</dc:title> + </cc:Agent> + </dc:creator> + <dc:description>Iconos symbólicos para GNU PSPP, basados en los iconos del proyecto GNOME</dc:description> + <cc:license + rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /> + </cc:Work> + <cc:License + rdf:about="http://creativecommons.org/licenses/by-sa/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:requires + rdf:resource="http://creativecommons.org/ns#ShareAlike" /> + </cc:License> + </rdf:RDF> + </metadata> + <g + inkscape:label="Capa 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-236.93039,-518.864)"> + <g + id="g3900" + transform="matrix(0.93882683,0,0,0.93882683,152.40569,496.30187)"> + <path + transform="matrix(1.0322581,0,0,1.0322581,-3.1612978,-1.0322601)" + d="m 105,32 c 0,3.865993 -3.13401,7 -7,7 -3.865993,0 -7,-3.134007 -7,-7 0,-3.865993 3.134007,-7 7,-7 3.86599,0 7,3.134007 7,7 z" + sodipodi:ry="7" + sodipodi:rx="7" + sodipodi:cy="32" + sodipodi:cx="98" + id="path3090" + style="fill:none;stroke:#555753;stroke-width:1.453125;stroke-miterlimit:4;stroke-dasharray:none" + sodipodi:type="arc" /> + <path + transform="matrix(0.625,0,0,0.625,36.75,12)" + d="m 105,32 c 0,3.865993 -3.13401,7 -7,7 -3.865993,0 -7,-3.134007 -7,-7 0,-3.865993 3.134007,-7 7,-7 3.86599,0 7,3.134007 7,7 z" + sodipodi:ry="7" + sodipodi:rx="7" + sodipodi:cy="32" + sodipodi:cx="98" + id="path3090-9" + style="fill:none;stroke:#555753;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none" + sodipodi:type="arc" /> + <path + transform="matrix(0.25,0,0,0.25,73.5,24)" + d="m 105,32 c 0,3.865993 -3.13401,7 -7,7 -3.865993,0 -7,-3.134007 -7,-7 0,-3.865993 3.134007,-7 7,-7 3.86599,0 7,3.134007 7,7 z" + sodipodi:ry="7" + sodipodi:rx="7" + sodipodi:cy="32" + sodipodi:cx="98" + id="path3090-9-6" + style="fill:#555753;fill-opacity:1;stroke:#555753;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none" + sodipodi:type="arc" /> + </g> + </g> +</svg> diff --git a/src/ui/gui/psppire-var-sheet.c b/src/ui/gui/psppire-var-sheet.c index e0f104db14..02e880db36 100644 --- a/src/ui/gui/psppire-var-sheet.c +++ b/src/ui/gui/psppire-var-sheet.c @@ -335,6 +335,22 @@ get_var_align_stock_id (enum alignment alignment) } } +const char * +get_var_role_stock_id (enum var_role role) +{ + switch (role) + { + case ROLE_INPUT: return "variable-role-input"; + case ROLE_OUTPUT: return "variable-role-target"; + case ROLE_BOTH: return "variable-role-both"; + case ROLE_NONE: return "variable-role-none"; + case ROLE_PARTITION: return "variable-role-partition"; + case ROLE_SPLIT: return "variable-role-split"; + default: + g_return_val_if_reached (""); + } +} + static void render_var_cell (PsppSheetViewColumn *tree_column, GtkCellRenderer *cell, @@ -483,10 +499,14 @@ render_var_cell (PsppSheetViewColumn *tree_column, break; case VS_ROLE: - g_object_set (cell, - "text", var_role_to_string (var_get_role (var)), - "editable", TRUE, - NULL); + if (GTK_IS_CELL_RENDERER_TEXT (cell)) + g_object_set (cell, + "text", var_role_to_string (var_get_role (var)), + "editable", TRUE, + NULL); + else + g_object_set (cell, "stock-id", + get_var_role_stock_id (var_get_role (var)), NULL); break; } } @@ -657,12 +677,18 @@ alignment_to_stock_id (enum fmt_type type, int alignment) return get_var_align_stock_id (alignment); } +static const char * +role_to_stock_id (enum fmt_type type, int role) +{ + return get_var_role_stock_id (role); +} + static void -render_measure (GtkCellLayout *cell_layout, - GtkCellRenderer *cell, - GtkTreeModel *tree_model, - GtkTreeIter *iter, - gpointer data) +render_var_pixbuf (GtkCellLayout *cell_layout, + GtkCellRenderer *cell, + GtkTreeModel *tree_model, + GtkTreeIter *iter, + gpointer data) { const char *(*value_to_stock_id) (enum fmt_type, int value); enum fmt_type type = GPOINTER_TO_INT (data); @@ -698,18 +724,19 @@ on_combo_editing_started (GtkCellRenderer *renderer, "value-to-stock-id", value_to_stock_id); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (editable), cell, FALSE); gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (editable), cell, - render_measure, + render_var_pixbuf, GINT_TO_POINTER (format->type), NULL); } } -static PsppSheetViewColumn * +static void add_combo_column (PsppireVarSheet *var_sheet, enum vs_column column_id, const char *title, int width, const char *(*value_to_stock_id) (enum fmt_type, int value), ...) { + PsppSheetViewColumn *column; GtkCellRenderer *cell; GtkListStore *store; const char *name; @@ -742,7 +769,13 @@ add_combo_column (PsppireVarSheet *var_sheet, enum vs_column column_id, var_sheet); } - return add_var_sheet_column (var_sheet, cell, column_id, title, width); + column = add_var_sheet_column (var_sheet, cell, column_id, title, width); + + cell = gtk_cell_renderer_pixbuf_new (); + g_object_set (cell, "width", 16, "height", 16, NULL); + pspp_sheet_view_column_pack_end (column, cell, FALSE); + pspp_sheet_view_column_set_cell_data_func ( + column, cell, render_var_cell, var_sheet, NULL); } static void @@ -1315,7 +1348,6 @@ psppire_var_sheet_init (PsppireVarSheet *obj) { PsppSheetView *sheet_view = PSPP_SHEET_VIEW (obj); PsppSheetViewColumn *column; - GtkCellRenderer *cell; GtkAction *action; GList *list; @@ -1355,31 +1387,19 @@ psppire_var_sheet_init (PsppireVarSheet *obj) add_spin_column (obj, VS_COLUMNS, _("Columns"), 3); - column - = add_combo_column (obj, VS_ALIGN, _("Align"), 8, alignment_to_stock_id, - alignment_to_string (ALIGN_LEFT), ALIGN_LEFT, - alignment_to_string (ALIGN_CENTRE), ALIGN_CENTRE, - alignment_to_string (ALIGN_RIGHT), ALIGN_RIGHT, - NULL); - cell = gtk_cell_renderer_pixbuf_new (); - g_object_set (cell, "width", 16, "height", 16, NULL); - pspp_sheet_view_column_pack_end (column, cell, FALSE); - pspp_sheet_view_column_set_cell_data_func ( - column, cell, render_var_cell, obj, NULL); + add_combo_column (obj, VS_ALIGN, _("Align"), 8, alignment_to_stock_id, + alignment_to_string (ALIGN_LEFT), ALIGN_LEFT, + alignment_to_string (ALIGN_CENTRE), ALIGN_CENTRE, + alignment_to_string (ALIGN_RIGHT), ALIGN_RIGHT, + NULL); - column - = add_combo_column (obj, VS_MEASURE, _("Measure"), 12, measure_to_stock_id, - measure_to_string (MEASURE_NOMINAL), MEASURE_NOMINAL, - measure_to_string (MEASURE_ORDINAL), MEASURE_ORDINAL, - measure_to_string (MEASURE_SCALE), MEASURE_SCALE, - NULL); - cell = gtk_cell_renderer_pixbuf_new (); - g_object_set (cell, "width", 16, "height", 16, NULL); - pspp_sheet_view_column_pack_end (column, cell, FALSE); - pspp_sheet_view_column_set_cell_data_func ( - column, cell, render_var_cell, obj, NULL); + add_combo_column (obj, VS_MEASURE, _("Measure"), 12, measure_to_stock_id, + measure_to_string (MEASURE_NOMINAL), MEASURE_NOMINAL, + measure_to_string (MEASURE_ORDINAL), MEASURE_ORDINAL, + measure_to_string (MEASURE_SCALE), MEASURE_SCALE, + NULL); - add_combo_column (obj, VS_ROLE, _("Role"), 12, NULL, + add_combo_column (obj, VS_ROLE, _("Role"), 12, role_to_stock_id, var_role_to_string (ROLE_INPUT), ROLE_INPUT, var_role_to_string (ROLE_OUTPUT), ROLE_OUTPUT, var_role_to_string (ROLE_BOTH), ROLE_BOTH,