[gnome-software: 2/5] gs-installed-page: Add headers for all GsInstalledPageSections
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 2/5] gs-installed-page: Add headers for all GsInstalledPageSections
- Date: Tue, 30 Mar 2021 15:50:43 +0000 (UTC)
commit a30b24052d272e742460a4dfea70bfba3703e3e6
Author: Philip Withnall <pwithnall endlessos org>
Date: Thu Mar 18 12:23:29 2021 +0000
gs-installed-page: Add headers for all GsInstalledPageSections
Previously there was no header for the `REMOVABLE_APPS` section — it was
listed first, and without a header, since adding a header made it look
weird. This is a temporary regression in that respect (now a header will
always be shown for this section); see the following commits.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Helps: #1175
src/gs-installed-page.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index e4e641691..dd922b533 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -443,14 +443,30 @@ gs_installed_page_get_section_header (GsInstalledPageSection section)
{
GtkWidget *header = NULL;
- if (section == GS_UPDATE_LIST_SECTION_SYSTEM_APPS) {
+ switch (section) {
+ case GS_UPDATE_LIST_SECTION_SYSTEM_APPS:
/* TRANSLATORS: This is the header dividing the normal
* applications and the system ones */
header = gtk_label_new (_("System Applications"));
- } else if (section == GS_UPDATE_LIST_SECTION_ADDONS) {
+ break;
+ case GS_UPDATE_LIST_SECTION_ADDONS:
/* TRANSLATORS: This is the header dividing the normal
* applications and the addons */
header = gtk_label_new (_("Add-ons"));
+ break;
+ case GS_UPDATE_LIST_SECTION_INSTALLING_AND_REMOVING:
+ /* TRANSLATORS: This is the header dividing the normal
+ * installed applications and the applications which are
+ * currently being installed or removed. */
+ header = gtk_label_new (_("In Progress"));
+ break;
+ case GS_UPDATE_LIST_SECTION_REMOVABLE_APPS:
+ /* TRANSLATORS: This is the header above normal installed
+ * applications on the installed page. */
+ header = gtk_label_new (_("Applications"));
+ break;
+ default:
+ g_assert_not_reached ();
}
/* fix header style */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]