diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-11-06 09:19:14 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-11-06 09:19:14 +0000 |
commit | b69e098519c056115763a19004c4fcefe4ad49d5 (patch) | |
tree | 75f41f45239f18a50afe9f7163671675f42c2604 /libsylph/account.c | |
parent | 9aa60b8ee830c9ecce85ba76bbd57085ef8bddb5 (diff) |
svn s
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2337 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/account.c')
-rw-r--r-- | libsylph/account.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/libsylph/account.c b/libsylph/account.c index e2fd8b38..a6f8da30 100644 --- a/libsylph/account.c +++ b/libsylph/account.c @@ -1,6 +1,6 @@ /* * LibSylph -- E-Mail client library - * Copyright (C) 1999-2006 Hiroyuki Yamamoto + * Copyright (C) 1999-2009 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -35,6 +35,7 @@ #include "procmsg.h" #include "procheader.h" #include "utils.h" +#include "sylmain.h" #define PREFSBUFSIZE 1024 @@ -464,10 +465,29 @@ void account_destroy(PrefsAccount *ac_prefs) account_updated(); } +static guint account_update_lock_count = 0; + +void account_update_lock(void) +{ + account_update_lock_count++; +} + +void account_update_unlock(void) +{ + if (account_update_lock_count > 0) + account_update_lock_count--; +} + void account_updated(void) { + if (account_update_lock_count) + return; + if (address_table) { g_hash_table_destroy(address_table); address_table = NULL; } + + if (syl_app_get()) + g_signal_emit_by_name(syl_app_get(), "account-updated"); } |