GNOME Bugzilla – Bug 703410
power: Add support for rfkill switches in g-s-d's power plugin
Last modified: 2013-07-05 07:21:15 UTC
This will be used by gnome-shell and gnome-control-center, instead of copy/paste rfkill code.
Created attachment 248176 [details] [review] power: Add support for rfkill switches in g-s-d's power plugin
Review of attachment 248176 [details] [review]: As mentioned on IRC, I'd prefer if it were a separate plugin. The power plugin is already quite full of stuff that shouldn't be there... I would also add a separate Bluetooth killswitch there, for gnome-bluetooth's applet.so (loaded by gnome-shell) and gnome-control-center to use. ::: plugins/power/rfkill-glib.c @@ +61,3 @@ + g_return_val_if_fail (rfkill->priv->fd > 0, -1); + + return write (rfkill->priv->fd, event, sizeof(struct rfkill_event)); Having an async version of this would be nice.
Created attachment 248388 [details] [review] rfkill: Add RFKill support plugin on Linux systems Based on a patch by Jasper St. Pierre <jstpierre@mecheye.net>
Review of attachment 248388 [details] [review]: ::: plugins/rfkill/gsd-rfkill-manager.c @@ +51,3 @@ +" <interface name='org.gnome.SettingsDaemon.Rfkill'>" +" <annotation name='org.freedesktop.DBus.GLib.CSymbol' value='gsd_rfkill_manager'/>" +" <property name='AirplaneMode' type='b' access='readwrite'/>" We need to have a Bluetooth killswitch here as well. ::: plugins/rfkill/rfkill-glib.c @@ +61,3 @@ + g_return_val_if_fail (rfkill->priv->fd > 0, -1); + + return write (rfkill->priv->fd, event, sizeof(struct rfkill_event)); We'd need this to be async. GUnixOutputStream and g_output_stream_write_async() might be enough for this.
Created attachment 248392 [details] [review] rfkill: Add RFKill support plugin on Linux systems Based on a patch by Jasper St. Pierre <jstpierre@mecheye.net>
Attachment 248392 [details] pushed as 444af32 - rfkill: Add RFKill support plugin on Linux systems