aports/community/avizo/unbundle-images.patch

66 lines
2.2 KiB
Diff

From: Jakub Jirutka <jakub@jirutka.cz>
Date: Fri, 7 Jan 2022 21:32:41 +0100
Subject: [PATCH] Unbundle images and install them to /usr/share/avizo
Bundling images into executable is nasty and inefficient.
--- a/avizo.gresource.xml
+++ b/avizo.gresource.xml
@@ -2,16 +2,5 @@
<gresources>
<gresource prefix="/org/danb/avizo">
<file preprocess="xml-stripblanks">ui/avizo.ui</file>
-
- <file preprocess="to-pixdata">data/images/volume_muted.png</file>
- <file preprocess="to-pixdata">data/images/volume_low.png</file>
- <file preprocess="to-pixdata">data/images/volume_medium.png</file>
- <file preprocess="to-pixdata">data/images/volume_high.png</file>
- <file preprocess="to-pixdata">data/images/mic_muted.png</file>
- <file preprocess="to-pixdata">data/images/mic_unmuted.png</file>
-
- <file preprocess="to-pixdata">data/images/brightness_low.png</file>
- <file preprocess="to-pixdata">data/images/brightness_medium.png</file>
- <file preprocess="to-pixdata">data/images/brightness_high.png</file>
</gresource>
</gresources>
--- a/data/meson.build
+++ b/data/meson.build
@@ -0,0 +1,14 @@
+png_images = files(
+ 'images/brightness_high.png',
+ 'images/brightness_low.png',
+ 'images/brightness_medium.png',
+ 'images/brightness.png',
+ 'images/mic_muted.png',
+ 'images/mic_unmuted.png',
+ 'images/volume_high.png',
+ 'images/volume_low.png',
+ 'images/volume_medium.png',
+ 'images/volume_muted.png',
+)
+
+install_data(png_images, install_dir: 'share/avizo')
--- a/src/avizo_client.vala
+++ b/src/avizo_client.vala
@@ -149,7 +149,8 @@
}
else
{
- _service.image_resource = _image_resource;
+ // XXX-Patched: don't bundle images into avizo-service binary
+ _service.image_path = @"/usr/share/avizo/$(_image_resource).png";
}
_service.image_opacity = _image_opacity;
--- a/src/avizo_service.vala
+++ b/src/avizo_service.vala
@@ -185,7 +185,7 @@
};
public string image_path { get; set; default = ""; }
- public string image_resource { get; set; default = "volume_muted"; }
+ public string image_resource { get; set; default = ""; }
public double image_opacity { get; set; default = 1.0; }
public double progress { get; set; default = 0.0; }
public int width { get; set; default = 248; }