summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-12-17 23:36:56 (UTC)
committer harlekin <harlekin>2003-12-17 23:36:56 (UTC)
commite996a7b13e2860280a63d089716958c7886cdc8d (patch) (unidiff)
treec4a8f3da11570d31d947528eecd63a0cfaebc755
parentd30140b2bb0f5399b7555646548296ceab65fa20 (diff)
downloadopie-e996a7b13e2860280a63d089716958c7886cdc8d.zip
opie-e996a7b13e2860280a63d089716958c7886cdc8d.tar.gz
opie-e996a7b13e2860280a63d089716958c7886cdc8d.tar.bz2
pics/mail is the picture folder for the new mailer
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/defines.h22
-rw-r--r--noncore/net/mail/mainwindow.cpp8
-rw-r--r--noncore/net/mail/opie-mail.control6
3 files changed, 18 insertions, 18 deletions
diff --git a/noncore/net/mail/defines.h b/noncore/net/mail/defines.h
index c849f1a..9036658 100644
--- a/noncore/net/mail/defines.h
+++ b/noncore/net/mail/defines.h
@@ -1,40 +1,40 @@
1#ifndef DEFINE_CONSTANTS_H 1#ifndef DEFINE_CONSTANTS_H
2#define DEFINE_CONSTANTS_H 2#define DEFINE_CONSTANTS_H
3 3
4#include <qpe/resource.h> 4#include <qpe/resource.h>
5 5
6#define USER_AGENT "OpieMail v0.0.1-alpha" 6#define USER_AGENT "OpieMail v0.1"
7 7
8#define PIC_COMPOSEMAIL "opiemail/composemail" 8#define PIC_COMPOSEMAIL "mail/composemail"
9#define PIC_SENDQUEUED "opiemail/sendqueued" 9#define PIC_SENDQUEUED "mail/sendqueued"
10#define PIC_SHOWFOLDERS "opiemail/showfolders" 10#define PIC_SHOWFOLDERS "mail/showfolders"
11#define PIC_SEARCHMAILS "opiemail/searchmails" 11#define PIC_SEARCHMAILS "mail/searchmails"
12#define PIC_EDITSETTINGS "opiemail/editsettings" 12#define PIC_EDITSETTINGS "mail/editsettings"
13#define PIC_EDITACCOUNTS "opiemail/editaccounts" 13#define PIC_EDITACCOUNTS "mail/editaccounts"
14#define PIC_SYNC "opiemail/sync" 14#define PIC_SYNC "mail/sync"
15#define PIC_IMAPFOLDER "opiemail/imapfolder" 15#define PIC_IMAPFOLDER "mail/imapfolder"
16#define PIC_POP3FOLDER "opiemail/pop3folder" 16#define PIC_POP3FOLDER "mail/pop3folder"
17#define PIC_INBOXFOLDER "opiemail/inbox" 17#define PIC_INBOXFOLDER "mail/inbox"
18 18
19#define ICON_COMPOSEMAIL QIconSet( Resource::loadPixmap( PIC_COMPOSEMAIL ) ) 19#define ICON_COMPOSEMAIL QIconSet( Resource::loadPixmap( PIC_COMPOSEMAIL ) )
20#define ICON_SENDQUEUED QIconSet( Resource::loadPixmap( PIC_SENDQUEUED ) ) 20#define ICON_SENDQUEUED QIconSet( Resource::loadPixmap( PIC_SENDQUEUED ) )
21#define ICON_SHOWFOLDERS QIconSet( Resource::loadPixmap( PIC_SHOWFOLDERS ) ) 21#define ICON_SHOWFOLDERS QIconSet( Resource::loadPixmap( PIC_SHOWFOLDERS ) )
22#define ICON_SEARCHMAILS QIconSet( Resource::loadPixmap( PIC_SEARCHMAILS ) ) 22#define ICON_SEARCHMAILS QIconSet( Resource::loadPixmap( PIC_SEARCHMAILS ) )
23#define ICON_EDITSETTINGS QIconSet( Resource::loadPixmap( PIC_EDITSETTINGS ) ) 23#define ICON_EDITSETTINGS QIconSet( Resource::loadPixmap( PIC_EDITSETTINGS ) )
24#define ICON_EDITACCOUNTS QIconSet( Resource::loadPixmap( PIC_EDITACCOUNTS ) ) 24#define ICON_EDITACCOUNTS QIconSet( Resource::loadPixmap( PIC_EDITACCOUNTS ) )
25#define ICON_SYNC QIconSet( Resource::loadPixmap( PIC_SYNC ) ) 25#define ICON_SYNC QIconSet( Resource::loadPixmap( PIC_SYNC ) )
26 26
27#define PIXMAP_IMAPFOLDER QPixmap( Resource::loadPixmap( PIC_IMAPFOLDER ) ) 27#define PIXMAP_IMAPFOLDER QPixmap( Resource::loadPixmap( PIC_IMAPFOLDER ) )
28#define PIXMAP_POP3FOLDER QPixmap( Resource::loadPixmap( PIC_POP3FOLDER ) ) 28#define PIXMAP_POP3FOLDER QPixmap( Resource::loadPixmap( PIC_POP3FOLDER ) )
29#define PIXMAP_INBOXFOLDER QPixmap( Resource::loadPixmap( PIC_INBOXFOLDER) ) 29#define PIXMAP_INBOXFOLDER QPixmap( Resource::loadPixmap( PIC_INBOXFOLDER) )
30 30
31#define IMAP_PORT "143" 31#define IMAP_PORT "143"
32#define IMAP_SSL_PORT "993" 32#define IMAP_SSL_PORT "993"
33#define SMTP_PORT "25" 33#define SMTP_PORT "25"
34#define SMTP_SSL_PORT "465" 34#define SMTP_SSL_PORT "465"
35#define POP3_PORT "110" 35#define POP3_PORT "110"
36#define POP3_SSL_PORT "995" 36#define POP3_SSL_PORT "995"
37#define NNTP_PORT "119" 37#define NNTP_PORT "119"
38#define NNTP_SSL_PORT "563" 38#define NNTP_SSL_PORT "563"
39 39
40#endif 40#endif
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index 8e2132e..89530ab 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -131,94 +131,94 @@ void MainWindow::slotAdjustColumns()
131 if ( hidden ) folderView->show(); 131 if ( hidden ) folderView->show();
132 folderView->setColumnWidth( 0, folderView->visibleWidth() ); 132 folderView->setColumnWidth( 0, folderView->visibleWidth() );
133 if ( hidden ) folderView->hide(); 133 if ( hidden ) folderView->hide();
134 134
135 mailView->setColumnWidth( 0, 10 ); 135 mailView->setColumnWidth( 0, 10 );
136 mailView->setColumnWidth( 1, mailView->visibleWidth() - 130 ); 136 mailView->setColumnWidth( 1, mailView->visibleWidth() - 130 );
137 mailView->setColumnWidth( 2, 80 ); 137 mailView->setColumnWidth( 2, 80 );
138 mailView->setColumnWidth( 3, 50 ); 138 mailView->setColumnWidth( 3, 50 );
139} 139}
140 140
141void MainWindow::slotShowFolders( bool show ) 141void MainWindow::slotShowFolders( bool show )
142{ 142{
143 qDebug( "Show Folders" ); 143 qDebug( "Show Folders" );
144 if ( show && folderView->isHidden() ) { 144 if ( show && folderView->isHidden() ) {
145 qDebug( "-> showing" ); 145 qDebug( "-> showing" );
146 folderView->show(); 146 folderView->show();
147 } else if ( !show && !folderView->isHidden() ) { 147 } else if ( !show && !folderView->isHidden() ) {
148 qDebug( "-> hiding" ); 148 qDebug( "-> hiding" );
149 folderView->hide(); 149 folderView->hide();
150 } 150 }
151} 151}
152 152
153void MainWindow::refreshMailView(QList<RecMail>*list) 153void MainWindow::refreshMailView(QList<RecMail>*list)
154{ 154{
155 MailListViewItem*item = 0; 155 MailListViewItem*item = 0;
156 mailView->clear(); 156 mailView->clear();
157 for (unsigned int i = 0; i < list->count();++i) { 157 for (unsigned int i = 0; i < list->count();++i) {
158 item = new MailListViewItem(mailView,item); 158 item = new MailListViewItem(mailView,item);
159 item->storeData(*(list->at(i))); 159 item->storeData(*(list->at(i)));
160 item->showEntry(); 160 item->showEntry();
161 } 161 }
162} 162}
163void MainWindow::displayMail(QListViewItem*item) 163void MainWindow::displayMail(QListViewItem*item)
164{ 164{
165 165
166 if (!item) return; 166 if (!item) return;
167 RecMail mail = ((MailListViewItem*)item)->data(); 167 RecMail mail = ((MailListViewItem*)item)->data();
168 RecBody body = folderView->fetchBody(mail); 168 RecBody body = folderView->fetchBody(mail);
169 169
170 ViewMail readMail( this ); 170 ViewMail readMail( this );
171 readMail.setBody( body ); 171 readMail.setBody( body );
172 readMail.setMail( mail ); 172 readMail.setMail( mail );
173 readMail.showMaximized(); 173 readMail.showMaximized();
174 readMail.exec(); 174 readMail.exec();
175 175
176 if ( readMail.deleted ) { 176 if ( readMail.deleted ) {
177 folderView->refreshCurrent(); 177 folderView->refreshCurrent();
178 } else { 178 } else {
179 ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "opiemail/kmmsgunseen") ); 179 ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "mail/kmmsgunseen") );
180 } 180 }
181} 181}
182 182
183void MainWindow::slotDeleteMail() 183void MainWindow::slotDeleteMail()
184{ 184{
185 if (!mailView->currentItem()) return; 185 if (!mailView->currentItem()) return;
186 RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data(); 186 RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data();
187 if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail.getFrom() + " - " + mail.getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { 187 if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail.getFrom() + " - " + mail.getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) {
188 mail.Wrapper()->deleteMail( mail ); 188 mail.Wrapper()->deleteMail( mail );
189 folderView->refreshCurrent(); 189 folderView->refreshCurrent();
190 } 190 }
191} 191}
192 192
193 193
194 194
195MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) 195MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item )
196 :QListViewItem(parent,item),mail_data() 196 :QListViewItem(parent,item),mail_data()
197{ 197{
198} 198}
199 199
200void MailListViewItem::showEntry() 200void MailListViewItem::showEntry()
201{ 201{
202 if ( mail_data.getFlags().testBit( FLAG_ANSWERED ) == true) { 202 if ( mail_data.getFlags().testBit( FLAG_ANSWERED ) == true) {
203 setPixmap( 0, Resource::loadPixmap( "opiemail/kmmsgreplied") ); 203 setPixmap( 0, Resource::loadPixmap( "mail/kmmsgreplied") );
204 } else if ( mail_data.getFlags().testBit( FLAG_SEEN ) == true ) { 204 } else if ( mail_data.getFlags().testBit( FLAG_SEEN ) == true ) {
205 setPixmap( 0, Resource::loadPixmap( "opiemail/kmmsgunseen") ); 205 setPixmap( 0, Resource::loadPixmap( "mail/kmmsgunseen") );
206 } else { 206 } else {
207 setPixmap( 0, Resource::loadPixmap( "opiemail/kmmsgnew") ); 207 setPixmap( 0, Resource::loadPixmap( "mail/kmmsgnew") );
208 } 208 }
209 setText(1,mail_data.getSubject()); 209 setText(1,mail_data.getSubject());
210 setText(2,mail_data.getFrom()); 210 setText(2,mail_data.getFrom());
211 setText(3,mail_data.getDate()); 211 setText(3,mail_data.getDate());
212} 212}
213 213
214void MailListViewItem::storeData(const RecMail&data) 214void MailListViewItem::storeData(const RecMail&data)
215{ 215{
216 mail_data = data; 216 mail_data = data;
217} 217}
218 218
219const RecMail& MailListViewItem::data()const 219const RecMail& MailListViewItem::data()const
220{ 220{
221 return mail_data; 221 return mail_data;
222} 222}
223 223
224 224
diff --git a/noncore/net/mail/opie-mail.control b/noncore/net/mail/opie-mail.control
index 2ea860e..c1a4312 100644
--- a/noncore/net/mail/opie-mail.control
+++ b/noncore/net/mail/opie-mail.control
@@ -1,10 +1,10 @@
1Package: opie-mail 1Package: opie-mail
2Files: bin/opiemail apps/1Pim/mail.desktop pics/opiemail/*.png plugins/application/libopiemail.so* 2Files: bin/opiemail apps/1Pim/mail.desktop pics/mail/*.png plugins/application/libopiemail.so*
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Juergen Graf <jgf@handhelds.org> 5Maintainer: Rajko Albrecht <alwin@handhelds.org>, Juergen Graf <jgf@handhelds.org>, Maximilian Reiß <harlekin@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: 0.0.1-$SUB_VERSION 7Version: 0.1-$SUB_VERSION
8Depends: task-opie-minimal, libopie1 8Depends: task-opie-minimal, libopie1
9Description: Opie's mail and news client (POP3, IMAP and NNTP) 9Description: Opie's mail and news client (POP3, IMAP and NNTP)
10License: LGPL 10License: LGPL