Changeset 3727
- Timestamp:
- 07/23/08 13:45:54
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
releases/modest/diablo-pe2/ChangeLog
r3724 r3727 1 2008-07-23 Sergio Villar Senin <svillar@igalia.com> 2 3 * libtinymail-camel/tny-camel-account.c 4 (_tny_camel_account_start_camel_operation_n): added a missing 5 camel_operation_register that was preventing progress info to be 6 threw up and cancelations as well. 7 8 * libtinymail-camel/tny-camel-folder.c: added progress information 9 to get_headers_async function. 10 1 11 2008-07-21 Jose Dapena Paz <jdapena@igalia.com> 2 12 releases/modest/diablo-pe2/libtinymail-camel/tny-camel-account.c
r3710 r3727 782 782 priv->cancel = camel_operation_new (func, user_data); 783 783 784 camel_operation_register (priv->cancel); 784 785 camel_operation_start (priv->cancel, (char*)what); 785 786 releases/modest/diablo-pe2/libtinymail-camel/tny-camel-folder.c
r3710 r3727 2150 2150 gboolean refresh; 2151 2151 TnyGetHeadersCallback callback; 2152 TnyStatusCallback status_callback; 2152 2153 gpointer user_data; 2153 2154 TnySessionCamel *session; 2154 2155 gboolean cancelled; 2156 TnyIdleStopper *stopper; 2155 2157 2156 2158 } GetHeadersInfo; … … 2170 2172 if (info->err) 2171 2173 g_error_free (info->err); 2174 2175 tny_idle_stopper_destroy (info->stopper); 2176 info->stopper = NULL; 2172 2177 2173 2178 /**/ … … 2187 2192 tny_lockable_unlock (info->session->priv->ui_lock); 2188 2193 } 2194 tny_idle_stopper_stop (info->stopper); 2195 2189 2196 return FALSE; 2190 2197 } 2198 2199 static void 2200 tny_camel_folder_get_headers_async_status (struct _CamelOperation *op, const char *what, int sofar, int oftotal, void *thr_user_data) 2201 { 2202 GetHeadersInfo *oinfo = thr_user_data; 2203 TnyProgressInfo *info = NULL; 2204 2205 info = tny_progress_info_new (G_OBJECT (oinfo->self), oinfo->status_callback, 2206 TNY_FOLDER_STATUS, TNY_FOLDER_STATUS_CODE_GET_MSG, what, sofar, 2207 oftotal, oinfo->stopper, oinfo->session->priv->ui_lock, oinfo->user_data); 2208 2209 g_idle_add_full (TNY_PRIORITY_LOWER_THAN_GTK_REDRAWS, 2210 tny_progress_info_idle_func, info, 2211 tny_progress_info_destroy); 2212 2213 return; 2214 } 2215 2191 2216 2192 2217 static gpointer … … 2194 2219 { 2195 2220 GetHeadersInfo *info = (GetHeadersInfo*) thr_user_data; 2221 TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (info->self); 2222 2196 2223 info->err = NULL; 2224 info->cancelled = FALSE; 2225 2226 g_static_rec_mutex_lock (priv->folder_lock); 2227 2228 _tny_camel_account_start_camel_operation (TNY_CAMEL_ACCOUNT (priv->account), 2229 tny_camel_folder_get_headers_async_status, 2230 info, "Getting headers"); 2231 2197 2232 tny_folder_get_headers (info->self, info->headers, info->refresh, &info->err); 2198 info->cancelled = FALSE; 2233 2234 _tny_camel_account_stop_camel_operation (TNY_CAMEL_ACCOUNT (priv->account)); 2199 2235 2200 2236 if (info->err != NULL) { … … 2202 2238 info->cancelled = TRUE; 2203 2239 } 2240 2241 g_static_rec_mutex_unlock (priv->folder_lock); 2204 2242 2205 2243 return NULL; … … 2218 2256 g_object_unref (info->headers); 2219 2257 2220 /**/ 2258 tny_idle_stopper_destroy (info->stopper); 2259 info->stopper = NULL; 2221 2260 2222 2261 camel_object_unref (info->session); … … 2259 2298 info->refresh = refresh; 2260 2299 info->callback = callback; 2300 info->status_callback = status_callback; 2261 2301 info->user_data = user_data; 2262 2302 info->err = NULL; 2303 info->stopper = tny_idle_stopper_new(); 2263 2304 2264 2305 /* thread reference */ … … 2280 2321 info, sizeof (GetHeadersInfo), 2281 2322 TNY_CAMEL_QUEUE_PRIORITY_ITEM/*|TNY_CAMEL_QUEUE_CANCELLABLE_ITEM*/| 2282 TNY_CAMEL_QUEUE_GET_HEADERS_ITEM,2323 TNY_CAMEL_QUEUE_GET_HEADERS_ITEM, 2283 2324 __FUNCTION__); 2284 2325
