diff options
author | Robert Tari <robert@tari.in> | 2022-09-02 00:36:40 +0200 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2022-09-02 00:36:40 +0200 |
commit | 16cae61bfbd85da42bec9fa46e3579064680f8fe (patch) | |
tree | 0f079bc87c7d04479399f30861da2018d062476b | |
parent | dabd41daf08b9f287834586acb2b04cd126e65ba (diff) | |
parent | de773702ca0cd0a37eed54fefd6128a63a22bfe9 (diff) | |
download | ayatana-indicator-power-16cae61bfbd85da42bec9fa46e3579064680f8fe.tar.gz ayatana-indicator-power-16cae61bfbd85da42bec9fa46e3579064680f8fe.tar.bz2 ayatana-indicator-power-16cae61bfbd85da42bec9fa46e3579064680f8fe.zip |
Merge branch 'sunweaver-pr/tooltip-support'
Attributes GH PR #63: https://github.com/AyatanaIndicators/ayatana-indicator-power/pull/63
-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 |