-rw-r--r-- | bin/kdepim/WhatsNew.txt | 7 | ||||
-rw-r--r-- | bin/kdepim/kopiemail/germantranslation.txt | 4 | ||||
-rw-r--r-- | kmicromail/opiemail.cpp | 16 | ||||
-rw-r--r-- | kmicromail/opiemail.h | 2 | ||||
-rw-r--r-- | kmicromail/viewmail.cpp | 3 | ||||
-rw-r--r-- | kmicromail/viewmail.h | 4 | ||||
-rw-r--r-- | kmicromail/viewmailbase.cpp | 13 | ||||
-rw-r--r-- | kmicromail/viewmailbase.h | 4 |
8 files changed, 45 insertions, 8 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 6be5222..5021212 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -1,129 +1,134 @@ Info about the changes in new versions of KDE-Pim/Pi ********** VERSION 1.9.14 ************ Fixed some problems with the dialog sizes when switching portrait/landscape mode on 640x480 PDA display. -Fixed some other small bugs. +Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. Fixed an ugly bug in KOpieMail: KOpieMail was not able to write files (mails) to MSDOS file system, like on an usual preformatted SD card. That should work now. To save your mail data on the Sd card do the following: Create a dir on the SD card: mkdir /mnt/card/localmail Go to your home dir: cd Go to kopiemail data storage dir: cd kdepim/apps/kopiemail Create a symlink to the SD card: ls -s /mnt/card/localmail Now KOpieMail will store all mails on the SD card. KO/Pi Monthview: Now "Go to Today" selects the current month from day 1-end, not the current date + some days. I.e. "Go to Today" shows now always the current month with first day of month in the first row. Added missing German translation. Fixed icons of executeable on Wintendo. +Added a "Show next Mail" button to the OM/Pi +mail viewer such that the mail below the current mail +in the mail list view of the current folder +can be read with a single click. + ********** VERSION 1.9.13 ************ Fixed nasty PwM/Pi file reading bug, when the used hash algo of file is different then the global hash algo. Added KA/Pi support for opie mailit mailapplication. Fixed some bugs in OM/Pi. Now character conversion tables are available for the Zaurus to make OM/Pi working properly. To get the character conversion in OM/Pi working, please download at the sourceforge project site the package sr-character-conversion_SharpROM_arm.ipk.zip (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) from the section "general files for KDE/Pim" Instructions how to install this package are in a ReadMe in this file. Fixed the orientation change problem in KA/Pi when switching portrait/landscape mode. French translation available for KA/Pi and OM/Pi. Fixed some problems with categories in KO/Pi in DTM sync. Added selection dialog for export to phone in KA/Pi. If in KO/Pi is an attendee selected to add to a meeting and this attendee is already in the list of attendees, this person is not added again. Some menu cleanup in KA/Pi. ********** VERSION 1.9.12 ************ Fix for the bug in KO/Pi What's Next view of version 1.9.11. Bugfix: Licence file is now shown again. OM/Pi now supports Unicode (utf8 charset). Fixed some bugs in OM/Pi. KA/Pi has more German translation. ********** VERSION 1.9.11 ************ Fixed several problems in PWM/Pi, like asking the user, if unsaved changed are pending when closing the app. And PwM/Pi handles now different texts for the fields Description, Username, Password, configurable per category. Fixed a crash in KO/Pi , when importing/loading vcs files which have an entry with an attendee with state: NEEDS ACTION Fixed some problems in the German translation of OM/Pi, which makes some dialogs not fitting on the screen of the Z 5500. Fixed Qtopia crash, when disabling/deinstalling KO/Pi alarm applet. Implemented direct KDE<->KA/Pi sync for KA/Pi running on Linux desktop. Added feature "remove sync info" to sync menu. Tweaked the KO/Pi What's next view a bit, added setting to hide events that are done. Disabled "beam receive enabled" on startup to avoid problems if Fastload is enabled. Please set "beam receive enabled", if you want to receive data via IR. Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running on Linux desktop. Made in KA/Pi scrolling possible, if details view is selected. (The keyboard focus is set automatically to the search line) Fixed a bug in DMT sync, that a new entry in DTM was added on every sync to Kx/Pi. Fixed missing writing of KA/Pi categories to DMT entries when syncing. Fixed a bug in DMT sync with todos created in KO/Pi containing non-latin1 characters. Rearranged package contents of Sharp-ipks and made all packages installable on SD again. diff --git a/bin/kdepim/kopiemail/germantranslation.txt b/bin/kdepim/kopiemail/germantranslation.txt index 1abe14a..5039848 100644 --- a/bin/kdepim/kopiemail/germantranslation.txt +++ b/bin/kdepim/kopiemail/germantranslation.txt @@ -145,103 +145,103 @@ { "Get newsgroup list from server","Hole Newsgroup Liste vom Server" }, { "Filter:","Filter:" }, { "Show subscribed","Zeige abbonnierte" }, { "Groups","NewsGroups" }, { "Configure IMAP","Konfiguriere IMAP" }, { "Use secure sockets:","Benutze sichere Verbindung:" }, { "ssh $SERVER exec","ssh $SERVER exec" }, { "Prefix","Prefix" }, { "Local storage folder:","Lokales Verzeichnis:" }, { "Get only messages smaller","Hole nur Nachrichten kleiner" }, { "kB","kB" }, { "Leave Messages on Server","Belasse Nachrichten auf dem Server" }, { "Configure POP3","Konfiguriere POP3" }, { "ssh $SERVER exec imapd","ssh $SERVER exec imapd" }, { "Configure SMTP","Konfiguriere SMTP" }, { "Name of the SMTP Server","Name des SMTP Servers" }, { "Port of the SMTP Server","Port des SMTP Servers" }, { "Fetching folder list","Hole Verzeichnis Liste" }, { "Fetch ","Hole " }, { "Fetching header list","Hole Titel Liste" }, { "Mailbox has %1 mails","Mailbox hat %1 Mails" }, { "Read this mail","Lies diese Mail" }, { "Move/Copy this mail","Verschiebe/kopiere diese Mail" }, { "Delete this mail","Lösche diese Mail" }, { "Move/Copy all selected mail","Verschiebe/kopiere selektierte Mails" }, { "Delete all selected mails","Lösche alle selektierten Mails" }, { "Clear selection","Selektion aufheben" }, { "Reply","Antworten" }, { "Forward","Weiterleiten" }, { "Attachments","Anhang" }, { "Show Html","Zeige in html" }, { "Description","Beschreibung" }, { "Filename","Dateiname" }, { "E-Mail by %1","E-Mail von %1" }, { "Cc","Kopie" }, { "To","An" }, { "From","Von" }, { "<p>Do you really want to delete this mail? <br><br>","<p>Wollen Sie diese Mail wirklich löschen? <br><br>" }, { "Mailbox has %1 mail(s)","Mailbox hat %1 Mail(s)" }, { "Move/Copie all mails","Verschiebe/kopiere alle Mails" }, { "Delete all mails","Lösche alle Mails" }, { "Create new subfolder","Neues Unterverzeichnis" }, { "Delete folder","Lösche Verzeichnis" }, { "Refresh folder list","Aktualisiere Verzeichnis Liste" }, { "Create new folder","Neues Verzeichnis" }, { "Disconnect","Disconnect" }, { "Set offline","Gehe offline" }, { "Select target box","Wähle Ziel Box" }, { "<b>Store mail(s) to</b>","<b>Speichere Mail(s) nach</b>" }, { "Folder:","Verzeichnis:" }, { "Account:","Zugang:" }, { "Prefix will prepend, do not enter","Pfad-Prefix wird vorangestellt" }, { "Move mail(s)","Verschiebe Mail(s)" }, { "only mails smaller","nur Mails kleiner" }, { " kB"," kB" }, { " message %1 of %2"," Nachricht %1 von %2" }, { "Copying...","Am Kopieren..." }, { "Copy message %1 of %2","Kopiere Nachricht %1 von %2" }, { "Do you really want to delete\nall selected mails?","Wollen Sie wirklich alle\nselektierten Mails Löschen?" }, { "Delete All Mails","Lösche alle Mails" }, { "Deleting ...","Am Löschen..." }, { "Delete message %1 of %2","Lösche Nachricht %1 von %2" }, { "Compose Message","Verfasse Nachricht" }, { "Reply-To","Antwort-An" }, { "BCC","BCC" }, { "Signature","Signatur" }, { "CC","Kopie" }, { "Options","Optionen" }, { "Delete File","Lösche Datei" }, { "Add File","Füge Datei hinzu" }, { "Attachment","Anhang" }, { "send later","sende später" }, { "use:","via:" }, { "Save","Speichern" }, { "Name","Name" }, { "No Receiver spezified","Kein Empfänger angegeben" }, { "Sending mail","Sende Mail" }, { "No","Nein" }, { "Yes","Ja" }, { "Store message into drafts?\n","Speichere Nachricht in Entwürfe?\n" }, { "Store message?","Nachricht speichern?" }, { "Select Type","Selektiere Typ" }, { "Select Account Type","Wähle Art des Zugangs" }, { "IMAP","IMAP (online lesen)" }, { "POP3","POP3 (holen)" }, { "SMTP","SMTP (senden)" }, { "<p>Do you really want to delete the selected Account?</p>","<p>Möchten Sie wirklich den ausgewählten Account löschen?</p>" }, { "Question","Eine Frage..." }, { "Send this message?","Nachricht wirklich senden?" }, { "Stop editing message","Stop editing message" }, { "Sending mail %1 of %2","Sende Mail %1 von %2" }, { "%1 of %2 bytes send","%1 von %2 Bytes gesendet" }, { "Refresh header list","Aktualisiere Titel Liste" }, { "Define a smtp\n account first!\n","Bitte zuerst einen\nSMTP Account anlegen!\n" }, { "Mail queue flushed","Gespeicherte Mails gesendet!" }, { "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n","Bitte legen Sie einen\nSMTP Account an.\nDer SMTP Account wird\nfür das Versenden von\nMails benötigt!" }, -{ "","" }, -{ "","" }, +{ "Show next mail","Zeige nächste Mail" }, +{ "End of List","Ende der Liste" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index c20c7ce..ec192ea 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp @@ -206,206 +206,222 @@ void OpieMail::slotSendQueued() selsmtp.showMaximized(); #endif if ( selsmtp.exec() == QDialog::Accepted ) { smtp = selsmtp.selected_smtp(); } } if (smtp) { Global::statusMessage("Sending mails...!"); SMTPwrapper * wrap = new SMTPwrapper(smtp); if ( wrap->flushOutbox() ) { Global::statusMessage("Mails sent!"); } delete wrap; } // pending refresh list view, if outgoing is displayed } void OpieMail::slotSearchMails() { qDebug("OpieMail::slotSearchMails():not implemented "); } void OpieMail::slotEditSettings() { KOPrefsDialog settingsDialog( this, "koprefs", true ); #ifndef DESKTOP_VERSION settingsDialog.showMaximized(); #endif settingsDialog.exec(); slotSetCodec( KOPrefs::instance()->mCurrentCodec ); // KApplication::execDialog(settingsDialog); } void OpieMail::slotEditAccounts() { EditAccounts eaDialog( settings, this, 0, true ); eaDialog.slotAdjustColumns(); #ifndef DESKTOP_VERSION eaDialog.showMaximized(); #endif eaDialog.exec(); if ( settings ) delete settings; settings = new Settings(); folderView->populate( settings->getAccounts() ); } void OpieMail::replyMail() { QListViewItem*item = mailView->currentItem(); if (!item) return; RecMailP mail = ((MailListViewItem*)item)->data(); RecBodyP body = folderView->fetchBody(mail); QString rtext; rtext += QString("* %1 wrote on %2:\n") // no i18n on purpose .arg( mail->getFrom()) .arg( mail->getDate()); QString text = body->Bodytext(); QStringList lines = QStringList::split(QRegExp("\\n"), text); QStringList::Iterator it; for (it = lines.begin(); it != lines.end(); it++) { rtext += "> " + *it + "\n"; } rtext += "\n"; QString prefix; if ( mail->getSubject().find(QRegExp("^Re: .*$")) != -1) prefix = ""; else prefix = "Re: "; // no i18n on purpose Settings *settings = new Settings(); ComposeMail composer( settings ,this, 0, true); if (mail->Replyto().isEmpty()) { composer.setTo( mail->getFrom()); } else { composer.setTo( mail->Replyto()); } composer.setSubject( prefix + mail->getSubject()); composer.setMessage( rtext ); composer.setInReplyTo( mail->Msgid()); composer.setCharset( body->getCharset() ); if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) { mail->Wrapper()->answeredMail(mail); } delete settings; } +void OpieMail::displayNextMail(ViewMail * vm) +{ + QListViewItem*item = mailView->currentItem(); + if (!item) return; + item = item->itemBelow(); + if (!item) { + vm->setCaption(i18n("End of List" )); + return; + } + mailView->setCurrentItem(item); + RecMailP mail = ((MailListViewItem*)item)->data(); + RecBodyP body = folderView->fetchBody(mail); + vm->setBody( body ); + vm->setMail( mail ); +} void OpieMail::displayMail() { QListViewItem*item = mailView->currentItem(); if (!item) return; RecMailP mail = ((MailListViewItem*)item)->data(); RecBodyP body = folderView->fetchBody(mail); ViewMail readMail( this,"", Qt::WType_Modal ); readMail.setBody( body ); readMail.setMail( mail ); #ifndef DESKTOP_VERSION readMail.showMaximized(); #else readMail.resize( 640, 480); #endif + connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) ); readMail.exec(); if ( readMail.deleted ) { folderView->refreshCurrent(); } else { ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); } } void OpieMail::slotGetAllMail() { QListViewItem * item = folderView->firstChild(); while ( item ){ ((AccountViewItem *)item)->contextMenuSelected( 101 ); item = item->nextSibling (); } } void OpieMail::slotGetMail() { QListViewItem * item = folderView->currentItem(); if ( ! item ) return; ((AccountViewItem *)item)->contextMenuSelected( 101 ); } void OpieMail::slotDeleteMail() { if (!mailView->currentItem()) return; RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { mail->Wrapper()->deleteMail( mail ); folderView->refreshCurrent(); } } void OpieMail::slotDeleteAllMail() { QValueList<RecMailP> t; if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); while ( item ) { if ( item->isSelected() ) { t.append( item->data() ); } item = (MailListViewItem*)item->nextSibling(); } } else return; if ( t.count() == 0 ) return; RecMailP mail = t.first(); mail->Wrapper()->deleteMailList(t); folderView->refreshCurrent(); } void OpieMail::clearSelection() { mailView->clearSelection(); } void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) { if (!mailView->currentItem()) return; MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); /* just the RIGHT button - or hold on pda */ if (button!=2) {return;} if (!item) return; QPopupMenu *m = new QPopupMenu(0); if (m) { if (mailtype==MAILLIB::A_NNTP) { m->insertItem(i18n("Read this posting"),this,SLOT(displayMail())); m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail())); m->insertSeparator(); m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail())); m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); } else { if (folderView->currentisDraft()) { m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail())); } m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail())); m->insertSeparator(); m->insertItem(i18n("Read this mail"),this,SLOT(displayMail())); m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); m->insertSeparator(); m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); } m->setFocus(); diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h index 44ab1ec..30968a7 100644 --- a/kmicromail/opiemail.h +++ b/kmicromail/opiemail.h @@ -1,56 +1,58 @@ // CHANGED 2004-09-31 Lutz Rogowski #ifndef OPIEMAIL_H #define OPIEMAIL_H #include "mainwindow.h" #include <libmailwrapper/settings.h> #include <opie2/osmartpointer.h> #include <libmailwrapper/mailtypes.h> +#include <viewmail.h> class OpieMail : public MainWindow { Q_OBJECT public: OpieMail( QWidget *parent = 0, const char *name = 0 ); virtual ~OpieMail(); static QString appName() { return QString::fromLatin1("kopiemail"); } public slots: virtual void slotwriteMail(const QString&name,const QString&email); virtual void slotwriteMail2(const QString&nameemail); virtual void slotComposeMail(); virtual void slotExtAppHandler(); virtual void appMessage(const QCString &msg, const QByteArray &data); virtual void message(const QCString &msg, const QByteArray &data); protected slots: + virtual void displayNextMail(ViewMail * vm); virtual void slotSendQueued(); virtual void slotSearchMails(); virtual void slotEditSettings(); virtual void slotEditAccounts(); virtual void displayMail(); virtual void replyMail(); virtual void slotDeleteMail(); virtual void slotGetMail(); virtual void slotGetAllMail(); virtual void slotDeleteAllMail(); virtual void mailHold(int, QListViewItem *,const QPoint&,int); virtual void slotShowFolders( bool show ); virtual void refreshMailView(const QValueList<RecMailP>&); virtual void mailLeftClicked( QListViewItem * ); virtual void slotMoveCopyMail(); virtual void slotMoveCopyAllMail(); virtual void reEditMail(); void clearSelection(); private: QString mPendingEmail; QString mPendingName; QByteArray mPendingData; QCString mPendingMessage; Settings *settings; }; #endif diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp index 3bd6f41..60c764c 100644 --- a/kmicromail/viewmail.cpp +++ b/kmicromail/viewmail.cpp @@ -232,193 +232,194 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int menu->insertItem( i18n( "Save Attachment" ), 0 ); menu->insertSeparator(1); ret = menu->exec( point, 0 ); switch(ret) { case 0: { //MimeTypes types; //types.insert( "all", "*" ); QString str = KFileDialog::getSaveFileName( "/", item->text( 2 ), this ); if( !str.isEmpty() ) { encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ); if (content) { QFile output(str); output.open(IO_WriteOnly); output.writeBlock(content->Content(),content->Length()); output.close(); delete content; } } } break ; case 2: { #ifdef DESKTOP_VERSION QString tmpfile = locateLocal( "tmp", "opiemail-image"); #else QString tmpfile = "/tmp/opiemail-image"; #endif encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ); if (content) { QFile output(tmpfile); output.open(IO_WriteOnly); output.writeBlock(content->Content(),content->Length()); output.close(); delete content; MailImageDlg iview(""); iview.setName(tmpfile); KApplication::execDialog(&iview); output.remove(); } } break; case 1: if ( ( ( AttachItem* )item )->Partnumber() == -1 ) { setText(); } else { if ( m_recMail->Wrapper() != 0l ) { // 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() ] ) ); } } break; } delete menu; } void ViewMail::setMail(const RecMailP&mail ) { m_recMail = mail; m_mail[0] = mail->getFrom(); m_mail[1] = mail->getSubject(); m_mail[3] = mail->getDate(); m_mail[4] = mail->Msgid(); m_mail2[0] = mail->To(); m_mail2[1] = mail->CC(); m_mail2[2] = mail->Bcc(); setText(); } ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) : ViewMailBase(parent, name, fl), _inLoop(false) { m_gotBody = false; deleted = false; connect( reply, SIGNAL(activated()), SLOT(slotReply())); connect( forward, SIGNAL(activated()), SLOT(slotForward())); connect( deleteMail, SIGNAL( activated() ), SLOT( slotDeleteMail() ) ); connect( showHtml, SIGNAL( toggled(bool) ), SLOT( slotShowHtml(bool) ) ); - connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); + connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); + connect( nextMail, SIGNAL( activated() ), SLOT( slotNextMail() ) ); attachments->setEnabled(m_gotBody); connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) ); readConfig(); attachments->setSorting(-1); } void ViewMail::readConfig() { setFont ( KOPrefs::instance()->mReadFont ); m_showHtml = KOPrefs::instance()->mViewAsHtml; showHtml->setOn( m_showHtml ); } void ViewMail::setText() { QString toString; QString ccString; QString bccString; toString = m_mail2[0].join(","); ccString = m_mail2[1].join(","); bccString = m_mail2[2].join(","); setCaption( i18n("E-Mail by %1").arg( m_mail[0] ) ); m_mailHtml = "<html><body>" "<table width=\"100%\" border=\"0\"><tr bgcolor=\"#FFDD76\"><td>" "<div align=left><b>" + deHtml( m_mail[1] ) + "</b></div>" "</td></tr><tr bgcolor=\"#EEEEE6\"><td>" "<b>" + i18n( "From" ) + ": </b><font color=#6C86C0>" + deHtml( m_mail[0] ) + "</font><br>" "<b>" + i18n( "To" ) + ": </b><font color=#6C86C0>" + deHtml( toString ) + "</font><br><b>" + i18n( "Cc" ) + ": </b>" + deHtml( ccString ) + "<br>" "<b>" + i18n( "Date" ) + ": </b> " + m_mail[3] + "</td></tr></table><font>"; if ( !m_showHtml ) { browser->setText( QString( m_mailHtml) + deHtml( m_mail[2] ) + "</font></html>" ); } else { browser->setText( QString( m_mailHtml) + m_mail[2] + "</font></html>" ); } // remove later in favor of a real handling m_gotBody = true; } ViewMail::~ViewMail() { m_recMail->Wrapper()->cleanMimeCache(); hide(); } void ViewMail::hide() { QWidget::hide(); if (_inLoop) { _inLoop = false; qApp->exit_loop(); } } void ViewMail::exec() { show(); if (!_inLoop) { _inLoop = true; qApp->enter_loop(); } } QString ViewMail::deHtml(const QString &string) { QString string_ = string; string_.replace(QRegExp("&"), "&"); string_.replace(QRegExp("<"), "<"); string_.replace(QRegExp(">"), ">"); string_.replace(QRegExp("\\n"), "<br>"); return string_; } void ViewMail::slotReply() diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h index 194ac8e..c2c2ce3 100644 --- a/kmicromail/viewmail.h +++ b/kmicromail/viewmail.h @@ -1,86 +1,88 @@ #ifndef VIEWMAIL_H #define VIEWMAIL_H #include "viewmailbase.h" #include <libmailwrapper/mailtypes.h> #include <qdialog.h> #include <qlistview.h> #include <qmap.h> #include <qstringlist.h> #include <qvaluelist.h> //namespace Opie { namespace MM { class OImageScrollView; } } class AttachItem : public QListViewItem { public: AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, const QString&fsize,int num,const QValueList<int>&path); AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, const QString&fsize,int num,const QValueList<int>&path); int Partnumber() { return _partNum; } bool isParentof(const QValueList<int>&path); private: int _partNum; /* needed for a better display of attachments */ QValueList<int> _path; }; class ViewMail : public ViewMailBase { Q_OBJECT public: ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0); ~ViewMail(); void hide(); void exec(); void setMail(const RecMailP&mail ); void setBody(const RecBodyP&body); bool deleted; - + signals: + void showNextMail(ViewMail*); protected: QString deHtml(const QString &string); AttachItem* searchParent(const QValueList<int>&path); AttachItem* lastChild(AttachItem*parent); protected slots: + void slotNextMail() { emit showNextMail(this); }; void slotReply(); void slotForward(); void setText(); void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); void slotDeleteMail( ); void slotShowHtml( bool ); private: void readConfig(); bool _inLoop; QString m_mailHtml; bool m_gotBody; RecBodyP m_body; RecMailP m_recMail; bool m_showHtml; // 0 from 1 subject 2 bodytext 3 date QMap <int,QString> m_mail; // 0 to 1 cc 2 bcc QMap <int,QStringList> m_mail2; }; class MailImageDlg:public QDialog { Q_OBJECT public: MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); ~MailImageDlg(); void setName(const QString&); protected: //Opie::MM::OImageScrollView*m_imageview; }; #endif diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp index 3d7ed42..c4731a7 100644 --- a/kmicromail/viewmailbase.cpp +++ b/kmicromail/viewmailbase.cpp @@ -1,93 +1,104 @@ // CHANGED 2004-08-06 Lutz Rogowski #include <qtextbrowser.h> #include <qlistview.h> #include <qaction.h> #include <qlabel.h> #include <qvbox.h> #include <qtoolbar.h> #include <qmenubar.h> #include <kiconloader.h> //#include <qpe/resource.h> #include <klocale.h> #include "viewmailbase.h" //#include "opendiag.h" ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) : QMainWindow(parent, name, fl) { setToolBarsMovable(false); toolbar = new QToolBar(this); menubar = new QMenuBar( toolbar ); mailmenu = new QPopupMenu( menubar ); menubar->insertItem( i18n( "Mail" ), mailmenu ); toolbar->setHorizontalStretchable(true); addToolBar(toolbar); reply = new QAction(i18n("Reply"),SmallIcon("reply"), 0, 0, this); reply->addTo(toolbar); reply->addTo(mailmenu); forward = new QAction(i18n("Forward"),SmallIcon("forward"), 0, 0, this); forward->addTo(toolbar); forward->addTo(mailmenu); attachbutton = new QAction(i18n("Attachments"),SmallIcon("attach"), 0, 0, this, 0, true); attachbutton->addTo(toolbar); attachbutton->addTo(mailmenu); connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); showHtml = new QAction( i18n( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true ); showHtml->addTo( toolbar ); showHtml->addTo( mailmenu ); deleteMail = new QAction(i18n("Delete Mail"),SmallIcon("trash"), 0, 0, this); deleteMail->addTo(toolbar); deleteMail->addTo(mailmenu); - closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); + + + + nextMail = new QAction(i18n("Show next mail"),SmallIcon("add"), 0, 0, this); QLabel *spacer = new QLabel(toolbar); + nextMail->addTo(toolbar); + nextMail->addTo(mailmenu); + + + + + closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); + //QLabel *spacer = new QLabel(toolbar); spacer->setBackgroundMode(QWidget::PaletteButton); toolbar->setStretchableWidget(spacer); closeMail->addTo(toolbar); closeMail->addTo(mailmenu); QVBox *view = new QVBox(this); setCentralWidget(view); attachments = new QListView(view); attachments->setMinimumHeight(90); attachments->setMaximumHeight(90); attachments->setAllColumnsShowFocus(true); attachments->addColumn("Mime Type", 60); attachments->addColumn(i18n("Description"), 100); attachments->addColumn(i18n("Filename"), 80); attachments->addColumn(i18n("Size"), 80); attachments->setSorting(-1); attachments->hide(); browser = new QTextBrowser(view); // openDiag = new OpenDiag(view); // openDiag->hide(); } void ViewMailBase::slotChangeAttachview(bool state) { if (state) attachments->show(); else attachments->hide(); } void ViewMailBase::keyPressEvent ( QKeyEvent * e ) { if( e->key()==Qt::Key_Escape ) { close(); e->accept(); return; } QWidget::keyPressEvent(e); } diff --git a/kmicromail/viewmailbase.h b/kmicromail/viewmailbase.h index 1c8948a..c97e9e3 100644 --- a/kmicromail/viewmailbase.h +++ b/kmicromail/viewmailbase.h @@ -1,39 +1,39 @@ // CHANGED 2004-08-06 Lutz Rogowski #ifndef VIEWMAILBASE_H #define VIEWMAILBASE_H #include <qmainwindow.h> class QAction; class OpenDiag; class QListView; class QToolBar; class QTextBrowser; class QMenuBar; class QPopupMenu; class ViewMailBase : public QMainWindow { Q_OBJECT public: ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); protected: - QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail; + QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail, *nextMail; QListView *attachments; QToolBar *toolbar; QTextBrowser *browser; OpenDiag *openDiag; QMenuBar *menubar; - QPopupMenu *mailmenu; + QPopupMenu *mailmenu; protected slots: void slotChangeAttachview(bool state); virtual void keyPressEvent ( QKeyEvent * e ); }; #endif |