1998-03-15 Stefan Taferner <taferner@kde.org>

* 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  <taferner@kde.org>

* 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
wilder-work
Stefan Taferner 28 years ago
parent 74606d6297
commit 97f6d710e8
  1. 6
      ChangeLog
  2. 4
      kmmainwin.cpp
  3. 32
      kmreaderwin.cpp
  4. 2
      kmversion.h
  5. 38
      main.cpp

@ -1,3 +1,9 @@
1998-03-15 Stefan Taferner <taferner@kde.org>
* 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 <taferner@kde.org>
* Reader: '_' was not considered part of a smart-detected email

@ -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();

@ -524,23 +524,25 @@ const QString KMReaderWin::strToHtml(const QString aStr, bool aDecodeQP,
htmlStr += "</A>";
}
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 += "<A HREF=\"mailto:" + iStr + "\">" + iStr + "</A>";
iStr = "";
}
else htmlStr += iStr;
iStr = "";
}
else htmlStr += ch;
}

@ -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*/

@ -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; i<argc; i++)
@ -357,31 +359,47 @@ static void mailto(int argc, char *argv[])
if (strcmp(argv[i],"-s")==0)
{
if (i<argc-1) subj = argv[++i];
mailto = TRUE;
}
else if (strcmp(argv[i],"-c")==0)
{
if (i<argc-1) cc = argv[++i];
mailto = TRUE;
}
else if (strcmp(argv[i],"-b")==0)
{
if (i<argc-1) bcc = argv[++i];
mailto = TRUE;
}
else if (strcmp(argv[i],"-check")==0)
checkNewMail = TRUE;
else if (argv[i][0]=='-')
{
warning(i18n("Unknown command line option: %s"), argv[i]);
// unknown parameter
}
else
{
if (!to.isEmpty()) to += ", ";
if (strncasecmp(argv[i],"mailto:",7)==0) to += argv[i]+7;
else to += argv[i];
mailto = TRUE;
}
}
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);
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();

Loading…
Cancel
Save