gnome-bluetooth r480 - trunk/properties
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-bluetooth r480 - trunk/properties
- Date: Fri, 13 Mar 2009 14:46:20 +0000 (UTC)
Author: hadess
Date: Fri Mar 13 14:46:20 2009
New Revision: 480
URL: http://svn.gnome.org/viewvc/gnome-bluetooth?rev=480&view=rev
Log:
Remove the trust/distrust button
It's an implementation detail.
Modified:
trunk/properties/adapter.c
Modified: trunk/properties/adapter.c
==============================================================================
--- trunk/properties/adapter.c (original)
+++ trunk/properties/adapter.c Fri Mar 13 14:46:20 2009
@@ -55,7 +55,6 @@
GtkWidget *name_vbox, *devices_table;
GtkWidget *entry;
GtkWidget *button_delete;
- GtkWidget *button_trusted;
GtkWidget *button_disconnect;
GtkTreeSelection *selection;
GtkTreeRowReference *reference;
@@ -181,14 +180,8 @@
return FALSE;
}
-static void update_buttons(adapter_data *adapter, gboolean bonded,
- gboolean trusted, gboolean connected)
+static void update_buttons(adapter_data *adapter, gboolean bonded, gboolean connected)
{
- if (trusted) {
- gtk_button_set_label(GTK_BUTTON(adapter->button_trusted), _("Distrust"));
- } else {
- gtk_button_set_label(GTK_BUTTON(adapter->button_trusted), _("Trust"));
- }
gtk_widget_set_sensitive(adapter->button_disconnect, connected);
}
@@ -199,7 +192,7 @@
GtkTreeModel *model;
GtkTreeIter iter;
gboolean selected;
- gboolean paired = FALSE, trusted = FALSE, connected = FALSE;
+ gboolean paired = FALSE, connected = FALSE;
selected = gtk_tree_selection_get_selected(selection, &model, &iter);
@@ -207,7 +200,6 @@
gtk_tree_model_get(model, &iter,
BLUETOOTH_COLUMN_PROXY, &proxy,
BLUETOOTH_COLUMN_PAIRED, &paired,
- BLUETOOTH_COLUMN_TRUSTED, &trusted,
BLUETOOTH_COLUMN_CONNECTED, &connected, -1);
if (proxy != NULL) {
@@ -216,9 +208,8 @@
}
}
- update_buttons(adapter, paired, trusted, connected);
+ update_buttons(adapter, paired, connected);
- gtk_widget_set_sensitive(adapter->button_trusted, selected);
gtk_widget_set_sensitive(adapter->button_delete, selected);
}
@@ -226,17 +217,16 @@
GtkTreeIter *iter, gpointer user_data)
{
adapter_data *adapter = user_data;
- gboolean bonded = FALSE, trusted = FALSE, connected = FALSE;
+ gboolean bonded = FALSE, connected = FALSE;
if (gtk_tree_selection_iter_is_selected(adapter->selection,
iter) == FALSE)
return;
gtk_tree_model_get(model, iter, BLUETOOTH_COLUMN_PAIRED, &bonded,
- BLUETOOTH_COLUMN_TRUSTED, &trusted,
BLUETOOTH_COLUMN_CONNECTED, &connected, -1);
- update_buttons(adapter, bonded, trusted, connected);
+ update_buttons(adapter, bonded, connected);
gtk_widget_set_sensitive(adapter->button_delete, TRUE);
}
@@ -307,38 +297,6 @@
g_object_unref(device);
}
-static void trusted_callback(GtkWidget *button, gpointer user_data)
-{
- adapter_data *adapter = user_data;
- GValue value = { 0 };
- GtkTreeModel *model;
- GtkTreeIter iter;
- DBusGProxy *device;
- gboolean trusted = FALSE;
-
- if (gtk_tree_selection_get_selected(adapter->selection,
- &model, &iter) == FALSE)
- return;
-
- gtk_tree_model_get(model, &iter, BLUETOOTH_COLUMN_PROXY, &device,
- BLUETOOTH_COLUMN_TRUSTED, &trusted, -1);
-
- if (device == NULL)
- return;
-
- g_value_init(&value, G_TYPE_BOOLEAN);
-
- g_value_set_boolean(&value, !trusted);
-
- dbus_g_proxy_call(device, "SetProperty", NULL,
- G_TYPE_STRING, "Trusted",
- G_TYPE_VALUE, &value, G_TYPE_INVALID, G_TYPE_INVALID);
-
- g_value_unset(&value);
-
- g_object_unref(device);
-}
-
static void disconnect_callback(GtkWidget *button, gpointer user_data)
{
adapter_data *adapter = user_data;
@@ -565,20 +523,6 @@
adapter->button_disconnect = button;
- button = gtk_button_new_with_label(_("Trust"));
- image = gtk_image_new_from_stock(GTK_STOCK_ABOUT,
- GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image(GTK_BUTTON(button), image);
- gtk_box_pack_end(GTK_BOX(buttonbox), button, FALSE, FALSE, 0);
- gtk_button_box_set_child_secondary(GTK_BUTTON_BOX(buttonbox),
- button, TRUE);
- gtk_widget_set_sensitive(button, FALSE);
-
- g_signal_connect(G_OBJECT(button), "clicked",
- G_CALLBACK(trusted_callback), adapter);
-
- adapter->button_trusted = button;
-
button = gtk_button_new_with_label(_("Delete"));
image = gtk_image_new_from_stock(GTK_STOCK_DELETE,
GTK_ICON_SIZE_BUTTON);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]