summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-12-09 12:46:51 +0100
committerBastien Nocera <hadess@hadess.net>2022-12-09 13:50:05 +0100
commitfaab282588f7aaab2a8c1e3793dbe133c246ec9a (patch)
tree6c5eb52812d20c79598ab81612bacc14c6ad0456
parent73d9dddc28c8856a64dcec6c3a08b8a246554817 (diff)
downloadgnome-bluetooth-faab282588f7aaab2a8c1e3793dbe133c246ec9a.tar.gz
pairing-dialog: Fix getting the invisible char
As mentioned in the previous commit, the invisible character will only be set to non-zero if the entry is set to show invisible characters. Make sure to set the entry to hide characters so the invisible character is set to a usable value.
-rw-r--r--lib/bluetooth-pairing-dialog.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bluetooth-pairing-dialog.c b/lib/bluetooth-pairing-dialog.c
index ab70d181..4fe475e9 100644
--- a/lib/bluetooth-pairing-dialog.c
+++ b/lib/bluetooth-pairing-dialog.c
@@ -72,6 +72,7 @@ bluetooth_pairing_dialog_set_mode (BluetoothPairingDialog *self,
g_clear_pointer (&priv->pin, g_free);
priv->pin = g_strdup (pin);
gtk_editable_set_text (GTK_EDITABLE (priv->entry_pin), pin ? pin : "");
+ gtk_entry_set_visibility (GTK_ENTRY (priv->entry_pin), TRUE);
gtk_label_set_text (GTK_LABEL (priv->label_pin), pin);
switch (mode) {
@@ -124,6 +125,8 @@ bluetooth_pairing_dialog_set_mode (BluetoothPairingDialog *self,
break;
case BLUETOOTH_PAIRING_MODE_PIN_DISPLAY_KEYBOARD:
help = g_strdup_printf (_("Please enter the following PIN on “%s”. Then press “Return” on the keyboard."), device_name);
+ /* populate the invisible character */
+ gtk_entry_set_visibility (GTK_ENTRY (priv->entry_pin), FALSE);
break;
case BLUETOOTH_PAIRING_MODE_PIN_DISPLAY_ICADE:
help = g_strdup (_("Please move the joystick of your iCade in the following directions. Then press any of the white buttons."));