author | tille <tille> | 2002-06-19 12:41:33 (UTC) |
---|---|---|
committer | tille <tille> | 2002-06-19 12:41:33 (UTC) |
commit | 2bcd7302e4e156ad5f389b23c01a690917abee01 (patch) (side-by-side diff) | |
tree | 25770523cbb36e7152f8a3a4c1650afab6fc45da | |
parent | b55f69a46fd27ce26235029f702c0f3942fde68c (diff) | |
download | opie-2bcd7302e4e156ad5f389b23c01a690917abee01.zip opie-2bcd7302e4e156ad5f389b23c01a690917abee01.tar.gz opie-2bcd7302e4e156ad5f389b23c01a690917abee01.tar.bz2 |
added ofiledialog for attachments, but did not yet remove attachdiag
-rw-r--r-- | noncore/unsupported/mail2/composer.cpp | 7 | ||||
-rw-r--r-- | noncore/unsupported/mail2/mail.pro | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/noncore/unsupported/mail2/composer.cpp b/noncore/unsupported/mail2/composer.cpp index 72a7242..03dacae 100644 --- a/noncore/unsupported/mail2/composer.cpp +++ b/noncore/unsupported/mail2/composer.cpp @@ -1,65 +1,67 @@ #include <qmultilineedit.h> #include <qmessagebox.h> #include <qpopupmenu.h> #include <qcombobox.h> #include <qlineedit.h> #include <qaction.h> #include <qtimer.h> #include <qlabel.h> #include <qapplication.h> #include <qpe/resource.h> #include <qpe/config.h> +#include <opie/ofiledialog.h> +//#include "attachdiag.h" + #include "addresspicker.h" #include "listviewplus.h" #include "smtphandler.h" -#include "attachdiag.h" #include "composer.h" #include "rename.h" AttachViewItem::AttachViewItem(QListView *parent, Attachment &attachment) : QListViewItem(parent), _attachment(attachment) { setPixmap(0, _attachment.docLnk().pixmap().isNull() ? Resource::loadPixmap("UnknownDocument-14") : _attachment.docLnk().pixmap()); setText(0, _attachment.newName().isEmpty() ? _attachment.fileName() : _attachment.newName()); setText(1, _attachment.description()); } Composer::Composer(QWidget *parent, const char *name, WFlags fl, bool sendQueue) : ComposerBase(parent, name, fl), _inLoop(false) { _sendQueued = sendQueue; abort->setEnabled(false); to->setFocus(); connect(sendmail, SIGNAL(activated()), SLOT(slotSendMail())); connect(queuemail, SIGNAL(activated()), SLOT(slotQueueMail())); connect(addressbook, SIGNAL(activated()), SLOT(slotOpenAddressPicker())); connect(addattach, SIGNAL(activated()), SLOT(slotAddAttach())); connect(delattach, SIGNAL(activated()), SLOT(slotDelAttach())); connect(from, SIGNAL(activated(int)), SLOT(slotFromChanged(int))); connect(attachPopup, SIGNAL(activated(int)), SLOT(slotPopupHandler(int))); QTimer::singleShot(0, this, SLOT(slotFillStuff())); QTimer::singleShot(0, this, SLOT(slotResizing())); } Composer::~Composer() { hide(); } void Composer::hide() { QWidget::hide(); if (_inLoop) { _inLoop = false; qApp->exit_loop(); } } @@ -349,64 +351,65 @@ void Composer::slotFillStuff() if (!(*it).email().isEmpty() && !(*it).smtpServer().isEmpty() && !(*it).smtpPort().isEmpty()) { if (!(*it).realName().isEmpty()) from->insertItem((*it).realName() + " <" + (*it).email() + ">", i); else from->insertItem((*it).email()); accountsLoaded.append(*it); i++; } } } void Composer::slotFromChanged(int id) { Account account = accountsLoaded[id]; if (account.defaultCc()) cc->setText(account.cc()); if (account.defaultBcc()) bcc->setText(account.bcc()); if (account.defaultReplyTo()) replyto->setText(account.replyTo()); if (!account.signature().isEmpty()) message->setText(message->text() + "\n\n-- \n" + account.signature()); } void Composer::slotOpenAddressPicker() { if (!to->isHidden() && cc->isHidden() && bcc->isHidden()) { if (to->text().isEmpty()) { to->setText(AddressPicker::getNames()); } else { to->setText(to->text() + ", " + AddressPicker::getNames()); } } else if (to->isHidden() && !cc->isHidden() && bcc->isHidden()) { if (cc->text().isEmpty()) { cc->setText(AddressPicker::getNames()); } else { cc->setText(cc->text() + ", " + AddressPicker::getNames()); } } else if (to->isHidden() && cc->isHidden() && !bcc->isHidden()) { if (bcc->text().isEmpty()) { bcc->setText(AddressPicker::getNames()); } else { bcc->setText(bcc->text() + ", " + AddressPicker::getNames()); } } } void Composer::slotAddAttach() { - DocLnk lnk = AttachDiag::getFile(this); + DocLnk lnk = OFileDialog::getOpenFileName( 1,"/"); +// DocLnk lnk = AttachDiag::getFile(this); if (lnk.name().isEmpty()) return; Attachment attachment; attachment.setFileName(lnk.file()); attachment.setNewName(lnk.name()); attachment.setDocLnk(lnk); (void) new AttachViewItem(attachView, attachment); } void Composer::slotDelAttach() { if (attachView->currentItem() == NULL) return; attachView->takeItem(attachView->currentItem()); } diff --git a/noncore/unsupported/mail2/mail.pro b/noncore/unsupported/mail2/mail.pro index 76b7996..cd21d4a 100644 --- a/noncore/unsupported/mail2/mail.pro +++ b/noncore/unsupported/mail2/mail.pro @@ -1,46 +1,46 @@ TEMPLATE = app CONFIG = qt warn_on debug #CONFIG = qt warn_on release HEADERS = accounteditor.h \ addresspicker.h \ attachdiag.h \ composer.h \ composerbase.h \ configdiag.h \ folderwidget.h \ listviewplus.h \ mailtable.h \ mainwindow.h \ mainwindowbase.h \ opendiag.h \ rename.h \ searchdiag.h \ viewmail.h \ viewmailbase.h SOURCES = accounteditor.cpp \ addresspicker.cpp \ attachdiag.cpp \ composer.cpp \ composerbase.cpp \ configdiag.cpp \ folderwidget.cpp \ listviewplus.cpp \ mailtable.cpp \ main.cpp \ mainwindow.cpp \ mainwindowbase.cpp \ opendiag.cpp \ rename.cpp \ searchdiag.cpp \ viewmail.cpp \ viewmailbase.cpp INTERFACES = accounteditorbase.ui \ addresspickerbase.ui \ configdiagbase.ui \ opendiagbase.ui \ renamebase.ui \ searchdiagbase.ui INCLUDEPATH += $(OPIEDIR)/include libmail -LIBS += -lmail -lqpe +LIBS += -lmail -lqpe -lopie TARGET = mail DESTDIR = $(OPIEDIR)/bin |