From 5ebb1a368c658d014a37c7558a71d9bab7b4a8b0 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Mon, 1 Aug 2022 20:32:52 +0200 Subject: Hide bluetooth icon on hardware without bluetooth support fixes https://github.com/AyatanaIndicators/ayatana-indicator-bluetooth/issues/42 --- src/desktop.vala | 7 ++++++- src/profile.vala | 11 +++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/desktop.vala b/src/desktop.vala index c70d49a..b7b48fd 100644 --- a/src/desktop.vala +++ b/src/desktop.vala @@ -1,6 +1,6 @@ /* * Copyright 2013 Canonical Ltd. - * Copyright 2021 Robert Tari + * Copyright 2021-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 as published by @@ -80,6 +80,11 @@ class Desktop: Profile bluetooth.notify["supported"].connect (() => update_visibility()); update_visibility (); } + else + { + bluetooth.notify["supported"].connect (() => update_root_action_state()); + update_root_action_state(); + } // when devices change, rebuild our device section bluetooth.devices_changed.connect (()=> { diff --git a/src/profile.vala b/src/profile.vala index 69de0c5..4590e7c 100644 --- a/src/profile.vala +++ b/src/profile.vala @@ -1,5 +1,6 @@ /* * Copyright 2013 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 as published by @@ -15,6 +16,7 @@ * * Authors: * Charles Kerr + * Robert Tari */ class Profile: Object @@ -167,8 +169,13 @@ class Profile: Object var icon = new ThemedIcon.with_default_fallbacks (icon_name); var builder = new VariantBuilder (new VariantType ("a{sv}")); builder.add ("{sv}", "visible", new Variant.boolean (visible)); - builder.add ("{sv}", "accessible-desc", new Variant.string (a11y)); - builder.add ("{sv}", "icon", icon.serialize()); + + if (bluetooth.supported && visible) + { + builder.add ("{sv}", "accessible-desc", new Variant.string (a11y)); + builder.add ("{sv}", "icon", icon.serialize()); + } + builder.add ("{sv}", "title", new Variant.string (_("Bluetooth"))); return builder.end (); -- cgit v1.2.3 From 4bdc03c874d7045cede8543f9b9b5eb4f502871d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20PAG=C3=88S?= Date: Sat, 6 Aug 2022 17:26:11 +0000 Subject: Translated using Weblate (Occitan) Currently translated at 100.0% (11 of 11 strings) Translation: Ayatana Indicators/Bluetooth Applet Translate-URL: https://hosted.weblate.org/projects/ayatana-indicators/bluetooth-applet/oc/ --- po/oc.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/po/oc.po b/po/oc.po index 5848a21..82b7a30 100644 --- a/po/oc.po +++ b/po/oc.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-27 15:38+0100\n" -"PO-Revision-Date: 2020-11-08 21:26+0000\n" +"PO-Revision-Date: 2022-08-07 18:16+0000\n" "Last-Translator: Quentin PAGÈS \n" "Language-Team: Occitan \n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.3.2\n" +"X-Generator: Weblate 4.14-dev\n" #: ../data/org.ayatana.indicator.bluetooth.gschema.xml.in:1 msgid "Whether or not to show the bluetooth indicator in the menu bar." @@ -37,7 +37,7 @@ msgstr "Mandadís fichièrs…" #: ../src/desktop.vala:152 msgid "Keyboard Settings…" -msgstr "Paramètres clavièr…" +msgstr "Paramètres del clavièr…" #: ../src/desktop.vala:158 msgid "Mouse and Touchpad Settings…" -- cgit v1.2.3 From 19530d5638bd3d012c57a47ef2be92b8b5231970 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 22 Jul 2022 14:42:58 +0200 Subject: src/profile.vala: Add tooltip. --- src/profile.vala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/profile.vala b/src/profile.vala index 4590e7c..be7863e 100644 --- a/src/profile.vala +++ b/src/profile.vala @@ -177,6 +177,7 @@ class Profile: Object } builder.add ("{sv}", "title", new Variant.string (_("Bluetooth"))); + builder.add ("{sv}", "tooltip", new Variant.string (_("Bluetooth status & device connections"))); return builder.end (); } -- cgit v1.2.3