sync with 0.8.1cvs21
authorPaul Mangan <paul@claws-mail.org>
Fri, 9 Aug 2002 08:16:29 +0000 (08:16 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 9 Aug 2002 08:16:29 +0000 (08:16 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/base64.c
src/gtksctree.c
src/prefs_account.c
src/prefs_common.c
src/procmsg.c
src/utils.c

index 0e66f5f..163f2ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2002-08-08
+
+       * src/procmsg.c: procmsg_read_mark_file(): check key duplication
+         to avoid memory leak.
+
+2002-08-08
+
+       * src/base64.c: include string.h for memcpy().
+       * src/gtksctree.c: use macro ABS() instead of function abs().
+       * src/prefs_account.c
+         src/prefs_common.c: renamed 'send' to 'p_send' so as not to
+         conflict with the function send() in sys/socket.h.
+       * src/mainwindow.c: commented out the unnecessary functions.
+       * src/utils.c: canonicalize_file_replace(): correct warning message.
+
 2002-08-08
 
        * src/utils.[ch]: get_tmp_file(): new. Returns the directory for
index 22ed548..46cb598 100644 (file)
@@ -1,3 +1,8 @@
+2002-08-09 [paul]      0.8.1claws39
+
+       * sync with 0.8.1cvs21
+               see ChangeLog 2002-08-08
+
 2002-08-08 [oliver]    0.8.1claws38
 
        * src/mainwindow.c
index 77b57da..8d4e8b3 100644 (file)
@@ -1,3 +1,18 @@
+2002-08-08
+
+       * src/procmsg.c: procmsg_read_mark_file(): ¥á¥â¥ê¥ê¡¼¥¯¤òÈò¤±¤ë
+         ¤¿¤á¥­¡¼¤Î½ÅÊ£¤ò¥Á¥§¥Ã¥¯¡£
+
+2002-08-08
+
+       * src/base64.c: memcpy() ¤Î¤¿¤á¤Ë string.h ¤ò include ¤·¤¿¡£
+       * src/gtksctree.c: ´Ø¿ô abs() ¤ÎÂå¤ï¤ê¤Ë¥Þ¥¯¥í ABS() ¤ò»ÈÍÑ¡£
+       * src/prefs_account.c
+         src/prefs_common.c: sys/socket.h Ãæ¤Î´Ø¿ô send() ¤È¾×Æͤ·¤Ê¤¤¤è¤¦¤Ë
+         'send' ¤ò 'p_send' ¤Ë̾¾ÎÊѹ¹¤·¤¿¡£
+       * src/mainwindow.c: ÉÔÍפʴؿô¤ò¥³¥á¥ó¥È¥¢¥¦¥È¤·¤¿¡£
+       * src/utils.c: canonicalize_file_replace(): ·Ù¹ð¥á¥Ã¥»¡¼¥¸¤òÄûÀµ¡£
+
 2002-08-08
 
        * src/utils.[ch]: get_tmp_file(): ¿·µ¬¡£ ~/.sylpheed/ Ãæ¤Î¥Æ¥ó¥Ý¥é¥ê
index eacb1fb..ffe184e 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws38
+EXTRA_VERSION=claws39
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index a448df9..7ed3c40 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <glib.h>
 #include <ctype.h>
+#include <string.h>
 
 #include "base64.h"
 
index 2fe6a81..13fb1c7 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "gtksctree.h"
 
+
 enum {
        ROW_POPUP_MENU,
        EMPTY_POPUP_MENU,
@@ -219,8 +220,8 @@ select_row (GtkSCTree *sctree, gint row, gint col, guint state)
        g_return_if_fail (GTK_IS_SCTREE (sctree));
     
        range = ((state & GDK_SHIFT_MASK) != 0) &&
-               (GTK_CLIST(sctree)->selection_mode != GTK_SELECTION_SINGLE) &&
-               (GTK_CLIST(sctree)->selection_mode != GTK_SELECTION_BROWSE);
+               (GTK_CLIST(sctree)->selection_mode != GTK_SELECTION_SINGLE) &&
+               (GTK_CLIST(sctree)->selection_mode != GTK_SELECTION_BROWSE);
        additive = ((state & GDK_CONTROL_MASK) != 0) &&
                   (GTK_CLIST(sctree)->selection_mode != GTK_SELECTION_SINGLE) &&
                   (GTK_CLIST(sctree)->selection_mode != GTK_SELECTION_BROWSE);
@@ -426,8 +427,8 @@ gtk_sctree_motion (GtkWidget *widget, GdkEventMotion *event)
 
        /* This is the same threshold value that is used in gtkdnd.c */
 
-       if (MAX (abs (sctree->dnd_press_x - event->x),
-                abs (sctree->dnd_press_y - event->y)) <= 3)
+       if (MAX (ABS (sctree->dnd_press_x - event->x),
+                ABS (sctree->dnd_press_y - event->y)) <= 3)
                return FALSE;
 
        /* Handle any pending selections */
index 3ab2695..e24e036 100644 (file)
@@ -111,7 +111,7 @@ static struct Send {
        GtkWidget *smtp_uid_entry;
        GtkWidget *smtp_pass_entry;
        GtkWidget *pop_bfr_smtp_chkbtn;
-} send;
+} p_send;
 
 static struct Compose {
        GtkWidget *sigpath_entry;
@@ -310,33 +310,33 @@ static PrefParam param[] = {
 
        /* Send */
        {"add_date", "TRUE", &tmp_ac_prefs.add_date, P_BOOL,
-        &send.date_chkbtn,
+        &p_send.date_chkbtn,
         prefs_set_data_from_toggle, prefs_set_toggle},
 
        {"generate_msgid", "TRUE", &tmp_ac_prefs.gen_msgid, P_BOOL,
-        &send.msgid_chkbtn,
+        &p_send.msgid_chkbtn,
         prefs_set_data_from_toggle, prefs_set_toggle},
 
        {"add_custom_header", "FALSE", &tmp_ac_prefs.add_customhdr, P_BOOL,
-        &send.customhdr_chkbtn,
+        &p_send.customhdr_chkbtn,
         prefs_set_data_from_toggle, prefs_set_toggle},
 
        {"use_smtp_auth", "FALSE", &tmp_ac_prefs.use_smtp_auth, P_BOOL,
-        &send.smtp_auth_chkbtn,
+        &p_send.smtp_auth_chkbtn,
         prefs_set_data_from_toggle, prefs_set_toggle},
 
        {"smtp_auth_method", "0", &tmp_ac_prefs.smtp_auth_type, P_ENUM,
-        &send.smtp_auth_type_optmenu,
+        &p_send.smtp_auth_type_optmenu,
         prefs_account_smtp_auth_type_set_data_from_optmenu,
         prefs_account_smtp_auth_type_set_optmenu},
 
        {"smtp_user_id", NULL, &tmp_ac_prefs.smtp_userid, P_STRING,
-        &send.smtp_uid_entry, prefs_set_data_from_entry, prefs_set_entry},
+        &p_send.smtp_uid_entry, prefs_set_data_from_entry, prefs_set_entry},
        {"smtp_password", NULL, &tmp_ac_prefs.smtp_passwd, P_STRING,
-        &send.smtp_pass_entry, prefs_set_data_from_entry, prefs_set_entry},
+        &p_send.smtp_pass_entry, prefs_set_data_from_entry, prefs_set_entry},
 
        {"pop_before_smtp", "FALSE", &tmp_ac_prefs.pop_before_smtp, P_BOOL,
-        &send.pop_bfr_smtp_chkbtn,
+        &p_send.pop_bfr_smtp_chkbtn,
         prefs_set_data_from_toggle, prefs_set_toggle},
 
        /* Compose */
@@ -1358,15 +1358,15 @@ static void prefs_account_send_create(void)
                _("Authenticate with POP3 before sending"));
        gtk_widget_set_sensitive(pop_bfr_smtp_chkbtn, FALSE);
 
-       send.date_chkbtn      = date_chkbtn;
-       send.msgid_chkbtn     = msgid_chkbtn;
-       send.customhdr_chkbtn = customhdr_chkbtn;
+       p_send.date_chkbtn      = date_chkbtn;
+       p_send.msgid_chkbtn     = msgid_chkbtn;
+       p_send.customhdr_chkbtn = customhdr_chkbtn;
 
-       send.smtp_auth_chkbtn       = smtp_auth_chkbtn;
-       send.smtp_auth_type_optmenu = optmenu;
-       send.smtp_uid_entry         = smtp_uid_entry;
-       send.smtp_pass_entry        = smtp_pass_entry;
-       send.pop_bfr_smtp_chkbtn    = pop_bfr_smtp_chkbtn;
+       p_send.smtp_auth_chkbtn       = smtp_auth_chkbtn;
+       p_send.smtp_auth_type_optmenu = optmenu;
+       p_send.smtp_uid_entry         = smtp_uid_entry;
+       p_send.smtp_pass_entry        = smtp_pass_entry;
+       p_send.pop_bfr_smtp_chkbtn    = pop_bfr_smtp_chkbtn;
 }
 
 static void prefs_account_compose_create(void)
