Commit 59b7ca24 authored by guinux's avatar guinux

make icons themeable

parent dc9740eb
......@@ -76,12 +76,18 @@ const PamacUpdateIndicator = new Lang.Class({
_updateList: [],
_config: null,
_pacman_lock: null,
_icon_theme: null,
_init: function() {
this.parent(0.0, "PamacUpdateIndicator");
Gtk.IconTheme.get_default().append_search_path(Me.dir.get_child('icons').get_path());
// Set icon theme
let that = this;
this._icon_theme = Gtk.IconTheme.get_default();
this._icon_theme.connect('changed', function () {
that._icon_theme = Gtk.IconTheme.get_default();
});
this.updateIcon = new St.Icon({icon_name: "pamac-tray-no-update", style_class: 'system-status-icon'});
this.updateIcon = new St.Icon({icon_name: "pamac-tray-no-update", icon_size: 20, style_class: 'system-status-icon'});
let box = new St.BoxLayout({ vertical: false, style_class: 'panel-status-menu-box' });
this.label = new St.Label({ text: '',
......
<?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"
width="16"
height="16"
version="1.1"
viewBox="0 0 16 16"
id="svg8"
sodipodi:docname="package-available-locked.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata14">
<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="defs12" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="792"
inkscape:window-height="480"
id="namedview10"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="7.0564046"
inkscape:cy="8"
inkscape:window-x="403"
inkscape:window-y="85"
inkscape:window-maximized="0"
inkscape:current-layer="g6" />
<g
transform="translate(0,-1036.3622)"
id="g6">
<rect
style="fill:#e4e4e4;fill-opacity:1"
width="16"
height="16"
x="-1052.36"
y="-16"
rx=".8"
ry=".8"
transform="matrix(0,-1,-1,0,0,0)"
id="rect2" />
<path
style="fill:#ffffff"
d="m 5,1041.3622 0,1.9998 -0.5000001,0 c -0.277,0 -0.5,0.223 -0.5,0.5 l 0,5 c 0,0.277 0.223,0.5 0.5,0.5 l 7.0000001,0 c 0.277,0 0.5,-0.223 0.5,-0.5 l 0,-5 c 0,-0.277 -0.223,-0.5 -0.5,-0.5 l -0.5,0 0,-1.9998 c 0,-2 -1,-2 -2,-2 l -2,0 c -1,0 -2,0 -2,2 z m 4,0 0,2 -2,0 0,-2 z"
id="path4" />
</g>
</svg>
<?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"
width="16"
height="16"
version="1.1"
viewBox="0 0 16 16"
id="svg6"
sodipodi:docname="package-available.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata12">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs10" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="792"
inkscape:window-height="480"
id="namedview8"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg6" />
<rect
style="fill:#e4e4e4"
width="16"
height="16"
x="-16"
y="-16"
rx=".8"
ry=".8"
transform="matrix(0,-1,-1,0,0,0)"
id="rect2" />
</svg>
<?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"
width="16"
height="16"
version="1.1"
viewBox="0 0 16 16"
id="svg8"
sodipodi:docname="package-install.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata14">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs12" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="778"
inkscape:window-height="480"
id="namedview10"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="527"
inkscape:window-y="67"
inkscape:window-maximized="0"
inkscape:current-layer="g6" />
<g
transform="translate(0,-1036.3622)"
id="g6">
<rect
style="fill:#e4e4e4;fill-opacity:1"
width="16"
height="16"
x="-1052.36"
y="-16"
rx=".8"
ry=".8"
transform="matrix(0,-1,-1,0,0,0)"
id="rect2" />
<path
style="fill:#8fb629;fill-opacity:1"
d="m 12.900392,1039.8778 -5.6582045,5.6563 -2.828125,-2.8281 L 3,1044.12 l 2.828125,2.8281 1.4140625,1.4141 1.4140625,-1.4141 5.658203,-5.6562 -1.414061,-1.4141 z"
id="path4" />
</g>
</svg>
<?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"
width="16"
height="16"
version="1.1"
viewBox="0 0 16 16"
id="svg8"
sodipodi:docname="package-installed-locked.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata14">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs12" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="792"
inkscape:window-height="480"
id="namedview10"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="8.1048439"
inkscape:cy="8"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="g6" />
<g
transform="translate(0,-1036.3622)"
id="g6">
<rect
style="fill:#8fb633;fill-opacity:1"
width="16"
height="16"
x="-1052.36"
y="-16"
rx=".8"
ry=".8"
transform="matrix(0,-1,-1,0,0,0)"
id="rect2" />
<path
style="fill:#ffffff"
d="m 5,1041.3622 0,1.9998 -0.5000001,0 c -0.277,0 -0.5,0.223 -0.5,0.5 l 0,5 c 0,0.277 0.223,0.5 0.5,0.5 l 7.0000001,0 c 0.277,0 0.5,-0.223 0.5,-0.5 l 0,-5 c 0,-0.277 -0.223,-0.5 -0.5,-0.5 l -0.5,0 0,-1.9998 c 0,-2 -1,-2 -2,-2 l -2,0 c -1,0 -2,0 -2,2 z m 4,0 0,2 -2,0 0,-2 z"
id="path4" />
</g>
</svg>
<?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"
width="16"
height="16"
version="1.1"
viewBox="0 0 16 16"
id="svg8"
sodipodi:docname="package-installed-updated.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata14">
<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="defs12" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview10"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="g6" />
<g
transform="translate(0,-1036.3622)"
id="g6">
<rect
style="fill:#8fb633"
width="16"
height="16"
x="-1052.36"
y="-16"
rx=".8"
ry=".8"
transform="matrix(0,-1,-1,0,0,0)"
id="rect2" />
</g>
</svg>
<?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"
width="16"
height="16"
version="1.1"
viewBox="0 0 16 16"
id="svg8"
sodipodi:docname="package-upgrade.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata14">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs12" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="792"
inkscape:window-height="480"
id="namedview10"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="g6" />
<g
transform="translate(0,-1036.3622)"
id="g6">
<rect
style="fill:#8fb633;fill-opacity:1"
width="16"
height="16"
x="-1052.36"
y="-16"
rx=".8"
ry=".8"
transform="matrix(0,-1,-1,0,0,0)"
id="rect2" />
<path
style="fill:#ffffff;fill-rule:evenodd"
d="m 7,1049.3622 0,-6 -2,0 3,-4 3,4 -2,0 0,6 z"
id="path4" />
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" version="1.1">
<defs>
<style id="current-color-scheme" type="text/css">
<?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"
width="24"
height="24"
version="1.1"
id="svg11"
sodipodi:docname="pamac-tray-update.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata15">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="792"
inkscape:window-height="480"
id="namedview13"
showgrid="false"
inkscape:zoom="9.8333333"
inkscape:cx="12"
inkscape:cy="12"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="g9" />
<defs
id="defs3">
<style
id="current-color-scheme"
type="text/css">
.ColorScheme-Text { color:#d3dae3; } .ColorScheme-Highlight { color:#5294e2; }
</style>
</defs>
<g>
<path style="fill:currentColor;fill-rule:evenodd" class="ColorScheme-Text" d="m 10,10 3,0 0,5 1,0 0,2 -4,0 0,-2 1,0 0,-3 -1,0 0,-2 z m 1,-3 2,0 0,2 -2,0 0,-2 z M 12,4 C 9.8519,5.9698 6.2346,7.7049 5,8 5,13.333 7.625,19.111 12,20 16.375,19.111 19,13.333 19,8 17.765,7.7049 14.148,5.9698 12,4 Z"/>
<circle style="fill:currentColor" class="ColorScheme-Highlight" cx="19" cy="19" r="2"/>
</g>
</defs>
<g
id="g9">
<path
style="fill:#dc0000;fill-rule:evenodd;fill-opacity:1"
class="ColorScheme-Text"
d="m 10,10 3,0 0,5 1,0 0,2 -4,0 0,-2 1,0 0,-3 -1,0 0,-2 z m 1,-3 2,0 0,2 -2,0 0,-2 z M 12,4 C 9.8519,5.9698 6.2346,7.7049 5,8 5,13.333 7.625,19.111 12,20 16.375,19.111 19,13.333 19,8 17.765,7.7049 14.148,5.9698 12,4 Z"
id="path5" />
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1">
<path style="fill:#b9b9b9" d="m8 1c-2.216 0-4 1.784-4 4v2h2v-2c0-1.108 0.892-2 2-2s2 0.892 2 2v2h2v-2c0-2.216-1.784-4-4-4z"/>
<rect style="fill:#9b9b9b" width="9" height="12" x="-16" y="-14" rx="1" ry="1" transform="matrix(0,-1,-1,0,0,0)"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
<rect style="fill:#e4e4e4" width="16" height="16" x="-16" y="-16" rx=".8" ry=".8" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="opacity:0.5;fill:#ac6f11" d="M 6.5976562 0 C 6.2666588 0 6 0.34239436 6 0.76757812 L 6 6 L 0.76757812 6 C 0.34239436 6 1.9001242e-17 6.2666588 0 6.5976562 L 0 9.4023438 C 0 9.7333412 0.34239436 10 0.76757812 10 L 6 10 L 6 15.232422 C 6 15.657606 6.2666588 16 6.5976562 16 L 9.4023438 16 C 9.7333412 16 10 15.657606 10 15.232422 L 10 10 L 15.232422 10 C 15.657606 10 16 9.7333412 16 9.4023438 L 16 6.5976562 C 16 6.2666588 15.657606 6 15.232422 6 L 10 6 L 10 0.76757812 C 10 0.34239436 9.7333412 1.9001242e-17 9.4023438 0 L 6.5976562 0 z"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" version="1">
<rect style="opacity:0.2" width="56" height="56" x="-61" y="-60" rx="3" ry="3" transform="matrix(0,-1,-1,0,0,0)"/>
<rect style="fill:#8bc34a" width="56" height="56" x="-60" y="-60" rx="3" ry="3" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="opacity:0.2" d="m 32,25 c -2.210666,0 -4,1.8 -4,4 v 8 c 0,2.2 1.79,4 4,4 2.21,0 4,-1.8 4,-4 v -8 c 0,-2.2 -1.789334,-4 -4,-4 z m 0,2 c 1.104,0 2,0.8 2,2 0,0.999998 -0.896,2 -2,2 -1.104,0 -2,-1.000002 -2,-2 0,-1.2 0.896,-2 2,-2 z m 0,6 c 1.10457,0 2,0.89543 2,2 v 2 c 0,1.10457 -0.89543,2 -2,2 -1.10457,0 -2,-0.89543 -2,-2 v -2 c 0,-1.10457 0.89543,-2 2,-2 z"/>
<path style="opacity:0.2;fill:#ffffff" d="M 7 4 C 5.338 4 4 5.338 4 7 L 4 8 C 4 6.338 5.338 5 7 5 L 57 5 C 58.662 5 60 6.338 60 8 L 60 7 C 60 5.338 58.662 4 57 4 L 7 4 z"/>
<path style="opacity:0.2" d="m 30,4 v 20 c 0,1.1 0.895,2 2,2 1.105,0 2,-0.9 2,-2 V 4 Z"/>
<path style="opacity:0.2" d="m 32,4 v 1 h 1 V 4 Z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 V 6 Z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 V 8 Z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m 0,1 h -1 z"/>
<path style="fill:#dddddd" d="m 31,4 v 1 h 1 V 4 Z m 0,2 v 1 h 1 V 6 Z m 0,2 v 1 h 1 V 8 Z m 0,2 v 1 h 1 v -1 z m 0,2 v 1 h 1 v -1 z m 0,2 v 1 h 1 v -1 z m 0,2 v 1 h 1 v -1 z"/>
<path style="opacity:0.2" d="m 31,18 h 1 c 0.04125,-0.367529 0,-1 0,-1 h -1 z m 1,0 v 1 h 1 v -1 z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m 0,1 h -1 v 1 h 1 z m 0,1 v 1 h 1 v -1 z m 0,1 h -1 c -0.1561,1.390912 1,1.390912 1,0 z"/>
<path style="fill:#dddddd" d="m 31,18 v 1 h 1 v -1 z m 0,2 v 1 h 1 v -1 z m 0,2 v 1 h 1 v -1 z m 0,2 v 1 h 1 v -1 z"/>
<path style="fill:#ffffff" d="m 32,24 c -2.210666,0 -4,1.8 -4,4 v 8 c 0,2.2 1.79,4 4,4 2.21,0 4,-1.8 4,-4 v -8 c 0,-2.2 -1.789334,-4 -4,-4 z m 0,2 c 1.104,0 2,0.8 2,2 0,0.999998 -0.896,2 -2,2 -1.104,0 -2,-1.000002 -2,-2 0,-1.2 0.896,-2 2,-2 z m 0,6 c 1.10457,0 2,0.89543 2,2 v 2 c 0,1.10457 -0.89543,2 -2,2 -1.10457,0 -2,-0.89543 -2,-2 v -2 c 0,-1.10457 0.89543,-2 2,-2 z"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
<g transform="translate(0,-1036.3622)">
<rect style="fill:#8fb633" width="16" height="16" x="-1052.36" y="-16" rx=".8" ry=".8" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="fill:#ffffff" d="m 12.900392,1039.8778 -5.6582045,5.6563 -2.828125,-2.8281 L 3,1044.12 l 2.828125,2.8281 1.4140625,1.4141 1.4140625,-1.4141 5.658203,-5.6562 -1.414061,-1.4141 z"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
<g transform="translate(0,-1036.3622)">
<rect style="fill:#3f83d6" width="16" height="16" x="-1052.36" y="-16" rx=".8" ry=".8" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="fill:#ffffff" d="m 5,1041.3622 0,1.9998 -0.5000001,0 c -0.277,0 -0.5,0.223 -0.5,0.5 l 0,5 c 0,0.277 0.223,0.5 0.5,0.5 l 7.0000001,0 c 0.277,0 0.5,-0.223 0.5,-0.5 l 0,-5 c 0,-0.277 -0.223,-0.5 -0.5,-0.5 l -0.5,0 0,-1.9998 c 0,-2 -1,-2 -2,-2 l -2,0 c -1,0 -2,0 -2,2 z m 4,0 0,2 -2,0 0,-2 z"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
<g transform="translate(0,-1036.3622)">
<rect style="fill:#3f83d6" width="16" height="16" x="-1052.36" y="-16" rx=".8" ry=".8" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="fill:#ffffff" d="m 12.900392,1039.8778 -5.6582045,5.6563 -2.828125,-2.8281 L 3,1044.12 l 2.828125,2.8281 1.4140625,1.4141 1.4140625,-1.4141 5.658203,-5.6562 -1.414061,-1.4141 z"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
<g transform="translate(0,-1036.3622)">
<rect style="fill:#835296" width="16" height="16" x="-1052.36" y="-16" rx=".8" ry=".8" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="fill:#ffffff;fill-rule:evenodd" d="m 7,1049.3622 0,-6 -2,0 3,-4 3,4 -2,0 0,6 z"/>
</g>
</svg>
......@@ -3,15 +3,6 @@
<gresource prefix="/org/manjaro/pamac/manager">
<file preprocess="xml-stripblanks">manager_window.ui</file>
<file preprocess="xml-stripblanks">history_dialog.ui</file>
<file preprocess="to-pixdata">package-available.svg</file>
<file preprocess="to-pixdata">package-available-locked.svg</file>
<file preprocess="to-pixdata">package-install.svg</file>
<file preprocess="to-pixdata">package-installed-locked.svg</file>
<file preprocess="to-pixdata">package-installed-updated.svg</file>
<file preprocess="to-pixdata">package-reinstall.svg</file>
<file preprocess="to-pixdata">package-remove.svg</file>
<file preprocess="to-pixdata">package-upgrade.svg</file>
<file preprocess="to-pixdata">package-generic.svg</file>
</gresource>
<gresource prefix="/org/manjaro/pamac/preferences">
<file preprocess="xml-stripblanks">preferences_dialog.ui</file>
......
......@@ -37,6 +37,7 @@ namespace Pamac {
[GtkTemplate (ui = "/org/manjaro/pamac/manager/manager_window.ui")]
class ManagerWindow : Gtk.ApplicationWindow {
// icons
Gtk.IconTheme icon_theme;
Gdk.Pixbuf? installed_icon;
Gdk.Pixbuf? uninstalled_icon;
Gdk.Pixbuf? to_install_icon;
......@@ -275,6 +276,8 @@ namespace Pamac {
if (filters_stack.visible_child_name == "updates") {
if (unlikely (temporary_ignorepkgs.contains (pkgname))) {
pixbuf = uninstalled_icon;
} else if (unlikely (transaction.transaction_summary.contains (pkgname))) {
pixbuf = installed_locked_icon;
} else {
pixbuf = to_upgrade_icon;
}
......@@ -323,6 +326,8 @@ namespace Pamac {
if (filters_stack.visible_child_name == "updates") {
if (unlikely (temporary_ignorepkgs.contains (pkgname))) {
pixbuf = uninstalled_icon;
} else if (unlikely (transaction.transaction_summary.contains (pkgname))) {
pixbuf = installed_locked_icon;
} else {
pixbuf = to_upgrade_icon;
}
......@@ -349,19 +354,10 @@ namespace Pamac {
});
aur_state_renderer.activated.connect (on_aur_state_icon_activated);
try {
installed_icon = new Gdk.Pixbuf.from_resource ("/org/manjaro/pamac/manager/package-installed-updated.svg");
uninstalled_icon = new Gdk.Pixbuf.from_resource ("/org/manjaro/pamac/manager/package-available.svg");
to_install_icon = new Gdk.Pixbuf.from_resource ("/org/manjaro/pamac/manager/package-install.svg");
to_reinstall_icon = new Gdk.Pixbuf.from_resource ("/org/manjaro/pamac/manager/package-reinstall.svg");
to_remove_icon = new Gdk.Pixbuf.from_resource ("/org/manjaro/pamac/manager/package-remove.svg");
to_upgrade_icon = new Gdk.Pixbuf.from_resource ("/org/manjaro/pamac/manager/package-upgrade.svg");
installed_locked_icon = new Gdk.Pixbuf.from_resource ("/org/manjaro/pamac/manager/package-installed-locked.svg");
available_locked_icon = new Gdk.Pixbuf.from_resource ("/org/manjaro/pamac/manager/package-available-locked.svg");
package_icon = new Gdk.Pixbuf.from_resource ("/org/manjaro/pamac/manager/package-generic.svg");
} catch (GLib.Error e) {
stderr.printf ("%s\n", e.message);
}
// icons
icon_theme = Gtk.IconTheme.get_default ();
icon_theme.changed.connect (update_icons);
update_icons ();
// database
database.get_updates_progress.connect (on_get_updates_progress);
......@@ -430,6 +426,23 @@ namespace Pamac {
}
}
void update_icons () {
icon_theme = Gtk.IconTheme.get_default ();
try {
installed_icon = icon_theme.load_icon ("package-installed-updated", 16, 0);
uninstalled_icon = icon_theme.load_icon ("package-available", 16, 0);
to_install_icon = icon_theme.load_icon ("package-install", 16, 0);
to_reinstall_icon = icon_theme.load_icon ("package-reinstall", 16, 0);
to_remove_icon = icon_theme.load_icon ("package-remove", 16, 0);
to_upgrade_icon = icon_theme.load_icon ("package-upgrade", 16, 0);
installed_locked_icon = icon_theme.load_icon ("package-installed-locked", 16, 0);
available_locked_icon = icon_theme.load_icon ("package-available-locked", 16, 0);
package_icon = icon_theme.load_icon ("package-x-generic", 64, 0);
} catch (GLib.Error e) {
stderr.printf ("%s\n", e.message);
}
}
[GtkCallback]
bool on_ManagerWindow_delete_event () {
if (transaction_running || sysupgrade_running || generate_mirrors_list) {
......
......@@ -45,6 +45,7 @@ namespace Pamac {
GLib.File lockfile;
FileMonitor monitor;
uint updates_nb;
Gtk.IconTheme icon_theme;
public TrayIcon () {
application_id = "org.manjaro.pamac.tray";
......@@ -265,6 +266,15 @@ namespace Pamac {
}
}
void on_icon_theme_changed () {
icon_theme = Gtk.IconTheme.get_default ();
if (updates_nb > 0) {
set_icon (update_icon_name);
} else {
set_icon (noupdate_icon_name);
}
}
public override void startup () {
// i18n
Intl.textdomain ("pamac");
......@@ -281,6 +291,8 @@ namespace Pamac {
extern_lock = false;
refresh_timeout_id = 0;
icon_theme = Gtk.IconTheme.get_default ();
icon_theme.changed.connect (on_icon_theme_changed);
init_status_icon ();
set_icon (noupdate_icon_name);
set_tooltip (noupdate_info);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment