aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/folder-browser.c1
-rw-r--r--mail/mail-local.c11
3 files changed, 14 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 74f9856dc0..da62d12319 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2002-04-17 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-local.c (mail_local_folder_construct): Just use g_basename.
+ (mlf_finalize): Free the real_path.
+
+ * folder-browser.c (on_right_click): Unref the GdkGC so we don't
+ leak it.
+
2002-04-16 Jeffrey Stedfast <fejj@ximian.com>
* mail-tools.c (mail_tool_destroy_xevolution): Free the format
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 6d653b99eb..45e02ea8ed 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -1950,6 +1950,7 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event
gc = gdk_gc_new (GTK_WIDGET (fb)->window);
gdk_gc_set_foreground (gc, &color);
gdk_draw_rectangle (pixmap, gc, TRUE, 0, 0, 16, 16);
+ gdk_gc_unref (gc);
closure = g_new (struct _colour_data, 1);
gtk_object_ref (GTK_OBJECT (fb));
diff --git a/mail/mail-local.c b/mail/mail-local.c
index 1493866ba5..a90d4ae15f 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -555,6 +555,8 @@ mlf_finalize (CamelObject *obj)
free_metainfo(mlf->meta);
+ g_free (mlf->real_path);
+
#ifdef ENABLE_THREADS
g_mutex_free (mlf->real_folder_lock);
#endif
@@ -585,12 +587,9 @@ mail_local_folder_construct(MailLocalFolder *mlf, MailLocalStore *parent_store,
{
const char *name;
char *metapath;
-
- name = strrchr(full_name, '/');
- if (name == NULL)
- name = full_name;
- name = name + 1;
-
+
+ name = g_basename (full_name);
+
d(printf("constructing local folder: full = %s, name = %s\n", full_name, name));
camel_folder_construct(CAMEL_FOLDER (mlf), CAMEL_STORE(parent_store), full_name, name);