-rw-r--r-- | noncore/unsupported/mail2/folderwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/unsupported/mail2/folderwidget.cpp b/noncore/unsupported/mail2/folderwidget.cpp index ca2bb5a..6c36e92 100644 --- a/noncore/unsupported/mail2/folderwidget.cpp +++ b/noncore/unsupported/mail2/folderwidget.cpp @@ -128,97 +128,97 @@ FolderWidgetItem *FolderWidget::addFolder(Folder &folder, FolderWidgetItem *fold return new FolderWidgetItem(folder, folderWidgetItem); } void FolderWidget::slotMenuActivated(int itemid) { if (currentItem() == NULL) { QMessageBox::information(this, tr("Error"), tr("<p>Please select an item first.</p>"), tr("Ok")); return; } if (itemid == MENU_RENAME) { if (((FolderWidgetItem *)currentItem())->folder().fullName().isEmpty()) return; Folder folder = ((FolderWidgetItem *)currentItem())->folder(); QString newName = Rename::rename(folder.fullName(), this); if (newName.isNull()) return; folder.topFolder().handler()->iRename(folder.fullName(), newName); connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPRename(IMAPResponse &))); } else if (itemid == MENU_DELETE) { if (((FolderWidgetItem *)currentItem())->folder().fullName().isEmpty()) return; Folder folder = ((FolderWidgetItem *)currentItem())->folder(); int ret = QMessageBox::information(this, tr("Question"), tr("<p>Do you really want to delete <pre>%1</pre>?").arg(folder.fullName()), tr("Yes"), tr("No")); if (ret == 1) return; _createFolder = folder; folder.topFolder().handler()->iDelete(folder.fullName()); connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPDelete(IMAPResponse &))); } else if (itemid == MENU_MOVE) { } else if (itemid == MENU_COPY) { } else if (itemid == MENU_CREATE) { Folder folder = (((FolderWidgetItem *)currentItem())->folder()); _createFolder = folder; QString folderName = Rename::getText(tr("Foldername"), tr("<p>Please enter the name of the new folder.</p>"), this); if (folderName.isNull()) return; folder.topFolder().handler()->iCreate(folder.fullName() + folder.separator() + folderName); connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPCreate(IMAPResponse &))); } else if (itemid == MENU_RESCAN) { Folder folder = (((FolderWidgetItem *)currentItem())->folder()); _rescanAccount = folder.topFolder().account(); - folder.topFolder().handler()->iList(".", "*"); + folder.topFolder().handler()->iList("", "*"); connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPList(IMAPResponse &))); } } void FolderWidget::slotItemClicked(QListViewItem *item) { if (item == NULL) return; Folder folder = ((FolderWidgetItem *)item)->folder(); if (folder.fullName().isEmpty()) return; emit folderSelected(folder); } void FolderWidget::slotIMAPLookingUpHost() { emit status(tr("Looking up host...")); emit connecting(); } void FolderWidget::slotIMAPHostFound() { emit status(tr("Host found.")); } void FolderWidget::slotIMAPConnected() { emit status(tr("Connected to host.")); emit connected(); } void FolderWidget::slotIMAPError(int error) { if (error == IMAPBase::IMAPErrConnectionRefused) { QMessageBox::warning(this, tr("Error"), tr("<p>The IMAP connection was refused.</p>"), tr("Ok")); } else if (error == IMAPBase::IMAPErrHostNotFound) { QMessageBox::warning(this, tr("Error"), tr("<p>The host was not found.</p>"), tr("Ok")); } else if (error == IMAPBase::IMAPErrSocketRead) { QMessageBox::warning(this, tr("Error"), tr("<p>There was an error while reading from the socket.</p>"), tr("Ok")); } else if (error == IMAPBase::IMAPErrLoginFailed) { QMessageBox::warning(this, tr("Error"), tr("<p>Login failed. Check your password/username.</p>"), tr("Ok")); } else { QMessageBox::warning(this, tr("Error"), tr("<p>An unknown error was encountered.</p>"), tr("Ok")); } } void FolderWidget::slotIMAPDisconnected() { emit status(tr("Disconnected.")); |