From 79cd86dbfd5b2ea0963c84b48088ec189acfc795 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Sun, 18 Sep 2011 16:21:04 +0000 Subject: Big changeset, may break stuff. Unfortunately you can't magically jump into the UI thread using gdk_threads_enter/leave() on Windows, the only way is to schedule a callback using g_idle_add. This required a lot of reworking. Good news, Windows support actually works now \o/ --- src/trg-torrent-add-dialog.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/trg-torrent-add-dialog.c') diff --git a/src/trg-torrent-add-dialog.c b/src/trg-torrent-add-dialog.c index d02b4e6..9dc69b7 100644 --- a/src/trg-torrent-add-dialog.c +++ b/src/trg-torrent-add-dialog.c @@ -39,7 +39,6 @@ #include "requests.h" #include "torrent.h" #include "json.h" -#include "dispatch.h" #include "protocol-constants.h" enum { @@ -146,16 +145,14 @@ static gpointer add_files_threadfunc(gpointer data) JsonNode *request = torrent_add(fileName, files_thread_data->flags); JsonObject *args = node_get_arguments(request); - JsonObject *response; - gint status; + trg_response *response; if (files_thread_data->extraArgs) add_set_common_args(args, files_thread_data->priority, files_thread_data->dir); - response = dispatch(files_thread_data->client, request, &status); - on_generic_interactive_action(response, status, - files_thread_data->cb_data); + response = dispatch(files_thread_data->client, request); + on_generic_interactive_action(response); } g_str_slist_free(files_thread_data->list); -- cgit v1.2.3