-rw-r--r-- | bin/kdepim/kopiemail/germantranslation.txt | 11 | ||||
-rw-r--r-- | kmicromail/accountitem.cpp | 4 | ||||
-rw-r--r-- | kmicromail/accountview.cpp | 15 | ||||
-rw-r--r-- | kmicromail/mainwindow.cpp | 24 | ||||
-rw-r--r-- | kmicromail/mainwindow.h | 1 | ||||
-rw-r--r-- | kmicromail/opiemail.cpp | 4 |
6 files changed, 49 insertions, 10 deletions
diff --git a/bin/kdepim/kopiemail/germantranslation.txt b/bin/kdepim/kopiemail/germantranslation.txt index 14e5c0b..f8fd0a8 100644 --- a/bin/kdepim/kopiemail/germantranslation.txt +++ b/bin/kdepim/kopiemail/germantranslation.txt | |||
@@ -216,67 +216,76 @@ | |||
216 | { "send later","sende später" }, | 216 | { "send later","sende später" }, |
217 | { "use:","via:" }, | 217 | { "use:","via:" }, |
218 | { "Save","Speichern" }, | 218 | { "Save","Speichern" }, |
219 | { "Name","Name" }, | 219 | { "Name","Name" }, |
220 | { "No Receiver spezified","Kein Empfänger angegeben" }, | 220 | { "No Receiver spezified","Kein Empfänger angegeben" }, |
221 | { "Sending mail","Sende Mail" }, | 221 | { "Sending mail","Sende Mail" }, |
222 | { "No","Nein" }, | 222 | { "No","Nein" }, |
223 | { "Yes","Ja" }, | 223 | { "Yes","Ja" }, |
224 | { "Store message into drafts?\n","Speichere Nachricht in Entwürfe?\n" }, | 224 | { "Store message into drafts?\n","Speichere Nachricht in Entwürfe?\n" }, |
225 | { "Store message?","Nachricht speichern?" }, | 225 | { "Store message?","Nachricht speichern?" }, |
226 | { "Select Type","Selektiere Typ" }, | 226 | { "Select Type","Selektiere Typ" }, |
227 | { "Select Account Type","Wähle Art des Zugangs" }, | 227 | { "Select Account Type","Wähle Art des Zugangs" }, |
228 | { "IMAP","IMAP (online lesen)" }, | 228 | { "IMAP","IMAP (online lesen)" }, |
229 | { "POP3","POP3 (holen)" }, | 229 | { "POP3","POP3 (holen)" }, |
230 | { "SMTP","SMTP (senden)" }, | 230 | { "SMTP","SMTP (senden)" }, |
231 | { "<p>Do you really want to delete the selected Account?</p>","<p>Möchten Sie wirklich den ausgewählten Account löschen?</p>" }, | 231 | { "<p>Do you really want to delete the selected Account?</p>","<p>Möchten Sie wirklich den ausgewählten Account löschen?</p>" }, |
232 | { "Question","Eine Frage..." }, | 232 | { "Question","Eine Frage..." }, |
233 | { "Send this message?","Nachricht wirklich senden?" }, | 233 | { "Send this message?","Nachricht wirklich senden?" }, |
234 | { "Stop editing message","Stop editing message" }, | 234 | { "Stop editing message","Stop editing message" }, |
235 | { "Sending mail %1 of %2","Sende Mail %1 von %2" }, | 235 | { "Sending mail %1 of %2","Sende Mail %1 von %2" }, |
236 | { "%1 of %2 bytes send","%1 von %2 Bytes gesendet" }, | 236 | { "%1 of %2 bytes send","%1 von %2 Bytes gesendet" }, |
237 | { "Refresh header list","Aktualisiere Titel Liste" }, | 237 | { "Refresh header list","Aktualisiere Titel Liste" }, |
238 | { "Define a smtp\n account first!\n","Bitte zuerst einen\nSMTP Account anlegen!\n" }, | 238 | { "Define a smtp\n account first!\n","Bitte zuerst einen\nSMTP Account anlegen!\n" }, |
239 | { "Mail queue flushed","Gespeicherte Mails gesendet!" }, | 239 | { "Mail queue flushed","Gespeicherte Mails gesendet!" }, |
240 | { "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!" }, | 240 | { "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!" }, |
241 | { "Show next mail","Zeige nächste Mail" }, | 241 | { "Show next mail","Zeige nächste Mail" }, |
242 | { "End of List","Ende der Liste" }, | 242 | { "End of List","Ende der Liste" }, |
243 | { "Language","Sprache" }, | 243 | { "Language","Sprache" }, |
244 | { "Time Format","Zeit Format" }, | 244 | { "Time Format","Zeit Format" }, |
245 | { "%1 groups subscribed","%1 Guppen abboniert" }, | 245 | { "%1 groups subscribed","%1 Guppen abboniert" }, |
246 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, | 246 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, |
247 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 247 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
248 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 248 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
249 | { "Save settings","Speichere Einstellungen" }, | 249 | { "Save settings","Speichere Einstellungen" }, |
250 | { "Save standard","Speichere Standard" }, | 250 | { "Save standard","Speichere Standard" }, |
251 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 251 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
252 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 252 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
253 | { "Data storage path","Daten Speicherpfad" }, | 253 | { "Data storage path","Daten Speicherpfad" }, |
254 | { "userdefined","benutzerdefiniert" }, | 254 | { "userdefined","benutzerdefiniert" }, |
255 | { "Reply to this mail","Beantworte diese Mail" }, | 255 | { "Reply to this mail","Beantworte diese Mail" }, |
256 | { "Su:","Be:" }, | 256 | { "Su:","Be:" }, |
257 | { "Fr:","Vo:" }, | 257 | { "Fr:","Vo:" }, |
258 | { "To:","An:" }, | 258 | { "To:","An:" }, |
259 | { "Download Mail","Mail runterladen" }, | 259 | { "Download Mail","Mail runterladen" }, |
260 | { "View Source","Zeige Source" }, | 260 | { "View Source","Zeige Source" }, |
261 | { "Show "To" field in list view","Zeige "An" Feld in Listenansicht" }, | 261 | { "Show "To" field in list view","Zeige "An" Feld in Listenansicht" }, |
262 | { "Show info fields at startup","Zeige Info Felder beim Start" }, | 262 | { "Show info fields at startup","Zeige Info Felder beim Start" }, |
263 | { "Show "Subject" info field","Zeige "Betreff" Info Feld" }, | 263 | { "Show "Subject" info field","Zeige "Betreff" Info Feld" }, |
264 | { "Show "From" info field","Zeige "Von" Info Feld" }, | 264 | { "Show "From" info field","Zeige "Von" Info Feld" }, |
265 | { "Show "To" info field","Zeige "An" Info Feld" }, | 265 | { "Show "To" info field","Zeige "An" Info Feld" }, |
266 | { "Mail saved as draft!","Mail als Entwurf gespeichert!" }, | 266 | { "Mail saved as draft!","Mail als Entwurf gespeichert!" }, |
267 | { "Save signature","Speichere Signatur" }, | 267 | { "Save signature","Speichere Signatur" }, |
268 | { "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically.","Beim lokalen Verzeichnis\nsind keine Pfade erlaubt.\nBitte Verzeichnisnamen\nangeben oder leer lassen\num automatisch ein lokales\nVerzeichnis mit dem\nZugangsnamen anzulegen." }, | 268 | { "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically.","Beim lokalen Verzeichnis\nsind keine Pfade erlaubt.\nBitte Verzeichnisnamen\nangeben oder leer lassen\num automatisch ein lokales\nVerzeichnis mit dem\nZugangsnamen anzulegen." }, |
269 | { "Do you really want to\nsend all queued mails?","Möchten sie wirklich\nalle Mails im\nOutgoing-Ordner\nsenden?" }, | 269 | { "Do you really want to\nsend all queued mails?","Möchten sie wirklich\nalle Mails im\nOutgoing-Ordner\nsenden?" }, |
270 | { "Sending all mails","Senden aller Mails" }, | 270 | { "Sending all mails","Senden aller Mails" }, |
271 | { "SMTP Account:","SMTP Zugang:" }, | 271 | { "SMTP Account:","SMTP Zugang:" }, |
272 | { "Select SMTP Account","Wähle SMTP Zugang" }, | 272 | { "Select SMTP Account","Wähle SMTP Zugang" }, |
273 | { "Error sending mail:\n%1","Fehler beim Mailversand:\n%1\nHaben Sie vergessen\ndie Post ausreichend\nzu frankieren? ;-)" }, | 273 | { "Error sending mail:\n%1","Fehler beim Mailversand:\n%1\nHaben Sie vergessen\ndie Post ausreichend\nzu frankieren? ;-)" }, |
274 | { "Error sending mail","Fehler beim Mailversand" }, | 274 | { "Error sending mail","Fehler beim Mailversand" }, |
275 | { "Error sending queued mail.\nBreaking.","Fehler beim Mailversand.\nAbbruch." }, | 275 | { "Error sending queued mail.\nBreaking.","Fehler beim Mailversand.\nAbbruch." }, |
276 | { "Colors","Farben" }, | 276 | { "Colors","Farben" }, |
277 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, | 277 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, |
278 | { "Configure OM/Pi...","Konfiguriere OM/Pi..." }, | 278 | { "Configure OM/Pi...","Konfiguriere OM/Pi..." }, |
279 | { "Global Settings...","Globale Einstellungen..." }, | 279 | { "Global Settings...","Globale Einstellungen..." }, |
280 | { " Local Mailfolders"," Lokale Mailordner" }, | ||
281 | { "Refreshing %1 ... please wait","Lese %1 neu ein ... bitte warten" }, | ||
282 | { "Refresh\n%1\n?","%1\nneu einlesen?" }, | ||
283 | { "Refresh","Neu einlesen" }, | ||
284 | { "Select all","Selektiere alle" }, | ||
285 | { "","" }, | ||
286 | { "","" }, | ||
287 | { "","" }, | ||
288 | { "","" }, | ||
289 | { "","" }, | ||
280 | { "","" }, | 290 | { "","" }, |
281 | { "","" }, | 291 | { "","" }, |
282 | { "","" }, \ No newline at end of file | ||
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp index fcb2052..985a762 100644 --- a/kmicromail/accountitem.cpp +++ b/kmicromail/accountitem.cpp | |||
@@ -722,131 +722,131 @@ void IMAPfolderItem::deleteFolder() | |||
722 | if (imap->getWrapper()->deleteMbox(folder)) | 722 | if (imap->getWrapper()->deleteMbox(folder)) |
723 | { | 723 | { |
724 | QListView*v=listView(); | 724 | QListView*v=listView(); |
725 | IMAPviewItem * box = imap; | 725 | IMAPviewItem * box = imap; |
726 | /* be carefull - after that this object is destroyd so don't use | 726 | /* be carefull - after that this object is destroyd so don't use |
727 | * any member of it after that call!!*/ | 727 | * any member of it after that call!!*/ |
728 | imap->refreshFolders(true); | 728 | imap->refreshFolders(true); |
729 | if (v) | 729 | if (v) |
730 | { | 730 | { |
731 | v->setSelected(box,true); | 731 | v->setSelected(box,true); |
732 | } | 732 | } |
733 | } | 733 | } |
734 | } | 734 | } |
735 | } | 735 | } |
736 | 736 | ||
737 | void IMAPfolderItem::downloadMails() | 737 | void IMAPfolderItem::downloadMails() |
738 | { | 738 | { |
739 | AccountView*bl = imap->accountView(); | 739 | AccountView*bl = imap->accountView(); |
740 | if (!bl) return; | 740 | if (!bl) return; |
741 | bl->downloadMails(folder,imap->getWrapper()); | 741 | bl->downloadMails(folder,imap->getWrapper()); |
742 | } | 742 | } |
743 | 743 | ||
744 | void IMAPfolderItem::contextMenuSelected(int id) | 744 | void IMAPfolderItem::contextMenuSelected(int id) |
745 | { | 745 | { |
746 | 746 | ||
747 | AccountView * view = (AccountView*)listView(); | 747 | AccountView * view = (AccountView*)listView(); |
748 | switch(id) | 748 | switch(id) |
749 | { | 749 | { |
750 | case 0: | 750 | case 0: |
751 | view->refreshCurrent(); | 751 | view->refreshCurrent(); |
752 | break; | 752 | break; |
753 | case 1: | 753 | case 1: |
754 | deleteAllMail(imap->getWrapper(),folder); | 754 | deleteAllMail(imap->getWrapper(),folder); |
755 | break; | 755 | break; |
756 | case 2: | 756 | case 2: |
757 | createNewFolder(); | 757 | createNewFolder(); |
758 | break; | 758 | break; |
759 | case 3: | 759 | case 3: |
760 | deleteFolder(); | 760 | deleteFolder(); |
761 | break; | 761 | break; |
762 | case 4: | 762 | case 4: |
763 | downloadMails(); | 763 | downloadMails(); |
764 | break; | 764 | break; |
765 | case GET_NEW_MAILS: // daunlood | 765 | case GET_NEW_MAILS: // daunlood |
766 | { | 766 | { |
767 | if (!view) return; | 767 | if (!view) return; |
768 | view->downloadMailsInbox(getFolder(),imap->getWrapper()); | 768 | view->downloadMailsInbox(getFolder(),imap->getWrapper()); |
769 | } | 769 | } |
770 | break; | 770 | break; |
771 | default: | 771 | default: |
772 | break; | 772 | break; |
773 | } | 773 | } |
774 | } | 774 | } |
775 | 775 | ||
776 | /** | 776 | /** |
777 | * MH Account stuff | 777 | * MH Account stuff |
778 | */ | 778 | */ |
779 | /* MH is a little bit different - the top folder can contains messages other than in IMAP and | 779 | /* MH is a little bit different - the top folder can contains messages other than in IMAP and |
780 | POP3 and MBOX */ | 780 | POP3 and MBOX */ |
781 | MHviewItem::MHviewItem( const QString&aPath, AccountView *parent ) | 781 | MHviewItem::MHviewItem( const QString&aPath, AccountView *parent ) |
782 | : AccountViewItem( parent ) | 782 | : AccountViewItem( parent ) |
783 | { | 783 | { |
784 | m_Path = aPath; | 784 | m_Path = aPath; |
785 | /* be carefull - the space within settext is wanted - thats why the string twice */ | 785 | /* be carefull - the space within settext is wanted - thats why the string twice */ |
786 | wrapper = AbstractMail::getWrapper( m_Path,"Local Folders"); | 786 | wrapper = AbstractMail::getWrapper( m_Path,"Local Mailfolders"); |
787 | setPixmap( 0, PIXMAP_LOCALFOLDER ); | 787 | setPixmap( 0, PIXMAP_LOCALFOLDER ); |
788 | setText( 0, " Local Folders" ); | 788 | setText( 0, i18n(" Local Mailfolders") ); |
789 | setOpen( true ); | 789 | setOpen( true ); |
790 | folder = 0; | 790 | folder = 0; |
791 | } | 791 | } |
792 | 792 | ||
793 | MHviewItem::~MHviewItem() | 793 | MHviewItem::~MHviewItem() |
794 | { | 794 | { |
795 | delete wrapper; | 795 | delete wrapper; |
796 | } | 796 | } |
797 | 797 | ||
798 | AbstractMail *MHviewItem::getWrapper() | 798 | AbstractMail *MHviewItem::getWrapper() |
799 | { | 799 | { |
800 | return wrapper; | 800 | return wrapper; |
801 | } | 801 | } |
802 | 802 | ||
803 | void MHviewItem::refresh( QValueList<RecMailP> & target) | 803 | void MHviewItem::refresh( QValueList<RecMailP> & target) |
804 | { | 804 | { |
805 | refresh(false); | 805 | refresh(false); |
806 | getWrapper()->listMessages( "",target ); | 806 | getWrapper()->listMessages( "",target ); |
807 | } | 807 | } |
808 | 808 | ||
809 | void MHviewItem::refresh(bool force) | 809 | void MHviewItem::refresh(bool force) |
810 | { | 810 | { |
811 | if (childCount()>0 && force==false) return; | 811 | if (childCount()>0 && force==false) return; |
812 | removeChilds(); | 812 | removeChilds(); |
813 | currentFolders.clear(); | 813 | currentFolders.clear(); |
814 | QValueList<FolderP> *folders = wrapper->listFolders(); | 814 | QValueList<FolderP> *folders = wrapper->listFolders(); |
815 | QValueList<FolderP>::ConstIterator it; | 815 | QValueList<FolderP>::ConstIterator it; |
816 | MHfolderItem*item = 0; | 816 | MHfolderItem*item = 0; |
817 | MHfolderItem*pmaster = 0; | 817 | MHfolderItem*pmaster = 0; |
818 | QString fname = ""; | 818 | QString fname = ""; |
819 | int pos; | 819 | int pos; |
820 | for ( it = folders->begin(); it!=folders->end(); ++it) | 820 | for ( it = folders->begin(); it!=folders->end(); ++it) |
821 | { | 821 | { |
822 | fname = (*it)->getDisplayName(); | 822 | fname = (*it)->getDisplayName(); |
823 | /* this folder itself */ | 823 | /* this folder itself */ |
824 | if (fname=="/") | 824 | if (fname=="/") |
825 | { | 825 | { |
826 | currentFolders.append(fname); | 826 | currentFolders.append(fname); |
827 | folder = (*it); | 827 | folder = (*it); |
828 | continue; | 828 | continue; |
829 | } | 829 | } |
830 | currentFolders.append(fname); | 830 | currentFolders.append(fname); |
831 | pos = fname.findRev("/"); | 831 | pos = fname.findRev("/"); |
832 | if (pos > 0) | 832 | if (pos > 0) |
833 | { | 833 | { |
834 | fname = fname.left(pos); | 834 | fname = fname.left(pos); |
835 | pmaster = (MHfolderItem*)findSubItem(fname); | 835 | pmaster = (MHfolderItem*)findSubItem(fname); |
836 | } | 836 | } |
837 | else | 837 | else |
838 | { | 838 | { |
839 | pmaster = 0; | 839 | pmaster = 0; |
840 | } | 840 | } |
841 | if (pmaster) | 841 | if (pmaster) |
842 | { | 842 | { |
843 | item = new MHfolderItem( (*it), pmaster, item, this ); | 843 | item = new MHfolderItem( (*it), pmaster, item, this ); |
844 | } | 844 | } |
845 | else | 845 | else |
846 | { | 846 | { |
847 | item = new MHfolderItem( (*it), this , item ); | 847 | item = new MHfolderItem( (*it), this , item ); |
848 | } | 848 | } |
849 | item->setSelectable((*it)->may_select()); | 849 | item->setSelectable((*it)->may_select()); |
850 | } | 850 | } |
851 | delete folders; | 851 | delete folders; |
852 | } | 852 | } |
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp index cef55ab..4879d57 100644 --- a/kmicromail/accountview.cpp +++ b/kmicromail/accountview.cpp | |||
@@ -36,133 +36,144 @@ AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | AccountView::~AccountView() | 38 | AccountView::~AccountView() |
39 | { | 39 | { |
40 | imapAccounts.clear(); | 40 | imapAccounts.clear(); |
41 | mhAccounts.clear(); | 41 | mhAccounts.clear(); |
42 | } | 42 | } |
43 | 43 | ||
44 | void AccountView::slotContextMenu(int id) | 44 | void AccountView::slotContextMenu(int id) |
45 | { | 45 | { |
46 | AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); | 46 | AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); |
47 | if (!view) return; | 47 | if (!view) return; |
48 | view->contextMenuSelected(id); | 48 | view->contextMenuSelected(id); |
49 | } | 49 | } |
50 | 50 | ||
51 | void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int) | 51 | void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int) |
52 | { | 52 | { |
53 | if (button==1) {return;} | 53 | if (button==1) {return;} |
54 | if (!item) return; | 54 | if (!item) return; |
55 | AccountViewItem *view = static_cast<AccountViewItem *>(item); | 55 | AccountViewItem *view = static_cast<AccountViewItem *>(item); |
56 | QPopupMenu*m = view->getContextMenu(); | 56 | QPopupMenu*m = view->getContextMenu(); |
57 | if (!m) return; | 57 | if (!m) return; |
58 | connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int))); | 58 | connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int))); |
59 | m->setFocus(); | 59 | m->setFocus(); |
60 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); | 60 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); |
61 | delete m; | 61 | delete m; |
62 | } | 62 | } |
63 | 63 | ||
64 | void AccountView::populate( QList<Account> list ) | 64 | void AccountView::populate( QList<Account> list ) |
65 | { | 65 | { |
66 | clear(); | 66 | clear(); |
67 | 67 | ||
68 | imapAccounts.clear(); | 68 | imapAccounts.clear(); |
69 | mhAccounts.clear(); | 69 | mhAccounts.clear(); |
70 | 70 | ||
71 | mhAccounts.append(new MHviewItem(AbstractMail::defaultLocalfolder(),this)); | 71 | mhAccounts.append(new MHviewItem(AbstractMail::defaultLocalfolder(),this)); |
72 | 72 | ||
73 | Account *it; | 73 | Account *it; |
74 | for ( it = list.first(); it; it = list.next() ) | 74 | for ( it = list.first(); it; it = list.next() ) |
75 | { | 75 | { |
76 | if ( it->getType() == MAILLIB::A_IMAP ) | 76 | if ( it->getType() == MAILLIB::A_IMAP ) |
77 | { | 77 | { |
78 | IMAPaccount *imap = static_cast<IMAPaccount *>(it); | 78 | IMAPaccount *imap = static_cast<IMAPaccount *>(it); |
79 | imapAccounts.append(new IMAPviewItem( imap, this )); | 79 | imapAccounts.append(new IMAPviewItem( imap, this )); |
80 | } | 80 | } |
81 | else if ( it->getType() == MAILLIB::A_POP3 ) | 81 | else if ( it->getType() == MAILLIB::A_POP3 ) |
82 | { | 82 | { |
83 | POP3account *pop3 = static_cast<POP3account *>(it); | 83 | POP3account *pop3 = static_cast<POP3account *>(it); |
84 | /* must not be hold 'cause it isn't required */ | 84 | /* must not be hold 'cause it isn't required */ |
85 | (void) new POP3viewItem( pop3, this ); | 85 | (void) new POP3viewItem( pop3, this ); |
86 | } | 86 | } |
87 | else if ( it->getType() == MAILLIB::A_NNTP ) | 87 | else if ( it->getType() == MAILLIB::A_NNTP ) |
88 | { | 88 | { |
89 | NNTPaccount *nntp = static_cast<NNTPaccount *>(it); | 89 | NNTPaccount *nntp = static_cast<NNTPaccount *>(it); |
90 | /* must not be hold 'cause it isn't required */ | 90 | /* must not be hold 'cause it isn't required */ |
91 | (void) new NNTPviewItem( nntp, this ); | 91 | (void) new NNTPviewItem( nntp, this ); |
92 | } | 92 | } |
93 | } | 93 | } |
94 | } | 94 | } |
95 | 95 | ||
96 | void AccountView::refresh(QListViewItem *item) | 96 | void AccountView::refresh(QListViewItem *item) |
97 | { | 97 | { |
98 | if ( item ) | 98 | if ( item ) |
99 | { | 99 | { |
100 | int result = KMessageBox::warningContinueCancel(this, | 100 | bool ask = true; |
101 | qDebug("text -%s- ",item->text( 0 ).latin1() ); | ||
102 | if ( item->text( 0 ) == i18n (" Local Mailfolders") ) | ||
103 | ask = false; | ||
104 | else { | ||
105 | if ( item->parent() ) | ||
106 | if ( item->parent()->text( 0 ) == i18n (" Local Mailfolders") ) | ||
107 | ask = false; | ||
108 | } | ||
109 | if ( ask ) { | ||
110 | int result = KMessageBox::warningContinueCancel(this, | ||
101 | i18n("Refresh\n%1\n?").arg( item->text(0) ), | 111 | i18n("Refresh\n%1\n?").arg( item->text(0) ), |
102 | i18n("Refresh"),i18n("Refresh"),i18n("Cancel"), | 112 | i18n("Refresh"),i18n("Refresh"),i18n("Cancel"), |
103 | true); | 113 | true); |
104 | if (result != KMessageBox::Continue) return; | 114 | if (result != KMessageBox::Continue) return; |
115 | } | ||
105 | m_currentItem = item; | 116 | m_currentItem = item; |
106 | topLevelWidget()->setCaption( i18n ( "Refreshing %1 ... please wait" ). arg ( m_currentItem->text( 0 ) ) ) ; | 117 | topLevelWidget()->setCaption( i18n ( "Refreshing %1 ... please wait" ). arg ( m_currentItem->text( 0 ) ) ) ; |
107 | QTimer::singleShot( 500, this, SLOT ( refreshCurrentSelected() ) ); | 118 | QTimer::singleShot( 500, this, SLOT ( refreshCurrentSelected() ) ); |
108 | 119 | ||
109 | } | 120 | } |
110 | } | 121 | } |
111 | void AccountView::refreshOutgoing() | 122 | void AccountView::refreshOutgoing() |
112 | { | 123 | { |
113 | m_currentItem = currentItem(); | 124 | m_currentItem = currentItem(); |
114 | if ( !m_currentItem ) return; | 125 | if ( !m_currentItem ) return; |
115 | AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); | 126 | AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); |
116 | if ( !view->getFolder() ) | 127 | if ( !view->getFolder() ) |
117 | return; | 128 | return; |
118 | QString bName = view->getFolder()->getDisplayName(); | 129 | QString bName = view->getFolder()->getDisplayName(); |
119 | if (bName.startsWith("/")&&bName.length()>1) | 130 | if (bName.startsWith("/")&&bName.length()>1) |
120 | { | 131 | { |
121 | bName.replace(0,1,""); | 132 | bName.replace(0,1,""); |
122 | } | 133 | } |
123 | int pos = bName.findRev("/"); | 134 | int pos = bName.findRev("/"); |
124 | if (pos > 0) | 135 | if (pos > 0) |
125 | { | 136 | { |
126 | bName.replace(0,pos+1,""); | 137 | bName.replace(0,pos+1,""); |
127 | } | 138 | } |
128 | //qDebug("name *%s* ",bName.lower().latin1() ); | 139 | //qDebug("name *%s* ",bName.lower().latin1() ); |
129 | if ( bName.lower() == "outgoing" || bName.lower() == "sent" || bName.lower() == "sendfailed" ) { | 140 | if ( bName.lower() == "outgoing" || bName.lower() == "sent" || bName.lower() == "sendfailed" ) { |
130 | refreshCurrent(); | 141 | refreshCurrent(); |
131 | // qDebug("refresh "); | 142 | // qDebug("refresh "); |
132 | } | 143 | } |
133 | } | 144 | } |
134 | void AccountView::refreshCurrentSelected() | 145 | void AccountView::refreshCurrentSelected() |
135 | { | 146 | { |
136 | if ( !m_currentItem ) return; | 147 | if ( !m_currentItem ) return; |
137 | QValueList<RecMailP> headerlist; | 148 | QValueList<RecMailP> headerlist; |
138 | AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); | 149 | AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); |
139 | view->refresh(headerlist); | 150 | view->refresh(headerlist); |
140 | emit refreshMailview(headerlist); | 151 | emit refreshMailview(headerlist); |
141 | topLevelWidget()->setCaption( i18n ( "KOpieMail/Pi" ) ) ; | 152 | topLevelWidget()->setCaption( i18n ( "KOpieMail/Pi" ) ) ; |
142 | } | 153 | } |
143 | 154 | ||
144 | void AccountView::refreshCurrent() | 155 | void AccountView::refreshCurrent() |
145 | { | 156 | { |
146 | m_currentItem = currentItem(); | 157 | m_currentItem = currentItem(); |
147 | if ( !m_currentItem ) return; | 158 | if ( !m_currentItem ) return; |
148 | topLevelWidget()->setCaption( i18n ( "Refreshing %1 ... please wait" ). arg ( m_currentItem->text( 0 ) ) ) ; | 159 | topLevelWidget()->setCaption( i18n ( "Refreshing %1 ... please wait" ). arg ( m_currentItem->text( 0 ) ) ) ; |
149 | QTimer::singleShot( 500, this, SLOT ( refreshCurrentSelected() ) ); | 160 | QTimer::singleShot( 500, this, SLOT ( refreshCurrentSelected() ) ); |
150 | } | 161 | } |
151 | 162 | ||
152 | void AccountView::refreshAll() | 163 | void AccountView::refreshAll() |
153 | { | 164 | { |
154 | } | 165 | } |
155 | 166 | ||
156 | RecBodyP AccountView::fetchBody(const RecMailP&aMail) | 167 | RecBodyP AccountView::fetchBody(const RecMailP&aMail) |
157 | { | 168 | { |
158 | QListViewItem*item = selectedItem (); | 169 | QListViewItem*item = selectedItem (); |
159 | if (!item) return new RecBody(); | 170 | if (!item) return new RecBody(); |
160 | AccountViewItem *view = static_cast<AccountViewItem *>(item); | 171 | AccountViewItem *view = static_cast<AccountViewItem *>(item); |
161 | return view->fetchBody(aMail); | 172 | return view->fetchBody(aMail); |
162 | } | 173 | } |
163 | 174 | ||
164 | void AccountView::setupFolderselect(Selectstore*sels) | 175 | void AccountView::setupFolderselect(Selectstore*sels) |
165 | { | 176 | { |
166 | 177 | ||
167 | #ifndef DESKTOP_VERSION | 178 | #ifndef DESKTOP_VERSION |
168 | sels->showMaximized(); | 179 | sels->showMaximized(); |
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 82a915e..3dde3cd 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp | |||
@@ -304,130 +304,144 @@ void MainWindow::slotSetCodec( int codec ) | |||
304 | break; | 304 | break; |
305 | } | 305 | } |
306 | KOPrefs::instance()->mCurrentCodeName = name ; | 306 | KOPrefs::instance()->mCurrentCodeName = name ; |
307 | codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")"); | 307 | codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")"); |
308 | codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true ); | 308 | codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true ); |
309 | } | 309 | } |
310 | void MainWindow::showLicence() | 310 | void MainWindow::showLicence() |
311 | { | 311 | { |
312 | KApplication::showLicence(); | 312 | KApplication::showLicence(); |
313 | } | 313 | } |
314 | void MainWindow::showAbout() | 314 | void MainWindow::showAbout() |
315 | { | 315 | { |
316 | QString version; | 316 | QString version; |
317 | #include <../version> | 317 | #include <../version> |
318 | 318 | ||
319 | QString cap = "About KOpieMail/Pi"; | 319 | QString cap = "About KOpieMail/Pi"; |
320 | QString text =i18n("KOpieMail/Platform-independent\n") + | 320 | QString text =i18n("KOpieMail/Platform-independent\n") + |
321 | "(OM/Pi) " + version + " - " | 321 | "(OM/Pi) " + version + " - " |
322 | 322 | ||
323 | #ifdef DESKTOP_VERSION | 323 | #ifdef DESKTOP_VERSION |
324 | "Desktop Edition\n" | 324 | "Desktop Edition\n" |
325 | #else | 325 | #else |
326 | "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" | 326 | "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" |
327 | #endif | 327 | #endif |
328 | "www.pi-sync.info\n\n" | 328 | "www.pi-sync.info\n\n" |
329 | 329 | ||
330 | 330 | ||
331 | 331 | ||
332 | "Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>\n" | 332 | "Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>\n" |
333 | "KOpieMail/Pi is based on Opie Mail\n" | 333 | "KOpieMail/Pi is based on Opie Mail\n" |
334 | "Copyright (c) Rajko Albrecht and the Opie team\n" | 334 | "Copyright (c) Rajko Albrecht and the Opie team\n" |
335 | "KOpieMail/Pi is licensed under the GPL\n" | 335 | "KOpieMail/Pi is licensed under the GPL\n" |
336 | "\n" | 336 | "\n" |
337 | "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" | 337 | "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" |
338 | "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" | 338 | "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" |
339 | "libEtPan has its own licence - see LibEtPan licence\n"; | 339 | "libEtPan has its own licence - see LibEtPan licence\n"; |
340 | 340 | ||
341 | KApplication::showText( cap, text ); | 341 | KApplication::showText( cap, text ); |
342 | } | 342 | } |
343 | void MainWindow::showEtpanLicence() | 343 | void MainWindow::showEtpanLicence() |
344 | { | 344 | { |
345 | KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); | 345 | KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); |
346 | 346 | ||
347 | } | 347 | } |
348 | void MainWindow::appMessage(const QCString &, const QByteArray &) | 348 | void MainWindow::appMessage(const QCString &, const QByteArray &) |
349 | { | 349 | { |
350 | qDebug("appMessage implemented by subclass"); | 350 | qDebug("appMessage implemented by subclass"); |
351 | } | 351 | } |
352 | 352 | ||
353 | void MainWindow::slotAdjustLayout() { | 353 | void MainWindow::slotAdjustLayout() { |
354 | 354 | ||
355 | /* | 355 | /* |
356 | QWidget *d = QApplication::desktop(); | 356 | QWidget *d = QApplication::desktop(); |
357 | 357 | ||
358 | if ( d->width() < d->height() ) { | 358 | if ( d->width() < d->height() ) { |
359 | layout->setDirection( QBoxLayout::TopToBottom ); | 359 | layout->setDirection( QBoxLayout::TopToBottom ); |
360 | } else { | 360 | } else { |
361 | layout->setDirection( QBoxLayout::LeftToRight ); | 361 | layout->setDirection( QBoxLayout::LeftToRight ); |
362 | } | 362 | } |
363 | */ | 363 | */ |
364 | } | 364 | } |
365 | 365 | ||
366 | void MainWindow::slotAdjustColumns() | 366 | void MainWindow::slotAdjustColumns() |
367 | { | 367 | { |
368 | bool hidden = folderView->isHidden(); | 368 | |
369 | if ( hidden ) folderView->show(); | 369 | if ( !folderView->isHidden() ) |
370 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); | 370 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); |
371 | if ( hidden ) folderView->hide(); | ||
372 | 371 | ||
373 | mailView->setColumnWidth( 0, 10 ); | 372 | mailView->setColumnWidth( 0, 10 ); |
374 | mailView->setColumnWidth( 1, 100 ); | 373 | mailView->setColumnWidth( 1, 100 ); |
375 | mailView->setColumnWidth( 2, 100 ); | 374 | mailView->setColumnWidth( 2, 100 ); |
376 | mailView->setColumnWidth( 3, 70 ); | 375 | mailView->setColumnWidth( 3, 70 ); |
377 | mailView->setColumnWidth( 4, 170 ); | 376 | mailView->setColumnWidth( 4, 180 ); |
377 | if ( KOPrefs::instance()->mShowToField ) | ||
378 | mailView->setColumnWidth( 5, 100 ); | ||
379 | mailView->setColumnAlignment( 3, AlignRight); | ||
380 | mailView->setColumnAlignment( 4, AlignRight); | ||
381 | } | ||
382 | void MainWindow::slotAdjustColumnsWide() | ||
383 | { | ||
384 | if ( !folderView->isHidden() ) | ||
385 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); | ||
386 | |||
387 | mailView->setColumnWidth( 0, 10 ); | ||
388 | mailView->setColumnWidth( 1, 200 ); | ||
389 | mailView->setColumnWidth( 2, 200 ); | ||
390 | mailView->setColumnWidth( 3, 70 ); | ||
391 | mailView->setColumnWidth( 4, 180 ); | ||
378 | if ( KOPrefs::instance()->mShowToField ) | 392 | if ( KOPrefs::instance()->mShowToField ) |
379 | mailView->setColumnWidth( 5, 100 ); | 393 | mailView->setColumnWidth( 5, 100 ); |
380 | mailView->setColumnAlignment( 3, AlignRight); | 394 | mailView->setColumnAlignment( 3, AlignRight); |
381 | } | 395 | } |
382 | 396 | ||
383 | void MainWindow::slotEditSettings() | 397 | void MainWindow::slotEditSettings() |
384 | { | 398 | { |
385 | } | 399 | } |
386 | void MainWindow::slotEditGlobalSettings() | 400 | void MainWindow::slotEditGlobalSettings() |
387 | { | 401 | { |
388 | } | 402 | } |
389 | 403 | ||
390 | void MainWindow::slotShowFolders( bool ) | 404 | void MainWindow::slotShowFolders( bool ) |
391 | { | 405 | { |
392 | qDebug("not implemented: "); | 406 | qDebug("not implemented: "); |
393 | } | 407 | } |
394 | 408 | ||
395 | void MainWindow::refreshMailView(const QValueList<RecMailP>&) | 409 | void MainWindow::refreshMailView(const QValueList<RecMailP>&) |
396 | { | 410 | { |
397 | qDebug("not implemented: "); | 411 | qDebug("not implemented: "); |
398 | } | 412 | } |
399 | 413 | ||
400 | void MainWindow::mailLeftClicked(QListViewItem * ) | 414 | void MainWindow::mailLeftClicked(QListViewItem * ) |
401 | { | 415 | { |
402 | qDebug("not implemented: "); | 416 | qDebug("not implemented: "); |
403 | } | 417 | } |
404 | 418 | ||
405 | void MainWindow::displayMail() | 419 | void MainWindow::displayMail() |
406 | { | 420 | { |
407 | qDebug("not implemented: "); | 421 | qDebug("not implemented: "); |
408 | } | 422 | } |
409 | 423 | ||
410 | void MainWindow::slotDeleteMail() | 424 | void MainWindow::slotDeleteMail() |
411 | { | 425 | { |
412 | qDebug("not implemented: "); | 426 | qDebug("not implemented: "); |
413 | } | 427 | } |
414 | 428 | ||
415 | void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) | 429 | void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) |
416 | { | 430 | { |
417 | qDebug("not implemented: "); | 431 | qDebug("not implemented: "); |
418 | } | 432 | } |
419 | 433 | ||
420 | void MainWindow::slotSendQueued() | 434 | void MainWindow::slotSendQueued() |
421 | { | 435 | { |
422 | qDebug("not implemented: "); | 436 | qDebug("not implemented: "); |
423 | } | 437 | } |
424 | 438 | ||
425 | void MainWindow::slotEditAccounts() | 439 | void MainWindow::slotEditAccounts() |
426 | { | 440 | { |
427 | qDebug("not implemented: "); | 441 | qDebug("not implemented: "); |
428 | } | 442 | } |
429 | 443 | ||
430 | void MainWindow::slotComposeMail() | 444 | void MainWindow::slotComposeMail() |
431 | { | 445 | { |
432 | qDebug("not implemented: "); | 446 | qDebug("not implemented: "); |
433 | } | 447 | } |
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h index 178d2bb..f65f3b4 100644 --- a/kmicromail/mainwindow.h +++ b/kmicromail/mainwindow.h | |||
@@ -1,74 +1,75 @@ | |||
1 | 1 | ||
2 | // CHANGED 2004-08-06 Lutz Rogowski | 2 | // CHANGED 2004-08-06 Lutz Rogowski |
3 | #ifndef MAINWINDOW_H | 3 | #ifndef MAINWINDOW_H |
4 | #define MAINWINDOW_H | 4 | #define MAINWINDOW_H |
5 | 5 | ||
6 | #include <qmainwindow.h> | 6 | #include <qmainwindow.h> |
7 | #include <klistview.h> | 7 | #include <klistview.h> |
8 | #include <qaction.h> | 8 | #include <qaction.h> |
9 | #include <qlineedit.h> | 9 | #include <qlineedit.h> |
10 | 10 | ||
11 | #include <qtoolbar.h> | 11 | #include <qtoolbar.h> |
12 | #ifdef DESKTOP_VERSION | 12 | #ifdef DESKTOP_VERSION |
13 | #include <qmenubar.h> | 13 | #include <qmenubar.h> |
14 | #define QPEMenuBar QMenuBar | 14 | #define QPEMenuBar QMenuBar |
15 | #else | 15 | #else |
16 | #include <qpe/qpemenubar.h> | 16 | #include <qpe/qpemenubar.h> |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | #include "accountview.h" | 19 | #include "accountview.h" |
20 | #include "statuswidget.h" | 20 | #include "statuswidget.h" |
21 | 21 | ||
22 | #include <libmailwrapper/mailtypes.h> | 22 | #include <libmailwrapper/mailtypes.h> |
23 | #include <opie2/osmartpointer.h> | 23 | #include <opie2/osmartpointer.h> |
24 | 24 | ||
25 | class RecMail; | 25 | class RecMail; |
26 | 26 | ||
27 | class MainWindow : public QMainWindow | 27 | class MainWindow : public QMainWindow |
28 | { | 28 | { |
29 | Q_OBJECT | 29 | Q_OBJECT |
30 | 30 | ||
31 | public: | 31 | public: |
32 | MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); | 32 | MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); |
33 | virtual ~MainWindow(); | 33 | virtual ~MainWindow(); |
34 | 34 | ||
35 | public slots: | 35 | public slots: |
36 | virtual void slotAdjustColumns(); | 36 | virtual void slotAdjustColumns(); |
37 | virtual void slotAdjustColumnsWide(); | ||
37 | virtual void appMessage(const QCString &msg, const QByteArray &data); | 38 | virtual void appMessage(const QCString &msg, const QByteArray &data); |
38 | virtual void slotComposeMail(); | 39 | virtual void slotComposeMail(); |
39 | 40 | ||
40 | protected slots: | 41 | protected slots: |
41 | virtual void setInfoFields(QListViewItem* ); | 42 | virtual void setInfoFields(QListViewItem* ); |
42 | virtual void slotSendQueued(); | 43 | virtual void slotSendQueued(); |
43 | virtual void slotEditAccounts(); | 44 | virtual void slotEditAccounts(); |
44 | virtual void slotShowFolders( bool show ); | 45 | virtual void slotShowFolders( bool show ); |
45 | virtual void refreshMailView(const QValueList<RecMailP>&); | 46 | virtual void refreshMailView(const QValueList<RecMailP>&); |
46 | virtual void displayMail(); | 47 | virtual void displayMail(); |
47 | virtual void slotGetMail() = 0; | 48 | virtual void slotGetMail() = 0; |
48 | virtual void slotGetAllMail() = 0; | 49 | virtual void slotGetAllMail() = 0; |
49 | virtual void slotDeleteMail(); | 50 | virtual void slotDeleteMail(); |
50 | virtual void slotDeleteAllMail() = 0; | 51 | virtual void slotDeleteAllMail() = 0; |
51 | virtual void slotSetCodec(int); | 52 | virtual void slotSetCodec(int); |
52 | virtual void mailHold(int, QListViewItem *,const QPoint&,int); | 53 | virtual void mailHold(int, QListViewItem *,const QPoint&,int); |
53 | virtual void slotAdjustLayout(); | 54 | virtual void slotAdjustLayout(); |
54 | virtual void slotEditSettings(); | 55 | virtual void slotEditSettings(); |
55 | virtual void slotEditGlobalSettings(); | 56 | virtual void slotEditGlobalSettings(); |
56 | virtual void mailLeftClicked( QListViewItem * ); | 57 | virtual void mailLeftClicked( QListViewItem * ); |
57 | void showLicence(); | 58 | void showLicence(); |
58 | void showAbout(); | 59 | void showAbout(); |
59 | void showEtpanLicence(); | 60 | void showEtpanLicence(); |
60 | 61 | ||
61 | protected: | 62 | protected: |
62 | QToolBar *toolBar; | 63 | QToolBar *toolBar; |
63 | StatusWidget *statusWidget; | 64 | StatusWidget *statusWidget; |
64 | QPEMenuBar *menuBar; | 65 | QPEMenuBar *menuBar; |
65 | QPopupMenu *mailMenu, *settingsMenu, *codecMenu; | 66 | QPopupMenu *mailMenu, *settingsMenu, *codecMenu; |
66 | QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, | 67 | QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, |
67 | *editSettings, *editAccounts, *syncFolders; | 68 | *editSettings, *editAccounts, *syncFolders; |
68 | AccountView *folderView; | 69 | AccountView *folderView; |
69 | KListView *mailView; | 70 | KListView *mailView; |
70 | QLineEdit* toLE,*fromLE,*subLE; | 71 | QLineEdit* toLE,*fromLE,*subLE; |
71 | //QBoxLayout *layout; | 72 | //QBoxLayout *layout; |
72 | }; | 73 | }; |
73 | 74 | ||
74 | #endif | 75 | #endif |
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index e296d9c..75a75b9 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp | |||
@@ -480,133 +480,137 @@ void OpieMail::slotDeleteAllMail() | |||
480 | if ( t.count() == 0 ) | 480 | if ( t.count() == 0 ) |
481 | return; | 481 | return; |
482 | RecMailP mail = t.first(); | 482 | RecMailP mail = t.first(); |
483 | mail->Wrapper()->deleteMailList(t); | 483 | mail->Wrapper()->deleteMailList(t); |
484 | folderView->refreshCurrent(); | 484 | folderView->refreshCurrent(); |
485 | 485 | ||
486 | 486 | ||
487 | } | 487 | } |
488 | void OpieMail::clearSelection() | 488 | void OpieMail::clearSelection() |
489 | { | 489 | { |
490 | mailView->clearSelection(); | 490 | mailView->clearSelection(); |
491 | 491 | ||
492 | } | 492 | } |
493 | void OpieMail::selectAll() | 493 | void OpieMail::selectAll() |
494 | { | 494 | { |
495 | QListViewItem* item = mailView->firstChild (); | 495 | QListViewItem* item = mailView->firstChild (); |
496 | while ( item ) { | 496 | while ( item ) { |
497 | mailView->setSelected ( item, true ); | 497 | mailView->setSelected ( item, true ); |
498 | item = item->nextSibling(); | 498 | item = item->nextSibling(); |
499 | } | 499 | } |
500 | } | 500 | } |
501 | 501 | ||
502 | void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) | 502 | void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) |
503 | { | 503 | { |
504 | if (!mailView->currentItem()) return; | 504 | if (!mailView->currentItem()) return; |
505 | MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); | 505 | MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); |
506 | /* just the RIGHT button - or hold on pda */ | 506 | /* just the RIGHT button - or hold on pda */ |
507 | if (button!=2) {return;} | 507 | if (button!=2) {return;} |
508 | if (!item) return; | 508 | if (!item) return; |
509 | QPopupMenu *m = new QPopupMenu(0); | 509 | QPopupMenu *m = new QPopupMenu(0); |
510 | if (m) | 510 | if (m) |
511 | { | 511 | { |
512 | if (mailtype==MAILLIB::A_NNTP) { | 512 | if (mailtype==MAILLIB::A_NNTP) { |
513 | m->insertItem(i18n("Read this posting"),this,SLOT(displayMail())); | 513 | m->insertItem(i18n("Read this posting"),this,SLOT(displayMail())); |
514 | m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail())); | 514 | m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail())); |
515 | m->insertSeparator(); | 515 | m->insertSeparator(); |
516 | m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail())); | 516 | m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail())); |
517 | m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); | 517 | m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); |
518 | } else { | 518 | } else { |
519 | if (folderView->currentisDraft()) { | 519 | if (folderView->currentisDraft()) { |
520 | m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail())); | 520 | m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail())); |
521 | } | 521 | } |
522 | m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail())); | 522 | m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail())); |
523 | m->insertItem(i18n("Read this mail"),this,SLOT(displayMail())); | 523 | m->insertItem(i18n("Read this mail"),this,SLOT(displayMail())); |
524 | m->insertSeparator(); | 524 | m->insertSeparator(); |
525 | m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); | 525 | m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); |
526 | m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); | 526 | m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); |
527 | m->insertSeparator(); | 527 | m->insertSeparator(); |
528 | m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); | 528 | m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); |
529 | m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); | 529 | m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); |
530 | m->insertSeparator(); | 530 | m->insertSeparator(); |
531 | m->insertItem(i18n("Select all"),this,SLOT(selectAll())); | 531 | m->insertItem(i18n("Select all"),this,SLOT(selectAll())); |
532 | m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); | 532 | m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); |
533 | } | 533 | } |
534 | m->setFocus(); | 534 | m->setFocus(); |
535 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); | 535 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); |
536 | delete m; | 536 | delete m; |
537 | } | 537 | } |
538 | } | 538 | } |
539 | 539 | ||
540 | void OpieMail::slotShowFolders( bool show ) | 540 | void OpieMail::slotShowFolders( bool show ) |
541 | { | 541 | { |
542 | if ( show && folderView->isHidden() ) | 542 | if ( show && folderView->isHidden() ) |
543 | { | 543 | { |
544 | slotAdjustColumns(); | ||
544 | folderView->show(); | 545 | folderView->show(); |
546 | //slotAdjustColumns(); | ||
545 | } | 547 | } |
546 | else if ( !show && !folderView->isHidden() ) | 548 | else if ( !show && !folderView->isHidden() ) |
547 | { | 549 | { |
550 | slotAdjustColumnsWide(); | ||
548 | folderView->hide(); | 551 | folderView->hide(); |
552 | //slotAdjustColumnsWide(); | ||
549 | } | 553 | } |
550 | } | 554 | } |
551 | 555 | ||
552 | void OpieMail::refreshMailView(const QValueList<RecMailP>&list) | 556 | void OpieMail::refreshMailView(const QValueList<RecMailP>&list) |
553 | { | 557 | { |
554 | MailListViewItem*item = 0; | 558 | MailListViewItem*item = 0; |
555 | mailView->clear(); | 559 | mailView->clear(); |
556 | 560 | ||
557 | QValueList<RecMailP>::ConstIterator it; | 561 | QValueList<RecMailP>::ConstIterator it; |
558 | for (it = list.begin(); it != list.end();++it) | 562 | for (it = list.begin(); it != list.end();++it) |
559 | { | 563 | { |
560 | item = new MailListViewItem(mailView,item); | 564 | item = new MailListViewItem(mailView,item); |
561 | item->storeData((*it)); | 565 | item->storeData((*it)); |
562 | item->showEntry(); | 566 | item->showEntry(); |
563 | } | 567 | } |
564 | mailView->setSorting ( 4, false ); | 568 | mailView->setSorting ( 4, false ); |
565 | } | 569 | } |
566 | 570 | ||
567 | void OpieMail::mailLeftClicked( QListViewItem *item ) | 571 | void OpieMail::mailLeftClicked( QListViewItem *item ) |
568 | { | 572 | { |
569 | mailView->clearSelection(); | 573 | mailView->clearSelection(); |
570 | /* just LEFT button - or tap with stylus on pda */ | 574 | /* just LEFT button - or tap with stylus on pda */ |
571 | //if (button!=1) return; | 575 | //if (button!=1) return; |
572 | if (!item) return; | 576 | if (!item) return; |
573 | if (folderView->currentisDraft()) { | 577 | if (folderView->currentisDraft()) { |
574 | reEditMail(); | 578 | reEditMail(); |
575 | } else { | 579 | } else { |
576 | displayMail(); | 580 | displayMail(); |
577 | } | 581 | } |
578 | } | 582 | } |
579 | 583 | ||
580 | void OpieMail::slotMoveCopyMail() | 584 | void OpieMail::slotMoveCopyMail() |
581 | { | 585 | { |
582 | if (!mailView->currentItem()) return; | 586 | if (!mailView->currentItem()) return; |
583 | RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); | 587 | RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); |
584 | AbstractMail*targetMail = 0; | 588 | AbstractMail*targetMail = 0; |
585 | QString targetFolder = ""; | 589 | QString targetFolder = ""; |
586 | Selectstore sels; | 590 | Selectstore sels; |
587 | folderView->setupFolderselect(&sels); | 591 | folderView->setupFolderselect(&sels); |
588 | if (!sels.exec()) return; | 592 | if (!sels.exec()) return; |
589 | targetMail = sels.currentMail(); | 593 | targetMail = sels.currentMail(); |
590 | targetFolder = sels.currentFolder(); | 594 | targetFolder = sels.currentFolder(); |
591 | if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) || | 595 | if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) || |
592 | targetFolder.isEmpty()) | 596 | targetFolder.isEmpty()) |
593 | { | 597 | { |
594 | return; | 598 | return; |
595 | } | 599 | } |
596 | if (sels.newFolder() && !targetMail->createMbox(targetFolder)) | 600 | if (sels.newFolder() && !targetMail->createMbox(targetFolder)) |
597 | { | 601 | { |
598 | QMessageBox::critical(0,i18n("Error creating new Folder"), | 602 | QMessageBox::critical(0,i18n("Error creating new Folder"), |
599 | i18n("<center>Error while creating<br>new folder - breaking.</center>")); | 603 | i18n("<center>Error while creating<br>new folder - breaking.</center>")); |
600 | return; | 604 | return; |
601 | } | 605 | } |
602 | sels.hide(); | 606 | sels.hide(); |
603 | qApp->processEvents(); | 607 | qApp->processEvents(); |
604 | // qDebug("hiding sels "); | 608 | // qDebug("hiding sels "); |
605 | mail->Wrapper()->mvcpMail(mail,targetFolder,targetMail,sels.moveMails()); | 609 | mail->Wrapper()->mvcpMail(mail,targetFolder,targetMail,sels.moveMails()); |
606 | folderView->refreshCurrent(); | 610 | folderView->refreshCurrent(); |
607 | } | 611 | } |
608 | 612 | ||
609 | void OpieMail::slotMoveCopyAllMail() | 613 | void OpieMail::slotMoveCopyAllMail() |
610 | { | 614 | { |
611 | 615 | ||
612 | if (!mailView->currentItem()) return; | 616 | if (!mailView->currentItem()) return; |