2005-08-29 [paul] 1.9.13cvs69
authorPaul Mangan <paul@claws-mail.org>
Mon, 29 Aug 2005 07:13:37 +0000 (07:13 +0000)
committerPaul Mangan <paul@claws-mail.org>
Mon, 29 Aug 2005 07:13:37 +0000 (07:13 +0000)
Patches by Colin:

* src/imap.c
* src/common.utils.c
* src/common/utils.h
optimisation
* src/stock_pixmap.h
fix wrong icon reference
* src/pixmaps/trash_btn.xpm
replace with nicer image

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/common/utils.c
src/common/utils.h
src/imap.c
src/pixmaps/trash_btn.xpm
src/stock_pixmap.h

index 51f5034077813894f18bdb199d1c40b38852de6d..05e864a528f2a3a33fdf9d92f7ffcb131e574250 100644 (file)
@@ -1,3 +1,16 @@
+2005-08-29 [paul]      1.9.13cvs69
+       
+       Patches by Colin:
+
+       * src/imap.c
+       * src/common.utils.c
+       * src/common/utils.h
+               optimisation
+       * src/stock_pixmap.h
+               fix wrong icon reference
+       * src/pixmaps/trash_btn.xpm
+               replace with nicer image
+
 2005-08-28 [colin]     1.9.13cvs68
 
        * src/Makefile.am
index 96697580bfef438e7b32ba6ea2cb6e91bb8baaae..66d54f948e88b0b3608ab84f29ace4447b85a11d 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.179.2.61 -r 1.179.2.62 src/imap.c;  cvs diff -u -r 1.49.2.57 -r 1.49.2.58 src/procmime.c;  ) > 1.9.13cvs66.patchset
 ( cvs diff -u -r 1.179.2.62 -r 1.179.2.63 src/imap.c;  ) > 1.9.13cvs67.patchset
 ( cvs diff -u -r 1.155.2.30 -r 1.155.2.31 src/Makefile.am;  cvs diff -u -r 1.25.2.16 -r 1.25.2.17 src/stock_pixmap.c;  cvs diff -u -r 1.18.2.9 -r 1.18.2.10 src/stock_pixmap.h;  cvs diff -u -r 1.43.2.22 -r 1.43.2.23 src/toolbar.c;  diff -u /dev/null src/pixmaps/trash_btn.xpm;  ) > 1.9.13cvs68.patchset
+( cvs diff -u -r 1.179.2.63 -r 1.179.2.64 src/imap.c;  cvs diff -u -r 1.18.2.10 -r 1.18.2.11 src/stock_pixmap.h;  cvs diff -u -r 1.36.2.41 -r 1.36.2.42 src/common/utils.c;  cvs diff -u -r 1.20.2.22 -r 1.20.2.23 src/common/utils.h;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/pixmaps/trash_btn.xpm;  ) > 1.9.13cvs69.patchset
index e3faaf2748235ecb5805a45f2de4ac465894ae8c..e948e2b6c71113ab3625c8c9cb20d374e3682657 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=13
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=68
+EXTRA_VERSION=69
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 2cdb475d625ba36a510908403105852413c1b47a..e82871728cc6fa634e06b1a5851912e8420b21c2 100644 (file)
@@ -384,6 +384,36 @@ gchar *strcrchomp(gchar *str)
        return str;
 }
 
