summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-08-06 10:53:41 (UTC)
committer zautrix <zautrix>2004-08-06 10:53:41 (UTC)
commitcde989298c4891f54ad70ae03080ac8fa57b5c3f (patch) (side-by-side diff)
tree945e4d75d5c6f2a6a2ebed6e50a6a1a769e4366c
parent841ce8881dbeee8a10dea8b96f82addd28f52536 (diff)
downloadkdepimpi-cde989298c4891f54ad70ae03080ac8fa57b5c3f.zip
kdepimpi-cde989298c4891f54ad70ae03080ac8fa57b5c3f.tar.gz
kdepimpi-cde989298c4891f54ad70ae03080ac8fa57b5c3f.tar.bz2
Added licence menu in kopi
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--Makefile14
-rw-r--r--korganizer/mainwindow.cpp10
-rw-r--r--korganizer/mainwindow.h1
-rw-r--r--microkde/kapplication.cpp42
-rw-r--r--microkde/kapplication.h1
5 files changed, 55 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 19c57e5..38fd000 100644
--- a/Makefile
+++ b/Makefile
@@ -197,9 +197,6 @@ tmake: objects \
kabc/plugins/opie/Makefile$(PLATFORM) \
kabc/plugins/qtopia/Makefile$(PLATFORM) \
kabc/plugins/sharpdtm/Makefile$(PLATFORM) \
- kaddressbook/xxport/opie/Makefile$(PLATFORM) \
- kaddressbook/xxport/qtopia/Makefile$(PLATFORM) \
- kaddressbook/xxport/sharpdtm/Makefile$(PLATFORM) \
kaddressbook/Makefile$(PLATFORM) \
kmicromail/Makefile$(PLATFORM) \
kmicromail/libetpan/Makefile$(PLATFORM) \
@@ -207,6 +204,7 @@ tmake: objects \
+
qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro
cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" qtcompat.pro -o Makefile$(PLATFORM)
@@ -256,16 +254,6 @@ kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro
kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro
cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" sharpdtmE.pro -o Makefile$(PLATFORM)
-kaddressbook/xxport/opie/Makefile$(PLATFORM): kaddressbook/xxport/opie/opieE.pro
- cd kaddressbook/xxport/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieE.pro -o Makefile$(PLATFORM)
-
-kaddressbook/xxport/qtopia/Makefile$(PLATFORM): kaddressbook/xxport/qtopia/qtopiaE.pro
- cd kaddressbook/xxport/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" qtopiaE.pro -o Makefile$(PLATFORM)
-
-kaddressbook/xxport/sharpdtm/Makefile$(PLATFORM): kaddressbook/xxport/sharpdtm/sharpdtmE.pro
- cd kaddressbook/xxport/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" sharpdtmE.pro -o Makefile$(PLATFORM)
-
-
kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro
cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" kaddressbookE.pro -o Makefile$(PLATFORM)
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 6020a46..57b299f 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -41,6 +41,7 @@
#include "koagenda.h"
#include "kodialogmanager.h"
#include "kdialogbase.h"
+#include "kapplication.h"
#include "kstandarddirs.h"
#include "koprefs.h"
#include "kfiledialog.h"
@@ -691,6 +692,10 @@ void MainWindow::initActions()
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( about() ) );
+ action = new QAction( "licence", i18n("Licence..."), 0, this );
+ action->addTo( helpMenu );
+ connect( action, SIGNAL( activated() ),
+ SLOT( licence() ) );
//menuBar->insertSeparator();
// ******************************************************
@@ -1060,6 +1065,11 @@ void MainWindow::whatsNew()
displayFile( "kopiWhatsNew.txt",i18n("KO/Pi Version Info") );
}
+void MainWindow::licence()
+{
+ KApplication::showLicence();
+
+}
void MainWindow::about()
{
QString version;
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index a681f42..8a3f7b3 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -40,6 +40,7 @@ class MainWindow : public QMainWindow
int ringSync();
void multiSync( bool askforPrefs = false );
void about();
+ void licence();
void faq();
void usertrans();
void features();
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp
index 1b3e689..f0de71e 100644
--- a/microkde/kapplication.cpp
+++ b/microkde/kapplication.cpp
@@ -1,7 +1,14 @@
#include <stdlib.h>
+#include <stdio.h>
#include "kapplication.h"
#include <qapplication.h>
+#include <qstring.h>
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qdialog.h>
+#include <qlayout.h>
+#include <qtextbrowser.h>
int KApplication::random()
{
@@ -31,3 +38,38 @@ QString KApplication::randomString(int length)
d->showMaximized();
return d->exec();
}
+void KApplication::showLicence()
+{
+ QString fileName ;
+ QString text;
+#ifndef DESKTOP_VERSION
+ fileName = getenv("QPEDIR");
+ fileName += "/pics/kdepim/LICENCE.TXT" ;
+#else
+ fileName = qApp->applicationDirPath () + "/kdepim/LICENCE.TXT";
+#endif
+ QFile file( fileName );
+ qDebug("Licence file name %s ",fileName.latin1() );
+ if (!file.open( IO_ReadOnly ) ) {
+ return ;
+ }
+ QTextStream ts( &file );
+ text = ts.read();
+ file.close();
+
+ QDialog dia( 0, "name", true ); ;
+ dia.setCaption( "KDE-Pim/Pi licence" );
+ 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 77206f5..9515c60 100644
--- a/microkde/kapplication.h
+++ b/microkde/kapplication.h
@@ -17,6 +17,7 @@ class KApplication
*/
static QString randomString(int length);
static int execDialog( QDialog* );
+ static void showLicence();
};