sync with 0.9.0cvs1
authorPaul Mangan <paul@claws-mail.org>
Mon, 19 May 2003 13:14:12 +0000 (13:14 +0000)
committerPaul Mangan <paul@claws-mail.org>
Mon, 19 May 2003 13:14:12 +0000 (13:14 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.ac
src/compose.c

index 11cd10b042eeff3d9b46ae99c3b8732c8034c11f..bb29b1218f050c5ed1c70fa66e1d015eba6f6b97 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-05-19
+
+       * src/compose.c: compose_insert_sig(): fixed the bug that always
+         appended signature separator if signature file was not found.
+         compose_get_signature_str(): fixed the bug that caused crash if
+         signature file cannot be opened.
+
 2003-05-16
 
        * version 0.9.0
 2003-05-16
 
        * version 0.9.0
index 9cbfa3a7c1665eb787039fffb83e46d01273ae2e..8429f56b3649446a9e3a1ede74ad252cdceea005 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-19 [paul]      0.8.11claws166
+
+       * sync with 0.9.0cvs1
+               see ChangeLog 2003-05-19
+
 2003-05-19 [paul]      0.8.11claws165
 
        * src/inc.c
 2003-05-19 [paul]      0.8.11claws165
 
        * src/inc.c
index 0afc061227830e92e6c6328bc7457a46c0af21f4..2c7e71a90f9c4ec2006af5710d69c81106c309d4 100644 (file)
@@ -1,3 +1,10 @@
+2003-05-19
+
+       * src/compose.c: compose_insert_sig(): ½ð̾¥Õ¥¡¥¤¥ë¤¬¸«¤Ä¤«¤é¤Ê¤¤
+         ¾ì¹ç¤Ë¾ï¤Ë½ð̾¶èÀÚ¤ê¤òÄɲ䷤Ƥ¤¤¿¥Ð¥°¤ò½¤Àµ¡£
+         compose_get_signature_str(): ½ð̾¥Õ¥¡¥¤¥ë¤¬³«¤±¤Ê¤¤¾ì¹ç¤Ë¥¯¥é¥Ã¥·¥å
+         ¤¹¤ë¥Ð¥°¤ò½¤Àµ¡£
+
 2003-05-16
 
        * version 0.9.0
 2003-05-16
 
        * version 0.9.0
index 2bb03c27e14e49debc717b36ce31e99e3bd804ae..752142bf544b6a8e9a57549817b894561d626d77 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws165
+EXTRA_VERSION=claws166
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index d2f40f4ada7104a349f6c1d45333154773094988..da9b4dabcaeb3a8dac50b8fe3515a3232dd97116 100644 (file)
@@ -1911,7 +1911,11 @@ static void compose_insert_sig(Compose *compose, gboolean replace)
                else
                        tmp = g_strdup(compose->sig_str);
 
                else
                        tmp = g_strdup(compose->sig_str);
 
-               pos = gtkut_stext_find(text, 0, tmp, TRUE);
+               if (tmp[0] == '\0')
+                       pos = -1;
+               else
+                       pos = gtkut_stext_find(text, 0, tmp, TRUE);
+
                if (pos != -1) {
                        len = get_mbs_len(tmp);
                        if (len >= 0) {
                if (pos != -1) {
                        len = get_mbs_len(tmp);
                        if (len >= 0) {
@@ -1938,6 +1942,8 @@ static void compose_insert_sig(Compose *compose, gboolean replace)
 
        g_free(compose->sig_str);
        compose->sig_str = compose_get_signature_str(compose);
 
        g_free(compose->sig_str);
        compose->sig_str = compose_get_signature_str(compose);
+       if (!compose->sig_str)
+               compose->sig_str = g_strdup("");
 
        gtk_stext_insert(text, NULL, NULL, NULL, compose->sig_str, -1);
 
 
        gtk_stext_insert(text, NULL, NULL, NULL, compose->sig_str, -1);
 
@@ -1983,6 +1989,8 @@ static gchar *compose_get_signature_str(Compose *compose)
                gchar *tmp;
 
                tmp = file_read_to_str(sig_file);
                gchar *tmp;
 
                tmp = file_read_to_str(sig_file);
+               if (!tmp)
+                       return NULL;
                sig_str = normalize_newlines(tmp);
                g_free(tmp);
        }
                sig_str = normalize_newlines(tmp);
                g_free(tmp);
        }