Merge lp:~kaihengfeng/unity-control-center/fix-bt-keyboard-pairing into lp:unity-control-center

Proposed by Kai-Heng Feng
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 12865
Merged at revision: 12865
Proposed branch: lp:~kaihengfeng/unity-control-center/fix-bt-keyboard-pairing
Merge into: lp:unity-control-center
Diff against target: 42 lines (+25/-7)
1 file modified
panels/bluetooth/gnome-bluetooth/wizard/main.c (+25/-7)
To merge this branch: bzr merge lp:~kaihengfeng/unity-control-center/fix-bt-keyboard-pairing
Reviewer Review Type Date Requested Status
Unity Control Center development team Pending
Review via email: mp+295206@code.launchpad.net

Commit message

bluetooh: fix keyboard pairing issue.
Maurizio Gobbo (gibbio) is the original author.

Description of the change

bluetooh: fix Bluetooth 2.1 keyboard pairing issue.
Maurizio Gobbo (gibbio) is the original author.

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Looks good, thanks

Revision history for this message
Sebastien Bacher (seb128) wrote :

that fixes bug #1492443 right?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Yes, kudos to Maurizio.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'panels/bluetooth/gnome-bluetooth/wizard/main.c'
--- panels/bluetooth/gnome-bluetooth/wizard/main.c 2015-09-18 16:40:51 +0000
+++ panels/bluetooth/gnome-bluetooth/wizard/main.c 2016-05-19 11:49:25 +0000
@@ -500,13 +500,31 @@
500 const char *pincode,500 const char *pincode,
501 gpointer user_data)501 gpointer user_data)
502{502{
503 g_debug ("Reject bluetoothd PIN %s", pincode);503 gchar *text, *label;
504504
505 /* Reject all the calls here, so that we'll get asked about the505 display_called = TRUE;
506 * pincode instead of being told the pincode */506 gtk_assistant_set_current_page (window_assistant, PAGE_SSP_SETUP);
507 g_dbus_method_invocation_return_dbus_error (invocation,507
508 "org.bluez.Error.Rejected",508 replace_target_properties_for_device (device);
509 "Rejected bluetoothd generated PIN code");509
510 gtk_widget_show (label_ssp_pin);
511
512 if (target_ui_behaviour == PAIRING_UI_KEYBOARD) {
513 label = g_strdup_printf (_("Please enter the following PIN on '%s' and press “Enter” on the keyboard:"), target_name);
514 text = g_strdup_printf("%s⏎", pincode);
515 }
516 else {
517 label = g_strdup_printf (_("Please enter the following PIN on '%s':"), target_name);
518 text = g_strdup_printf("%s", pincode);
519 }
520
521 gtk_label_set_markup(GTK_LABEL(label_ssp_pin_help), label);
522 set_large_label (GTK_LABEL (label_ssp_pin), text);
523
524 g_free(text);
525 g_free(label);
526
527 g_dbus_method_invocation_return_value (invocation, NULL);
510}528}
511529
512static gboolean530static gboolean

Subscribers

People subscribed via source and target branches