summaryrefslogtreecommitdiff
path: root/noncore/net
Side-by-side diff
Diffstat (limited to 'noncore/net') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/accountview.cpp1
-rw-r--r--noncore/net/mail/mail.pro3
-rw-r--r--noncore/net/mail/mainwindow.cpp16
-rw-r--r--noncore/net/mail/mainwindow.h2
-rw-r--r--noncore/net/mail/opiemail.cpp12
-rw-r--r--noncore/net/mail/statuswidget.cpp33
-rw-r--r--noncore/net/mail/statuswidget.h24
-rw-r--r--noncore/net/mail/statuswidgetui.ui71
-rw-r--r--noncore/net/mail/viewmail.cpp37
-rw-r--r--noncore/net/mail/viewmail.h4
10 files changed, 44 insertions, 159 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp
index 0fe8475..c747a8b 100644
--- a/noncore/net/mail/accountview.cpp
+++ b/noncore/net/mail/accountview.cpp
@@ -61,3 +61,2 @@ void AccountView::populate( QList<Account> list )
mhAccounts.clear();
-
mhAccounts.append(new MHviewItem(AbstractMail::defaultLocalfolder(),this));
diff --git a/noncore/net/mail/mail.pro b/noncore/net/mail/mail.pro
index e394bbf..a1de8b5 100644
--- a/noncore/net/mail/mail.pro
+++ b/noncore/net/mail/mail.pro
@@ -13,3 +13,2 @@ HEADERS = defines.h \
settingsdialog.h \
- statuswidget.h \
newmaildir.h \
@@ -32,3 +31,2 @@ SOURCES = main.cpp \
settingsdialog.cpp \
- statuswidget.cpp \
newmaildir.cpp \
@@ -48,3 +46,2 @@ INTERFACES = editaccountsui.ui \
settingsdialogui.ui \
- statuswidgetui.ui \
newmaildirui.ui \
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index 93d80d9..0a45445 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -83,8 +83,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
- //setCentralWidget( view );
- QVBox* wrapperBox = new QVBox( this );
- setCentralWidget( wrapperBox );
-
- QWidget *view = new QWidget( wrapperBox );
+ QWidget *view = new QWidget( this );
+ setCentralWidget( view );
layout = new QBoxLayout ( view, QBoxLayout::LeftToRight );
@@ -108,5 +105,2 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
- statusWidget = new StatusWidget( wrapperBox );
- statusWidget->hide();
-
layout->addWidget( mailView );
@@ -126,6 +120,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) );
+
connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)),
this,SLOT(refreshMailView(const QValueList<RecMailP>&)));
+
connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
+
// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
@@ -134,2 +131,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
// copied from old mail2
+
#if !defined(QT_NO_COP)
@@ -142,3 +140,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
- QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
+ QTimer::singleShot( 10, this, SLOT( slotAdjustColumns() ) );
}
diff --git a/noncore/net/mail/mainwindow.h b/noncore/net/mail/mainwindow.h
index 8cec888..ad71a54 100644
--- a/noncore/net/mail/mainwindow.h
+++ b/noncore/net/mail/mainwindow.h
@@ -11,3 +11,2 @@
#include "accountview.h"
-#include "statuswidget.h"
@@ -47,3 +46,2 @@ protected:
QToolBar *toolBar;
- StatusWidget *statusWidget;
QMenuBar *menuBar;
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp
index 2bbc8f1..9eba23e 100644
--- a/noncore/net/mail/opiemail.cpp
+++ b/noncore/net/mail/opiemail.cpp
@@ -109,10 +109,3 @@ OpieMail::OpieMail( QWidget *parent, const char *name, WFlags )
settings = new Settings();
-
folderView->populate( settings->getAccounts() );
-#if 0
- tvaluelist s = ValueExplode("a=1&b=holladiewaldfee&c=3&d=&e=3450");
- for (int i = 0; i < s.count();++i) {
- odebug<<"Key: " << s[i].key << " Value: " << s[i].data << oendl;
- }
-#endif
}
@@ -250,6 +243,7 @@ void OpieMail::slotEditAccounts()
eaDialog.slotAdjustColumns();
- QPEApplication::execDialog( &eaDialog );
+ if (QPEApplication::execDialog( &eaDialog )==QDialog::Rejected);// return;
+
if ( settings ) delete settings;
settings = new Settings();
-
+ mailView->clear();
folderView->populate( settings->getAccounts() );
diff --git a/noncore/net/mail/statuswidget.cpp b/noncore/net/mail/statuswidget.cpp
deleted file mode 100644
index 19cf635..0000000
--- a/noncore/net/mail/statuswidget.cpp
+++ b/dev/null
@@ -1,33 +0,0 @@
-#include <qtimer.h>
-#include <qprogressbar.h>
-#include <qlabel.h>
-
-#include "statuswidget.h"
-
-// the current problem I see is "locking": used exclusive by one sender
-
-
-StatusWidget::StatusWidget( QWidget* parent, const char* name,WFlags fl )
- : StatusWidgetUI( parent, name, fl ) {
-
- setMaximumHeight( 15 );
- // hide for now since nothing reports decent progress data yet.
- statusProgress->hide();
- }
-
-StatusWidget::~StatusWidget() {
-}
-
-void StatusWidget::setText( const QString& text ) {
- show();
- statusText->setText( text );
- QTimer::singleShot( 5000, this, SLOT( hide() ) );
-}
-
-void StatusWidget::setProgress( int progress ) {
- show();
- statusProgress->setProgress( progress );
- if ( progress == 100 ) {
- hide();
- }
-}
diff --git a/noncore/net/mail/statuswidget.h b/noncore/net/mail/statuswidget.h
deleted file mode 100644
index 73f0d75..0000000
--- a/noncore/net/mail/statuswidget.h
+++ b/dev/null
@@ -1,24 +0,0 @@
-#ifndef STATUS_WIDGET_H
-#define STATUS_WIDGET_H
-
-#include <qwidget.h>
-#include "statuswidgetui.h"
-
-class StatusWidget : public StatusWidgetUI {
-
-Q_OBJECT
-
-public:
- StatusWidget( QWidget* parent = 0, const char* name = 0,WFlags fl = 0 );
- ~StatusWidget();
-
-
-public slots:
-
- void setText( const QString& text );
- void setProgress( int progress );
-};
-
-
-#endif
-
diff --git a/noncore/net/mail/statuswidgetui.ui b/noncore/net/mail/statuswidgetui.ui
deleted file mode 100644
index ffe3528..0000000
--- a/noncore/net/mail/statuswidgetui.ui
+++ b/dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE UI><UI>
-<class>StatusWidgetUI</class>
-<widget>
- <class>QWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>StatusWidgetUI</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>0</x>
- <y>0</y>
- <width>596</width>
- <height>480</height>
- </rect>
- </property>
- <property stdset="1">
- <name>caption</name>
- <string>Form1</string>
- </property>
- <property>
- <name>layoutMargin</name>
- </property>
- <property>
- <name>layoutSpacing</name>
- </property>
- <hbox>
- <property stdset="1">
- <name>margin</name>
- <number>3</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>3</number>
- </property>
- <widget>
- <class>QProgressBar</class>
- <property stdset="1">
- <name>name</name>
- <cstring>statusProgress</cstring>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- </sizepolicy>
- </property>
- </widget>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>statusText</cstring>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>1</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>TextLabel1</string>
- </property>
- </widget>
- </hbox>
-</widget>
-</UI>
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp
index a64a168..5206220 100644
--- a/noncore/net/mail/viewmail.cpp
+++ b/noncore/net/mail/viewmail.cpp
@@ -198,3 +198,3 @@ void ViewMail::slotShowHtml( bool state )
m_showHtml = state;
- setText();
+ setMainText();
}
@@ -208,3 +208,3 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
{
- setText();
+ setMainText();
return;
@@ -252,2 +252,11 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
{
+ if (m_lastimagepart== (( AttachItem* )item )->Partnumber()) {
+ if (m_lastdlg) {
+ setUpdatesEnabled(false);
+ browser->hide();
+ m_lastdlg->show();
+ setUpdatesEnabled(true);
+ return;
+ }
+ }
QString tmpfile = QString("/tmp/opiemail-image-%1").arg(_icounter++);
@@ -278,2 +287,3 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
}
+ m_lastimagepart=(( AttachItem* )item )->Partnumber();
}
@@ -283,3 +293,3 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
{
- setText();
+ setMainText();
}
@@ -289,3 +299,13 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
{ // make sure that there is a wrapper , even after delete or simular actions
- browser->setText( m_recMail->Wrapper()->fetchTextPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ) );
+ if (m_lastdlg) {
+ m_lastdlg->hide();
+ browser->show();
+ }
+ if (m_lasttextpart == ( ( AttachItem* )item )->Partnumber() ) return;
+ m_lasttextpart = ( ( AttachItem* )item )->Partnumber();
+ QString s = m_recMail->Wrapper()->fetchTextPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] );;
+ if (item->text(0).right(4)!="html") {
+ s = QString("<html><body>\n<font face=fixed>%1</font></body></html>").arg(QStyleSheet::convertFromPlainText(s));
+ }
+ browser->setText(s);
}
@@ -313,3 +333,3 @@ void ViewMail::setMail(const RecMailP&mail )
setCaption(tr("E-Mail by %1").arg( m_mail[0] ) );
- setText();
+ setMainText();
}
@@ -334,2 +354,4 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
_icounter = 0;
+ m_lastimagepart = -1;
+ m_lasttextpart = -2;
@@ -350,2 +372,3 @@ void ViewMail::slotImageInline(bool how)
m_lastdlg = 0;
+ m_lastimagepart = -1;
}
@@ -363,3 +386,3 @@ void ViewMail::readConfig()
-void ViewMail::setText()
+void ViewMail::setMainText()
{
@@ -374,2 +397,4 @@ void ViewMail::setText()
browser->show();
+ if (m_lasttextpart == -1) return;
+ m_lasttextpart = -1;
for ( QStringList::Iterator it = ( m_mail2[0] ).begin(); it != ( m_mail2[0] ).end(); ++it )
diff --git a/noncore/net/mail/viewmail.h b/noncore/net/mail/viewmail.h
index f5033f0..18b1796 100644
--- a/noncore/net/mail/viewmail.h
+++ b/noncore/net/mail/viewmail.h
@@ -57,3 +57,3 @@ protected slots:
void slotForward();
- void setText();
+ void setMainText();
void slotItemClicked( QListViewItem * item , const QPoint & point, int c );
@@ -74,2 +74,4 @@ private:
unsigned int _icounter;
+ int m_lastimagepart;
+ int m_lasttextpart;