[gnome-bluetooth] settings: Make Enter work in pin confirmation dialogue
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] settings: Make Enter work in pin confirmation dialogue
- Date: Sat, 7 Dec 2013 10:31:08 +0000 (UTC)
commit 5d445a78221a9c6e1c620e350e36b2607ec7c419
Author: Bastien Nocera <hadess hadess net>
Date: Fri Dec 6 22:09:59 2013 +0100
settings: Make Enter work in pin confirmation dialogue
lib/bluetooth-pairing-dialog.c | 5 ++---
lib/settings.ui | 1 +
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/lib/bluetooth-pairing-dialog.c b/lib/bluetooth-pairing-dialog.c
index 7d3e8b9..57809ff 100644
--- a/lib/bluetooth-pairing-dialog.c
+++ b/lib/bluetooth-pairing-dialog.c
@@ -237,6 +237,7 @@ bluetooth_pairing_dialog_init (BluetoothPairingDialog *self)
priv->header = gtk_header_bar_new ();
gtk_header_bar_set_custom_title (GTK_HEADER_BAR (priv->header), gtk_label_new (""));
priv->done = gtk_button_new_with_label (_("Accept"));
+ gtk_widget_set_can_default (GTK_WIDGET (priv->done), TRUE);
g_signal_connect (G_OBJECT (priv->done), "clicked",
G_CALLBACK (response_cb), self);
gtk_header_bar_pack_end (GTK_HEADER_BAR (priv->header), priv->done);
@@ -246,9 +247,7 @@ bluetooth_pairing_dialog_init (BluetoothPairingDialog *self)
gtk_header_bar_pack_start (GTK_HEADER_BAR (priv->header), priv->cancel);
gtk_widget_show_all (priv->header);
gtk_window_set_titlebar (GTK_WINDOW (self), priv->header);
-
- //FIXME set default button
- gtk_widget_set_receives_default (GTK_WIDGET (priv->done), TRUE);
+ gtk_widget_grab_default (GTK_WIDGET (priv->done));
gtk_container_add (GTK_CONTAINER (container), WID ("pairing_dialog_box"));
priv->help_label = WID ("help_label");
diff --git a/lib/settings.ui b/lib/settings.ui
index 3fe2cb2..e207706 100644
--- a/lib/settings.ui
+++ b/lib/settings.ui
@@ -38,6 +38,7 @@
<property name="width_chars">6</property>
<property name="input_purpose">digits</property>
<property name="input_hints">GTK_INPUT_HINT_NO_SPELLCHECK | GTK_INPUT_HINT_NONE</property>
+ <property name="activates-default">True</property>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]