summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/addressbook.cpp
authoreilers <eilers>2002-10-22 12:34:54 (UTC)
committer eilers <eilers>2002-10-22 12:34:54 (UTC)
commit78152b3adbe3ae4626c8f53e3edd0babcaf6fb72 (patch) (side-by-side diff)
tree89b0b4ffea2fa1efd4eb7dc50545661d3ceeb65d /core/pim/addressbook/addressbook.cpp
parent486280adc2ab5dc383a56d8516c36727eb382812 (diff)
downloadopie-78152b3adbe3ae4626c8f53e3edd0babcaf6fb72.zip
opie-78152b3adbe3ae4626c8f53e3edd0babcaf6fb72.tar.gz
opie-78152b3adbe3ae4626c8f53e3edd0babcaf6fb72.tar.bz2
Find bugfix. Tried to make the letterpicker more visible due to
undelign does not work on my Z.. :( Added use of alternative mail-application (opie-mail instead of QT-Mail)
Diffstat (limited to 'core/pim/addressbook/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp47
1 files changed, 44 insertions, 3 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 3466801..39d8321 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -82,2 +82,4 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
caseSensitive(false),
+ m_useQtMail(true),
+ m_useOpieMail(false),
bAbEditFirstTime(TRUE),
@@ -93,2 +95,6 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
doNotifyWrapAround = cfg.readBoolEntry( "doNotifyWrapAround" );
+ cfg.setGroup("Mail");
+ m_useQtMail = cfg.readBoolEntry( "useQtMail" );
+ m_useOpieMail=cfg.readBoolEntry( "useOpieMail" );
+
@@ -171,3 +177,3 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
- a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "qtmail/reply" ),
+ a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "mail/sendmail" ),
QString::null, 0, this, 0 );
@@ -284,2 +290,4 @@ void AddressbookWindow::slotConfig()
dlg -> setSignalWrapAround( doNotifyWrapAround );
+ dlg -> setQtMail ( m_useQtMail );
+ dlg -> setOpieMail ( m_useOpieMail );
dlg -> showMaximized();
@@ -290,2 +298,4 @@ void AddressbookWindow::slotConfig()
doNotifyWrapAround = dlg -> signalWrapAround();
+ m_useQtMail = dlg -> useQtMail();
+ m_useOpieMail= dlg -> useOpieMail();
}
@@ -382,2 +392,5 @@ AddressbookWindow::~AddressbookWindow()
cfg.writeEntry("doNotifyWrapAround", doNotifyWrapAround);
+ cfg.setGroup("Mail");
+ cfg.writeEntry( "useQtMail", m_useQtMail );
+ cfg.writeEntry( "useOpieMail", m_useOpieMail);
}
@@ -496,4 +509,32 @@ void AddressbookWindow::writeMail()
QString email = c.defaultEmail();
- QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)");
- e << name << email;
+
+ // I prefer the OPIE-Environment variable before the
+ // QPE-one..
+ QString basepath = QString::fromLatin1( getenv("OPIEDIR") );
+ if ( basepath.isEmpty() )
+ basepath = QString::fromLatin1( getenv("QPEDIR") );
+
+ // Try to access the preferred. If not possible, try to
+ // switch to the other one..
+ if ( m_useQtMail ){
+ qWarning ("Accessing: %s", (basepath + "/bin/qtmail").latin1());
+ if ( QFile::exists( basepath + "/bin/qtmail" ) ){
+ qWarning ("QCop");
+ QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)");
+ e << name << email;
+ return;
+ } else
+ m_useOpieMail = true;
+ }
+ if ( m_useOpieMail ){
+ qWarning ("Accessing: %s", (basepath + "/bin/mail").latin1());
+ if ( QFile::exists( basepath + "/bin/mail" ) ){
+ qWarning ("QCop");
+ QCopEnvelope e("QPE/Application/mail", "writeMail(QString,QString)");
+ e << name << email;
+ return;
+ } else
+ m_useQtMail = true;
+ }
+
}