sync with 0.9.10claws67 HEAD
authorPaul Mangan <paul@claws-mail.org>
Sat, 22 May 2004 07:27:30 +0000 (07:27 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sat, 22 May 2004 07:27:30 +0000 (07:27 +0000)
28 files changed:
ChangeLog
ChangeLog-gtk2.claws
ChangeLog.claws
ChangeLog.jp
README.claws
TODO
TODO.jp
configure.ac
src/common/nntp.c
src/common/smtp.c
src/compose.c
src/folder.c
src/folderview.c
src/gtk/gtkutils.c
src/gtk/gtkutils.h
src/gtk/menu.c
src/inc.c
src/inc.h
src/mainwindow.c
src/msgcache.c
src/passphrase.c
src/prefs_common.c
src/prefs_common.h
src/prefs_display_header.c
src/procmsg.c
src/procmsg.h
src/summaryview.c
src/summaryview.h

index 9cf0880..a34f438 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,57 @@
+2004-05-21
+
+       * src/smtp.c: comply with RFC 2821 (thanks to Alfons).
+
+2004-05-20
+
+       * src/folderview.[ch]: implemented spring-loaded folder.
+
+2004-05-20
+
+       * src/folderview.c: folderview_button_pressed(): enable menu item
+         'Search messages...' only when opened folder is selected.
+
+2004-05-19
+
+       * src/compose.c
+         src/prefs_common.[ch]: removed the option "Queue messages that fail
+         to send".
+
+2004-05-18
+
+       * src/summaryview.c: cleaned up the context menu.
+       * src/mainwindow.c: changed the position of '/Message/Re-edit'
+         menuitem.
+
+2004-05-12
+
+       * src/procmsg.[ch]: fixed the type of integer value in cache data
+         to g(u)int32.
+
+2004-05-11
+
+       * src/nntp.c: nntp_get_article(): ignore the protocol error of
+         response for some broken news servers (thanks to Davide Scola).
+
+2004-05-11
+
+       * src/gtkutils.[ch]: added gtkut_editable_disable_im().
+       * src/passphrase.c: disable XIM on entering passphrase.
+
+2004-05-11
+
+       * src/compose.c
+         src/folderview.c
+         src/inc.c
+         src/prefs_display_header.c
+         src/procmsg.h: fixed for AMD64 (and other 64-bit platforms)
+         (thanks to Hiroyuki Ikezoe).
+
+2004-05-10
+
+       * src/inc.[ch]: don't use gtk_timeout_add(), instead use
+         gettimeofday() (to prevent infrequent lockup).
+
 2004-03-19
 
        * src/defs.h
index 170a428..e346885 100644 (file)
@@ -1,3 +1,7 @@
+2004-05-22 [paul]      0.9.10claws67
+
+       * sync with 0.9.10claws67 HEAD
+
 2004-05-14 [alfons]
 
        * src/procmime.h
index f793b59..26de83f 100644 (file)
@@ -1,3 +1,57 @@
+2004-05-21 [paul]      0.9.10claws67
+
+       * sync with 0.9.10cvs17
+               see ChangeLog 2004-05-21
+
+2004-05-20 [paul]      0.9.10claws66
+
+       * sync with 0.9.10cvs16
+               see ChangeLog 2004-05-19 and 2004-05-20
+
+2004-05-19 [alfons]    0.9.10claws65
+
+       * src/summaryview.h
+               on some platforms regoff_t is defined as off_t, so 
+               pull in sys/types.h
+
+2004-05-19 [paul]      0.9.10claws64
+
+       * sync with 0.9.10cvs13
+               see ChangeLog 2004-05-18
+
+2004-05-17 [christoph] 0.9.10claws63
+
+       * src/folder.c
+               search all folders when searching for default folders and
+               not return the special folder of the first folder
+
+2004-05-13 [alfons]    0.9.10claws62
+
+       * src/summaryview.c
+               add a better check to see if a message is a news message
+               (replaces the MSG_IS_NEWS() check removed in 0.9.9claws19)
+
+2004-05-13 [paul]      0.9.10claws61
+
+       * src/msgcache.c
+               sync with 0.9.10cvs12
+               see ChangeLog 2004-05-12
+
+2004-05-12 [alfons]    0.9.10claws60
+
+       * src/folderview.c
+               release lock in case of folder could not be opened 
+
+2004-05-11 [christoph] 0.9.10claws59
+
+       * src/inc.[ch]
+               remove unused folderview update stuff from inc.[ch]
+
+2004-05-11 [paul]      0.9.10claws58
+
+       * sync with 0.9.10cvs11
+               see ChangeLog 2004-05-10 and 2004-05-11
+
 2004-05-09 [christoph] 0.9.10claws57
 
        * src/folderview.c
index 9f5b4e0..94cf727 100644 (file)
@@ -1,3 +1,58 @@
+2004-05-21
+
+       * src/smtp.c: RFC 2821 ¤Ë½àµò(Alfons ¤µ¤ó thanks)¡£
+
+2004-05-20
+
+       * src/folderview.[ch]: ¥¹¥×¥ê¥ó¥°¥í¡¼¥Ç¥Ã¥É¥Õ¥©¥ë¥À¤ò¼ÂÁõ¡£
+
+2004-05-20
+
+       * src/folderview.c: folderview_button_pressed(): ³«¤¤¤Æ¤¤¤ë¥Õ¥©¥ë¥À
+         ¤¬ÁªÂò¤µ¤ì¤¿¤È¤­¤Î¤ß¡Ö¥á¥Ã¥»¡¼¥¸¤ò¸¡º÷...¡×¥á¥Ë¥å¡¼¹àÌܤòÍ­¸ú¤Ë
+         ¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
+2004-05-19
+
+       * src/compose.c
+         src/prefs_common.[ch]: ¡ÖÁ÷¿®¤Ë¼ºÇÔ¤·¤¿¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®ÂÔ¤Á¤Ë
+         Æþ¤ì¤ë¡×¥ª¥×¥·¥ç¥ó¤òºï½ü¡£
+
+2004-05-18
+
+       * src/summaryview.c: ¥³¥ó¥Æ¥­¥¹¥È¥á¥Ë¥å¡¼¤òÀ°Íý¡£
+       * src/mainwindow.c: ¥á¥Ë¥å¡¼¹àÌÜ '/¥á¥Ã¥»¡¼¥¸/ºÆÊÔ½¸' ¤Î°ÌÃÖ¤òÊѹ¹¡£
+
+2004-05-12
+
+       * src/procmsg.[ch]: ¥­¥ã¥Ã¥·¥å¥Ç¡¼¥¿¤ÎÀ°¿ôÃͤη¿¤ò g(u)int32 ¤Ë
+         ¸ÇÄê¡£
+
+2004-05-11
+
+       * src/nntp.c: nntp_get_article(): broken ¤Ê¥Ë¥å¡¼¥¹¥µ¡¼¥Ð¤Î¤¿¤á¤Ë
+         ±þÅú¤Î¥×¥í¥È¥³¥ë¥¨¥é¡¼¤ò̵»ë¤¹¤ë¤è¤¦¤Ë¤·¤¿(Davide Scola ¤µ¤ó
+         thanks)¡£
+
+2004-05-11
+
+       * src/gtkutils.[ch]: gtkut_editable_disable_im() ¤òÄɲá£
+       * src/passphrase.c: ¥Ñ¥¹¥Õ¥ì¡¼¥º¤ÎÆþÎÏ»þ¤Ë XIM ¤ò̵¸ú¤Ë¤·¤¿¡£
+
+2004-05-11
+
+       * src/compose.c
+         src/folderview.c
+         src/inc.c
+         src/prefs_display_header.c
+         src/procmsg.h: AMD64 (¤È¤½¤Î¾64-bit¥×¥é¥Ã¥È¥Õ¥©¡¼¥à)¡¡¤Î¤¿¤á¤Î
+         ½¤Àµ(Hiroyuki Ikezoe ¤µ¤ó thanks)¡£
+
+2004-05-10
+
+       * src/inc.[ch]: gtk_timeout_add() ¤ò»ÈÍѤ»¤º¡¢Âå¤ï¤ê¤Ë
+         gettimeofday() ¤ò»ÈÍÑ(µ©¤Ë¥í¥Ã¥¯¥¢¥Ã¥×¤¹¤ë¤Î¤òËɤ°¤¿¤á)¡£
+
 2004-03-19
 
        * src/defs.h
index fba8f7c..6581c33 100644 (file)
@@ -585,12 +585,12 @@ sourceforge project page.
   To download the latest cvs cd to the directory where you wish to download
   to and type the following information:
 
-  cvs -d:pserver:anonymous@cvs.sylpheed-claws.sourceforge.net:/cvsroot/sylpheed-claws login
+  cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/sylpheed-claws login
 
   When prompted for a password press the RETURN key.
   After anonymously logging in:
 
-  cvs -z3 -d:pserver:anonymous@cvs.sylpheed-claws.sourceforge.net:/cvsroot/sylpheed-claws co sylpheed-claws 
+  cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/sylpheed-claws co sylpheed-claws 
 
 
   b. Installing
diff --git a/TODO b/TODO
index c17249d..fcaf98d 100644 (file)
--- a/TODO
+++ b/TODO
@@ -3,18 +3,17 @@ TODO
 
 (The upper item has the greater priority or feasibility... maybe :-)
 
+o enhancement of filtering
+o improvements of addressbook
 o POP before SMTP
 o original icons and logos
-o improvements of addressbook
-o folder management enhancements
+o more efficient SMTP handling for multiple messages
 o more robust IMAP4 response parser
-o enhancement of filtering
 o support for some formats other than MH and mbox (ex. Maildir)
 o priority (Priority:, X-Priority:, X-MSMail-Priority:)
 o notification of reception (Disposition-Notification-To:)
 o autosave
 o customization of toolbar
-o configuration for each folders
 o RFC 2231 (MIME filename encoding) compliant
 o full-text search using Namazu
 o virtual folder
@@ -33,9 +32,9 @@ Partially implemented features
 . make the network related code much decent
   (processing of time out, multi-threading etc.)
 . drag and drop
-. full internationalization
+. internationalization / multilingualization
 . PGP/GPG support
-. display of HTML messages (composition of HTML message is not scheduled :-P)
+. display of HTML messages (composition of HTML message is not planned :-P)
 . progress display of time-consuming processes
 . parallel processing between sending-receiving and others
 . customization of key bindings
@@ -71,3 +70,4 @@ Implemented features
 * template function
 * regular expression support at filtering
 * autowrap / wordwrap
+* configuration for each folders
diff --git a/TODO.jp b/TODO.jp
index 0266dc1..7e8dd35 100644 (file)
--- a/TODO.jp
+++ b/TODO.jp
@@ -3,18 +3,17 @@ TODO
 
 (¾å¤Î¤â¤Î¤Û¤É½ÅÍ×ÅÙ¡¢¼Â¸½²ÄǽÀ­¤¬¹â¤¯¤Ê¤ë¡¢¤«¤â(^^;)
 
+o ¿¶¤êʬ¤±½èÍý¤Î¶¯²½
+o ¥¢¥É¥ì¥¹Ä¢¤Î²þÎÉ
 o POP before SMTP
 o ¥ª¥ê¥¸¥Ê¥ë¤Î¥¢¥¤¥³¥ó¤È¥í¥´
-o ¥¢¥É¥ì¥¹Ä¢¤Î²þÎÉ
-o ¥Õ¥©¥ë¥À´ÉÍý¤Î³ÈÄ¥
+o ¤è¤ê¸úΨŪ¤ÊÊ£¿ô¥á¥Ã¥»¡¼¥¸¤Î SMTP ½èÍý
 o ¤è¤ê·øÏ´¤Ê IMAP4 ±þÅú¥Ñ¡¼¥µ
-o ¿¶¤êʬ¤±½èÍý¤Î¶¯²½
 o MH, mbox °Ê³°¤Î·Á¼°¤Ø¤ÎÂбþ (Maildir Åù)
 o ½ÅÍ×ÅÙ (Priority:, X-Priority:, X-MSMail-Priority:)
 o ¼õ¿®³Îǧ (Disposition-Notification-To:)
 o ¼«Æ°Êݸµ¡Ç½
 o ¥Ä¡¼¥ë¥Ð¡¼¤Î¥«¥¹¥¿¥Þ¥¤¥º
-o ¥Õ¥©¥ë¥ÀËè¤ÎÀßÄê
 o RFC 2231 (MIME ¥Õ¥¡¥¤¥ë̾¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°) Âбþ
 o Namazu ¤È¤ÎÏ¢·È¤Ë¤è¤ëÁ´Ê¸¸¡º÷
 o ²¾ÁÛ¥Õ¥©¥ë¥À
@@ -23,9 +22,9 @@ o 
 o ¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¥Þ¥Í¡¼¥¸¥ã
 o ¥Þ¥ë¥Á¥Ñ¡¼¥ÈMIME¤Ç¤Î¥¤¥ó¥é¥¤¥ó²èÁüɽ¼¨
 o °µ½Ì¥Õ¥©¥ë¥À
-o GTK+-2.x Âбþ
+o GTK+ 2.x Âбþ
 o ¥³¡¼¥É¤ò¤µ¤é¤Ë¤­¤ì¤¤¤Ë¤¹¤ë
-o ½èÍý¤ò¤µ¤é¤Ë®¤¯¤¹¤ë
+o ½èÍý¤Î¤µ¤é¤Ê¤ë¹â®²½
 o ²ø¤·¤²¤Ê±Ñ¸ì¤ò¤Ê¤ó¤È¤«¤¹¤ë :)
 
 °ìÉô¼ÂÁõºÑ¤Îµ¡Ç½
@@ -33,7 +32,7 @@ o 
 . ¥Í¥Ã¥È¥ï¡¼¥¯´ØÏ¢¤Î¥³¡¼¥É¤ò¤Þ¤È¤â¤Ë¤¹¤ë
   (¥¿¥¤¥à¥¢¥¦¥È½èÍý¡¢¥Þ¥ë¥Á¥¹¥ì¥Ã¥É²½Åù)
 . ¥É¥é¥Ã¥° & ¥É¥í¥Ã¥×
-. ´°Á´¤Ê¹ñºÝ²½
+. ¹ñºÝ²½¡¦Â¿¸À¸ì²½
 . PGP/GPGÂбþ
 . HTML¥á¡¼¥ë¤Îɽ¼¨ (HTML¥á¡¼¥ë¤ÎºîÀ®¤ÏͽÄê¤Ê¤·:-P)
 . »þ´Ö¤¬³Ý¤«¤ë½èÍý¤Î¿ÊĽ¾õ¶·É½¼¨
@@ -72,3 +71,4 @@ o 
 * ¥Æ¥ó¥×¥ì¡¼¥Èµ¡Ç½
 * ¿¶¤êʬ¤±¤ÇÀµµ¬É½¸½¤ËÂбþ¤¹¤ë
 * ¼«Æ°²þ¹Ô / ¥ï¡¼¥É¥é¥Ã¥×
+* ¥Õ¥©¥ë¥ÀËè¤ÎÀßÄê
index 7dd859d..9594767 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=57
+EXTRA_VERSION=67
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index 6bcc83e..991feb6 100644 (file)
@@ -193,9 +193,9 @@ gint nntp_get_article(NNTPSession *session, const gchar *cmd, gint num,
        extract_parenthesis(buf, '<', '>');
        if (buf[0] == '\0') {
                log_warning(_("protocol error\n"));
-               return NN_PROTOCOL;
-       }
-       *msgid = g_strdup(buf);
+               *msgid = g_strdup("0");
+       } else
+               *msgid = g_strdup(buf);
 
        return NN_SUCCESS;
 }
