author | zautrix <zautrix> | 2004-08-06 10:53:41 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-06 10:53:41 (UTC) |
commit | cde989298c4891f54ad70ae03080ac8fa57b5c3f (patch) (unidiff) | |
tree | 945e4d75d5c6f2a6a2ebed6e50a6a1a769e4366c | |
parent | 841ce8881dbeee8a10dea8b96f82addd28f52536 (diff) | |
download | kdepimpi-cde989298c4891f54ad70ae03080ac8fa57b5c3f.zip kdepimpi-cde989298c4891f54ad70ae03080ac8fa57b5c3f.tar.gz kdepimpi-cde989298c4891f54ad70ae03080ac8fa57b5c3f.tar.bz2 |
Added licence menu in kopi
-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
@@ -28,3 +28,3 @@ SUBDIRS_MICROKDE = \ | |||
28 | SUBDIRS_QTOPIA_PLUGIN = \ | 28 | SUBDIRS_QTOPIA_PLUGIN = \ |
29 | kabc/plugins/qtopia | 29 | kabc/plugins/qtopia |
30 | 30 | ||
@@ -34,3 +34,3 @@ SUBDIRS_OPIE_PLUGIN = \ | |||
34 | SUBDIRS_SHARP_PLUGIN = \ | 34 | SUBDIRS_SHARP_PLUGIN = \ |
35 | kabc/plugins/sharpdtm | 35 | kabc/plugins/sharpdtm |
36 | 36 | ||
@@ -144,6 +144,6 @@ variable_test: variable_info | |||
144 | else | 144 | else |
145 | ifndef SHARPDTMSDK | 145 | ifndef SHARPDTMSDK |
146 | @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) | 146 | @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) |
147 | $(error SHARPDTMSDK is not defined) | 147 | $(error SHARPDTMSDK is not defined) |
148 | endif | 148 | endif |
149 | endif | 149 | endif |
@@ -199,5 +199,2 @@ tmake: objects \ | |||
199 | kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ | 199 | kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ |
200 | kaddressbook/xxport/opie/Makefile$(PLATFORM) \ | ||
201 | kaddressbook/xxport/qtopia/Makefile$(PLATFORM) \ | ||
202 | kaddressbook/xxport/sharpdtm/Makefile$(PLATFORM) \ | ||
203 | kaddressbook/Makefile$(PLATFORM) \ | 200 | kaddressbook/Makefile$(PLATFORM) \ |
@@ -206,2 +203,3 @@ tmake: objects \ | |||
206 | kmicromail/libmailwrapper/Makefile$(PLATFORM) | 203 | kmicromail/libmailwrapper/Makefile$(PLATFORM) |
204 | |||
207 | 205 | ||
@@ -258,12 +256,2 @@ kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro | |||
258 | 256 | ||
259 | kaddressbook/xxport/opie/Makefile$(PLATFORM): kaddressbook/xxport/opie/opieE.pro | ||
260 | cd kaddressbook/xxport/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieE.pro -o Makefile$(PLATFORM) | ||
261 | |||
262 | kaddressbook/xxport/qtopia/Makefile$(PLATFORM): kaddressbook/xxport/qtopia/qtopiaE.pro | ||
263 | cd kaddressbook/xxport/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" qtopiaE.pro -o Makefile$(PLATFORM) | ||
264 | |||
265 | kaddressbook/xxport/sharpdtm/Makefile$(PLATFORM): kaddressbook/xxport/sharpdtm/sharpdtmE.pro | ||
266 | cd kaddressbook/xxport/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" sharpdtmE.pro -o Makefile$(PLATFORM) | ||
267 | |||
268 | |||
269 | kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro | 257 | kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 6020a46..57b299f 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -43,2 +43,3 @@ | |||
43 | #include "kdialogbase.h" | 43 | #include "kdialogbase.h" |
44 | #include "kapplication.h" | ||
44 | #include "kstandarddirs.h" | 45 | #include "kstandarddirs.h" |
@@ -693,2 +694,6 @@ void MainWindow::initActions() | |||
693 | SLOT( about() ) ); | 694 | SLOT( about() ) ); |
695 | action = new QAction( "licence", i18n("Licence..."), 0, this ); | ||
696 | action->addTo( helpMenu ); | ||
697 | connect( action, SIGNAL( activated() ), | ||
698 | SLOT( licence() ) ); | ||
694 | //menuBar->insertSeparator(); | 699 | //menuBar->insertSeparator(); |
@@ -1062,2 +1067,7 @@ void MainWindow::whatsNew() | |||
1062 | } | 1067 | } |
1068 | void MainWindow::licence() | ||
1069 | { | ||
1070 | KApplication::showLicence(); | ||
1071 | |||
1072 | } | ||
1063 | void MainWindow::about() | 1073 | void MainWindow::about() |
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index a681f42..8a3f7b3 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -42,2 +42,3 @@ class MainWindow : public QMainWindow | |||
42 | void about(); | 42 | void about(); |
43 | void licence(); | ||
43 | void faq(); | 44 | void faq(); |
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index 1b3e689..f0de71e 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp | |||
@@ -1,2 +1,3 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | #include <stdio.h> | ||
2 | 3 | ||
@@ -4,2 +5,8 @@ | |||
4 | #include <qapplication.h> | 5 | #include <qapplication.h> |
6 | #include <qstring.h> | ||
7 | #include <qfile.h> | ||
8 | #include <qtextstream.h> | ||
9 | #include <qdialog.h> | ||
10 | #include <qlayout.h> | ||
11 | #include <qtextbrowser.h> | ||
5 | 12 | ||
@@ -27,3 +34,3 @@ QString KApplication::randomString(int length) | |||
27 | } | 34 | } |
28 | int KApplication::execDialog( QDialog* d ) | 35 | int KApplication::execDialog( QDialog* d ) |
29 | { | 36 | { |
@@ -33 +40,36 @@ QString KApplication::randomString(int length) | |||
33 | } | 40 | } |
41 | void KApplication::showLicence() | ||
42 | { | ||
43 | QString fileName ; | ||
44 | QString text; | ||
45 | #ifndef DESKTOP_VERSION | ||
46 | fileName = getenv("QPEDIR"); | ||
47 | fileName += "/pics/kdepim/LICENCE.TXT" ; | ||
48 | #else | ||
49 | fileName = qApp->applicationDirPath () + "/kdepim/LICENCE.TXT"; | ||
50 | #endif | ||
51 | QFile file( fileName ); | ||
52 | qDebug("Licence file name %s ",fileName.latin1() ); | ||
53 | if (!file.open( IO_ReadOnly ) ) { | ||
54 | return ; | ||
55 | } | ||
56 | QTextStream ts( &file ); | ||
57 | text = ts.read(); | ||
58 | file.close(); | ||
59 | |||
60 | QDialog dia( 0, "name", true ); ; | ||
61 | dia.setCaption( "KDE-Pim/Pi licence" ); | ||
62 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | ||
63 | lay->setSpacing( 3 ); | ||
64 | lay->setMargin( 3 ); | ||
65 | QTextBrowser tb ( &dia ); | ||
66 | lay->addWidget( &tb ); | ||
67 | tb.setText( text ); | ||
68 | #ifdef DESKTOP_VERSION | ||
69 | dia.resize( 640, 480); | ||
70 | #else | ||
71 | dia.showMaximized(); | ||
72 | #endif | ||
73 | dia.exec(); | ||
74 | |||
75 | } | ||
diff --git a/microkde/kapplication.h b/microkde/kapplication.h index 77206f5..9515c60 100644 --- a/microkde/kapplication.h +++ b/microkde/kapplication.h | |||
@@ -19,2 +19,3 @@ class KApplication | |||
19 | static int execDialog( QDialog* ); | 19 | static int execDialog( QDialog* ); |
20 | static void showLicence(); | ||
20 | }; | 21 | }; |