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 11cd10b..bb29b12 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
index 9cbfa3a..8429f56 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
index 0afc061..2c7e71a 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
index 2bb03c2..752142b 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 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
index d2f40f4..da9b4da 100644 (file)
@@ -1911,7 +1911,11 @@ static void compose_insert_sig(Compose *compose, gboolean replace)
                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) {
@@ -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);
+       if (!compose->sig_str)
+               compose->sig_str = g_strdup("");
 
        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);
+               if (!tmp)
+                       return NULL;
                sig_str = normalize_newlines(tmp);
                g_free(tmp);
        }