2006-07-04 [colin] 2.3.1cvs54
authorColin Leroy <colin@colino.net>
Tue, 4 Jul 2006 06:13:07 +0000 (06:13 +0000)
committerColin Leroy <colin@colino.net>
Tue, 4 Jul 2006 06:13:07 +0000 (06:13 +0000)
* src/news.c
Delete local file on deletion

ChangeLog
PATCHSETS
configure.ac
src/news.c

index 47b6cc7739dbfec29a9e8d8e52ce8ba85597b2c7..21b2ca041ef2434e644828b10ec4ea1841941086 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-07-04 [colin]     2.3.1cvs54
+
+       * src/news.c
+               Delete local file on deletion
+
 2006-07-03 [colin]     2.3.1cvs53
 
        * src/folderview.c
index fc1c891fa41141a92a8de1e9a765d63fc36471c5..6cc18593122d3ac46f5c8767f54f79e10e24182a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.207.2.105 -r 1.207.2.106 src/folderview.c;  ) > 2.3.1cvs51.patchset
 ( cvs diff -u -r 1.382.2.291 -r 1.382.2.292 src/compose.c;  cvs diff -u -r 1.10.2.9 -r 1.10.2.10 src/privacy.c;  cvs diff -u -r 1.10.2.8 -r 1.10.2.9 src/privacy.h;  cvs diff -u -r 1.1.2.14 -r 1.1.2.15 src/plugins/pgpinline/pgpinline.c;  cvs diff -u -r 1.1.2.36 -r 1.1.2.37 src/plugins/pgpmime/pgpmime.c;  ) > 2.3.1cvs52.patchset
 ( cvs diff -u -r 1.207.2.106 -r 1.207.2.107 src/folderview.c;  cvs diff -u -r 1.115.2.93 -r 1.115.2.94 src/main.c;  ) > 2.3.1cvs53.patchset
+( cvs diff -u -r 1.101.2.26 -r 1.101.2.27 src/news.c;  ) > 2.3.1cvs54.patchset
index b0dc537c4a852bd4c969509f195fe6be102775b6..e5040128a12ebd8735100a47226de7f868322281 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=3
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=53
+EXTRA_VERSION=54
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index fea653463835c85b4ec022a7071acf2ede06a1ea..5a2f66e80bdfcfca966cdaaf4c4b49db181c86d1 100644 (file)
@@ -135,7 +135,7 @@ static gchar *news_folder_get_path   (Folder        *folder);
 gchar *news_item_get_path               (Folder        *folder,
                                          FolderItem    *item);
 static void news_synchronise            (FolderItem    *item);
-static int news_dummy_remove            (Folder        *folder, 
+static int news_remove_msg              (Folder        *folder, 
                                          FolderItem    *item, 
                                          gint           msgnum);
 static gint news_remove_folder          (Folder        *folder,
@@ -164,17 +164,31 @@ FolderClass *news_get_class(void)
                news_class.get_msginfos = news_get_msginfos;
                news_class.fetch_msg = news_fetch_msg;
                news_class.synchronise = news_synchronise;
-               news_class.remove_msg = news_dummy_remove;
+               news_class.remove_msg = news_remove_msg;
        };
 
        return &news_class;
 }
 
-static int news_dummy_remove            (Folder        *folder, 
+static int news_remove_msg              (Folder        *folder, 
                                          FolderItem    *item, 
                                          gint           msgnum)
 {
-       debug_print("doing nothing on purpose\n");
+       gchar *path, *filename;
+       NNTPSession *session;
+       gint ok;
+
+       g_return_val_if_fail(folder != NULL, NULL);
+       g_return_val_if_fail(item != NULL, NULL);
+
+       path = folder_item_get_path(item);
+       if (!is_dir_exist(path))
+               make_dir_hier(path);
+       
+       filename = g_strconcat(path, G_DIR_SEPARATOR_S, itos(msgnum), NULL);
+       g_free(path);
+       g_unlink(filename);
+       g_free(filename);
        return 0;
 }