From 97f6d710e8639a888a2ef29ff58f3123c4efa458 Mon Sep 17 00:00:00 2001 From: Stefan Taferner Date: Sun, 15 Mar 1998 20:49:22 +0000 Subject: [PATCH] 1998-03-15 Stefan Taferner * Startup: added option -check which does mail checking upon startup. Also options that start with a '-' but which are unknown are now skipped. 1998-03-09 Stefan Taferner * Reader: '_' was not considered part of a smart-detected email address (auto detection of @). * Reader: attachments of type message/rfc822 are now shown in an external reader window if open or view from the attachment popup menu is chosen. * Composer: finally got insertion of tabs into message working. svn path=/trunk/kdenetwork/kmail/; revision=6107 --- ChangeLog | 6 ++++++ kmmainwin.cpp | 4 ++-- kmreaderwin.cpp | 32 +++++++++++++++++--------------- kmversion.h | 2 +- main.cpp | 38 ++++++++++++++++++++++++++++---------- 5 files changed, 54 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index c5cc66ea7..d4644090b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-03-15 Stefan Taferner + + * Startup: added option -check which does mail checking + upon startup. Also options that start with a '-' but which + are unknown are now skipped. + 1998-03-09 Stefan Taferner * Reader: '_' was not considered part of a smart-detected email diff --git a/kmmainwin.cpp b/kmmainwin.cpp index bb5efe3d0..abcb7b05f 100644 --- a/kmmainwin.cpp +++ b/kmmainwin.cpp @@ -169,8 +169,8 @@ void KMMainWin::writeConfig(bool aWithSync) s.sprintf("%i,%i", r.width(), r.height()); config->writeEntry("MainWin", s); - s.sprintf("%i,%i", mVertPanner->seperatorPos(), - mHorizPanner->seperatorPos()); + s.sprintf("%i,%i", mVertPanner->separatorPos(), + mHorizPanner->separatorPos()); config->writeEntry("Panners", s); if (aWithSync) config->sync(); diff --git a/kmreaderwin.cpp b/kmreaderwin.cpp index 630e79573..d60158016 100644 --- a/kmreaderwin.cpp +++ b/kmreaderwin.cpp @@ -524,23 +524,25 @@ const QString KMReaderWin::strToHtml(const QString aStr, bool aDecodeQP, htmlStr += ""; } else if (ch=='@') + { + for (i=0; *pos && (isalnum(*pos) || *pos=='@' || *pos=='.' || + *pos=='_'||*pos=='-') && i<255; i++, pos--) { - for (i=0; *pos && (isalnum(*pos) || *pos=='@' || *pos=='.' || - *pos=='_'||*pos=='-') && i<255; i++, pos--) - { - } - i1 = i; - pos++; - for (i=0; *pos && (isalnum(*pos)||*pos=='@'||*pos=='.'|| - *pos=='_'||*pos=='-') && i<255; i++, pos++) - { - iStr += *pos; - } - pos--; - htmlStr.truncate(htmlStr.length() - i1 + 1); + } + i1 = i; + pos++; + for (i=0; *pos && (isalnum(*pos)||*pos=='@'||*pos=='.'|| + *pos=='_'||*pos=='-') && i<255; i++, pos++) + { + iStr += *pos; + } + pos--; + htmlStr.truncate(htmlStr.length() - i1 + 1); + if (iStr.length()>3) htmlStr += "" + iStr + ""; - iStr = ""; - } + else htmlStr += iStr; + iStr = ""; + } else htmlStr += ch; } diff --git a/kmversion.h b/kmversion.h index d31fd7c17..e147aa771 100644 --- a/kmversion.h +++ b/kmversion.h @@ -3,6 +3,6 @@ #ifndef kmversion_h #define kmversion_h -#define KMAIL_VERSION "0.6.1" +#define KMAIL_VERSION "0.6.2" #endif /*kmversion_h*/ diff --git a/main.cpp b/main.cpp index 493fc259b..ef985eecf 100644 --- a/main.cpp +++ b/main.cpp @@ -72,7 +72,7 @@ static void init(int& argc, char *argv[]); static void cleanup(void); static void setSignalHandler(void (*handler)(int)); static void recoverDeadLetters(void); -static void mailto(int argc, char *argv[]); +static void processArgs(int argc, char *argv[]); //----------------------------------------------------------------------------- @@ -345,11 +345,13 @@ static void cleanup(void) //----------------------------------------------------------------------------- -static void mailto(int argc, char *argv[]) +static void processArgs(int argc, char *argv[]) { KMComposeWin* win; KMMessage* msg = new KMMessage; QString to, cc, bcc, subj; + bool checkNewMail = FALSE; + bool mailto = FALSE; int i; for (i=0; iinitHeader(); - if (!cc.isEmpty()) msg->setCc(cc); - if (!bcc.isEmpty()) msg->setBcc(bcc); - if (!subj.isEmpty()) msg->setSubject(subj); - if (!to.isEmpty()) msg->setTo(to); + if (checkNewMail) acctMgr->checkMail(); - win = new KMComposeWin(msg); - win->show(); + if (mailto) + { + msg->initHeader(); + if (!cc.isEmpty()) msg->setCc(cc); + if (!bcc.isEmpty()) msg->setBcc(bcc); + if (!subj.isEmpty()) msg->setSubject(subj); + if (!to.isEmpty()) msg->setTo(to); + + win = new KMComposeWin(msg); + win->show(); + } } @@ -397,7 +415,7 @@ main(int argc, char *argv[]) mainWin->show(); if (argc > 1) - mailto(argc-1, argv+1); + processArgs(argc-1, argv+1); recoverDeadLetters(); app->exec();