>From a99222b4c0b505f5a0fc2a564977bf3be71a6c86 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 14 Oct 2008 17:59:58 +0100 Subject: [PATCH] Fix trust button The trust button toggles the trust for a device, so the label should reflect the action to take when clicked. Changed the label to "Trust"/"Distrust" to avoid the widgets moving about when toggling the trust status. --- properties/adapter.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/properties/adapter.c b/properties/adapter.c index 0174716..b744a20 100644 --- a/properties/adapter.c +++ b/properties/adapter.c @@ -216,6 +216,11 @@ static gboolean focus_callback(GtkWidget *editable, static void update_buttons(struct adapter_data *adapter, gboolean bonded, gboolean trusted, 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_delete, bonded); gtk_widget_set_sensitive(adapter->button_disconnect, connected); } @@ -666,7 +671,7 @@ static void create_adapter(struct adapter_data *adapter) adapter->button_disconnect = button; - button = gtk_button_new_with_label(_("Add to Trusted")); + 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); -- 1.5.5.2