[gnome-flashback] system-indicators: handle BLUETOOTH_TYPE_SPEAKERS



commit b550cd2a3657b03a4faf1f2f68c6a41591729778
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Mar 19 15:09:16 2021 +0200

    system-indicators: handle BLUETOOTH_TYPE_SPEAKERS

 configure.ac                     | 17 +++++++++++++++++
 system-indicators/si-bluetooth.c |  3 +++
 2 files changed, 20 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index d8c6f36..c52ceae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -331,6 +331,23 @@ PKG_CHECK_MODULES([SYSTEM_INDICATORS], [
   upower-glib
 ])
 
+save_CFLAGS="$CFLAGS"
+CFLAGS=$SYSTEM_INDICATORS_CFLAGS
+AC_MSG_CHECKING([for BLUETOOTH_TYPE_SPEAKERS])
+AC_COMPILE_IFELSE([
+  AC_LANG_PROGRAM([
+    #include <bluetooth-client.h>
+  ], [
+    int type = BLUETOOTH_TYPE_SPEAKERS;
+  ])
+], [
+  AC_MSG_RESULT([yes])
+  AC_DEFINE([HAVE_BLUETOOTH_TYPE_SPEAKERS], [1], [xxx])
+], [
+  AC_MSG_RESULT([no])
+])
+CFLAGS="$save_CFLAGS"
+
 dnl **************************************************************************
 dnl Compiz session
 dnl **************************************************************************
diff --git a/system-indicators/si-bluetooth.c b/system-indicators/si-bluetooth.c
index 0cd2cde..2bf8f86 100644
--- a/system-indicators/si-bluetooth.c
+++ b/system-indicators/si-bluetooth.c
@@ -270,6 +270,9 @@ append_devices (SiBluetooth *self,
 
           case BLUETOOTH_TYPE_HEADSET:
           case BLUETOOTH_TYPE_HEADPHONES:
+#ifdef HAVE_BLUETOOTH_TYPE_SPEAKERS
+          case BLUETOOTH_TYPE_SPEAKERS:
+#endif
           case BLUETOOTH_TYPE_OTHER_AUDIO:
             item = si_desktop_menu_item_new (_("Sound Settings"),
                                              "gnome-sound-panel.desktop");


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