Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • apps/xfce4-screenshooter
  • andreldm/xfce4-screenshooter
  • bobby285271/xfce4-screenshooter
  • samuelsmash/xfce4-screenshooter
  • triallax/xfce4-screenshooter
  • mbarriolinares/xfce4-screenshooter
  • Monsterovich/xfce4-screenshooter
  • correctmost/xfce4-screenshooter
  • rvaras/xfce4-screenshooter
9 results
Show changes
Showing
with 6291 additions and 19 deletions
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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"
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
inkscape:export-filename="/home/maug/GIT/xfce4-screenshooter/icons/32x32/org.xfce.screenshooter.png"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="org.xfce.screenshooter.svg"
id="svg18"
version="1.1"
width="32"
height="32">
<metadata
id="metadata24">
<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>
<defs
id="defs22">
<linearGradient
id="linearGradient1175"
inkscape:collect="always">
<stop
id="stop1171"
offset="0"
style="stop-color:#d2d8dc;stop-opacity:1" />
<stop
id="stop1173"
offset="1"
style="stop-color:#758087;stop-opacity:1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient948">
<stop
style="stop-color:#d2d8dc;stop-opacity:1"
offset="0"
id="stop944" />
<stop
style="stop-color:#758087;stop-opacity:1"
offset="1"
id="stop946" />
</linearGradient>
<linearGradient
y2="233.40434"
x2="1118.7346"
y1="283.53955"
x1="1118.7346"
gradientUnits="userSpaceOnUse"
id="linearGradient942"
xlink:href="#linearGradient948"
inkscape:collect="always" />
<linearGradient
y2="233.40434"
x2="1118.7346"
y1="283.53955"
x1="1118.7346"
gradientUnits="userSpaceOnUse"
id="linearGradient1134"
xlink:href="#linearGradient1175"
inkscape:collect="always" />
<linearGradient
id="linearGradient9567">
<stop
id="stop9569"
offset="0"
style="stop-color:#204a87;stop-opacity:1" />
<stop
id="stop9571"
offset="1"
style="stop-color:#081527;stop-opacity:0.99" />
</linearGradient>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath868">
<path
inkscape:connector-curvature="0"
d="m -2.0971567,113.70042 c 0.05056,-0.009 1.3112656,0.6678 2.1586598,0.90154 1.5110613,0.3925 2.890367,1.57382 3.5570419,2.2524 0.049434,0.0581 0.5726041,-0.39814 1.1201161,-0.36528 0.7478711,0.0461 3.0619708,0.70744 3.3711541,0.25705 0.1874857,-0.2644 0.1740471,-0.58879 0.4079578,-0.72166 0.1259278,-0.0358 -0.468103,-1.14015 0.1632379,-1.49396 0.4501508,-0.22868 0.8316049,1.0516 0.9471991,1.19507 0.05178,0.0642 0.326476,0.0799 0.293958,-0.0664 -0.03524,-0.15886 -0.4795658,-1.38737 0.06532,-1.5935 0.884984,-0.3562 0.728135,1.5719 0.751161,1.62674 0.04896,0.11673 3.082175,0.20671 3.266089,1.59349 0.10638,0.76322 -2.430068,1.74967 -2.678169,1.92543 -0.248004,0.17576 -0.227331,0.45688 -0.130627,0.63082 0.111175,0.18866 0.850119,0.82541 0.751254,1.12869 -0.06794,0.17519 -1.447062,-0.46691 -1.535118,-0.33194 -0.200829,0.25782 1.00396,0.90316 0.587922,1.36109 -0.164931,0.10967 -2.0625223,-0.80754 -2.0577299,-0.79675 -0.050933,0.0197 -2.68136,0.48841 -4.7031898,-0.13287 -0.071234,-0.0204 -1.297638,1.20415 -1.4371007,1.16203 -0.1906802,-0.0711 0.2810866,-1.06508 0.2286469,-1.26156 -0.085708,-0.10947 -0.8693848,0.44447 -0.9144936,0.16602 -0.053943,-0.36594 0.6877265,-0.78662 0.6532363,-1.02915 -0.1912436,-1.37781 0.085426,-2.18239 0.5552175,-2.85496 0.1566604,-0.24759 -1.8412037,-1.7811 -3.2876088,-2.38632 -1.446311,-0.60523 -2.2201205,-1.11818 -2.1341311,-1.16604 z"
id="path870"
style="fill:#020202;fill-opacity:1;fill-rule:evenodd;stroke:#000002;stroke-width:0.0947465pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</clipPath>
</defs>
<sodipodi:namedview
inkscape:document-rotation="0"
inkscape:pagecheckerboard="false"
inkscape:guide-bbox="true"
showguides="true"
inkscape:current-layer="g16"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-x="0"
inkscape:cy="11.676859"
inkscape:cx="16.597918"
inkscape:zoom="55.735729"
showgrid="true"
id="namedview20"
inkscape:window-height="1031"
inkscape:window-width="1920"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff">
<sodipodi:guide
inkscape:locked="false"
id="guide1036"
orientation="0,1"
position="-32.300885,140.26549" />
<inkscape:grid
empspacing="4"
id="grid841"
type="xygrid" />
<sodipodi:guide
inkscape:locked="false"
id="guide895"
orientation="1,0"
position="-31.532847,112.9927" />
</sodipodi:namedview>
<g
transform="translate(0,-80)"
style="stroke-width:4"
id="g16">
<path
d="m 1084,61.125 a 27.159795,27.159795 0 0 0 -27.0625,24.900391 l -16,191.999999 A 27.159795,27.159795 0 0 0 1068,307.4375 h 48 48 a 27.159795,27.159795 0 0 0 27.0625,-29.41211 l -16,-191.999999 A 27.159795,27.159795 0 0 0 1148,61.125 h -32 z"
id="rect2101-7"
style="display:inline;opacity:1;fill:#a7b0b7;fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new"
inkscape:original="M 1084 88.28125 L 1068 280.28125 L 1116 280.28125 L 1164 280.28125 L 1148 88.28125 L 1116 88.28125 L 1084 88.28125 z "
inkscape:radius="27.15708"
sodipodi:type="inkscape:offset"
transform="matrix(0.06652824,0,0,0.06495813,-58.245516,90.029434)" />
<path
d="m 1084,61.125 a 27.159795,27.159795 0 0 0 -27.0625,24.900391 l -16,191.999999 A 27.159795,27.159795 0 0 0 1068,307.4375 h 48 48 a 27.159795,27.159795 0 0 0 27.0625,-29.41211 l -16,-191.999999 A 27.159795,27.159795 0 0 0 1148,61.125 h -32 z"
id="rect2101"
style="display:inline;opacity:1;fill:url(#linearGradient1134);fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new"
inkscape:original="M 1084 88.28125 L 1068 280.28125 L 1116 280.28125 L 1164 280.28125 L 1148 88.28125 L 1116 88.28125 L 1084 88.28125 z "
inkscape:radius="27.15708"
sodipodi:type="inkscape:offset"
transform="matrix(0.06652824,0,0,0.06495813,-58.245516,89.029434)" />
<path
inkscape:connector-curvature="0"
style="fill:#758087;fill-opacity:1;stroke-width:0.999998"
id="path6"
d="m 3.0001182,83 c -0.5539949,0 -0.9999907,0.457 -0.9999907,1.026 v 17.94801 A 1.0099907,1.01 0 0 0 3.0001182,103 H 28.999882 c 0.553994,0 0.99999,-0.458 0.99999,-1.02599 V 84.026 A 1.0099907,1.01 0 0 0 28.999882,83 Z" />
<path
inkscape:connector-curvature="0"
style="fill:#bcc5ca;fill-opacity:1;stroke:none;stroke-width:0.640093;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path8"
d="M 2.9999999,82 C 2.4459999,82 2,82.446 2,82.999999 V 101 c 0,0.55399 0.4459999,1 0.9999999,1 H 29.000002 C 29.554003,102 30,101.55399 30,101 V 82.999999 C 30,82.446 29.554003,82 29.000002,82 Z" />
<path
d="M 3.9285714,83 C 3.4141429,83 3,83.4014 3,83.899999 V 100.1 c 0,0.49859 0.4141429,0.9 0.9285714,0.9 H 28.07143 C 28.58586,101 29,100.59859 29,100.1 V 83.899999 C 29,83.4014 28.58586,83 28.07143,83 Z"
id="path8-0"
style="fill:#d2d8dc;fill-opacity:1;stroke:none;stroke-width:0.585156;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
style="fill:#344958;fill-opacity:1;stroke-width:1.10397"
id="path12-5-1-8"
d="M 3.0001182,83 H 29.000118 v 18 H 3.0001182 Z" />
<g
transform="matrix(0.24571572,0,0,0.24796231,4.5933366,29.224286)"
id="g2436"
style="display:inline;stroke-width:4;enable-background:new" />
<path
inkscape:connector-curvature="0"
style="fill:#00aade;fill-opacity:1;stroke-width:0.905821"
id="path10"
d="m 4,84 h 24 v 16 H 4 Z" />
<rect
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094"
id="rect1099"
width="1"
height="1"
x="5"
y="98"
ry="0" />
<rect
ry="0"
y="98"
x="7"
height="1"
width="1"
id="rect1099-5"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="98"
x="9"
height="1"
width="1"
id="rect1099-4"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="98"
x="11"
height="1"
width="1"
id="rect1099-8"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="98"
x="13"
height="1"
width="1"
id="rect1099-7"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="98"
x="15"
height="1"
width="1"
id="rect1099-1"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="98"
x="17"
height="1"
width="1"
id="rect1099-72"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="98"
x="19"
height="1"
width="1"
id="rect1099-722"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="98"
x="21"
height="1"
width="1"
id="rect1099-6"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="98"
x="23"
height="1"
width="1"
id="rect1099-10"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="98"
x="25"
height="1"
width="1"
id="rect1099-61"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="96"
x="5"
height="1"
width="1"
id="rect1099-59"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="94"
x="5"
height="1"
width="1"
id="rect1099-49"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="92"
x="5"
height="1"
width="1"
id="rect1099-0"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="90"
x="5"
height="1"
width="1"
id="rect1099-9"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="88"
x="5"
height="1"
width="1"
id="rect1099-17"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<path
id="rect1099-71"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094"
sodipodi:type="inkscape:offset"
inkscape:radius="0"
inkscape:original="M 5 86 L 5 87 L 6 87 L 6 86 L 5 86 z "
d="m 5,86 v 1 h 1 v -1 z" />
<rect
ry="0"
y="85"
x="6"
height="1"
width="1"
id="rect1099-15"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="85"
x="8"
height="1"
width="1"
id="rect1099-97"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="85"
x="10"
height="1"
width="1"
id="rect1099-76"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="85"
x="12"
height="1"
width="1"
id="rect1099-73"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="85"
x="14"
height="1"
width="1"
id="rect1099-65"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="85"
x="16"
height="1"
width="1"
id="rect1099-63"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="85"
x="18"
height="1"
width="1"
id="rect1099-94"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="85"
x="20"
height="1"
width="1"
id="rect1099-81"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="85"
x="22"
height="1"
width="1"
id="rect1099-2"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="85"
x="24"
height="1"
width="1"
id="rect1099-93"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="85"
x="26"
height="1"
width="1"
id="rect1099-90"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="87"
x="26"
height="1"
width="1"
id="rect1099-88"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="89"
x="26"
height="1"
width="1"
id="rect1099-50"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="91"
x="26"
height="1"
width="1"
id="rect1099-96"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="93"
x="26"
height="1"
width="1"
id="rect1099-3"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="95"
x="26"
height="1"
width="1"
id="rect1099-85"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<rect
ry="0"
y="97"
x="26"
height="1"
width="1"
id="rect1099-611"
style="fill:#f1f3f5;fill-rule:evenodd;stroke-width:2.3094" />
<path
sodipodi:nodetypes="csscccssssccccccsccsssssccccccsssss"
inkscape:connector-curvature="0"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#003445;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.615385;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="M 12,94.461538 C 12,95.311209 12.688793,96 13.538461,96 c 0.849667,0 1.538461,-0.688791 1.538461,-1.538462 0,-0.274507 -0.08555,-0.526889 -0.211538,-0.75 L 15.999999,92.5 l 1.134615,1.211538 c -0.125988,0.223111 -0.211538,0.475493 -0.211538,0.75 C 16.923076,95.311209 17.61187,96 18.461537,96 19.311206,96 20,95.311209 20,94.461538 c 0,-0.849672 -0.688794,-1.538454 -1.538463,-1.538454 -0.141019,0 -0.274099,0.02222 -0.403845,0.05769 l -1.269231,-1.307685 2.596154,-2.749973 v -0.923078 h -0.615386 l -4.826923,4.980773 c -0.129747,-0.03565 -0.262824,-0.05769 -0.403845,-0.05769 -0.849668,0 -1.538461,0.6888 -1.538461,1.53848 z m 0.923077,0 c 0,-0.339858 0.27552,-0.615378 0.615384,-0.615378 0.339865,0 0.615385,0.27552 0.615385,0.615378 0,0.339875 -0.27552,0.615395 -0.615385,0.615395 -0.339864,0 -0.615384,-0.27552 -0.615384,-0.615395 z M 12.615384,88.923085 14.903846,91.34616 15.692307,90.538462 13.230769,88 h -0.615385 z m 5.23077,5.538453 c 0,-0.339858 0.275518,-0.615378 0.615383,-0.615378 0.339863,0 0.615384,0.27552 0.615384,0.615378 0,0.339875 -0.275521,0.615395 -0.615384,0.615395 -0.339865,0 -0.615383,-0.27552 -0.615383,-0.615395 z"
id="rect6492" />
</g>
</svg>
icons/48x48/org.xfce.screenshooter.png

