diff options
author | Not Zed <NotZed@HelixCode.com> | 2000-10-12 21:48:36 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-10-12 21:48:36 +0800 |
commit | 80237e0c26dd375b0269dc2099d49fc3cd50a4f2 (patch) | |
tree | 8083431b7966dc91fd725b599d1366009bbc518e /mail/message-list.c | |
parent | 1deca02b41aae9bf2632ea1420cc900fcf41531d (diff) | |
download | gsoc2013-evolution-80237e0c26dd375b0269dc2099d49fc3cd50a4f2.tar.gz gsoc2013-evolution-80237e0c26dd375b0269dc2099d49fc3cd50a4f2.tar.zst gsoc2013-evolution-80237e0c26dd375b0269dc2099d49fc3cd50a4f2.zip |
Duh, fix the test for the folder name, strstr != strcmp is it.
2000-10-12 Not Zed <NotZed@HelixCode.com>
* message-list.c (message_list_setup_etable): Duh, fix the test
for the folder name, strstr != strcmp is it.
2000-10-10 Not Zed <NotZed@HelixCode.com>
* message-list.c (folder_to_cachename): Removed, changed callers
to use mail_config_folder_to_cachename instead.
* mail-config.c (mail_config_folder_to_cachename): New utility
function to get a cache name for a folder.
* mail-tools.c (mail_tool_do_movemail): Changed to return the path
to the mbox, rather than opening a folder of it.
* mail-ops.c (mail_incorporate_messages): Dont bother making the
pseudo messageinfo, filder_driver_filter_message will do it for
us.
(report_status): Callback to report status of filtering operation.
(do_fetch_mail): Changed significantly - for the api changes to
the filtering system. Also now incorporates a mailbox file
directly, without having to import it into a camel folder first.
(mail_incorporate_messages): Removed entirely, no longer needed.
* mail-vfolder.c (vfolder_refresh): Fix for context api changes.
(vfolder_uri_to_folder): Likewise.
* folder-browser-factory.c (create_ondemand_hooks): Changed for
api changes. Also only adds demand filters to the menu (fixed a
small logic bug).
svn path=/trunk/; revision=5883
Diffstat (limited to 'mail/message-list.c')
-rw-r--r-- | mail/message-list.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/mail/message-list.c b/mail/message-list.c index 2305a8d47a..7cfd7397d7 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -87,7 +87,6 @@ static void select_msg (MessageList *message_list, gint row); static char *filter_date (const void *data); static void nuke_uids (GtkObject *o); -static char *folder_to_cachename(CamelFolder *folder, const char *prefix); static void save_tree_state(MessageList *ml); static struct { @@ -843,7 +842,7 @@ save_header_state(MessageList *ml) || ml->etable == NULL) return; - filename = folder_to_cachename(ml->folder, "et-header-"); + filename = mail_config_folder_to_cachename(ml->folder, "et-header-"); e_table_scrolled_save_state(E_TABLE_SCROLLED(ml->etable), filename); g_free(filename); } @@ -883,17 +882,17 @@ message_list_setup_etable(MessageList *message_list) char *path; struct stat st; - path = folder_to_cachename(message_list->folder, "et-header-"); + path = mail_config_folder_to_cachename(message_list->folder, "et-header-"); if (stat(path, &st) == 0 && st.st_size > 0 && S_ISREG(st.st_mode)) { e_table_scrolled_load_state(E_TABLE_SCROLLED(message_list->etable), path); } else { /* I wonder if there's a better way to do this ...? */ name = camel_service_get_name((CAMEL_SERVICE(message_list->folder->parent_store)), TRUE); printf("folder name is '%s'\n", name); - if (strstr(name, "/Drafts") - || strstr(name, "/Outbox") - || strstr(name, "/Sent")) { - e_table_scrolled_set_state(E_TABLE_SCROLLED(message_list->etable), state); + if (strstr(name, "/Drafts") != NULL + || strstr(name, "/Outbox") != NULL + || strstr(name, "/Sent") != NULL) { + e_table_scrolled_set_specification(E_TABLE_SCROLLED(message_list->etable), spec); } g_free(name); } @@ -984,7 +983,6 @@ message_list_destroy (GtkObject *object) } gtk_object_unref (GTK_OBJECT (message_list->table_model)); - gtk_object_unref (GTK_OBJECT (message_list->etable)); if (message_list->uid_rowmap) { @@ -1126,22 +1124,6 @@ clear_tree (MessageList *ml) e_tree_model_node_set_expanded (etm, ml->tree_root, TRUE); } -static char * -folder_to_cachename(CamelFolder *folder, const char *prefix) -{ - char *url, *p, *filename; - - url = camel_url_to_string(CAMEL_SERVICE(folder->parent_store)->url, FALSE); - for (p = url; *p; p++) { - if (!isprint((unsigned char)*p) || strchr(" /'\"`&();|<>${}!", *p)) - *p = '_'; - } - - filename = g_strdup_printf("%s/config/%s%s", evolution_dir, prefix, url); - g_free(url); - return filename; -} - /* we save the node id to the file if the node should be closed when we start up. We only save nodeid's for messages with children */ static void @@ -1181,7 +1163,7 @@ load_tree_state(MessageList *ml) int len; result = g_hash_table_new(g_str_hash, g_str_equal); - filename = folder_to_cachename(ml->folder, "treestate-"); + filename = mail_config_folder_to_cachename(ml->folder, "treestate-"); in = fopen(filename, "r"); if (in) { while (fgets(linebuf, sizeof(linebuf), in) != NULL) { @@ -1205,7 +1187,7 @@ save_tree_state(MessageList *ml) ETreePath *node; FILE *out; - filename = folder_to_cachename(ml->folder, "treestate-"); + filename = mail_config_folder_to_cachename(ml->folder, "treestate-"); out = fopen(filename, "w"); if (out) { node = e_tree_model_get_root((ETreeModel *)ml->table_model); |