index 647a727..39ccbb9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2004 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -123,9 +123,9 @@ static gint smtp_from(SMTPSession *session)
        session->state = SMTP_FROM;
 
        if (strchr(session->from, '<'))
-               g_snprintf(buf, sizeof(buf), "MAIL FROM: %s", session->from);
+               g_snprintf(buf, sizeof(buf), "MAIL FROM:%s", session->from);
        else
-               g_snprintf(buf, sizeof(buf), "MAIL FROM: <%s>", session->from);
+               g_snprintf(buf, sizeof(buf), "MAIL FROM:<%s>", session->from);
 
        session_send_msg(SESSION(session), SESSION_MSG_NORMAL, buf);
        log_print("SMTP> %s\n", buf);
@@ -345,9 +345,9 @@ static gint smtp_rcpt(SMTPSession *session)
        to = (gchar *)session->cur_to->data;
 
        if (strchr(to, '<'))
-               g_snprintf(buf, sizeof(buf), "RCPT TO: %s", to);
+               g_snprintf(buf, sizeof(buf), "RCPT TO:%s", to);
        else
-               g_snprintf(buf, sizeof(buf), "RCPT TO: <%s>", to);
+               g_snprintf(buf, sizeof(buf), "RCPT TO:<%s>", to);
        session_send_msg(SESSION(session), SESSION_MSG_NORMAL, buf);
        log_print("SMTP> %s\n", buf);
 
