summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2005-03-22 22:55:32 (UTC)
committer zautrix <zautrix>2005-03-22 22:55:32 (UTC)
commitaa6d19015bc91ae3af021d766d37a473e125278f (patch) (unidiff)
treef7b1d6b45a3997013318107ca02fa63b4b76913e /kmicromail
parent53ac6d1f931c50d89a44d9d46daceb7ed9d4ddc6 (diff)
downloadkdepimpi-aa6d19015bc91ae3af021d766d37a473e125278f.zip
kdepimpi-aa6d19015bc91ae3af021d766d37a473e125278f.tar.gz
kdepimpi-aa6d19015bc91ae3af021d766d37a473e125278f.tar.bz2
fixes
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/opiemail.cpp1
-rw-r--r--kmicromail/viewmailbase.cpp9
-rw-r--r--kmicromail/viewmailbase.h5
3 files changed, 12 insertions, 3 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index b701446..4436ad6 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -32,48 +32,49 @@
32#include <qpe/global.h> 32#include <qpe/global.h>
33 33
34#ifdef DESKTOP_VERSION 34#ifdef DESKTOP_VERSION
35#include <qapplication.h> 35#include <qapplication.h>
36#else 36#else
37#include <qpe/qpeapplication.h> 37#include <qpe/qpeapplication.h>
38#endif 38#endif
39#include <libmailwrapper/smtpwrapper.h> 39#include <libmailwrapper/smtpwrapper.h>
40#include <libmailwrapper/mailtypes.h> 40#include <libmailwrapper/mailtypes.h>
41#include <libmailwrapper/abstractmail.h> 41#include <libmailwrapper/abstractmail.h>
42#include "koprefs.h" 42#include "koprefs.h"
43 43
44//using namespace Opie::Core; 44//using namespace Opie::Core;
45 45
46OpieMail::OpieMail( QWidget *parent, const char *name ) 46OpieMail::OpieMail( QWidget *parent, const char *name )
47 : MainWindow( parent, name) //, WStyle_ContextHelp ) 47 : MainWindow( parent, name) //, WStyle_ContextHelp )
48{ 48{
49 mCurrentComposer = 0; 49 mCurrentComposer = 0;
50 settings = new Settings(); 50 settings = new Settings();
51 tb = 0; 51 tb = 0;
52 setIcon(SmallIcon( "kmicromail" ) ); 52 setIcon(SmallIcon( "kmicromail" ) );
53 folderView->populate( settings->getAccounts() ); 53 folderView->populate( settings->getAccounts() );
54 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), 54 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
55 this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); 55 this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
56 folderView->setFocus();
56} 57}
57 58
58OpieMail::~OpieMail() 59OpieMail::~OpieMail()
59{ 60{
60 if (settings) delete settings; 61 if (settings) delete settings;
61 if ( tb ) 62 if ( tb )
62 delete tb; 63 delete tb;
63} 64}
64 65
65void OpieMail::appMessage(const QCString &msg, const QByteArray &data) 66void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
66{ 67{
67 68
68} 69}
69#include <stdlib.h> 70#include <stdlib.h>
70void OpieMail::message(const QCString &msg, const QByteArray &data) 71void OpieMail::message(const QCString &msg, const QByteArray &data)
71{ 72{
72 // copied from old mail2 73 // copied from old mail2
73 static int ii = 0; 74 static int ii = 0;
74 //qDebug("QCOP CALL ############################# %d ", ii); 75 //qDebug("QCOP CALL ############################# %d ", ii);
75 //QString mess ( msg ); 76 //QString mess ( msg );
76 //qDebug("Message = %s ",mess.latin1()); 77 //qDebug("Message = %s ",mess.latin1());
77 ++ii; 78 ++ii;
78 //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this); 79 //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this);
79 80
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index 3a41ba0..3bb964e 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -1,30 +1,31 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2#include <qtextbrowser.h> 2#include <qtextbrowser.h>
3#include <qlistview.h> 3#include <qlistview.h>
4#include <qaction.h> 4#include <qaction.h>
5#include <qlabel.h> 5#include <qlabel.h>
6#include <qvbox.h> 6#include <qvbox.h>
7#include <qapplication.h>
7 8
8#include <qtoolbar.h> 9#include <qtoolbar.h>
9#include <qmenubar.h> 10#include <qmenubar.h>
10#include <kiconloader.h> 11#include <kiconloader.h>
11//#include <qpe/resource.h> 12//#include <qpe/resource.h>
12#include <klocale.h> 13#include <klocale.h>
13 14
14#include "viewmailbase.h" 15#include "viewmailbase.h"
15//#include "opendiag.h" 16//#include "opendiag.h"
16 17
17ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) 18ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
18 : QMainWindow(parent, name, fl) 19 : QMainWindow(parent, name, fl)
19{ 20{
20 21
21 setToolBarsMovable(false); 22 setToolBarsMovable(false);
22 23
23 toolbar = new QToolBar(this); 24 toolbar = new QToolBar(this);
24 menubar = new QMenuBar( toolbar ); 25 menubar = new QMenuBar( toolbar );
25 mailmenu = new QPopupMenu( menubar ); 26 mailmenu = new QPopupMenu( menubar );
26 menubar->insertItem( i18n( "Mail" ), mailmenu ); 27 menubar->insertItem( i18n( "Mail" ), mailmenu );
27 28
28 toolbar->setHorizontalStretchable(true); 29 toolbar->setHorizontalStretchable(true);
29 addToolBar(toolbar); 30 addToolBar(toolbar);
30 31
@@ -51,52 +52,54 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
51 52
52 showHtml = new QAction( i18n( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true ); 53 showHtml = new QAction( i18n( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true );
53 showHtml->addTo( toolbar ); 54 showHtml->addTo( toolbar );
54 showHtml->addTo( mailmenu ); 55 showHtml->addTo( mailmenu );
55 56
56 deleteMail = new QAction(i18n("Delete Mail"),SmallIcon("trash"), 0, 0, this); 57 deleteMail = new QAction(i18n("Delete Mail"),SmallIcon("trash"), 0, 0, this);
57 deleteMail->addTo(toolbar); 58 deleteMail->addTo(toolbar);
58 deleteMail->addTo(mailmenu); 59 deleteMail->addTo(mailmenu);
59 60
60 nextMail = new QAction(i18n("Show next mail"),SmallIcon("enter"), 0, 0, this); 61 nextMail = new QAction(i18n("Show next mail"),SmallIcon("enter"), 0, 0, this);
61 QLabel *spacer = new QLabel(toolbar); 62 QLabel *spacer = new QLabel(toolbar);
62 nextMail->addTo(toolbar); 63 nextMail->addTo(toolbar);
63 nextMail->addTo(mailmenu); 64 nextMail->addTo(mailmenu);
64 65
65 closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); 66 closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
66 //QLabel *spacer = new QLabel(toolbar); 67 //QLabel *spacer = new QLabel(toolbar);
67 spacer->setBackgroundMode(QWidget::PaletteButton); 68 spacer->setBackgroundMode(QWidget::PaletteButton);
68 toolbar->setStretchableWidget(spacer); 69 toolbar->setStretchableWidget(spacer);
69 closeMail->addTo(toolbar); 70 closeMail->addTo(toolbar);
70 closeMail->addTo(mailmenu); 71 closeMail->addTo(mailmenu);
71 QVBox *view = new QVBox(this); 72 QVBox *view = new QVBox(this);
72 setCentralWidget(view); 73 setCentralWidget(view);
73 74
74 attachments = new QListView(view); 75 attachments = new QListView(view);
75 attachments->setMinimumHeight(90); 76 int fixh = 100;
76 attachments->setMaximumHeight(90); 77 if ( QApplication::desktop()->width() > 320 )
78 fixh = 200;
79 attachments->setFixedHeight(fixh);
77 attachments->setAllColumnsShowFocus(true); 80 attachments->setAllColumnsShowFocus(true);
78 attachments->addColumn("Mime Type", 60); 81 attachments->addColumn("Mime Type", fixh-30);
79 attachments->addColumn(i18n("Description"), 100); 82 attachments->addColumn(i18n("Description"), 100);
80 attachments->addColumn(i18n("Filename"), 80); 83 attachments->addColumn(i18n("Filename"), 80);
81 attachments->addColumn(i18n("Size"), 80); 84 attachments->addColumn(i18n("Size"), 80);
82 attachments->setSorting(-1); 85 attachments->setSorting(-1);
83 attachments->hide(); 86 attachments->hide();
84 87
85 browser = new QTextBrowser(view); 88 browser = new QTextBrowser(view);
86 89
87 //openDiag = new OpenDiag(view); 90 //openDiag = new OpenDiag(view);
88 //openDiag->hide(); 91 //openDiag->hide();
89 92
90} 93}
91 94
92void ViewMailBase::slotChangeAttachview(bool state) 95void ViewMailBase::slotChangeAttachview(bool state)
93{ 96{
94 if (state) attachments->show(); 97 if (state) attachments->show();
95 else attachments->hide(); 98 else attachments->hide();
96} 99}
97 100
98void ViewMailBase::keyPressEvent ( QKeyEvent * e ) 101void ViewMailBase::keyPressEvent ( QKeyEvent * e )
99{ 102{
100 if( e->key()==Qt::Key_Escape ) { 103 if( e->key()==Qt::Key_Escape ) {
101 close(); 104 close();
102 e->accept(); 105 e->accept();
diff --git a/kmicromail/viewmailbase.h b/kmicromail/viewmailbase.h
index 7ad1eec..7c075eb 100644
--- a/kmicromail/viewmailbase.h
+++ b/kmicromail/viewmailbase.h
@@ -1,30 +1,35 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2#ifndef VIEWMAILBASE_H 2#ifndef VIEWMAILBASE_H
3#define VIEWMAILBASE_H 3#define VIEWMAILBASE_H
4 4
5#include <qmainwindow.h> 5#include <qmainwindow.h>
6 6
7#ifndef DESKTOP_VERSION
8#include <qpe/qpemenubar.h>
9#define QMenuBar QPEMenuBar
10#endif
11
7class QAction; 12class QAction;
8class OpenDiag; 13class OpenDiag;
9class QListView; 14class QListView;
10class QToolBar; 15class QToolBar;
11class QTextBrowser; 16class QTextBrowser;
12class QMenuBar; 17class QMenuBar;
13class QPopupMenu; 18class QPopupMenu;
14 19
15class ViewMailBase : public QMainWindow 20class ViewMailBase : public QMainWindow
16{ 21{
17 Q_OBJECT 22 Q_OBJECT
18 23
19public: 24public:
20 ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); 25 ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
21 26
22protected: 27protected:
23 QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail, *nextMail, *downloadMail, *viewSource; 28 QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail, *nextMail, *downloadMail, *viewSource;
24 QListView *attachments; 29 QListView *attachments;
25 QToolBar *toolbar; 30 QToolBar *toolbar;
26 QTextBrowser *browser; 31 QTextBrowser *browser;
27 OpenDiag *openDiag; 32 OpenDiag *openDiag;
28 QMenuBar *menubar; 33 QMenuBar *menubar;
29 QPopupMenu *mailmenu; 34 QPopupMenu *mailmenu;
30 35