[gnome-software: 2/6] Replace application-x-executable by a new icon




commit 14fb75d1d79ffebafff21ba557e8615162e1a266
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed Jul 28 12:26:53 2021 +0200

    Replace application-x-executable by a new icon
    
    This is more in line with the new component icons.
    
    The application and runtime icons look the same but have different names to
    avoid ambiguity in the code.

 data/icons/system-component-application.svg | 25 +++++++++++++++++++++++++
 lib/gs-plugin-loader.c                      |  2 +-
 plugins/flatpak/gs-flatpak.c                |  2 +-
 src/gnome-software.gresource.xml            |  1 +
 src/gs-app-row.c                            |  2 +-
 src/gs-details-page.c                       |  2 +-
 src/gs-summary-tile.c                       |  2 +-
 src/gs-update-dialog.c                      |  2 +-
 src/gs-update-dialog.ui                     |  2 +-
 9 files changed, 33 insertions(+), 7 deletions(-)
---
diff --git a/data/icons/system-component-application.svg b/data/icons/system-component-application.svg
new file mode 100644
index 000000000..32d31957c
--- /dev/null
+++ b/data/icons/system-component-application.svg
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+    <linearGradient id="a" gradientUnits="userSpaceOnUse" x1="8.157114" x2="122.745697" y1="77.241079" 
y2="77.241079">
+        <stop offset="0" stop-color="#99c1f1"/>
+        <stop offset="0.0575141" stop-color="#1a5fb4"/>
+        <stop offset="0.388232" stop-color="#1a5fb4"/>
+        <stop offset="0.473021" stop-color="#2b7be0"/>
+        <stop offset="0.618795" stop-color="#154d91"/>
+        <stop offset="0.953538" stop-color="#1a5fb4"/>
+        <stop offset="1" stop-color="#2f7fe1"/>
+    </linearGradient>
+    <clipPath id="b">
+        <path d="m 6 1 h 117 v 118 h -117 z m 0 0"/>
+    </clipPath>
+    <clipPath id="c">
+        <path d="m 70.335938 115.847656 l 50.097656 -50.097656 c 3.253906 -3.253906 3.253906 -8.53125 0 
-11.785156 l -50.097656 -50.101563 c -3.253907 -3.253906 -8.535157 -3.253906 -11.789063 0 l -50.097656 
50.101563 c -3.253907 3.253906 -3.253907 8.53125 0 11.785156 l 50.097656 50.097656 c 3.253906 3.257813 
8.535156 3.257813 11.789063 0 z m 0 0"/>
+    </clipPath>
+    <path d="m 70.40625 119.546875 l 50.207031 -50.207031 c 1.660157 -1.660156 2.574219 -3.839844 2.453125 
-6.003906 l -0.140625 -3.058594 l -52.519531 -52.953125 c -3.257812 -3.289063 -8.394531 -3.121094 -11.8125 0 
l -52.550781 52.996093 l -0.042969 3.144532 c -0.027344 2.125 0.761719 4.246094 2.390625 5.875 l 50.203125 
50.207031 c 3.273438 3.269531 8.542969 3.269531 11.8125 0 z m 0 0" fill="url(#a)"/>
+    <g clip-path="url(#b)">
+        <g clip-path="url(#c)">
+            <path d="m 70.335938 115.847656 l 50.097656 -50.097656 c 3.253906 -3.253906 3.253906 -8.53125 0 
-11.785156 l -50.097656 -50.101563 c -3.253907 -3.253906 -8.535157 -3.253906 -11.789063 0 l -50.097656 
50.101563 c -3.253907 3.253906 -3.253907 8.53125 0 11.785156 l 50.097656 50.097656 c 3.253906 3.257813 
8.535156 3.257813 11.789063 0 z m 0 0" fill="#62a0ea"/>
+        </g>
+    </g>
+    <path d="m 64.90625 30.5625 c -0.9375 0 -1.875 0.046875 -2.789062 0.132812 l -1.726563 8.898438 c 
-1.421875 0.3125 -2.816406 0.746094 -4.117187 1.328125 l -6.507813 -6.242187 c -1.652344 0.976562 -3.089844 
2.183593 -4.515625 3.453124 l 3.851562 8.101563 c -0.945312 1.058594 -1.804687 2.21875 -2.523437 3.453125 l 
-8.898437 -1.195312 c -0.753907 1.738281 -1.3125 3.554687 -1.726563 5.445312 l 7.835937 4.25 c -0.074218 
0.714844 -0.132812 1.390625 -0.132812 2.125 s 0.0625 1.410156 0.132812 2.125 l -7.835937 4.25 c 0.414063 
1.890625 0.972656 3.707031 1.726563 5.445312 l 8.898437 -1.195312 c 0.71875 1.230469 1.578125 2.394531 
2.523437 3.453125 l -3.851562 8.101563 c 1.425781 1.269531 2.863281 2.476562 4.515625 3.453124 l 6.507813 
-6.242187 c 1.300781 0.582031 2.695312 1.015625 4.117187 1.328125 l 1.726563 8.898438 c 0.914062 0.085937 
1.851562 0.132812 2.789062 0.132812 s 1.875 -0.046875 2.789062 -0.132812 l 1.726563 -8.898438 c 1.421875 
-0.3125 2.816406 -0.746094 4.117187 -1.328125 l 6
 .507813 6.242187 c 1.652344 -0.976562 3.089844 -2.183593 4.515625 -3.453124 l -3.851562 -8.101563 c 0.945312 
-1.058594 1.804687 -2.222656 2.523437 -3.453125 l 8.898437 1.195312 c 0.753907 -1.738281 1.3125 -3.554687 
1.726563 -5.445312 l -7.835937 -4.25 c 0.074218 -0.714844 0.132812 -1.390625 0.132812 -2.125 s -0.058594 
-1.410156 -0.132812 -2.125 l 7.835937 -4.25 c -0.414063 -1.890625 -0.972656 -3.707031 -1.726563 -5.445312 l 
-8.898437 1.195312 c -0.71875 -1.234375 -1.578125 -2.394531 -2.523437 -3.453125 l 3.851562 -8.101563 c 
-1.425781 -1.269531 -2.863281 -2.476562 -4.515625 -3.453124 l -6.507813 6.242187 c -1.300781 -0.582031 
-2.695312 -1.015625 -4.117187 -1.328125 l -1.726563 -8.898438 c -0.914062 -0.085937 -1.851562 -0.132812 
-2.789062 -0.132812 z m 0 17 c 7.042969 0 12.75 5.707031 12.75 12.75 s -5.707031 12.75 -12.75 12.75 s -12.75 
-5.707031 -12.75 -12.75 s 5.707031 -12.75 12.75 -12.75 z m 0 0" fill="#99c1f1"/>
+</svg>
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 474aad154..5f4f00eb5 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -3474,7 +3474,7 @@ gs_plugin_loader_process_thread_cb (GTask *task,
                                if (gs_app_has_quirk (app, GS_APP_QUIRK_HAS_SOURCE))
                                        icon_name = "x-package-repository";
                                else
-                                       icon_name = "application-x-executable";
+                                       icon_name = "system-component-application";
                                ic = g_themed_icon_new (icon_name);
                                gs_app_add_icon (app, ic);
                        }
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index d67069655..11e3b6300 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -3308,7 +3308,7 @@ gs_flatpak_file_to_app_bundle (GsFlatpak *self,
 
        /* Fallback */
        if (icon_data64 == NULL && icon_data128 == NULL) {
-               g_autoptr(GIcon) icon = g_themed_icon_new ("application-x-executable");
+               g_autoptr(GIcon) icon = g_themed_icon_new ("system-component-application");
                gs_app_add_icon (app, icon);
        }
 
diff --git a/src/gnome-software.gresource.xml b/src/gnome-software.gresource.xml
index 1e28134b4..6d6bf1eb0 100644
--- a/src/gnome-software.gresource.xml
+++ b/src/gnome-software.gresource.xml
@@ -44,6 +44,7 @@
   <file preprocess="xml-stripblanks">org.freedesktop.PackageKit.xml</file>
   <file>gtk-style.css</file>
   <file>gtk-style-hc.css</file>
+  <file preprocess="xml-stripblanks" 
alias="icons/scalable/apps/system-component-application.svg">../data/icons/system-component-application.svg</file>
   <file preprocess="xml-stripblanks" 
alias="icons/scalable/apps/system-component-codecs.svg">../data/icons/system-component-codecs.svg</file>
   <file preprocess="xml-stripblanks" 
alias="icons/scalable/apps/system-component-driver.svg">../data/icons/system-component-driver.svg</file>
   <file preprocess="xml-stripblanks" 
alias="icons/scalable/apps/system-component-firmware.svg">../data/icons/system-component-firmware.svg</file>
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 0fb1283a1..4b028bb0f 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -419,7 +419,7 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
        icon = gs_app_get_icon_for_size (priv->app,
                                         gtk_image_get_pixel_size (GTK_IMAGE (priv->image)),
                                         gtk_widget_get_scale_factor (priv->image),
-                                        "application-x-executable");
+                                        "system-component-application");
        gtk_image_set_from_gicon (GTK_IMAGE (priv->image), icon, GTK_ICON_SIZE_DIALOG);
 
        context = gtk_widget_get_style_context (priv->image);
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index b40ed8b83..e777b1699 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -983,7 +983,7 @@ gs_details_page_refresh_all (GsDetailsPage *self)
                icon = gs_app_get_icon_for_size (self->app,
                                                 icon_size,
                                                 gtk_widget_get_scale_factor (self->application_details_icon),
-                                                "application-x-executable");
+                                                "system-component-application");
        }
 
        gtk_image_set_pixel_size (GTK_IMAGE (self->application_details_icon), icon_size);
