[gnome-software: 2/4] gs-desktop-data: Split addons out into separate categories
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 2/4] gs-desktop-data: Split addons out into separate categories
- Date: Mon, 30 Aug 2021 07:05:33 +0000 (UTC)
commit 6a9db688abda3c11e9d7e8f44a42c9704d54c1c3
Author: Philip Withnall <pwithnall endlessos org>
Date: Fri Aug 20 13:54:06 2021 +0100
gs-desktop-data: Split addons out into separate categories
See the previous commit. It didn’t work very well for the addons to be
mixed in with other software, so separate them out into their own
categories again. These will now be listed separately at the bottom of
the overview page, as per the previous commit.
We may want to iterate on this design more in future, but it will do for
gnome-software 41, given the time pressure.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Fixes: #1384
lib/gs-desktop-data.c | 74 ++++++++++++++++++++++++++++++++++++++-------------
lib/gs-desktop-data.h | 2 +-
2 files changed, 56 insertions(+), 20 deletions(-)
---
diff --git a/lib/gs-desktop-data.c b/lib/gs-desktop-data.c
index fdece96ff..c2ee93b6e 100644
--- a/lib/gs-desktop-data.c
+++ b/lib/gs-desktop-data.c
@@ -42,16 +42,10 @@ static const GsDesktopMap map_create[] = {
"AudioVideo::DiscBurning",
"AudioVideo::Sequencer",
NULL} },
- { "fonts", NC_("Menu of Add-ons", "Fonts"),
- { "Addon::Font",
- NULL} },
{ "music-players", NC_("Menu of Audio & Video", "Music Players"),
{ "AudioVideo::Music",
"AudioVideo::Player",
NULL} },
- { "codecs", NC_("Menu of Add-ons", "Codecs"),
- { "Addon::Codec",
- NULL} },
{ NULL }
};
@@ -59,7 +53,6 @@ static const GsDesktopMap map_work[] = {
{ "all", NC_("Menu of Productivity", "All"),
{ "Office",
"Utility",
- "Addon",
"Network::WebBrowser",
NULL } },
{ "featured", NC_("Menu of Productivity", "Featured"),
@@ -87,18 +80,6 @@ static const GsDesktopMap map_work[] = {
{ "web-browsers", NC_("Menu of Communication & News", "Web Browsers"),
{ "Network::WebBrowser",
NULL} },
- { "input-sources", NC_("Menu of Add-ons", "Input Sources"),
- { "Addon::InputSource",
- NULL} },
- { "language-packs", NC_("Menu of Add-ons", "Language Packs"),
- { "Addon::LanguagePack",
- NULL} },
- { "localization", NC_("Menu of Add-ons", "Localization"),
- { "Addon::Localization",
- NULL} },
- { "drivers", NC_("Menu of Add-ons", "Hardware Drivers"),
- { "Addon::Driver",
- NULL} },
{ NULL }
};
@@ -255,6 +236,48 @@ static const GsDesktopMap map_develop[] = {
{ NULL }
};
+static const GsDesktopMap map_addon_codecs[] = {
+ { "all", NC_("Menu of Add-ons", "Codecs"),
+ { "Addon::Codec",
+ NULL } },
+ { NULL }
+};
+
+static const GsDesktopMap map_addon_drivers[] = {
+ { "all", NC_("Menu of Add-ons", "Hardware Drivers"),
+ { "Addon::Driver",
+ NULL } },
+ { NULL }
+};
+
+static const GsDesktopMap map_addon_fonts[] = {
+ { "all", NC_("Menu of Add-ons", "Fonts"),
+ { "Addon::Font",
+ NULL } },
+ { NULL }
+};
+
+static const GsDesktopMap map_addon_input_sources[] = {
+ { "all", NC_("Menu of Add-ons", "Input Sources"),
+ { "Addon::InputSource",
+ NULL } },
+ { NULL }
+};
+
+static const GsDesktopMap map_addon_language_packs[] = {
+ { "all", NC_("Menu of Add-ons", "Language Packs"),
+ { "Addon::LanguagePack",
+ NULL } },
+ { NULL }
+};
+
+static const GsDesktopMap map_addon_localization[] = {
+ { "all", NC_("Menu of Add-ons", "Localization"),
+ { "Addon::Localization",
+ NULL } },
+ { NULL }
+};
+
/* main categories */
/* Please keep category name and subcategory context synchronized!!! */
static const GsDesktopData msdata[] = {
@@ -271,6 +294,19 @@ static const GsDesktopData msdata[] = {
/* Translators: this is a menu category */
{ "develop", map_develop, N_("Develop"), "org.gnome.Software.Develop", 50 },
+ /* Translators: this is a menu category */
+ { "codecs", map_addon_codecs, N_("Codecs"), NULL, 10 },
+ /* Translators: this is a menu category */
+ { "drivers", map_addon_drivers, N_("Hardware Drivers"), NULL, 10 },
+ /* Translators: this is a menu category */
+ { "fonts", map_addon_fonts, N_("Fonts"), NULL, 10 },
+ /* Translators: this is a menu category */
+ { "input-sources", map_addon_input_sources, N_("Input Sources"), NULL, 10 },
+ /* Translators: this is a menu category */
+ { "language-packs", map_addon_language_packs, N_("Language Packs"), NULL, 10 },
+ /* Translators: this is a menu category */
+ { "localization", map_addon_localization, N_("Localization"), NULL, 10 },
+
{ NULL }
};
diff --git a/lib/gs-desktop-data.h b/lib/gs-desktop-data.h
index 5e9221591..049656aff 100644
--- a/lib/gs-desktop-data.h
+++ b/lib/gs-desktop-data.h
@@ -38,6 +38,6 @@ const GsDesktopData *gs_desktop_get_data (void);
*
* Since: 40
*/
-#define GS_DESKTOP_DATA_N_ENTRIES 6
+#define GS_DESKTOP_DATA_N_ENTRIES 12
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]