[gnome-control-center/gbsneto/applications-panel-cleanups: 8/16] applications: Set subtitle of storage row
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gbsneto/applications-panel-cleanups: 8/16] applications: Set subtitle of storage row
- Date: Thu, 20 Jan 2022 20:24:36 +0000 (UTC)
commit c6b35b7732aa5433f0aeed84789e613043c1d48f
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Jan 20 13:31:01 2022 -0300
applications: Set subtitle of storage row
Set the subtitle of the storage row, instead of the secondary
label, as per latest designs.
panels/applications/cc-applications-panel.c | 6 +++++-
panels/applications/cc-applications-panel.ui | 1 -
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/panels/applications/cc-applications-panel.c b/panels/applications/cc-applications-panel.c
index 567186e61..ea2ddaf3d 100644
--- a/panels/applications/cc-applications-panel.c
+++ b/panels/applications/cc-applications-panel.c
@@ -1487,12 +1487,16 @@ static void
update_total_size (CcApplicationsPanel *self)
{
g_autofree gchar *formatted_size = NULL;
+ g_autofree gchar *subtitle = NULL;
guint64 total;
total = self->app_size + self->data_size + self->cache_size;
formatted_size = g_format_size (total);
g_object_set (self->total, "info", formatted_size, NULL);
- g_object_set (self->storage, "info", formatted_size, NULL);
+
+ /* Translators: '%s' is the formatted size, e.g. "26.2 MB" */
+ subtitle = g_strdup_printf (_("%s of disk space used"), formatted_size);
+ g_object_set (self->storage, "subtitle", subtitle, NULL);
}
static void
diff --git a/panels/applications/cc-applications-panel.ui b/panels/applications/cc-applications-panel.ui
index a48c08017..f09f5adbd 100644
--- a/panels/applications/cc-applications-panel.ui
+++ b/panels/applications/cc-applications-panel.ui
@@ -259,7 +259,6 @@
<child>
<object class="CcInfoRow" id="storage">
<property name="title" translatable="yes">Storage</property>
- <property name="info">unknown</property>
<property name="has-expander">1</property>
<property name="is-link">1</property>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]