diff --git a/src/gs-summary-tile.c b/src/gs-summary-tile.c
index 8c222fb0b..c62eff266 100644
--- a/src/gs-summary-tile.c
+++ b/src/gs-summary-tile.c
@@ -62,7 +62,7 @@ gs_summary_tile_refresh (GsAppTile *self)
        icon = gs_app_get_icon_for_size (app,
                                         gtk_image_get_pixel_size (GTK_IMAGE (tile->image)),
                                         gtk_widget_get_scale_factor (tile->image),
-                                        "application-x-executable");
+                                        "system-component-application");
        gtk_image_set_from_gicon (GTK_IMAGE (tile->image), icon, GTK_ICON_SIZE_DIALOG);
 
        context = gtk_widget_get_style_context (tile->image);
diff --git a/src/gs-update-dialog.c b/src/gs-update-dialog.c
index 64e347273..05e81bb0f 100644
--- a/src/gs-update-dialog.c
+++ b/src/gs-update-dialog.c
@@ -212,7 +212,7 @@ set_updates_description_ui (GsUpdateDialog *dialog, GsApp *app)
                icon = gs_app_get_icon_for_size (app,
                                                 icon_size,
                                                 gtk_widget_get_scale_factor (dialog->image_icon),
-                                                "application-x-executable");
+                                                "system-component-application");
        }
 
        gtk_image_set_pixel_size (GTK_IMAGE (dialog->image_icon), icon_size);
diff --git a/src/gs-update-dialog.ui b/src/gs-update-dialog.ui
index cbf4102ce..bda300240 100644
--- a/src/gs-update-dialog.ui
+++ b/src/gs-update-dialog.ui
@@ -127,7 +127,7 @@
                       <object class="GtkImage" id="image_icon">
                         <property name="visible">True</property>
                         <property name="pixel_size">96</property>
-                        <property name="icon_name">application-x-executable</property>
+                        <property name="icon_name">system-component-application</property>
                         <property name="icon_size">0</property>
                         <style>
                           <class name="icon-dropshadow"/>


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