diff options
author | Bastien Nocera <hadess@hadess.net> | 2011-10-18 15:53:27 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2011-10-18 16:55:47 +0100 |
commit | 5a0b12bee2d342dba8bffc04ba7ee7bf112787d2 (patch) | |
tree | 82bc0bc70d37a2c2613bca42a3b0bcf8b424aba4 /wizard/main.c | |
parent | 3aef7a40d36527ec7c6ac3a6ea621706b2fb2ce5 (diff) | |
download | gnome-bluetooth-5a0b12bee2d342dba8bffc04ba7ee7bf112787d2.tar.gz |
wizard: Update for the new connect API
Diffstat (limited to 'wizard/main.c')
-rw-r--r-- | wizard/main.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/wizard/main.c b/wizard/main.c index 812a3772..2b55f690 100644 --- a/wizard/main.c +++ b/wizard/main.c @@ -339,15 +339,17 @@ typedef struct { } ConnectData; static void -connect_callback (BluetoothClient *_client, - gboolean success, - gpointer user_data) +connect_callback (GObject *source_object, + GAsyncResult *res, + gpointer user_data) { ConnectData *data = (ConnectData *) user_data; + gboolean success; + + success = bluetooth_client_connect_service_finish (client, res, NULL); if (success == FALSE && g_timer_elapsed (data->timer, NULL) < CONNECT_TIMEOUT) { - if (bluetooth_client_connect_service(client, data->path, connect_callback, data) != FALSE) - return; + bluetooth_client_connect_service (client, data->path, TRUE, NULL, connect_callback, data); } if (success == FALSE) @@ -394,14 +396,8 @@ create_callback (BluetoothClient *_client, data->path = g_strdup (path); data->timer = g_timer_new (); - if (bluetooth_client_connect_service(client, path, connect_callback, data) != FALSE) { - gtk_assistant_set_current_page (window_assistant, PAGE_FINISHING); - } else { - gtk_assistant_set_current_page (window_assistant, PAGE_SUMMARY); - g_timer_destroy (data->timer); - g_free (data->path); - g_free (data); - } + bluetooth_client_connect_service (client, path, TRUE, NULL, connect_callback, data); + gtk_assistant_set_current_page (window_assistant, PAGE_FINISHING); } void |