Changeset 1403
- Timestamp:
- 01/13/07 17:27:36
- Files:
-
- trunk/libtinymail-camel/tny-camel-account.c (modified) (10 diffs)
- trunk/libtinymail-camel/tny-session-camel.c (modified) (14 diffs)
- trunk/libtinymailui-gtk/tny-gtk-lockable.c (modified) (2 diffs)
- trunk/tinymail/tny-main.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libtinymail-camel/tny-camel-account.c
r1401 r1403 291 291 TnyCamelAccountPriv *priv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (self); 292 292 293 g_static_rec_mutex_lock (priv->service_lock);294 295 293 if (G_UNLIKELY (priv->id)) 296 294 g_free (priv->id); 297 295 298 296 priv->id = g_strdup (id); 299 300 g_static_rec_mutex_unlock (priv->service_lock);301 297 302 298 return; … … 338 334 { 339 335 TnyCamelAccountPriv *priv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (self); 340 336 341 337 g_static_rec_mutex_lock (priv->service_lock); 342 338 … … 439 435 const gchar *retval; 440 436 441 g_static_rec_mutex_lock (priv->service_lock);442 437 retval = (const gchar*)priv->id; 443 g_static_rec_mutex_unlock (priv->service_lock);444 438 445 439 return retval; … … 457 451 TnyCamelAccountPriv *priv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (self); 458 452 const gchar *retval; 459 460 g_static_rec_mutex_lock (priv->service_lock); 453 461 454 retval = (const gchar*)priv->proto; 462 g_static_rec_mutex_unlock (priv->service_lock);463 455 464 456 return retval; … … 477 469 const gchar *retval; 478 470 479 g_static_rec_mutex_lock (priv->service_lock);480 471 retval = (const gchar*)priv->user; 481 g_static_rec_mutex_unlock (priv->service_lock);482 472 483 473 return retval; … … 496 486 const gchar *retval; 497 487 498 g_static_rec_mutex_lock (priv->service_lock);499 488 retval = (const gchar*)priv->host; 500 g_static_rec_mutex_unlock (priv->service_lock);501 489 502 490 return retval; … … 515 503 TnyGetPassFunc retval; 516 504 517 g_static_rec_mutex_lock (priv->service_lock);518 505 retval = priv->get_pass_func; 519 g_static_rec_mutex_unlock (priv->service_lock);520 506 521 507 return retval; … … 534 520 TnyForgetPassFunc retval; 535 521 536 g_static_rec_mutex_lock (priv->service_lock);537 522 retval = priv->forget_pass_func; 538 g_static_rec_mutex_unlock (priv->service_lock);539 523 540 524 return retval; … … 547 531 const CamelService *retval; 548 532 549 g_static_rec_mutex_lock (priv->service_lock);550 533 retval = (const CamelService *)priv->service; 551 g_static_rec_mutex_unlock (priv->service_lock);552 534 553 535 return retval; … … 560 542 const gchar *retval; 561 543 562 g_static_rec_mutex_lock (priv->service_lock);563 544 retval = (const gchar*)priv->url_string; 564 g_static_rec_mutex_unlock (priv->service_lock);565 545 566 546 return retval; trunk/libtinymail-camel/tny-session-camel.c
r1402 r1403 198 198 mark_del = g_list_next (mark_del); 199 199 } 200 201 200 g_list_free (mark_del); 202 201 } … … 217 216 } GetPassWaitResults; 218 217 219 static gboolean 220 get_pwd_idle_handler (gpointer data) 218 219 static gpointer 220 get_pwd_thread (gpointer data) 221 221 { 222 222 GetPassWaitResults *results = data; … … 228 228 g_main_loop_quit (results->loop); 229 229 230 return FALSE;231 }232 233 static gpointer234 get_pwd_thread (gpointer results)235 {236 g_idle_add (get_pwd_idle_handler, results);237 230 g_thread_exit (NULL); 238 231 return NULL; … … 297 290 298 291 thread = g_thread_create (get_pwd_thread, &results, TRUE, NULL); 299 g_thread_join (thread);300 292 301 293 if (g_main_loop_is_running (results.loop)) … … 305 297 tny_lockable_lock (priv->ui_lock); 306 298 } 307 308 299 g_main_loop_unref (results.loop); 300 301 tny_lockable_unlock (priv->ui_lock); 302 tny_lockable_lock (priv->ui_lock); 309 303 310 304 retval = results.data; … … 344 338 return; 345 339 } 346 347 340 348 341 … … 355 348 } ForGetPassWaitResults; 356 349 357 static gboolean 358 forget_pwd_idle_handler (gpointer data) 350 351 static gpointer 352 forget_pwd_thread (gpointer data) 359 353 { 360 354 ForGetPassWaitResults *results = data; … … 366 360 g_main_loop_quit (results->loop); 367 361 368 return FALSE;369 }370 371 static gpointer372 forget_pwd_thread (gpointer results)373 {374 g_idle_add (forget_pwd_idle_handler, results);375 362 g_thread_exit (NULL); 376 363 return NULL; … … 411 398 results.account = account; 412 399 results.func = func; 413 414 400 results.loop = g_main_loop_new (NULL, TRUE); 415 401 416 402 thread = g_thread_create (forget_pwd_thread, &results, TRUE, NULL); 417 g_thread_join (thread); 418 403 419 404 if (g_main_loop_is_running (results.loop)) 420 405 { … … 423 408 tny_lockable_lock (priv->ui_lock); 424 409 } 425 426 410 g_main_loop_unref (results.loop); 411 412 tny_lockable_unlock (priv->ui_lock); 413 tny_lockable_lock (priv->ui_lock); 427 414 428 415 priv->in_auth_function = FALSE; … … 443 430 } AlertWaitResults; 444 431 445 static gboolean 446 alert_idle_handler (gpointer data) 432 433 static gpointer 434 alert_thread (gpointer data) 447 435 { 448 436 AlertWaitResults *results = data; … … 456 444 g_main_loop_quit (results->loop); 457 445 458 return FALSE;459 }460 461 static gpointer462 alert_thread (gpointer results)463 {464 g_idle_add (alert_idle_handler, results);465 446 g_thread_exit (NULL); 466 447 return NULL; … … 509 490 510 491 thread = g_thread_create (alert_thread, &results, TRUE, NULL); 511 g_thread_join (thread);512 492 513 493 if (g_main_loop_is_running (results.loop)) … … 517 497 tny_lockable_lock (priv->ui_lock); 518 498 } 519 520 499 g_main_loop_unref (results.loop); 500 501 tny_lockable_unlock (priv->ui_lock); 502 tny_lockable_lock (priv->ui_lock); 521 503 522 504 priv->in_auth_function = FALSE; trunk/libtinymailui-gtk/tny-gtk-lockable.c
r1399 r1403 30 30 { 31 31 gdk_threads_enter (); 32 gdk_flush (); 32 33 } 33 34 … … 35 36 tny_gtk_lockable_unlock (TnyLockable *self) 36 37 { 38 gdk_flush (); 37 39 gdk_threads_leave (); 38 40 } trunk/tinymail/tny-main.c
r900 r1403 84 84 gdk_threads_init (); 85 85 86 gdk_threads_enter (); 87 88 gtk_init (&argc, &argv); 89 86 90 #ifdef GNOME 87 91 gnome_vfs_init (); … … 130 134 gtk_main(); 131 135 136 gdk_threads_leave (); 137 132 138 #ifdef MOZEMBED 133 PR_ProcessExit ((PRIntn)(long)0); 139 PR_ProcessExit ((PRIntn)(long)0); 134 140 #endif 135 141
