-rw-r--r-- | Makefile | 14 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 10 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 | ||||
-rw-r--r-- | microkde/kapplication.cpp | 42 | ||||
-rw-r--r-- | microkde/kapplication.h | 1 |
5 files changed, 55 insertions, 13 deletions
@@ -194,22 +194,20 @@ tmake: objects \ kabc/plugins/file/Makefile$(PLATFORM) \ kabc/plugins/dir/Makefile$(PLATFORM) \ kabc/plugins/ldap/Makefile$(PLATFORM) \ 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) \ kmicromail/libmailwrapper/Makefile$(PLATFORM) + qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" qtcompat.pro -o Makefile$(PLATFORM) microkde/Makefile$(PLATFORM): microkde/microkdeE.pro cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" microkdeE.pro -o Makefile$(PLATFORM) @@ -253,22 +251,12 @@ kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" qtopiaE.pro -o Makefile$(PLATFORM) 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) kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" kmicromailE.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 @@ -38,12 +38,13 @@ #include "koviewmanager.h" #include "datenavigator.h" #include "koagendaview.h" #include "koagenda.h" #include "kodialogmanager.h" #include "kdialogbase.h" +#include "kapplication.h" #include "kstandarddirs.h" #include "koprefs.h" #include "kfiledialog.h" #include "koglobals.h" #include "kglobal.h" #include "klocale.h" @@ -688,12 +689,16 @@ void MainWindow::initActions() action = new QAction( "about", i18n("About..."), 0, this ); 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(); // ****************************************************** // menubar icons @@ -1057,12 +1062,17 @@ void MainWindow::faq() } void MainWindow::whatsNew() { displayFile( "kopiWhatsNew.txt",i18n("KO/Pi Version Info") ); } +void MainWindow::licence() +{ + KApplication::showLicence(); + +} void MainWindow::about() { QString version; #include <../version> QMessageBox::about( this, i18n("About KOrganizer/Pi"), i18n("KOrganizer/Platform-independent\n") + diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index a681f42..8a3f7b3 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -37,12 +37,13 @@ class MainWindow : public QMainWindow static QString resourcePath(); protected slots: void setCaptionToDates(); int ringSync(); void multiSync( bool askforPrefs = false ); void about(); + void licence(); void faq(); void usertrans(); void features(); void synchowto(); void whatsNew(); void keyBindings(); diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index 1b3e689..f0de71e 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp @@ -1,10 +1,17 @@ #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() { return rand(); } @@ -28,6 +35,41 @@ QString KApplication::randomString(int length) int KApplication::execDialog( QDialog* d ) { if (QApplication::desktop()->width() <= 640 ) 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 @@ -14,10 +14,11 @@ 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(); }; #endif |