Revision 2337 libsylph/account.c
| account.c (revision 2337) | ||
|---|---|---|
| 1 | 1 |
/* |
| 2 | 2 |
* LibSylph -- E-Mail client library |
| 3 |
* Copyright (C) 1999-2006 Hiroyuki Yamamoto
|
|
| 3 |
* Copyright (C) 1999-2009 Hiroyuki Yamamoto
|
|
| 4 | 4 |
* |
| 5 | 5 |
* This library is free software; you can redistribute it and/or |
| 6 | 6 |
* modify it under the terms of the GNU Lesser General Public |
| ... | ... | |
| 35 | 35 |
#include "procmsg.h" |
| 36 | 36 |
#include "procheader.h" |
| 37 | 37 |
#include "utils.h" |
| 38 |
#include "sylmain.h" |
|
| 38 | 39 |
|
| 39 | 40 |
#define PREFSBUFSIZE 1024 |
| 40 | 41 |
|
| ... | ... | |
| 464 | 465 |
account_updated(); |
| 465 | 466 |
} |
| 466 | 467 |
|
| 468 |
static guint account_update_lock_count = 0; |
|
| 469 |
|
|
| 470 |
void account_update_lock(void) |
|
| 471 |
{
|
|
| 472 |
account_update_lock_count++; |
|
| 473 |
} |
|
| 474 |
|
|
| 475 |
void account_update_unlock(void) |
|
| 476 |
{
|
|
| 477 |
if (account_update_lock_count > 0) |
|
| 478 |
account_update_lock_count--; |
|
| 479 |
} |
|
| 480 |
|
|
| 467 | 481 |
void account_updated(void) |
| 468 | 482 |
{
|
| 483 |
if (account_update_lock_count) |
|
| 484 |
return; |
|
| 485 |
|
|
| 469 | 486 |
if (address_table) {
|
| 470 | 487 |
g_hash_table_destroy(address_table); |
| 471 | 488 |
address_table = NULL; |
| 472 | 489 |
} |
| 490 |
|
|
| 491 |
if (syl_app_get()) |
|
| 492 |
g_signal_emit_by_name(syl_app_get(), "account-updated"); |
|
| 473 | 493 |
} |
Also available in: Unified diff