[gnome-control-center] info-overview-panel: Use the external link icon for the updates link



commit d548309f3462dab791fe020115828f18b8c649f5
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue May 10 08:47:53 2022 +0200

    info-overview-panel: Use the external link icon for the updates link
    
    This makes it explicit it opens another application to perform the
    action.

 panels/info-overview/cc-info-overview-panel.c  |  8 ++++----
 panels/info-overview/cc-info-overview-panel.ui | 10 ++++++++--
 shell/gnome-control-center.gresource.xml       |  1 +
 shell/icons/external-link-symbolic.svg         |  2 ++
 4 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/panels/info-overview/cc-info-overview-panel.c b/panels/info-overview/cc-info-overview-panel.c
index acb7884f2..31b74d223 100644
--- a/panels/info-overview/cc-info-overview-panel.c
+++ b/panels/info-overview/cc-info-overview-panel.c
@@ -71,7 +71,7 @@ struct _CcInfoOverviewPanel
   CcListRow       *os_name_row;
   CcListRow       *os_type_row;
   CcListRow       *processor_row;
-  CcListRow       *software_updates_row;
+  AdwActionRow    *software_updates_row;
   CcListRow       *virtualization_row;
   CcListRow       *windowing_system_row;
 };
@@ -868,12 +868,12 @@ open_hostname_edit_dialog (CcInfoOverviewPanel *self)
 
 static void
 cc_info_panel_row_activated_cb (CcInfoOverviewPanel *self,
-                                CcListRow           *row)
+                                AdwActionRow        *row)
 {
   g_assert (CC_IS_INFO_OVERVIEW_PANEL (self));
-  g_assert (CC_IS_LIST_ROW (row));
+  g_assert (ADW_IS_ACTION_ROW (row));
 
-  if (row == self->hostname_row)
+  if (row == ADW_ACTION_ROW (self->hostname_row))
     open_hostname_edit_dialog (self);
   else if (row == self->software_updates_row)
     open_software_update (self);
diff --git a/panels/info-overview/cc-info-overview-panel.ui b/panels/info-overview/cc-info-overview-panel.ui
index 9b823cb3c..265f9e967 100644
--- a/panels/info-overview/cc-info-overview-panel.ui
+++ b/panels/info-overview/cc-info-overview-panel.ui
@@ -136,10 +136,16 @@
 
             <!-- Software Updates -->
             <child>
-              <object class="CcListRow" id="software_updates_row">
+              <object class="AdwActionRow" id="software_updates_row">
+                <property name="activatable">True</property>
                 <property name="title" translatable="yes">Software Updates</property>
-                <property name="show-arrow">True</property>
                 <signal name="activated" handler="cc_info_panel_row_activated_cb" swapped="yes"/>
+                <child type="suffix">
+                  <object class="GtkImage">
+                    <property name="valign">center</property>
+                    <property name="icon-name">external-link-symbolic</property>
+                  </object>
+                </child>
               </object>
             </child>
 
diff --git a/shell/gnome-control-center.gresource.xml b/shell/gnome-control-center.gresource.xml
index ec1feae1e..13c061108 100644
--- a/shell/gnome-control-center.gresource.xml
+++ b/shell/gnome-control-center.gresource.xml
@@ -10,6 +10,7 @@
 
   <!-- Panel icons -->
   <gresource prefix="/org/gnome/Settings">
+    <file preprocess="xml-stripblanks">icons/external-link-symbolic.svg</file>
     <file preprocess="xml-stripblanks">icons/multitasking-symbolic.svg</file>
     <file>style.css</file>
   </gresource>
diff --git a/shell/icons/external-link-symbolic.svg b/shell/icons/external-link-symbolic.svg
new file mode 100644
index 000000000..a24ed4b05
--- /dev/null
+++ b/shell/icons/external-link-symbolic.svg
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"; height="16px" viewBox="0 0 16 16" width="16px"><g 
fill="#2e3436"><path d="m 2 3 v 11 h 11 v -4 h -2 v 2 h -7 v -7 h 2 v -2 z m 0 0"/><path d="m 9 2 c -0.550781 
0 -1 0.449219 -1 1 s 0.449219 1 1 1 h 3 v 3 c 0 0.550781 0.449219 1 1 1 s 1 -0.449219 1 -1 v -4 c 0 -0.550781 
-0.449219 -1 -1 -1 z m 0 0"/><path d="m 13 2 h 1 v 1 h -1 z m 0 0"/><path d="m 12.292969 2.289062 l -4.5 
4.46875 c -0.390625 0.390626 -0.390625 1.027344 0 1.414063 c 0.390625 0.394531 1.023437 0.394531 1.414062 
0.007813 l 4.5 -4.46875 c 0.390625 -0.390626 0.390625 -1.027344 0 -1.414063 c -0.386719 -0.394531 -1.019531 
-0.394531 -1.414062 -0.007813 z m 0 0"/><path d="m 13 7 h 1 v 1 h -1 z m 0 0"/><path d="m 8 2 h 1 v 1 h -1 z 
m 0 0"/></g></svg>


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