Merge branch 'appicons'
Conflicts: rpm_spec/core-vm.spec
This commit is contained in:
commit
3cc9d0f329
1
Makefile
1
Makefile
@ -143,6 +143,7 @@ install-vm:
|
||||
install -m 0644 qubes-rpc/qubes.DetachPciDevice $(DESTDIR)/etc/qubes-rpc
|
||||
install -m 0644 qubes-rpc/qubes.{Backup,Restore} $(DESTDIR)/etc/qubes-rpc
|
||||
install -m 0644 qubes-rpc/qubes.Select{File,Directory} $(DESTDIR)/etc/qubes-rpc
|
||||
install -m 0644 qubes-rpc/qubes.GetImageRGBA $(DESTDIR)/etc/qubes-rpc
|
||||
|
||||
install -d $(DESTDIR)/usr/share/file-manager/actions
|
||||
install -m 0644 qubes-rpc/*-gnome.desktop $(DESTDIR)/usr/share/file-manager/actions
|
||||
|
39
qubes-rpc/qubes.GetImageRGBA
Normal file
39
qubes-rpc/qubes.GetImageRGBA
Normal file
@ -0,0 +1,39 @@
|
||||
set -e
|
||||
read filename
|
||||
|
||||
if [[ "${filename}" = xdgicon:* ]]; then
|
||||
# get biggest icon from hicolor theme
|
||||
|
||||
filename="${filename#*:}.png"
|
||||
candidate=
|
||||
for dir in /usr/share/icons/{hicolor/,}; do
|
||||
candidate=$(find -L "${dir}" -type f -name "${filename}")
|
||||
if [[ -n "${candidate}" ]]; then
|
||||
candidate=$(echo "${candidate}" | xargs ls --sort=size | head -1)
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
[[ -n "${candidate}" ]]
|
||||
filename="${candidate}"
|
||||
|
||||
elif [[ "${filename}" = "-" ]] || [[ "${filename}" = *":-" ]]; then
|
||||
tmpfile="$(mktemp /tmp/qimg-XXXXXXXX)"
|
||||
cat > "${tmpfile}"
|
||||
if [[ "$filename" = *":-" ]]; then
|
||||
tmpfile="${filename%:*}:${tmpfile}"
|
||||
fi
|
||||
filename="${tmpfile}"
|
||||
|
||||
elif ! [[ -r "${filename}" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# identify in F18 (6.7) adds implicit '\n' to format,
|
||||
# whereas identify in F20 (6.8) does not
|
||||
identify -format '%w %h\n' "$filename" | sed -e '/^$/d'
|
||||
convert -depth 8 "$filename" rgba:-
|
||||
|
||||
[[ -n "${tmpfile}" ]] && rm -f ${tmpfile} || true
|
||||
|
||||
# vim: ft=sh ts=4 sw=4 et
|
@ -52,6 +52,7 @@ Requires: qubes-utils
|
||||
# gpk-update-viewer required by qubes-manager
|
||||
Requires: gnome-packagekit-updater
|
||||
%endif
|
||||
Requires: ImageMagick
|
||||
Provides: qubes-core-vm
|
||||
Obsoletes: qubes-core-commonvm
|
||||
Obsoletes: qubes-core-appvm
|
||||
@ -299,6 +300,7 @@ rm -f %{name}-%{version}
|
||||
/etc/qubes-rpc/qubes.Restore
|
||||
/etc/qubes-rpc/qubes.SelectFile
|
||||
/etc/qubes-rpc/qubes.SelectDirectory
|
||||
/etc/qubes-rpc/qubes.GetImageRGBA
|
||||
/etc/sudoers.d/qubes
|
||||
%config(noreplace) /etc/sysconfig/iptables
|
||||
%config(noreplace) /etc/sysconfig/ip6tables
|
||||
|
Loading…
Reference in New Issue
Block a user