sync with 0.8.8cvs6
authorPaul Mangan <paul@claws-mail.org>
Tue, 14 Jan 2003 11:16:47 +0000 (11:16 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 14 Jan 2003 11:16:47 +0000 (11:16 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/common/utils.c
src/common/utils.h
src/folderview.c
src/summaryview.c

index 5051813..6098a2d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2003-01-14
+
+       * src/folderview.c
+         src/summaryview.c
+         src/utils.[ch]: get_abbrev_newsgroup_name(): improved the way
+         of abbreviation of newsgroup name.
+
+2003-01-14
+
+       * configure.in: show the result of iconv detection.
+
 2003-01-13
 
        * src/codeconv.[ch]: made the transition from libjconv to iconv().
index 44a983e..7ac1618 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-14 [paul]      0.8.8claws96
+
+       * sync with 0.8.8cvs6
+               see ChangeLog 2003-01-14
+
 2003-01-13 [alfons]    0.8.8claws95
 
        * src/textview.c
index c151e5b..eb3fe05 100644 (file)
@@ -1,3 +1,14 @@
+2003-01-14
+
+       * src/folderview.c
+         src/summaryview.c
+         src/utils.[ch]: get_abbrev_newsgroup_name(): ¥Ë¥å¡¼¥¹¥°¥ë¡¼¥×̾
+         ¤Î¾ÊάÊýË¡¤ò²þÎÉ¡£
+
+2003-01-14
+
+       * configure.in: iconv ¸¡½Ð·ë²Ì¤òɽ¼¨¡£
+
 2003-01-13
 
        * src/codeconv.[ch]: libjconv ¤«¤é iconv() ¤Ø°Ü¹Ô¡£
index a897cac..c73ac7e 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws95
+EXTRA_VERSION=claws96
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
@@ -434,6 +434,7 @@ echo "GnuPG         : $ac_cv_enable_gpgme"
 echo "JPilot        : $ac_cv_enable_jpilot"
 echo "LDAP          : $ac_cv_enable_ldap"
 echo "OpenSSL       : $ac_cv_enable_openssl"
+echo "iconv         : $am_cv_func_iconv"
 echo "compface      : $ac_cv_enable_compface"
 echo "IPv6          : $ac_cv_enable_ipv6"
 echo "GNU/aspell    : $ac_cv_enable_aspell"
index 57ded2b..4e5d79e 100644 (file)
@@ -1247,22 +1247,21 @@ gchar *get_abbrev_newsgroup_name(const gchar *group, gint len)
        gchar *abbrev_group;
        gchar *ap;
        const gchar *p = group;
-       gint  count = 0;
+       const gchar *last;
 
+       last = group + strlen(group);
        abbrev_group = ap = g_malloc(strlen(group) + 1);
 
        while (*p) {
                while (*p == '.')
                        *ap++ = *p++;
-
-               if ((strlen( p) + count) > len && strchr(p, '.')) {
+               if ((ap - abbrev_group) + (last - p) > len && strchr(p, '.')) {
                        *ap++ = *p++;
                        while (*p != '.') p++;
                } else {
-                       strcpy( ap, p);
+                       strcpy(ap, p);
                        return abbrev_group;
                }
-               count = count + 2;
        }
 
        *ap = '\0';
index 13af7e1..2c77192 100644 (file)
@@ -290,8 +290,7 @@ gchar **strsplit_with_quote         (const gchar    *str,
                                         gint            max_tokens);
 
 gchar *get_abbrev_newsgroup_name       (const gchar    *group,
-                                        gint            len);
-
+                                        gint            len);
 gchar *trim_string                     (const gchar    *str,
                                         gint            len);
 
index 3bbf251..2eb832e 100644 (file)
@@ -1161,9 +1161,10 @@ static void folderview_update_node(FolderView *folderview, GtkCTreeNode *node)
                } else {
                        if (item->folder->type == F_NEWS &&
                            item->path &&
-                           !strcmp2(item->name, item->path) &&
-                           prefs_common.ng_abbrev_len < strlen(item->path))
-                               name = get_abbrev_newsgroup_name(item->path, prefs_common.ng_abbrev_len);
+                           !strcmp2(item->name, item->path))
+                               name = get_abbrev_newsgroup_name
+                                       (item->path,
+                                        prefs_common.ng_abbrev_len);
                        else
                                name = g_strdup(item->name);
                }
index 6537ee2..b286b51 100644 (file)
@@ -1923,11 +1923,11 @@ static void summary_status_show(SummaryView *summaryview)
                n_selected++;
        }
 
-       if (summaryview->folder_item->folder->type == F_NEWS &&
-           prefs_common.ng_abbrev_len < strlen(summaryview->folder_item->path)) {
+       if (summaryview->folder_item->folder->type == F_NEWS) {
                gchar *group;
                group = get_abbrev_newsgroup_name
-                       (g_basename(summaryview->folder_item->path), prefs_common.ng_abbrev_len);
+                       (g_basename(summaryview->folder_item->path),
+                        prefs_common.ng_abbrev_len);
                gtk_label_set(GTK_LABEL(summaryview->statlabel_folder), group);
                g_free(group);
        } else {