sync with sylpheed 0.4.67cvs5
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 13 May 2001 13:03:37 +0000 (13:03 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 13 May 2001 13:03:37 +0000 (13:03 +0000)
17 files changed:
ChangeLog
ChangeLog.claws
ChangeLog.jp
TODO
TODO.jp
configure.in
src/Makefile.am
src/about.c
src/compose.c
src/customheader.c
src/customheader.h
src/defs.h
src/filesel.c
src/prefs_account.c
src/prefs_account.h
src/prefs_customheader.c [moved from src/prefs_headers.c with 87% similarity]
src/prefs_customheader.h [moved from src/prefs_headers.h with 76% similarity]

index 1724714..0af6415 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2001-05-13
+
+       * merged the custom header stuff from claws branch:
+       * src/customheader.[ch]
+         src/prefs_customheader.[ch]: new.
+       * src/customheader.c: custom_header_read_str(): use strtol() instead
+         of atoi() and check errors.
+         custom_header_find(): new function.
+       * src/compose.c: IS_IN_CUSTOM_HEADER(): new macro.
+         compose_write_headers(): made it replace headers with user-defined
+         headers except for some automatically generated headers.
+
 2001-05-11
 
        * src/inc.c: connection_check_cb(): fixed a bug that caused
index a48af26..1402d89 100644 (file)
@@ -1,3 +1,9 @@
+2001-03-13 [alfons]
+
+       0.4.67claws3
+       
+       * sync with sylpheed 0.4.67cvs5
+
 2001-05-13 [paul]
 
         * added Alfons' font selection patch
index 9fc15ad..863af4f 100644 (file)
@@ -1,3 +1,14 @@
+2001-05-13
+
+       * claws ¥Ö¥é¥ó¥Á¤«¤é¥«¥¹¥¿¥à¥Ø¥Ã¥À´ØÏ¢¤ò¥Þ¡¼¥¸:
+       * src/customheader.[ch]
+         src/prefs_customheader.[ch]: ¿·µ¬¡£
+       * src/customheader.c: custom_header_read_str(): atoi() ¤ÎÂå¤ï¤ê¤Ë
+         strtol() ¤ò»ÈÍѤ·¡¢¥¨¥é¡¼¤ò¥Á¥§¥Ã¥¯¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+       * src/compose.c: IS_IN_CUSTOM_HEADER(): ¿·µ¬¥Þ¥¯¥í¡£
+         compose_write_headers(): ¥Ø¥Ã¥À¤ò¥æ¡¼¥¶ÄêµÁ¤Î¥Ø¥Ã¥À¤ÇÃÖ´¹¤¹¤ë
+         ¤è¤¦¤Ë¤·¤¿(¤¤¤¯¤Ä¤«¤Î¼«Æ°Åª¤ËÀ¸À®¤µ¤ì¤ë¥Ø¥Ã¥À¤ò½ü¤¯)¡£
+
 2001-05-11
 
        * src/inc.c: connection_check_cb(): Àܳ¤¬³ÎΩ¤·¤Ê¤«¤Ã¤¿¤È¤­¤Ë
diff --git a/TODO b/TODO
index 5f9e25c..0c5226a 100644 (file)
--- a/TODO
+++ b/TODO
@@ -7,8 +7,6 @@ o POP before SMTP
 o list view of newsgroups and subscription of groups from there
 o full-text search of messages (plain, or hooking up with Namazu)
 o original icons and logos
-o designate the displayed headers
-o user-defined headers
 o template function
 o speed-up of filtering
 o regular expression support at filtering
@@ -64,3 +62,5 @@ Implemented features
 * completion of mail address
 * prohibition of multiple execution (with Unix domain socket)
 * periodical check of newly arrived mails
+* designate the displayed headers
+* user-defined headers
diff --git a/TODO.jp b/TODO.jp
index f762646..61abf03 100644 (file)
--- a/TODO.jp
+++ b/TODO.jp
@@ -7,8 +7,6 @@ o POP before SMTP
 o ¥Ë¥å¡¼¥¹¥°¥ë¡¼¥×¤Î¥ê¥¹¥Èɽ¼¨¤È¤½¤³¤«¤é¤Î¹ØÆÉ¥°¥ë¡¼¥×ÄɲÃ
 o ¥á¥Ã¥»¡¼¥¸¤ÎÁ´Ê¸¸¡º÷ (¥Ù¥¿¡¢ Namazu ¤È¤ÎÏ¢·È)
 o ¥ª¥ê¥¸¥Ê¥ë¤Î¥¢¥¤¥³¥ó¤È¥í¥´
-o É½¼¨¤µ¤ì¤ë¥Ø¥Ã¥À¤Î»ØÄê
-o ¥æ¡¼¥¶ÄêµÁ¤Î¥Ø¥Ã¥À
 o ¥Æ¥ó¥×¥ì¡¼¥Èµ¡Ç½
 o ¿¶¤êʬ¤±½èÍý¤Î¹â®²½
 o ¿¶¤êʬ¤±¤ÇÀµµ¬É½¸½¤ËÂбþ¤¹¤ë
@@ -65,3 +63,5 @@ o 
 * ¥á¡¼¥ë¥¢¥É¥ì¥¹¤ÎÊä´°
 * Æó½Åµ¯Æ°Ëɻߠ(with Unix domain socket)
 * ¿·Ãå¥á¡¼¥ë¤ÎÄê´üŪ¥Á¥§¥Ã¥¯
+* É½¼¨¤µ¤ì¤ë¥Ø¥Ã¥À¤Î»ØÄê
+* ¥æ¡¼¥¶ÄêµÁ¤Î¥Ø¥Ã¥À
index bf153ae..ee6e4d8 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=4
 MICRO_VERSION=67
 INTERFACE_AGE=67
 BINARY_AGE=67
-EXTRA_VERSION=claws2
+EXTRA_VERSION=claws3
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index b8c8be1..6757ee7 100644 (file)
@@ -26,8 +26,10 @@ sylpheed_SOURCES = \
        prefs_filter.c prefs_filter.h \
        prefs_account.c prefs_account.h \
        prefs_display_header.c prefs_display_header.h \
+       prefs_customheader.c prefs_customheader.h \
        account.c account.h \
        displayheader.c displayheader.h \
+       customheader.c customheader.h \
        addressbook.c addressbook.h \
        filesel.c filesel.h \
        foldersel.c foldersel.h \
@@ -77,8 +79,6 @@ sylpheed_SOURCES = \
        addr_compl.c addr_compl.h \
        gtkstext.c gtkstext.h \
        grouplist_dialog.c grouplist_dialog.h \
-       customheader.c customheader.h \
-       prefs_headers.c prefs_headers.h \
        scoring.c scoring.h \
        prefs_folder_item.c prefs_folder_item.h \
        matcher.c matcher.h \
index 60c3888..79608d1 100644 (file)
@@ -79,10 +79,10 @@ static void about_create(void)
        GdkColormap *cmap;
        GdkColor uri_color[2] = {{0, 0, 0, 0xffff}, {0, 0xffff, 0, 0}};
        gboolean success[2];
-       
+
 #if HAVE_SYS_UTSNAME_H
        struct utsname utsbuf;
-#endif 
+#endif
        gchar buf[1024];
        gint i;
 
@@ -91,7 +91,6 @@ static void about_create(void)
        gtk_container_set_border_width(GTK_CONTAINER(window), 8);
        gtk_widget_set_usize(window, 518, 358);
        gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
-       /* gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, FALSE); */
        gtk_signal_connect(GTK_OBJECT(window), "delete_event",
                           GTK_SIGNAL_FUNC(gtk_widget_hide_on_delete), NULL);
        gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
@@ -107,7 +106,7 @@ static void about_create(void)
 
        label = gtk_label_new("version "VERSION);
        gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
-       
+
 #if HAVE_SYS_UTSNAME_H
        uname(&utsbuf);
        g_snprintf(buf, sizeof(buf),
index 9b76679..c7b8fc6 100644 (file)
@@ -79,6 +79,7 @@
 #include "menu.h"
 #include "send.h"
 #include "news.h"
+#include "customheader.h"
 #include "prefs_common.h"
 #include "prefs_account.h"
 #include "account.h"
@@ -97,7 +98,6 @@
 #include "gtkshruler.h"
 #include "folder.h"
 #include "addr_compl.h"
-#include "customheader.h"
 
 #if USE_GPGME
 #  include "rfc2015.h"
@@ -592,6 +592,8 @@ void compose_forward(MsgInfo *msginfo, gboolean as_attach)
                gtk_widget_grab_focus(compose->newsgroups_entry);
 }
 
+#undef INSERT_FW_HEADER
+
 void compose_reedit(MsgInfo *msginfo)
 {
        Compose *compose;
@@ -1168,6 +1170,8 @@ static void compose_reedit_set_entry(Compose *compose, MsgInfo *msginfo)
        }
 }
 