index 971b2d1..83dff01 100644 (file)
@@ -99,7 +99,7 @@ static struct Send {
        GtkWidget *checkbtn_queuemsg;
 
        GtkWidget *optmenu_charset;
-} send;
+} p_send;
 
 static struct Compose {
        GtkWidget *checkbtn_autosig;
@@ -322,20 +322,20 @@ static PrefParam param[] = {
 
        /* Send */
        {"use_ext_sendmail", "FALSE", &prefs_common.use_extsend, P_BOOL,
-        &send.checkbtn_extsend,
+        &p_send.checkbtn_extsend,
         prefs_set_data_from_toggle, prefs_set_toggle},
        {"ext_sendmail_cmd", DEFAULT_SENDMAIL_CMD,
         &prefs_common.extsend_cmd, P_STRING,
-        &send.entry_extsend, prefs_set_data_from_entry, prefs_set_entry},
+        &p_send.entry_extsend, prefs_set_data_from_entry, prefs_set_entry},
        {"save_message", "TRUE", &prefs_common.savemsg, P_BOOL,
-        &send.checkbtn_savemsg,
+        &p_send.checkbtn_savemsg,
         prefs_set_data_from_toggle, prefs_set_toggle},
        {"queue_message", "FALSE", &prefs_common.queue_msg, P_BOOL,
-        &send.checkbtn_queuemsg,
+        &p_send.checkbtn_queuemsg,
         prefs_set_data_from_toggle, prefs_set_toggle},
 
        {"outgoing_charset", CS_AUTO, &prefs_common.outgoing_charset, P_STRING,
-        &send.optmenu_charset,
+        &p_send.optmenu_charset,
         prefs_common_charset_set_data_from_optmenu,
         prefs_common_charset_set_optmenu},
 
@@ -1363,14 +1363,14 @@ static void prefs_send_create(void)
                            FALSE, FALSE, 0);
        gtk_label_set_justify(GTK_LABEL (label_charset_desc), GTK_JUSTIFY_LEFT);
 
