-rw-r--r-- | kmicromail/accountitem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 | } |