diff options
| -rw-r--r-- | data/org.ayatana.indicator.bluetooth | 3 | ||||
| -rw-r--r-- | po/et.po | 12 | ||||
| -rw-r--r-- | po/fi.po | 11 | ||||
| -rw-r--r-- | po/lo.po | 8 | ||||
| -rw-r--r-- | po/nb_NO.po | 15 | ||||
| -rw-r--r-- | src/CMakeLists.txt | 9 | ||||
| -rw-r--r-- | src/greeter.vala | 50 | ||||
| -rw-r--r-- | src/service.vala | 3 |
8 files changed, 91 insertions, 20 deletions
diff --git a/data/org.ayatana.indicator.bluetooth b/data/org.ayatana.indicator.bluetooth index a57ce0a..9f95e01 100644 --- a/data/org.ayatana.indicator.bluetooth +++ b/data/org.ayatana.indicator.bluetooth @@ -17,3 +17,6 @@ ObjectPath=/org/ayatana/indicator/bluetooth/desktop ObjectPath=/org/ayatana/indicator/bluetooth/phone Position=36 +[desktop_greeter] +ObjectPath=/org/ayatana/indicator/bluetooth/greeter +Position=36 @@ -8,16 +8,16 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-10-10 23:51+0200\n" -"PO-Revision-Date: 2022-10-20 10:03+0000\n" -"Last-Translator: Kristjan Räts <kristjanrats@gmail.com>\n" -"Language-Team: Estonian <https://hosted.weblate.org/projects/ayatana-" -"indicators/bluetooth-applet/et/>\n" +"PO-Revision-Date: 2025-09-06 07:01+0000\n" +"Last-Translator: Priit Jõerüüt <jrthwlate@users.noreply.hosted.weblate.org>\n" +"Language-Team: Estonian <https://hosted.weblate.org/projects/" +"ayatana-indicators/bluetooth-applet/et/>\n" "Language: et\n" "MIME-Version: 1.0\n" "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.14.2-dev\n" +"X-Generator: Weblate 5.13.1-rc\n" #: data/org.ayatana.indicator.bluetooth.gschema.xml:1 msgid "Bluetooth indicator in the menu bar." @@ -49,7 +49,7 @@ msgstr "Hiire ja puuteplaadi seaded…" #: src/desktop.vala:186 msgid "Sound Settings…" -msgstr "Heli seaded…" +msgstr "Heli seadistused…" #: src/desktop.vala:234 msgid "Visible" @@ -8,13 +8,16 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-10-10 23:51+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" +"PO-Revision-Date: 2025-07-18 20:08+0000\n" +"Last-Translator: Ricky Tigg <ricky.tigg@gmail.com>\n" +"Language-Team: Finnish <https://hosted.weblate.org/projects/" +"ayatana-indicators/bluetooth-applet/fi/>\n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.13-dev\n" #: data/org.ayatana.indicator.bluetooth.gschema.xml:1 msgid "Bluetooth indicator in the menu bar." @@ -38,7 +41,7 @@ msgstr "" #: src/desktop.vala:173 msgid "Keyboard Settings…" -msgstr "" +msgstr "Näppäimistön asetukset…" #: src/desktop.vala:179 msgid "Mouse and Touchpad Settings…" @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-10-10 23:51+0200\n" -"PO-Revision-Date: 2023-04-21 15:52+0000\n" -"Last-Translator: Vilakone Thammavong <vilakone.thammavong@foodpanda.la>\n" +"PO-Revision-Date: 2025-11-15 04:51+0000\n" +"Last-Translator: BoneNI <bounkirdni@gmail.com>\n" "Language-Team: Lao <https://hosted.weblate.org/projects/ayatana-indicators/" "bluetooth-applet/lo/>\n" "Language: lo\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.18-dev\n" +"X-Generator: Weblate 5.15-dev\n" #: data/org.ayatana.indicator.bluetooth.gschema.xml:1 msgid "Bluetooth indicator in the menu bar." @@ -49,7 +49,7 @@ msgstr "" #: src/desktop.vala:186 msgid "Sound Settings…" -msgstr "" +msgstr "ຕັ້ງຄ່າສຽງ…" #: src/desktop.vala:234 msgid "Visible" diff --git a/po/nb_NO.po b/po/nb_NO.po index 5cb5c6f..0d4f525 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -8,21 +8,24 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-10-10 23:51+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" +"PO-Revision-Date: 2025-09-17 17:01+0000\n" +"Last-Translator: Ida Brenna <ida@larald.no>\n" +"Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/" +"ayatana-indicators/bluetooth-applet/nb_NO/>\n" "Language: nb_NO\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.14-dev\n" #: data/org.ayatana.indicator.bluetooth.gschema.xml:1 msgid "Bluetooth indicator in the menu bar." -msgstr "" +msgstr "Blåtann-indikator i menyfeltet." #: data/org.ayatana.indicator.bluetooth.gschema.xml:2 msgid "Whether or not to show the Bluetooth indicator in the menu bar." -msgstr "" +msgstr "Hvorvidt man skal vise blåtannindikatoren i menyfeltet." #: src/bluez.vala:310 msgid "Unknown" @@ -63,7 +66,7 @@ msgstr "" #: src/profile.vala:91 src/profile.vala:179 msgid "Bluetooth" -msgstr "" +msgstr "Blåtann" #: src/profile.vala:180 msgid "Bluetooth status & device connections" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8770323..6b0a1e2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -55,6 +55,14 @@ vala_add(ayatana-indicator-bluetooth-service ) vala_add(ayatana-indicator-bluetooth-service + greeter.vala + DEPENDS + profile + bluetooth + device +) + +vala_add(ayatana-indicator-bluetooth-service device.vala ) @@ -85,6 +93,7 @@ vala_add(ayatana-indicator-bluetooth-service device phone desktop + greeter ) vala_finish(ayatana-indicator-bluetooth-service diff --git a/src/greeter.vala b/src/greeter.vala new file mode 100644 index 0000000..17c2042 --- /dev/null +++ b/src/greeter.vala @@ -0,0 +1,50 @@ +/* +* Copyright 2025 Robert Tari <robert@tari.in> +* +* 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 +* the Free Software Foundation; version 3. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +class Greeter: Profile +{ + GLib.SimpleActionGroup action_group; + + public Greeter (Bluetooth bluetooth, GLib.SimpleActionGroup action_group) + { + base (bluetooth, "greeter"); + this.bluetooth = bluetooth; + this.action_group = action_group; + GLib.Action[] actions = {}; + actions += root_action; + actions += create_supported_action (bluetooth); + actions += create_enabled_action (bluetooth); + + foreach (GLib.Action action in actions) + { + action_group.add_action (action); + } + + GLib.Menu section = new GLib.Menu (); + GLib.MenuItem menu_item = create_enabled_menuitem (); + section.append_item (menu_item); + menu.append_section (null, section); + + bluetooth.notify.connect (() => update_visibility ()); + update_visibility (); + bluetooth.notify.connect (() => update_root_action_state ()); + } + + void update_visibility () + { + visible = bluetooth.enabled; + } +} diff --git a/src/service.vala b/src/service.vala index 524175d..80ccea6 100644 --- a/src/service.vala +++ b/src/service.vala @@ -1,5 +1,6 @@ /* * Copyright 2013 Canonical Ltd. + * Copyright 2025 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 @@ -16,6 +17,7 @@ * Authors: * Charles Kerr <charles.kerr@canonical.com> * Robert Ancell <robert.ancell@canonical.com> + * Robert Tari <robert@tari.in> */ /** @@ -54,6 +56,7 @@ public class Service: Object profiles = new HashTable<string,Profile> (str_hash, str_equal); profiles.insert ("phone", new Phone (bluetooth, actions)); profiles.insert ("desktop", new Desktop (bluetooth, actions)); + profiles.insert ("greeter", new Greeter (bluetooth, actions)); } public int run () |