-       send.checkbtn_extsend = checkbtn_extsend;
-       send.entry_extsend    = entry_extsend;
-       /* send.button_extsend   = button_extsend; */
+       p_send.checkbtn_extsend = checkbtn_extsend;
+       p_send.entry_extsend    = entry_extsend;
+       /* p_send.button_extsend   = button_extsend; */
 
-       send.checkbtn_savemsg  = checkbtn_savemsg;
-       send.checkbtn_queuemsg = checkbtn_queuemsg;
+       p_send.checkbtn_savemsg  = checkbtn_savemsg;
+       p_send.checkbtn_queuemsg = checkbtn_queuemsg;
 
-       send.optmenu_charset = optmenu;
+       p_send.optmenu_charset = optmenu;
 }
 
 static void prefs_common_recv_dialog_newmail_notify_toggle_cb(GtkWidget *w, gpointer data)
index d787a31..461c0c9 100644 (file)
@@ -470,6 +470,10 @@ static GHashTable *procmsg_read_mark_file(const gchar *folder)
        while (fread(&num, sizeof(num), 1, fp) == 1) {
                if (fread(&perm_flags, sizeof(perm_flags), 1, fp) != 1) break;
 
+               flags = g_hash_table_lookup(mark_table, GUINT_TO_POINTER(num));
+               if (flags != NULL)
+                       g_free(flags);
+
                flags = g_new0(MsgFlags, 1);
                flags->perm_flags = perm_flags;
     
index 335ba21..66b0b4b 100644 (file)
@@ -2071,7 +2071,7 @@ gint copy_file(const gchar *src, const gchar *dest, gboolean keep_backup)
 gint move_file(const gchar *src, const gchar *dest, gboolean overwrite)
 {
        if (overwrite == FALSE && is_file_exist(dest)) {
-               g_warning(_("move_file(): file %s already exists."), dest);
+               g_warning("move_file(): file %s already exists.", dest);
                return -1;
        }
 
@@ -2180,7 +2180,7 @@ gint canonicalize_file_replace(const gchar *file)
                return -1;
 
        if (move_file(tmp_file, file, TRUE) < 0) {
-               FILE_OP_ERROR(file, "rename");
+               g_warning("can't replace %s .\n", file);
                unlink(tmp_file);
                return -1;
        }