1.2 KiB

This diff is collapsed.
sizes = [16, 24, 32, 48, 128]
foreach size : sizes
install_data(
'@0@x@0@'.format(size) / 'org.xfce.screenshooter.png',
install_dir: get_option('prefix') / get_option('datadir') / 'icons' / 'hicolor' / '@0@x@0@'.format(size) / 'apps',
)
endforeach
install_data(
'scalable' / 'org.xfce.screenshooter.svg',
install_dir: get_option('prefix') / get_option('datadir') / 'icons' / 'hicolor' / 'scalable' / 'apps',
)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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"
height="128"
width="128"
version="1.1"
id="svg18"
sodipodi:docname="org.xfce.screenshooter.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
<metadata
id="metadata24">
<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>
<defs
id="defs22">
<linearGradient
id="linearGradient948"
inkscape:collect="always">
<stop
id="stop944"
offset="0"
style="stop-color:#d2d8dc;stop-opacity:1" />
<stop
id="stop946"
offset="1"
style="stop-color:#758087;stop-opacity:1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient948"
id="linearGradient942"
gradientUnits="userSpaceOnUse"
x1="1118.7346"
y1="283.53955"
x2="1118.7346"
y2="233.40434" />
<linearGradient
id="linearGradient9567">
<stop
style="stop-color:#204a87;stop-opacity:1"
offset="0"
id="stop9569" />
<stop
style="stop-color:#081527;stop-opacity:0.99"
offset="1"
id="stop9571" />
</linearGradient>
</defs>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1019"
id="namedview20"
showgrid="true"
inkscape:zoom="8.0000002"
inkscape:cx="47.74742"
inkscape:cy="49.147424"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g16"
showguides="false"
inkscape:guide-bbox="true"
inkscape:pagecheckerboard="false">
<sodipodi:guide
position="-32.300885,140.26549"
orientation="0,1"
id="guide1036"
inkscape:locked="false" />
<inkscape:grid
type="xygrid"
id="grid841"
empspacing="4" />
<sodipodi:guide
position="-31.532847,112.9927"
orientation="1,0"
id="guide895"
inkscape:locked="false" />
</sodipodi:namedview>
<g
id="g16"
style="stroke-width:4">
<path
transform="matrix(0.29272427,0,0,0.25983253,-262.68029,36.117737)"
sodipodi:type="inkscape:offset"
inkscape:radius="27.15708"
inkscape:original="M 1084 88.28125 L 1068 280.28125 L 1116 280.28125 L 1164 280.28125 L 1148 88.28125 L 1116 88.28125 L 1084 88.28125 z "
style="display:inline;opacity:1;fill:#a7b0b7;fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new"
id="rect2101-7"
d="m 1084,61.125 a 27.159795,27.159795 0 0 0 -27.0625,24.900391 l -16,191.999999 A 27.159795,27.159795 0 0 0 1068,307.4375 h 48 48 a 27.159795,27.159795 0 0 0 27.0625,-29.41211 l -16,-191.999999 A 27.159795,27.159795 0 0 0 1148,61.125 h -32 z" />
<path
transform="matrix(0.29272427,0,0,0.25983253,-262.68029,34.117737)"
sodipodi:type="inkscape:offset"
inkscape:radius="27.15708"
inkscape:original="M 1084 88.28125 L 1068 280.28125 L 1116 280.28125 L 1164 280.28125 L 1148 88.28125 L 1116 88.28125 L 1084 88.28125 z "
style="display:inline;opacity:1;fill:url(#linearGradient942);fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new"
id="rect2101"
d="m 1084,61.125 a 27.159795,27.159795 0 0 0 -27.0625,24.900391 l -16,191.999999 A 27.159795,27.159795 0 0 0 1068,307.4375 h 48 48 a 27.159795,27.159795 0 0 0 27.0625,-29.41211 l -16,-191.999999 A 27.159795,27.159795 0 0 0 1148,61.125 h -32 z" />
<path
d="m 44.457421,158 c -1.353324,0 -2.442822,1.984 -2.442822,4.444 v 11.112 c 0,2.46 1.089498,4.444 2.442822,4.444 h 39.085158 c 1.353324,0 2.442822,-1.984 2.442822,-4.444 V 162.44 c 0,-2.46 -1.089498,-4.444 -2.442822,-4.444 z"
id="path2"
style="fill:#d2d8dc;fill-opacity:1;stroke-width:3.12590623"
inkscape:connector-curvature="0" />
<path
d="m 44.457421,160 c -1.353324,0 -2.442822,1.984 -2.442822,4.444 v 11.112 c 0,2.46 1.089498,4.444 2.442822,4.444 h 39.085158 c 1.353324,0 2.442822,-1.984 2.442822,-4.444 V 164.44 c 0,-2.46 -1.089498,-4.444 -2.442822,-4.444 z"
id="path4"
style="fill:#f1f3f5;fill-opacity:1;stroke-width:3.12590623"
inkscape:connector-curvature="0" />
<path
d="M 12,16 C 9.784,16 8,17.7823 8,20.0014 V 89.9986 A 4.04,3.939 0 0 0 12,94 h 104 c 2.216,0 4,-1.7862 4,-4.0014 V 20.0014 A 4.04,3.939 0 0 0 116,16 Z"
id="path6"
style="fill:#bcc5ca;fill-opacity:1;stroke-width:3.94968367"
inkscape:connector-curvature="0" />
<path
d="m 12,12 c -2.216,0 -4,1.784 -4,4 v 72 c 0,2.216 1.784,4 4,4 h 104 c 2.216,0 4,-1.784 4,-4 V 16 c 0,-2.216 -1.784,-4 -4,-4 z"
id="path8"
style="fill:#d1d7db;fill-opacity:1"
inkscape:connector-curvature="0" />
<path
d="M 11,15 H 117 V 89 H 11 Z"
id="path10"
style="fill:#344958;fill-opacity:1;stroke-width:4.09398079"
inkscape:connector-curvature="0" />
<path
d="M 14,18 H 114 V 86 H 14 Z"
id="path12"
style="fill:#00aade;fill-opacity:1;stroke-width:4.20812702"
inkscape:connector-curvature="0" />
<g
style="display:inline;stroke-width:4;enable-background:new"
id="g6544"
inkscape:label="edit-cut"
transform="rotate(-90,338.73539,245.28587)">
<rect
style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:none;stroke:none;stroke-width:1;marker:none;enable-background:new"
id="rect6478"
y="-39.006721"
x="525.00061"
height="16"
width="16" />
</g>
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903"
width="6.131804"
height="0.13180383"
x="25.164869"
y="26.923889" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-3"
width="6.131804"
height="0.13180383"
x="37.164875"
y="26.923885" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-6"
width="6.131804"
height="0.13180383"
x="49.164875"
y="26.923889" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-7"
width="6.131804"
height="0.13180383"
x="61.164875"
y="26.923889" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5"
width="6.131804"
height="0.13180383"
x="73.164879"
y="26.923889" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-6"
width="6.131804"
height="0.13180383"
x="85.164879"
y="26.923885" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-9"
width="6.131804"
height="0.13180383"
x="34.92387"
y="-103.29668"
transform="rotate(90)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-1"
width="6.131804"
height="0.13180383"
x="46.92387"
y="-103.29668"
transform="rotate(90)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-2"
width="6.131804"
height="0.13180383"
x="58.92387"
y="-103.29668"
transform="rotate(90)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-0"
width="6.131804"
height="0.13180383"
x="26.923885"
y="-25.296675"
transform="rotate(90)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-93"
width="6.131804"
height="0.13180383"
x="38.92387"
y="-25.296675"
transform="rotate(90)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-6"
width="6.131804"
height="0.13180383"
x="50.92387"
y="-25.296675"
transform="rotate(90)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-06"
width="6.131804"
height="0.13180383"
x="62.92387"
y="-25.296675"
transform="rotate(90)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-7-8"
width="6.131804"
height="0.13180383"
x="-43.29668"
y="-77.055679"
transform="scale(-1)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-7-7"
width="6.131804"
height="0.13180383"
x="-91.296684"
y="-77.055679"
transform="scale(-1)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-7-9"
width="6.131804"
height="0.13180383"
x="-55.29668"
y="-77.055679"
transform="scale(-1)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-7-2"
width="6.131804"
height="0.13180383"
x="-67.296684"
y="-77.055679"
transform="scale(-1)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-7-0"
width="6.131804"
height="0.13180383"
x="-79.296684"
y="-77.055679"
transform="scale(-1)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-26-7"
width="6.131804"
height="0.13180383"
x="97.164879"
y="26.923885" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.70614314;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-7-1-5"
width="2.2938569"
height="0.29385692"
x="26.842857"
y="-103.37772"
transform="rotate(90)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-9"
width="6.131804"
height="0.13180383"
x="70.923874"
y="-103.29668"
transform="rotate(90)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.81718874;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-0-2"
width="4.1828113"
height="0.18281132"
x="-103.32219"
y="-77.081192"
transform="scale(-1)" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.86819625;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-26-7-2"
width="6.131804"
height="0.13180383"
x="25.164885"
y="77.011017" />
<rect
style="opacity:1;fill:#c1ebf7;fill-opacity:1;stroke:#c1ebf7;stroke-width:1.70614314;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect903-5-2-7-1-5-8"
width="2.2938569"
height="0.29385692"
x="74.929993"
y="-25.377701"
transform="rotate(90)" />
<path
id="rect6492"
d="m 48.23077,61.923059 c 0,3.398667 2.755175,6.153849 6.153847,6.153849 3.398669,0 6.153845,-2.755182 6.153845,-6.153849 0,-1.098043 -0.342203,-2.107519 -0.846155,-3 l 4.538463,-4.846152 4.538463,4.846152 c -0.503952,0.892481 -0.846155,1.901957 -0.846155,3 0,3.398667 2.755176,6.153849 6.153845,6.153849 3.398672,0 6.153847,-2.755182 6.153847,-6.153849 0,-3.398683 -2.755175,-6.153849 -6.153847,-6.153849 -0.564083,0 -1.096393,0.08872 -1.615383,0.230649 L 67.384617,50.769085 77.769233,39.769212 V 36.076908 H 75.307692 L 56,56 c -0.518989,-0.142222 -1.0513,-0.230666 -1.615383,-0.230666 -3.398672,0 -6.153847,2.755184 -6.153847,6.153867 z m 3.692308,0 c 0,-1.359448 1.102082,-2.461528 2.461539,-2.461528 1.359459,0 2.461538,1.10208 2.461538,2.461528 0,1.359466 -1.102079,2.461547 -2.461538,2.461547 -1.359457,0 -2.461539,-1.102081 -2.461539,-2.461547 z m -1.230771,-22.153847 9.153849,9.692319 3.153845,-3.230774 -9.846153,-10.153849 h -2.461541 z m 20.923078,22.153847 c 0,-1.359448 1.102079,-2.461528 2.461538,-2.461528 1.359457,0 2.461539,1.10208 2.461539,2.461528 0,1.359466 -1.102082,2.461547 -2.461539,2.461547 -1.359459,0 -2.461538,-1.102081 -2.461538,-2.461547 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#003445;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.46153831;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csscccssssccccccsccsssssccccccsssss" />
</g>
</svg>
/* $Id$
*
* Copyright © 2008-2009 Jérôme Guelfucci <jeromeg@xfce.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef HAVE_SCREENSHOOTER_H
#define HAVE_SCREENSHOOTER_H
#include "screenshooter-dialogs.h"
#include "screenshooter-utils.h"
#include "screenshooter-actions.h"
#include "screenshooter-capture.h"
#include "screenshooter-format.h"
#include "screenshooter-global.h"
#endif
libscreenshooter_sources = [
'libscreenshooter.h',
'screenshooter-actions.c',
'screenshooter-actions.h',
'screenshooter-capture.c',
'screenshooter-capture.h',
'screenshooter-custom-actions.c',
'screenshooter-custom-actions.h',
'screenshooter-format.c',
'screenshooter-format.h',
'screenshooter-dialogs.c',
'screenshooter-dialogs.h',
'screenshooter-global.h',
'screenshooter-utils.c',
'screenshooter-utils.h',
]
libscreenshooter_sources += gnome.genmarshal(
'screenshooter-marshal',
sources: 'screenshooter-marshal.list',
prefix: '_screenshooter_marshal',
internal: true,
install_header: false,
)
if enable_x11
libscreenshooter_sources += [
'screenshooter-capture-x11.c',
'screenshooter-capture-x11.h',
'screenshooter-utils-x11.c',
'screenshooter-utils-x11.h',
]
endif
if enable_wayland
libscreenshooter_sources += wayland_protocols_generated_sources
libscreenshooter_sources += [
'screenshooter-capture-wayland.c',
'screenshooter-capture-wayland.h',
]
endif
libscreenshooter = static_library(
'libscreenshooter',
libscreenshooter_sources,
include_directories: [
include_directories('..'),
],
dependencies: [
glib,
gtk,
exo,
libxfce4ui,
libxfce4util,
xfconf,
x11_deps,
wayland_deps,
xfixes,
],
install: false,
)
/* $Id$
*
* Copyright © 2008-2010 Jérôme Guelfucci <jeromeg@xfce.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* */
#include "screenshooter-actions.h"
#include "screenshooter-custom-actions.h"
#include "screenshooter-utils.h"
#include "screenshooter-capture.h"
#include "screenshooter-global.h"
#include "screenshooter-dialogs.h"
#include "screenshooter-format.h"
static void
cb_help_response (GtkWidget *dialog, gint response, gpointer unused)
{
if (response == GTK_RESPONSE_HELP)
{
g_signal_stop_emission_by_name (dialog, "response");
screenshooter_open_help (GTK_WINDOW (dialog));
}
}
static gboolean
action_idle (gpointer user_data)
{
gchar *save_location = NULL;
ScreenshotData *sd = user_data;
if (!sd->action_specified)
{
GtkWidget *dialog = screenshooter_actions_dialog_new (sd);
gint response;
g_signal_connect (dialog, "response",
G_CALLBACK (cb_help_response), NULL);
g_signal_connect (dialog, "key-press-event",
G_CALLBACK (screenshooter_f1_key), NULL);
response = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
if (response == GTK_RESPONSE_CANCEL ||
response == GTK_RESPONSE_DELETE_EVENT ||
response == GTK_RESPONSE_CLOSE)
{
g_object_unref (sd->screenshot);
sd->finalize_callback (FALSE, sd->finalize_callback_data);
return FALSE;
}
if (response == GTK_RESPONSE_REJECT)
{
g_object_unref (sd->screenshot);
/* If the user clicked 'Back' button */
screenshooter_region_dialog_show (sd, FALSE);
return FALSE;
}
}
if (sd->action & CLIPBOARD)
screenshooter_copy_to_clipboard (sd->screenshot);
if (sd->action & SAVE)
{
if (!sd->path_is_dir)
save_location = screenshooter_save_screenshot_to (sd->screenshot, sd->screenshot_dir);
else
{
gchar *filename;
const gchar *temp;
if (sd->screenshot_dir == NULL)
sd->screenshot_dir = screenshooter_get_xdg_image_dir_uri ();
filename = screenshooter_get_filename_for_uri (sd->screenshot_dir,
sd->title,
sd->last_extension,
sd->timestamp);
save_location = screenshooter_save_screenshot (sd->screenshot,
sd->screenshot_dir,
filename,
sd->last_extension,
TRUE,
TRUE);
g_free (filename);
if (save_location)
{
g_free (sd->screenshot_dir);
temp = g_path_get_dirname (save_location);
sd->screenshot_dir = g_build_filename ("file://", temp, NULL);
TRACE ("New save directory: %s", sd->screenshot_dir);
}
else if (!sd->action_specified)
{
/* Show actions dialog again if no action was specified from CLI */
return TRUE;
}
}
if (sd->show_in_folder)
screenshooter_show_file_in_folder (save_location);
}
else
{
GFile *temp_dir = g_file_new_for_path (g_get_tmp_dir ());
gchar *temp_dir_uri = g_file_get_uri (temp_dir);
gchar *filename = screenshooter_get_filename_for_uri (temp_dir_uri,
sd->title,
sd->last_extension,
sd->timestamp);
save_location = screenshooter_save_screenshot (sd->screenshot,
temp_dir_uri,
filename,
sd->last_extension,
FALSE,
FALSE);
g_object_unref (temp_dir);
g_free (temp_dir_uri);
g_free (filename);
if (save_location)
{
if (sd->action & OPEN)
{
screenshooter_open_screenshot (save_location, sd->app, sd->app_info);
}
else if (sd->action & CUSTOM_ACTION)
{
screenshooter_custom_action_execute (save_location, sd->custom_action_name, sd->custom_action_command);
}
}
}
/* Persist last used file extension */
if (save_location)
{
gchar *extension = NULL;
for (ImageFormat *format = screenshooter_get_image_formats (); format->type != NULL; format++)
{
if (format->supported && screenshooter_image_format_match_extension (format, save_location))
{
extension = g_strdup (format->extensions[0]);
break;
}
}
if (extension)
{
g_free (sd->last_extension);
sd->last_extension = extension;
}
g_free (save_location);
}
sd->finalize_callback (TRUE, sd->finalize_callback_data);
g_object_unref (sd->screenshot);
return FALSE;
}
static gboolean
take_screenshot_idle (gpointer user_data)
{
ScreenshotData *sd = user_data;
sd->screenshot = screenshooter_capture_screenshot (sd->region,
sd->delay,
sd->show_mouse,
sd->show_border);
if (sd->screenshot != NULL)
g_idle_add (action_idle, sd);
else
sd->finalize_callback (FALSE, sd->finalize_callback_data);
return FALSE;
}
/* Public */
void
screenshooter_take_screenshot (ScreenshotData *sd, gboolean immediate)
{
gint delay;
if (sd->region == SELECT)
{
/* The delay will be applied after the rectangle selection */
g_idle_add (take_screenshot_idle, sd);
return;
}
if (sd->delay == 0 && immediate)
{
/* If delay is zero and the region was passed as an argument (from cli
* or panel plugin), thus the first dialog was not shown, we will take
* the screenshot immediately without a minimal delay */
g_idle_add (take_screenshot_idle, sd);
return;
}
/* Await the amount of the time specified by the user before capturing the
* screenshot, but not less than 200ms, otherwise the first dialog might
* appear on the screenshot. */
delay = sd->delay == 0 ? 200 : sd->delay * 1000;
g_timeout_add (delay, take_screenshot_idle, sd);
}
/* $Id$
*
* Copyright © 2008-2009 Jérôme Guelfucci <jeromeg@xfce.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* */
#ifndef __HAVE_ACTIONS_H__
#define __HAVE_ACTIONS_H__
#include "screenshooter-global.h"
void screenshooter_take_screenshot (ScreenshotData *sd,
gboolean immediate);
#endif
This diff is collapsed.
/* $Id$
*
* Copyright © 2004 German Poo-Caaman~o <gpoo@ubiobio.cl>
* Copyright © 2005,2006 Daniel Bobadilla Leal <dbobadil@dcc.uchile.cl>
* Copyright © 2005 Jasper Huijsmans <jasper@xfce.org>
* Copyright © 2006 Jani Monoses <jani@ubuntu.com>
* Copyright © 2008 Jérôme Guelfucci <jerome.guelfucci@gmail.com>
*
* Portions from the Gimp sources by
* Copyright © 1998-2000 Sven Neumann <sven@gimp.org>
* Copyright © 2003 Henrik Brix Andersen <brix@gimp.org>
* Copyright © 2024 André Miranda <andreldm@xfce.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -24,20 +16,22 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __HAVE_CAPTURE_WAYLAND_H__
#define __HAVE_CAPTURE_WAYLAND_H__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <glib/gstdio.h>
#include <gdk/gdk.h>
#include <libxfce4util/libxfce4util.h>
#include <fcntl.h>
#include <X11/Xatom.h>
#include <unistd.h>
GdkPixbuf *take_screenshot (gint fullscreen, gint delay);
gchar *generate_filename_for_uri(char *uri);
GdkPixbuf
*screenshooter_capture_screenshot_wayland (gint region,
gint delay,
gboolean show_mouse,
gboolean show_border);
#endif
This diff is collapsed.
/* $Id$
*
* Copyright © 2008-2009 Jérôme Guelfucci <jeromeg@xfce.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __HAVE_CAPTURE_X11_H__
#define __HAVE_CAPTURE_X11_H__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gdk/gdk.h>
GdkPixbuf
*screenshooter_capture_screenshot_x11 (gint region,
gint delay,
gboolean show_mouse,
gboolean show_border);
#endif
/* $Id$
*
* Copyright © 2024 André Miranda <andreldm@xfce.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "screenshooter-capture.h"
#ifdef ENABLE_X11
#include <gdk/gdkx.h>
#include "screenshooter-capture-x11.h"
#endif
#ifdef ENABLE_WAYLAND
#include <gdk/gdkwayland.h>
#include "screenshooter-capture-wayland.h"
#endif
GdkPixbuf
*screenshooter_capture_screenshot (gint region,
gint delay,
gboolean show_mouse,
gboolean show_border)
{
GdkPixbuf *screenshot = NULL;
#ifdef ENABLE_X11
if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
screenshot = screenshooter_capture_screenshot_x11 (region, delay, show_mouse, show_border);
#endif
#ifdef ENABLE_WAYLAND
if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()))
screenshot = screenshooter_capture_screenshot_wayland (region, delay, show_mouse, show_border);
#endif
return screenshot;
}
/* $Id$
*
* Copyright © 2024 André Miranda <andreldm@xfce.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __HAVE_CAPTURE_H__
#define __HAVE_CAPTURE_H__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gdk/gdk.h>
GdkPixbuf
*screenshooter_capture_screenshot (gint region,
gint delay,
gboolean show_mouse,
gboolean show_border);
#endif
/* $Id$
*
* Copyright © 2022 Yogesh Kaushik <masterlukeskywalker02@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* */
#include "screenshooter-custom-actions.h"
#include <xfconf/xfconf.h>
#include <libxfce4ui/libxfce4ui.h>
static gchar**
screenshooter_parse_envp (gchar **cmd)
{
gchar **vars;
gchar **envp;
gint offset = 0;
vars = g_strsplit (*cmd, " ", -1);
envp = g_get_environ ();
for (gint n = 0; vars[n] != NULL; ++n)
{
gchar *var, *val;
gchar *index = g_strrstr (vars[n], "=");
if (index == NULL)
break;
offset += strlen (vars[n]);
var = g_strndup (vars[n], index - vars[n]);
val = g_strdup (index + 1);
envp = g_environ_setenv (envp, var, val, TRUE);
g_free (var);
g_free (val);
}
if (offset > 0)
{
gchar *temp = g_strdup (*cmd + offset + 1);
g_free (*cmd);
*cmd = temp;
}
g_strfreev (vars);
return envp;
}
void
screenshooter_custom_action_save (GtkTreeModel *list_store)
{
GtkTreeIter iter;
gboolean valid;
gint32 max_id;
gint32 id = 0;
XfconfChannel *channel;
GError *error = NULL;
if (!xfconf_init (&error))
{
g_critical ("Failed to initialized xfconf");
g_error_free (error);
return;
}
channel = xfconf_channel_get ("xfce4-screenshooter");
max_id = xfconf_channel_get_int (channel, "/actions/actions", 0);
valid = gtk_tree_model_get_iter_first (list_store, &iter);
while (valid)
{
gchar *name;
gchar *command;
gchar *name_address;
gchar *command_address;
gtk_tree_model_get (list_store, &iter,
CUSTOM_ACTION_NAME, &name,
CUSTOM_ACTION_COMMAND, &command,
-1);
name_address = g_strdup_printf ("/actions/action-%d/name", id);
command_address = g_strdup_printf ("/actions/action-%d/command", id);
xfconf_channel_set_string (channel, name_address, name);
xfconf_channel_set_string (channel, command_address, command);
id++;
valid = gtk_tree_model_iter_next (list_store, &iter);
g_free (name);
g_free (command);
g_free (name_address);
g_free (command_address);
}
for (gint32 i = id; i < max_id; i++)
{
gchar *property;
property = g_strdup_printf ("/actions/action-%d", i);
xfconf_channel_reset_property (channel, property, TRUE);
g_free (property);
}
xfconf_channel_set_int (channel, "/actions/actions", id);
xfconf_shutdown ();
}
void
screenshooter_custom_action_load (GtkListStore *list_store)
{
gint32 max_id;
gint32 id;
XfconfChannel *channel;
GtkTreeIter iter;
GError *error = NULL;
gboolean imgur_found = FALSE;
if (!xfconf_init (&error))
{
g_critical ("Failed to initialized xfconf");
g_error_free (error);
return;
}
channel = xfconf_channel_get ("xfce4-screenshooter");
max_id = xfconf_channel_get_int (channel, "/actions/actions", 0);
for (id = 0; id < max_id; id++)
{
gchar *name;
gchar *command;
gchar *name_address;
gchar *command_address;
name_address = g_strdup_printf ("/actions/action-%d/name", id);
command_address = g_strdup_printf ("/actions/action-%d/command", id);
name = xfconf_channel_get_string (channel, name_address, "");
command = xfconf_channel_get_string (channel, command_address, "");
/* Do not load action if that's the removed imgur upload script */
if (g_strrstr (command, "imgur-upload.sh") != NULL)
{
imgur_found = TRUE;
}
else
{
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (GTK_LIST_STORE (list_store), &iter, CUSTOM_ACTION_NAME, name, CUSTOM_ACTION_COMMAND, command, -1);
}
g_free (name);
g_free (command);
g_free (name_address);
g_free (command_address);
}
/* TODO remove after a few releases */
xfconf_channel_reset_property (channel, "/imgur-custom-action-added", FALSE);
if (imgur_found)
screenshooter_custom_action_save (GTK_TREE_MODEL (list_store));
xfconf_shutdown ();
}
void
screenshooter_custom_action_execute (gchar *save_location,
gchar *name,
gchar *command)
{
gchar **split;
gchar **argv;
gchar **envp;
gchar *formatted_command;
gchar *expanded_command;
gchar *save_location_quoted;
GError *error = NULL;
if (g_strcmp0 (name, "none") == 0 ||
g_strcmp0 (command, "none") == 0 ||
g_strcmp0 (name, "") == 0 ||
g_strcmp0 (command, "") == 0)
{
xfce_dialog_show_warning (NULL, _("Unable to execute the custom action"), _("Invalid custom action selected"));
return;
}
/* Replace %f placeholder */
split = g_strsplit (command, "\%f", -1);
save_location_quoted = g_shell_quote (save_location);
formatted_command = g_strjoinv (save_location_quoted, split);
g_free (save_location_quoted);
g_strfreev (split);
expanded_command = xfce_expand_variables (formatted_command, NULL);
envp = screenshooter_parse_envp (&expanded_command);
if (G_LIKELY (g_shell_parse_argv (expanded_command, NULL, &argv, &error)))
if (!g_spawn_async (NULL, argv, envp, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &error))
{
xfce_dialog_show_error (NULL, error, _("Failed to run the custom action %s"), name);
g_error_free (error);
}
g_free (formatted_command);
g_free (expanded_command);
g_strfreev (argv);
g_strfreev (envp);
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.