GNOME Bugzilla – Bug 692584
stop using libgnome-bluetooth-applet
Last modified: 2013-02-12 03:57:26 UTC
The setup is just too fragile; it just broke my build again. Looking at the BluetoothApplet code, it is mostly a thin wrapper around BluetoothClient, BluetoothKillSwitch, BluetoothAgent and bluetooth-sendto. And it is just 1000 lines of code, anyway. Here's my suggestion: 1. Stop linking against an installed libgnome-bluetooth-applet. Instead, copy bluetooth-applet.c into the shell sources and build it. 2. Port bluetooth.js to use BluetoothClient, BluetoothKillSwitch, BluetoothAgent and bluetooth-sendto directly 3. Kill the local copy of bluetooth-applet.c
Bastien, opinions ?
Fine with me. Do we want to go the GVC route of a git submodule, or just make it copy/paste code that we'll never sync up between the Shell and control center?
copy/paste makes more sense if we want to progressively kill it off altogether. Working on a patch for the first step now.
Created attachment 234480 [details] [review] Stop using the installed libgnome-bluetooth-applet It is not a public library, and the gnome-bluetooth don't want it to be one. Instead, copy the sources and build it locally. This is the first step towards getting rid of the applet altogether, and instead use the underlying libgnome-bluetooth APIs that the applet wraps.
the patch currently includes bluetooth-agent.h, because gnome-bluetooth forgets to install that, although it exports the symbols.
Created attachment 234487 [details] [review] Drop Config.HAVE_BLUETOOTH We now always build with Bluetooth support, so no need for this boolean anymore.
Created attachment 234488 [details] [review] Build GnomeBluetoothApplet-1.0.gir
Btw, I just wanted to point out that originally, BluetoothApplet existed because BluetoothKillSwitch is not public / introspectable. Plus, BluetoothAgent uses callbacks in a way that's incompatible with JS. Also, Config.HAVE_BLUETOOTH is needed on platforms where gnome-bluetooth is not available (which, I'm told, include all the BSDs)
Comment on attachment 234487 [details] [review] Drop Config.HAVE_BLUETOOTH Bluetooth support is only available on Linux. That's the reason why it's a build option.
(In reply to comment #0) > The setup is just too fragile; it just broke my build again. How did it break? > Looking at the BluetoothApplet code, it is mostly a thin wrapper around > BluetoothClient, BluetoothKillSwitch, BluetoothAgent and bluetooth-sendto. > And it is just 1000 lines of code, anyway. > > Here's my suggestion: > > 1. Stop linking against an installed libgnome-bluetooth-applet. Instead, copy > bluetooth-applet.c into the shell sources and build it. > > 2. Port bluetooth.js to use BluetoothClient, BluetoothKillSwitch, > BluetoothAgent and bluetooth-sendto directly > > 3. Kill the local copy of bluetooth-applet.c The problem is that we'll need to do it all again when gnome-bluetooth supports BlueZ 5. I have no idea what the API will look like (it's likely that applications will want to use the ObjectManager API directly for example).
I'm curious how exactly it's failing (what environment? jhbuild? rpm?). The other option with random shared code is to put it in libgnome-desktop.
It fails to build in koji with gcc 4.8 - look for recent failed builds of gnome-shell
(In reply to comment #12) > It fails to build in koji with gcc 4.8 - look for recent failed builds of > gnome-shell It looks like the failed builds have been garbage collected. If you get another one, can you paste the relevant error messages here?
sure
lets close this for now