summaryrefslogtreecommitdiff
authoralwin <alwin>2004-02-27 00:50:00 (UTC)
committer alwin <alwin>2004-02-27 00:50:00 (UTC)
commit8de117d74a9a0672ae6ec809a1a17fdb29226290 (patch) (unidiff)
tree2eb665bd120937c13fa215c5f45ab6361df9ee85
parentcb7a0156d641e96dfb6fe1cea6ca3a26e54ce6b2 (diff)
downloadopie-8de117d74a9a0672ae6ec809a1a17fdb29226290.zip
opie-8de117d74a9a0672ae6ec809a1a17fdb29226290.tar.gz
opie-8de117d74a9a0672ae6ec809a1a17fdb29226290.tar.bz2
viewmail window will close on escape pressed
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/viewmailbase.cpp10
-rw-r--r--noncore/net/mail/viewmailbase.h1
2 files changed, 10 insertions, 1 deletions
diff --git a/noncore/net/mail/viewmailbase.cpp b/noncore/net/mail/viewmailbase.cpp
index 153ba9d..7f1d8a0 100644
--- a/noncore/net/mail/viewmailbase.cpp
+++ b/noncore/net/mail/viewmailbase.cpp
@@ -70,13 +70,21 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
70 70
71 //openDiag = new OpenDiag(view); 71 //openDiag = new OpenDiag(view);
72 //openDiag->hide(); 72 //openDiag->hide();
73 73
74} 74}
75 75
76void ViewMailBase::slotChangeAttachview(bool state) 76void ViewMailBase::slotChangeAttachview(bool state)
77{ 77{
78 if (state) attachments->show(); 78 if (state) attachments->show();
79 else attachments->hide(); 79 else attachments->hide();
80} 80}
81 81
82 82void ViewMailBase::keyPressEvent ( QKeyEvent * e )
83{
84 if( e->key()==Qt::Key_Escape ) {
85 close();
86 e->accept();
87 return;
88 }
89 QWidget::keyPressEvent(e);
90}
diff --git a/noncore/net/mail/viewmailbase.h b/noncore/net/mail/viewmailbase.h
index 6d2a5b2..fdaad2a 100644
--- a/noncore/net/mail/viewmailbase.h
+++ b/noncore/net/mail/viewmailbase.h
@@ -20,18 +20,19 @@ public:
20 20
21protected: 21protected:
22 QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml; 22 QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml;
23 QListView *attachments; 23 QListView *attachments;
24 QToolBar *toolbar; 24 QToolBar *toolbar;
25 QTextBrowser *browser; 25 QTextBrowser *browser;
26 OpenDiag *openDiag; 26 OpenDiag *openDiag;
27 QMenuBar *menubar; 27 QMenuBar *menubar;
28 QPopupMenu *mailmenu; 28 QPopupMenu *mailmenu;
29 29
30protected slots: 30protected slots:
31 void slotChangeAttachview(bool state); 31 void slotChangeAttachview(bool state);
32 virtual void keyPressEvent ( QKeyEvent * e );
32 33
33 34
34}; 35};
35 36
36#endif 37#endif
37 38