some more KDE2 changes. Some left. I'm neither a XDND or QSplitter expert :)

svn path=/trunk/kdenetwork/kmail/; revision=26078
wilder-work
Stephan Kulow 27 years ago
parent f035fba770
commit 9408b3fa6e
  1. 5
      kbusyptr.cpp
  2. 5
      kfileio.cpp
  3. 1
      kmaccount.h
  4. 4
      kmacctlocal.cpp
  5. 3
      kmacctpop.cpp
  6. 1
      kmacctpop.h
  7. 11
      kmaddrbook.cpp
  8. 7
      kmaddrbookdlg.cpp
  9. 3
      kmcomposewin.cpp
  10. 1
      kmcomposewin.h
  11. 1
      kmfilterdlg.cpp
  12. 1
      kmfolderdia.cpp
  13. 10
      kmfoldertree.cpp
  14. 5
      kmfoldertree.h
  15. 1
      kmheaders.cpp
  16. 14
      kmmainwin.cpp
  17. 4
      kmmainwin.h
  18. 3
      kmmsgpart.cpp
  19. 1
      kmreaderwin.cpp
  20. 1
      kmreaderwin.h
  21. 1
      kmsettings.cpp
  22. 7
      kpgp.cpp
  23. 20
      main.cpp

@ -8,6 +8,7 @@
#include <qtimer.h>
#include <assert.h>
#include <stdio.h>
#include <kstddirs.h>
//-----------------------------------------------------------------------------
KBusyPtr :: KBusyPtr ()
@ -115,9 +116,7 @@ bool KBusyPtr :: loadBitmap (QBitmap& bm, const QString& filename)
}
else
{
f = app->kde_datadir().copy();
f += "/kmail/pics/";
f += filename;
f = locate("data", "kmail/pics/" + filename);
}
rc = bm.load(f);
if (!rc) printf ("ERROR: cannot load bitmap %s\n", f.data());

@ -3,7 +3,6 @@
#include <kapp.h>
#include <kapp.h>
#include <kmsgbox.h>
#include <qmessagebox.h>
#include <qstring.h>
#include <unistd.h>
@ -24,8 +23,8 @@ static void msgDialog(const char* msg, const char* arg=NULL)
if (arg) str.sprintf(msg, arg);
else str = msg;
KMsgBox::message(NULL, i18n("File I/O Error"), str,
KMsgBox::STOP, i18n("OK"));
QMessageBox::warning(NULL, i18n("File I/O Error"), str,
i18n("OK"));
}

@ -9,7 +9,6 @@
#include <qlist.h>
#include <qtimer.h>
#include <qsignal.h>
#include <kmsgbox.h>
#include "kmnewiostatuswdg.h"
class KMAcctMgr;

@ -12,12 +12,12 @@
#include <kapp.h>
#include <kconfig.h>
#include <kmsgbox.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <klocale.h>
#include <qmessagebox.h>
#ifdef HAVE_PATHS_H
#include <paths.h> /* defines _PATH_MAILDIR */
@ -83,7 +83,7 @@ bool KMAcctLocal::processNewMail(KMIOStatus *statusWdg)
QString aStr;
aStr = i18n("Cannot open file:");
aStr += mailFolder.path()+"/"+mailFolder.name();
KMsgBox::message(0,"KMail notification",aStr);
QMessageBox::information(0,i18n("KMail notification"),aStr, i18n("OK"));
perror("cannot open file "+mailFolder.path()+"/"+mailFolder.name());
return FALSE;
}

@ -23,6 +23,7 @@
#include "kmacctfolder.h"
#include "kmfiltermgr.h"
#include <klocale.h>
#include <qmessagebox.h>
//-----------------------------------------------------------------------------
@ -327,7 +328,7 @@ bool KMAcctPop::popError(const QString aStage, DwPopClient& aClient) const
.arg(name())
.arg(aStage)
.arg(msg);
KMsgBox::message(0, caption, tmp);
QMessageBox::information(0, caption, tmp, i18n("OK"));
//kbp->busy();
aClient.Quit();
return gotMsgs;

@ -6,6 +6,7 @@
#include "kmaccount.h"
#include <kapp.h>
#include <qdialog.h>
class QLineEdit;
class QPushButton;
class DwPopClient;

