summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gpm-statistics.c3
-rw-r--r--src/gpm-tray-icon.c3
2 files changed, 6 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));
}
diff --git a/src/gpm-tray-icon.c b/src/gpm-tray-icon.c
index 6ace66c..9f5fe38 100644
--- a/src/gpm-tray-icon.c
+++ b/src/gpm-tray-icon.c
@@ -269,6 +269,9 @@ gpm_tray_icon_add_device (GpmTrayIcon *icon, GtkMenu *menu, const GPtrArray *arr
if ((vendor != NULL && strlen(vendor) != 0) && (model != NULL && strlen(model) != 0)) {
label = g_strdup_printf ("%s %s (%.1f%%)", vendor, model, percentage);
}
+ else if((vendor == NULL || strlen(vendor) == 0) && (model != NULL && strlen(model) != 0)) {
+ label = g_strdup_printf ("%s (%.1f%%)", model, percentage);
+ }
else {
label = g_strdup_printf ("%s (%.1f%%)", gpm_device_kind_to_localised_string (kind, 1), percentage);
}