[gnome-shell] extensionPrefs: Add application icon



commit 679fc20765d7614aeac13c6e0b342266ffa29ca9
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jan 24 18:09:34 2020 +0100

    extensionPrefs: Add application icon
    
    We are about to make the tool a user-visible application, so we
    need an icon. Add one (plus its symbolic variant).
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968

 data/gnome-shell-extension-prefs.desktop.in.in                     | 1 +
 data/icons/hicolor/scalable/apps/org.gnome.Extensions.svg          | 7 +++++++
 data/icons/hicolor/symbolic/apps/org.gnome.Extensions-symbolic.svg | 1 +
 data/icons/meson.build                                             | 1 +
 data/meson.build                                                   | 1 +
 js/extensionPrefs/ui/extensions-window.ui                          | 2 +-
 meson.build                                                        | 1 +
 meson/postinstall.py                                               | 6 ++++++
 8 files changed, 19 insertions(+), 1 deletion(-)
---
diff --git a/data/gnome-shell-extension-prefs.desktop.in.in b/data/gnome-shell-extension-prefs.desktop.in.in
index 6920487439..6460c707b3 100644
--- a/data/gnome-shell-extension-prefs.desktop.in.in
+++ b/data/gnome-shell-extension-prefs.desktop.in.in
@@ -1,6 +1,7 @@
 [Desktop Entry]
 Type=Application
 Name=Shell Extensions
+Icon=org.gnome.Extensions
 Comment=Configure GNOME Shell Extensions
 Exec=@bindir@/gnome-shell-extension-prefs %u
 Categories=GNOME;GTK;
diff --git a/data/icons/hicolor/scalable/apps/org.gnome.Extensions.svg 
b/data/icons/hicolor/scalable/apps/org.gnome.Extensions.svg
new file mode 100644
index 0000000000..49d63888b1
--- /dev/null
+++ b/data/icons/hicolor/scalable/apps/org.gnome.Extensions.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; width="128px" 
height="128px" viewBox="0 0 128 128" version="1.1">
+<g id="surface43907">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(10.196079%,37.254903%,70.588237%);fill-opacity:1;" d="M 
58.847656 15.683594 L 49.074219 30.632812 C 46.921875 33.84375 42.480469 36.65625 39.378906 35.300781 C 
34.488281 33.164062 35.859375 28.144531 31.28125 25.292969 C 28.070312 23.292969 16.839844 20.449219 
14.804688 27.644531 C 13.761719 31.339844 14.480469 37.410156 17.398438 41.019531 C 20.164062 44.441406 
26.8125 43.355469 28.898438 47.230469 C 30.34375 49.925781 29.738281 51.628906 28.347656 54.351562 C 
26.796875 57.375 22.839844 61.359375 19.265625 64.585938 C 17.480469 66.199219 13.273438 65.710938 12.03125 
66.730469 C 11.753906 66.949219 12.511719 70.285156 12.511719 70.285156 C 12.511719 70.285156 19.90625 
82.707031 25.539062 87.285156 C 27.773438 89.101562 30.089844 91.808594 32.742188 90.695312 C 36.035156 
89.316406 35.304688 82.289062 37.644531 79.597656 C 41.976562 74.605469 50.292969 73.761719 55.582031 
78.144531 C 61.277344 82.867188 60.882812 89.472656 5
 7.941406
  94.683594 C 55.175781 99.578125 49.472656 98.453125 47.484375 102.28125 C 46.730469 103.730469 47.578125 
105.664062 48.765625 106.785156 C 54.628906 112.335938 71.210938 118.988281 71.210938 118.988281 L 81.605469 
102.429688 C 83.757812 99.222656 86.707031 97.742188 90.011719 98.46875 C 94.605469 99.472656 95.160156 
105.945312 98.914062 108.785156 C 103.195312 112.019531 110.546875 111.765625 114.351562 105.753906 C 
117.128906 101.371094 116.761719 97.449219 113.765625 91.414062 C 111.808594 87.476562 103.253906 89.382812 
101.171875 85.507812 C 99.722656 82.8125 99.992188 80.214844 101.859375 77.796875 C 106.332031 72 117.003906 
62.699219 117.003906 62.699219 C 117.003906 62.699219 117.144531 60.824219 116.246094 59.363281 C 115.15625 
57.589844 107.472656 49.273438 104.65625 46.984375 C 102.421875 45.167969 99.6875 41.921875 97.03125 
43.035156 C 93.742188 44.414062 94.417969 51.058594 92.082031 53.753906 C 86.5 60.179688 78.4375 59.101562 
73.914062 54.648438 C 68.644531 49.
 453125 6
 8.511719 44.488281 71.453125 39.277344 C 74.222656 34.382812 79.921875 35.3125 81.910156 31.484375 C 
82.664062 30.035156 81.484375 27.070312 80.597656 25.390625 C 79.277344 22.890625 65.976562 18.902344 
58.847656 15.683594 Z M 58.847656 15.683594 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(20.784314%,51.764709%,89.411765%);fill-opacity:1;" d="M 
58.089844 12.347656 L 48.316406 27.300781 C 46.164062 30.507812 41.726562 33.320312 38.625 31.964844 C 
33.734375 29.828125 35.101562 24.808594 30.523438 21.960938 C 27.3125 19.957031 19.445312 19.160156 15.683594 
25.625 C 13.730469 28.976562 13.722656 34.074219 16.644531 37.6875 C 19.410156 41.105469 26.058594 40.023438 
28.140625 43.898438 C 29.589844 46.589844 28.984375 48.292969 27.589844 51.015625 C 24.492188 57.066406 
11.753906 66.949219 11.753906 66.949219 C 11.753906 66.949219 19.148438 79.371094 24.785156 83.949219 C 
27.019531 85.765625 29.332031 88.472656 31.988281 87.363281 C 35.277344 85.984375 34.550781 78.957031 
36.886719 76.261719 C 41.21875 71.273438 49.535156 70.425781 54.824219 74.8125 C 60.519531 79.53125 60.125 
86.140625 57.183594 91.347656 C 54.417969 96.242188 48.714844 95.117188 46.726562 98.949219 C 45.976562 
100.398438 46.824219 102.328125 48.01
 1719 103
 .449219 C 53.871094 109 70.457031 115.652344 70.457031 115.652344 L 80.847656 99.097656 C 83 95.886719 