@ -5,11 +5,11 @@
#include "kmaddrbook.h"
#include <kapp.h>
#include <kconfig.h>
#include <kmsgbox.h>
#include <qfile.h>
#include <assert.h>
#include <klocale.h>
#include <kstddirs.h>
#include <qmessagebox.h>
//-----------------------------------------------------------------------------
KMAddrBook::KMAddrBook(): KMAddrBookInherited()
@ -24,8 +24,9 @@ KMAddrBook::~KMAddrBook()
if (mModified)
{
if(store() == IO_FatalError)
KMsgBox::message(0,i18n("KMail Error"),
i18n("Storing the addressbook failed!\n"));
QMessageBox::warning(0,i18n("KMail Error"),
i18n("Storing the addressbook failed!\n"),
i18n("OK"));
}
writeConfig(FALSE);
@ -161,8 +162,8 @@ int KMAddrBook::fileError(int status) const
}
str.sprintf(msg, mDefaultFileName.data());
KMsgBox::message(NULL, i18n("File I/O Error"), str,
KMsgBox::STOP, i18n("OK"));
QMessageBox::warning(NULL, i18n("File I/O Error"), str,
i18n("OK"));
return status;
}

@ -5,8 +5,8 @@
#include "kmaddrbook.h"
#include <assert.h>
#include <kapp.h>
#include <kmsgbox.h>
#include <klocale.h>
#include <qmessagebox.h>
//-----------------------------------------------------------------------------
KMAddrBookSelDlg::KMAddrBookSelDlg(KMAddrBook* aAddrBook, const char* aCap):
@ -176,8 +176,9 @@ void KMAddrBookEditDlg::slotOk()
}
if(mAddrBook->store() == IO_FatalError)
{
KMsgBox::message(0,i18n("KMail error"),
i18n("Storing addressbook failed"));
QMessageBox::warning(0,i18n("KMail error"),
i18n("Storing addressbook failed"),
i18n("OK"));
}
accept();
}

@ -22,12 +22,10 @@
#endif
#include <assert.h>
#include <drag.h>
#include <kapp.h>
#include <kiconloader.h>
#include <kapp.h>
#include <kmenubar.h>
#include <kmsgbox.h>
#include <kstatusbar.h>
#include <ktablistbox.h>
#include <ktoolbar.h>
@ -52,6 +50,7 @@
#include <unistd.h>
#include <errno.h>
#include <klocale.h>
#include <drag.h>
#if defined CHARSETS
#include <kcharsets.h>

@ -16,7 +16,6 @@
#include <qpalette.h>
#include <keditcl.h>
#include <kmsgbox.h>
#include "kmmsgpart.h"

@ -11,7 +11,6 @@
#include "kmfoldermgr.h"
#include <kapp.h>
#include <kmsgbox.h>
#include <ktablistbox.h>
#include <kbuttonbox.h>
#include <qbuttongroup.h>

@ -5,7 +5,6 @@
#include <qdir.h>
#include <qfile.h>
#include <qtextstream.h>
#include <kmsgbox.h>
#include <kapp.h>
#include <qlineedit.h>
#include <qpushbutton.h>

