From 322f63be18b68cf43dde53bb92c42eafef8376fe Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 22 Jul 2022 15:40:46 +0200 Subject: src/service.c: Add tooltip support. --- src/service.c | 2 ++ 1 file changed, 2 insertions(+) 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))); -- cgit v1.2.3 From ebaf72c156738880752a40fed24372bbf76bd6ee Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Fri, 2 Sep 2022 00:25:24 +0200 Subject: Whitespace fix --- tests/test-device.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-device.cc b/tests/test-device.cc index a948857..1776c3e 100644 --- a/tests/test-device.cc +++ b/tests/test-device.cc @@ -535,7 +535,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 +949,7 @@ TEST_F(DeviceTest, ChoosePrimary) { "phone unknown 0m 61% phone01 1" } } }; - + for(const auto& test : tests) { // build the device list -- cgit v1.2.3 From de773702ca0cd0a37eed54fefd6128a63a22bfe9 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Fri, 2 Sep 2022 00:27:48 +0200 Subject: tests/test-device.cc: Add missing header --- tests/test-device.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test-device.cc b/tests/test-device.cc index 1776c3e..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 + * Robert Tari */ #include "device.h" @@ -22,7 +24,7 @@ #include #include - +#include #include #include // ceil() #include -- cgit v1.2.3