author | alwin <alwin> | 2003-12-14 01:54:32 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-14 01:54:32 (UTC) |
commit | 154e03927d2b97f3f76f807fe104ac9d74035215 (patch) (side-by-side diff) | |
tree | 11ab26b6e072f79dc9ebcb78e887b7e269f908f5 | |
parent | 898d1d9abda9889c3bb3adc44dd253e0a4ede746 (diff) | |
download | opie-154e03927d2b97f3f76f807fe104ac9d74035215.zip opie-154e03927d2b97f3f76f807fe104ac9d74035215.tar.gz opie-154e03927d2b97f3f76f807fe104ac9d74035215.tar.bz2 |
order of imapfolders will be displayed as the server lists
-rw-r--r-- | noncore/net/mail/accountview.cpp | 8 | ||||
-rw-r--r-- | noncore/net/mail/accountview.h | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index ac4f0e0..847b099 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp @@ -70,8 +70,9 @@ void IMAPviewItem::refresh(QList<RecMail>&) } Folder *it; + QListViewItem*item = 0; for ( it = folders->first(); it; it = folders->next() ) { - (void) new IMAPfolderItem( it, this ); + item = new IMAPfolderItem( it, this , item ); } } @@ -85,8 +86,8 @@ IMAPfolderItem::~IMAPfolderItem() delete folder; } -IMAPfolderItem::IMAPfolderItem( Folder *folderInit, IMAPviewItem *parent ) - : AccountViewItem( parent ) +IMAPfolderItem::IMAPfolderItem( Folder *folderInit, IMAPviewItem *parent , QListViewItem*after ) + : AccountViewItem( parent,after ) { folder = folderInit; imap = parent; @@ -113,6 +114,7 @@ AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) { connect( this, SIGNAL( clicked( QListViewItem * ) ), SLOT( refresh( QListViewItem * ) ) ); + setSorting(-1); } void AccountView::populate( QList<Account> list ) diff --git a/noncore/net/mail/accountview.h b/noncore/net/mail/accountview.h index cdc87ce..04f9b7a 100644 --- a/noncore/net/mail/accountview.h +++ b/noncore/net/mail/accountview.h @@ -18,6 +18,7 @@ class AccountViewItem : public QListViewItem public: AccountViewItem( QListView *parent ) : QListViewItem( parent ) {} AccountViewItem( QListViewItem *parent ) : QListViewItem( parent ) {} + AccountViewItem( QListViewItem *parent , QListViewItem*after ) : QListViewItem( parent,after ) {} virtual void refresh(QList<RecMail>&)=0; virtual RecBody fetchBody(const RecMail&)=0; }; @@ -55,7 +56,7 @@ class IMAPfolderItem : public AccountViewItem { public: - IMAPfolderItem( Folder *folder, IMAPviewItem *parent ); + IMAPfolderItem( Folder *folder, IMAPviewItem *parent , QListViewItem*after ); ~IMAPfolderItem(); virtual void refresh(QList<RecMail>&); virtual RecBody fetchBody(const RecMail&); |