+2002-10-07
+
+ * src/account.[ch]: account_open(): new. It opens account prefs
+ dialog and reflects to UI when finished.
+ * src/folderview.c:
+ folderview_button_pressed()
+ folderview_property_cb(): open account prefs dialog when the
+ property of the root folder of remote account is requested.
+
+2002-10-07
+
+ * src/account.c: account_destroy(): unref account information in
+ folders.
+ * src/folder.[ch]: folder_unref_account_all(): new. It unref the
+ specified account information in all folders.
+ * src/folderview.c:
+ folderview_rm_imap_server_cb()
+ folderview_rm_news_server_cb(): destroy Folder first because
+ folder_destroy() refers to account information.
+
2002-10-04
* src/account.c: account_find_from_item(): fixed a bug which didn't
+2002-10-12 [alfons] 0.8.5claws28
+
+ * sync with main changes of 2002-10-07
+
2002-10-12 [alfons] 0.8.5claws27
* sync with main changes of 2002-10-04
+2002-10-07
+
+ * src/account.[ch]: account_open(): ¿·µ¬¡£¥¢¥«¥¦¥ó¥ÈÀßÄê¥À¥¤¥¢¥í¥°
+ ¤ò³«¤¡¢½ªÎ»»þ¤Ë UI ¤ËÈ¿±Ç¤µ¤»¤ë¡£
+ * src/folderview.c:
+ folderview_button_pressed()
+ folderview_property_cb(): ¥ê¥â¡¼¥È¥¢¥«¥¦¥ó¥È¤Î¥ë¡¼¥È¥Õ¥©¥ë¥À¤Î
+ ¥×¥í¥Ñ¥Æ¥£¤òÍ׵ᤵ¤ì¤¿¤é¥¢¥«¥¦¥ó¥ÈÀßÄê¥À¥¤¥¢¥í¥°¤ò³«¤¯¤è¤¦¤Ë¤·¤¿¡£
+
+2002-10-07
+
+ * src/account.c: account_destroy(): ¥Õ¥©¥ë¥ÀÃæ¤Î¥¢¥«¥¦¥ó¥È¾ðÊó¤Ø¤Î
+ »²¾È¤ò²ò½ü¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+ * src/folder.[ch]: folder_unref_account_all(): ¿·µ¬¡£Á´¥Õ¥©¥ë¥ÀÃæ
+ ¤Î»ØÄꤷ¤¿¥¢¥«¥¦¥ó¥È¾ðÊó¤Ø¤Î»²¾È¤ò²ò½ü¤¹¤ë¡£
+ * src/folderview.c:
+ folderview_rm_imap_server_cb()
+ folderview_rm_news_server_cb(): folder_destroy() ¤¬¥¢¥«¥¦¥ó¥È¾ðÊó
+ ¤ò»²¾È¤·¤Æ¤¤¤ë¤¿¤á Folder ¤òÀè¤Ëºï½ü¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
2002-10-04
* src/account.c: account_find_from_item(): Àµ¤·¤¤¥¢¥«¥¦¥ó¥È¤òÁªÂò
MICRO_VERSION=5
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=claws27
+EXTRA_VERSION=claws28
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
}
}
+void account_open(PrefsAccount *ac_prefs)
+{
+ gboolean prev_default;
+ gchar *ac_name;
+
+ g_return_if_fail(ac_prefs != NULL);
+
+ prev_default = ac_prefs->is_default;
+ Xstrdup_a(ac_name, ac_prefs->account_name ? ac_prefs->account_name : "",
+ return);
+
+ prefs_account_open(ac_prefs);
+
+ if (!prev_default && ac_prefs->is_default)
+ account_set_as_default(ac_prefs);
+
+ if (ac_prefs->folder && strcmp2(ac_name, ac_prefs->account_name) != 0) {
+ folder_set_name(FOLDER(ac_prefs->folder),
+ ac_prefs->account_name);
+ folderview_set_all();
+ }
+
+ account_save_config_all();
+ account_set_menu();
+ main_window_reflect_prefs_all();
+}
+
void account_set_as_default(PrefsAccount *ac_prefs)
{
PrefsAccount *ap;
{
g_return_if_fail(ac_prefs != NULL);
+ folder_unref_account_all(ac_prefs);
+
prefs_account_free(ac_prefs);
account_list = g_list_remove(account_list, ac_prefs);
row = GPOINTER_TO_INT(clist->selection->data);
ac_prefs = gtk_clist_get_row_data(clist, row);
- prev_default = ac_prefs->is_default;
- Xstrdup_a(ac_name, ac_prefs->account_name ? ac_prefs->account_name : "",
- return);
-
- prefs_account_open(ac_prefs);
-
- if (!prev_default && ac_prefs->is_default)
- account_set_as_default(ac_prefs);
-
- if ((ac_prefs->protocol == A_IMAP4 || ac_prefs->protocol == A_NNTP) &&
- ac_prefs->folder && strcmp2(ac_name, ac_prefs->account_name) != 0) {
- folder_set_name(FOLDER(ac_prefs->folder),
- ac_prefs->account_name);
- folderview_set_all();
- }
-
+ account_open(ac_prefs);
+
account_clist_set();
}
void account_edit_open (void);
void account_add (void);
+void account_open (PrefsAccount *ac_prefs);
void account_set_as_default (PrefsAccount *ac_prefs);
void account_set_as_recv_at_get_all (PrefsAccount *ac_prefs);
PrefsAccount *account_get_default (void);
}
}
+static gboolean folder_unref_account_func(GNode *node, gpointer data)
+{
+ FolderItem *item = node->data;
+ PrefsAccount *account = data;
+
+ if (item->account == account)
+ item->account = NULL;
+
+ return FALSE;
+}
+
+void folder_unref_account_all(PrefsAccount *account)
+{
+ Folder *folder;
+ GList *list;
+
+ if (!account) return;
+
+ for (list = folder_list; list != NULL; list = list->next) {
+ folder = list->data;
+ if (folder->account == account)
+ folder->account = NULL;
+ g_node_traverse(folder->node, G_PRE_ORDER, G_TRAVERSE_ALL, -1,
+ folder_unref_account_func, account);
+ }
+}
+
#undef CREATE_FOLDER_IF_NOT_EXIST
gchar *folder_get_path(Folder *folder)
FolderItem *folder_get_default_trash (void);
FolderItem *folder_get_default_processing (void);
void folder_set_missing_folders (void);
+void folder_unref_account_all (PrefsAccount *account);
gchar *folder_get_path (Folder *folder);
gchar *folder_item_get_path (FolderItem *item);
if (folderview->mainwin->lock_count == 0) {
new_folder = TRUE;
- if (item->parent == NULL)
+ if (item->parent == NULL) {
update_tree = remove_tree = TRUE;
- else
+ if (folder->account)
+ folder_property = TRUE;
+ } else
mark_all_read = search_folder = folder_property = TRUE;
+
if (FOLDER_IS_LOCAL(folder) || FOLDER_TYPE(folder) == F_IMAP || FOLDER_TYPE(folder) == F_MBOX) {
if (item->parent == NULL)
update_tree = rescan_tree = TRUE;
{
GtkCTree *ctree = GTK_CTREE(folderview->ctree);
FolderItem *item;
+ PrefsAccount *account;
gchar *name, *name_;
gchar *message;
AlertValue avalue;
folderview->opened = NULL;
}
- account_destroy(item->folder->account);
+ account = item->folder->account;
folder_destroy(item->folder);
+ account_destroy(account);
gtk_ctree_remove_node(ctree, folderview->selected);
account_set_menu();
main_window_reflect_prefs_all();
{
GtkCTree *ctree = GTK_CTREE(folderview->ctree);
FolderItem *item;
+ PrefsAccount *account;
gchar *name, *name_;
gchar *message;
AlertValue avalue;
folderview->opened = NULL;
}
- account_destroy(item->folder->account);
- folder_destroy(item->folder);
+ account = item->folder->account;
+ folder_destroy(item->folder);
+ account_destroy(account);
gtk_ctree_remove_node(ctree, folderview->selected);
account_set_menu();
main_window_reflect_prefs_all();
/*
* CLAWS: wait till Hiro has completed his stuff
*/
- prefs_folder_item_open(item);
+ if (item->parent == NULL && item->folder->account)
+ account_open(item->folder->account);
+ else
+ prefs_folder_item_open(item);
#endif
}
if (!cur_account) {
new_account_cb(mainwin, 0, widget);
} else {
- gboolean prev_default = cur_account->is_default;
-
- prefs_account_open(cur_account);
- if (!prev_default && cur_account->is_default)
- account_set_as_default(cur_account);
- account_save_config_all();
- account_set_menu();
- main_window_reflect_prefs_all();
+ account_open(cur_account);
}
}