...
 
Commits (155)
image: snapcore/snapcraft:stable
stages:
- build
cache:
paths:
- _ccache/
variables:
MESON_TEST_TIMEOUT_MULTIPLIER: 2
G_MESSAGES_DEBUG: all
MESON_COMMON_OPTIONS: "--buildtype debug --prefix /usr"
fedora-x86_64:
image: registry.gitlab.gnome.org/gnome/gnome-software/fedora:v1
stage: build
except:
- tags
script:
- git clone https://gitlab.freedesktop.org/pwithnall/malcontent.git ./malcontent
- pushd ./malcontent
- git checkout tags/0.4.0
- meson setup ${MESON_COMMON_OPTIONS} _build
- ninja -C _build
- sudo ninja -C _build install
- popd
- meson ${MESON_COMMON_OPTIONS}
-Drpm_ostree=true
-Dmalcontent=true
_build
- ninja -C _build
- .gitlab-ci/run-tests.sh
--no-suite packagekit
--no-suite fwupd
artifacts:
reports:
junit: "_build/${CI_JOB_NAME}-report.xml"
name: "gnome-software-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- "_build/config.h"
- "_build/meson-logs"
- "_build/${CI_JOB_NAME}-report.xml"
before_script:
- export LC_ALL=C.UTF-8
- export LANG=C.UTF-8
- export SNAP_ARCH=amd64
- apt-get -y update
- apt-get install -y software-properties-common openssl
- add-apt-repository -y ppa:ubuntu-desktop/gnome-3-26
- apt-get -y update
- apt-get -y dist-upgrade
debian-stable-x86_64:
image: registry.gitlab.gnome.org/gnome/gnome-software/debian-stable:v1
build-gnome-software-snap:
stage: build
except:
- tags
only:
variables:
- $CI_COMMIT_REF_NAME == "snap-only"
script:
- meson ${MESON_COMMON_OPTIONS}
-Drpm_ostree=false
-Dmalcontent=false
_build
- ninja -C _build
- .gitlab-ci/run-tests.sh
--no-suite packagekit
--no-suite fwupd
--no-suite fedora-langpacks
artifacts:
reports:
junit: "_build/${CI_JOB_NAME}-report.xml"
name: "gnome-software-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- "_build/config.h"
- "_build/meson-logs"
- "_build/${CI_JOB_NAME}-report.xml"
- openssl aes-256-cbc -d -in snap/.snapcraft.encrypted -out snap/.snapcraft.exported -k $KEY
- snapcraft login --with snap/.snapcraft.exported
- SNAPCRAFT_SETUP_CORE=1 snapcraft
- snapcraft push gnome-software*.snap --release edge
- snapcraft logout
- rm -f snap/.snapcraft.exported
- rm $HOME/.config/snapcraft/snapcraft.cfg
......@@ -8,8 +8,8 @@ Add any user visible changes into data/appdata/org.gnome.Software.appdata.xml.in
Generate NEWS file:
appstream-util appdata-to-news ../data/appdata/org.gnome.Software.appdata.xml.in > NEWS
git commit -a -m "Release version 3.36.1"
git tag -s 3.36.1 -m "==== Version 3.36.1 ===="
git commit -a -m "Release version 3.37.1"
git tag -s 3.37.1 -m "==== Version 3.37.1 ===="
<enter password>
ninja-build dist
......
......@@ -161,7 +161,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_flatpak.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_fwupd.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_generic-updates.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-blacklist.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-blocklist.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-popular.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_icons.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_key-colors-metadata.so
......
<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="456" viewBox="0 0 338.667 120.65"><defs><clipPath clipPathUnits="userSpaceOnUse" id="a"><path fill="#f5c211" fill-opacity=".965" stroke="#f6c211" stroke-width="0" stroke-opacity=".971" d="M135.996 846.686h338.667v120.65H135.996z"/></clipPath></defs><g clip-path="url(#a)" transform="translate(-135.996 -846.686)"><circle transform="rotate(-45)" cx="-510.556" cy="772.495" r="3.175" fill="#e5a50a" fill-opacity=".965"/><circle transform="rotate(-45)" r="9.899" cy="772.495" cx="-510.556" fill="none" stroke="#f8e45c" stroke-width="5.292" stroke-opacity=".971"/><circle transform="rotate(-45)" cx="-510.571" cy="772.495" r="19.175" fill="none" stroke="#f8e45c" stroke-width="5.292" stroke-opacity=".971"/><circle transform="rotate(-45)" r="28.435" cy="772.495" cx="-510.571" fill="none" stroke="#f8e45c" stroke-width="5.292" stroke-opacity=".971"/><circle transform="rotate(-45)" cx="-510.571" cy="772.495" r="37.695" fill="none" stroke="#f8e45c" stroke-width="5.292" stroke-opacity=".971"/><circle transform="rotate(-45)" r="37.695" cy="772.495" cx="-510.571" fill="none" stroke="#f8e45c" stroke-width="5.292" stroke-opacity=".971"/><circle transform="rotate(-45)" cx="-510.571" cy="772.495" r="46.956" fill="none" stroke="#f8e45c" stroke-width="5.292" stroke-opacity=".971"/><circle transform="rotate(-45)" r="56.216" cy="772.495" cx="-510.571" fill="none" stroke="#f8e45c" stroke-width="5.292" stroke-opacity=".971"/><circle transform="rotate(-45)" cx="-510.571" cy="772.495" r="65.477" fill="none" stroke="#f8e45c" stroke-width="5.292" stroke-opacity=".971"/><circle transform="rotate(-45)" r="74.737" cy="772.495" cx="-510.571" fill="none" stroke="#f8e45c" stroke-width="5.292" stroke-opacity=".971"/><circle transform="rotate(-45)" cx="-510.571" cy="772.495" r="83.997" fill="none" stroke="#f8e45c" stroke-width="5.292" stroke-opacity=".971"/><path d="M244.604 847.87a83.997 83.997 0 0 1 0 118.79M238.055 854.418a74.737 74.737 0 0 1 0 105.694M231.507 860.966a65.477 65.477 0 0 1 0 92.598M224.96 867.514a56.216 56.216 0 0 1 0 79.502M218.411 874.062a46.956 46.956 0 0 1 0 66.406M211.863 880.61a37.695 37.695 0 0 1 0 53.31M205.315 887.159a28.435 28.435 0 0 1 0 40.213M198.767 893.707a19.175 19.175 0 0 1 0 27.117M192.219 900.255a9.899 9.899 0 0 1 0 13.999" fill="none" stroke="#e5a50a" stroke-width="5.292" stroke-opacity=".975"/></g></svg>
\ No newline at end of file
<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="featured-FeedReader.svg"
id="svg33"
version="1.1"
viewBox="0 0 135.83973 120.64994"
height="455.99979"
width="513.40948">
<metadata
id="metadata37">
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:current-layer="svg33"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-x="0"
inkscape:cy="228"
inkscape:cx="721.46522"
inkscape:zoom="1.0296875"
fit-margin-bottom="0"
fit-margin-right="0"
fit-margin-left="0"
fit-margin-top="0"
showgrid="false"
id="namedview35"
inkscape:window-height="1043"
inkscape:window-width="1920"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<defs
id="defs5">
<clipPath
id="a"
clipPathUnits="userSpaceOnUse">
<path
id="path2"
d="m 135.996,846.686 h 338.667 v 120.65 H 135.996 Z"
stroke-opacity="0.971"
stroke-width="0"
stroke="#f6c211"
fill-opacity="0.965"
fill="#f5c211" />
</clipPath>
</defs>
<g
id="g31"
transform="translate(-135.996,-846.686)"
clip-path="url(#a)">
<circle
id="circle7"
fill-opacity="0.965"
fill="#e5a50a"
r="3.175"
cy="772.495"
cx="-510.556"
transform="rotate(-45)" />
<circle
id="circle9"
stroke-opacity="0.971"
stroke-width="5.292"
stroke="#f8e45c"
fill="none"
cx="-510.556"
cy="772.495"
r="9.8990002"
transform="rotate(-45)" />
<circle
id="circle11"
stroke-opacity="0.971"
stroke-width="5.292"
stroke="#f8e45c"
fill="none"
r="19.174999"
cy="772.495"
cx="-510.57101"
transform="rotate(-45)" />
<circle
id="circle13"
stroke-opacity="0.971"
stroke-width="5.292"
stroke="#f8e45c"
fill="none"
cx="-510.57101"
cy="772.495"
r="28.434999"
transform="rotate(-45)" />
<circle
id="circle15"
stroke-opacity="0.971"
stroke-width="5.292"
stroke="#f8e45c"
fill="none"
r="37.695"
cy="772.495"
cx="-510.57101"
transform="rotate(-45)" />
<circle
id="circle17"
stroke-opacity="0.971"
stroke-width="5.292"
stroke="#f8e45c"
fill="none"
cx="-510.57101"
cy="772.495"
r="37.695"
transform="rotate(-45)" />
<circle
id="circle19"
stroke-opacity="0.971"
stroke-width="5.292"
stroke="#f8e45c"
fill="none"
r="46.956001"
cy="772.495"
cx="-510.57101"
transform="rotate(-45)" />
<circle
id="circle21"
stroke-opacity="0.971"
stroke-width="5.292"
stroke="#f8e45c"
fill="none"
cx="-510.57101"
cy="772.495"
r="56.216"
transform="rotate(-45)" />
<circle
id="circle23"
stroke-opacity="0.971"
stroke-width="5.292"
stroke="#f8e45c"
fill="none"
r="65.476997"
cy="772.495"
cx="-510.57101"
transform="rotate(-45)" />
<circle
id="circle25"
stroke-opacity="0.971"
stroke-width="5.292"
stroke="#f8e45c"
fill="none"
cx="-510.57101"
cy="772.495"
r="74.737"
transform="rotate(-45)" />
<circle
id="circle27"
stroke-opacity="0.971"
stroke-width="5.292"
stroke="#f8e45c"
fill="none"
r="83.997002"
cy="772.495"
cx="-510.57101"
transform="rotate(-45)" />
<path
id="path29"
stroke-opacity="0.975"
stroke-width="5.292"
stroke="#e5a50a"
fill="none"
d="m 244.604,847.87 a 83.997,83.997 0 0 1 0,118.79 m -6.549,-112.242 a 74.737,74.737 0 0 1 0,105.694 m -6.548,-99.146 a 65.477,65.477 0 0 1 0,92.598 m -6.547,-86.05 a 56.216,56.216 0 0 1 0,79.502 m -6.549,-72.954 a 46.956,46.956 0 0 1 0,66.406 m -6.548,-59.858 a 37.695,37.695 0 0 1 0,53.31 m -6.548,-46.761 a 28.435,28.435 0 0 1 0,40.213 m -6.548,-33.665 a 19.175,19.175 0 0 1 0,27.117 m -6.548,-20.569 a 9.899,9.899 0 0 1 0,13.999" />
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="350"><path d="M-23.234-27.797h1321.28v405.071H-23.234z" style="marker:none" fill="#c7ddf7"/><path d="M148.492 151H734.38v127.279H148.492z" style="marker:none" fill="#f3ebe5"/><path d="M-55.558-90.427h561.645v491.944H-55.558z" style="marker:none" fill="#f3ebe5"/><path d="M148.492 73.218h555.584v43.437H148.492z" style="marker:none" fill="#f3ebe5"/><path d="M265.63-217.336c0-23.504-18.923-42.426-42.427-42.426H107.036c-23.505 0-42.427 18.922-42.427 42.426V150.36c0 23.504 18.922 42.426 42.427 42.426h116.167c23.504 0 42.427-18.922 42.427-42.426" style="marker:none" fill="none" stroke="#ffa348" stroke-width="6" stroke-linecap="round"/><path style="marker:none" d="M213.142-60.122c0-23.505-18.922-42.427-42.426-42.427H54.548c-23.504 0-42.426 18.922-42.426 42.427v367.695c0 23.504 18.922 42.427 42.426 42.427h116.168c23.504 0 42.426-18.923 42.426-42.427" fill="none" stroke="#f8e45c" stroke-width="6" stroke-linecap="round"/><path style="marker:none" d="M112.127-102.549c0-23.504 18.922-42.426 42.426-42.426h116.168c23.504 0 42.426 18.922 42.426 42.426v367.696c0 23.504-18.922 42.426-42.426 42.426H154.553c-23.504 0-42.426-18.922-42.426-42.426" fill="none" stroke="#fff" stroke-width="4" stroke-linecap="round"/><path style="marker:none" d="M265.63 150.36c0-23.504 18.922-42.426 42.426-42.426h116.167c23.505 0 42.427 18.922 42.427 42.426v367.695c0 23.505-18.922 42.427-42.427 42.427H308.056c-23.504 0-42.426-18.922-42.426-42.426" fill="none" stroke="#ffa348" stroke-width="6" stroke-linecap="round"/><path d="M112.127 265.147c0-23.504-18.922-42.427-42.426-42.427H-46.467c-23.504 0-42.426 18.923-42.426 42.427v367.695c0 23.504 18.922 42.427 42.426 42.427H69.701c23.504 0 42.426-18.922 42.426-42.427m101.015-325.269c0-23.504 18.922-42.426 42.427-42.426h116.167c23.504 0 42.427 18.922 42.427 42.426v367.696c0 23.504-18.923 42.426-42.427 42.426H255.57c-23.505 0-42.427-18.922-42.427-42.426M313.652 6.043c23.505 0 42.427 18.922 42.427 42.426v116.168c0 23.504-18.922 42.426-42.427 42.426H-54.043c-23.504 0-42.427-18.922-42.427-42.426V48.469c0-23.504 18.923-42.426 42.427-42.426" style="marker:none" fill="none" stroke="#fff" stroke-width="4" stroke-linecap="round"/><path d="M466.619 217.955l-19.4 46.528 19.4-8.414 18.671 9.405z" fill="#f5c211" stroke="#fff" stroke-width="4"/><path d="M466.619 253.819l.006-30.57 14.937 38.157z" fill="#e5a50a"/><path d="M145 177h44.193v38H145z" style="marker:none" fill="#1a5fb4"/><path d="M158.961 204.571h3.97v-15.929h-2.363l-6.404 3.19 1.492 2.847 3.305-1.377zm11.682.229c4.293 0 7.116-1.859 7.116-4.682 0-2.02-1.355-3.534-3.466-3.947 1.584-.414 2.57-1.699 2.57-3.49 0-2.662-2.111-4.268-5.646-4.268-1.882 0-3.764.459-5.508 1.4l.895 2.96c1.423-.619 2.662-.963 3.787-.963 1.423 0 2.341.55 2.341 1.469 0 1.055-1.17 1.767-2.915 1.767h-1.101v2.984h1.101c2.318 0 3.81.757 3.81 1.905 0 .94-1.01 1.469-2.823 1.469-1.4 0-2.96-.299-4.292-.85l-.918 3.099c1.698.803 3.167 1.148 5.05 1.148z" word-spacing="0" letter-spacing="0" font-size="22.952" font-weight="800" aria-label="13" font-family="Cantarell" fill="#fff"/><path d="M98 330h32.193v38H98z" style="marker:none" fill="#1a5fb4"/><path word-spacing="0" letter-spacing="0" font-size="22.952" font-weight="800" aria-label="9" d="M113.728 341.413c-3.672 0-6.105 2.226-6.105 5.554 0 2.984 1.905 4.912 4.751 4.912 1.515 0 2.8-.528 3.787-1.56-.23 2.776-1.584 4.268-3.993 4.268-1.033 0-2.342-.275-3.283-.688l-1.01 2.96c1.217.597 2.732.942 4.453.942 5.073 0 7.758-3.099 7.758-8.584 0-5.119-2.318-7.804-6.358-7.804zm-2.249 5.256c0-1.194.78-1.974 1.974-1.974 1.354 0 2.226 1.056 2.57 2.938-.642.688-1.537 1.102-2.41 1.102-1.285 0-2.134-.827-2.134-2.066z" font-family="Cantarell" fill="#fff"/><rect style="marker:none" width="223.244" height="97.401" x="-1215.967" y="31.68" rx="22.223" ry="22.223"/><text word-spacing="0" letter-spacing="0" font-size="48.162" font-weight="800" style="line-height:1.25;-inkscape-font-specification:'Cantarell, Ultra-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" x="-1144.597" y="100.319" font-family="Cantarell" fill="#fff"><tspan x="-1144.597" y="100.319">852<tspan font-size="48.163" font-weight="400" style="-inkscape-font-specification:'Cantarell, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start">m</tspan> </tspan></text><g fill="#fff" stroke-width=".422" font-weight="400" color="#000" font-family="Sans"><path overflow="visible" style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;marker:none" d="M-1179.208 72.598l-5.035 5.035 9.478 9.55 5.035-5.034z" opacity=".35"/><path overflow="visible" style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;marker:none" d="M-1168.841 72.162l3.407 3.407-10.516 10.511v14.504h7.109V89.042l8.442-8.442 3.405 3.41V72.162z"/></g><path d="M-1104.23 177h44.192v38h-44.193z" style="marker:none" fill="#1a5fb4"/><text word-spacing="0" letter-spacing="0" font-size="22.952" font-weight="800" y="204.571" x="-1095.319" style="line-height:1.25;-inkscape-font-specification:'Cantarell, Ultra-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" font-family="Cantarell" fill="#fff"><tspan y="204.571" x="-1095.319">13</tspan></text><path d="M843 543h325v205H843z" style="marker:none" fill="#613583"/></svg>
\ No newline at end of file
<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="featured-maps-bg.svg"
id="svg54"
version="1.1"
height="350"
width="758.03265">
<metadata
id="metadata60">
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs58" />
<sodipodi:namedview
inkscape:current-layer="svg54"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-x="0"
inkscape:cy="330.91864"
inkscape:cx="582.74494"
inkscape:zoom="1.0296875"
fit-margin-bottom="0"
fit-margin-right="0"
fit-margin-left="0"
fit-margin-top="0"
showgrid="false"
id="namedview56"
inkscape:window-height="1043"
inkscape:window-width="1920"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<path
id="path2"
fill="#c7ddf7"
style="fill:#c7ddf7;fill-opacity:1;stroke-width:0.704069;marker:none"
d="M 0,0 H 758.03266 V 350 H 0 Z" />
<path
id="path4"
fill="#f3ebe5"
style="marker:none"
d="M 171.726,151 H 757.614 V 278.279 H 171.726 Z" />
<path
id="path6"
fill="#f3ebe5"
style="marker:none"
d="M -32.324,-90.427 H 529.321 V 401.517 H -32.324 Z" />
<path
id="path8"
fill="#f3ebe5"
style="marker:none"
d="M 171.726,73.218 H 727.31 v 43.437 H 171.726 Z" />
<path
id="path10"
stroke-linecap="round"
stroke-width="6"
stroke="#ffa348"
fill="none"
style="marker:none"
d="m 288.864,-217.336 c 0,-23.504 -18.923,-42.426 -42.427,-42.426 H 130.27 c -23.505,0 -42.427,18.922 -42.427,42.426 V 150.36 c 0,23.504 18.922,42.426 42.427,42.426 h 116.167 c 23.504,0 42.427,-18.922 42.427,-42.426" />
<path
id="path12"
stroke-linecap="round"
stroke-width="6"
stroke="#f8e45c"
fill="none"
d="m 236.376,-60.122 c 0,-23.505 -18.922,-42.427 -42.426,-42.427 H 77.782 c -23.504,0 -42.426,18.922 -42.426,42.427 V 307.573 C 35.356,331.077 54.278,350 77.782,350 H 193.95 c 23.504,0 42.426,-18.923 42.426,-42.427"
style="marker:none" />
<path
id="path14"
stroke-linecap="round"
stroke-width="4"
stroke="#ffffff"
fill="none"
d="m 135.361,-102.549 c 0,-23.504 18.922,-42.426 42.426,-42.426 h 116.168 c 23.504,0 42.426,18.922 42.426,42.426 v 367.696 c 0,23.504 -18.922,42.426 -42.426,42.426 H 177.787 c -23.504,0 -42.426,-18.922 -42.426,-42.426"
style="marker:none" />
<path
id="path16"
stroke-linecap="round"
stroke-width="6"
stroke="#ffa348"
fill="none"
d="m 288.864,150.36 c 0,-23.504 18.922,-42.426 42.426,-42.426 h 116.167 c 23.505,0 42.427,18.922 42.427,42.426 v 367.695 c 0,23.505 -18.922,42.427 -42.427,42.427 H 331.29 c -23.504,0 -42.426,-18.922 -42.426,-42.426"
style="marker:none" />
<path
id="path18"
stroke-linecap="round"
stroke-width="4"
stroke="#ffffff"
fill="none"
style="marker:none"
d="m 135.361,265.147 c 0,-23.504 -18.922,-42.427 -42.426,-42.427 H -23.233 c -23.504,0 -42.426,18.923 -42.426,42.427 v 367.695 c 0,23.504 18.922,42.427 42.426,42.427 H 92.935 c 23.504,0 42.426,-18.922 42.426,-42.427 M 236.376,307.573 c 0,-23.504 18.922,-42.426 42.427,-42.426 H 394.97 c 23.504,0 42.427,18.922 42.427,42.426 v 367.696 c 0,23.504 -18.923,42.426 -42.427,42.426 H 278.804 c -23.505,0 -42.427,-18.922 -42.427,-42.426 M 336.886,6.043 c 23.505,0 42.427,18.922 42.427,42.426 v 116.168 c 0,23.504 -18.922,42.426 -42.427,42.426 H -30.809 c -23.504,0 -42.427,-18.922 -42.427,-42.426 V 48.469 c 0,-23.504 18.923,-42.426 42.427,-42.426" />
<path
id="path20"
stroke-width="4"
stroke="#ffffff"
fill="#f5c211"
d="m 489.853,217.955 -19.4,46.528 19.4,-8.414 18.671,9.405 z" />
<path
id="path22"
fill="#e5a50a"
d="m 489.853,253.819 0.006,-30.57 14.937,38.157 z" />
<path
id="path24"
fill="#1a5fb4"
style="marker:none"
d="m 168.234,177 h 44.193 v 38 h -44.193 z" />
<path
id="path26"
fill="#ffffff"
font-family="Cantarell"
aria-label="13"
font-weight="800"
font-size="22.952px"
letter-spacing="0"
word-spacing="0"
d="m 182.195,204.571 h 3.97 v -15.929 h -2.363 l -6.404,3.19 1.492,2.847 3.305,-1.377 z m 11.682,0.229 c 4.293,0 7.116,-1.859 7.116,-4.682 0,-2.02 -1.355,-3.534 -3.466,-3.947 1.584,-0.414 2.57,-1.699 2.57,-3.49 0,-2.662 -2.111,-4.268 -5.646,-4.268 -1.882,0 -3.764,0.459 -5.508,1.4 l 0.895,2.96 c 1.423,-0.619 2.662,-0.963 3.787,-0.963 1.423,0 2.341,0.55 2.341,1.469 0,1.055 -1.17,1.767 -2.915,1.767 h -1.101 v 2.984 h 1.101 c 2.318,0 3.81,0.757 3.81,1.905 0,0.94 -1.01,1.469 -2.823,1.469 -1.4,0 -2.96,-0.299 -4.292,-0.85 l -0.918,3.099 c 1.698,0.803 3.167,1.148 5.05,1.148 z" />
<path
id="path28"
fill="#1a5fb4"
style="marker:none"
d="m 121.234,330 h 32.193 v 38 h -32.193 z" />
<path
id="path30"
fill="#ffffff"
font-family="Cantarell"
d="m 136.962,341.413 c -3.672,0 -6.105,2.226 -6.105,5.554 0,2.984 1.905,4.912 4.751,4.912 1.515,0 2.8,-0.528 3.787,-1.56 -0.23,2.776 -1.584,4.268 -3.993,4.268 -1.033,0 -2.342,-0.275 -3.283,-0.688 l -1.01,2.96 c 1.217,0.597 2.732,0.942 4.453,0.942 5.073,0 7.758,-3.099 7.758,-8.584 0,-5.119 -2.318,-7.804 -6.358,-7.804 z m -2.249,5.256 c 0,-1.194 0.78,-1.974 1.974,-1.974 1.354,0 2.226,1.056 2.57,2.938 -0.642,0.688 -1.537,1.102 -2.41,1.102 -1.285,0 -2.134,-0.827 -2.134,-2.066 z"
aria-label="9"
font-weight="800"
font-size="22.952px"
letter-spacing="0"
word-spacing="0" />
<rect
id="rect32"
ry="22.223"
rx="22.223"
y="31.68"
x="-1192.733"
height="97.401001"
width="223.244"
style="marker:none" />
<text
id="text38"
fill="#ffffff"
font-family="Cantarell"
y="100.319"
x="-1121.363"
style="line-height:1.25;-inkscape-font-specification:'Cantarell, Ultra-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"
font-weight="800"
font-size="48.162px"
letter-spacing="0"
word-spacing="0"><tspan
id="tspan36"
y="100.319"
x="-1121.363">852<tspan
id="tspan34"
style="-inkscape-font-specification:'Cantarell, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"
font-weight="400"
font-size="48.163px">m</tspan></tspan></text>
<g
transform="translate(23.234)"
id="g44"
font-family="Sans"
color="#000000"
font-weight="400"
stroke-width="0.422"
fill="#ffffff">
<path
id="path40"
opacity="0.35"
d="m -1179.208,72.598 -5.035,5.035 9.478,9.55 5.035,-5.034 z"
style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-transform:none;marker:none"
overflow="visible" />
<path
id="path42"
d="m -1168.841,72.162 3.407,3.407 -10.516,10.511 v 14.504 h 7.109 V 89.042 l 8.442,-8.442 3.405,3.41 V 72.162 Z"
style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-transform:none;marker:none"
overflow="visible" />
</g>
<path
id="path46"
fill="#1a5fb4"
style="marker:none"
d="m -1080.996,177 h 44.192 v 38 h -44.193 z" />
<text
id="text50"
fill="#ffffff"
font-family="Cantarell"
style="line-height:1.25;-inkscape-font-specification:'Cantarell, Ultra-Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start"
x="-1072.085"
y="204.571"
font-weight="800"
font-size="22.952px"
letter-spacing="0"
word-spacing="0"><tspan
id="tspan48"
x="-1072.085"
y="204.571">13</tspan></text>
</svg>
......@@ -36,6 +36,6 @@ install_data([
if get_option('default_featured_apps')
install_data('org.gnome.Software.Featured.xml',
install_dir : 'share/app-info/xmls'
install_dir : join_paths(get_option('datadir'), 'app-info', 'xmls'),
)
endif
......@@ -37,11 +37,11 @@ background:
text-shadow: none;
color: #613583;
background: #f6f5f4,
background: #c7ddf7,
url('file://@datadir@/gnome-software/featured-maps-overlay.svg')
16px 16px / 20% auto no-repeat,
url('file://@datadir@/gnome-software/featured-maps-bg.svg')
center / cover no-repeat;
0 50% / contain no-repeat;
</value>
</custom>
</component>
......@@ -202,7 +202,7 @@ text-shadow: 0 1px 1px rgba(0,0,0,0.5);
color: #ffffff;
background: #f5c211
url('file://@datadir@/gnome-software/featured-FeedReader.svg')
0 50% / 80% no-repeat;
0 50% / contain no-repeat;
</value>
</custom>
</component>
......
......@@ -6,6 +6,9 @@ compiled_schemas = gnome.compile_schemas()
install_data('org.gnome.software.gschema.xml',
install_dir : 'share/glib-2.0/schemas')
install_data('org.gnome.Software.desktop',
install_dir : 'share/ubuntu/applications')
if get_option('external_appstream')
# replace @libexecdir@
conf_data = configuration_data()
......
[Desktop Entry]
Name=Ubuntu Software
Comment=Add, remove or update software on this computer
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=ubuntusoftware
Exec=gnome-software %U
Terminal=false
Type=Application
Categories=GNOME;GTK;System;PackageManager;
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=Updates;Upgrade;Sources;Repositories;Preferences;Install;Uninstall;Program;Software;App;Store;
StartupNotify=true
MimeType=x-scheme-handler/appstream;x-scheme-handler/apt;x-scheme-handler/snap;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-software
X-GNOME-Bugzilla-Component=gnome-software
X-GNOME-UsesNotifications=true
DBusActivatable=true
X-Ubuntu-Gettext-Domain=gnome-software
......@@ -293,7 +293,7 @@ gs_plugin_add_installed (GsPlugin *plugin,
<para>
By filling in the optional details (which can also be filled in using
<code>gs_plugin_refine_app()</code> you can also make the details
<code>gs_plugin_refine()</code> you can also make the details
page a much more exciting place.
Adding a set of screenshots is left as an exercise to the reader.
</para>
......@@ -421,23 +421,27 @@ gs_plugin_refresh (GsPlugin *plugin,
<title>Refine example</title>
<programlisting>
gboolean
gs_plugin_refine_app (GsPlugin *plugin,
GsApp *app,
GsPluginRefineFlags flags,
GCancellable *cancellable,
GError **error)
gs_plugin_refine (GsPlugin *plugin,
GsAppList *list,
GsPluginRefineFlags flags,
GCancellable *cancellable,
GError **error)
{
/* not required */
if ((flags &amp; GS_PLUGIN_REFINE_FLAGS_REQUIRE_LICENSE) == 0)
return TRUE;
/* already set */
if (gs_app_get_license (app) != NULL)
return TRUE;
for (guint i = 0; i &lt; gs_app_list_length (list); i++) {
GsApp *app = gs_app_list_index (list, i);
/* FIXME, not just hardcoded! */
if (g_strcmp0 (gs_app_get_id (app, "chiron.desktop") == 0))
gs_app_set_license (app, "GPL-2.0 and LGPL-2.0+");
/* already set */
if (gs_app_get_license (app) != NULL)
return TRUE;
/* FIXME, not just hardcoded! */
if (g_strcmp0 (gs_app_get_id (app, "chiron.desktop") == 0))
gs_app_set_license (app, "GPL-2.0 and LGPL-2.0+");
}
return TRUE;
}
......
......@@ -62,7 +62,7 @@ To do this, just add something like:
Although, please bear in mind any application that is found cheating, i.e.
adding kudos artificially will have **all** the kudos manually removed
with a blacklist rule in the AppStream builder.
with a blocklist rule in the AppStream builder.
If you are a vendor, or a system distributor and just want to increase the
number of kudos for your pet proprietary application that's essential to
......
......@@ -32,14 +32,13 @@ struct _GsAppList
guint size_peak;
GsAppListFlags flags;
AsAppState state;
guint progress;
guint progress; /* 0–100 inclusive, or %GS_APP_PROGRESS_UNKNOWN */
};
G_DEFINE_TYPE (GsAppList, gs_app_list, G_TYPE_OBJECT)
enum {
PROP_0,
PROP_STATE,
PROP_STATE = 1,
PROP_PROGRESS,
PROP_LAST
};
......@@ -68,19 +67,21 @@ gs_app_list_get_state (GsAppList *list)
* gs_app_list_get_progress:
* @list: A #GsAppList
*
* Gets the average percentage completion of all apps in the list.
* Gets the average percentage completion of all apps in the list. If any of the
* apps in the list has progress %GS_APP_PROGRESS_UNKNOWN, or if the app list
* is empty, %GS_APP_PROGRESS_UNKNOWN will be returned.
*
* This method will only return a valid result if gs_app_list_add_flag() has
* been called with %GS_APP_LIST_FLAG_WATCH_APPS.
*
* Returns: the percentage completion, or 0 for unknown
* Returns: the percentage completion (0–100 inclusive), or %GS_APP_PROGRESS_UNKNOWN for unknown
*
* Since: 3.30
**/
guint
gs_app_list_get_progress (GsAppList *list)
{
g_return_val_if_fail (GS_IS_APP_LIST (list), 0);
g_return_val_if_fail (GS_IS_APP_LIST (list), GS_APP_PROGRESS_UNKNOWN);
return list->progress;
}
......@@ -133,12 +134,24 @@ gs_app_list_invalidate_progress (GsAppList *self)
/* find the average percentage complete of the list */
if (apps->len > 0) {
guint64 pc_cnt = 0;
gboolean unknown_seen = FALSE;
for (guint i = 0; i < apps->len; i++) {
GsApp *app_tmp = g_ptr_array_index (apps, i);
guint app_progress = gs_app_get_progress (app_tmp);
if (app_progress == GS_APP_PROGRESS_UNKNOWN) {
unknown_seen = TRUE;
break;
}
pc_cnt += gs_app_get_progress (app_tmp);
}
progress = pc_cnt / apps->len;
progress = (!unknown_seen) ? pc_cnt / apps->len : GS_APP_PROGRESS_UNKNOWN;
} else {
progress = GS_APP_PROGRESS_UNKNOWN;
}
if (self->progress != progress) {
self->progress = progress;
g_object_notify (G_OBJECT (self), "progress");
......@@ -912,8 +925,14 @@ gs_app_list_class_init (GsAppListClass *klass)
/**
* GsAppList:progress:
*
* A percentage (0–100, inclusive) indicating the progress through the
* current task on this app list. The value may otherwise be
* %GS_APP_PROGRESS_UNKNOWN if the progress is unknown or has a wide
* confidence interval on any app, or if the app list is empty.
*/
pspec = g_param_spec_uint ("progress", NULL, NULL, 0, 100, 0,
pspec = g_param_spec_uint ("progress", NULL, NULL,
0, GS_APP_PROGRESS_UNKNOWN, GS_APP_PROGRESS_UNKNOWN,
G_PARAM_READABLE);
g_object_class_install_property (object_class, PROP_PROGRESS, pspec);
}
......
......@@ -67,6 +67,7 @@ typedef struct
gchar *summary_missing;
gchar *description;
GsAppQuality description_quality;
gboolean description_markup;
GPtrArray *screenshots;
GPtrArray *categories;
GPtrArray *key_colors;
......@@ -78,6 +79,7 @@ typedef struct
gchar *origin;
gchar *origin_appstream;
gchar *origin_hostname;
GPtrArray *permissions_;
gchar *update_version;
gchar *update_version_ui;
gchar *update_details;
......@@ -97,7 +99,7 @@ typedef struct
AsAppState state_recover;
AsAppScope scope;
AsBundleKind bundle_kind;
guint progress;
guint progress; /* integer 0–100 (inclusive), or %GS_APP_PROGRESS_UNKNOWN */
gboolean allow_cancel;
GHashTable *metadata;
GsAppList *addons;
......@@ -111,7 +113,7 @@ typedef struct
GsApp *runtime;
GFile *local_file;
AsContentRating *content_rating;
GdkPixbuf *pixbuf;
GdkPixbuf *pixbuf; /* (nullable) (owned) */
GCancellable *cancellable;
GsPluginAction pending_action;
GsAppPermissions permissions;
......@@ -442,7 +444,9 @@ gs_app_to_string_append (GsApp *app, GString *str)
g_autofree gchar *qstr = gs_app_quirk_to_string (priv->quirk);
gs_app_kv_lpad (str, "quirk", qstr);
}
if (priv->progress > 0)
if (priv->progress == GS_APP_PROGRESS_UNKNOWN)
gs_app_kv_printf (str, "progress", "unknown");
else
gs_app_kv_printf (str, "progress", "%u%%", priv->progress);
if (priv->id != NULL)
gs_app_kv_lpad (str, "id", priv->id);
......@@ -483,6 +487,18 @@ gs_app_to_string_append (GsApp *app, GString *str)
gs_app_kv_lpad (str, "icon-filename",
as_icon_get_filename (icon));
}
for (i = 0; i < priv->permissions_->len; i++) {
GsPermission *permission;
GsPermissionValue *value;
g_autofree gchar *key = NULL;
permission = g_ptr_array_index (priv->permissions_, i);
value = gs_permission_get_value (permission);
key = g_strdup_printf ("permission-%02u", i);
gs_app_kv_printf (str, key, "[%s] %s",
gs_permission_get_label (permission),
value ? gs_permission_value_get_label (value) : "(unset)");
}
if (priv->match_value != 0)
gs_app_kv_printf (str, "match-value", "%05x", priv->match_value);
if (priv->priority != 0)
......@@ -837,7 +853,7 @@ gs_app_get_state (GsApp *app)
*
* Gets the percentage completion.
*
* Returns: the percentage completion, or 0 for unknown
* Returns: the percentage completion (0–100 inclusive), or %GS_APP_PROGRESS_UNKNOWN for unknown
*
* Since: 3.22
**/
......@@ -845,7 +861,7 @@ guint
gs_app_get_progress (GsApp *app)
{
GsAppPrivate *priv = gs_app_get_instance_private (app);
g_return_val_if_fail (GS_IS_APP (app), 0);
g_return_val_if_fail (GS_IS_APP (app), GS_APP_PROGRESS_UNKNOWN);
return priv->progress;
}
......@@ -892,7 +908,7 @@ gs_app_set_state_recover (GsApp *app)
/* make sure progress gets reset when recovering state, to prevent
* confusing initial states when going through more than one attempt */
gs_app_set_progress (app, 0);
gs_app_set_progress (app, GS_APP_PROGRESS_UNKNOWN);
priv->state = priv->state_recover;
gs_app_queue_notify (app, obj_props[PROP_STATE]);
......@@ -1026,9 +1042,12 @@ gs_app_set_state_internal (GsApp *app, AsAppState state)
/**
* gs_app_set_progress:
* @app: a #GsApp
* @percentage: a percentage progress
* @percentage: a percentage progress (0–100 inclusive), or %GS_APP_PROGRESS_UNKNOWN
*
* This sets the progress completion of the application. Use
* %GS_APP_PROGRESS_UNKNOWN if the progress is unknown or has a wide confidence
* interval.
*
* This sets the progress completion of the application.
* If called more than once with the same value then subsequent calls
* will be ignored.
*
......@@ -1043,9 +1062,9 @@ gs_app_set_progress (GsApp *app, guint percentage)
locker = g_mutex_locker_new (&priv->mutex);
if (priv->progress == percentage)
return;
if (percentage > 100) {
g_debug ("cannot set %u%% for %s, setting instead: 100%%",
percentage, gs_app_get_unique_id_unlocked (app));
if (percentage != GS_APP_PROGRESS_UNKNOWN && percentage > 100) {
g_warning ("cannot set %u%% for %s, setting instead: 100%%",
percentage, gs_app_get_unique_id_unlocked (app));
percentage = 100;
}
priv->progress = percentage;
......@@ -1635,7 +1654,7 @@ gs_app_set_developer_name (GsApp *app, const gchar *developer_name)
*
* Gets a pixbuf to represent the application.
*
* Returns: (transfer none): a #GdkPixbuf, or %NULL
* Returns: (transfer none) (nullable): a #GdkPixbuf, or %NULL
*
* Since: 3.22
**/
......@@ -1693,7 +1712,7 @@ gs_app_add_icon (GsApp *app, AsIcon *icon)
* gs_app_get_use_drop_shadow:
* @app: a #GsApp
*
* Uses a heuristic to work out if the application pixbuf should have a drop
* Uses a heuristic to work out if the application pixbuf should have a drop
* shadow applied.
*
* Returns: %TRUE if a drop shadow should be applied
......@@ -1871,7 +1890,7 @@ gs_app_set_runtime (GsApp *app, GsApp *runtime)
/**
* gs_app_set_pixbuf:
* @app: a #GsApp
* @pixbuf: a #GdkPixbuf, or %NULL
* @pixbuf: (transfer none) (nullable): a #GdkPixbuf, or %NULL
*
* Sets a pixbuf used to represent the application.
*
......@@ -2147,6 +2166,45 @@ gs_app_set_description (GsApp *app, GsAppQuality quality, const gchar *descripti
_g_set_str (&priv->description, description);
}
/**
* gs_app_get_description_markup:
* @app: a #GsApp
*
* Gets if the description uses markup.
*
* Returns: %TRUE if the description is formatted using markup.
*
* Since: 3.32
**/
gboolean
gs_app_get_description_markup (GsApp *app)
{
GsAppPrivate *priv = gs_app_get_instance_private (app);
g_return_val_if_fail (GS_IS_APP (app), FALSE);
return priv->description_markup;
}
/**
* gs_app_set_description_markup:
* @app: a #GsApp
* @use_markup: if the description uses markup
*
* Sets the description is formatted using markup.
*
* Since: 3.32
**/
void
gs_app_set_description_markup (GsApp *app, gboolean use_markup)
{
GsAppPrivate *priv = gs_app_get_instance_private (app);
g_autoptr(GMutexLocker) locker = NULL;
g_return_if_fail (GS_IS_APP (app));
locker = g_mutex_locker_new (&priv->mutex);
priv->description_markup = use_markup;
}
/**
* gs_app_get_url:
* @app: a #GsApp
......@@ -2577,6 +2635,46 @@ gs_app_set_origin_hostname (GsApp *app, const gchar *origin_hostname)
priv->origin_hostname = g_strdup (origin_hostname);
}
/**
* gs_app_add_permission:
* @app: a #GsApp
* @permission: a #GsPermission
*
* Adds a permission to the applicaton.
*
* Since: 3.26
**/
void
gs_app_add_permission (GsApp *app, GsPermission *permission)
{
GsAppPrivate *priv = gs_app_get_instance_private (app);
g_return_if_fail (GS_IS_APP (app));
g_return_if_fail (GS_IS_PERMISSION (permission));
g_ptr_array_add (priv->permissions_, g_object_ref (permission));
}
/**
* gs_app_get_permissions_:
* @app: a #GsApp
*
* Gets the list of permissions.
*
* Returns: (element-type GsPermission) (transfer none): a list
*
* Since: 3.26
**/
GPtrArray *
gs_app_get_permissions_ (GsApp *app)
{
GsAppPrivate *priv = gs_app_get_instance_private (app);
g_return_val_if_fail (GS_IS_APP (app), NULL);
return priv->permissions_;
}
/**
* gs_app_add_screenshot:
* @app: a #GsApp
......@@ -4145,7 +4243,7 @@ gs_app_set_property (GObject *object, guint prop_id, const GValue *value, GParam
gs_app_set_state_internal (app, g_value_get_uint (value));
break;
case PROP_PROGRESS:
priv->progress = g_value_get_uint (value);
gs_app_set_progress (app, g_value_get_uint (value));
break;
case PROP_CAN_CANCEL_INSTALLATION:
priv->allow_cancel = g_value_get_boolean (value);
......@@ -4184,6 +4282,7 @@ gs_app_dispose (GObject *object)
g_clear_pointer (&priv->reviews, g_ptr_array_unref);
g_clear_pointer (&priv->provides, g_ptr_array_unref);
g_clear_pointer (&priv->icons, g_ptr_array_unref);
g_clear_pointer (&priv->permissions_, g_ptr_array_unref);
G_OBJECT_CLASS (gs_app_parent_class)->dispose (object);
}
......@@ -4305,9 +4404,14 @@ gs_app_class_init (GsAppClass *klass)
/**
* GsApp:progress:
*
* A percentage (0–100, inclusive) indicating the progress through the
* current task on this app. The value may otherwise be
* %GS_APP_PROGRESS_UNKNOWN if the progress is unknown or has a wide
* confidence interval.
*/
obj_props[PROP_PROGRESS] = g_param_spec_uint ("progress", NULL, NULL,
0, 100, 0,
0, GS_APP_PROGRESS_UNKNOWN, GS_APP_PROGRESS_UNKNOWN,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
/**
......@@ -4370,6 +4474,7 @@ gs_app_init (GsApp *app)
priv->reviews = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
priv->provides = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
priv->icons = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
priv->permissions_ = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
priv->metadata = g_hash_table_new_full (g_str_hash,
g_str_equal,
g_free,
......
......@@ -13,6 +13,8 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <appstream-glib.h>
#include "gs-permission.h"
G_BEGIN_DECLS
#define GS_TYPE_APP (gs_app_get_type ())
......@@ -84,7 +86,7 @@ typedef enum {
* @GS_APP_QUIRK_NEW_PERMISSIONS: The update requires new permissions
* @GS_APP_QUIRK_PARENTAL_NOT_LAUNCHABLE: The app cannot be run by the current user due to parental controls, and should not be launchable
* @GS_APP_QUIRK_HIDE_FROM_SEARCH: The app should not be shown in search results
* @GS_APP_QUIRK_HIDE_EVERYWHERE: The app should not be shown anywhere (it’s blacklisted)
* @GS_APP_QUIRK_HIDE_EVERYWHERE: The app should not be shown anywhere (it’s blocklisted)
* @GS_APP_QUIRK_DO_NOT_AUTO_UPDATE: The app should not be automatically updated
*
* The application attributes.
......@@ -162,6 +164,17 @@ typedef enum {
#define MEDIUM_PERMISSIONS (LIMITED_PERMISSIONS | \
GS_APP_PERMISSIONS_X11)
/**
* GS_APP_PROGRESS_UNKNOWN:
*
* A value returned by gs_app_get_progress() if the app’s progress is unknown
* or has a wide confidence interval. Typically this would be represented in the
* UI using a pulsing progress bar or spinner.
*
* Since: 3.38
*/
#define GS_APP_PROGRESS_UNKNOWN G_MAXUINT
GsApp *gs_app_new (const gchar *id);
G_DEPRECATED_FOR(gs_app_set_from_unique_id)
GsApp *gs_app_new_from_unique_id (const gchar *unique_id);
......@@ -238,6 +251,9 @@ const gchar *gs_app_get_description (GsApp *app);
void gs_app_set_description (GsApp *app,
GsAppQuality quality,
const gchar *description);
gboolean gs_app_get_description_markup (GsApp *app);
void gs_app_set_description_markup (GsApp *app,
gboolean use_markup);
const gchar *gs_app_get_url (GsApp *app,
AsUrlKind kind);
void gs_app_set_url (GsApp *app,
......@@ -265,6 +281,9 @@ void gs_app_set_origin_appstream (GsApp *app,
const gchar *gs_app_get_origin_hostname (GsApp *app);
void gs_app_set_origin_hostname (GsApp *app,
const gchar *origin_hostname);
GPtrArray *gs_app_get_permissions_ (GsApp *app);
void gs_app_add_permission (GsApp *app,
GsPermission *permission);
GPtrArray *gs_app_get_screenshots (GsApp *app);
void gs_app_add_screenshot (GsApp *app,
AsScreenshot *screenshot);
......
......@@ -288,14 +288,14 @@ main (int argc, char **argv)
gint i;
guint cache_age = 0;
gint repeat = 1;
g_auto(GStrv) plugin_blacklist = NULL;
g_auto(GStrv) plugin_whitelist = NULL;
g_auto(GStrv) plugin_blocklist = NULL;
g_auto(GStrv) plugin_allowlist = NULL;
g_autoptr(GError) error = NULL;
g_autoptr(GsAppList) list = NULL;
g_autoptr(GPtrArray) categories = NULL;
g_autoptr(GsDebug) debug = gs_debug_new ();
g_autofree gchar *plugin_blacklist_str = NULL;
g_autofree gchar *plugin_whitelist_str = NULL;
g_autofree gchar *plugin_blocklist_str = NULL;
g_autofree gchar *plugin_allowlist_str = NULL;
g_autofree gchar *refine_flags_str = NULL;
g_autoptr(GsApp) app = NULL;
g_autoptr(GFile) file = NULL;
......@@ -313,9 +313,9 @@ main (int argc, char **argv)
"Return a maximum number of results", NULL },
{ "prefer-local", '\0', 0, G_OPTION_ARG_NONE, &prefer_local,
"Prefer local file sources to AppStream", NULL },
{ "plugin-blacklist", '\0', 0, G_OPTION_ARG_STRING, &plugin_blacklist_str,
{ "plugin-blocklist", '\0', 0, G_OPTION_ARG_STRING, &plugin_blocklist_str,
"Do not load specific plugins", NULL },
{ "plugin-whitelist", '\0', 0, G_OPTION_ARG_STRING, &plugin_whitelist_str,
{ "plugin-allowlist", '\0', 0, G_OPTION_ARG_STRING, &plugin_allowlist_str,
"Only load specific plugins", NULL },
{ "verbose", '\0', 0, G_OPTION_ARG_NONE, &verbose,
"Show verbose debugging information", NULL },
......@@ -358,13 +358,13 @@ main (int argc, char **argv)
self->plugin_loader = gs_plugin_loader_new ();
if (g_file_test (LOCALPLUGINDIR, G_FILE_TEST_EXISTS))
gs_plugin_loader_add_location (self->plugin_loader, LOCALPLUGINDIR);
if (plugin_whitelist_str != NULL)
plugin_whitelist = g_strsplit (plugin_whitelist_str, ",", -1);
if (plugin_blacklist_str != NULL)
plugin_blacklist = g_strsplit (plugin_blacklist_str, ",", -1);
if (plugin_allowlist_str != NULL)
plugin_allowlist = g_strsplit (plugin_allowlist_str, ",", -1);
if (plugin_blocklist_str != NULL)
plugin_blocklist = g_strsplit (plugin_blocklist_str, ",", -1);
ret = gs_plugin_loader_setup (self->plugin_loader,
plugin_whitelist,
plugin_blacklist,
plugin_allowlist,
plugin_blocklist,
NULL,
&error);
if (!ret) {
......
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Copyright (C) 2017 Canonical Ltd.
*
* Licensed under the GNU General Public License Version 2
*
* 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 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include <glib/gi18n.h>
#include "gs-permission-value.h"
struct _GsPermissionValue
{
GObject parent_instance;
gchar *label;
GHashTable *metadata; /* utf8: utf8 */
};
G_DEFINE_TYPE (GsPermissionValue, gs_permission_value, G_TYPE_OBJECT)
/**
* gs_permission_value_get_metadata_item:
* @value: a #GsPermissionValue
* @key: a string
*
* Gets some metadata from a permission value object.
* It is left for the the plugin to use this method as required, but a
* typical use would be to retrieve an ID for this permission value.
*
* Returns: A string value, or %NULL for not found
*/
const gchar *
gs_permission_value_get_metadata_item (GsPermissionValue *value, const gchar *key)
{
g_return_val_if_fail (GS_IS_PERMISSION_VALUE (value), NULL);
g_return_val_if_fail (key != NULL, NULL);
return g_hash_table_lookup (value->metadata, key);
}
/**
* gs_permission_value_add_metadata:
* @value: a #GsPermissionValue
* @key: a string
* @value: a string
*
* Adds metadata to the permission object.
* It is left for the the plugin to use this method as required, but a
* typical use would be to store an ID for this permission.
*/
void
gs_permission_value_add_metadata (GsPermissionValue *value, const gchar *key, const gchar *val)
{
g_return_if_fail (GS_IS_PERMISSION_VALUE (value));
g_hash_table_insert (value->metadata, g_strdup (key), g_strdup (val));
}
/**
* gs_permission_value_get_label:
* @permission: a #GsPermissionValue
*
* Get the label for this permission.
*
* Returns: a label string.
*/
const gchar *
gs_permission_value_get_label (GsPermissionValue *value)
{
g_return_val_if_fail (GS_IS_PERMISSION_VALUE (value), NULL);
return value->label;
}
static void
gs_permission_value_finalize (GObject *object)
{
GsPermissionValue *value = GS_PERMISSION_VALUE (object);
g_free (value->label);
g_hash_table_unref (value->metadata);
G_OBJECT_CLASS (gs_permission_value_parent_class)->finalize (object);
}
static void
gs_permission_value_class_init (GsPermissionValueClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gs_permission_value_finalize;
}
static void
gs_permission_value_init (GsPermissionValue *value)
{
value->metadata = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, g_free);
}
GsPermissionValue *
gs_permission_value_new (const gchar *label)
{
GsPermissionValue *value;
value = g_object_new (GS_TYPE_PERMISSION_VALUE, NULL);
value->label = g_strdup (label);
return GS_PERMISSION_VALUE (value);
}
/* vim: set noexpandtab: */
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Copyright (C) 2017 Canonical Ltd.
*
* Licensed under the GNU General Public License Version 2
*
* 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 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __GS_PERMISSION_VALUE_H
#define __GS_PERMISSION_VALUE_H
#include <glib-object.h>
G_BEGIN_DECLS
#define GS_TYPE_PERMISSION_VALUE (gs_permission_value_get_type ())
G_DECLARE_FINAL_TYPE (GsPermissionValue, gs_permission_value, GS, PERMISSION_VALUE, GObject)
GsPermissionValue *gs_permission_value_new (const gchar *label);
const gchar *gs_permission_value_get_metadata_item (GsPermissionValue *value,
const gchar *key);
void gs_permission_value_add_metadata (GsPermissionValue *value,
const gchar *key,
const gchar *val);
const gchar *gs_permission_value_get_label (GsPermissionValue *value);
G_END_DECLS
#endif /* __GS_PERMISSION_VALUE_H */
/* vim: set noexpandtab: */
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Copyright (C) 2017 Canonical Ltd.
*
* Licensed under the GNU General Public License Version 2
*
* 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 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include <glib/gi18n.h>
#include "gs-permission.h"
struct _GsPermission
{
GObject parent_instance;
gchar *label;
GPtrArray *values;
GsPermissionValue *value;
GHashTable *metadata; /* utf8: utf8 */
};
enum {
PROP_0,
PROP_VALUE,
PROP_LAST
};
G_DEFINE_TYPE (GsPermission, gs_permission, G_TYPE_OBJECT)
typedef struct {
GsPermission *permission;
gchar *property_name;
} PermissionNotifyData;
static gboolean
notify_idle_cb (gpointer data)
{
PermissionNotifyData *notify_data = data;
g_object_notify (G_OBJECT (notify_data->permission),
notify_data->property_name);
g_object_unref (notify_data->permission);
g_free (notify_data->property_name);
g_free (notify_data);
return G_SOURCE_REMOVE;
}
static void
gs_permission_queue_notify (GsPermission *permission, const gchar *property_name)
{
PermissionNotifyData *notify_data;
notify_data = g_new (PermissionNotifyData, 1);
notify_data->permission = g_object_ref (permission);
notify_data->property_name = g_strdup (property_name);
g_idle_add (notify_idle_cb, notify_data);
}
/**
* gs_permission_get_metadata_item:
* @permission: a #GsPermission
* @key: a string
*
* Gets some metadata from a permission object.
* It is left for the the plugin to use this method as required, but a
* typical use would be to retrieve an ID for this permission.
*
* Returns: A string value, or %NULL for not found
*/
const gchar *
gs_permission_get_metadata_item (GsPermission *permission, const gchar *key)
{
g_return_val_if_fail (GS_IS_PERMISSION (permission), NULL);
g_return_val_if_fail (key != NULL, NULL);
return g_hash_table_lookup (permission->metadata, key);
}
/**
* gs_permission_add_metadata:
* @permission: a #GsPermission
* @key: a string
* @value: a string
*