summaryrefslogtreecommitdiff
path: root/noncore
authoralwin <alwin>2005-03-12 02:17:39 (UTC)
committer alwin <alwin>2005-03-12 02:17:39 (UTC)
commit4c3ce64f6816353f5b8bc268c126d7c53d18ce46 (patch) (side-by-side diff)
tree1489d76901c287b527ac8fc78b5bbb1179d7110d /noncore
parentc30ae1086dfe8bebe1790161ba7df6c5472ded9f (diff)
downloadopie-4c3ce64f6816353f5b8bc268c126d7c53d18ce46.zip
opie-4c3ce64f6816353f5b8bc268c126d7c53d18ce46.tar.gz
opie-4c3ce64f6816353f5b8bc268c126d7c53d18ce46.tar.bz2
pixmaps
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/accountitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/mail/accountitem.cpp b/noncore/net/mail/accountitem.cpp
index 4869df8..10db2c6 100644
--- a/noncore/net/mail/accountitem.cpp
+++ b/noncore/net/mail/accountitem.cpp
@@ -822,193 +822,193 @@ QPopupMenu * MHviewItem::getContextMenu()
m->insertItem(QObject::tr("Delete all mails",contextName),FOLDER_MENU_DELETE_ALL_MAILS);
m->insertItem(QObject::tr("Move/Copie all mails",contextName),FOLDER_MENU_MOVE_MAILS);
}
return m;
}
void MHviewItem::createFolder()
{
Newmdirdlg ndirdlg(0,0,true);
if ( QPEApplication::execDialog( &ndirdlg ) )
{
QString ndir = ndirdlg.Newdir();
if (wrapper->createMbox(ndir))
{
refresh(true);
}
}
}
void MHviewItem::downloadMails()
{
AccountView*bl = accountView();
if (!bl) return;
bl->downloadMails(folder,getWrapper());
}
QStringList MHviewItem::subFolders()
{
return currentFolders;
}
void MHviewItem::contextMenuSelected(int which)
{
AccountView*view = 0;
switch (which)
{
case SERVER_MENU_REFRESH_FOLDER:
refresh(true);
break;
case FOLDER_MENU_NEW_SUBFOLDER:
createFolder();
break;
case FOLDER_MENU_DELETE_ALL_MAILS:
deleteAllMail(getWrapper(),folder);
break;
case FOLDER_MENU_MOVE_MAILS:
downloadMails();
break;
case FOLDER_MENU_REFRESH_HEADER:
view = (AccountView*)listView();
if (view) view->refreshCurrent();
break;
default:
break;
}
}
MHfolderItem::~MHfolderItem()
{}
MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , QListViewItem*after )
: AccountViewItem(folderInit, parent,after )
{
mbox = parent;
initName();
}
MHfolderItem::MHfolderItem(const FolderP& folderInit, MHfolderItem *parent, QListViewItem*after, MHviewItem*master)
: AccountViewItem(folderInit, parent,after )
{
folder = folderInit;
mbox = master;
initName();
}
void MHfolderItem::initName()
{
QString bName = folder->getDisplayName();
if (bName.startsWith("/")&&bName.length()>1)
{
bName.replace(0,1,"");
}
int pos = bName.findRev("/");
if (pos > 0)
{
bName.replace(0,pos+1,"");
}
if (bName.lower() == "outgoing")
{
setPixmap( 0, PIXMAP_OUTBOXFOLDER );
}
else if (bName.lower() == "inbox")
{
setPixmap( 0, PIXMAP_INBOXFOLDER);
} else if (bName.lower() == "drafts") {
- setPixmap(0, Resource::loadPixmap("inline/edit"));
+ setPixmap(0, Resource::loadPixmap("edit"));
} else {
setPixmap( 0, PIXMAP_MBOXFOLDER );
}
setText( 0, bName );
}
const FolderP&MHfolderItem::getFolder()const
{
return folder;
}
void MHfolderItem::refresh(QValueList<RecMailP>&target)
{
if (folder->may_select())
mbox->getWrapper()->listMessages( folder->getName(),target );
}
RECBODYP MHfolderItem::fetchBody(const RecMailP&aMail)
{
return mbox->getWrapper()->fetchBody(aMail);
}
void MHfolderItem::deleteFolder()
{
int yesno = QMessageBox::warning(0,QObject::tr("Delete folder",contextName),
QObject::tr("<center>Realy delete folder <br><b>%1</b><br>and all if it content?</center>",contextName).arg(folder->getDisplayName()),
QObject::tr("Yes",contextName),
QObject::tr("No",contextName),QString::null,1,1);
odebug << "Auswahl: " << yesno << "" << oendl;
if (yesno == 0)
{
if (mbox->getWrapper()->deleteMbox(folder))
{
QListView*v=listView();
MHviewItem * box = mbox;
/* be carefull - after that this object is destroyd so don't use
* any member of it after that call!!*/
mbox->refresh(true);
if (v)
{
v->setSelected(box,true);
}
}
}
}
QPopupMenu * MHfolderItem::getContextMenu()
{
QPopupMenu *m = new QPopupMenu(0);
if (m)
{
m->insertItem(QObject::tr("Create new subfolder",contextName),FOLDER_MENU_NEW_SUBFOLDER);
m->insertItem(QObject::tr("Refresh header list",contextName),FOLDER_MENU_REFRESH_HEADER);
m->insertItem(QObject::tr("Move/Copie all mails",contextName),FOLDER_MENU_MOVE_MAILS);
m->insertItem(QObject::tr("Delete all mails",contextName),FOLDER_MENU_DELETE_ALL_MAILS);
m->insertItem(QObject::tr("Delete folder",contextName),FOLDER_MENU_DELETE_FOLDER);
}
return m;
}
void MHfolderItem::downloadMails()
{
AccountView*bl = mbox->accountView();
if (!bl) return;
bl->downloadMails(folder,mbox->getWrapper());
}
void MHfolderItem::createFolder()
{
Newmdirdlg ndirdlg(0,0,true);
if ( QPEApplication::execDialog( &ndirdlg ) )
{
QString ndir = ndirdlg.Newdir();
if (mbox->getWrapper()->createMbox(ndir,folder))
{
QListView*v=listView();
MHviewItem * box = mbox;
/* be carefull - after that this object is destroyd so don't use
* any member of it after that call!!*/
mbox->refresh(true);
if (v)
{
v->setSelected(box,true);
}
}
}
}
void MHfolderItem::contextMenuSelected(int which)
{
AccountView*view = 0;
switch(which)
{
case FOLDER_MENU_DELETE_ALL_MAILS:
deleteAllMail(mbox->getWrapper(),folder);
break;