diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2012-01-04 10:40:44 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2012-01-04 10:40:44 +0000 |
commit | a007678f344943d6ea86392723004a3a72320d9e (patch) | |
tree | 5d92b359914fc32906cd81c49dd86eacb0bd818d /src/trg-client.c | |
parent | 950b833d5c7c63fddd32da986a83a9eb7215c9f4 (diff) |
make the torrent add tree view and the files tree view fairly consistent, sharing code where possible. this allows changing priority and enabled using a directory. expand/collapse all buttons. the one taken from Transmission for torrent add dialog now has menus and the mime icons. may be bugs here, I know there's one with directories appearing as mixed and not updating upwards properly, but it's a start.
Diffstat (limited to 'src/trg-client.c')
-rw-r--r-- | src/trg-client.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/trg-client.c b/src/trg-client.c index 05cd148..0b1d1f6 100644 --- a/src/trg-client.c +++ b/src/trg-client.c @@ -443,14 +443,11 @@ static size_t header_callback(void *ptr, size_t size, size_t nmemb, void *data) } static void trg_tls_update(TrgClient * tc, trg_tls * tls, gint serial) { - TrgPrefs *prefs = trg_client_get_prefs(tc); gchar *proxy; curl_easy_setopt(tls->curl, CURLOPT_PASSWORD, trg_client_get_password(tc)); curl_easy_setopt(tls->curl, CURLOPT_USERNAME, trg_client_get_username(tc)); curl_easy_setopt(tls->curl, CURLOPT_URL, trg_client_get_url(tc)); - curl_easy_setopt(tls->curl, CURLOPT_TIMEOUT, - trg_prefs_get_int(prefs, TRG_PREFS_KEY_TIMEOUT, TRG_PREFS_CONNECTION)); #ifndef CURL_NO_SSL if (trg_client_get_ssl(tc)) @@ -484,6 +481,7 @@ trg_tls *trg_tls_new(TrgClient * tc) { static int trg_http_perform_inner(TrgClient * tc, gchar * reqstr, trg_response * response, gboolean recurse) { TrgClientPrivate *priv = TRG_CLIENT_GET_PRIVATE(tc); + TrgPrefs *prefs = trg_client_get_prefs(tc); gpointer threadLocalStorage = g_private_get(priv->tlsKey); trg_tls *tls; long httpCode = 0; @@ -508,6 +506,9 @@ static int trg_http_perform_inner(TrgClient * tc, gchar * reqstr, curl_easy_setopt(tls->curl, CURLOPT_HTTPHEADER, headers); } + curl_easy_setopt(tls->curl, CURLOPT_TIMEOUT, + (long)trg_prefs_get_int(prefs, TRG_PREFS_KEY_TIMEOUT, TRG_PREFS_CONNECTION)); + g_mutex_unlock(priv->configMutex); response->size = 0; |