summaryrefslogtreecommitdiff
path: root/src/gpm-statistics.c
diff options
context:
space:
mode:
authorDamien Thébault <[email protected]>2022-02-16 22:28:57 +0100
committerRobert Antoni Buj Gelonch <[email protected]>2022-03-21 12:41:09 +0100
commit09314551f4d36a6f92c44546929ffb499d4bff87 (patch)
tree615abc644b7749c583690c302dee97cd28f14e76 /src/gpm-statistics.c
parentba901df1519c14267208d0c0eeec1a022c711d7e (diff)
downloadmate-power-manager-09314551f4d36a6f92c44546929ffb499d4bff87.tar.bz2
mate-power-manager-09314551f4d36a6f92c44546929ffb499d4bff87.tar.xz
Show device model even if vendor is not available
Diffstat (limited to 'src/gpm-statistics.c')
-rw-r--r--src/gpm-statistics.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpm-statistics.c b/src/gpm-statistics.c
index 0f6ad66..0b7b9fc 100644
--- a/src/gpm-statistics.c
+++ b/src/gpm-statistics.c
@@ -920,6 +920,9 @@ gpm_stats_add_device (UpDevice *device, GPtrArray *devices)
if ((vendor != NULL && strlen(vendor) != 0) && (model != NULL && strlen(model) != 0)) {
label = g_strdup_printf ("%s %s", vendor, model);
}
+ else if((vendor == NULL || strlen(vendor) == 0) && (model != NULL && strlen(model) != 0)) {
+ label = g_strdup_printf ("%s", model);
+ }
else {
label = g_strdup_printf ("%s", gpm_device_kind_to_localised_string (kind, 1));
}