From a007678f344943d6ea86392723004a3a72320d9e Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Wed, 4 Jan 2012 10:40:44 +0000 Subject: 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. --- src/trg-client.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/trg-client.c') 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; -- cgit v1.2.3