@ -8,7 +8,6 @@
#include <kiconloader.h>
#include <qtimer.h>
#include <qpopupmenu.h>
#include <drag.h>
#include <klocale.h>
#include <kglobal.h>
@ -35,9 +34,7 @@ KMFolderTree::KMFolderTree(QWidget *parent,const char *name) :
mUpdateTimer = NULL;
mDropZone = new KDNDDropZone(this, DndRawData);
connect(mDropZone, SIGNAL(dropAction(KDNDDropZone*)),
this, SLOT(doDropAction(KDNDDropZone*)));
setDropAccepted(true);
connect(this, SIGNAL(highlighted(int,int)),
this, SLOT(doFolderSelected(int,int)));
@ -114,8 +111,7 @@ KMFolderTree::~KMFolderTree()
disconnect(folderMgr, SIGNAL(changed()), this, SLOT(doFolderListChanged()));
if (mDropZone) delete mDropZone;
if (mUpdateTimer) delete mUpdateTimer;
delete mUpdateTimer;
}
@ -204,7 +200,7 @@ void KMFolderTree::doFolderListChanged()
//-----------------------------------------------------------------------------
void KMFolderTree::doDropAction(KDNDDropZone* aDropZone)
void KMFolderTree::dropEvent(QDropEvent * event)
{
KMFolder *toFld, *fromFld;
KMDragData* dd;

@ -5,7 +5,7 @@
#include <ktablistbox.h>
#include "kmfolder.h"
class KDNDDropZone;
class QDropEvent;
class QTimer;
#define KMFolderTreeInherited KTabListBox
@ -33,7 +33,7 @@ protected slots:
void doFolderListChanged();
/** called when a drop occurs. */
void doDropAction(KDNDDropZone*);
void dropEvent(QDropEvent*);
/** Updates the folder tree only if some folder lable has changed */
void refresh(KMFolder*);
@ -51,7 +51,6 @@ protected:
virtual void resizeEvent(QResizeEvent*);
KMFolderNodeList mList;
KDNDDropZone* mDropZone;
QTimer* mUpdateTimer;
};

@ -4,7 +4,6 @@
#include <qstrlist.h>
#include "kmcomposewin.h"
#include <kfiledialog.h>
#include <drag.h>
#include <qpalette.h>
#include <qcolor.h>

