[gnome-software/1554-more-informative-os-updates-row] updates: More informative 'OS Updates' row
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1554-more-informative-os-updates-row] updates: More informative 'OS Updates' row
- Date: Tue, 7 Dec 2021 07:28:25 +0000 (UTC)
commit 2ef6525dfc89a1b2defa46c8ce65622a7f9c8b34
Author: Milan Crha <mcrha redhat com>
Date: Mon Dec 6 15:36:35 2021 +0100
updates: More informative 'OS Updates' row
This covers three changes:
* rename the "OS Updates" to the "System Updates"
* change the summary of the update
* show the summary in the app row of the Updates page
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1554
plugins/core/gs-plugin-generic-updates.c | 6 +++---
plugins/dummy/gs-self-test.c | 4 ++--
src/gs-app-row.c | 9 +++++++++
src/gs-app-row.ui | 20 ++++++++++++++++++++
src/gs-common.c | 2 +-
src/gs-update-monitor.c | 8 ++++----
src/gs-updates-page.c | 3 +--
src/gs-updates-page.ui | 2 +-
8 files changed, 41 insertions(+), 13 deletions(-)
---
diff --git a/plugins/core/gs-plugin-generic-updates.c b/plugins/core/gs-plugin-generic-updates.c
index c92130590..bef94d77c 100644
--- a/plugins/core/gs-plugin-generic-updates.c
+++ b/plugins/core/gs-plugin-generic-updates.c
@@ -64,12 +64,12 @@ gs_plugin_generic_updates_get_os_update (GsPlugin *plugin)
GS_APP_QUALITY_NORMAL,
/* TRANSLATORS: this is a group of updates that are not
* packages and are not shown in the main list */
- _("OS Updates"));
+ _("System Updates"));
gs_app_set_summary (app,
GS_APP_QUALITY_NORMAL,
/* TRANSLATORS: this is a longer description of the
- * "OS Updates" string */
- _("Includes performance, stability and security improvements."));
+ * "System Updates" string */
+ _("General system updates, such as security or bug fixes, and performance
improvements."));
gs_app_set_description (app,
GS_APP_QUALITY_NORMAL,
gs_app_get_summary (app));
diff --git a/plugins/dummy/gs-self-test.c b/plugins/dummy/gs-self-test.c
index cda6bc445..509622427 100644
--- a/plugins/dummy/gs-self-test.c
+++ b/plugins/dummy/gs-self-test.c
@@ -285,8 +285,8 @@ gs_plugins_dummy_updates_func (GsPluginLoader *plugin_loader)
/* get the virtual non-apps OS update */
app = gs_app_list_index (list, 2);
g_assert_cmpstr (gs_app_get_id (app), ==, "org.gnome.Software.OsUpdate");
- g_assert_cmpstr (gs_app_get_name (app), ==, "OS Updates");
- g_assert_cmpstr (gs_app_get_summary (app), ==, "Includes performance, stability and security
improvements.");
+ g_assert_cmpstr (gs_app_get_name (app), ==, "System Updates");
+ g_assert_cmpstr (gs_app_get_summary (app), ==, "General system updates, such as security or bug
fixes, and performance improvements.");
g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_GENERIC);
g_assert_cmpint (gs_app_get_special_kind (app), ==, GS_APP_SPECIAL_KIND_OS_UPDATE);
g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE);
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 03abfdd7a..b35432557 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -28,6 +28,7 @@ typedef struct
GtkWidget *version_current_label;
GtkWidget *version_arrow_label;
GtkWidget *version_update_label;
+ GtkWidget *system_updates_label; /* Only for "System Updates" app */
GtkWidget *star;
GtkWidget *description_box;
GtkWidget *description_label;
@@ -415,6 +416,13 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
}
}
+ if (priv->show_update && gs_app_get_special_kind (priv->app) == GS_APP_SPECIAL_KIND_OS_UPDATE) {
+ gtk_label_set_label (GTK_LABEL (priv->system_updates_label), gs_app_get_summary (priv->app));
+ gtk_widget_show (priv->system_updates_label);
+ } else {
+ gtk_widget_hide (priv->system_updates_label);
+ }
+
/* pixbuf */
icon = gs_app_get_icon_for_size (priv->app,
gtk_image_get_pixel_size (GTK_IMAGE (priv->image)),
@@ -816,6 +824,7 @@ gs_app_row_class_init (GsAppRowClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, version_current_label);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, version_arrow_label);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, version_update_label);
+ gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, system_updates_label);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, star);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, description_box);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, description_label);
diff --git a/src/gs-app-row.ui b/src/gs-app-row.ui
index fba8c1113..8625acf18 100644
--- a/src/gs-app-row.ui
+++ b/src/gs-app-row.ui
@@ -68,6 +68,26 @@
</child>
</object>
</child>
+ <child>
+ <object class="GtkBox" id="system_updates_box">
+ <property name="orientation">horizontal</property>
+ <property name="spacing">4</property>
+ <property name="hexpand">True</property>
+ <property name="visible" bind-source="system_updates_label" bind-property="visible"
bind-flags="sync-create"/>
+ <child>
+ <object class="GtkLabel" id="system_updates_label">
+ <property name="hexpand">True</property>
+ <property name="visible">False</property>
+ <property name="xalign">0.0</property>
+ <property name="yalign">0.5</property>
+ <property name="wrap">True</property>
+ <property name="wrap-mode">word-char</property>
+ <property name="ellipsize">end</property>
+ <property name="lines">2</property>
+ </object>
+ </child>
+ </object>
+ </child>
<child>
<object class="GtkLabel" id="label_app_size">
<property name="halign">start</property>
diff --git a/src/gs-common.c b/src/gs-common.c
index 8ef7d5932..af56c4428 100644
--- a/src/gs-common.c
+++ b/src/gs-common.c
@@ -143,7 +143,7 @@ gs_app_notify_installed (GsApp *app)
gs_app_get_special_kind (app) == GS_APP_SPECIAL_KIND_OS_UPDATE) {
/* TRANSLATORS: this is the summary of a notification that OS updates
* have been successfully installed */
- summary = g_strdup (_("OS updates are now installed"));
+ summary = g_strdup (_("System updates are now installed"));
/* TRANSLATORS: this is the body of a notification that OS updates
* have been successfully installed */
body = _("Recently installed updates are available to review");
diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c
index 7e673790f..c58a1da8f 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -652,7 +652,7 @@ get_system_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
if (gs_app_get_state (app) != GS_APP_STATE_UNAVAILABLE)
return;
- /* TRANSLATORS: this is when the current OS version goes end-of-life */
+ /* TRANSLATORS: this is when the current operating system version goes end-of-life */
n = g_notification_new (_("Operating System Updates Unavailable"));
/* TRANSLATORS: this is the message dialog for the distro EOL notice */
g_notification_set_body (n, _("Upgrade to continue receiving security updates."));
@@ -1113,7 +1113,7 @@ get_updates_historical_cb (GObject *object, GAsyncResult *res, gpointer data)
/* TRANSLATORS: title when we offline updates have failed */
notification = g_notification_new (_("Software Updates Failed"));
/* TRANSLATORS: message when we offline updates have failed */
- g_notification_set_body (notification, _("An important OS update failed to be installed."));
+ g_notification_set_body (notification, _("An important operating system update failed to be
installed."));
g_notification_add_button (notification, _("Show Details"), "app.show-offline-update-error");
g_notification_set_default_action (notification, "app.show-offline-update-error");
g_application_send_notification (monitor->application, "offline-updates", notification);
@@ -1152,8 +1152,8 @@ get_updates_historical_cb (GObject *object, GAsyncResult *res, gpointer data)
"Software Updates Installed",
gs_app_list_length (apps));
/* TRANSLATORS: message when we've done offline updates */
- message = ngettext ("An important OS update has been installed.",
- "Important OS updates have been installed.",
+ message = ngettext ("An important operating system update has been installed.",
+ "Important operating system updates have been installed.",
gs_app_list_length (apps));
notification = g_notification_new (title);
diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
index a1fc5816d..339568a75 100644
--- a/src/gs-updates-page.c
+++ b/src/gs-updates-page.c
@@ -574,8 +574,7 @@ gs_updates_page_refine_system_finished_cb (GObject *source_object,
gs_app_get_name (app),
gs_app_get_version (app));
} else {
- /* TRANSLATORS: OS refers to operating system, e.g. Fedora */
- g_string_append (str, _("Your OS is no longer supported."));
+ g_string_append (str, _("Your operating system is no longer supported."));
}
g_string_append (str, " ");
diff --git a/src/gs-updates-page.ui b/src/gs-updates-page.ui
index 5674e0c67..1ae80daa9 100644
--- a/src/gs-updates-page.ui
+++ b/src/gs-updates-page.ui
@@ -25,7 +25,7 @@
</child>
<child>
<object class="GtkLabel" id="label_end_of_life">
- <property name="label">Your OS is no longer supported. This means that it does not
receive security updates. It is recommended that you upgrade to a more recent version.</property>
+ <property name="label">Your operating system is no longer supported. This means that it
does not receive security updates. It is recommended that you upgrade to a more recent version.</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]