summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/kmicromail/COPYRIGHTlibetpan28
-rw-r--r--kmicromail/mainwindow.cpp27
-rw-r--r--kmicromail/mainwindow.h3
-rw-r--r--microkde/kapplication.cpp14
-rw-r--r--microkde/kapplication.h1
5 files changed, 68 insertions, 5 deletions
diff --git a/bin/kdepim/kmicromail/COPYRIGHTlibetpan b/bin/kdepim/kmicromail/COPYRIGHTlibetpan
new file mode 100644
index 0000000..a8b98f9
--- a/dev/null
+++ b/bin/kdepim/kmicromail/COPYRIGHTlibetpan
@@ -0,0 +1,28 @@
+libEtPan! -- a mail stuff library
+
+Copyright (C) 2001, 2002 - DINH Viet Hoa
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the libEtPan! project nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index aa51a37..24196b4 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -6,4 +6,5 @@
#include <kdialog.h>
#include <kiconloader.h>
+#include <kapplication.h>
#ifndef DESKTOP_VERSION
@@ -151,4 +152,17 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
closeMail->addTo(toolBar);
closeMail->addTo(mailMenu);
+
+
+ QPopupMenu* helpMenu = new QPopupMenu( menuBar );
+ menuBar->insertItem( tr( "Help" ), helpMenu );
+ QAction* li = new QAction(tr("About"), QPixmap(), 0, 0, this);
+ connect( li, SIGNAL( activated() ), SLOT( showAbout()) );
+ li->addTo(helpMenu);
+ li = new QAction(tr("Licence"),QPixmap(), 0, 0, this);
+ connect( li, SIGNAL( activated() ), SLOT( showLicence()) );
+ li->addTo(helpMenu);
+ li = new QAction(tr("LibEtPan Licence"), QPixmap(), 0, 0, this);
+ connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) );
+ li->addTo(helpMenu);
}
@@ -157,4 +171,17 @@ MainWindow::~MainWindow()
}
+void MainWindow::showLicence()
+{
+ KApplication::showLicence();
+}
+void MainWindow::showAbout()
+{
+ qDebug("MainWindow::showAbout() ");
+}
+void MainWindow::showEtpanLicence()
+{
+ KApplication::showFile( "LibEtPan licence", "kdepim/kmicromail/COPYRIGHTlibetpan" );
+
+}
void MainWindow::appMessage(const QCString &, const QByteArray &)
{
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h
index 0cb252c..d6dc6cc 100644
--- a/kmicromail/mainwindow.h
+++ b/kmicromail/mainwindow.h
@@ -41,4 +41,7 @@ protected slots:
virtual void slotEditSettings();
virtual void mailLeftClicked( QListViewItem * );
+ void showLicence();
+ void showAbout();
+ void showEtpanLicence();
protected:
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp
index f0de71e..ad0b78e 100644
--- a/microkde/kapplication.cpp
+++ b/microkde/kapplication.cpp
@@ -41,14 +41,18 @@ int KApplication::execDialog( QDialog* d )
void KApplication::showLicence()
{
- QString fileName ;
+ KApplication::showFile( "KDE-Pim/Pi licence", "kdepim/LICENCE.TXT" );
+}
+
+void KApplication::showFile(QString caption, QString fn)
+{
QString text;
+ QString fileName;
#ifndef DESKTOP_VERSION
fileName = getenv("QPEDIR");
- fileName += "/pics/kdepim/LICENCE.TXT" ;
+ fileName += "/pics/" + fn ;
#else
- fileName = qApp->applicationDirPath () + "/kdepim/LICENCE.TXT";
+ fileName = qApp->applicationDirPath () + "/" + fn;
#endif
QFile file( fileName );
- qDebug("Licence file name %s ",fileName.latin1() );
if (!file.open( IO_ReadOnly ) ) {
return ;
@@ -59,5 +63,5 @@ void KApplication::showLicence()
QDialog dia( 0, "name", true ); ;
- dia.setCaption( "KDE-Pim/Pi licence" );
+ dia.setCaption( caption );
QVBoxLayout* lay = new QVBoxLayout( &dia );
lay->setSpacing( 3 );
diff --git a/microkde/kapplication.h b/microkde/kapplication.h
index 9515c60..5ae5c00 100644
--- a/microkde/kapplication.h
+++ b/microkde/kapplication.h
@@ -19,4 +19,5 @@ class KApplication
static int execDialog( QDialog* );
static void showLicence();
+ static void showFile(QString caption, QString file);
};