@ -28,13 +28,11 @@
#include <qpixmap.h>
#include <qfile.h>
#include <qtextstream.h>
#include <kmsgbox.h>
#include <kconfig.h>
#include <kapp.h>
#include <kglobal.h>
#include <kiconloader.h>
#include <kstdaccel.h>
#include <knewpanner.h>
#include <krun.h>
#include <errno.h>
@ -183,7 +181,7 @@ void KMMainWin::writeConfig(void)
//-----------------------------------------------------------------------------
void KMMainWin::createWidgets(void)
{
KNewPanner *pnrMsgView, *pnrMsgList, *pnrFldList;
QSplitter *pnrMsgView, *pnrMsgList, *pnrFldList;
QAccel *accel = new QAccel(this);
// create panners
@ -398,8 +396,8 @@ void KMMainWin::slotCheckMail()
if(checkingMail)
{
KMsgBox::message(0,i18n("KMail error"),
i18n("Already checking for mail!"));
QMessageBox::warning(0,i18n("KMail error"),
i18n("Already checking for mail!"), i18n("OK"));
return;
}
@ -432,8 +430,8 @@ void KMMainWin::slotCheckOneAccount(int item)
if(checkingMail)
{
KMsgBox::message(0,i18n("KMail error"),
i18n("Already checking for mail!"));
QMessageBox::warning(0,i18n("KMail error"),
i18n("Already checking for mail!"), i18n("OK"));
return;
}
@ -524,7 +522,7 @@ void KMMainWin::slotRemoveFolder()
str = i18n("Are you sure you want to remove the folder\n"
"\"%1\", discarding it's contents ?")
.arg(mFolder->label());
if ((KMsgBox::yesNo(this,i18n("Confirmation"),str, KMsgBox::DB_SECOND))==1)
if ((QMessageBox::information(this,i18n("Confirmation"),str, i18n("Yes"), i18n("No")))==0)
{
mHeaders->setFolder(NULL);
mMsgView->clear();

@ -11,7 +11,7 @@ class KMFolder;
class KMFolderTree;
class KMHeaders;
class KMReaderWin;
class KNewPanner;
class QSplitter;
class KMenuBar;
class KToolBar;
class KStatusBar;
@ -134,7 +134,7 @@ protected:
KStatusBar *mStatusBar;
KMFolderTree *mFolderTree;
KMReaderWin *mMsgView;
KNewPanner *mHorizPanner, *mVertPanner;
QSplitter *mHorizPanner, *mVertPanner;
KMHeaders *mHeaders;
KMFolder *mFolder;
QPopupMenu *mViewMenu, *mBodyPartsMenu;

@ -165,8 +165,7 @@ const QString KMMessagePart::iconName(void) const
QString fileName, icon;
QDir dir;
fileName = KApplication::kde_mimedir() + "/" + mType + "/" +
mSubtype + ".kdelnk";
fileName = locate("mime", mType + "/" + mSubtype + ".desktop");
if (dir.exists(fileName))
{

@ -75,7 +75,6 @@ KMReaderWin::KMReaderWin(QWidget *aParent, const char *aName, int aFlags)
{
initMetaObject();
mPicsDir = app->kde_datadir()+"/kmail/pics/";
mAutoDelete = FALSE;
mMsg = NULL;

@ -173,7 +173,6 @@ protected:
KMMessage *mMsg;
KHTMLWidget *mViewer;
QScrollBar *mSbVert, *mSbHorz;
QString mPicsDir;
HeaderStyle mHeaderStyle;
AttachmentStyle mAttachmentStyle;
bool mAutoDelete;

@ -20,7 +20,6 @@
#include <kapp.h>
#include <kapp.h>
#include <kmsgbox.h>
#include <kfiledialog.h>
#include <ktablistbox.h>
#include <qbuttongroup.h>

@ -26,8 +26,8 @@
#include <ksimpleconfig.h>
#include <kiconloader.h>
#include <kglobal.h>
#include <kmsgbox.h>
#include <klocale.h>
#include <qmessagebox.h>
Kpgp *Kpgp::kpgpObject = 0L;
@ -282,12 +282,11 @@ Kpgp::encryptFor(const QStrList& aPers, bool sign)
}
if(persons.isEmpty())
{
int ret = KMsgBox::yesNo(0,i18n("PGP Warning"),
int ret = QMessageBox::warning(0,i18n("PGP Warning"),
i18n("Could not find the public keys for the\n"
"recipients of this mail.\n"
"Message will not be encrypted."),
KMsgBox::EXCLAMATION,
i18n("Continue"), i18n("Cancel"));
i18n("Continue"), i18n("Cancel"));
if(ret == 2) return false;
}
else if(!noKeyFor.isEmpty())

@ -23,7 +23,6 @@
#include <kapp.h>
#include <stdio.h>
#include <stdlib.h>
#include <kmsgbox.h>
#include <kapp.h>
#include <kstdaccel.h>
#include <kmidentity.h>
@ -114,7 +113,7 @@ static void ungrabPtrKb(void)
// Message handler
static void kmailMsgHandler(QtMsgType aType, const char* aMsg)
{
QString appName = app->name();
QString appName = app->getCaption();
QString msg = aMsg;
static int recurse=-1;
@ -136,8 +135,7 @@ static void kmailMsgHandler(QtMsgType aType, const char* aMsg)
!recurse)
{
ungrabPtrKb();
KMsgBox::message(NULL, appName+" "+i18n("warning"), msg.data(),
KMsgBox::EXCLAMATION);
QMessageBox::warning(NULL, kapp->getCaption(), msg, i18n("OK"));
}
else kdebug(KDEBUG_INFO, 0, msg);
break;
@ -145,8 +143,8 @@ static void kmailMsgHandler(QtMsgType aType, const char* aMsg)
case QtFatalMsg:
ungrabPtrKb();
fprintf(stderr, appName+" "+i18n("fatal error")+": %s\n", msg.data());
KMsgBox::message(NULL, appName+" "+i18n("fatal error"),
aMsg, KMsgBox::STOP);
QMessageBox::critical(NULL, appName+" "+i18n("fatal error"),
aMsg, i18n("OK"));
abort();
}
@ -325,8 +323,10 @@ static void testDir(const char *_name)
QString c = getenv("HOME");
if(c.isEmpty())
{
KMsgBox::message(0,i18n("KMail notification"),
i18n("$HOME is not set!\nKMail cannot start without it.\n"));
QMessageBox::critical(0,i18n("KMail notification"),
i18n("$HOME is not set!\n"
"KMail cannot start without it.\n"),
i18n("OK"));
exit(-1);
}
@ -722,6 +722,10 @@ main(int argc, char *argv[])
sprintf (lf, "%s.kmail%d.msg", _PATH_TMP, getuid());
msg = fopen (lf, "w");
int i;
KGlobal::dirs()->
addResourceType("kmail_pic",
KStandardDirs::kde_default("data") + "kmail/pics/");
app = new KApplication(argc, argv, "kmail"); // clear arg list
argc--;
argv++;

Loading…
Cancel
Save