summaryrefslogtreecommitdiff
path: root/noncore/net/mail/opiemail.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/mail/opiemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/opiemail.cpp30
1 files changed, 22 insertions, 8 deletions
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp
index 5399c3c..2f87e44 100644
--- a/noncore/net/mail/opiemail.cpp
+++ b/noncore/net/mail/opiemail.cpp
@@ -19,4 +19,7 @@
/* QT */
+/* UNIX */
+#include <signal.h>
+
using namespace Opie::Core;
@@ -24,4 +27,5 @@ OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags )
: MainWindow( parent, name, WStyle_ContextHelp )
{
+ setup_signalblocking();
settings = new Settings();
@@ -34,4 +38,14 @@ OpieMail::~OpieMail()
}
+void OpieMail::setup_signalblocking()
+{
+ /* for networking we must block SIGPIPE and Co. */
+ struct sigaction blocking_action,temp_action;
+ blocking_action.sa_handler = SIG_IGN;
+ sigemptyset(&(blocking_action.sa_mask));
+ blocking_action.sa_flags = 0;
+ sigaction(SIGPIPE,&blocking_action,&temp_action);
+}
+
void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
{
@@ -71,5 +85,5 @@ void OpieMail::slotwriteMail(const QString&name,const QString&email)
void OpieMail::slotComposeMail()
{
- odebug << "Compose Mail" << oendl;
+ odebug << "Compose Mail" << oendl;
slotwriteMail(0l,0l);
}
@@ -77,5 +91,5 @@ void OpieMail::slotComposeMail()
void OpieMail::slotSendQueued()
{
- odebug << "Send Queued" << oendl;
+ odebug << "Send Queued" << oendl;
SMTPaccount *smtp = 0;
@@ -124,5 +138,5 @@ void OpieMail::slotSendQueued()
void OpieMail::slotSearchMails()
{
- odebug << "Search Mails" << oendl;
+ odebug << "Search Mails" << oendl;
}
@@ -135,5 +149,5 @@ void OpieMail::slotEditSettings()
void OpieMail::slotEditAccounts()
{
- odebug << "Edit Accounts" << oendl;
+ odebug << "Edit Accounts" << oendl;
EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp );
eaDialog.slotAdjustColumns();
@@ -184,5 +198,5 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
/* just the RIGHT button - or hold on pda */
if (button!=2) {return;}
- odebug << "Event right/hold" << oendl;
+ odebug << "Event right/hold" << oendl;
if (!item) return;
QPopupMenu *m = new QPopupMenu(0);
@@ -208,13 +222,13 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
void OpieMail::slotShowFolders( bool show )
{
- odebug << "Show Folders" << oendl;
+ odebug << "Show Folders" << oendl;
if ( show && folderView->isHidden() )
{
- odebug << "-> showing" << oendl;
+ odebug << "-> showing" << oendl;
folderView->show();
}
else if ( !show && !folderView->isHidden() )
{
- odebug << "-> hiding" << oendl;
+ odebug << "-> hiding" << oendl;
folderView->hide();
}