GNOME Bugzilla – Bug 697537
don't require/compile bluetooth on non supported platforms
Last modified: 2013-05-07 10:07:52 UTC
Created attachment 240930 [details] [review] disable bluetooth on !linux Hi. This patch allows to use gnome-user-share on platforms where gnome-bluetooth is not available (for proper functionality of the bluetooth, bluez is required which means udev). I'm been using this successfully on OpenBSD to share Public folders for users using webdav. Thoughts?
Review of attachment 240930 [details] [review]: You'd also need to split the bluetooth configuration into its own schema. Bluetooth sharing configuration makes no sense if the program is built without Bluetooth support. ::: configure.ac @@ +133,3 @@ +fi + +dnl ========================================================================== You can remove that line. ::: src/user_share.c @@ +72,3 @@ obex_services_start (void) { +#ifdef HAVE_BLUETOOTH Make sure that only functions that reference gnome-bluetooth structures are ifdef'ed. @@ +187,3 @@ bluez_init (void) { +#ifdef HAVE_BLUETOOTH You'd need to return FALSE here so that other non-private functions in the file aren't even called.
(In reply to comment #1) > Review of attachment 240930 [details] [review]: > > You'd also need to split the bluetooth configuration into its own schema. > Bluetooth sharing configuration makes no sense if the program is built without > Bluetooth support. Hi Bastien. Thanks for all the feedback, I'll work on that. As for the schema file, I didn't split it at first because I was following gnome-settings-daemon behavior which installs the wacom schema even when wacom is disabled.
Ok, couple of questions. > You'd also need to split the bluetooth configuration into its own schema. > Bluetooth sharing configuration makes no sense if the program is built without > Bluetooth support. If I split the schema, wouldn't id and path need to be modified as well? If so, that'd be bad I guess since previous configuration would not be taken into consideration. > @@ +187,3 @@ > bluez_init (void) > { > +#ifdef HAVE_BLUETOOTH > > You'd need to return FALSE here so that other non-private functions in the file > aren't even called. It's a void, am I really supposed to return something here. Or did I misunderstand what you meant?
Created attachment 241125 [details] [review] disable bluetooth on !linux v2 Ok, new patch based on your feedback. I didn't touch bluez_init(), I'd rather confirm with you whether returning FALSE there makes sense or not.
Bah, needs more work... (gnome-user-share:23755): GLib-GIO-ERROR **: Settings schema 'org.gnome.desktop.file-sharing' does not contain a key named 'bluetooth-enabled'
Created attachment 241233 [details] [review] disable bluetooth on !linux v3 This patch does the trick for me. However, I am really not sure at all I'm doing the correct thing wrt gsettings splitting... I'll wait for your input before going further. Thanks Bastien.
This is a duplicate of #601890 which also has an patch against git master (as of one month ago)
*** This bug has been marked as a duplicate of bug 601890 ***