From: Paul Mangan Date: Thu, 26 Sep 2002 07:32:06 +0000 (+0000) Subject: sync with 0.8.3cvs6 X-Git-Tag: rel_0_8_5~43 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=0de0d5750d361288c26be0b4fe4d530d602f6ae2 sync with 0.8.3cvs6 --- diff --git a/ChangeLog b/ChangeLog index 635b1f5f7..5196b272d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-09-25 + + * src/account.c: account_read_config_all(): set account information + to default before initializing with configuration file. + * src/prefs_account.[ch]: prefs_account_new(): new. It returns a + newly created account information structure initialized by + the default settings. + 2002-09-24 * src/addr_compl.c: diff --git a/ChangeLog.claws b/ChangeLog.claws index e09075f9e..c42e31e57 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,8 @@ +2002-09-26 [paul] 0.8.3claws24 + + * sync with 0.8.3cvs6 + see ChangeLog 2002-09-25 + 2002-09-25 [christoph] 0.8.3claws23 * src/prefs_common.c diff --git a/ChangeLog.jp b/ChangeLog.jp index 3201f523e..a34a3ea39 100644 --- a/ChangeLog.jp +++ b/ChangeLog.jp @@ -1,3 +1,10 @@ +2002-09-25 + + * src/account.c: account_read_config_all(): ¥¢¥«¥¦¥ó¥È¾ðÊó¤òÀßÄê + ¥Õ¥¡¥¤¥ë¤Ç½é´ü²½¤¹¤ëÁ°¤Ë¥Ç¥Õ¥©¥ë¥È¤ËÀßÄꤹ¤ë¤è¤¦¤Ë¤·¤¿¡£ + * src/prefs_account.[ch]: prefs_account_new(): ¿·µ¬¡£¥Ç¥Õ¥©¥ë¥È¤Î + ÀßÄê¤Ç½é´ü²½¤µ¤ì¤¿¥¢¥«¥¦¥ó¥È¾ðÊó¹½Â¤ÂΤò¿·µ¬¤ËºîÀ®¤·¤ÆÊÖ¤¹¡£ + 2002-09-24 * src/addr_compl.c: diff --git a/configure.in b/configure.in index 62a23d723..4b6fcbe35 100644 --- a/configure.in +++ b/configure.in @@ -10,7 +10,7 @@ MINOR_VERSION=8 MICRO_VERSION=3 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws23 +EXTRA_VERSION=claws24 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/account.c b/src/account.c index cc145a641..ab54d7c54 100644 --- a/src/account.c +++ b/src/account.c @@ -141,7 +141,7 @@ void account_read_config_all(void) /* read config data from file */ cur_account = NULL; for (cur = ac_label_list; cur != NULL; cur = cur->next) { - ac_prefs = g_new0(PrefsAccount, 1); + ac_prefs = prefs_account_new(); prefs_account_read_config(ac_prefs, (gchar *)cur->data); account_list = g_list_append(account_list, ac_prefs); if (ac_prefs->is_default) diff --git a/src/prefs_account.c b/src/prefs_account.c index f0ca13dee..9f81c77ca 100644 --- a/src/prefs_account.c +++ b/src/prefs_account.c @@ -502,6 +502,8 @@ static PrefParam param[] = { {NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL} }; +static gint prefs_account_get_new_id (void); + static void prefs_account_create (void); static void prefs_account_basic_create (void); static void prefs_account_receive_create (void); @@ -533,6 +535,19 @@ static void prefs_account_ok (void); static gint prefs_account_apply (void); static void prefs_account_cancel (void); +PrefsAccount *prefs_account_new(void) +{ + PrefsAccount *ac_prefs; + + ac_prefs = g_new0(PrefsAccount, 1); + memset(&tmp_ac_prefs, 0, sizeof(PrefsAccount)); + prefs_set_default(param); + *ac_prefs = tmp_ac_prefs; + ac_prefs->account_id = prefs_account_get_new_id(); + + return ac_prefs; +} + void prefs_account_read_config(PrefsAccount *ac_prefs, const gchar *label) { const gchar *p = label; @@ -636,11 +651,7 @@ PrefsAccount *prefs_account_open(PrefsAccount *ac_prefs) cancelled = FALSE; if (!ac_prefs) { - ac_prefs = g_new0(PrefsAccount, 1); - memset(&tmp_ac_prefs, 0, sizeof(PrefsAccount)); - prefs_set_default(param); - *ac_prefs = tmp_ac_prefs; - ac_prefs->account_id = prefs_account_get_new_id(); + ac_prefs = prefs_account_new(); new_account = TRUE; } diff --git a/src/prefs_account.h b/src/prefs_account.h index b027b9b8c..4eb03c2b0 100644 --- a/src/prefs_account.h +++ b/src/prefs_account.h @@ -194,11 +194,15 @@ struct _PrefsAccount RemoteFolder *folder; }; +PrefsAccount *prefs_account_new (void); + void prefs_account_read_config (PrefsAccount *ac_prefs, const gchar *label); void prefs_account_save_config (PrefsAccount *ac_prefs); void prefs_account_save_config_all (GList *account_list); + void prefs_account_free (PrefsAccount *ac_prefs); + PrefsAccount *prefs_account_open (PrefsAccount *ac_prefs); #endif /* __PREFS_ACCOUNT_H__ */