-rw-r--r-- | Makefile | 22 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 10 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 | ||||
-rw-r--r-- | microkde/kapplication.cpp | 44 | ||||
-rw-r--r-- | microkde/kapplication.h | 1 |
5 files changed, 60 insertions, 18 deletions
@@ -13,39 +13,39 @@ endif SUBDIRS_MICROKDE = \ libical/src/libical \ libical/src/libicalss \ qtcompat \ microkde \ libkcal \ libkdepim \ kabc \ kabc/formats/binary \ kabc/plugins/file \ kabc/plugins/dir \ korganizer \ kalarmd \ kaddressbook SUBDIRS_QTOPIA_PLUGIN = \ - kabc/plugins/qtopia + kabc/plugins/qtopia SUBDIRS_OPIE_PLUGIN = \ kabc/plugins/opie SUBDIRS_SHARP_PLUGIN = \ - kabc/plugins/sharpdtm + kabc/plugins/sharpdtm SUBDIRS_LDAP_PLUGIN = \ kabc/plugins/ldap SUBDIRS_MICROMAIL = \ kmicromail/libetpan \ kmicromail/libmailwrapper \ kmicromail SUBDIRS = \ $(SUBDIRS_MICROKDE) \ $(SUBDIRS_QTOPIA_PLUGIN) \ $(SUBDIRS_OPIE_PLUGIN) \ $(SUBDIRS_SHARP_PLUGIN) \ $(SUBDIRS_LDAP_PLUGIN) \ $(SUBDIRS_MICROMAIL) @@ -129,36 +129,36 @@ variable_test: variable_info ifndef PLATFORM @echo PLATFORM is not defined. $(error PLATFORM is not defined) endif ifdef BUILD_NO_LDAP_PLUGIN @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN) endif ifdef BUILD_NO_OPIE_PLUGIN @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN) endif ifdef BUILD_NO_MICROMAIL @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) endif ifdef BUILD_NO_SHARP_PLUGIN @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN) else - ifndef SHARPDTMSDK + ifndef SHARPDTMSDK @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) $(error SHARPDTMSDK is not defined) - endif + endif endif @echo -------------------------------------- objects: for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done mkdir -p libical/lib/$(PLATFORM) clean: rm -f libical/lib/$(PLATFORM)/*; for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ done install: cd bin/kdepim; make install @@ -184,39 +184,37 @@ tmake: objects \ qtcompat/Makefile$(PLATFORM) \ microkde/Makefile$(PLATFORM) \ libkcal/Makefile$(PLATFORM) \ libkdepim/Makefile$(PLATFORM) \ korganizer/Makefile$(PLATFORM) \ kalarmd/Makefile$(PLATFORM) \ libical/src/libical/Makefile$(PLATFORM) \ libical/src/libicalss/Makefile$(PLATFORM) \ kabc/Makefile$(PLATFORM) \ kabc/formats/binary/Makefile$(PLATFORM) \ 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) libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" libkcalE.pro -o Makefile$(PLATFORM) libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" libkdepimE.pro -o Makefile$(PLATFORM) @@ -243,37 +241,27 @@ kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" dirE.pro -o Makefile$(PLATFORM) kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" ldapE.pro -o Makefile$(PLATFORM) kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieE.pro -o Makefile$(PLATFORM) 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) kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" libetpanE.pro -o Makefile$(PLATFORM) kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" libmailwrapperE.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 @@ -28,32 +28,33 @@ #include <qapplication.h> //#include <resource.h> #endif #include <libkcal/calendarlocal.h> #include <libkcal/todo.h> #include <libkdepim/ksyncprofile.h> #include <libkdepim/kincidenceformatter.h> #include "calendarview.h" #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" #include "kconfig.h" #include "simplealarmclient.h" using namespace KCal; #ifndef _WIN32_ #include <unistd.h> #else #include "koimportoldialog.h" #endif #include "mainwindow.h" @@ -678,32 +679,36 @@ void MainWindow::initActions() connect( action, SIGNAL( activated() ), SLOT( synchowto() ) ); action = new QAction( "Whats New", i18n("What's new?"), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( whatsNew() ) ); action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( faq() ) ); 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 iconToolBar->setHorizontalStretchable (true ); //menuBar->insertItem( iconToolBar ); //xdays_action if (p-> mShowIconNewEvent) ne_action->addTo( iconToolBar ); if (p->mShowIconNewTodo ) nt_action->addTo( iconToolBar ); if (p-> mShowIconSearch) search_action->addTo( iconToolBar ); if (p-> mShowIconNext) @@ -1047,32 +1052,37 @@ void MainWindow::usertrans() } void MainWindow::synchowto() { displayFile( "howtoSYNC.txt",i18n("KO/Pi Synchronization HowTo") ); } void MainWindow::faq() { displayFile( "kopiFAQ.txt",i18n("KO/Pi 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") + "(KO/Pi) " + version + " - " + #ifdef DESKTOP_VERSION i18n("Desktop Edition\n") + #else i18n("PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n") + #endif i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") ); } void MainWindow::keyBindings() diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index a681f42..8a3f7b3 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -27,32 +27,33 @@ using namespace KCal; class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); ~MainWindow(); public slots: void configureAgenda( int ); void recieve( const QCString& msg, const QByteArray& data ); static QString defaultFileName(); 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(); void aboutAutoSaving();; void aboutKnownBugs(); void processIncidenceSelection( Incidence * ); void importQtopia(); void importBday(); void importOL(); void importIcal(); void importFile( QString, bool ); diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index 1b3e689..f0de71e 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp @@ -1,33 +1,75 @@ #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(); } //US QString KApplication::randomString(int length) { if (length <=0 ) return QString::null; QString str; while (length--) { int r=random() % 62; r+=48; if (r>57) r+=7; if (r>90) r+=6; str += char(r); // so what if I work backwards? } return str; } - int KApplication::execDialog( QDialog* d ) +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 @@ -4,20 +4,21 @@ #include "qstring.h" #include <qdialog.h> class KApplication { public: static int random(); //US /** * 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 |