From 23346a954ffb08b115cd45ea2a40f995e3441f8b Mon Sep 17 00:00:00 2001 From: Burt P Date: Sun, 7 Jul 2019 13:40:10 -0500 Subject: UbuntuFlavor -> DistroFlavor: perhaps more easily used by non-ubuntu distros Signed-off-by: Burt P --- includes/computer.h | 6 ++---- includes/distro_flavors.h | 37 +++++++++++++++++++++++++++++++++++++ includes/ubuntu_flavors.h | 33 --------------------------------- 3 files changed, 39 insertions(+), 37 deletions(-) create mode 100644 includes/distro_flavors.h delete mode 100644 includes/ubuntu_flavors.h (limited to 'includes') diff --git a/includes/computer.h b/includes/computer.h index d01e1f2f..25da8e27 100644 --- a/includes/computer.h +++ b/includes/computer.h @@ -90,7 +90,7 @@ struct _Computer { gchar *date_time; }; -#include "ubuntu_flavors.h" +#include "distro_flavors.h" struct _OperatingSystem { gchar *kernel; @@ -112,9 +112,7 @@ struct _OperatingSystem { gchar *entropy_avail; - /* perhaps this could union with a flavors/spins - * pointer for other distro families */ - const UbuntuFlavor* ubuntu_flavor; + const DistroFlavor* distro_flavor; }; struct _MemoryInfo { diff --git a/includes/distro_flavors.h b/includes/distro_flavors.h new file mode 100644 index 00000000..60c38531 --- /dev/null +++ b/includes/distro_flavors.h @@ -0,0 +1,37 @@ +/* + * HardInfo - Displays System Information + * Copyright (C) 2003-2019 Leandro A. F. Pereira + * This file Burt P. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __DISTRO_FLAVORS_H__ +#define __DISTRO_FLAVORS_H__ + +typedef struct { + const char *name; + const char *icon; + const char *url; +} DistroFlavor; + +typedef struct UbuntuFlavor { + const DistroFlavor base; + const char *package; +} UbuntuFlavor; + +/* items are const; free with g_slist_free() */ +GSList *ubuntu_flavors_scan(void); + +#endif diff --git a/includes/ubuntu_flavors.h b/includes/ubuntu_flavors.h deleted file mode 100644 index ea21ddb9..00000000 --- a/includes/ubuntu_flavors.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2019 Leandro A. F. Pereira - * This file Burt P. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __UBUNTU_FLAVORS_H__ -#define __UBUNTU_FLAVORS_H__ - -typedef struct UbuntuFlavor { - const char *package; - const char *name; - const char *icon; - const char *url; -} UbuntuFlavor; - -/* items are const; free with g_slist_free() */ -GSList *ubuntu_flavors_scan(void); - -#endif -- cgit v1.2.3