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

Proposed by Kai-Heng Feng on 2016-05-19
Status: Merged
Approved by: Sebastien Bacher on 2016-05-24
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 2016-05-19 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.
Sebastien Bacher (seb128) wrote :

Looks good, thanks

Sebastien Bacher (seb128) wrote :

that fixes bug #1492443 right?

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
1=== modified file 'panels/bluetooth/gnome-bluetooth/wizard/main.c'
2--- panels/bluetooth/gnome-bluetooth/wizard/main.c 2015-09-18 16:40:51 +0000
3+++ panels/bluetooth/gnome-bluetooth/wizard/main.c 2016-05-19 11:49:25 +0000
4@@ -500,13 +500,31 @@
5 const char *pincode,
6 gpointer user_data)
7 {
8- g_debug ("Reject bluetoothd PIN %s", pincode);
9-
10- /* Reject all the calls here, so that we'll get asked about the
11- * pincode instead of being told the pincode */
12- g_dbus_method_invocation_return_dbus_error (invocation,
13- "org.bluez.Error.Rejected",
14- "Rejected bluetoothd generated PIN code");
15+ gchar *text, *label;
16+
17+ display_called = TRUE;
18+ gtk_assistant_set_current_page (window_assistant, PAGE_SSP_SETUP);
19+
20+ replace_target_properties_for_device (device);
21+
22+ gtk_widget_show (label_ssp_pin);
23+
24+ if (target_ui_behaviour == PAIRING_UI_KEYBOARD) {
25+ label = g_strdup_printf (_("Please enter the following PIN on '%s' and press “Enter” on the keyboard:"), target_name);
26+ text = g_strdup_printf("%s⏎", pincode);
27+ }
28+ else {
29+ label = g_strdup_printf (_("Please enter the following PIN on '%s':"), target_name);
30+ text = g_strdup_printf("%s", pincode);
31+ }
32+
33+ gtk_label_set_markup(GTK_LABEL(label_ssp_pin_help), label);
34+ set_large_label (GTK_LABEL (label_ssp_pin), text);
35+
36+ g_free(text);
37+ g_free(label);
38+
39+ g_dbus_method_invocation_return_value (invocation, NULL);
40 }
41
42 static gboolean

Subscribers

People subscribed via source and target branches