-rw-r--r-- | kmicromail/mainwindow.cpp | 27 | ||||
-rw-r--r-- | microkde/kapplication.cpp | 9 | ||||
-rw-r--r-- | microkde/kapplication.h | 1 |
3 files changed, 34 insertions, 3 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 24196b4..e020297 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp @@ -171,17 +171,42 @@ MainWindow::~MainWindow() } void MainWindow::showLicence() { KApplication::showLicence(); } void MainWindow::showAbout() { - qDebug("MainWindow::showAbout() "); + QString version; +#include <../version> + + QString cap = "About KOpieMail/Pi"; + QString text = i18n("KOpieMail/Platform-independent\n") + + "(OM/Pi) " + version + " - " + +#ifdef DESKTOP_VERSION + "Desktop Edition\n" +#else + "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" +#endif + "www.pi-sync.net\n\n" + + + +"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net>\n" + "KOpieMail/Pi is based on Opie Mail\n" + "Copyright (c) Rajko Albrecht and the Opie team\n" + "KOpieMail/Pi is licensed under the GPL\n" + "\n" + "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" + "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" + "libEtPan has its own licence - see LibEtPan licence\n"; + + KApplication::showText( cap, text ); } void MainWindow::showEtpanLicence() { KApplication::showFile( "LibEtPan licence", "kdepim/kmicromail/COPYRIGHTlibetpan" ); } void MainWindow::appMessage(const QCString &, const QByteArray &) { diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index ad0b78e..98ef2f2 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp @@ -55,25 +55,30 @@ void KApplication::showFile(QString caption, QString fn) #endif QFile file( fileName ); if (!file.open( IO_ReadOnly ) ) { return ; } QTextStream ts( &file ); text = ts.read(); file.close(); - + KApplication::showText( caption, text ); + +} + +void KApplication::showText(QString caption, QString text) +{ QDialog dia( 0, "name", true ); ; dia.setCaption( caption ); QVBoxLayout* lay = new QVBoxLayout( &dia ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QTextBrowser tb ( &dia ); lay->addWidget( &tb ); tb.setText( text ); #ifdef DESKTOP_VERSION dia.resize( 640, 480); #else dia.showMaximized(); #endif dia.exec(); - + } diff --git a/microkde/kapplication.h b/microkde/kapplication.h index 5ae5c00..79cdb33 100644 --- a/microkde/kapplication.h +++ b/microkde/kapplication.h @@ -14,12 +14,13 @@ class KApplication * Generates a random string. It operates in the range [A-Za-z0-9] * @param length Generate a string of this length. * @return the random string */ static QString randomString(int length); static int execDialog( QDialog* ); static void showLicence(); static void showFile(QString caption, QString file); + static void showText(QString caption, QString text); }; #endif |