+#undef SET_ENTRY
+
 static void compose_insert_sig(Compose *compose)
 {
        gchar *sigfile;
@@ -1862,20 +1866,9 @@ static void compose_write_attach(Compose *compose, FILE *fp)
        fprintf(fp, "\n--%s--\n", compose->boundary);
 }
 
-static gint is_in_custom_headers(Compose *compose, gchar * header)
-{
-       GSList * cur;
-
-       if (compose->account->add_customhdr) {
-               for (cur = compose->account->customhdr_list;
-                    cur != NULL; cur = cur->next) {
-                       CustomHeader * ch = (CustomHeader *) cur->data;
-                       if (strcasecmp(ch->name, header) == 0)
-                               return 1;
-               }
-       }
-       return 0;
-}
+#define IS_IN_CUSTOM_HEADER(header) \
+       (compose->account->add_customhdr && \
+        custom_header_find(compose->account->customhdr_list, header) != NULL)
 
 static gint compose_write_headers(Compose *compose, FILE *fp,
                                  const gchar *charset, EncodingType encoding,
@@ -1884,7 +1877,6 @@ static gint compose_write_headers(Compose *compose, FILE *fp,
        gchar buf[BUFFSIZE];
        gchar *str;
        /* struct utsname utsbuf; */
-       GSList * cur;
 
        g_return_val_if_fail(fp != NULL, -1);
        g_return_val_if_fail(charset != NULL, -1);
@@ -1892,24 +1884,23 @@ static gint compose_write_headers(Compose *compose, FILE *fp,
        g_return_val_if_fail(compose->account->address != NULL, -1);
 
        /* Date */
-       if (!is_in_custom_headers(compose, "Date")) {
-               if (compose->account->add_date) {
-                       get_rfc822_date(buf, sizeof(buf));
-                       fprintf(fp, "Date: %s\n", buf);
-               }
+       if (compose->account->add_date) {
+               get_rfc822_date(buf, sizeof(buf));
+               fprintf(fp, "Date: %s\n", buf);
        }
-
+       
        /* From */
-       if (!is_in_custom_headers(compose, "From")) {
+       if (!IS_IN_CUSTOM_HEADER("From")) {
                if (compose->account->name && *compose->account->name) {
                        compose_convert_header
                                (buf, sizeof(buf), compose->account->name,
                                 strlen("From: "));
-                       fprintf(fp, "From: %s <%s>\n", buf, compose->account->address);
+                       fprintf(fp, "From: %s <%s>\n",
+                               buf, compose->account->address);
                } else
                        fprintf(fp, "From: %s\n", compose->account->address);
        }
-
+       
        slist_free_strings(compose->to_list);
        g_slist_free(compose->to_list);
        compose->to_list = NULL;
@@ -1923,15 +1914,16 @@ static gint compose_write_headers(Compose *compose, FILE *fp,
                        if (*str != '\0') {
                                compose->to_list = address_list_append
                                        (compose->to_list, str);
-                               compose_convert_header(buf, sizeof(buf), str,
-                                                      strlen("To: "));
-                               if (!is_in_custom_headers(compose, "To")) {
+                               if (!IS_IN_CUSTOM_HEADER("To")) {
+                                       compose_convert_header
+                                               (buf, sizeof(buf), str,
+                                                strlen("To: "));
                                        fprintf(fp, "To: %s\n", buf);
                                }
                        }
                }
        }
-
+       
        slist_free_strings(compose->newsgroup_list);
        g_slist_free(compose->newsgroup_list);
        compose->newsgroup_list = NULL;
@@ -1946,9 +1938,9 @@ static gint compose_write_headers(Compose *compose, FILE *fp,
                        compose->newsgroup_list =
                                newsgroup_list_append(compose->newsgroup_list,
                                                      str);
-                       compose_convert_header(buf, sizeof(buf), str,
-                                              strlen("Newsgroups: "));
-                       if (!is_in_custom_headers(compose, "Newsgroups")) {
+                       if (!IS_IN_CUSTOM_HEADER("Newsgroups")) {
+                               compose_convert_header(buf, sizeof(buf), str,
+                                                      strlen("Newsgroups: "));
                                fprintf(fp, "Newsgroups: %s\n", buf);
                        }
                }
@@ -1966,15 +1958,16 @@ static gint compose_write_headers(Compose *compose, FILE *fp,
                        if (*str != '\0') {
                                compose->to_list = address_list_append
                                        (compose->to_list, str);
-                               compose_convert_header(buf, sizeof(buf), str,
-                                                      strlen("Cc: "));
-                               if (!is_in_custom_headers(compose, "Cc")) {
+                               if (!IS_IN_CUSTOM_HEADER("Cc")) {
+                                       compose_convert_header
+                                               (buf, sizeof(buf), str,
+                                                strlen("Cc: "));
                                        fprintf(fp, "Cc: %s\n", buf);
                                }
                        }
                }
        }
-
+       
        /* Bcc */
        if (compose->use_bcc) {
                str = gtk_entry_get_text(GTK_ENTRY(compose->bcc_entry));
@@ -1988,162 +1981,142 @@ static gint compose_write_headers(Compose *compose, FILE *fp,
                                        compose_convert_header
                                                (buf, sizeof(buf), str,
                                                 strlen("Bcc: "));
-                                       if (!is_in_custom_headers(compose,
-                                                                 "Bcc")) {
-                                               fprintf(fp, "Bcc: %s\n", buf);
-                                       }
+                                       fprintf(fp, "Bcc: %s\n", buf);
                                }
                        }
                }
        }
 
        /* Subject */
-       if (!is_in_custom_headers(compose, "Subject")) {
-               str = gtk_entry_get_text(GTK_ENTRY(compose->subject_entry));
+       str = gtk_entry_get_text(GTK_ENTRY(compose->subject_entry));
+       if (*str != '\0' && !IS_IN_CUSTOM_HEADER("Subject")) {
+               Xstrdup_a(str, str, return -1);
+               g_strstrip(str);
                if (*str != '\0') {
-                       Xstrdup_a(str, str, return -1);
-                       g_strstrip(str);
-                       if (*str != '\0') {
-                               compose_convert_header(buf, sizeof(buf), str,
-                                                      strlen("Subject: "));
-                               fprintf(fp, "Subject: %s\n", buf);
-                       }
+                       compose_convert_header(buf, sizeof(buf), str,
+                                              strlen("Subject: "));
+                       fprintf(fp, "Subject: %s\n", buf);
                }
        }
 
        /* Message-ID */
-       if (!is_in_custom_headers(compose, "Message-Id")) {
-               if (compose->account->gen_msgid) {
-                       compose_generate_msgid(compose, buf, sizeof(buf));
-                       fprintf(fp, "Message-Id: <%s>\n", buf);
-                       compose->msgid = g_strdup(buf);
-               }
+       if (compose->account->gen_msgid) {
+               compose_generate_msgid(compose, buf, sizeof(buf));
+               fprintf(fp, "Message-Id: <%s>\n", buf);
+               compose->msgid = g_strdup(buf);
        }
 
        /* In-Reply-To */
-       if (!is_in_custom_headers(compose, "In-Reply-To")) {
-               if (compose->inreplyto && compose->to_list)
-                       fprintf(fp, "In-Reply-To: <%s>\n", compose->inreplyto);
-       }
+       if (compose->inreplyto && compose->to_list)
+               fprintf(fp, "In-Reply-To: <%s>\n", compose->inreplyto);
 
        /* References */
-       if (!is_in_custom_headers(compose, "References")) {
-               if (compose->references)
-                       fprintf(fp, "References: %s\n", compose->references);
-       }
+       if (compose->references)
+               fprintf(fp, "References: %s\n", compose->references);
 
        /* Followup-To */
-       if (!is_in_custom_headers(compose, "Followup-To")) {
-               if (compose->use_followupto) {
-                       str = gtk_entry_get_text(GTK_ENTRY(compose->followup_entry));
+       if (compose->use_followupto && !IS_IN_CUSTOM_HEADER("Followup-To")) {
+               str = gtk_entry_get_text(GTK_ENTRY(compose->followup_entry));
+               if (*str != '\0') {
+                       Xstrdup_a(str, str, return -1);
+                       g_strstrip(str);
+                       remove_space(str);
                        if (*str != '\0') {
-                               Xstrdup_a(str, str, return -1);
-                               g_strstrip(str);
-                               remove_space(str);
-                               if (*str != '\0') {
-                                       compose_convert_header(buf, sizeof(buf), str,
-                                                              strlen("Followup-To: "));
-                                       fprintf(fp, "Followup-To: %s\n", buf);
-                               }
+                               compose_convert_header(buf, sizeof(buf), str,
+                                                      strlen("Followup-To: "));
+                               fprintf(fp, "Followup-To: %s\n", buf);
                        }
                }
        }
 
        /* Reply-To */
-       if (!is_in_custom_headers(compose, "Reply-To")) {
-               if (compose->use_replyto) {
-                       str = gtk_entry_get_text(GTK_ENTRY(compose->reply_entry));
+       if (compose->use_replyto && !IS_IN_CUSTOM_HEADER("Reply-To")) {
+               str = gtk_entry_get_text(GTK_ENTRY(compose->reply_entry));
+               if (*str != '\0') {
+                       Xstrdup_a(str, str, return -1);
+                       g_strstrip(str);
                        if (*str != '\0') {
-                               Xstrdup_a(str, str, return -1);
-                               g_strstrip(str);
-                               if (*str != '\0') {
-                                       compose_convert_header(buf, sizeof(buf), str,
-                                                              strlen("Reply-To: "));
-                                       fprintf(fp, "Reply-To: %s\n", buf);
-                               }
+                               compose_convert_header(buf, sizeof(buf), str,
+                                                      strlen("Reply-To: "));
+                               fprintf(fp, "Reply-To: %s\n", buf);
                        }
                }
        }
 
        /* Program version and system info */
        /* uname(&utsbuf); */
-       if (!is_in_custom_headers(compose, "X-Mailer")) {
-               str = gtk_entry_get_text(GTK_ENTRY(compose->to_entry));
-               if (*str != '\0') {
-                       fprintf(fp, "X-Mailer: %s (GTK+ %d.%d.%d; %s)\n",
-                               prog_version,
-                               gtk_major_version, gtk_minor_version, gtk_micro_version,
-                               HOST_ALIAS);
+       str = gtk_entry_get_text(GTK_ENTRY(compose->to_entry));
+       if (*str != '\0' && !IS_IN_CUSTOM_HEADER("X-Mailer")) {
+               fprintf(fp, "X-Mailer: %s (GTK+ %d.%d.%d; %s)\n",
+                       prog_version,
+                       gtk_major_version, gtk_minor_version, gtk_micro_version,
+                       HOST_ALIAS);
                        /* utsbuf.sysname, utsbuf.release, utsbuf.machine); */
-               }
        }
-
-       if (!is_in_custom_headers(compose, "X-Newsreader")) {
-               str = gtk_entry_get_text(GTK_ENTRY(compose->newsgroups_entry));
-               if (*str != '\0') {
+       str = gtk_entry_get_text(GTK_ENTRY(compose->newsgroups_entry));
+       if (*str != '\0' && !IS_IN_CUSTOM_HEADER("X-Newsreader")) {
                fprintf(fp, "X-Newsreader: %s (GTK+ %d.%d.%d; %s)\n",
                        prog_version,
                        gtk_major_version, gtk_minor_version, gtk_micro_version,
                        HOST_ALIAS);
                        /* utsbuf.sysname, utsbuf.release, utsbuf.machine); */
-               }
        }
 
        /* Organization */
-       if (!is_in_custom_headers(compose, "Organization")) {
-               if (compose->account->organization) {
-                       compose_convert_header(buf, sizeof(buf),
-                                              compose->account->organization,
-                                              strlen("Organization: "));
-                       fprintf(fp, "Organization: %s\n", buf);
-               }
+       if (compose->account->organization &&
+           !IS_IN_CUSTOM_HEADER("Organization")) {
+               compose_convert_header(buf, sizeof(buf),
+                                      compose->account->organization,
+                                      strlen("Organization: "));
+               fprintf(fp, "Organization: %s\n", buf);
        }
 
        /* MIME */
-       if (!is_in_custom_headers(compose, "Mime-Version")) {
-               fprintf(fp, "Mime-Version: 1.0\n");
-       }
-
-       /* Request Return Receipt */
-       if (!is_in_custom_headers(compose, "Disposition-Notification-To")) {
-               if (compose->return_receipt) {
-                       if (compose->account->name
-                           && *compose->account->name) {
-                               compose_convert_header(buf, sizeof(buf), compose->account->name, strlen("Disposition-Notification-To: "));
-                               fprintf(fp, "Disposition-Notification-To: %s <%s>\n", buf, compose->account->address);
-                       } else
-                               fprintf(fp, "Disposition-Notification-To: %s\n", compose->account->address);
-               }
-       }
-
+       fprintf(fp, "Mime-Version: 1.0\n");
        if (compose->use_attach) {
                get_rfc822_date(buf, sizeof(buf));
                subst_char(buf, ' ', '_');
                subst_char(buf, ',', '_');
                compose->boundary = g_strdup_printf("Multipart_%s_%08x",
                                                    buf, (guint)compose);
-               if (!is_in_custom_headers(compose, "Content-Type")) {
-                       fprintf(fp,
-                               "Content-Type: multipart/mixed;\n"
-                               " boundary=\"%s\"\n", compose->boundary);
-               }
+               fprintf(fp,
+                       "Content-Type: multipart/mixed;\n"
+                       " boundary=\"%s\"\n", compose->boundary);
        } else {
-               if (!is_in_custom_headers(compose, "Content-Type")) {
-                       fprintf(fp, "Content-Type: text/plain; charset=%s\n", charset);
-               }
-               if (!is_in_custom_headers(compose,
-                                         "Content-Transfer-Encoding")) {
-                       fprintf(fp, "Content-Transfer-Encoding: %s\n",
-                               procmime_get_encoding_str(encoding));
-               }
+               fprintf(fp, "Content-Type: text/plain; charset=%s\n", charset);
+               fprintf(fp, "Content-Transfer-Encoding: %s\n",
+                       procmime_get_encoding_str(encoding));
        }
 
-       /* Custom Headers */
+       /* custom headers */
        if (compose->account->add_customhdr) {
+               GSList *cur;
+
                for (cur = compose->account->customhdr_list; cur != NULL;
                     cur = cur->next) {
-                       CustomHeader * ch = (CustomHeader *) cur->data;
-                       fprintf(fp, "%s: %s\n", ch->name, ch->value);
+                       CustomHeader *chdr = (CustomHeader *)cur->data;
+
+                       if (strcasecmp(chdr->name, "Date") != 0 &&
+                           strcasecmp(chdr->name, "Message-Id") != 0 &&
+                           strcasecmp(chdr->name, "In-Reply-To") != 0 &&
+                           strcasecmp(chdr->name, "References") != 0 &&
+                           strcasecmp(chdr->name, "Mime-Version") != 0 &&
+                           strcasecmp(chdr->name, "Content-Type") != 0 &&
+                           strcasecmp(chdr->name, "Content-Transfer-Encoding") != 0)
+                               fprintf(fp, "%s: %s\n",
+                                       chdr->name, chdr->value);
+               }
+       }
+
+       /* Request Return Receipt */
+       if (!IS_IN_CUSTOM_HEADER("Disposition-Notification-To")) {
+               if (compose->return_receipt) {
+                       if (compose->account->name
+                           && *compose->account->name) {
+                               compose_convert_header(buf, sizeof(buf), compose->account->name, strlen("Disposition-Notification-To: "));
+                               fprintf(fp, "Disposition-Notification-To: %s <%s>\n", buf, compose->account->address);
+                       } else
+                               fprintf(fp, "Disposition-Notification-To: %s\n", compose->account->address);
                }
        }
 
@@ -2153,6 +2126,8 @@ static gint compose_write_headers(Compose *compose, FILE *fp,
        return 0;
 }
 
+#undef IS_IN_CUSTOM_HEADER
+
 static void compose_convert_header(gchar *dest, gint len, gchar *src,
                                   gint header_len)
 {
@@ -2674,6 +2649,12 @@ static Compose *compose_create(PrefsAccount *account)
                        (GTK_CHECK_MENU_ITEM(menuitem), TRUE);
                gtk_widget_set_sensitive(menuitem, FALSE);
        }
+       if (account->set_autocc && account->auto_cc) {
+               gtk_entry_set_text(GTK_ENTRY(cc_entry), account->auto_cc);
+               menuitem = gtk_item_factory_get_item(ifactory, "/Message/Cc");
+               gtk_check_menu_item_set_active
+                       (GTK_CHECK_MENU_ITEM(menuitem), TRUE);
+       }
        if (account->set_autobcc) {
                menuitem = gtk_item_factory_get_item(ifactory, "/Message/Bcc");
                gtk_check_menu_item_set_active
@@ -2848,6 +2829,8 @@ static void compose_toolbar_create(Compose *compose, GtkWidget *container)
        gtk_widget_show_all(toolbar);
 }
 
+#undef CREATE_TOOLBAR_ICON
+
 static GtkWidget *compose_account_option_menu_create(Compose *compose)
 {
        GList *accounts;
@@ -3178,6 +3161,8 @@ static void compose_attach_property_create(gboolean *cancelled)
        attach_prop.cancel_btn       = cancel_btn;
 }
 
+#undef SET_LABEL_AND_ENTRY
+
 static void attach_property_ok(GtkWidget *widget, gboolean *cancelled)
 {
        *cancelled = FALSE;
index d585efa..add563a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999,2000 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2001 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
@@ -23,7 +23,6 @@
 
 #include <glib.h>
 #include <string.h>
-#include <strings.h>
 #include <stdlib.h>
 
 #include "intl.h"
 #include "utils.h"
 
 
-gchar * custom_header_get_str(CustomHeader *ch)
+gchar *custom_header_get_str(CustomHeader *ch)
 {
-       return g_strdup_printf
-               ("%i:%s: %s", ch->account_id, ch->name, ch->value);
+       return g_strdup_printf("%i:%s: %s",
+                              ch->account_id, ch->name, ch->value);
 }
-CustomHeader * custom_header_read_str(gchar * buf)
+
+CustomHeader *custom_header_read_str(const gchar *buf)
 {
-       CustomHeader * ch;
-       gchar * account_id_str;
-       gchar * name;
-       gchar * value;
-       gchar * tmp;
-       Xalloca(tmp, strlen(buf) + 1, return NULL);
-       strcpy(tmp, buf);
+       CustomHeader *ch;
+       gchar *account_id_str;
+       gint id;
+       gchar *name;
+       gchar *value;
+       gchar *tmp;
+
+       Xstrdup_a(tmp, buf, return NULL);
+       g_strstrip(tmp);
 
        account_id_str = tmp;
 
-       name = strchr(account_id_str, ':');
-       if (!name)
-               return NULL;
-       else
-               *name++ = '\0';
+       name = strchr(account_id_str, ':');
+       if (!name)
+               return NULL;
+       else {
+               gchar *endp;
+
+               *name++ = '\0';
+               id = strtol(account_id_str, &endp, 10);
+               if (*endp != '\0') return NULL;
+       }
+
+       while (*name == ' ') name++;
 
-       while (*name == ' ')
-               name ++;
-       
-       ch = g_new0(CustomHeader, 1);
+       ch = g_new0(CustomHeader, 1);
+       ch->account_id = id;
 
-       ch->account_id = atoi(account_id_str);
-       if (ch->account_id == 0) {
+       value = strchr(name, ':');
+       if (!value) {
                g_free(ch);
                return NULL;
+       } else
+               *value++ = '\0';
+
+       ch->name = *name ? g_strdup(name) : NULL;
+       while (*value == ' ') value++;
+       ch->value = *value ? g_strdup(value) : NULL;
+
+       return ch;
+}
+
+CustomHeader *custom_header_find(GSList *header_list, const gchar *header)
+{
+       GSList *cur;
+       CustomHeader *chdr;
+
+       for (cur = header_list; cur != NULL; cur = cur->next) {
+               chdr = (CustomHeader *)cur->data;
+               if (!strcasecmp(chdr->name, header))
+                       return chdr;
        }
 
-       value = strchr(name, ':');
-       if (!value)
-               {
-                       g_free(ch);
-                       return NULL;
-               }
-       else
-               *value++ = '\0';
-       ch->name = *name ? g_strdup(name) : NULL;
-       while (*value == ' ')
-               value ++;
-
-       ch->value = *value ? g_strdup(value) : NULL;
-
-       return ch;
+       return NULL;
 }
+
 void custom_header_free(CustomHeader *ch)
 {
-       if (!ch) return;
+       if (!ch) return;
+
        if (ch->name)
                g_free(ch->name);
        if (ch->value)
                g_free(ch->value);
-       g_free(ch);
+
+       g_free(ch);
 }
index 938502a..8554ea7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999,2000 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2001 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
 #ifndef __CUSTOMHEADER_H__
 #define __CUSTOMHEADER_H__
 
+#include <glib.h>
+
 struct _CustomHeader
 {
-       int account_id;
+       gint account_id;
        gchar *name;
        gchar *value;
 };
 
-typedef struct _CustomHeader CustomHeader;
+typedef struct _CustomHeader   CustomHeader;
 
-gchar * custom_header_get_str(CustomHeader *ch);
-CustomHeader * custom_header_read_str(gchar * buf);
-void custom_header_free(CustomHeader *ch);
+gchar *custom_header_get_str           (CustomHeader   *ch);
+CustomHeader *custom_header_read_str   (const gchar    *buf);
+CustomHeader *custom_header_find       (GSList         *header_list,
+                                        const gchar    *header);
+void custom_header_free                        (CustomHeader   *ch);
 
 #endif /* __CUSTOMHEADER_H__ */
index 0ed4845..44a1c0a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999,2000 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2001 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
@@ -46,7 +46,7 @@
 #define COMMON_RC              "sylpheedrc"
 #define ACCOUNT_RC             "accountrc"
 #define FILTER_RC              "filterrc"
-#define HEADERS_RC             "headersrc"
+#define CUSTOM_HEADER_RC       "customheaderrc"
 #define DISPLAY_HEADER_RC      "dispheaderrc"
 #define FOLDERITEM_RC           "folderitemrc"
 #define SCORING_RC              "scoringrc"
 #define FOLDER_SPACING                 4
 #define COLOR_DIM                      35000
 
-#if 0
-#define NORMAL_FONT    "-*-helvetica-medium-r-normal--12-*," \
-                       "-*-*-medium-r-normal--12-*-*-*-*-*-*-*,*"
-#define BOLD_FONT      "-*-helvetica-bold-r-normal--12-*," \
-                       "-*-*-bold-r-normal--12-*-*-*-*-*-*-*,*"
-#define SMALL_FONT     "-*-helvetica-medium-r-normal--10-*," \
-                       "-*-*-medium-r-normal--10-*-*-*-*-*-*-*,*"
-#else
 #define NORMAL_FONT prefs_common.normalfont
 #define BOLD_FONT   prefs_common.boldfont
 #define SMALL_FONT     prefs_common.smallfont
-#endif
 
 #endif /* __DEFS_H__ */
index 1dd1500..4c61bc0 100644 (file)
@@ -99,8 +99,7 @@ static void filesel_create(const gchar *title)
                 "clicked", GTK_SIGNAL_FUNC(filesel_cancel_cb),
                 NULL);
        gtk_signal_connect(GTK_OBJECT(filesel), "delete_event",
-                          GTK_SIGNAL_FUNC(delete_event),
-                          NULL);
+                          GTK_SIGNAL_FUNC(delete_event), NULL);
        gtk_signal_connect(GTK_OBJECT(filesel), "key_press_event",
                           GTK_SIGNAL_FUNC(key_pressed), NULL);
        gtk_signal_connect(GTK_OBJECT(filesel), "focus_in_event",
index 9522fa0..648baf6 100644 (file)
@@ -36,6 +36,7 @@
 #include "main.h"
 #include "prefs.h"
 #include "prefs_account.h"
+#include "prefs_customheader.h"
 #include "account.h"
 #include "mainwindow.h"
 #include "manage_window.h"
@@ -44,7 +45,6 @@
 #include "gtkutils.h"
 #include "utils.h"
 #include "alertpanel.h"
-#include "prefs_headers.h"
 
 static gboolean cancelled;
 
@@ -315,6 +315,8 @@ static void prefs_account_privacy_create    (void);
 #endif /* USE_GPGME */
 static void prefs_account_advanced_create      (void);
 
+static void prefs_account_edit_custom_header   (void);
+
 static gint prefs_account_deleted              (GtkWidget      *widget,
                                                 GdkEventAny    *event,
                                                 gpointer        data);
@@ -325,7 +327,6 @@ static void prefs_account_ok                        (void);
 static gint prefs_account_apply                        (void);
 static void prefs_account_cancel               (void);
 
-static void prefs_account_customhdr_edit       (void);
 
 #define VSPACING               12
 #define VSPACING_NARROW                4
@@ -945,8 +946,6 @@ static void prefs_account_send_create(void)
        gtk_widget_show (hbox);
        gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
 
-       /* gtk_widget_set_sensitive(hbox, FALSE); */
-
        PACK_CHECK_BUTTON (hbox, customhdr_chkbtn,
                           _("Add user-defined header"));
 
@@ -954,6 +953,9 @@ static void prefs_account_send_create(void)
        gtk_widget_show (customhdr_edit_btn);
        gtk_box_pack_start (GTK_BOX (hbox), customhdr_edit_btn,
                            FALSE, FALSE, 0);
+       gtk_signal_connect (GTK_OBJECT (customhdr_edit_btn), "clicked",
+                           GTK_SIGNAL_FUNC (prefs_account_edit_custom_header),
+                           NULL);
 
        SET_TOGGLE_SENSITIVITY (customhdr_chkbtn, customhdr_edit_btn);
 
@@ -1018,10 +1020,6 @@ static void prefs_account_send_create(void)
                _("Authenticate with POP3 before sending"));
        gtk_widget_set_sensitive(pop_bfr_smtp_chkbtn, FALSE);
 
-       gtk_signal_connect(GTK_OBJECT(customhdr_edit_btn), "clicked",
-                          GTK_SIGNAL_FUNC(prefs_account_customhdr_edit),
-                          NULL);
-
        send.date_chkbtn      = date_chkbtn;
        send.msgid_chkbtn     = msgid_chkbtn;
        send.customhdr_chkbtn = customhdr_chkbtn;
@@ -1291,7 +1289,7 @@ static void prefs_account_cancel(void)
        gtk_main_quit();
 }
 
-static void prefs_account_customhdr_edit(void)
+static void prefs_account_edit_custom_header(void)
 {
        prefs_headers_open(&tmp_ac_prefs);
 }
index cae6f8d..f6b44fa 100644 (file)
@@ -37,7 +37,6 @@ typedef enum {
        A_IMAP4,
        A_NNTP,
        A_LOCAL,
-       //      A_LOCAL_CMD
 } RecvProtocol;
 
 #if USE_GPGME
similarity index 87%
rename from src/prefs_headers.c
rename to src/prefs_customheader.c
index aa4d42f..fcea198 100644 (file)
 #include "intl.h"
 #include "main.h"
 #include "prefs.h"
-#include "prefs_headers.h"
+#include "prefs_customheader.h"
 #include "prefs_common.h"
 #include "prefs_account.h"
 #include "mainwindow.h"
 #include "foldersel.h"
 #include "manage_window.h"
 #include "customheader.h"
+#include "folder.h"
 #include "utils.h"
 #include "gtkutils.h"
 #include "alertpanel.h"
-#include "folder.h"
 
 static struct Headers {
        GtkWidget *window;
 
-       /*
-       GtkWidget *close_btn;
-       */
        GtkWidget *ok_btn;
        GtkWidget *cancel_btn;
 
@@ -61,34 +58,26 @@ static struct Headers {
        GtkWidget *headers_clist;
 } headers;
 
-/*
-   parameter name, default value, pointer to the prefs variable, data type,
-   pointer to the widget pointer,
-   pointer to the function for data setting,
-   pointer to the function for widget setting
- */
-
 #define VSPACING               12
 #define VSPACING_NARROW                4
 #define DEFAULT_ENTRY_WIDTH    80
 #define PREFSBUFSIZE           1024
 
 /* widget creating functions */
-static void prefs_headers_create               (void);
+static void prefs_headers_create       (void);
 
-static void prefs_headers_set_dialog   (PrefsAccount * ac);
-static void prefs_headers_set_list     (PrefsAccount * ac);
-static gint prefs_headers_clist_set_row        (PrefsAccount * ac,
-                                        gint    row);
+static void prefs_headers_set_dialog   (PrefsAccount *ac);
+static void prefs_headers_set_list     (PrefsAccount *ac);
+static gint prefs_headers_clist_set_row        (PrefsAccount *ac,
+                                        gint          row);
 
 /* callback functions */
-static void prefs_headers_select_dest_cb       (void);
 static void prefs_headers_register_cb  (void);
 static void prefs_headers_substitute_cb        (void);
 static void prefs_headers_delete_cb    (void);
 static void prefs_headers_up           (void);
 static void prefs_headers_down         (void);
-static void prefs_headers_select               (GtkCList       *clist,
+static void prefs_headers_select       (GtkCList       *clist,
                                         gint            row,
                                         gint            column,
                                         GdkEvent       *event);
@@ -96,26 +85,21 @@ static void prefs_headers_select            (GtkCList       *clist,
 static void prefs_headers_key_pressed  (GtkWidget      *widget,
                                         GdkEventKey    *event,
                                         gpointer        data);
-/*
-static void prefs_headers_close                (GtkButton      *button);
-*/
 static void prefs_headers_ok           (GtkButton      *button);
 static void prefs_headers_cancel       (GtkButton      *button);
-static gint prefs_headers_deleted(GtkWidget *widget, GdkEventAny *event,
-                                 gpointer data);
+static gint prefs_headers_deleted      (GtkWidget      *widget,
+                                        GdkEventAny    *event,
+                                        gpointer        data);
 
-static PrefsAccount * cur_ac = NULL;
+static PrefsAccount *cur_ac = NULL;
 
-void prefs_headers_open(PrefsAccount * ac)
+void prefs_headers_open(PrefsAccount *ac)
 {
        if (!headers.window) {
                prefs_headers_create();
        }
 
        manage_window_set_transient(GTK_WINDOW(headers.window));
-       /*
-       gtk_widget_grab_focus(headers.close_btn);
-       */
        gtk_widget_grab_focus(headers.ok_btn);
 
        prefs_headers_set_dialog(ac);
@@ -130,7 +114,6 @@ static void prefs_headers_create(void)
        GtkWidget *window;
        GtkWidget *vbox;
 
-       /*      GtkWidget *close_btn; */
        GtkWidget *ok_btn;
        GtkWidget *cancel_btn;
 
@@ -175,15 +158,8 @@ static void prefs_headers_create(void)
 
        gtkut_button_set_create(&confirm_area, &ok_btn, _("OK"),
                                &cancel_btn, _("Cancel"), NULL, NULL);
-       /*
-       gtkut_button_set_create (&confirm_area, &close_btn, _("Close"),
-                                NULL, NULL, NULL, NULL);
-       */
        gtk_widget_show (confirm_area);
        gtk_box_pack_end (GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
-       /*
-       gtk_widget_grab_default (close_btn);
-       */
        gtk_widget_grab_default (ok_btn);
 
        gtk_window_set_title (GTK_WINDOW(window),
@@ -321,21 +297,20 @@ static void prefs_headers_create(void)
        gtk_signal_connect (GTK_OBJECT (down_btn), "clicked",
                            GTK_SIGNAL_FUNC (prefs_headers_down), NULL);
 
-
        gtk_widget_show_all(window);
 
-       headers.window    = window;
-       /*      headers.close_btn = close_btn; */
-       headers.ok_btn = ok_btn;
+       headers.window     = window;
+       headers.ok_btn     = ok_btn;
        headers.cancel_btn = cancel_btn;
 
        headers.hdr_combo  = hdr_combo;
        headers.hdr_entry  = GTK_COMBO (hdr_combo)->entry;
        headers.key_entry  = key_entry;
+
        headers.headers_clist   = headers_clist;
 }
 
-void prefs_headers_read_config(PrefsAccount * ac)
+void prefs_headers_read_config(PrefsAccount *ac)
 {
        gchar *rcpath;
        FILE *fp;
@@ -344,7 +319,8 @@ void prefs_headers_read_config(PrefsAccount * ac)
 
        debug_print(_("Reading headers configuration...\n"));
 
-       rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, HEADERS_RC, NULL);
+       rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
+                            CUSTOM_HEADER_RC, NULL);
        if ((fp = fopen(rcpath, "r")) == NULL) {
                if (ENOENT != errno) FILE_OP_ERROR(rcpath, "fopen");
                g_free(rcpath);
@@ -353,29 +329,29 @@ void prefs_headers_read_config(PrefsAccount * ac)
        }
        g_free(rcpath);
 
-       /* remove all previous headers list */
-       while (ac->customhdr_list != NULL) {
-               ch = (CustomHeader *)ac->customhdr_list->data;
-               custom_header_free(ch);
-               ac->customhdr_list = g_slist_remove(ac->customhdr_list, ch);
-       }
-       while (fgets(buf, sizeof(buf), fp) != NULL) {
-               g_strchomp(buf);
-               ch = custom_header_read_str(buf);
-               if (ch) {
-                       if (ch->account_id == ac->account_id)
+       /* remove all previous headers list */
+       while (ac->customhdr_list != NULL) {
+               ch = (CustomHeader *)ac->customhdr_list->data;
+               custom_header_free(ch);
+               ac->customhdr_list = g_slist_remove(ac->customhdr_list, ch);
+       }
+
+       while (fgets(buf, sizeof(buf), fp) != NULL) {
+               g_strchomp(buf);
+               ch = custom_header_read_str(buf);
+               if (ch) {
+                       if (ch->account_id == ac->account_id) {
                                ac->customhdr_list =
                                        g_slist_append(ac->customhdr_list, ch);
-                       else
+                       else
                                custom_header_free(ch);
-               }
-       }
-       fclose(fp);
+               }
+       }
+
+       fclose(fp);
 }
 
-void prefs_headers_write_config(PrefsAccount * ac)
+void prefs_headers_write_config(PrefsAccount *ac)
 {
        gchar *rcpath;
        PrefFile *pfile;
@@ -388,12 +364,12 @@ void prefs_headers_write_config(PrefsAccount * ac)
 
        debug_print(_("Writing headers configuration...\n"));
 
-       rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, HEADERS_RC, NULL);
+       rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
+                            CUSTOM_HEADER_RC, NULL);
 
        if ((fp = fopen(rcpath, "r")) == NULL) {
                if (ENOENT != errno) FILE_OP_ERROR(rcpath, "fopen");
-       }
-       else {
+       } else {
                all_hdrs = NULL;
 
                while (fgets(buf, sizeof(buf), fp) != NULL) {
@@ -463,7 +439,7 @@ void prefs_headers_write_config(PrefsAccount * ac)
        }
 }
 
-static void prefs_headers_set_dialog(PrefsAccount * ac)
+static void prefs_headers_set_dialog(PrefsAccount *ac)
 {
        GtkCList *clist = GTK_CLIST(headers.headers_clist);
        GSList *cur;
@@ -490,7 +466,7 @@ static void prefs_headers_set_dialog(PrefsAccount * ac)
        gtk_clist_thaw(clist);
 }
 
-static void prefs_headers_set_list(PrefsAccount * ac)
+static void prefs_headers_set_list(PrefsAccount *ac)
 {
        gint row = 1;
        CustomHeader *ch;
@@ -506,10 +482,7 @@ static void prefs_headers_set_list(PrefsAccount * ac)
        }
 }
 
-#define GET_ENTRY(entry) \
-       entry_text = gtk_entry_get_text(GTK_ENTRY(entry))
-
-static gint prefs_headers_clist_set_row(PrefsAccount * ac, gint row)
+static gint prefs_headers_clist_set_row(PrefsAccount *ac, gint row)
 {
        GtkCList *clist = GTK_CLIST(headers.headers_clist);
        CustomHeader *ch;
@@ -518,7 +491,7 @@ static gint prefs_headers_clist_set_row(PrefsAccount * ac, gint row)
 
        g_return_val_if_fail(row != 0, -1);
 
-       GET_ENTRY(headers.hdr_entry);
+       entry_text = gtk_entry_get_text(GTK_ENTRY(headers.hdr_entry));
        if (entry_text[0] == '\0') {
                alertpanel_error(_("Header name is not set."));
                return -1;
@@ -530,7 +503,7 @@ static gint prefs_headers_clist_set_row(PrefsAccount * ac, gint row)
 
        ch->name = g_strdup(entry_text);
 
-       GET_ENTRY(headers.key_entry);
+       entry_text = gtk_entry_get_text(GTK_ENTRY(headers.key_entry));
        if (entry_text[0] != '\0')
                ch->value = g_strdup(entry_text);
 
@@ -644,6 +617,8 @@ static void prefs_headers_select(GtkCList *clist, gint row, gint column,
        ENTRY_SET_TEXT(headers.key_entry, ch->value);
 }
 
+#undef ENTRY_SET_TEXT
+
 static void prefs_headers_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                     gpointer data)
 {
@@ -659,9 +634,6 @@ static void prefs_headers_ok(GtkButton *button)
 
 static void prefs_headers_cancel(GtkButton *button)
 {
-       /*
-       prefs_headers_write_config(cur_ac); 
-       */
        prefs_headers_read_config(cur_ac); 
        gtk_widget_hide(headers.window);
 }
similarity index 76%
rename from src/prefs_headers.h
rename to src/prefs_customheader.h
index 89a82c3..e81d7d9 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#ifndef __PREFS_HEADERS_H__
-#define __PREFS_HEADERS_H__
+#ifndef __PREFS_CUSTOMHEADER_H__
+#define __PREFS_CUSTOMHEADER_H__
 
-void prefs_headers_read_config (PrefsAccount * ac);
-void prefs_headers_write_config        (PrefsAccount * ac);
-void prefs_headers_open         (PrefsAccount * ac);
+void prefs_headers_read_config (PrefsAccount *ac);
+void prefs_headers_write_config        (PrefsAccount *ac);
+void prefs_headers_open                (PrefsAccount *ac);
 
-#endif /* __PREFS_HEADERS_H__ */
+#endif /* __PREFS_CUSTOMHEADER_H__ */