[gnome-control-center] bluetooth: Remove setup plugins support
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] bluetooth: Remove setup plugins support
- Date: Fri, 6 Dec 2013 11:03:40 +0000 (UTC)
commit de226c703b19fc26f7e0866aae133a0238be1e92
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 27 15:33:18 2013 +0100
bluetooth: Remove setup plugins support
It was used by a test plugin we ship ourselves for Geoclue 1.x,
and NetworkManager. Given that NetworkManager doesn't make use
of it anymore, let's remove it.
panels/bluetooth/cc-bluetooth-panel.c | 59 +-------------------------------
1 files changed, 2 insertions(+), 57 deletions(-)
---
diff --git a/panels/bluetooth/cc-bluetooth-panel.c b/panels/bluetooth/cc-bluetooth-panel.c
index bb51c05..135e900 100644
--- a/panels/bluetooth/cc-bluetooth-panel.c
+++ b/panels/bluetooth/cc-bluetooth-panel.c
@@ -35,7 +35,6 @@
#include <bluetooth-utils.h>
#include <bluetooth-killswitch.h>
#include <bluetooth-chooser.h>
-#include <bluetooth-plugin-manager.h>
CC_PANEL_REGISTER (CcBluetoothPanel, cc_bluetooth_panel)
@@ -102,8 +101,6 @@ cc_bluetooth_panel_finalize (GObject *object)
{
CcBluetoothPanel *self;
- bluetooth_plugin_manager_cleanup ();
-
self = CC_BLUETOOTH_PANEL (object);
g_cancellable_cancel (self->priv->cancellable);
g_clear_object (&self->priv->cancellable);
@@ -274,47 +271,6 @@ set_notebook_page (CcBluetoothPanel *self,
}
static void
-add_extra_setup_widgets (CcBluetoothPanel *self,
- const char *bdaddr)
-{
- GValue value = { 0 };
- char **uuids;
- GList *list, *l;
- GtkWidget *container;
-
- if (bluetooth_chooser_get_selected_device_info (BLUETOOTH_CHOOSER (self->priv->chooser),
- "uuids", &value) == FALSE)
- return;
-
- uuids = (char **) g_value_get_boxed (&value);
- list = bluetooth_plugin_manager_get_widgets (bdaddr, (const char **) uuids);
- if (list == NULL) {
- g_value_unset (&value);
- return;
- }
-
- container = WID ("additional_setup_box");
- for (l = list; l != NULL; l = l->next) {
- GtkWidget *widget = l->data;
- gtk_box_pack_start (GTK_BOX (container), widget,
- FALSE, FALSE, 0);
- gtk_widget_show_all (widget);
- }
- gtk_widget_show (container);
- g_value_unset (&value);
-}
-
-static void
-remove_extra_setup_widgets (CcBluetoothPanel *self)
-{
- GtkWidget *box;
-
- box = WID ("additional_setup_box");
- gtk_container_forall (GTK_CONTAINER (box), (GtkCallback) gtk_widget_destroy, NULL);
- gtk_widget_hide (WID ("additional_setup_box"));
-}
-
-static void
cc_bluetooth_panel_update_properties (CcBluetoothPanel *self)
{
char *bdaddr;
@@ -331,10 +287,6 @@ cc_bluetooth_panel_update_properties (CcBluetoothPanel *self)
bdaddr = bluetooth_chooser_get_selected_device (BLUETOOTH_CHOOSER (self->priv->chooser));
- /* Remove the extra setup widgets */
- if (g_strcmp0 (self->priv->selected_bdaddr, bdaddr) != 0)
- remove_extra_setup_widgets (self);
-
if (bdaddr == NULL) {
gtk_widget_set_sensitive (WID ("properties_vbox"), FALSE);
gtk_switch_set_active (button, FALSE);
@@ -408,10 +360,6 @@ cc_bluetooth_panel_update_properties (CcBluetoothPanel *self)
;
}
- /* Extra widgets */
- if (g_strcmp0 (self->priv->selected_bdaddr, bdaddr) != 0)
- add_extra_setup_widgets (self, bdaddr);
-
gtk_label_set_text (GTK_LABEL (WID ("address_label")), bdaddr);
gtk_widget_set_sensitive (WID ("button_delete"), TRUE);
@@ -715,10 +663,8 @@ delete_clicked (GtkToolButton *button,
name = bluetooth_chooser_get_selected_device_name (BLUETOOTH_CHOOSER (self->priv->chooser));
- if (show_confirm_dialog (self, name) != FALSE) {
- if (remove_selected_device (self))
- bluetooth_plugin_manager_device_deleted (address);
- }
+ if (show_confirm_dialog (self, name) != FALSE)
+ remove_selected_device (self);
g_free (address);
g_free (name);
@@ -795,7 +741,6 @@ cc_bluetooth_panel_init (CcBluetoothPanel *self)
self->priv = BLUETOOTH_PANEL_PRIVATE (self);
g_resources_register (cc_bluetooth_get_resource ());
- bluetooth_plugin_manager_init ();
self->priv->cancellable = g_cancellable_new ();
self->priv->killswitch = bluetooth_killswitch_new ();
self->priv->client = bluetooth_client_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]