-rwxr-xr-x | core/apps/embeddedkonsole/embeddedkonsole.pro | 4 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 54 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/konsole.h | 2 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/main.cpp | 45 | ||||
-rw-r--r-- | core/apps/textedit/main.cpp | 13 | ||||
-rw-r--r-- | core/apps/textedit/textedit.h | 1 | ||||
-rw-r--r-- | core/apps/textedit/textedit.pro | 4 |
7 files changed, 55 insertions, 68 deletions
diff --git a/core/apps/embeddedkonsole/embeddedkonsole.pro b/core/apps/embeddedkonsole/embeddedkonsole.pro index f8d2793..55a1bb4 100755 --- a/core/apps/embeddedkonsole/embeddedkonsole.pro +++ b/core/apps/embeddedkonsole/embeddedkonsole.pro | |||
@@ -1,30 +1,28 @@ | |||
1 | QMAKE_CFLAGS = -DHAVE_OPENPTY | 1 | QMAKE_CFLAGS = -DHAVE_OPENPTY |
2 | TMAKE_FLAGS += -DHAVE_OPENPTY | 2 | TMAKE_FLAGS += -DHAVE_OPENPTY |
3 | QMAKE_LIBS = -lutil | 3 | QMAKE_LIBS = -lutil |
4 | TEMPLATE = app | 4 | CONFIG += qt warn_on release quick-app |
5 | CONFIG += qt warn_on release | ||
6 | DESTDIR = $(OPIEDIR)/bin | ||
7 | HEADERS = TEWidget.h \ | 5 | HEADERS = TEWidget.h \ |
8 | TEScreen.h \ | 6 | TEScreen.h \ |
9 | TECommon.h \ | 7 | TECommon.h \ |
10 | TEHistory.h \ | 8 | TEHistory.h \ |
11 | TEmulation.h \ | 9 | TEmulation.h \ |
12 | TEmuVt102.h \ | 10 | TEmuVt102.h \ |
13 | session.h \ | 11 | session.h \ |
14 | keytrans.h \ | 12 | keytrans.h \ |
15 | konsole.h \ | 13 | konsole.h \ |
16 | commandeditdialog.h \ | 14 | commandeditdialog.h \ |
17 | commandeditwidget.h \ | 15 | commandeditwidget.h \ |
18 | playlistselection.h \ | 16 | playlistselection.h \ |
19 | MyPty.h | 17 | MyPty.h |
20 | SOURCES = TEScreen.cpp \ | 18 | SOURCES = TEScreen.cpp \ |
21 | TEWidget.cpp \ | 19 | TEWidget.cpp \ |
22 | TEHistory.cpp \ | 20 | TEHistory.cpp \ |
23 | TEmulation.cpp \ | 21 | TEmulation.cpp \ |
24 | TEmuVt102.cpp \ | 22 | TEmuVt102.cpp \ |
25 | session.cpp \ | 23 | session.cpp \ |
26 | keytrans.cpp \ | 24 | keytrans.cpp \ |
27 | konsole.cpp \ | 25 | konsole.cpp \ |
28 | commandeditdialog.cpp \ | 26 | commandeditdialog.cpp \ |
29 | commandeditwidget.cpp \ | 27 | commandeditwidget.cpp \ |
30 | playlistselection.cpp \ | 28 | playlistselection.cpp \ |
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index c324c35..ec438c3 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp | |||
@@ -25,48 +25,51 @@ | |||
25 | 25 | ||
26 | #include <qdir.h> | 26 | #include <qdir.h> |
27 | #include <qevent.h> | 27 | #include <qevent.h> |
28 | #include <qdragobject.h> | 28 | #include <qdragobject.h> |
29 | #include <qobjectlist.h> | 29 | #include <qobjectlist.h> |
30 | #include <qtoolbutton.h> | 30 | #include <qtoolbutton.h> |
31 | #include <qpe/qpetoolbar.h> | 31 | #include <qpe/qpetoolbar.h> |
32 | #include <qpushbutton.h> | 32 | #include <qpushbutton.h> |
33 | #include <qfontdialog.h> | 33 | #include <qfontdialog.h> |
34 | #include <qglobal.h> | 34 | #include <qglobal.h> |
35 | #include <qpainter.h> | 35 | #include <qpainter.h> |
36 | #include <qpe/qpemenubar.h> | 36 | #include <qpe/qpemenubar.h> |
37 | #include <qmessagebox.h> | 37 | #include <qmessagebox.h> |
38 | #include <qaction.h> | 38 | #include <qaction.h> |
39 | #include <qapplication.h> | 39 | #include <qapplication.h> |
40 | #include <qfontmetrics.h> | 40 | #include <qfontmetrics.h> |
41 | #include <qcombobox.h> | 41 | #include <qcombobox.h> |
42 | #include <qevent.h> | 42 | #include <qevent.h> |
43 | #include <qtabwidget.h> | 43 | #include <qtabwidget.h> |
44 | #include <qtabbar.h> | 44 | #include <qtabbar.h> |
45 | #include <qpe/config.h> | 45 | #include <qpe/config.h> |
46 | #include <qstringlist.h> | 46 | #include <qstringlist.h> |
47 | #include <qpalette.h> | 47 | #include <qpalette.h> |
48 | 48 | ||
49 | #include <unistd.h> | ||
50 | #include <pwd.h> | ||
51 | #include <sys/types.h> | ||
49 | #include <sys/wait.h> | 52 | #include <sys/wait.h> |
50 | #include <stdio.h> | 53 | #include <stdio.h> |
51 | #include <stdlib.h> | 54 | #include <stdlib.h> |
52 | #include <assert.h> | 55 | #include <assert.h> |
53 | 56 | ||
54 | #include "konsole.h" | 57 | #include "konsole.h" |
55 | #include "keytrans.h" | 58 | #include "keytrans.h" |
56 | #include "commandeditdialog.h" | 59 | #include "commandeditdialog.h" |
57 | 60 | ||
58 | #ifdef QT_QWS_OPIE | 61 | #ifdef QT_QWS_OPIE |
59 | #include <opie/colorpopupmenu.h> | 62 | #include <opie/colorpopupmenu.h> |
60 | #endif | 63 | #endif |
61 | 64 | ||
62 | class EKNumTabBar : public QTabBar { | 65 | class EKNumTabBar : public QTabBar { |
63 | public: | 66 | public: |
64 | void numberTabs() | 67 | void numberTabs() |
65 | { | 68 | { |
66 | // Yes, it really is this messy. QTabWidget needs functions | 69 | // Yes, it really is this messy. QTabWidget needs functions |
67 | // that provide acces to tabs in a sequential way. | 70 | // that provide acces to tabs in a sequential way. |
68 | int m=INT_MIN; | 71 | int m=INT_MIN; |
69 | for (int i=0; i<count(); i++) { | 72 | for (int i=0; i<count(); i++) { |
70 | QTab* left=0; | 73 | QTab* left=0; |
71 | QListIterator<QTab> it(*tabList()); | 74 | QListIterator<QTab> it(*tabList()); |
72 | int x=INT_MAX; | 75 | int x=INT_MAX; |
@@ -150,62 +153,99 @@ static const char *commonCmds[] = | |||
150 | "chown", | 153 | "chown", |
151 | "date", | 154 | "date", |
152 | "dd", | 155 | "dd", |
153 | "df", | 156 | "df", |
154 | "dmesg", | 157 | "dmesg", |
155 | "fuser", | 158 | "fuser", |
156 | "hostname", | 159 | "hostname", |
157 | "kill", | 160 | "kill", |
158 | "killall", | 161 | "killall", |
159 | "ln", | 162 | "ln", |
160 | "ping", | 163 | "ping", |
161 | "mount", | 164 | "mount", |
162 | "more", | 165 | "more", |
163 | "sort", | 166 | "sort", |
164 | "touch", | 167 | "touch", |
165 | "umount", | 168 | "umount", |
166 | "mknod", | 169 | "mknod", |
167 | "netstat", | 170 | "netstat", |
168 | */ | 171 | */ |
169 | 172 | ||
170 | "exit", | 173 | "exit", |
171 | NULL | 174 | NULL |
172 | }; | 175 | }; |
173 | 176 | ||
177 | static void konsoleInit(const char** shell) { | ||
178 | if(setuid(getuid()) !=0) qDebug("setuid failed"); | ||
179 | if(setgid(getgid()) != 0) qDebug("setgid failed"); // drop privileges | ||
180 | |||
181 | |||
182 | // QPEApplication::grabKeyboard(); // for CTRL and ALT | ||
183 | |||
184 | qDebug("keyboard grabbed"); | ||
185 | #ifdef FAKE_CTRL_AND_ALT | ||
186 | qDebug("Fake Ctrl and Alt defined"); | ||
187 | QPEApplication::grabKeyboard(); // for CTRL and ALT | ||
188 | #endif | ||
189 | |||
190 | *shell = getenv("SHELL"); | ||
191 | qWarning("SHell initially is %s", *shell ); | ||
192 | |||
193 | if (shell == NULL || *shell == '\0') { | ||
194 | struct passwd *ent = 0; | ||
195 | uid_t me = getuid(); | ||
196 | *shell = "/bin/sh"; | ||
197 | |||
198 | while ( (ent = getpwent()) != 0 ) { | ||
199 | if (ent->pw_uid == me) { | ||
200 | if (ent->pw_shell != "") | ||
201 | *shell = ent->pw_shell; | ||
202 | break; | ||
203 | } | ||
204 | } | ||
205 | endpwent(); | ||
206 | } | ||
207 | |||
208 | qWarning("SHELL now is %s", *shell ); | ||
209 | |||
210 | if( putenv((char*)"COLORTERM=") !=0) | ||
211 | qDebug("putenv failed"); // to trigger mc's color detection | ||
212 | } | ||
174 | 213 | ||
175 | Konsole::Konsole(QWidget* parent, const char* name, WFlags fl) : | 214 | Konsole::Konsole(QWidget* parent, const char* name, WFlags fl) : |
176 | QMainWindow(parent, name, fl) | 215 | QMainWindow(parent, name, fl) |
177 | { | 216 | { |
178 | QStrList args; | 217 | QStrList tmp; const char* shell; |
179 | init("/bin/sh",args); | ||
180 | } | ||
181 | 218 | ||
182 | Konsole::Konsole(const char* name, const char* _pgm, QStrList & _args, int) | 219 | setCaption( tr("Terminal") ); |
183 | : QMainWindow(0, name) | 220 | |
184 | { | 221 | konsoleInit( &shell); |
185 | init(_pgm,_args); | 222 | qWarning("Using shell %s", shell); |
223 | init(shell,tmp); | ||
186 | } | 224 | } |
187 | 225 | ||
226 | |||
227 | |||
188 | void Konsole::initCommandList() | 228 | void Konsole::initCommandList() |
189 | { | 229 | { |
190 | // qDebug("Konsole::initCommandList"); | 230 | // qDebug("Konsole::initCommandList"); |
191 | Config cfg("Konsole"); | 231 | Config cfg("Konsole"); |
192 | cfg.setGroup("Commands"); | 232 | cfg.setGroup("Commands"); |
193 | commonCombo->setInsertionPolicy(QComboBox::AtCurrent); | 233 | commonCombo->setInsertionPolicy(QComboBox::AtCurrent); |
194 | commonCombo->clear(); | 234 | commonCombo->clear(); |
195 | if (cfg.readEntry("Commands Set","FALSE") == "FALSE") { | 235 | if (cfg.readEntry("Commands Set","FALSE") == "FALSE") { |
196 | for (int i = 0; commonCmds[i] != NULL; i++) { | 236 | for (int i = 0; commonCmds[i] != NULL; i++) { |
197 | commonCombo->insertItem(commonCmds[i],i); | 237 | commonCombo->insertItem(commonCmds[i],i); |
198 | } | 238 | } |
199 | } else { | 239 | } else { |
200 | for (int i = 0; i < 100; i++) { | 240 | for (int i = 0; i < 100; i++) { |
201 | if (!(cfg.readEntry( QString::number(i),"")).isEmpty()) | 241 | if (!(cfg.readEntry( QString::number(i),"")).isEmpty()) |
202 | commonCombo->insertItem((cfg.readEntry( QString::number(i),""))); | 242 | commonCombo->insertItem((cfg.readEntry( QString::number(i),""))); |
203 | } | 243 | } |
204 | } | 244 | } |
205 | 245 | ||
206 | } | 246 | } |
207 | 247 | ||
208 | void Konsole::init(const char* _pgm, QStrList & _args) | 248 | void Konsole::init(const char* _pgm, QStrList & _args) |
209 | { | 249 | { |
210 | b_scroll = TRUE; // histon; | 250 | b_scroll = TRUE; // histon; |
211 | n_keytab = 0; | 251 | n_keytab = 0; |
diff --git a/core/apps/embeddedkonsole/konsole.h b/core/apps/embeddedkonsole/konsole.h index 4938159..e9d0e4b 100644 --- a/core/apps/embeddedkonsole/konsole.h +++ b/core/apps/embeddedkonsole/konsole.h | |||
@@ -25,51 +25,51 @@ | |||
25 | 25 | ||
26 | #include <qmainwindow.h> | 26 | #include <qmainwindow.h> |
27 | #include <qaction.h> | 27 | #include <qaction.h> |
28 | #include <qpopupmenu.h> | 28 | #include <qpopupmenu.h> |
29 | #include <qstrlist.h> | 29 | #include <qstrlist.h> |
30 | #include <qintdict.h> | 30 | #include <qintdict.h> |
31 | #include <qptrdict.h> | 31 | #include <qptrdict.h> |
32 | #include <qtabwidget.h> | 32 | #include <qtabwidget.h> |
33 | #include <qpe/qpetoolbar.h> | 33 | #include <qpe/qpetoolbar.h> |
34 | #include <qcombobox.h> | 34 | #include <qcombobox.h> |
35 | #include <qcolor.h> | 35 | #include <qcolor.h> |
36 | 36 | ||
37 | #include "MyPty.h" | 37 | #include "MyPty.h" |
38 | #include "TEWidget.h" | 38 | #include "TEWidget.h" |
39 | #include "TEmuVt102.h" | 39 | #include "TEmuVt102.h" |
40 | #include "session.h" | 40 | #include "session.h" |
41 | 41 | ||
42 | class EKNumTabWidget; | 42 | class EKNumTabWidget; |
43 | 43 | ||
44 | class Konsole : public QMainWindow | 44 | class Konsole : public QMainWindow |
45 | { | 45 | { |
46 | Q_OBJECT | 46 | Q_OBJECT |
47 | 47 | ||
48 | public: | 48 | public: |
49 | static QString appName() { return QString::fromLatin1("embeddedkonsole"); } | ||
49 | 50 | ||
50 | Konsole(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); | 51 | Konsole(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); |
51 | Konsole(const char * name, const char* pgm, QStrList & _args, int histon); | ||
52 | ~Konsole(); | 52 | ~Konsole(); |
53 | void setColLin(int columns, int lines); | 53 | void setColLin(int columns, int lines); |
54 | QPEToolBar *secondToolBar; | 54 | QPEToolBar *secondToolBar; |
55 | void show(); | 55 | void show(); |
56 | void setColor(); | 56 | void setColor(); |
57 | int lastSelectedMenu; | 57 | int lastSelectedMenu; |
58 | int startUp; | 58 | int startUp; |
59 | private slots: | 59 | private slots: |
60 | void setDocument(const QString &); | 60 | void setDocument(const QString &); |
61 | void doneSession(TESession*,int); | 61 | void doneSession(TESession*,int); |
62 | void changeColumns(int); | 62 | void changeColumns(int); |
63 | void fontChanged(int); | 63 | void fontChanged(int); |
64 | void configMenuSelected(int ); | 64 | void configMenuSelected(int ); |
65 | void colorMenuSelected(int); | 65 | void colorMenuSelected(int); |
66 | void colorMenuIsSelected(int); | 66 | void colorMenuIsSelected(int); |
67 | void enterCommand(int); | 67 | void enterCommand(int); |
68 | void hitEnter(); | 68 | void hitEnter(); |
69 | void hitSpace(); | 69 | void hitSpace(); |
70 | void hitTab(); | 70 | void hitTab(); |
71 | void hitPaste(); | 71 | void hitPaste(); |
72 | void hitUp(); | 72 | void hitUp(); |
73 | void hitDown(); | 73 | void hitDown(); |
74 | void switchSession(QWidget *); | 74 | void switchSession(QWidget *); |
75 | void newSession(); | 75 | void newSession(); |
diff --git a/core/apps/embeddedkonsole/main.cpp b/core/apps/embeddedkonsole/main.cpp index 91199eb..f77fe24 100644 --- a/core/apps/embeddedkonsole/main.cpp +++ b/core/apps/embeddedkonsole/main.cpp | |||
@@ -1,79 +1,38 @@ | |||
1 | /* ---------------------------------------------------------------------- */ | 1 | /* ---------------------------------------------------------------------- */ |
2 | /* */ | 2 | /* */ |
3 | /* [main.C] Konsole */ | 3 | /* [main.C] Konsole */ |
4 | /* */ | 4 | /* */ |
5 | /* ---------------------------------------------------------------------- */ | 5 | /* ---------------------------------------------------------------------- */ |
6 | /* */ | 6 | /* */ |
7 | /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ | 7 | /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ |
8 | /* */ | 8 | /* */ |
9 | /* This file is part of Konsole, an X terminal. */ | 9 | /* This file is part of Konsole, an X terminal. */ |
10 | /* */ | 10 | /* */ |
11 | /* The material contained in here more or less directly orginates from */ | 11 | /* The material contained in here more or less directly orginates from */ |
12 | /* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */ | 12 | /* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */ |
13 | /* */ | 13 | /* */ |
14 | /* ---------------------------------------------------------------------- */ | 14 | /* ---------------------------------------------------------------------- */ |
15 | /* */ | 15 | /* */ |
16 | /* Ported Konsole to Qt/Embedded */ | 16 | /* Ported Konsole to Qt/Embedded */ |
17 | /* */ | 17 | /* */ |
18 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ | 18 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ |
19 | /* */ | 19 | /* */ |
20 | /* -------------------------------------------------------------------------- */ | 20 | /* -------------------------------------------------------------------------- */ |
21 | 21 | ||
22 | #include "konsole.h" | 22 | #include "konsole.h" |
23 | 23 | ||
24 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
25 | #include <opie/oapplicationfactory.h> | ||
25 | 26 | ||
26 | #include <qfile.h> | 27 | #include <qfile.h> |
27 | 28 | ||
28 | #include <unistd.h> | 29 | #include <unistd.h> |
29 | #include <stdio.h> | 30 | #include <stdio.h> |
30 | #include <stdlib.h> | 31 | #include <stdlib.h> |
31 | 32 | ||
32 | #include <pwd.h> | 33 | #include <pwd.h> |
33 | #include <sys/types.h> | 34 | #include <sys/types.h> |
34 | 35 | ||
35 | 36 | ||
36 | /* --| main |------------------------------------------------------ */ | 37 | /* --| main |------------------------------------------------------ */ |
37 | int main(int argc, char* argv[]) | 38 | OPIE_EXPORT_APP( OApplicationFactory<Konsole> ) |
38 | { | ||
39 | if(setuid(getuid()) !=0) qDebug("setuid failed"); | ||
40 | if(setgid(getgid()) != 0) qDebug("setgid failed"); // drop privileges | ||
41 | |||
42 | QPEApplication a( argc, argv ); | ||
43 | |||
44 | // QPEApplication::grabKeyboard(); // for CTRL and ALT | ||
45 | |||
46 | qDebug("keyboard grabbed"); | ||
47 | #ifdef FAKE_CTRL_AND_ALT | ||
48 | qDebug("Fake Ctrl and Alt defined"); | ||
49 | QPEApplication::grabKeyboard(); // for CTRL and ALT | ||
50 | #endif | ||
51 | |||
52 | QStrList tmp; | ||
53 | const char* shell = getenv("SHELL"); | ||
54 | |||
55 | if (shell == NULL || *shell == '\0') { | ||
56 | struct passwd *ent = 0; | ||
57 | uid_t me = getuid(); | ||
58 | shell = "/bin/sh"; | ||
59 | |||
60 | while ( (ent = getpwent()) != 0 ) { | ||
61 | if (ent->pw_uid == me) { | ||
62 | if (ent->pw_shell != "") | ||
63 | shell = ent->pw_shell; | ||
64 | break; | ||
65 | } | ||
66 | } | ||
67 | endpwent(); | ||
68 | } | ||
69 | |||
70 | if( putenv((char*)"COLORTERM=") !=0) | ||
71 | qDebug("putenv failed"); // to trigger mc's color detection | ||
72 | |||
73 | Konsole m( "test", shell, tmp, TRUE ); | ||
74 | m.setCaption( Konsole::tr("Terminal") ); | ||
75 | a.showMainWidget( &m ); | ||
76 | |||
77 | return a.exec(); | ||
78 | } | ||
79 | |||
diff --git a/core/apps/textedit/main.cpp b/core/apps/textedit/main.cpp index f80c5d8..edab73d 100644 --- a/core/apps/textedit/main.cpp +++ b/core/apps/textedit/main.cpp | |||
@@ -1,35 +1,26 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "textedit.h" | 21 | #include "textedit.h" |
22 | 22 | ||
23 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
24 | #include <opie/oapplicationfactory.h> | ||
24 | 25 | ||
25 | int main( int argc, char **argv ) | 26 | OPIE_EXPORT_APP( OApplicationFactory<TextEdit> ) |
26 | { | ||
27 | QPEApplication a( argc, argv ); | ||
28 | |||
29 | TextEdit e; | ||
30 | a.showMainDocumentWidget(&e); | ||
31 | // if ( argc == 3 && argv[1] == QCString("-f") ) | ||
32 | // e.openFile(argv[2]); | ||
33 | |||
34 | return a.exec(); | ||
35 | } | ||
diff --git a/core/apps/textedit/textedit.h b/core/apps/textedit/textedit.h index e0cbea2..303b707 100644 --- a/core/apps/textedit/textedit.h +++ b/core/apps/textedit/textedit.h | |||
@@ -33,48 +33,49 @@ | |||
33 | #include <opie/ofileselector.h> | 33 | #include <opie/ofileselector.h> |
34 | 34 | ||
35 | #include <qmainwindow.h> | 35 | #include <qmainwindow.h> |
36 | #include <qmultilineedit.h> | 36 | #include <qmultilineedit.h> |
37 | #include <qlist.h> | 37 | #include <qlist.h> |
38 | #include <qmap.h> | 38 | #include <qmap.h> |
39 | 39 | ||
40 | class QAction; | 40 | class QAction; |
41 | class QWidgetStack; | 41 | class QWidgetStack; |
42 | class QToolButton; | 42 | class QToolButton; |
43 | class QPopupMenu; | 43 | class QPopupMenu; |
44 | class QToolBar; | 44 | class QToolBar; |
45 | class QLineEdit; | 45 | class QLineEdit; |
46 | class QAction; | 46 | class QAction; |
47 | class FileSelector; | 47 | class FileSelector; |
48 | class QpeEditor; | 48 | class QpeEditor; |
49 | class QPopupMenu; | 49 | class QPopupMenu; |
50 | class QTimer; | 50 | class QTimer; |
51 | 51 | ||
52 | class TextEdit : public QMainWindow | 52 | class TextEdit : public QMainWindow |
53 | { | 53 | { |
54 | Q_OBJECT | 54 | Q_OBJECT |
55 | 55 | ||
56 | public: | 56 | public: |
57 | static QString appName() { return QString::fromLatin1("textedit"); } | ||
57 | TextEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | 58 | TextEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); |
58 | ~TextEdit(); | 59 | ~TextEdit(); |
59 | 60 | ||
60 | protected: | 61 | protected: |
61 | QPopupMenu *font; | 62 | QPopupMenu *font; |
62 | QAction *nStart, *nFileDlgOpt, *nAdvanced, *desktopAction, *filePermAction, *searchBarAction, *nAutoSave; | 63 | QAction *nStart, *nFileDlgOpt, *nAdvanced, *desktopAction, *filePermAction, *searchBarAction, *nAutoSave; |
63 | bool edited, edited1; | 64 | bool edited, edited1; |
64 | void openFile( const QString & ); | 65 | void openFile( const QString & ); |
65 | QCopChannel * channel; | 66 | QCopChannel * channel; |
66 | 67 | ||
67 | bool featureAutoSave; | 68 | bool featureAutoSave; |
68 | void closeEvent( QCloseEvent *e ); | 69 | void closeEvent( QCloseEvent *e ); |
69 | void doSearchBar(); | 70 | void doSearchBar(); |
70 | int savePrompt(); | 71 | int savePrompt(); |
71 | void setTimer(); | 72 | void setTimer(); |
72 | private slots: | 73 | private slots: |
73 | void editorChanged(); | 74 | void editorChanged(); |
74 | void receive(const QCString&, const QByteArray&); | 75 | void receive(const QCString&, const QByteArray&); |
75 | void timerCrank(); | 76 | void timerCrank(); |
76 | void doTimer(bool); | 77 | void doTimer(bool); |
77 | void editPasteTimeDate(); | 78 | void editPasteTimeDate(); |
78 | void doPrompt(bool); | 79 | void doPrompt(bool); |
79 | void doDesktop(bool); | 80 | void doDesktop(bool); |
80 | void doFilePerms(bool); | 81 | void doFilePerms(bool); |
diff --git a/core/apps/textedit/textedit.pro b/core/apps/textedit/textedit.pro index 2577340..b958ff5 100644 --- a/core/apps/textedit/textedit.pro +++ b/core/apps/textedit/textedit.pro | |||
@@ -1,27 +1,25 @@ | |||
1 | TEMPLATE = app | 1 | CONFIG += qt warn_on release quick-app |
2 | CONFIG += qt warn_on release | ||
3 | DESTDIR = $(OPIEDIR)/bin | ||
4 | HEADERS = textedit.h filePermissions.h | 2 | HEADERS = textedit.h filePermissions.h |
5 | SOURCES = main.cpp textedit.cpp filePermissions.cpp | 3 | SOURCES = main.cpp textedit.cpp filePermissions.cpp |
6 | INCLUDEPATH += $(OPIEDIR)/include | 4 | INCLUDEPATH += $(OPIEDIR)/include |
7 | DEPENDPATH += $(OPIEDIR)/include | 5 | DEPENDPATH += $(OPIEDIR)/include |
8 | LIBS += -lqpe -lopie | 6 | LIBS += -lqpe -lopie |
9 | TARGET = textedit | 7 | TARGET = textedit |
10 | 8 | ||
11 | TRANSLATIONS = ../../../i18n/de/textedit.ts \ | 9 | TRANSLATIONS = ../../../i18n/de/textedit.ts \ |
12 | ../../../i18n/nl/textedit.ts \ | 10 | ../../../i18n/nl/textedit.ts \ |
13 | ../../../i18n/da/textedit.ts \ | 11 | ../../../i18n/da/textedit.ts \ |
14 | ../../../i18n/xx/textedit.ts \ | 12 | ../../../i18n/xx/textedit.ts \ |
15 | ../../../i18n/en/textedit.ts \ | 13 | ../../../i18n/en/textedit.ts \ |
16 | ../../../i18n/es/textedit.ts \ | 14 | ../../../i18n/es/textedit.ts \ |
17 | ../../../i18n/fr/textedit.ts \ | 15 | ../../../i18n/fr/textedit.ts \ |
18 | ../../../i18n/hu/textedit.ts \ | 16 | ../../../i18n/hu/textedit.ts \ |
19 | ../../../i18n/ja/textedit.ts \ | 17 | ../../../i18n/ja/textedit.ts \ |
20 | ../../../i18n/ko/textedit.ts \ | 18 | ../../../i18n/ko/textedit.ts \ |
21 | ../../../i18n/no/textedit.ts \ | 19 | ../../../i18n/no/textedit.ts \ |
22 | ../../../i18n/pl/textedit.ts \ | 20 | ../../../i18n/pl/textedit.ts \ |
23 | ../../../i18n/pt/textedit.ts \ | 21 | ../../../i18n/pt/textedit.ts \ |
24 | ../../../i18n/pt_BR/textedit.ts \ | 22 | ../../../i18n/pt_BR/textedit.ts \ |
25 | ../../../i18n/sl/textedit.ts \ | 23 | ../../../i18n/sl/textedit.ts \ |
26 | ../../../i18n/zh_CN/textedit.ts \ | 24 | ../../../i18n/zh_CN/textedit.ts \ |
27 | ../../../i18n/zh_TW/textedit.ts | 25 | ../../../i18n/zh_TW/textedit.ts |