[gnome-bluetooth] lib: Small fixes to chooser button
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] lib: Small fixes to chooser button
- Date: Mon, 7 Feb 2011 00:05:36 +0000 (UTC)
commit 82b97d1e2fc2c2e9e8c32a955cd4be82cac0d427
Author: Bastien Nocera <hadess hadess net>
Date: Mon Feb 7 00:00:44 2011 +0000
lib: Small fixes to chooser button
There's no need to set the label on startup, if we don't already
have one.
lib/bluetooth-chooser-button.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/lib/bluetooth-chooser-button.c b/lib/bluetooth-chooser-button.c
index 533671e..4c3707d 100644
--- a/lib/bluetooth-chooser-button.c
+++ b/lib/bluetooth-chooser-button.c
@@ -244,7 +244,7 @@ default_adapter_changed (GObject *object, GParamSpec *pspec, gpointer data)
else
button->is_available = FALSE;
- if (adapter != NULL)
+ if (adapter != NULL && button->bdaddr != NULL)
set_btdevname (button, button->bdaddr, NULL, NULL);
g_free (adapter);
@@ -367,7 +367,7 @@ bluetooth_chooser_button_class_init (BluetoothChooserButtonClass *klass)
static void
bluetooth_chooser_button_init (BluetoothChooserButton *button)
{
- gtk_button_set_label (GTK_BUTTON (button), _("Click to select device..."));
+ gtk_button_set_label (GTK_BUTTON (button), _(DEFAULT_STR));
button->image = gtk_image_new ();
gtk_button_set_image (GTK_BUTTON (button), button->image);
@@ -383,8 +383,6 @@ bluetooth_chooser_button_init (BluetoothChooserButton *button)
/* And set the default value already */
default_adapter_changed (NULL, NULL, button);
-
- set_btdevname (button, NULL, NULL, NULL);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]