[gnome-shell/wip/hadess/import-gnome-bluetooth: 2/7] bluetooth: Use internal gnome-bluetooth code




commit c20f4faf4fe3602c600fd8cbfdbd3c040fa06b83
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Nov 2 14:56:33 2021 +0100

    bluetooth: Use internal gnome-bluetooth code

 js/misc/config.js.in      | 2 --
 js/misc/meson.build       | 1 -
 js/ui/panel.js            | 6 +-----
 js/ui/status/bluetooth.js | 4 ++--
 meson.build               | 2 --
 5 files changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/js/misc/config.js.in b/js/misc/config.js.in
index e54e280441..51aeb4a044 100644
--- a/js/misc/config.js.in
+++ b/js/misc/config.js.in
@@ -4,8 +4,6 @@
 var PACKAGE_NAME = '@PACKAGE_NAME@';
 /* The version of this package */
 var PACKAGE_VERSION = '@PACKAGE_VERSION@';
-/* 1 if gnome-bluetooth is available, 0 otherwise */
-var HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
 /* 1 if networkmanager is available, 0 otherwise */
 var HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@;
 /* gettext package */
diff --git a/js/misc/meson.build b/js/misc/meson.build
index 2702c3dbc9..5aceefac42 100644
--- a/js/misc/meson.build
+++ b/js/misc/meson.build
@@ -3,7 +3,6 @@ jsconf.set('PACKAGE_NAME', meson.project_name())
 jsconf.set('PACKAGE_VERSION', meson.project_version())
 jsconf.set('GETTEXT_PACKAGE', meson.project_name())
 jsconf.set('LIBMUTTER_API_VERSION', mutter_api_version)
-jsconf.set10('HAVE_BLUETOOTH', bt_dep.found())
 jsconf.set10('HAVE_NETWORKMANAGER', have_networkmanager)
 jsconf.set('datadir', datadir)
 jsconf.set('libexecdir', libexecdir)
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 89b082ad05..752ac367e0 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -553,11 +553,7 @@ class AggregateMenu extends PanelMenu.Button {
         else
             this._network = null;
 
-        if (Config.HAVE_BLUETOOTH)
-            this._bluetooth = new imports.ui.status.bluetooth.Indicator();
-        else
-            this._bluetooth = null;
-
+        this._bluetooth = new imports.ui.status.bluetooth.Indicator();
         this._remoteAccess = new imports.ui.status.remoteAccess.RemoteAccessApplet();
         this._power = new imports.ui.status.power.Indicator();
         this._powerProfiles = new imports.ui.status.powerProfiles.Indicator();
diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js
index 98ccc3d314..da770b1d34 100644
--- a/js/ui/status/bluetooth.js
+++ b/js/ui/status/bluetooth.js
@@ -1,7 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 /* exported Indicator */
 
-const { Gio, GLib, GnomeBluetooth, GObject } = imports.gi;
+const { Gio, GLib, Shell, GObject } = imports.gi;
 
 const Main = imports.ui.main;
 const PanelMenu = imports.ui.panelMenu;
@@ -52,7 +52,7 @@ class Indicator extends PanelMenu.SystemIndicator {
         this._syncId = 0;
         this._adapter = null;
 
-        this._client = new GnomeBluetooth.Client();
+        this._client = new Shell.BluetoothClient();
         this._model = this._client.get_model();
         this._model.connect('row-deleted', this._queueSync.bind(this));
         this._model.connect('row-changed', this._queueSync.bind(this));
diff --git a/meson.build b/meson.build
index 5e9053558d..f054600c09 100644
--- a/meson.build
+++ b/meson.build
@@ -33,7 +33,6 @@ startup_req = '>= 0.11'
 ibus_req = '>= 1.5.2'
 gnome_desktop_req = '>= 3.35.90'
 
-bt_req = '>= 3.9.0'
 gst_req = '>= 0.11.92'
 nm_req = '>= 1.10.4'
 secret_req = '>= 0.18'
@@ -96,7 +95,6 @@ x11_dep = dependency('x11')
 schemas_dep = dependency('gsettings-desktop-schemas', version: schemas_req)
 gnome_desktop_dep = dependency('gnome-desktop-3.0', version: gnome_desktop_req)
 
-bt_dep = dependency('gnome-bluetooth-1.0', version: bt_req, required: false)
 gst_dep = dependency('gstreamer-1.0', version: gst_req, required: false)
 gst_base_dep = dependency('gstreamer-base-1.0', required: false)
 pipewire_dep = dependency('libpipewire-0.3', required: false)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]