From 906c021e2ebd927b512c9d52c03c17e70c01f065 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Wed, 5 Apr 2023 13:25:10 +0200 Subject: Use the device model name in the menu --- src/device.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/device.h') diff --git a/src/device.h b/src/device.h index fa41fe0..d9e9264 100644 --- a/src/device.h +++ b/src/device.h @@ -42,6 +42,7 @@ typedef struct _IndicatorPowerDeviceClass IndicatorPowerDeviceClass; typedef struct _IndicatorPowerDevicePrivate IndicatorPowerDevicePrivate; #define INDICATOR_POWER_DEVICE_KIND "kind" +#define INDICATOR_POWER_DEVICE_MODEL "model" #define INDICATOR_POWER_DEVICE_STATE "state" #define INDICATOR_POWER_DEVICE_OBJECT_PATH "object-path" #define INDICATOR_POWER_DEVICE_PERCENTAGE "percentage" @@ -125,6 +126,7 @@ GType indicator_power_device_get_type (void); IndicatorPowerDevice* indicator_power_device_new (const gchar * object_path, UpDeviceKind kind, + const gchar * model, gdouble percentage, UpDeviceState state, time_t time, @@ -132,12 +134,13 @@ IndicatorPowerDevice* indicator_power_device_new (const gchar * object_path, /** * Convenience wrapper around indicator_power_device_new() - * @variant holds the same args as indicator_power_device_new() in "(susdut)" + * @variant holds the same args as indicator_power_device_new() in "(sussdut)" */ IndicatorPowerDevice* indicator_power_device_new_from_variant (GVariant * variant); UpDeviceKind indicator_power_device_get_kind (const IndicatorPowerDevice * device); +const gchar * indicator_power_device_get_model (const IndicatorPowerDevice * device); UpDeviceState indicator_power_device_get_state (const IndicatorPowerDevice * device); const gchar * indicator_power_device_get_object_path (const IndicatorPowerDevice * device); gdouble indicator_power_device_get_percentage (const IndicatorPowerDevice * device); @@ -148,7 +151,7 @@ GStrv indicator_power_device_get_icon_names (const IndicatorPower GIcon * indicator_power_device_get_gicon (const IndicatorPowerDevice * device, gboolean panel); -char * indicator_power_device_get_readable_text (const IndicatorPowerDevice * device); +char * indicator_power_device_get_readable_text (const IndicatorPowerDevice * device, gboolean bModelName); char * indicator_power_device_get_accessible_text (const IndicatorPowerDevice * device); -- cgit v1.2.3