diff options
-rw-r--r-- | src/service.c | 2 | ||||
-rw-r--r-- | tests/test-device.cc | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/service.c b/src/service.c index 24840ac..2520286 100644 --- a/src/service.c +++ b/src/service.c @@ -455,6 +455,8 @@ create_header_state (IndicatorPowerService * self) g_variant_builder_add (&b, "{sv}", "title", g_variant_new_string (_("Battery"))); + g_variant_builder_add (&b, "{sv}", "tooltip", g_variant_new_string (_("Battery status and power management"))); + g_variant_builder_add (&b, "{sv}", "visible", g_variant_new_boolean (should_be_visible (self))); diff --git a/tests/test-device.cc b/tests/test-device.cc index a948857..474fa36 100644 --- a/tests/test-device.cc +++ b/tests/test-device.cc @@ -1,5 +1,6 @@ /* * Copyright 2012-2016 Canonical Ltd. + * Copyright 2022 Robert Tari * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -15,6 +16,7 @@ * * Authors: * Charles Kerr <charles.kerr@canonical.com> + * Robert Tari <robert@tari.in> */ #include "device.h" @@ -22,7 +24,7 @@ #include <gio/gio.h> #include <gtest/gtest.h> - +#include <array> #include <algorithm> #include <cmath> // ceil() #include <string> @@ -535,7 +537,7 @@ TEST_F(DeviceTest, IconNames) EXPECT_ICON_NAMES_EQ(expected->str, device); // if we know the charge level, but not that it’s charging, - // then we should use the same icons as when it’s discharging. + // then we should use the same icons as when it’s discharging. // https://wiki.ubuntu.com/Power?action=diff&rev2=78&rev1=77 // https://bugs.launchpad.net/ubuntu/+source/indicator-power/+bug/1470080 g_object_set (o, INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_UNKNOWN, @@ -949,7 +951,7 @@ TEST_F(DeviceTest, ChoosePrimary) { "phone unknown 0m 61% phone01 1" } } }; - + for(const auto& test : tests) { // build the device list |