diff --git a/Makefile.am b/Makefile.am index 08921648c..3f95e6e80 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ KDE_CXXFLAGS = $(USE_RTTI) -UQT_NO_ASCII_CAST -UQT_NO_COMPAT -SUBDIRS = pics +SUBDIRS = about pics INCLUDES = $(all_includes) LDADD = $(LIB_KHTML) -lkspell -lmimelib -lkab $(LIB_KFILE) diff --git a/about/Makefile.am b/about/Makefile.am new file mode 100644 index 000000000..abb269cda --- /dev/null +++ b/about/Makefile.am @@ -0,0 +1,8 @@ + +data_DATA = background.png kmail.png lines2.png shadow1.png bgtable.png \ + konq.css main.html kdelogo2.png lines.png pointers.png + +datadir = $(kde_datadir)/kmail/about + +EXTRA_DIST = $(data_DATA) + diff --git a/about/background.png b/about/background.png new file mode 100644 index 000000000..ef366ccf5 Binary files /dev/null and b/about/background.png differ diff --git a/about/bgtable.png b/about/bgtable.png new file mode 100644 index 000000000..f7e21d992 Binary files /dev/null and b/about/bgtable.png differ diff --git a/about/kdelogo2.png b/about/kdelogo2.png new file mode 100644 index 000000000..10ac5f8b7 Binary files /dev/null and b/about/kdelogo2.png differ diff --git a/about/kmail.png b/about/kmail.png new file mode 100644 index 000000000..a258f040b Binary files /dev/null and b/about/kmail.png differ diff --git a/about/konq.css b/about/konq.css new file mode 100644 index 000000000..5566b04f0 --- /dev/null +++ b/about/konq.css @@ -0,0 +1,59 @@ +body {background-color: #3679AD; + color: #000000; + margin-left: 0; + margin-right: 0; + margin-top: 5; + padding: 0; + background-image: url(background.png); + background-repeat: no-repeat; + background-position: top-center;} + +td.trans {background-image: url(bgtable.png); + background-repeat: no-repeat;} +td.end {background-image: url(lines2.png); + background-repeat: x-repeat;} +td.shadow1 {background-image: url(shadow1.png); + background-repeat: x-repeat;} + +table.vnice { font-family: verdana,geneva,arial,helvetica,sans-serif; + font-size: x-small;} + +a:link {background-color: transparent; + color: #191970; + text-decoration:none;} +a:visited {background-color: transparent; + color: #551a8a; + text-decoration:none;} +a:active {background-color: transparent; + color: #fe0000; + text-decoration:none;} +a:hover {background-color: transparent; + color: #1919aa; + text-decoration:underline;} + +tr.menurow {background-color: #505050; + color: #000000; + vertical-align: middle;} + +td.deco {color: #ffffff; + background-color: #505050; + font-family: verdana,geneva,arial,helvetica,sans-serif; + font-size: small;} + +td.menuactive {color: #ffcc00; + background-color: #777777; + font-family: verdana,geneva,arial,helvetica,sans-serif; + font-size: small;} + +td.menu {color: #ffffff; + background-color: #505050; + font-family: verdana,geneva,arial,helvetica,sans-serif; + font-size: small;} + +a.menu {color: #eeeeee; + font-family: verdana,geneva,arial,helvetica,sans-serif; + font-size: small;} + +a.menu:hover {color: #ffffff; + text-decoration:none;} + diff --git a/about/lines.png b/about/lines.png new file mode 100644 index 000000000..ca3e434c7 Binary files /dev/null and b/about/lines.png differ diff --git a/about/lines2.png b/about/lines2.png new file mode 100644 index 000000000..5bcb5d8b8 Binary files /dev/null and b/about/lines2.png differ diff --git a/about/main.html b/about/main.html new file mode 100644 index 000000000..5edf56ac6 --- /dev/null +++ b/about/main.html @@ -0,0 +1,102 @@ + + + + Conquer your Desktop! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
 KMail 
+ + + + + +
+
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
  
  + + + +%1 + + + + + +  
  
+ +
 
 
+ + + + + + + + + +
 KDE
 
+ + + diff --git a/about/pointers.png b/about/pointers.png new file mode 100644 index 000000000..17bfb2eb8 Binary files /dev/null and b/about/pointers.png differ diff --git a/about/shadow1.png b/about/shadow1.png new file mode 100644 index 000000000..b57787697 Binary files /dev/null and b/about/shadow1.png differ diff --git a/kmfoldermgr.cpp b/kmfoldermgr.cpp index d8a65b224..a20e06e8d 100644 --- a/kmfoldermgr.cpp +++ b/kmfoldermgr.cpp @@ -182,7 +182,7 @@ KMFolder* KMFolderMgr::findOrCreate(const QString& aFolderName) exit(-1); } - if (aFolderName == "inbox") { +/* if (aFolderName == "inbox") { KMMessage *welcomeMessage; welcomeMessage = new KMMessage; @@ -213,7 +213,7 @@ KMFolder* KMFolderMgr::findOrCreate(const QString& aFolderName) default: break; } - } + } */ } return folder; } diff --git a/kmmainwin.cpp b/kmmainwin.cpp index 3624e020f..c8904017f 100644 --- a/kmmainwin.cpp +++ b/kmmainwin.cpp @@ -103,7 +103,8 @@ KMMainWin::KMMainWin(QWidget *, char *name) : readConfig(); activatePanners(); - idx = mFolderTree->indexOfFolder(kernel->inboxFolder()); + if (kernel->firstStart()) idx = mFolderTree->firstChild(); else + idx = mFolderTree->indexOfFolder(kernel->inboxFolder()); if (idx!=0) { mFolderTree->setCurrentItem(idx); mFolderTree->setSelected(idx,TRUE); @@ -1037,10 +1038,22 @@ void KMMainWin::slotSetHeaderStyle(int id) //----------------------------------------------------------------------------- void KMMainWin::folderSelected(KMFolder* aFolder) { - if (mFolder == aFolder) + if (mFolder == aFolder && aFolder) return; kernel->kbp()->busy(); + if (!aFolder) + { + mMsgView->setMsg(0,TRUE); + if (mLongFolderList) mHeaders->hide(); + mMsgView->displayAboutPage(); + } + else if (!mFolder) + { + mMsgView->enableMsgDisplay(); + mMsgView->setMsg(0,TRUE); + mHeaders->show(); + } writeFolderConfig(); mFolder = (KMFolder*)aFolder; readFolderConfig(); @@ -1218,7 +1231,8 @@ void KMMainWin::slotUrlClicked(const KURL &aUrl, int) win->show(); } else if ((aUrl.protocol() == "http") || (aUrl.protocol() == "https") || - (aUrl.protocol() == "ftp") || (aUrl.protocol() == "file")) + (aUrl.protocol() == "ftp") || (aUrl.protocol() == "file") || + (aUrl.protocol() == "help")) { statusMsg(i18n("Opening URL...")); KMimeType::Ptr mime = KMimeType::findByURL( aUrl ); diff --git a/kmreaderwin.cpp b/kmreaderwin.cpp index 7b5bb5bbc..bf76aa047 100644 --- a/kmreaderwin.cpp +++ b/kmreaderwin.cpp @@ -98,6 +98,7 @@ KMReaderWin::KMReaderWin(QWidget *aParent, const char *aName, int aFlags) mMsgBuf = 0; mMsgBufMD5 = ""; mMsgBufSize = -1; + mMsgDisplay = TRUE; initHtmlWidget(); readConfig(); @@ -443,6 +444,44 @@ void KMReaderWin::clearCache() mMsg = 0; } + +//----------------------------------------------------------------------------- +void KMReaderWin::displayAboutPage() +{ + mMsgDisplay = FALSE; + QString location = locate("data", "kmail/about/main.html"); + QString content = kFileToString(location); + mViewer->closeURL(); + mViewer->begin(location); + mViewer->setCharset(KGlobal::locale()->charset(), true); + mViewer->write(content.arg( + i18n("

Welcome to KMail 1.2

KMail is an email client for the K " + "Desktop Environment. It is designed to be fully compatible with Internet " + "mailing standards including MIME, SMTP and POP3.

\n" + "\n" + "

Some of the new features in this release of KMail include " + "(compared to KMail 1.1.99, which is part of KDE 2.0):

\n" + "\n" + "

Please take a moment to fill in the KMail configuration panel at " + "Settings->Configuration.\n" + "You need to at least create a primary identity and setup a mail " + "spool/POP3 account.

\n" + "

We hope that you will enjoy KMail.

\n" + "

Thank you,

\n" + "

    The KMail Team

")).arg("help:kmail") + .arg("http://kmail.kde.org/")); + mViewer->end(); +} + + //----------------------------------------------------------------------------- void KMReaderWin::updateReaderWin() { @@ -465,6 +504,8 @@ void KMReaderWin::updateReaderWin() if (mMsg && !mMsg->msgIdMD5().isEmpty()) updateReaderWinTimer.start( delay, TRUE ); + if (!mMsgDisplay) return; + if (mMsg) parseMsg(); else { @@ -1316,8 +1357,8 @@ void KMReaderWin::slotUrlOpen(const KURL &aUrl, const KParts::URLArgs &) slotAtmOpen(); } else { - if (aUrl.protocol().isEmpty() || (aUrl.protocol() == "file")) - return; +// if (aUrl.protocol().isEmpty() || (aUrl.protocol() == "file")) +// return; emit urlClicked(aUrl,/* aButton*/LeftButton); //### FIXME: add button to URLArgs! } } diff --git a/kmreaderwin.h b/kmreaderwin.h index 53ba40c55..e47df9c37 100644 --- a/kmreaderwin.h +++ b/kmreaderwin.h @@ -104,6 +104,12 @@ public: /** Is html mail to be supported? Takes into account override */ bool htmlMail(); + /** Display the about page instead of a message */ + void displayAboutPage(); + + /** Enable the displaying of messages again after an URL was displayed */ + void enableMsgDisplay() { mMsgDisplay = TRUE; } + /** View message part of type message/RFC822 in extra viewer window. */ void atmViewMsg(KMMessagePart* msgPart); @@ -239,6 +245,7 @@ protected: QTimer mResizeTimer; QTextCodec *mCodec; bool mAutoDetectEncoding; + bool mMsgDisplay; int fntSize; QString mBodyFamily;