aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-folder-cache.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-12-18 16:24:26 +0800
committerTor Lillqvist <tml@src.gnome.org>2005-12-18 16:24:26 +0800
commit448d624c00f0c4e12917a4d31babd10555b2e8a4 (patch)
treec44c6e6864f1e0cd34455da2e71fc33ca13d61e6 /mail/mail-folder-cache.c
parent2f1a024be76933ba28ab80e76a52ff46358e33dd (diff)
downloadgsoc2013-evolution-448d624c00f0c4e12917a4d31babd10555b2e8a4.tar.gz
gsoc2013-evolution-448d624c00f0c4e12917a4d31babd10555b2e8a4.tar.zst
gsoc2013-evolution-448d624c00f0c4e12917a4d31babd10555b2e8a4.zip
em-folder-browser.c em-folder-view.c em-format-html.c
2005-12-18 Tor Lillqvist <tml@novell.com> * em-folder-browser.c * em-folder-view.c * em-format-html.c * em-format-html-display.c * em-mailer-prefs.c * em-message-browser.c * em-migrate.c * em-subscribe-editor.c * em-sync-stream.c * em-utils.c * em-vfolder-editor.c * em-vfolder-rule.c * mail-autofilter.c * mail-component.c * mail-config.c * mail-folder-cache.c: Use gstdio wrappers. Construct pathnames of glade, xml, etspec and png files at run-time. Use g_filename_{to,from}_uri(). * em-folder-browser.c (emfb_init) * em-folder-view.c (emfv_finalise) * em-message-browser.c (emmb_init): As EMFolderView::ui_files now always is a list of filenames constructed with g_build_filename(), use g_free() on each list entry before calling g_slist_free() on the list. * em-folder-tree-model.c (em_folder_tree_model_load_state): Use e_xml_parse_file(). * em-migrate.c: Bypass all the code for upgrading from 1.x on Win32. (emm_setup_initial): Use GDir instead of dirent. * em-sync-stream.c * mail-folder-cache.c: Use pthread_equal() to compare pthread_t values. * em-vfs-stream.c: No EINPROGRESS or ELOOP on Win32. svn path=/trunk/; revision=30854
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r--mail/mail-folder-cache.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 7cfc651989..6f4fda244e 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -33,6 +33,9 @@
#include <string.h>
#include <time.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+
#include <libgnome/gnome-sound.h>
#include <libgnome/gnome-i18n.h>
#include <bonobo/bonobo-exception.h>
@@ -59,7 +62,7 @@
#include "em-event.h"
-#define w(x)
+#define w(x)
#define d(x)
/* This code is a mess, there is no reason it should be so complicated. */
@@ -392,7 +395,7 @@ setup_folder(CamelFolderInfo *fi, struct _store_info *si)
if (mfi) {
update_1folder(mfi, 0, fi);
} else {
- d(printf("Adding new folder: %s (%s) %d unread\n", fi->path, fi->url, fi->unread_message_count));
+ d(printf("Adding new folder: %s (%s)\n", fi->full_name, fi->uri));
mfi = g_malloc0(sizeof(*mfi));
mfi->full_name = g_strdup(fi->full_name);
mfi->uri = g_strdup(fi->uri);
@@ -679,12 +682,12 @@ rename_folders(struct _store_info *si, const char *oldbase, const char *newbase,
e_filename_make_safe(newuri);
oldfile = g_strdup_printf("%s/mail/config/custom_view-%s.xml", mail_component_peek_base_directory(NULL), olduri);
newfile = g_strdup_printf("%s/mail/config/custom_view-%s.xml", mail_component_peek_base_directory(NULL), newuri);
- rename(oldfile, newfile);
+ g_rename(oldfile, newfile);
g_free(oldfile);
g_free(newfile);
oldfile = g_strdup_printf("%s/mail/config/current_view-%s.xml", mail_component_peek_base_directory(NULL), olduri);
newfile = g_strdup_printf("%s/mail/config/current_view-%s.xml", mail_component_peek_base_directory(NULL), newuri);
- rename(oldfile, newfile);
+ g_rename(oldfile, newfile);
g_free(oldfile);
g_free(newfile);
g_free(olduri);
@@ -819,7 +822,7 @@ update_folders(CamelStore *store, CamelFolderInfo *fi, void *data)
struct _update_data *ud = data;
struct _store_info *si;
- d(printf("Got folderinfo for store\n"));
+ d(printf("Got folderinfo for store %s\n", store->parent_object.provider->protocol));
LOCK(info_lock);
si = g_hash_table_lookup(stores, store);
@@ -940,7 +943,7 @@ mail_note_store(CamelStore *store, CamelOperation *op,
int hook = 0;
g_assert(CAMEL_IS_STORE(store));
- g_assert(pthread_self() == mail_gui_thread);
+ g_assert(pthread_equal(pthread_self(), mail_gui_thread));
LOCK(info_lock);