After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 692584 - stop using libgnome-bluetooth-applet
stop using libgnome-bluetooth-applet
Status: RESOLVED INVALID
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on: 692588
Blocks: 692590
 
 
Reported: 2013-01-26 16:42 UTC by Matthias Clasen
Modified: 2013-02-12 03:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Stop using the installed libgnome-bluetooth-applet (41.83 KB, patch)
2013-01-26 17:14 UTC, Matthias Clasen
none Details | Review
Drop Config.HAVE_BLUETOOTH (1.62 KB, patch)
2013-01-26 18:19 UTC, Matthias Clasen
rejected Details | Review
Build GnomeBluetoothApplet-1.0.gir (1.23 KB, patch)
2013-01-26 19:13 UTC, Matthias Clasen
none Details | Review

Description Matthias Clasen 2013-01-26 16:42:18 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
Comment 1 Matthias Clasen 2013-01-26 16:43:29 UTC
Bastien, opinions ?
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-01-26 17:06:53 UTC
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?
Comment 3 Matthias Clasen 2013-01-26 17:09:38 UTC
copy/paste makes more sense if we want to progressively kill it off altogether.
Working on a patch for the first step now.
Comment 4 Matthias Clasen 2013-01-26 17:14:47 UTC
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.
Comment 5 Matthias Clasen 2013-01-26 17:19:42 UTC
the patch currently includes bluetooth-agent.h, because gnome-bluetooth forgets to install that, although it exports the symbols.
Comment 6 Matthias Clasen 2013-01-26 18:19:57 UTC
Created attachment 234487 [details] [review]
Drop Config.HAVE_BLUETOOTH

We now always build with Bluetooth support, so no need
for this boolean anymore.
Comment 7 Matthias Clasen 2013-01-26 19:13:21 UTC
Created attachment 234488 [details] [review]
Build GnomeBluetoothApplet-1.0.gir
Comment 8 Giovanni Campagna 2013-01-27 11:25:43 UTC
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 9 Bastien Nocera 2013-01-27 12:45:02 UTC
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.
Comment 10 Bastien Nocera 2013-01-27 12:48:29 UTC
(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).
Comment 11 Colin Walters 2013-01-27 15:31:02 UTC
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.
Comment 12 Matthias Clasen 2013-01-28 11:55:31 UTC
It fails to build in koji with gcc 4.8 - look for recent failed builds of gnome-shell
Comment 13 Colin Walters 2013-01-28 14:56:12 UTC
(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?
Comment 14 Matthias Clasen 2013-01-28 19:03:13 UTC
sure
Comment 15 Matthias Clasen 2013-02-12 03:57:26 UTC
lets close this for now