From 754a87070910c336c7f62074aeac587374f85403 Mon Sep 17 00:00:00 2001 From: Burt P Date: Sat, 6 Jul 2019 15:22:26 -0500 Subject: computer/os: Ubuntu flavors See: https://github.com/lpereira/hardinfo/issues/404 Signed-off-by: Burt P --- modules/computer.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'modules/computer.c') diff --git a/modules/computer.c b/modules/computer.c index 8e867275..95614ca7 100644 --- a/modules/computer.c +++ b/modules/computer.c @@ -556,6 +556,7 @@ gchar *callback_os(void) computer->os->distrocode)) : NULL; + struct InfoGroup *version_group = info_add_group( info, _("Version"), info_field(_("Kernel"), computer->os->kernel), info_field(_("Command Line"), computer->os->kcmdline ?: _("Unknown")), @@ -565,13 +566,19 @@ gchar *callback_os(void) .icon = distro_icon), info_field_last()); + if (computer->os->ubuntu_flavor) { + info_group_add_field(version_group, + info_field(_("Spin/Flavor"), computer->os->ubuntu_flavor->name, + .icon = computer->os->ubuntu_flavor->icon) ); + } + info_add_group(info, _("Current Session"), - info_field(_("Computer Name"), computer->os->hostname), - info_field(_("User Name"), computer->os->username), - info_field(_("Language"), computer->os->language), - info_field(_("Home Directory"), computer->os->homedir), - info_field(_("Desktop Environment"), computer->os->desktop), - info_field_last()); + info_field(_("Computer Name"), computer->os->hostname), + info_field(_("User Name"), computer->os->username), + info_field(_("Language"), computer->os->language), + info_field(_("Home Directory"), computer->os->homedir), + info_field(_("Desktop Environment"), computer->os->desktop), + info_field_last()); info_add_group(info, _("Misc"), info_field_update(_("Uptime"), 1000), info_field_update(_("Load Average"), 10000), -- cgit v1.2.3