+void file_strip_crs(const gchar *file) 
+{
+       FILE *fp = NULL, *outfp = NULL;
+       gchar buf[4096];
+       gchar *out = get_tmp_file();
+       if (file == NULL)
+               goto freeout;
+       
+       fp = fopen(file, "rb");
+       if (!fp)
+               goto freeout;
+
+       outfp = fopen(out, "wb");
+       if (!outfp) {
+               fclose(fp);
+               goto freeout;
+       }
+
+       while (fgets(buf, sizeof (buf), fp) != NULL) {
+               strcrchomp(buf);
+               fputs(buf, outfp);
+       }
+       
+       fclose(fp);
+       fclose(outfp);
+       rename_force(out, file);
+freeout:
+       g_free(out);
+}
+
 /* Similar to `strstr' but this function ignores the case of both strings.  */
 gchar *strcasestr(const gchar *haystack, const gchar *needle)
 {
index 80b4f54481b1986a5cd75da8c0f70caa043c9ee2..b1ee4539f3582939b8400183c3a24c1d8c9e10ef 100644 (file)
@@ -238,6 +238,7 @@ gchar *strretchomp  (gchar          *str);
 gchar *strtailchomp    (gchar          *str,
                         gchar           tail_char);
 gchar *strcrchomp      (gchar          *str);
+void file_strip_crs    (const gchar    *file);
 gchar *strcasestr      (const gchar    *haystack,
                         const gchar    *needle);
 gpointer my_memmem     (gconstpointer   haystack,
index cba08c2d03c831be7102a5c25f21d8a1dd1a5885..8eb940b21084e6f3c71da9ff2bf3a36888dc7a17 100644 (file)
@@ -832,7 +832,7 @@ static gchar *imap_fetch_msg(Folder *folder, FolderItem *item, gint uid)
        return imap_fetch_msg_full(folder, item, uid, TRUE, TRUE);
 }
 
-static guint get_size_with_lfs(MsgInfo *info) 
+static guint get_size_with_crs(MsgInfo *info) 
 {
        FILE *fp = NULL;
        guint cnt = 0;
@@ -855,41 +855,6 @@ static guint get_size_with_lfs(MsgInfo *info)
        return cnt;
 }
 
-static void strip_crs(const gchar *file) 
-{
-       FILE *fp = NULL, *outfp = NULL;
-       gchar buf[4096];
-       gchar *out = get_tmp_file();
-       if (file == NULL)
-               goto freeout;
-       
-       fp = fopen(file, "rb");
-       if (!fp)
-               goto freeout;
-
-       outfp = fopen(out, "wb");
-       if (!outfp) {
-               fclose(fp);
-               goto freeout;
-       }
-
-       while (fgets(buf, sizeof (buf), fp) != NULL) {
-               while (strstr(buf, "\r")) {
-                       gchar *cr = strstr(buf, "\r") ;
-                       *cr = '\n';
-                       cr++;
-                       *cr = '\0';
-               }
-               fputs(buf, outfp);
-       }
-       
-       fclose(fp);
-       fclose(outfp);
-       rename_force(out, file);
-freeout:
-       g_free(out);
-}
-
 static gchar *imap_fetch_msg_full(Folder *folder, FolderItem *item, gint uid,
                                  gboolean headers, gboolean body)
 {
@@ -915,7 +880,7 @@ static gchar *imap_fetch_msg_full(Folder *folder, FolderItem *item, gint uid,
                 * we have to update the local file (UNIX \n only) size */
                MsgInfo *msginfo = imap_parse_msg(filename, item);
                MsgInfo *cached = msgcache_get_msg(item->cache,uid);
-               guint have_size = get_size_with_lfs(msginfo);
+               guint have_size = get_size_with_crs(msginfo);
 
                if (cached)
                        debug_print("message %d has been already %scached (%d/%d).\n", uid,
@@ -925,7 +890,7 @@ static gchar *imap_fetch_msg_full(Folder *folder, FolderItem *item, gint uid,
                if (cached && (cached->size == have_size || !body)) {
                        procmsg_msginfo_free(cached);
                        procmsg_msginfo_free(msginfo);
-                       strip_crs(filename);
+                       file_strip_crs(filename);
                        return filename;
                } else {
                        procmsg_msginfo_free(cached);
@@ -957,7 +922,7 @@ static gchar *imap_fetch_msg_full(Folder *folder, FolderItem *item, gint uid,
                return NULL;
        }
 
-       strip_crs(filename);
+       file_strip_crs(filename);
        return filename;
 }
 
index 3b45780272fd89fec93f9babcd4ec1af7b8326c9..e44ddb48c2aeafd0421b91ba7a83a97dc7684a4f 100644 (file)
 /* XPM */
 static char * trash_btn_xpm[] = {
-"24 24 223 2",
+"16 16 152 2",
 "      c None",
-".     c #35342F",
-"+     c #2E2D2A",
-"@     c #302F2C",
-"#     c #373532",
-"$     c #3F3E3B",
-"%     c #464541",
-"&     c #22211D",
-"*     c #1C1B1A",
-"=     c #1F1F1E",
-"-     c #242424",
-";     c #2F2F2F",
-">     c #414141",
-",     c #535353",
-"'     c #646464",
-")     c #777777",
-"!     c #676767",
-"~     c #565655",
-"{     c #4A4A47",
-"]     c #585550",
-"^     c #42403B",
-"/     c #161616",
-"(     c #181818",
-"_     c #1D1D1D",
-":     c #222222",
-"<     c #4A4A4A",
-"[     c #5A5A5A",
-"}     c #7C7C7C",
-"|     c #6D6D6D",
-"1     c #656565",
-"2     c #605F5F",
-"3     c #67655F",
-"4     c #5A574F",
-"5     c #59564F",
-"6     c #5A5956",
-"7     c #4D4C4B",
-"8     c #474746",
-"9     c #3A3A3A",
-"0     c #505050",
-"a     c #626262",
-"b     c #696969",
-"c     c #7D7D7D",
-"d     c #80807F",
-"e     c #8C8C8A",
-"f     c #8C8B88",
-"g     c #43413D",
-"h     c #686357",
-"i     c #535048",
-"j     c #615E57",
-"k     c #65625C",
-"l     c #72706C",
-"m     c #7C7A76",
-"n     c #7E7D78",
-"o     c #7F7D79",
-"p     c #807E7A",
-"q     c #73726D",
-"r     c #575550",
-"s     c #43413C",
-"t     c #25231F",
-"u     c #898376",
-"v     c #ADA89E",
-"w     c #ABA79F",
-"x     c #A6A49E",
-"y     c #95928B",
-"z     c #848078",
-"A     c #6E695F",
-"B     c #5A554B",
-"C     c #524D43",
-"D     c #4E493F",
-"E     c #3E3A32",
-"F     c #322F28",
-"G     c #1A1815",
-"H     c #7F7A6E",
-"I     c #C4C0B8",
-"J     c #C1BEB7",
-"K     c #DFDDD9",
-"L     c #D3D1CA",
-"M     c #D4D2CE",
-"N     c #A6A195",
-"O     c #767063",
-"P     c #7E7A70",
-"Q     c #656053",
-"R     c #3A3730",
-"S     c #37332C",
-"T     c #191814",
-"U     c #777065",
-"V     c #BEBAB4",
-"W     c #C2BEB7",
-"X     c #DDDBD7",
-"Y     c #D4D1CB",
-"Z     c #D4D1CD",
-"`     c #AEA89B",
-" .    c #7E7769",
-"..    c #8D897F",
-"+.    c #686255",
-"@.    c #3D3932",
-"#.    c #39352E",
-"$.    c #181714",
-"%.    c #70695E",
-"&.    c #B5B1AB",
-"*.    c #C0BCB4",
-"=.    c #D7D5D1",
-"-.    c #D0CDC6",
-";.    c #D0CECA",
-">.    c #ACA599",
-",.    c #7F776A",
-"'.    c #918C81",
-").    c #645D51",
-"!.    c #3B372F",
-"~.    c #35312A",
-"{.    c #12110E",
-"].    c #6D675C",
-"^.    c #A8A59E",
-"/.    c #BCB8B1",
-"(.    c #D2D0CE",
-"_.    c #CDCAC4",
-":.    c #CBC9C4",
-"<.    c #A59F95",
-"[.    c #756F64",
-"}.    c #827D73",
-"|.    c #565045",
-"1.    c #2D2A24",
-"2.    c #302C26",
-"3.    c #0F0D0B",
-"4.    c #635E53",
-"5.    c #9A9892",
-"6.    c #B4B1AB",
-"7.    c #CFCECC",
-"8.    c #CAC7C2",
-"9.    c #C4C2BE",
-"0.    c #969288",
-"a.    c #69655C",
-"b.    c #76726A",
-"c.    c #4D483F",
-"d.    c #282621",
-"e.    c #2B2923",
-"f.    c #11100D",
-"g.    c #58534A",
-"h.    c #918D87",
-"i.    c #ADAAA4",
-"j.    c #CCCBC8",
-"k.    c #C8C6C1",
-"l.    c #BAB8B4",
-"m.    c #928E84",
-"n.    c #656057",
-"o.    c #6F6A62",
-"p.    c #4A463C",
-"q.    c #26241F",
-"r.    c #544F46",
-"s.    c #8B867D",
-"t.    c #B5B2AC",
-"u.    c #CCCAC8",
-"v.    c #CBC9C3",
-"w.    c #BBB9B5",
-"x.    c #9C978E",
-"y.    c #635F56",
-"z.    c #4B463D",
-"A.    c #2E2A25",
-"B.    c #26231E",
-"C.    c #514C43",
-"D.    c #888379",
-"E.    c #BDBAB3",
-"F.    c #C9C7C4",
-"G.    c #CFCCC6",
-"H.    c #BEBCB7",
-"I.    c #A29C92",
-"J.    c #69635A",
-"K.    c #736F66",
-"L.    c #4A453C",
-"M.    c #23211C",
-"N.    c #0B0A08",
-"O.    c #3B3832",
-"P.    c #837E74",
-"Q.    c #BDB9B3",
-"R.    c #C3C1BC",
-"S.    c #D4D2CC",
-"T.    c #C2C0BB",
-"U.    c #A6A095",
-"V.    c #6A655B",
-"W.    c #706C63",
-"X.    c #403D34",
-"Y.    c #0A0A08",
-"Z.    c #736E63",
-"`.    c #B4B1AA",
-" +    c #B8B6B2",
-".+    c #D1CEC9",
-"++    c #C0BEB8",
-"@+    c #A29D93",
-"#+    c #625E54",
-"$+    c #605C53",
-"%+    c #34312A",
-"&+    c #24221D",
-"*+    c #141310",
-"=+    c #090908",
-"-+    c #403D36",
-";+    c #8E8A84",
-">+    c #9E9C97",
-",+    c #B8B6B1",
-"'+    c #ABA8A3",
-")+    c #8C877E",
-"!+    c #524E47",
-"~+    c #46423B",
-"{+    c #2A2722",
-"]+    c #1E1B17",
-"^+    c #11100E",
-"/+    c #050404",
-"(+    c #2B2925",
-"_+    c #54524D",
-":+    c #6F6C66",
-"<+    c #6F6B65",
-"[+    c #5F5B54",
-"}+    c #2D2A25",
-"|+    c #1C1A16",
-"1+    c #100F0D",
-"2+    c #090807",
-"3+    c #010101",
-"4+    c #0C0B0A",
-"5+    c #141311",
-"6+    c #191816",
-"7+    c #141412",
-"8+    c #0F0E0C",
-"9+    c #080706",
-"0+    c #040403",
-"                                                ",
-"                                                ",
-"                                                ",
-"                . + @ # $ %                     ",
-"          & * = - ; > , ' ) ! ~ { ]             ",
-"        ^ / ( _ : ; < [ ' } | 1 , 2 3           ",
-"        4 5 6 7 8 9 0 a b } c d e f g           ",
-"          h i j k l m n o p q r s t             ",
-"          u v w x y z A B C D E F G             ",
-"          H I J K L M N O P Q R S T             ",
-"          U V W X Y Z `  ...+.@.#.$.            ",
-"          %.&.*.=.-.;.>.,.'.).!.~.{.            ",
-"          ].^./.(._.:.<.[.}.|.1.2.3.            ",
-"          4.5.6.7.8.9.0.a.b.c.d.e.f.            ",
-"          g.h.i.j.k.l.m.n.o.p.d.q.{.            ",
-"          r.s.t.u.v.w.x.y.o.z.A.B.{.            ",
-"          C.D.E.F.G.H.I.J.K.L.F M.N.            ",
-"          O.P.Q.R.S.T.U.V.W.X.1.G Y.            ",
-"            Z.`. +.+++@+#+$+%+&+*+=+            ",
-"            -+;+>+,+'+)+!+~+{+]+^+/+            ",
-"            {.(+_+:+<+[+-+}+|+1+2+3+            ",
-"                4+5+6+7+1+8+9+0+                ",
-"                                                ",
-"                                                "};
+".     c #0E0E0E",
+"+     c #424242",
+"@     c #4A4A4A",
+"#     c #3E3E3E",
+"$     c #2C2C2C",
+"%     c #000000",
+"&     c #858371",
+"*     c #F0EDD8",
+"=     c #F2F1E9",
+"-     c #EEEDE4",
+";     c #C7C6BA",
+">     c #535246",
+",     c #101010",
+"'     c #C2C0A5",
+")     c #C1BFA5",
+"!     c #7A7967",
+"~     c #484740",
+"{     c #272725",
+"]     c #36352E",
+"^     c #878572",
+"/     c #A09E88",
+"(     c #A3A18A",
+"_     c #A5A38C",
+":     c #2B2B2B",
+"<     c #D3D1BC",
+"[     c #DCDAC4",
+"}     c #E2E0CF",
+"|     c #B9B7A2",
+"1     c #64625B",
+"2     c #393836",
+"3     c #3C3C33",
+"4     c #616053",
+"5     c #9A9883",
+"6     c #B7B59B",
+"7     c #B3B298",
+"8     c #A4A28B",
+"9     c #E8E4D3",
+"0     c #F4F1E9",
+"a     c #F2F1E4",
+"b     c #EAE9DA",
+"c     c #E5E2D2",
+"d     c #D5D2BE",
+"e     c #C3C1A7",
+"f     c #AFAD94",
+"g     c #C0BEA4",
+"h     c #C6C4AC",
+"i     c #B8B69C",
+"j     c #797766",
+"k     c #8A8975",
+"l     c #F1EDD2",
+"m     c #FBF8E9",
+"n     c #F9F5ED",
+"o     c #F8F7EE",
+"p     c #F8F7EC",
+"q     c #F5F3E6",
+"r     c #ECEAD9",
+"s     c #DEDDCB",
+"t     c #9D9B89",
+"u     c #636254",
+"v     c #58574A",
+"w     c #525146",
+"x     c #737165",
+"y     c #9F9D91",
+"z     c #E4E1C8",
+"A     c #E9E5CF",
+"B     c #E2E0CB",
+"C     c #D1D1CB",
+"D     c #8E8D7F",
+"E     c #767564",
+"F     c #686758",
+"G     c #434238",
+"H     c #292822",
+"I     c #1F1F1B",
+"J     c #343430",
+"K     c #4B4944",
+"L     c #686762",
+"M     c #706F66",
+"N     c #6B6B64",
+"O     c #6E6C5D",
+"P     c #58574B",
+"Q     c #393931",
+"R     c #171615",
+"S     c #1A1A16",
+"T     c #1F1E19",
+"U     c #2A2A23",
+"V     c #A0A095",
+"W     c #4D4D40",
+"X     c #363630",
+"Y     c #2A2A26",
+"Z     c #2F2F2A",
+"`     c #0F0F0D",
+" .    c #0B0B09",
+"..    c #10100D",
+"+.    c #3E3E38",
+"@.    c #34342B",
+"#.    c #24241F",
+"$.    c #2B2B24",
+"%.    c #A5A499",
+"&.    c #B7B6AE",
+"*.    c #717067",
+"=.    c #A1A192",
+"-.    c #747363",
+";.    c #404035",
+">.    c #69695B",
+",.    c #39392F",
+"'.    c #69695F",
+").    c #3F3F34",
+"!.    c #262620",
+"~.    c #2C2C25",
+"{.    c #ADADA3",
+"].    c #D9D9D2",
+"^.    c #8B8B7F",
+"/.    c #D6D5CE",
+"(.    c #88887B",
+"_.    c #58574F",
+":.    c #939387",
+"<.    c #4A4A3D",
+"[.    c #78786B",
+"}.    c #505042",
+"|.    c #292922",
+"1.    c #DADAD3",
+"2.    c #8F8E81",
+"3.    c #DDDDD4",
+"4.    c #ACAB99",
+"5.    c #5D5D52",
+"6.    c #A0A093",
+"7.    c #79796C",
+"8.    c #7E7E75",
+"9.    c #D8D8D1",
+"0.    c #8D8D80",
+"a.    c #DDDDD3",
+"b.    c #444438",
+"c.    c #282822",
+"d.    c #272721",
+"e.    c #43433D",
+"f.    c #8E8E86",
+"g.    c #5E5E55",
+"h.    c #DADAD0",
+"i.    c #949484",
+"j.    c #5D5D53",
+"k.    c #23231D",
+"l.    c #060606",
+"m.    c #42413A",
+"n.    c #8F8F7B",
+"o.    c #7A7A6C",
+"p.    c #44443C",
+"q.    c #6C6C5E",
+"r.    c #35352C",
+"s.    c #2E2E29",
+"t.    c #0F0F0F",
+"u.    c #050505",
+"          . + @ # $ %           ",
+"      % % & * = - ; > % %       ",
+"    , ' ) ! ~ { ] ^ / ( _ %     ",
+"  : < [ } | 1 2 3 4 5 6 7 8 %   ",
+"  % 9 0 a b c d e f g h i j %   ",
+"  % k l m n o p q r s t u v %   ",
+"  % w x y z A B C D E F G H %   ",
+"    I J K L M N O P Q R S T     ",
+"    U V W X Y Z `  ...+.@.#.    ",
+"    $.%.&.*.=.-.;.>.,.'.).!.    ",
+"    ~.{.].^./.(._.:.<.[.}.|.    ",
+"    ~.{.1.2.3.4.5.6.W 7.}.|.    ",
+"    $.8.9.0.a.4.5.6.W [.b.c.    ",
+"    d.e.f.g.h.4.5.i.W j.c.k.    ",
+"      l.l.m.n.o.p.q.r.s.%       ",
+"          l.% t.u.% %           "};
index b243fd181aa937d84585a25f863905eefc754d28..9825d67e6da6f8eff5a0baa71f065028fba9b93b 100644 (file)
@@ -149,8 +149,8 @@ typedef enum
        STOCK_PIXMAP_MIME_MESSAGE,
        STOCK_PIXMAP_SYLPHEED_ICON,
        STOCK_PIXMAP_READ,
-       STOCK_PIXMAP_SYLPHEED_LOGO,
        STOCK_PIXMAP_TRASH,
+       STOCK_PIXMAP_SYLPHEED_LOGO,
        STOCK_PIXMAP_DIR_NOSELECT,              /* last entry */
        
        N_STOCK_PIXMAPS