From b5d111eb79896d02aa13d41a04ce6aa4dbc4aa49 Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 23 Oct 2004 13:36:29 +0000 Subject: Integrate opiemail with Konqueror. When now clicking on a mailto link in Konqueror OpieMail can get asked to send a mail to the persopn --- (limited to 'noncore/net/mail') diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index 2f87e44..b153292 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp @@ -23,7 +23,7 @@ using namespace Opie::Core; -OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) +OpieMail::OpieMail( QWidget *parent, const char *name, WFlags ) : MainWindow( parent, name, WStyle_ContextHelp ) { setup_signalblocking(); @@ -64,6 +64,18 @@ void OpieMail::appMessage(const QCString &msg, const QByteArray &data) } } +/** + * Konqueror calls us with the mailto:name@address + */ +void OpieMail::setDocument(const QString& mail) +{ + /* + * It looks like a mailto address, lets try it + */ + if( mail.startsWith(QString::fromLatin1("mailto:")) ) + slotwriteMail(QString::null, mail.mid(7)); +} + void OpieMail::slotwriteMail(const QString&name,const QString&email) { ComposeMail compose( settings, this, 0, true , WStyle_ContextHelp ); -- cgit v0.9.0.2