summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2005-08-23 20:09:28 (UTC)
committer zautrix <zautrix>2005-08-23 20:09:28 (UTC)
commit6f5464760f5fb1e4c13027464cfe4943b85d29a0 (patch) (side-by-side diff)
tree3c074b7e313d965516b60b9ba97fe27a7ee774a1 /kmicromail
parent13a736b71dec27ef7ffef06b91f34d220d89cce6 (diff)
downloadkdepimpi-6f5464760f5fb1e4c13027464cfe4943b85d29a0.zip
kdepimpi-6f5464760f5fb1e4c13027464cfe4943b85d29a0.tar.gz
kdepimpi-6f5464760f5fb1e4c13027464cfe4943b85d29a0.tar.bz2
fixx
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/accountview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp
index 4879d57..d1d4f7e 100644
--- a/kmicromail/accountview.cpp
+++ b/kmicromail/accountview.cpp
@@ -53,97 +53,97 @@ void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int)
if (button==1) {return;}
if (!item) return;
AccountViewItem *view = static_cast<AccountViewItem *>(item);
QPopupMenu*m = view->getContextMenu();
if (!m) return;
connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int)));
m->setFocus();
m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) );
delete m;
}
void AccountView::populate( QList<Account> list )
{
clear();
imapAccounts.clear();
mhAccounts.clear();
mhAccounts.append(new MHviewItem(AbstractMail::defaultLocalfolder(),this));
Account *it;
for ( it = list.first(); it; it = list.next() )
{
if ( it->getType() == MAILLIB::A_IMAP )
{
IMAPaccount *imap = static_cast<IMAPaccount *>(it);
imapAccounts.append(new IMAPviewItem( imap, this ));
}
else if ( it->getType() == MAILLIB::A_POP3 )
{
POP3account *pop3 = static_cast<POP3account *>(it);
/* must not be hold 'cause it isn't required */
(void) new POP3viewItem( pop3, this );
}
else if ( it->getType() == MAILLIB::A_NNTP )
{
NNTPaccount *nntp = static_cast<NNTPaccount *>(it);
/* must not be hold 'cause it isn't required */
(void) new NNTPviewItem( nntp, this );
}
}
}
void AccountView::refresh(QListViewItem *item)
{
if ( item )
{
bool ask = true;
- qDebug("text -%s- ",item->text( 0 ).latin1() );
+ //qDebug("text -%s- ",item->text( 0 ).latin1() );
if ( item->text( 0 ) == i18n (" Local Mailfolders") )
ask = false;
else {
if ( item->parent() )
if ( item->parent()->text( 0 ) == i18n (" Local Mailfolders") )
ask = false;
}
if ( ask ) {
int result = KMessageBox::warningContinueCancel(this,
i18n("Refresh\n%1\n?").arg( item->text(0) ),
i18n("Refresh"),i18n("Refresh"),i18n("Cancel"),
true);
if (result != KMessageBox::Continue) return;
}
m_currentItem = item;
topLevelWidget()->setCaption( i18n ( "Refreshing %1 ... please wait" ). arg ( m_currentItem->text( 0 ) ) ) ;
QTimer::singleShot( 500, this, SLOT ( refreshCurrentSelected() ) );
}
}
void AccountView::refreshOutgoing()
{
m_currentItem = currentItem();
if ( !m_currentItem ) return;
AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem);
if ( !view->getFolder() )
return;
QString bName = view->getFolder()->getDisplayName();
if (bName.startsWith("/")&&bName.length()>1)
{
bName.replace(0,1,"");
}
int pos = bName.findRev("/");
if (pos > 0)
{
bName.replace(0,pos+1,"");
}
//qDebug("name *%s* ",bName.lower().latin1() );
if ( bName.lower() == "outgoing" || bName.lower() == "sent" || bName.lower() == "sendfailed" ) {
refreshCurrent();
// qDebug("refresh ");
}
}
void AccountView::refreshCurrentSelected()
{
if ( !m_currentItem ) return;
QValueList<RecMailP> headerlist;
AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem);