sync with sylpheed 0.5.1cvs7
authorPaul Mangan <paul@claws-mail.org>
Wed, 1 Aug 2001 07:22:54 +0000 (07:22 +0000)
committerPaul Mangan <paul@claws-mail.org>
Wed, 1 Aug 2001 07:22:54 +0000 (07:22 +0000)
ChangeLog
ChangeLog.claws
INSTALL
INSTALL.jp
configure.in
src/compose.c
src/folder.c
src/imap.c
src/main.c
src/mimeview.c
src/textview.c

index c3202e4..0f2688d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2001-08-01
+
+       * src/mimeview.c: mimeview_view_file(): added -x option to the
+         metamail to prevent the suspention of the main process.
+         mimeview_button_pressed(): deactivate `Open' menu item if
+         content-type is application/octet-stream.
+
+2001-07-31
+
+       * src/imap.c: imap_parse_atom(): parse escaped characters properly.
+         get_quoted(): new. It handles the escape character '\'.
+       * src/folder.c: folder_read_list(): don't output warning if
+         folderlist.xml doesn't exist.
+       * src/main.c: main(): write folder list after setup.
+       * src/textview.c: textview_create()
+         src/compose.c: compose_create(): set default tab width to 8.
+
 2001-07-29
 
        * src/prefs_common.c: date_format_select_row(): fixed a bug that
index 8407bf3..bb202c3 100644 (file)
@@ -1,3 +1,10 @@
+2001-08-01 [paul]
+
+       * configure.in
+               change to 0.5.1claws4
+
+       * sync with sylpheed 0.5.1cvs7
+
 2001-07-31 [alfons]
 
        * src/prefs_common.c, src/prefs_common.h, 
diff --git a/INSTALL b/INSTALL
index a150d81..17093cf 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -59,6 +59,7 @@ o FreeBSD 4.2-RELEASE
 o FreeBSD 5.0-CURRENT
 o NetBSD 1.4.2
 o NetBSD 1.5 + XPG4DL
+o NetBSD 1.5.1
 o OpenBSD 2.7
 o OpenBSD 2.8 (i386)
 o OpenBSD 2.9
index 9ab87e8..07b1ef6 100644 (file)
@@ -58,6 +58,7 @@ o FreeBSD 4.2-RELEASE
 o FreeBSD 5.0-CURRENT
 o NetBSD 1.4.2
 o NetBSD 1.5 + XPG4DL
+o NetBSD 1.5.1
 o OpenBSD 2.7
 o OpenBSD 2.8 (i386)
 o OpenBSD 2.9
index 576b101..54f1d2a 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=5
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws3
+EXTRA_VERSION=claws4
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index ace57bb..919400b 100644 (file)
@@ -2991,6 +2991,7 @@ static Compose *compose_create(PrefsAccount *account)
                            (GTK_SCROLLED_WINDOW(scrolledwin)),
                            gtk_scrolled_window_get_vadjustment
                            (GTK_SCROLLED_WINDOW(scrolledwin)));
+       GTK_STEXT(text)->default_tab_width = 8;
        gtk_stext_set_editable(GTK_STEXT(text), TRUE);
        if (prefs_common.smart_wrapping) {      
                gtk_stext_set_word_wrap(GTK_STEXT(text), TRUE);
index acf6a93..df28f26 100644 (file)
@@ -310,8 +310,11 @@ gint folder_read_list(void)
 {
        GNode *node;
        XMLNode *xmlnode;
+       gchar *path;
 
-       node = xml_parse_file(folder_get_list_path());
+       path = folder_get_list_path();
+       if (!is_file_exist(path)) return -1;
+       node = xml_parse_file(path);
        if (!node) return -1;
 
        xmlnode = node->data;
index bb0494f..924d964 100644 (file)
@@ -212,6 +212,10 @@ static gchar *strchr_cpy                   (const gchar    *src,
                                                 gchar           ch,
                                                 gchar          *dest,
                                                 gint            len);
+static gchar *get_quoted                       (const gchar    *src,
+                                                gchar           ch,
+                                                gchar          *dest,
+                                                gint            len);
 static gchar *search_array_contain_str         (GPtrArray      *array,
                                                 gchar          *str);
 static void imap_path_separator_subst          (gchar          *str,
@@ -1437,7 +1441,7 @@ static gchar *imap_parse_atom(SockInfo *sock, gchar *src,
        } else if (*cur_pos == '\"') {
                gchar *p;
 
-               p = strchr_cpy(cur_pos + 1, '\"', dest, dest_len);
+               p = get_quoted(cur_pos, '\"', dest, dest_len);
                cur_pos = p ? p : cur_pos + 2;
        } else if (*cur_pos == '{') {
                gchar buf[32];
@@ -2258,6 +2262,30 @@ static gchar *strchr_cpy(const gchar *src, gchar ch, gchar *dest, gint len)
        return tmp + 1;
 }
 
+static gchar *get_quoted(const gchar *src, gchar ch, gchar *dest, gint len)
+{
+       const gchar *p = src;
+       gint n = 0;
+
+       g_return_val_if_fail(*p == ch, NULL);
+
+       *dest = '\0';
+       p++;
+
+       while (*p != '\0' && *p != ch) {
+               if (n < len - 1) {
+                       if (*p == '\\' && *(p + 1) != '\0')
+                               p++;
+                       *dest++ = *p++;
+               } else
+                       p++;
+               n++;
+       }
+
+       *dest = '\0';
+       return (gchar *)(*p == ch ? p + 1 : p);
+}
+
 static gchar *search_array_contain_str(GPtrArray *array, gchar *str)
 {
        gint i;
index 131497c..67e6903 100644 (file)
@@ -263,7 +263,10 @@ int main(int argc, char *argv[])
        account_read_config_all();
        account_save_config_all();
 
-       if (folder_read_list() < 0) setup(mainwin);
+       if (folder_read_list() < 0) {
+               setup(mainwin);
+               folder_write_list();
+       }
        account_set_missing_folder();
        folderview_set(folderview);
 
index c807a93..fc5e252 100644 (file)
@@ -564,6 +564,13 @@ static void mimeview_button_pressed(GtkWidget *widget, GdkEventButton *event,
                else
                        menu_set_sensitive(mimeview->popupfactory,
                                           "/Display as text", TRUE);
+               if (partinfo &&
+                   partinfo->mime_type == MIME_APPLICATION_OCTET_STREAM)
+                       menu_set_sensitive(mimeview->popupfactory,
+                                          "/Open", FALSE);
+               else
+                       menu_set_sensitive(mimeview->popupfactory,
+                                          "/Open", TRUE);
 #if USE_GPGME
                menu_set_sensitive(mimeview->popupfactory,
                                   "/Check signature",
@@ -787,7 +794,7 @@ static void mimeview_view_file(const gchar *filename, MimeInfo *partinfo,
        static gchar *default_audio_cmdline = "play '%s'";
        static gchar *default_html_cmdline =
                "netscape -remote 'openURL(%s,raise)'";
-       static gchar *mime_cmdline = "metamail -d -b -c %s '%s'";
+       static gchar *mime_cmdline = "metamail -d -b -x -c %s '%s'";
        gchar buf[1024];
        gchar m_buf[1024];
        const gchar *cmd;
index 2bf490c..13b018b 100644 (file)
@@ -151,6 +151,8 @@ TextView *textview_create(void)
        /* create GtkText widgets for single-byte and multi-byte character */
        text_sb = gtk_text_new(NULL, NULL);
        text_mb = gtk_text_new(NULL, NULL);
+       GTK_TEXT(text_sb)->default_tab_width = 8;
+       GTK_TEXT(text_mb)->default_tab_width = 8;
        gtk_widget_show(text_sb);
        gtk_widget_show(text_mb);
        gtk_text_set_word_wrap(GTK_TEXT(text_sb), TRUE);