85.953125 94.40625 89.257812 95.132812 C 93.847656 96.140625 94.402344 102.609375 98.160156 105.449219 C 
102.4375 108.683594 109.789062 108.433594 113.597656 102.421875 C 116.375 98.035156 116.152344 94.195312 
112.175781 89.128906 C 109.460938 85.667969 102.496094 86.046875 100.414062 82.171875 C 98.96875 79.480469 
99.234375 76.878906 101.101562 74.460938 C 105.578125 68.667969 116.246094 59.363281 116.246094 59.363281 C 
116.246094 59.363281 109.535156 48.226562 103.898438 43.648438 C 101.664062 41.835938 98.929688 38.585938 
96.277344 39.699219 C 92.988281 41.078125 93.660156 47.726562 91.324219 50.417969 C 85.746094 56.84375 
77.679688 55.769531 73.15625 51.3125 C 67.886719 46.121094 67.757812 41.152344 70.699219 35.945312 C 
73.464844 31.046875 79.164062 31.980469 81.152344 28.148438 C 81.90625 26.699219 80.066406 24.476562 
78.878906 23.355469 C 73.015625 17.804688 58.08984
 4 12.347
 656 58.089844 12.347656 Z M 58.089844 12.347656 "/>
+</g>
+</svg>
diff --git a/data/icons/hicolor/symbolic/apps/org.gnome.Extensions-symbolic.svg 
b/data/icons/hicolor/symbolic/apps/org.gnome.Extensions-symbolic.svg
new file mode 100644
index 0000000000..43786ff4a8
--- /dev/null
+++ b/data/icons/hicolor/symbolic/apps/org.gnome.Extensions-symbolic.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"; width="16" height="16"><path d="M6.5 1C5.669 1 5 1.669 5 
2.5V4H2c-.554 0-1 .446-1 1v3h1.5C3.331 8 4 8.669 4 9.5S3.331 11 2.5 11H1v3c0 .554.446 1 1 
1h3v-1.5c0-.831.669-1.5 1.5-1.5s1.5.669 1.5 1.5V15h3c.554 0 1-.446 1-1v-3h1.5c.831 0 1.5-.669 1.5-1.5S14.331 
8 13.5 8H12V5c0-.554-.446-1-1-1H8V2.5C8 1.669 7.331 1 6.5 1z" 
style="isolation:auto;mix-blend-mode:normal;marker:none" color="#000" overflow="visible" 
fill="#474747"/></svg>
\ No newline at end of file
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 0000000000..eff6e4b530
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1 @@
+install_subdir('hicolor', install_dir: icondir)
diff --git a/data/meson.build b/data/meson.build
index ee4b1abbf9..1a3ed77c7e 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -43,6 +43,7 @@ endforeach
 
 
 subdir('dbus-interfaces')
+subdir('icons')
 subdir('theme')
 
 data_resources = [
diff --git a/js/extensionPrefs/ui/extensions-window.ui b/js/extensionPrefs/ui/extensions-window.ui
index 7305a03ee4..4ac68b9d28 100644
--- a/js/extensionPrefs/ui/extensions-window.ui
+++ b/js/extensionPrefs/ui/extensions-window.ui
@@ -66,7 +66,7 @@
               <object class="GtkImage">
                 <property name="visible">True</property>
                 <property name="pixel_size">96</property>
-                <property name="icon_name">application-x-addon-symbolic</property>
+                <property name="icon_name">org.gnome.Extensions-symbolic</property>
               </object>
             </child>
             <child>
diff --git a/meson.build b/meson.build
index 1ee2107036..7423e3012b 100644
--- a/meson.build
+++ b/meson.build
@@ -55,6 +55,7 @@ pkglibdir = join_paths(libdir, meson.project_name())
 autostartdir = join_paths(sysconfdir, 'xdg', 'autostart')
 convertdir = join_paths(datadir, 'GConf', 'gsettings')
 desktopdir = join_paths(datadir, 'applications')
+icondir = join_paths(datadir, 'icons')
 ifacedir = join_paths(datadir, 'dbus-1', 'interfaces')
 localedir = join_paths(datadir, 'locale')
 portaldir = join_paths(datadir, 'xdg-desktop-portal', 'portals')
diff --git a/meson/postinstall.py b/meson/postinstall.py
index 528739149b..81afb18b77 100755
--- a/meson/postinstall.py
+++ b/meson/postinstall.py
@@ -8,6 +8,12 @@ datadir = os.path.join(prefix, 'share')
 
 # Packaging tools define DESTDIR and this isn't needed for them
 if 'DESTDIR' not in os.environ:
+    print('Updating icon cache...')
+    icon_cache_dir = os.path.join(datadir, 'icons', 'hicolor')
+    if not os.path.exists(icon_cache_dir):
+        os.makedirs(icon_cache_dir)
+    subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir])
+
     print('Updating desktop database...')
     desktop_database_dir = os.path.join(datadir, 'applications')
     if not os.path.exists(desktop_database_dir):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]