[gnome-software: 4/13] app-row: Set icons for various actions




commit e6be116163f4b6ecdbfcab21890decbd6d600385
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Thu Jun 24 12:14:16 2021 +0200

    app-row: Set icons for various actions

 data/icons/hicolor/meson.build                      | 2 ++
 data/icons/hicolor/symbolic/app-remove-symbolic.svg | 1 +
 src/gs-app-row.c                                    | 9 +++++++++
 3 files changed, 12 insertions(+)
---
diff --git a/data/icons/hicolor/meson.build b/data/icons/hicolor/meson.build
index 7e56ac19a..51838a15f 100644
--- a/data/icons/hicolor/meson.build
+++ b/data/icons/hicolor/meson.build
@@ -8,3 +8,5 @@ install_data('symbolic/org.gnome.Software-symbolic.svg',
              install_dir : 'share/icons/hicolor/symbolic/apps')
 install_data('scalable/software-installed-symbolic.svg',
              install_dir : 'share/icons/hicolor/scalable/status')
+install_data('symbolic/app-remove-symbolic.svg',
+             install_dir : 'share/icons/hicolor/scalable/actions')
diff --git a/data/icons/hicolor/symbolic/app-remove-symbolic.svg 
b/data/icons/hicolor/symbolic/app-remove-symbolic.svg
new file mode 100644
index 000000000..734827ec6
--- /dev/null
+++ b/data/icons/hicolor/symbolic/app-remove-symbolic.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"; width="16" height="16"><path d="M13 5v9H4V5H2v9c0 2 2 2 2 2h9c2 0 
2-2 2-2V5zM9 6H8v6h1zM7 6H6v6h1zm4 0h-1v6h1zm1-6c2 0 2 2 2 2h2v2H1V2h2c0-2 2-2 2-2zm0 1H5v1h7z" 
fill="#474747"/></svg>
\ No newline at end of file
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 8de0dbcae..4fe68b727 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -129,11 +129,13 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
                        /* TRANSLATORS: this is a button next to the search results that
                         * allows the application to be easily installed */
                        gs_progress_button_set_label (GS_PROGRESS_BUTTON (priv->button), _("Visit website"));
+                       gs_progress_button_set_icon_name (GS_PROGRESS_BUTTON (priv->button), NULL);
                } else {
                        /* TRANSLATORS: this is a button next to the search results that
                         * allows the application to be easily installed.
                         * The ellipsis indicates that further steps are required */
                        gs_progress_button_set_label (GS_PROGRESS_BUTTON (priv->button), _("Install…"));
+                       gs_progress_button_set_icon_name (GS_PROGRESS_BUTTON (priv->button), NULL);
                }
                break;
        case GS_APP_STATE_QUEUED_FOR_INSTALL:
@@ -141,6 +143,7 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
                /* TRANSLATORS: this is a button next to the search results that
                 * allows to cancel a queued install of the application */
                gs_progress_button_set_label (GS_PROGRESS_BUTTON (priv->button), _("Cancel"));
+               gs_progress_button_set_icon_name (GS_PROGRESS_BUTTON (priv->button), "edit-delete-symbolic");
                break;
        case GS_APP_STATE_AVAILABLE:
        case GS_APP_STATE_AVAILABLE_LOCAL:
@@ -148,6 +151,7 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
                /* TRANSLATORS: this is a button next to the search results that
                 * allows the application to be easily installed */
                gs_progress_button_set_label (GS_PROGRESS_BUTTON (priv->button), _("Install"));
+               gs_progress_button_set_icon_name (GS_PROGRESS_BUTTON (priv->button), "list-add-symbolic");
                break;
        case GS_APP_STATE_UPDATABLE_LIVE:
                gtk_widget_set_visible (priv->button, TRUE);
@@ -155,10 +159,12 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
                        /* TRANSLATORS: this is a button in the updates panel
                         * that allows the app to be easily updated live */
                        gs_progress_button_set_label (GS_PROGRESS_BUTTON (priv->button), _("Update"));
+                       gs_progress_button_set_icon_name (GS_PROGRESS_BUTTON (priv->button), 
"software-update-available-symbolic");
                } else {
                        /* TRANSLATORS: this is a button next to the search results that
                         * allows the application to be easily removed */
                        gs_progress_button_set_label (GS_PROGRESS_BUTTON (priv->button), _("Uninstall"));
+                       gs_progress_button_set_icon_name (GS_PROGRESS_BUTTON (priv->button), 
"app-remove-symbolic");
                }
                break;
        case GS_APP_STATE_UPDATABLE:
@@ -168,18 +174,21 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
                /* TRANSLATORS: this is a button next to the search results that
                 * allows the application to be easily removed */
                gs_progress_button_set_label (GS_PROGRESS_BUTTON (priv->button), _("Uninstall"));
+               gs_progress_button_set_icon_name (GS_PROGRESS_BUTTON (priv->button), "app-remove-symbolic");
                break;
        case GS_APP_STATE_INSTALLING:
                gtk_widget_set_visible (priv->button, TRUE);
                /* TRANSLATORS: this is a button next to the search results that
                 * shows the status of an application being installed */
                gs_progress_button_set_label (GS_PROGRESS_BUTTON (priv->button), _("Installing"));
+               gs_progress_button_set_icon_name (GS_PROGRESS_BUTTON (priv->button), NULL);
                break;
        case GS_APP_STATE_REMOVING:
                gtk_widget_set_visible (priv->button, TRUE);
                /* TRANSLATORS: this is a button next to the search results that
                 * shows the status of an application being erased */
                gs_progress_button_set_label (GS_PROGRESS_BUTTON (priv->button), _("Uninstalling"));
+               gs_progress_button_set_icon_name (GS_PROGRESS_BUTTON (priv->button), NULL);
                break;
        default:
                break;


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