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 505181393a79288096bab4eeb924b5f021c24d21..6098a2da140b2e2a496dc049658c6a6d2852fd81 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 44a983e7d185bbd3be73c85d0808f45ff4572ed9..7ac1618d22ed0e43c55d83d35ce37406ec815a97 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 c151e5b0f37a793bf6eb8d18578e4adc17c5d22b..eb3fe051d72530b9612e18bc9f0fffb21aeb64ce 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 a897cacd50ed958fd4f022a8c68f55001efa16ef..c73ac7e9f20fec32402648c7232cd94aaa2aa16a 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 57ded2b7499feadc177da62d6d0a15912a095bd5..4e5d79e3a5f4013c218ab1f67114ecba36e9517d 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 13af7e143383acbd4c11e9a524a93113e7a8d7dd..2c77192fa032374fe2445f13daf572f5ed2b1fd6 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 3bbf251d7591b778d415657ad0b50b94c30f9974..2eb832e35740e61cbb7afa4787bda85e770f825e 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 6537ee261f90698f52a27fe713a6b6d582041584..b286b5158c30657183cb293469d3e5ef84cfe19c 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 {