diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-09-18 16:21:04 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-09-18 16:21:04 +0000 |
commit | 79cd86dbfd5b2ea0963c84b48088ec189acfc795 (patch) | |
tree | 535769200823fdaa1fec9795fe986668cb33bdee /src/trg-torrent-add-dialog.c | |
parent | 63763bb00502e3c235e478ec50e097904c774696 (diff) |
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/
Diffstat (limited to 'src/trg-torrent-add-dialog.c')
-rw-r--r-- | src/trg-torrent-add-dialog.c | 9 |
1 files changed, 3 insertions, 6 deletions
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); |