index c6874a7..bca588f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2004 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -3296,24 +3296,7 @@ gint compose_send(Compose *compose)
                }
        }
 
-       /* queue message if failed to send */
-       if (ok < 0) {
-               if (prefs_common.queue_msg) {
-                       AlertValue val;
-
-                       val = alertpanel
-                               (_("Queueing"),
-                                _("Error occurred while sending the message.\n"
-                                  "Put this message into queue folder?"),
-                                _("OK"), _("Cancel"), NULL);
-                       if (G_ALERTDEFAULT == val) {
-                               ok = compose_queue(compose, tmp);
-                               if (ok < 0)
-                                       alertpanel_error(_("Can't queue the message."));
-                       }
-               } else
-                       alertpanel_error_log(_("Error occurred while sending the message."));
-       } else {
+       if (ok == 0) {
                if (compose->mode == COMPOSE_REEDIT) {
                        compose_remove_reedit_target(compose);
                }
@@ -4002,8 +3985,8 @@ static gint compose_queue_sub(Compose *compose, gint *msgnum, FolderItem **item,
        }
 
        /* add queue header */
-       tmp = g_strdup_printf("%s%cqueue.%d", g_get_tmp_dir(),
-                             G_DIR_SEPARATOR, (gint)compose);
+       tmp = g_strdup_printf("%s%cqueue.%p", get_tmp_dir(),
+                             G_DIR_SEPARATOR, compose);
        if ((fp = fopen(tmp, "wb")) == NULL) {
                FILE_OP_ERROR(tmp, "fopen");
                g_free(tmp);
@@ -6112,8 +6095,8 @@ static void compose_exec_ext_editor(Compose *compose)
        pid_t pid;
        gint pipe_fds[2];
 
-       tmp = g_strdup_printf("%s%ctmpmsg.%08x", get_tmp_dir(),
-                             G_DIR_SEPARATOR, (gint)compose);
+       tmp = g_strdup_printf("%s%ctmpmsg.%p", get_tmp_dir(),
+                             G_DIR_SEPARATOR, compose);
 
        if (pipe(pipe_fds) < 0) {
                perror("pipe");
@@ -6597,8 +6580,8 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget)
 
        lock = TRUE;
 
-       tmp = g_strdup_printf("%s%cdraft.%08x", get_tmp_dir(),
-                             G_DIR_SEPARATOR, (gint)compose);
+       tmp = g_strdup_printf("%s%cdraft.%p", get_tmp_dir(),
+                             G_DIR_SEPARATOR, compose);
 
        if (compose_write_to_file(compose, tmp, TRUE) < 0) {
                g_free(tmp);
index 91b6a2f..a59900e 100644 (file)
@@ -1220,52 +1220,92 @@ Folder *folder_get_default_folder(void)
 
 FolderItem *folder_get_default_inbox(void)
 {
-       Folder *folder;
+       GList *flist;
 
-       if (!folder_list) return NULL;
-       folder = FOLDER(folder_list->data);
-       g_return_val_if_fail(folder != NULL, NULL);
-       return folder->inbox;
+       for (flist = folder_list; flist != NULL; flist = g_list_next(flist)) {
+               Folder * folder = FOLDER(flist->data);
+
+               if (folder == NULL)
+                       continue;
+               if (folder->inbox == NULL)
+                       continue;
+
+               return folder->inbox;
+       }
+
+       return NULL;
 }
 
 FolderItem *folder_get_default_outbox(void)
 {
-       Folder *folder;
+       GList *flist;
 
-       if (!folder_list) return NULL;
-       folder = FOLDER(folder_list->data);
-       g_return_val_if_fail(folder != NULL, NULL);
-       return folder->outbox;
+       for (flist = folder_list; flist != NULL; flist = g_list_next(flist)) {
+               Folder * folder = FOLDER(flist->data);
+
+               if (folder == NULL)
+                       continue;
+               if (folder->outbox == NULL)
+                       continue;
+
+               return folder->outbox;
+       }
+
+       return NULL;
 }
 
 FolderItem *folder_get_default_draft(void)
 {
-       Folder *folder;
+       GList *flist;
 
-       if (!folder_list) return NULL;
-       folder = FOLDER(folder_list->data);
-       g_return_val_if_fail(folder != NULL, NULL);
-       return folder->draft;
+       for (flist = folder_list; flist != NULL; flist = g_list_next(flist)) {
+               Folder * folder = FOLDER(flist->data);
+
+               if (folder == NULL)
+                       continue;
+               if (folder->draft == NULL)
+                       continue;
+
+               return folder->draft;
+       }
+
+       return NULL;
 }
 
 FolderItem *folder_get_default_queue(void)
 {
-       Folder *folder;
+       GList *flist;
 
-       if (!folder_list) return NULL;
-       folder = FOLDER(folder_list->data);
-       g_return_val_if_fail(folder != NULL, NULL);
-       return folder->queue;
+       for (flist = folder_list; flist != NULL; flist = g_list_next(flist)) {
+               Folder * folder = FOLDER(flist->data);
+
+               if (folder == NULL)
+                       continue;
+               if (folder->queue == NULL)
+                       continue;
+
+               return folder->queue;
+       }
+
+       return NULL;
 }
 
 FolderItem *folder_get_default_trash(void)
 {
-       Folder *folder;
+       GList *flist;
 
-       if (!folder_list) return NULL;
-       folder = FOLDER(folder_list->data);
-       g_return_val_if_fail(folder != NULL, NULL);
-       return folder->trash;
+       for (flist = folder_list; flist != NULL; flist = g_list_next(flist)) {
+               Folder * folder = FOLDER(flist->data);
+
+               if (folder == NULL)
+                       continue;
+               if (folder->trash == NULL)
+                       continue;
+
+               return folder->trash;
+       }
+
+       return NULL;
 }
 
 #define CREATE_FOLDER_IF_NOT_EXIST(member, dir, type)          \
index ba7cbef..332b9d4 100644 (file)
@@ -1389,7 +1389,8 @@ static gboolean folderview_button_pressed(GtkWidget *ctree, GdkEventButton *even
        menu_set_sensitive(fpopup_factory, name, sens)
 
        SET_SENS("/Mark all read", item->unread_msgs >= 1);
-       SET_SENS("/Search folder...", item->total_msgs >= 1);
+       SET_SENS("/Search folder...", item->total_msgs >= 1 && 
+                folderview->selected == folderview->opened);
        SET_SENS("/Properties...", TRUE);
        SET_SENS("/Processing...", item->node->parent != NULL);
 
@@ -1527,6 +1528,9 @@ static void folderview_selected(GtkCTree *ctree, GtkCTreeNode *row,
 
                alertpanel_error(_("Folder could not be opened."));
 
+               folderview->open_folder = FALSE;
+               can_select = TRUE;
+
                return;
         }
 
index ac9fe55..fa5efcb 100644 (file)
@@ -408,6 +408,22 @@ gchar *gtkut_editable_get_selection(GtkEditable *editable)
                return NULL;
 }
 
+void gtkut_editable_disable_im(GtkEditable *editable)
+{
+       g_return_if_fail(editable != NULL);
+
+#if USE_XIM
+       if (editable->ic) {
+               gdk_ic_destroy(editable->ic);
+               editable->ic = NULL;
+       }
+       if (editable->ic_attr) {
+               gdk_ic_attr_destroy(editable->ic_attr);
+               editable->ic_attr = NULL;
+       }
+#endif
+}
+
 /*
  * Walk through the widget tree and disclaim the selection from all currently
  * realized GtkEditable widgets.
index 3a5517b..f806118 100644 (file)
@@ -138,6 +138,7 @@ void gtkut_combo_set_items          (GtkCombo       *combo,
                                         const gchar    *str1, ...);
 
 gchar *gtkut_editable_get_selection    (GtkEditable    *editable);
+void gtkut_editable_disable_im         (GtkEditable    *editable);
 
 void gtkut_container_remove            (GtkContainer   *container,
                                         GtkWidget      *widget);
index 08cfb52..5c19dd7 100644 (file)
@@ -338,7 +338,6 @@ void menu_connect_identical_items(void)
                {"<Main>/Message/Copy...",                      "<SummaryView>/Copy..."},
                {"<Main>/Message/Delete",                       "<SummaryView>/Delete"},
                {"<Main>/Message/Cancel a news message",        "<SummaryView>/Cancel a news message"},
-               {"<Main>/Tools/Execute",                        "<SummaryView>/Execute"},
                {"<Main>/Message/Mark/Mark",                    "<SummaryView>/Mark/Mark"},
                {"<Main>/Message/Mark/Unmark",                  "<SummaryView>/Mark/Unmark"},
                {"<Main>/Message/Mark/Mark as unread",          "<SummaryView>/Mark/Mark as unread"},
@@ -352,10 +351,6 @@ void menu_connect_identical_items(void)
                {"<Main>/View/Open in new window",              "<SummaryView>/View/Open in new window"},
                {"<Main>/View/Message source",                  "<SummaryView>/View/Source"},
                {"<Main>/View/Show all headers",                "<SummaryView>/View/All header"},
-               {"<Main>/File/Save as...",                      "<SummaryView>/Save as..."},
-               {"<Main>/File/Print...",                        "<SummaryView>/Print..."},
-               {"<Main>/Edit/Select all",                      "<SummaryView>/Select all"},
-               {"<Main>/Edit/Select thread",                   "<SummaryView>/Select thread"}           
        };
 
        const gint numpairs = sizeof pairs / sizeof pairs[0];
index a3b8d4b..4b3b411 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -32,6 +32,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <time.h>
+#include <sys/time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
@@ -94,10 +95,6 @@ static void inc_session_destroy              (IncSession             *session);
 static gint inc_start                  (IncProgressDialog      *inc_dialog);
 static IncState inc_pop3_session_do    (IncSession             *session);
 
-static void inc_timer_start            (IncProgressDialog      *inc_dialog,
-                                        IncSession             *inc_session);
-static void inc_timer_stop             (IncProgressDialog      *inc_dialog);
-
 static void inc_progress_dialog_update (IncProgressDialog      *inc_dialog,
                                         IncSession             *inc_session);
 
@@ -108,8 +105,9 @@ static void inc_progress_dialog_set_progress
                                        (IncProgressDialog      *inc_dialog,
                                         IncSession             *inc_session);
 
-static gint inc_progress_timer_func    (gpointer        data);
-static gint inc_folder_timer_func      (gpointer        data);
+static void inc_progress_dialog_update_periodic
+                                       (IncProgressDialog      *inc_dialog,
+                                        IncSession             *inc_session);
 
 static gint inc_recv_data_progressive  (Session        *session,
                                         guint           cur_len,
@@ -394,8 +392,8 @@ static IncProgressDialog *inc_progress_dialog_create(gboolean autocheck)
        }
 
        dialog->dialog = progress;
-       dialog->progress_timer_id = 0;
-       dialog->folder_timer_id = 0;
+       gettimeofday(&dialog->progress_tv, NULL);
+       gettimeofday(&dialog->folder_tv, NULL);
        dialog->queue_list = NULL;
        dialog->cur_row = 0;
 
@@ -467,9 +465,6 @@ static IncSession *inc_session_new(PrefsAccount *account)
        session_set_recv_data_notify(session->session,
                                     inc_recv_data_finished, session);
 
-       session->folder_table = g_hash_table_new(NULL, NULL);
-       session->tmp_folder_table = g_hash_table_new(NULL, NULL);
-
        return session;
 }
 
@@ -478,8 +473,6 @@ static void inc_session_destroy(IncSession *session)
        g_return_if_fail(session != NULL);
 
        session_destroy(session->session);
-       g_hash_table_destroy(session->folder_table);
-       g_hash_table_destroy(session->tmp_folder_table);
        g_free(session);
 }
 
@@ -770,7 +763,6 @@ static IncState inc_pop3_session_do(IncSession *session)
               session->inc_state != INC_CANCEL)
                gtk_main_iteration();
 
-       inc_timer_stop(inc_dialog);
        statusbar_pop_all();
 
        if (session->inc_state == INC_SUCCESS) {
@@ -807,33 +799,6 @@ static IncState inc_pop3_session_do(IncSession *session)
        return session->inc_state;
 }
 
-static void inc_timer_start(IncProgressDialog *inc_dialog,
-                           IncSession *inc_session)
-{
-       if (inc_dialog->progress_timer_id == 0) {
-               inc_dialog->progress_timer_id =
-                       gtk_timeout_add(PROGRESS_UPDATE_INTERVAL,
-                                       inc_progress_timer_func, inc_session);
-       }
-       if (inc_dialog->folder_timer_id == 0) {
-               inc_dialog->folder_timer_id =
-                       gtk_timeout_add(FOLDER_UPDATE_INTERVAL,
-                                       inc_folder_timer_func, inc_session);
-       }
-}
-
-static void inc_timer_stop(IncProgressDialog *inc_dialog)
-{
-       if (inc_dialog->progress_timer_id) {
-               gtk_timeout_remove(inc_dialog->progress_timer_id);
-               inc_dialog->progress_timer_id = 0;
-       }
-       if (inc_dialog->folder_timer_id) {
-               gtk_timeout_remove(inc_dialog->folder_timer_id);
-               inc_dialog->folder_timer_id = 0;
-       }
-}
-
 static void inc_progress_dialog_update(IncProgressDialog *inc_dialog,
                                       IncSession *inc_session)
 {
@@ -844,7 +809,6 @@ static void inc_progress_dialog_update(IncProgressDialog *inc_dialog,
 static void inc_progress_dialog_set_label(IncProgressDialog *inc_dialog,
                                          IncSession *inc_session)
 {
-       gchar buf[MSGBUFSIZE];
        ProgressDialog *dialog = inc_dialog->dialog;
        Pop3Session *session;
 
@@ -883,12 +847,15 @@ static void inc_progress_dialog_set_label(IncProgressDialog *inc_dialog,
        case POP3_RETR_RECV:
                break;
        case POP3_DELETE:
+#if 0
                if (session->msg[session->cur_msg].recv_time <
                        session->current_time) {
+                       gchar buf[MSGBUFSIZE];
                        g_snprintf(buf, sizeof(buf), _("Deleting message %d"),
                                   session->cur_msg);
                        progress_dialog_set_label(dialog, buf);
                }
+#endif
                break;
        case POP3_LOGOUT:
                progress_dialog_set_label(dialog, _("Quitting"));
@@ -912,7 +879,8 @@ static void inc_progress_dialog_set_progress(IncProgressDialog *inc_dialog,
        cur_total = inc_session->cur_total_bytes;
        total = pop3_session->total_bytes;
        if (pop3_session->state == POP3_RETR ||
-           pop3_session->state == POP3_RETR_RECV) {
+           pop3_session->state == POP3_RETR_RECV ||
+           pop3_session->state == POP3_DELETE) {
                Xstrdup_a(total_size_str, to_human_readable(total), return);
                g_snprintf(buf, sizeof(buf),
                           _("Retrieving message (%d / %d) (%s / %s)"),
@@ -950,33 +918,28 @@ static gboolean hash_remove_func(gpointer key, gpointer value, gpointer data)
        return TRUE;
 }
 
-static gint inc_progress_timer_func(gpointer data)
+static void inc_progress_dialog_update_periodic(IncProgressDialog *inc_dialog,
+                                               IncSession *inc_session)
 {
-       IncSession *inc_session = (IncSession *)data;
-       IncProgressDialog *inc_dialog;
+       struct timeval tv_cur;
+       struct timeval tv_result;
+       gint msec;
 
-       inc_dialog = (IncProgressDialog *)inc_session->data;
+       gettimeofday(&tv_cur, NULL);
 
-       inc_progress_dialog_update(inc_dialog, inc_session);
-
-       return TRUE;
-}
-
-static gint inc_folder_timer_func(gpointer data)
-{
-       IncSession *inc_session = (IncSession *)data;
-       IncProgressDialog *inc_dialog;
-
-       inc_dialog = (IncProgressDialog *)inc_session->data;
-
-       if (g_hash_table_size(inc_session->tmp_folder_table) > 0) {
-               folderview_update_item_foreach(inc_session->tmp_folder_table,
-                                              FALSE);
-               g_hash_table_foreach_remove(inc_session->tmp_folder_table,
-                                           hash_remove_func, NULL);
+       tv_result.tv_sec = tv_cur.tv_sec - inc_dialog->progress_tv.tv_sec;
+       tv_result.tv_usec = tv_cur.tv_usec - inc_dialog->progress_tv.tv_usec;
+       if (tv_result.tv_usec < 0) {
+               tv_result.tv_sec--;
+               tv_result.tv_usec += 1000000;
        }
 
-       return TRUE;
+       msec = tv_result.tv_sec * 1000 + tv_result.tv_usec / 1000;
+       if (msec > PROGRESS_UPDATE_INTERVAL) {
+               inc_progress_dialog_update(inc_dialog, inc_session);
+               inc_dialog->progress_tv.tv_sec = tv_cur.tv_sec;
+               inc_dialog->progress_tv.tv_usec = tv_cur.tv_usec;
+       }
 }
 
 static gint inc_recv_data_progressive(Session *session, guint cur_len,
@@ -984,6 +947,7 @@ static gint inc_recv_data_progressive(Session *session, guint cur_len,
 {
        IncSession *inc_session = (IncSession *)data;
        Pop3Session *pop3_session = POP3_SESSION(session);
+       IncProgressDialog *inc_dialog;
        gint cur_total;
 
        g_return_val_if_fail(inc_session != NULL, -1);
@@ -1000,6 +964,9 @@ static gint inc_recv_data_progressive(Session *session, guint cur_len,
                cur_total = pop3_session->total_bytes;
        inc_session->cur_total_bytes = cur_total;
 
+       inc_dialog = (IncProgressDialog *)inc_session->data;
+       inc_progress_dialog_update_periodic(inc_dialog, inc_session);
+
        return 0;
 }
 
@@ -1011,19 +978,11 @@ static gint inc_recv_data_finished(Session *session, guint len, gpointer data)
        g_return_val_if_fail(inc_session != NULL, -1);
 
        inc_dialog = (IncProgressDialog *)inc_session->data;
+
        inc_recv_data_progressive(session, 0, 0, inc_session);
 
-       if (POP3_SESSION(session)->state == POP3_RETR) {
-               if (inc_dialog->progress_timer_id == 0) {
-                       inc_timer_start(inc_dialog, inc_session);
-                       inc_progress_dialog_update(inc_dialog, inc_session);
-               }
-       } else if (POP3_SESSION(session)->state == POP3_LOGOUT) {
+       if (POP3_SESSION(session)->state == POP3_LOGOUT) {
                inc_progress_dialog_update(inc_dialog, inc_session);
-               if (inc_dialog->progress_timer_id) {
-                       inc_folder_timer_func(data);
-                       inc_timer_stop(inc_dialog);
-               }
        }
 
        return 0;
@@ -1050,17 +1009,9 @@ static gint inc_recv_message(Session *session, const gchar *msg, gpointer data)
                break;
        case POP3_RETR:
                inc_recv_data_progressive(session, 0, 0, inc_session);
-               if (inc_dialog->progress_timer_id == 0) {
-                       inc_timer_start(inc_dialog, inc_session);
-                       inc_progress_dialog_update(inc_dialog, inc_session);
-               }
                break;
        case POP3_LOGOUT:
                inc_progress_dialog_update(inc_dialog, inc_session);
-               if (inc_dialog->progress_timer_id) {
-                       inc_folder_timer_func(data);
-                       inc_timer_stop(inc_dialog);
-               }
                break;
        default:
                break;
@@ -1074,7 +1025,6 @@ static gint inc_drop_message(Pop3Session *session, const gchar *file)
        FolderItem *inbox;
        FolderItem *dropfolder;
        IncSession *inc_session = (IncSession *)(SESSION(session)->data);
-       IncProgressDialog *inc_dialog;
        gint msgnum;
        gint val;
 
@@ -1101,8 +1051,6 @@ static gint inc_drop_message(Pop3Session *session, const gchar *file)
                return -1;
        }
 
-       inc_dialog = (IncProgressDialog *)inc_session->data;
-
        return 0;
 }
 
index 217d464..1d46882 100644 (file)
--- a/src/inc.h
+++ b/src/inc.h
@@ -26,6 +26,7 @@
 
 #include <glib.h>
 #include <time.h>
+#include <sys/time.h>
 
 #include "mainwindow.h"
 #include "progressdialog.h"
@@ -58,8 +59,8 @@ struct _IncProgressDialog
 
        gboolean show_dialog;
 
-       guint progress_timer_id;
-       guint folder_timer_id;
+       struct timeval progress_tv;
+       struct timeval folder_tv;
 
        GList *queue_list;      /* list of IncSession */
        gint cur_row;
@@ -70,9 +71,6 @@ struct _IncSession
        Session *session;
        IncState inc_state;
 
-       GHashTable *folder_table;       /* table of destination folders */
-       GHashTable *tmp_folder_table;   /* for progressive update */
-
        gint cur_total_bytes;
 
        gpointer data;
index 54b86b5..e3a9a7a 100644 (file)
@@ -217,10 +217,6 @@ static void show_all_header_cb             (MainWindow     *mainwin,
                                         guint           action,
                                         GtkWidget      *widget);
 
-static void reedit_cb                  (MainWindow     *mainwin,
-                                        guint           action,
-                                        GtkWidget      *widget);
-
 static void move_to_cb                 (MainWindow     *mainwin,
                                         guint           action,
                                         GtkWidget      *widget);
@@ -251,6 +247,11 @@ static void mark_as_read_cb                (MainWindow     *mainwin,
 static void mark_all_read_cb           (MainWindow     *mainwin,
                                         guint           action,
                                         GtkWidget      *widget);
+
+static void reedit_cb                  (MainWindow     *mainwin,
+                                        guint           action,
+                                        GtkWidget      *widget);
+
 static void add_address_cb             (MainWindow     *mainwin,
                                         guint           action,
                                         GtkWidget      *widget);
@@ -644,8 +645,6 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_Message/_Forward"),              "<control><alt>F", main_window_reply_cb, COMPOSE_FORWARD, NULL},
        {N_("/_Message/Redirect"),              NULL, main_window_reply_cb, COMPOSE_REDIRECT, NULL},
        {N_("/_Message/---"),                   NULL, NULL, 0, "<Separator>"},
-       {N_("/_Message/Re-_edit"),              NULL, reedit_cb, 0, NULL},
-       {N_("/_Message/---"),                   NULL, NULL, 0, "<Separator>"},
        {N_("/_Message/M_ove..."),              "<control>O", move_to_cb, 0, NULL},
        {N_("/_Message/_Copy..."),              "<shift><control>O", copy_to_cb, 0, NULL},
        {N_("/_Message/_Delete"),               "<control>D", delete_cb,  0, NULL},
@@ -659,6 +658,8 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_Message/_Mark/Mark as rea_d"),
                                                NULL, mark_as_read_cb, 0, NULL},
        {N_("/_Message/_Mark/Mark all _read"),  NULL, mark_all_read_cb, 0, NULL},
+       {N_("/_Message/---"),                   NULL, NULL, 0, "<Separator>"},
+       {N_("/_Message/Re-_edit"),              NULL, reedit_cb, 0, NULL},
 
        {N_("/_Tools"),                         NULL, NULL, 0, "<Branch>"},
        {N_("/_Tools/_Address book..."),        "<shift><control>A", addressbook_open_cb, 0, NULL},
@@ -1738,12 +1739,12 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
                {"/Message/Follow-up and reply to", M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST|M_NEWS},
                {"/Message/Forward"               , M_HAVE_ACCOUNT|M_TARGET_EXIST},
                {"/Message/Redirect"              , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
-               {"/Message/Re-edit"               , M_HAVE_ACCOUNT|M_ALLOW_REEDIT},
                {"/Message/Move..."               , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED},
                {"/Message/Copy..."               , M_TARGET_EXIST|M_EXEC|M_UNLOCKED},
                {"/Message/Delete"                , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED|M_NOT_NEWS},
                {"/Message/Cancel a news message" , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED|M_NEWS},
                {"/Message/Mark"                  , M_TARGET_EXIST},
+               {"/Message/Re-edit"              , M_HAVE_ACCOUNT|M_ALLOW_REEDIT},
 
                {"/Tools/Add sender to address book"   , M_SINGLE_TARGET_EXIST},
                {"/Tools/Harvest addresses"            , M_UNLOCKED},
@@ -2567,11 +2568,6 @@ static void show_all_header_cb(MainWindow *mainwin, guint action,
                                     GTK_CHECK_MENU_ITEM(widget)->active);
 }
 
-static void reedit_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
-{
-       summary_reedit(mainwin->summaryview);
-}
-
 static void mark_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
 {
        summary_mark(mainwin->summaryview);
@@ -2600,6 +2596,11 @@ static void mark_all_read_cb(MainWindow *mainwin, guint action,
        summary_mark_all_read(mainwin->summaryview);
 }
 
+static void reedit_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
+{
+       summary_reedit(mainwin->summaryview);
+}
+
 static void add_address_cb(MainWindow *mainwin, guint action,
                           GtkWidget *widget)
 {
index 43cf899..f3ac878 100644 (file)
@@ -215,20 +215,28 @@ gint msgcache_get_memory_usage(MsgCache *cache)
 
 #define READ_CACHE_DATA_INT(n, fp) \
 { \
-       if (fread(&n, sizeof(n), 1, fp) != 1) { \
+       guint32 idata; \
+ \
+       if (fread(&idata, sizeof(idata), 1, fp) != 1) { \
                g_warning("Cache data is corrupted\n"); \
                procmsg_msginfo_free(msginfo); \
                error = TRUE; \
                break; \
-       } \
+       } else \
+               n = idata;\
 }
 
-#define WRITE_CACHE_DATA_INT(n, fp) \
-       fwrite(&n, sizeof(n), 1, fp)
+#define WRITE_CACHE_DATA_INT(n, fp)            \
+{                                              \
+       guint32 idata;                          \
+                                               \
+       idata = (guint32)n;                     \
+       fwrite(&idata, sizeof(idata), 1, fp);   \
+}
 
 #define WRITE_CACHE_DATA(data, fp) \
 { \
-       gint len; \
+       size_t len; \
        if (data == NULL) \
                len = 0; \
        else \
@@ -297,7 +305,7 @@ static gint msgcache_read_cache_data_str(FILE *fp, gchar **str)
 {
        gchar buf[BUFFSIZE];
        gint ret = 0;
-       size_t len;
+       gint32 len;
 
        if (fread(&len, sizeof(len), 1, fp) == 1) {
                if (len < 0)
index a6d6bf3..804ce1e 100644 (file)
@@ -155,6 +155,9 @@ passphrase_mbox (const gchar *desc)
     
     gtk_widget_show_all(window);
 
+    /* don't use XIM on entering passphrase */
+    gtkut_editable_disable_im(GTK_EDITABLE(pass_entry));
+
     if (grab_all) {
 #ifdef GDK_WINDOWING_X11
         XGrabServer(GDK_DISPLAY());
index 43972e7..8bca068 100644 (file)
@@ -85,7 +85,6 @@ static struct Receive {
 
 static struct Send {
        GtkWidget *checkbtn_savemsg;
-       GtkWidget *checkbtn_queuemsg;
        GtkWidget *optmenu_senddialog;
 
        GtkWidget *optmenu_charset;
@@ -285,9 +284,6 @@ static PrefParam param[] = {
        {"save_message", "TRUE", &prefs_common.savemsg, P_BOOL,
         &p_send.checkbtn_savemsg,
         prefs_set_data_from_toggle, prefs_set_toggle},
-       {"queue_message", "FALSE", &prefs_common.queue_msg, P_BOOL,
-        &p_send.checkbtn_queuemsg,
-        prefs_set_data_from_toggle, prefs_set_toggle},
        {"send_dialog_mode", "0", &prefs_common.send_dialog_mode, P_ENUM,
         &p_send.optmenu_senddialog,
         prefs_common_send_dialog_set_data_from_optmenu,
@@ -1228,7 +1224,6 @@ static void prefs_send_create(void)
        GtkWidget *vbox2;
        GtkWidget *hbox1;
        GtkWidget *checkbtn_savemsg;
-       GtkWidget *checkbtn_queuemsg;
        GtkWidget *label_outcharset;
        GtkWidget *optmenu_charset;
        GtkWidget *optmenu_menu;
@@ -1253,8 +1248,6 @@ static void prefs_send_create(void)
 
        PACK_CHECK_BUTTON (vbox2, checkbtn_savemsg,
                           _("Save sent messages to Sent folder"));
-       PACK_CHECK_BUTTON (vbox2, checkbtn_queuemsg,
-                          _("Queue messages that fail to send"));
 
        hbox_senddialog = gtk_hbox_new (FALSE, 8);
        gtk_box_pack_start (GTK_BOX (vbox1), hbox_senddialog, FALSE, FALSE, 0);
@@ -1373,7 +1366,6 @@ static void prefs_send_create(void)
        gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
 
        p_send.checkbtn_savemsg  = checkbtn_savemsg;
-       p_send.checkbtn_queuemsg = checkbtn_queuemsg;
        p_send.optmenu_senddialog = optmenu_senddialog;
 
        p_send.optmenu_charset = optmenu_charset;
index ed5f310..54ad20b 100644 (file)
@@ -77,7 +77,6 @@ struct _PrefsCommon
 
        /* Send */
        gboolean savemsg;
-       gboolean queue_msg;
        SendDialogMode send_dialog_mode;
        gchar *outgoing_charset;
        TransferEncodingMethod encoding_method;
index d3b3644..d87ab65 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2002 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2004 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -277,7 +277,7 @@ static void prefs_display_header_create(void)
        gtk_box_pack_start (GTK_BOX (btn_vbox), reg_btn, FALSE, TRUE, 0);
        g_signal_connect (G_OBJECT (reg_btn), "clicked",
                          G_CALLBACK (prefs_display_header_register_cb),
-                         FALSE);
+                           GINT_TO_POINTER(FALSE));
        del_btn = gtk_button_new_with_label (_("Delete"));
        gtk_widget_show (del_btn);
        gtk_box_pack_start (GTK_BOX (btn_vbox), del_btn, FALSE, TRUE, 0);
@@ -333,13 +333,13 @@ static void prefs_display_header_create(void)
        g_signal_connect (G_OBJECT (reg_btn), "clicked",
                            G_CALLBACK
                            (prefs_display_header_register_cb),
-                           (void *) TRUE);
+                           GINT_TO_POINTER(TRUE));
        del_btn = gtk_button_new_with_label (_("Delete"));
        gtk_widget_show (del_btn);
        gtk_box_pack_start (GTK_BOX (btn_vbox), del_btn, FALSE, TRUE, 0);
        g_signal_connect (G_OBJECT       (del_btn), "clicked",
                            G_CALLBACK (prefs_display_header_delete_cb),
-                           (void *) hidden_headers_clist);
+                           hidden_headers_clist);
 
        PACK_CHECK_BUTTON (btn_hbox, checkbtn_other_headers,
                           _("Show all unspecified headers"));
@@ -558,9 +558,7 @@ static gint prefs_display_header_clist_set_row(gboolean hidden)
 static void prefs_display_header_register_cb(GtkButton *btn,
                                             gpointer hidden_data)
 {
-       gboolean hidden = (gboolean)hidden_data;
-
-       prefs_display_header_clist_set_row(hidden);
+       prefs_display_header_clist_set_row(GPOINTER_TO_INT(hidden_data));
 }
 
 static void prefs_display_header_delete_cb(GtkButton *btn, gpointer clist_data)
index 522d651..c16b058 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2004 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 24a5f01..417f6b3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2004 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 18dc25e..f586b0e 100644 (file)
@@ -286,9 +286,6 @@ static void summary_col_resized             (GtkCList               *clist,
 static void summary_reply_cb           (SummaryView            *summaryview,
                                         guint                   action,
                                         GtkWidget              *widget);
-static void summary_execute_cb         (SummaryView            *summaryview,
-                                        guint                   action,
-                                        GtkWidget              *widget);
 static void summary_show_all_header_cb (SummaryView            *summaryview,
                                         guint                   action,
                                         GtkWidget              *widget);
@@ -408,13 +405,10 @@ static GtkItemFactoryEntry summary_popup_entries[] =
        {N_("/_Forward"),               "<control><alt>F", summary_reply_cb, COMPOSE_FORWARD, NULL},
        {N_("/Redirect"),               NULL, summary_reply_cb, COMPOSE_REDIRECT, NULL},
        {N_("/---"),                    NULL, NULL,             0, "<Separator>"},
-       {N_("/Re-_edit"),               NULL, summary_reedit,   0, NULL},
-       {N_("/---"),                    NULL, NULL,             0, "<Separator>"},
        {N_("/M_ove..."),               "<control>O", summary_move_to,  0, NULL},
        {N_("/_Copy..."),               "<shift><control>O", summary_copy_to,   0, NULL},
        {N_("/_Delete"),                "<control>D", summary_delete,   0, NULL},
        {N_("/Cancel a news message"),  NULL, summary_cancel,   0, NULL},
-       {N_("/E_xecute"),               "X", summary_execute_cb,        0, NULL},
        {N_("/---"),                    NULL, NULL,             0, "<Separator>"},
        {N_("/_Mark"),                  NULL, NULL,             0, "<Branch>"},
        {N_("/_Mark/_Mark"),            "<shift>asterisk", summary_mark,        0, NULL},
@@ -429,6 +423,8 @@ static GtkItemFactoryEntry summary_popup_entries[] =
        {N_("/_Mark/Unlock"),           NULL, summary_msgs_unlock, 0, NULL},
        {N_("/Color la_bel"),           NULL, NULL,             0, NULL},
 
+       {N_("/---"),                    NULL, NULL,             0, "<Separator>"},
+       {N_("/Re-_edit"),               NULL, summary_reedit,   0, NULL},
        {N_("/---"),                    NULL, NULL,             0, "<Separator>"},
        {N_("/Add sender to address boo_k"),
                                        NULL, summary_add_address_cb, 0, NULL},
@@ -456,12 +452,6 @@ static GtkItemFactoryEntry summary_popup_entries[] =
                                        "<control><alt>N", summary_open_msg,    0, NULL},
        {N_("/_View/_Source"),          "<control>U", summary_view_source, 0, NULL},
        {N_("/_View/All _header"),      "<control>H", summary_show_all_header_cb, 0, "<ToggleItem>"},
-       {N_("/---"),                    NULL, NULL,             0, "<Separator>"},
-       {N_("/_Save as..."),            "<control>S", summary_save_as,  0, NULL},
-       {N_("/_Print..."),              NULL, summary_print,    0, NULL},
-       {N_("/---"),                    NULL, NULL,             0, "<Separator>"},
-       {N_("/Select _all"),            "<control>A", summary_select_all, 0, NULL},
-       {N_("/Select t_hread"),         NULL, summary_select_thread, 0, NULL}
 };  /* see also list in menu_connect_identical_items() in menu.c if this changes */
 
 static const gchar *const col_label[N_SUMMARY_COLS] = {
@@ -1372,7 +1362,6 @@ static void summary_set_menu_sensitive(SummaryView *summaryview)
                {"/Copy..."                     , M_TARGET_EXIST|M_EXEC|M_UNLOCKED},
                {"/Delete"                      , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED|M_NOT_NEWS},
                {"/Cancel a news message"       , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED|M_NEWS},
-               {"/Execute"                     , M_DELAY_EXEC},
 
                {"/Mark"                        , M_TARGET_EXIST},
                {"/Mark/Mark"                   , M_TARGET_EXIST},
@@ -1392,13 +1381,13 @@ static void summary_set_menu_sensitive(SummaryView *summaryview)
                {"/View/Open in new window"     , M_SINGLE_TARGET_EXIST},
                {"/View/Source"                 , M_SINGLE_TARGET_EXIST},
                {"/View/All header"             , M_SINGLE_TARGET_EXIST},
-
+#if 0
                {"/Save as..."                  , M_TARGET_EXIST|M_UNLOCKED},
                {"/Print..."                    , M_TARGET_EXIST|M_UNLOCKED},
 
                {"/Select thread"               , M_SINGLE_TARGET_EXIST},
                {"/Select all"                  , M_TARGET_EXIST},
-
+#endif
                {NULL, 0}
        };
 
@@ -2410,6 +2399,7 @@ static void summary_set_header(SummaryView *summaryview, gchar *text[],
        static gchar col_score[11];
        static gchar buf[BUFFSIZE];
        gint *col_pos = summaryview->col_pos;
+       FolderType ftype = F_UNKNOWN;
 
        text[col_pos[S_COL_MARK]]   = NULL;
        text[col_pos[S_COL_STATUS]] = NULL;
@@ -2431,7 +2421,11 @@ static void summary_set_header(SummaryView *summaryview, gchar *text[],
 
        text[col_pos[S_COL_FROM]] = msginfo->fromname ? msginfo->fromname :
                _("(No From)");
-       if (prefs_common.swap_from && msginfo->from && msginfo->to) {
+       
+       if (msginfo->folder && msginfo->folder->folder)
+               ftype = msginfo->folder->folder->klass->type; 
+               
+       if (ftype != F_NEWS && prefs_common.swap_from && msginfo->from && msginfo->to) {
                gchar *addr = NULL;
 
                Xstrdup_a(addr, msginfo->from, return);
@@ -4789,12 +4783,6 @@ static void summary_reply_cb(SummaryView *summaryview, guint action,
        g_slist_free(msginfo_list);
 }
 
-static void summary_execute_cb(SummaryView *summaryview, guint action,
-                              GtkWidget *widget)
-{
-       summary_execute(summaryview);
-}
-
 static void summary_show_all_header_cb(SummaryView *summaryview,
                                       guint action, GtkWidget *widget)
 {
index e283498..064d442 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef __SUMMARY_H__
 #define __SUMMARY_H__
 
+#include <sys/types.h>
 #include <regex.h>
 
 #include <glib.h>