[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: PATCH: show welcome page if user updates
From: Daniel Naber <daniel.naber () t-online ! de>
Date: 2001-04-20 23:58:54
[Download RAW message or body]
Hi,
with such a cool welcome page - shouldn't we also show it once if a user has just updated KMail?
regards
daniel
--
Daniel Naber, Paul-Gerhardt-Str. 2, 33332 Guetersloh, Germany
Tel. 05241-59371, Mobil 0170-4819674
["about-page.diff" (text/x-c++)]
Index: kmkernel.h
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmkernel.h,v
retrieving revision 1.14
diff -u -r1.14 kmkernel.h
--- kmkernel.h 2001/01/04 01:25:50 1.14
+++ kmkernel.h 2001/04/20 23:52:44
@@ -83,6 +83,7 @@
inline KMSender *msgSender() { return the_msgSender; }
inline bool firstStart() { return the_firstStart; }
+ inline QString previousVersion() { return the_previousVersion; }
inline bool shuttingDown() { return the_shuttingDown; }
inline bool checkingMail() { return the_checkingMail; }
inline void setCheckingMail(bool flag) { the_checkingMail = flag; }
@@ -104,6 +105,8 @@
KabAPI *the_KAB_addrBook;
KMSender *the_msgSender;
+ QString the_previousVersion; // previous KMail version. If different from current,
+ // the user has just updated? read from config
bool the_firstStart; // is this the first start? read from config
bool the_shuttingDown; // are we going down? set from here
bool the_checkingMail; // are we checking mail? set from... where the mail is checked
Index: kmkernel.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmkernel.cpp,v
retrieving revision 1.42
diff -u -r1.42 kmkernel.cpp
--- kmkernel.cpp 2001/04/15 19:01:16 1.42
+++ kmkernel.cpp 2001/04/20 23:52:50
@@ -32,6 +32,7 @@
#include "kmaddrbook.h"
#include "kfileio.h"
#include "kmpgpwrap.h"
+#include "kmversion.h"
#include <kabapi.h>
#include <kwin.h>
@@ -444,6 +445,8 @@
cfg->setGroup("General");
the_firstStart = cfg->readBoolEntry("first-start", true);
+ the_previousVersion = cfg->readEntry("previous-version", "");
+ cfg->writeEntry("previous-version", KMAIL_VERSION);
foldersPath = cfg->readEntry("folders", "");
acctPath = cfg->readEntry("accounts", foldersPath + "/.kmail-accounts");
Index: kmreaderwin.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmreaderwin.cpp,v
retrieving revision 1.271
diff -u -r1.271 kmreaderwin.cpp
--- kmreaderwin.cpp 2001/04/20 19:35:09 1.271
+++ kmreaderwin.cpp 2001/04/20 23:52:58
@@ -424,14 +424,16 @@
if (codec) mViewer->setCharset(codec->name(), true);
else mViewer->setCharset(KGlobal::locale()->charset(), true);
adjustFontSize();
- mViewer->write(content.arg(
+ QString info =
i18n("<h2>Welcome to KMail %1</h2><p>KMail is an email client for the K "
"Desktop Environment. It is designed to be fully compatible with Internet "
"mailing standards including MIME, SMTP, POP3 and IMAP.</p>\n"
"<ul><li>KMail has many powerful features which are described in the "
"<A HREF=\"%2\">documentation</A></li>\n"
"<li>You can find news and updates at the <A HREF=\"%3\">KMail homepage"
- "</A></li></ul>\n") +
+ "</A></li></ul>\n").arg(KMAIL_VERSION)
+ .arg("help:kmail")
+ .arg("http://kmail.kde.org/") +
i18n("<p>Some of the new features in this release of KMail include "
"(compared to KMail 1.2, which is part of KDE 2.1):</p>\n"
"<ul>\n"
@@ -440,7 +442,7 @@
"<li>Performance improvements for huge folders</li>\n"
"<li>Message scoring</li>\n"
"<li>Only the selected part of a mail will be quoted on reply</li>\n"
- "<li>Delete old messages from the trash folder on exit</li>\n"
+ "<li>Delete only <em>old</em> messages from the trash folder on exit</li>\n"
"<li>Collapsable threads</li>\n"
"<li>Multiple PGP identities</li>\n"
"<li>Bind an SMTP server to an identity</li>\n"
@@ -448,16 +450,17 @@
"<li>Messages can be flagged</li>\n"
"<li>Automatic filter creation</li>\n"
"<li>Read the new messages by only hitting the space key</li>\n"
- "</ul>\n") +
- i18n("<p>Please take a moment to fill in the KMail configuration panel at "
+ "</ul>\n");
+ if( kernel->firstStart() ) {
+ info += i18n("<p>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 a mail "
- "account.</p>\n"
- "<p>We hope that you will enjoy KMail.</p>\n"
+ "account.</p>\n");
+ }
+ info += i18n("<p>We hope that you will enjoy KMail.</p>\n"
"<p>Thank you,</p>\n"
- "<p> The KMail Team</p>")).arg(KMAIL_VERSION)
- .arg("help:kmail")
- .arg("http://kmail.kde.org/"));
+ "<p> The KMail Team</p>");
+ mViewer->write(content.arg(info));
mViewer->end();
}
Index: kmmainwin.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmmainwin.cpp,v
retrieving revision 1.291
diff -u -r1.291 kmmainwin.cpp
--- kmmainwin.cpp 2001/04/18 14:02:56 1.291
+++ kmmainwin.cpp 2001/04/20 23:53:07
@@ -64,6 +64,7 @@
#include "kmsender.h"
#include "kmaddrbookdlg.h"
#include "kmaddrbook.h"
+#include "kmversion.h"
#include "kwin.h"
#include <errno.h>
@@ -106,7 +107,9 @@
readConfig();
activatePanners();
- if (kernel->firstStart()) idx = mFolderTree->firstChild(); else
+ if (kernel->firstStart() || kernel->previousVersion() != KMAIL_VERSION)
+ idx = mFolderTree->firstChild();
+ else
idx = mFolderTree->indexOfFolder(kernel->inboxFolder());
if (idx!=0) {
mFolderTree->setCurrentItem(idx);
_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic