1
0
gnome-bluetooth/gnome-bluetooth-fix-stuck-finish-page.patch

50 lines
1.8 KiB
Diff

From f0a95b5d28ff55e9ed4b148d9872645ae3d8e049 Mon Sep 17 00:00:00 2001
From: Sjoerd Simons <sjoerd@luon.net>
Date: Sat, 30 Jun 2012 14:27:47 +0200
Subject: [PATCH 2/2] When bailing from a connect attempt use
_complete_in_idle
Currently bluetooth_client_connect_service complets it async operation
directly when bailing (e.g. we don't have connectable service on the
remote device). This causes the bluetooth wizard to get stuck in the
Finishing page as it happens to go to this page *after* calling
bluetooth_client_connect_service.
Simply make the async operation complete asynchronously (like it should)
and everything is happy again :)
---
lib/bluetooth-client.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index 21bcd38..114f9ad 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -547,12 +547,15 @@ add_device (Adapter *adapter,
v = g_variant_lookup_value (ret, "Alias", G_VARIANT_TYPE_STRING);
alias = v ? g_variant_get_string (v, NULL) : NULL;
+ printf ("Alias: %s\n", alias);
v = g_variant_lookup_value (ret, "Name", G_VARIANT_TYPE_STRING);
name = v ? g_variant_get_string (v, NULL) : NULL;
+ printf ("Name: %s\n", name);
v = g_variant_lookup_value (ret, "Class", G_VARIANT_TYPE_UINT32);
type = v ? bluetooth_class_to_type (g_variant_get_uint32 (v)) : BLUETOOTH_TYPE_ANY;
+ printf ("Class: %x\n", g_variant_get_uint32 (v));
v = g_variant_lookup_value (ret, "Icon", G_VARIANT_TYPE_STRING);
icon = v ? g_variant_get_string (v, NULL) : "bluetooth";
@@ -1870,7 +1873,7 @@ bluetooth_client_connect_service (BluetoothClient *client,
bail:
g_simple_async_result_set_op_res_gboolean (simple, res);
- g_simple_async_result_complete (simple);
+ g_simple_async_result_complete_in_idle (simple);
g_object_unref (simple);
}
--
1.7.10