-rw-r--r-- | core/apps/embeddedkonsole/config.in | 2 | ||||
-rwxr-xr-x | core/apps/embeddedkonsole/embeddedkonsole.pro | 4 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 12 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/main.cpp | 12 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/opie-embeddedkonsole.control | 2 |
5 files changed, 11 insertions, 21 deletions
diff --git a/core/apps/embeddedkonsole/config.in b/core/apps/embeddedkonsole/config.in index 3a421d6..a3a1844 100644 --- a/core/apps/embeddedkonsole/config.in +++ b/core/apps/embeddedkonsole/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config EMBEDDEDKONSOLE | 1 | config EMBEDDEDKONSOLE |
2 | boolean "opie-embeddedkonsole (konsole from KDE adapted for Qt/Embedded)" | 2 | boolean "opie-embeddedkonsole (konsole from KDE adapted for Qt/Embedded)" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBQTAUX |
diff --git a/core/apps/embeddedkonsole/embeddedkonsole.pro b/core/apps/embeddedkonsole/embeddedkonsole.pro index 427c013..2743488 100755 --- a/core/apps/embeddedkonsole/embeddedkonsole.pro +++ b/core/apps/embeddedkonsole/embeddedkonsole.pro | |||
@@ -1,38 +1,38 @@ | |||
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 | CONFIG += qt warn_on release quick-app | 4 | CONFIG += qt warn_on release quick-app |
5 | HEADERS = TEWidget.h \ | 5 | HEADERS = TEWidget.h \ |
6 | TEScreen.h \ | 6 | TEScreen.h \ |
7 | TECommon.h \ | 7 | TECommon.h \ |
8 | TEHistory.h \ | 8 | TEHistory.h \ |
9 | TEmulation.h \ | 9 | TEmulation.h \ |
10 | TEmuVt102.h \ | 10 | TEmuVt102.h \ |
11 | session.h \ | 11 | session.h \ |
12 | keytrans.h \ | 12 | keytrans.h \ |
13 | konsole.h \ | 13 | konsole.h \ |
14 | commandeditdialog.h \ | 14 | commandeditdialog.h \ |
15 | commandeditwidget.h \ | 15 | commandeditwidget.h \ |
16 | playlistselection.h \ | 16 | playlistselection.h \ |
17 | MyPty.h | 17 | MyPty.h |
18 | SOURCES = TEScreen.cpp \ | 18 | SOURCES = TEScreen.cpp \ |
19 | TEWidget.cpp \ | 19 | TEWidget.cpp \ |
20 | TEHistory.cpp \ | 20 | TEHistory.cpp \ |
21 | TEmulation.cpp \ | 21 | TEmulation.cpp \ |
22 | TEmuVt102.cpp \ | 22 | TEmuVt102.cpp \ |
23 | session.cpp \ | 23 | session.cpp \ |
24 | keytrans.cpp \ | 24 | keytrans.cpp \ |
25 | konsole.cpp \ | 25 | konsole.cpp \ |
26 | commandeditdialog.cpp \ | 26 | commandeditdialog.cpp \ |
27 | commandeditwidget.cpp \ | 27 | commandeditwidget.cpp \ |
28 | playlistselection.cpp \ | 28 | playlistselection.cpp \ |
29 | MyPty.cpp \ | 29 | MyPty.cpp \ |
30 | main.cpp | 30 | main.cpp |
31 | INTERFACES = commandeditdialogbase.ui smallcommandeditdialogbase.ui | 31 | INTERFACES = commandeditdialogbase.ui smallcommandeditdialogbase.ui |
32 | TARGET = embeddedkonsole | 32 | TARGET = embeddedkonsole |
33 | INCLUDEPATH += $(OPIEDIR)/include | 33 | INCLUDEPATH += $(OPIEDIR)/include |
34 | DEPENDPATH += $(OPIEDIR)/include | 34 | DEPENDPATH += $(OPIEDIR)/include |
35 | LIBS += -lqpe -lopie | 35 | LIBS += -lqpe -lopiecore2 -lqtaux2 |
36 | TMAKE_CXXFLAGS += -DQT_QWS_OPIE -DHAVE_OPENPTY | 36 | TMAKE_CXXFLAGS += -DQT_QWS_OPIE -DHAVE_OPENPTY |
37 | 37 | ||
38 | include ( $(OPIEDIR)/include.pro ) | 38 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index d10b66d..46c0203 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp | |||
@@ -1,117 +1,117 @@ | |||
1 | 1 | ||
2 | /* ---------------------------------------------------------------------- */ | 2 | /* ---------------------------------------------------------------------- */ |
3 | /* */ | 3 | /* */ |
4 | /* [main.C] Konsole */ | 4 | /* [main.C] Konsole */ |
5 | /* */ | 5 | /* */ |
6 | /* ---------------------------------------------------------------------- */ | 6 | /* ---------------------------------------------------------------------- */ |
7 | /* */ | 7 | /* */ |
8 | /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ | 8 | /* Copyright (c) 1997,1998 by Lars Doelle <lars.doelle@on-line.de> */ |
9 | /* */ | 9 | /* */ |
10 | /* This file is part of Konsole, an X terminal. */ | 10 | /* This file is part of Konsole, an X terminal. */ |
11 | /* */ | 11 | /* */ |
12 | /* The material contained in here more or less directly orginates from */ | 12 | /* The material contained in here more or less directly orginates from */ |
13 | /* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */ | 13 | /* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */ |
14 | /* */ | 14 | /* */ |
15 | /* ---------------------------------------------------------------------- */ | 15 | /* ---------------------------------------------------------------------- */ |
16 | /* */ | 16 | /* */ |
17 | /* Ported Konsole to Qt/Embedded */ | 17 | /* Ported Konsole to Qt/Embedded */ |
18 | /* */ | 18 | /* */ |
19 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ | 19 | /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ |
20 | /* */ | 20 | /* */ |
21 | /* -------------------------------------------------------------------------- */ | 21 | /* -------------------------------------------------------------------------- */ |
22 | // enhancements added by L.J. Potter <ljp@llornkcor.com> | 22 | // enhancements added by L.J. Potter <ljp@llornkcor.com> |
23 | //#define QT_QWS_OPIE | 23 | //#define QT_QWS_OPIE |
24 | 24 | ||
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
26 | 26 | ||
27 | #ifdef QT_QWS_OPIE | ||
28 | #include <opie2/ocolorpopupmenu.h> | ||
29 | #endif | ||
30 | |||
27 | #include <qpe/resource.h> | 31 | #include <qpe/resource.h> |
28 | 32 | ||
29 | #include <qdir.h> | 33 | #include <qdir.h> |
30 | #include <qevent.h> | 34 | #include <qevent.h> |
31 | #include <qdragobject.h> | 35 | #include <qdragobject.h> |
32 | #include <qobjectlist.h> | 36 | #include <qobjectlist.h> |
33 | #include <qtoolbutton.h> | 37 | #include <qtoolbutton.h> |
34 | #include <qtoolbar.h> | 38 | #include <qtoolbar.h> |
35 | #include <qpushbutton.h> | 39 | #include <qpushbutton.h> |
36 | #include <qfontdialog.h> | 40 | #include <qfontdialog.h> |
37 | #include <qglobal.h> | 41 | #include <qglobal.h> |
38 | #include <qpainter.h> | 42 | #include <qpainter.h> |
39 | #include <qmenubar.h> | 43 | #include <qmenubar.h> |
40 | #include <qmessagebox.h> | 44 | #include <qmessagebox.h> |
41 | #include <qaction.h> | 45 | #include <qaction.h> |
42 | #include <qapplication.h> | 46 | #include <qapplication.h> |
43 | #include <qfontmetrics.h> | 47 | #include <qfontmetrics.h> |
44 | #include <qcombobox.h> | 48 | #include <qcombobox.h> |
45 | #include <qevent.h> | 49 | #include <qevent.h> |
46 | #include <qtabwidget.h> | 50 | #include <qtabwidget.h> |
47 | #include <qtabbar.h> | 51 | #include <qtabbar.h> |
48 | #include <qpe/config.h> | 52 | #include <qpe/config.h> |
49 | #include <qstringlist.h> | 53 | #include <qstringlist.h> |
50 | #include <qpalette.h> | 54 | #include <qpalette.h> |
51 | #include <qfontdatabase.h> | 55 | #include <qfontdatabase.h> |
52 | #include <qfile.h> | 56 | #include <qfile.h> |
53 | #include <qspinbox.h> | 57 | #include <qspinbox.h> |
54 | #include <qlayout.h> | 58 | #include <qlayout.h> |
55 | #include <qvbox.h> | 59 | #include <qvbox.h> |
56 | 60 | ||
57 | #include <sys/wait.h> | 61 | #include <sys/wait.h> |
58 | #include <stdio.h> | 62 | #include <stdio.h> |
59 | #include <stdlib.h> | 63 | #include <stdlib.h> |
60 | #include <assert.h> | 64 | #include <assert.h> |
61 | 65 | ||
62 | #include "konsole.h" | 66 | #include "konsole.h" |
63 | #include "keytrans.h" | 67 | #include "keytrans.h" |
64 | #include "commandeditdialog.h" | 68 | #include "commandeditdialog.h" |
65 | 69 | ||
66 | #ifdef QT_QWS_OPIE | ||
67 | #include <opie/colorpopupmenu.h> | ||
68 | #endif | ||
69 | |||
70 | class EKNumTabBar : public QTabBar | 70 | class EKNumTabBar : public QTabBar |
71 | { | 71 | { |
72 | public: | 72 | public: |
73 | EKNumTabBar(QWidget *parent = 0, const char *name = 0) : | 73 | EKNumTabBar(QWidget *parent = 0, const char *name = 0) : |
74 | QTabBar(parent, name) | 74 | QTabBar(parent, name) |
75 | {} | 75 | {} |
76 | 76 | ||
77 | // QList<QTab> *getTabList() { return(tabList()); } | 77 | // QList<QTab> *getTabList() { return(tabList()); } |
78 | 78 | ||
79 | void numberTabs() | 79 | void numberTabs() |
80 | { | 80 | { |
81 | // Yes, it really is this messy. QTabWidget needs functions | 81 | // Yes, it really is this messy. QTabWidget needs functions |
82 | // that provide acces to tabs in a sequential way. | 82 | // that provide acces to tabs in a sequential way. |
83 | int m=INT_MIN; | 83 | int m=INT_MIN; |
84 | for (int i=0; i<count(); i++) | 84 | for (int i=0; i<count(); i++) |
85 | { | 85 | { |
86 | QTab* left=0; | 86 | QTab* left=0; |
87 | QListIterator<QTab> it(*tabList()); | 87 | QListIterator<QTab> it(*tabList()); |
88 | int x=INT_MAX; | 88 | int x=INT_MAX; |
89 | for( QTab* t; (t=it.current()); ++it ) | 89 | for( QTab* t; (t=it.current()); ++it ) |
90 | { | 90 | { |
91 | int tx = t->rect().x(); | 91 | int tx = t->rect().x(); |
92 | if ( tx<x && tx>m ) | 92 | if ( tx<x && tx>m ) |
93 | { | 93 | { |
94 | x = tx; | 94 | x = tx; |
95 | left = t; | 95 | left = t; |
96 | } | 96 | } |
97 | } | 97 | } |
98 | if ( left ) | 98 | if ( left ) |
99 | { | 99 | { |
100 | left->setText(QString::number(i+1)); | 100 | left->setText(QString::number(i+1)); |
101 | m = left->rect().x(); | 101 | m = left->rect().x(); |
102 | } | 102 | } |
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 | ||
106 | virtual QSize sizeHint() const | 106 | virtual QSize sizeHint() const |
107 | { | 107 | { |
108 | if (isHidden()) | 108 | if (isHidden()) |
109 | { | 109 | { |
110 | return(QSize(0,0)); | 110 | return(QSize(0,0)); |
111 | } | 111 | } |
112 | else | 112 | else |
113 | { | 113 | { |
114 | QSize size = QTabBar::sizeHint(); | 114 | QSize size = QTabBar::sizeHint(); |
115 | int shrink = 5; | 115 | int shrink = 5; |
116 | if (qApp->desktop()->width() > 600 || qApp->desktop()->height() > 600) | 116 | if (qApp->desktop()->width() > 600 || qApp->desktop()->height() > 600) |
117 | { | 117 | { |
@@ -1482,97 +1482,97 @@ void Konsole::colorMenuSelected(int iD) | |||
1482 | foreground.setRgb(15,115,0); | 1482 | foreground.setRgb(15,115,0); |
1483 | // background.setRgb(0xB2,0x68,0x18); | 1483 | // background.setRgb(0xB2,0x68,0x18); |
1484 | background.setRgb(255,255,0); | 1484 | background.setRgb(255,255,0); |
1485 | colorMenu->setItemChecked(cm_gy,TRUE); | 1485 | colorMenu->setItemChecked(cm_gy,TRUE); |
1486 | } | 1486 | } |
1487 | if(iD==cm_bm) | 1487 | if(iD==cm_bm) |
1488 | {// Blue, Magenta | 1488 | {// Blue, Magenta |
1489 | foreground.setRgb(3,24,132); | 1489 | foreground.setRgb(3,24,132); |
1490 | background.setRgb(225,2,255); | 1490 | background.setRgb(225,2,255); |
1491 | colorMenu->setItemChecked(cm_bm,TRUE); | 1491 | colorMenu->setItemChecked(cm_bm,TRUE); |
1492 | } | 1492 | } |
1493 | if(iD==cm_mb) | 1493 | if(iD==cm_mb) |
1494 | {// Magenta, Blue | 1494 | {// Magenta, Blue |
1495 | foreground.setRgb(225,2,255); | 1495 | foreground.setRgb(225,2,255); |
1496 | background.setRgb(3,24,132); | 1496 | background.setRgb(3,24,132); |
1497 | colorMenu->setItemChecked(cm_mb,TRUE); | 1497 | colorMenu->setItemChecked(cm_mb,TRUE); |
1498 | } | 1498 | } |
1499 | if(iD==cm_cw) | 1499 | if(iD==cm_cw) |
1500 | {// Cyan, White | 1500 | {// Cyan, White |
1501 | foreground.setRgb(8,91,129); | 1501 | foreground.setRgb(8,91,129); |
1502 | background.setRgb(0xFF,0xFF,0xFF); | 1502 | background.setRgb(0xFF,0xFF,0xFF); |
1503 | colorMenu->setItemChecked(cm_cw,TRUE); | 1503 | colorMenu->setItemChecked(cm_cw,TRUE); |
1504 | } | 1504 | } |
1505 | if(iD==cm_wc) | 1505 | if(iD==cm_wc) |
1506 | {// White, Cyan | 1506 | {// White, Cyan |
1507 | background.setRgb(8,91,129); | 1507 | background.setRgb(8,91,129); |
1508 | foreground.setRgb(0xFF,0xFF,0xFF); | 1508 | foreground.setRgb(0xFF,0xFF,0xFF); |
1509 | colorMenu->setItemChecked(cm_wc,TRUE); | 1509 | colorMenu->setItemChecked(cm_wc,TRUE); |
1510 | } | 1510 | } |
1511 | if(iD==cm_bb) | 1511 | if(iD==cm_bb) |
1512 | {// Black, Blue | 1512 | {// Black, Blue |
1513 | background.setRgb(0x00,0x00,0x00); | 1513 | background.setRgb(0x00,0x00,0x00); |
1514 | foreground.setRgb(127,147,225); | 1514 | foreground.setRgb(127,147,225); |
1515 | colorMenu->setItemChecked(cm_bb,TRUE); | 1515 | colorMenu->setItemChecked(cm_bb,TRUE); |
1516 | } | 1516 | } |
1517 | if(iD==cm_ab) | 1517 | if(iD==cm_ab) |
1518 | {// Black, Gold | 1518 | {// Black, Gold |
1519 | background.setRgb(0x00,0x00,0x00); | 1519 | background.setRgb(0x00,0x00,0x00); |
1520 | foreground.setRgb(255,215,105); | 1520 | foreground.setRgb(255,215,105); |
1521 | colorMenu->setItemChecked(cm_ab,TRUE); | 1521 | colorMenu->setItemChecked(cm_ab,TRUE); |
1522 | } | 1522 | } |
1523 | #ifdef QT_QWS_OPIE | 1523 | #ifdef QT_QWS_OPIE |
1524 | if(iD==-19) | 1524 | if(iD==-19) |
1525 | { | 1525 | { |
1526 | // Custom | 1526 | // Custom |
1527 | qDebug("do custom"); | 1527 | qDebug("do custom"); |
1528 | if(fromMenu) | 1528 | if(fromMenu) |
1529 | { | 1529 | { |
1530 | OColorPopupMenu* penColorPopupMenu = new OColorPopupMenu(Qt::black, this, "foreground color"); | 1530 | Opie::OColorPopupMenu* penColorPopupMenu = new Opie::OColorPopupMenu(Qt::black, this, "foreground color"); |
1531 | connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, | 1531 | connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, |
1532 | SLOT(changeForegroundColor(const QColor&))); | 1532 | SLOT(changeForegroundColor(const QColor&))); |
1533 | penColorPopupMenu->exec(); | 1533 | penColorPopupMenu->exec(); |
1534 | } | 1534 | } |
1535 | if(!fromMenu) | 1535 | if(!fromMenu) |
1536 | { | 1536 | { |
1537 | foreground.setNamedColor(cfg.readEntry("foreground","")); | 1537 | foreground.setNamedColor(cfg.readEntry("foreground","")); |
1538 | background.setNamedColor(cfg.readEntry("background","")); | 1538 | background.setNamedColor(cfg.readEntry("background","")); |
1539 | } | 1539 | } |
1540 | fromMenu=FALSE; | 1540 | fromMenu=FALSE; |
1541 | colorMenu->setItemChecked(-19,TRUE); | 1541 | colorMenu->setItemChecked(-19,TRUE); |
1542 | } | 1542 | } |
1543 | #endif | 1543 | #endif |
1544 | 1544 | ||
1545 | lastSelectedMenu = iD; | 1545 | lastSelectedMenu = iD; |
1546 | 1546 | ||
1547 | setColors(foreground, background); | 1547 | setColors(foreground, background); |
1548 | 1548 | ||
1549 | QTabBar *tabBar = tab->getTabBar(); | 1549 | QTabBar *tabBar = tab->getTabBar(); |
1550 | QString ss = QString("Session%1").arg(tabBar->currentTab()); | 1550 | QString ss = QString("Session%1").arg(tabBar->currentTab()); |
1551 | // printf("current tab = %d\n", tabBar->currentTab()); | 1551 | // printf("current tab = %d\n", tabBar->currentTab()); |
1552 | 1552 | ||
1553 | if (tabBar->currentTab() == 0) | 1553 | if (tabBar->currentTab() == 0) |
1554 | { | 1554 | { |
1555 | cfg.writeEntry("foregroundRed",QString::number(foreground.red())); | 1555 | cfg.writeEntry("foregroundRed",QString::number(foreground.red())); |
1556 | cfg.writeEntry("foregroundGreen",QString::number(foreground.green())); | 1556 | cfg.writeEntry("foregroundGreen",QString::number(foreground.green())); |
1557 | cfg.writeEntry("foregroundBlue",QString::number(foreground.blue())); | 1557 | cfg.writeEntry("foregroundBlue",QString::number(foreground.blue())); |
1558 | cfg.writeEntry("backgroundRed",QString::number(background.red())); | 1558 | cfg.writeEntry("backgroundRed",QString::number(background.red())); |
1559 | cfg.writeEntry("backgroundGreen",QString::number(background.green())); | 1559 | cfg.writeEntry("backgroundGreen",QString::number(background.green())); |
1560 | cfg.writeEntry("backgroundBlue",QString::number(background.blue())); | 1560 | cfg.writeEntry("backgroundBlue",QString::number(background.blue())); |
1561 | } | 1561 | } |
1562 | cfg.writeEntry("foregroundRed"+ss,QString::number(foreground.red())); | 1562 | cfg.writeEntry("foregroundRed"+ss,QString::number(foreground.red())); |
1563 | cfg.writeEntry("foregroundGreen"+ss,QString::number(foreground.green())); | 1563 | cfg.writeEntry("foregroundGreen"+ss,QString::number(foreground.green())); |
1564 | cfg.writeEntry("foregroundBlue"+ss,QString::number(foreground.blue())); | 1564 | cfg.writeEntry("foregroundBlue"+ss,QString::number(foreground.blue())); |
1565 | cfg.writeEntry("backgroundRed"+ss,QString::number(background.red())); | 1565 | cfg.writeEntry("backgroundRed"+ss,QString::number(background.red())); |
1566 | cfg.writeEntry("backgroundGreen"+ss,QString::number(background.green())); | 1566 | cfg.writeEntry("backgroundGreen"+ss,QString::number(background.green())); |
1567 | cfg.writeEntry("backgroundBlue"+ss,QString::number(background.blue())); | 1567 | cfg.writeEntry("backgroundBlue"+ss,QString::number(background.blue())); |
1568 | 1568 | ||
1569 | update(); | 1569 | update(); |
1570 | } | 1570 | } |
1571 | 1571 | ||
1572 | void Konsole::setColors(QColor foreground, QColor background) | 1572 | void Konsole::setColors(QColor foreground, QColor background) |
1573 | { | 1573 | { |
1574 | int i; | 1574 | int i; |
1575 | ColorEntry m_table[TABLE_COLORS]; | 1575 | ColorEntry m_table[TABLE_COLORS]; |
1576 | TEWidget* te = getTe(); | 1576 | TEWidget* te = getTe(); |
1577 | const ColorEntry * defaultCt=te->getdefaultColorTable(); | 1577 | const ColorEntry * defaultCt=te->getdefaultColorTable(); |
1578 | 1578 | ||
@@ -1833,86 +1833,86 @@ void Konsole::setDocument( const QString &cmd) | |||
1833 | { | 1833 | { |
1834 | if (te != 0) | 1834 | if (te != 0) |
1835 | { | 1835 | { |
1836 | te->emitText(cmd+"\r"); | 1836 | te->emitText(cmd+"\r"); |
1837 | } | 1837 | } |
1838 | } | 1838 | } |
1839 | startUp++; | 1839 | startUp++; |
1840 | } | 1840 | } |
1841 | 1841 | ||
1842 | 1842 | ||
1843 | // what is the point of this when you can just | 1843 | // what is the point of this when you can just |
1844 | // run commands by using the shell directly?? | 1844 | // run commands by using the shell directly?? |
1845 | void Konsole::parseCommandLine() | 1845 | void Konsole::parseCommandLine() |
1846 | { | 1846 | { |
1847 | QString cmd; | 1847 | QString cmd; |
1848 | // newSession(); | 1848 | // newSession(); |
1849 | for (int i=1;i< qApp->argc();i++) | 1849 | for (int i=1;i< qApp->argc();i++) |
1850 | { | 1850 | { |
1851 | if( QString(qApp->argv()[i]) == "-e") | 1851 | if( QString(qApp->argv()[i]) == "-e") |
1852 | { | 1852 | { |
1853 | i++; | 1853 | i++; |
1854 | for ( int j=i;j< qApp->argc();j++) | 1854 | for ( int j=i;j< qApp->argc();j++) |
1855 | { | 1855 | { |
1856 | cmd+=QString(qApp->argv()[j])+" "; | 1856 | cmd+=QString(qApp->argv()[j])+" "; |
1857 | } | 1857 | } |
1858 | cmd.stripWhiteSpace(); | 1858 | cmd.stripWhiteSpace(); |
1859 | system(cmd.latin1()); | 1859 | system(cmd.latin1()); |
1860 | exit(0);//close(); | 1860 | exit(0);//close(); |
1861 | } // end -e switch | 1861 | } // end -e switch |
1862 | } | 1862 | } |
1863 | startUp++; | 1863 | startUp++; |
1864 | } | 1864 | } |
1865 | 1865 | ||
1866 | void Konsole::changeForegroundColor(const QColor &color) | 1866 | void Konsole::changeForegroundColor(const QColor &color) |
1867 | { | 1867 | { |
1868 | Config cfg("Qkonsole"); | 1868 | Config cfg("Qkonsole"); |
1869 | cfg.setGroup("Colors"); | 1869 | cfg.setGroup("Colors"); |
1870 | int r, g, b; | 1870 | int r, g, b; |
1871 | color.rgb(&r,&g,&b); | 1871 | color.rgb(&r,&g,&b); |
1872 | foreground.setRgb(r,g,b); | 1872 | foreground.setRgb(r,g,b); |
1873 | 1873 | ||
1874 | cfg.writeEntry("foreground",color.name()); | 1874 | cfg.writeEntry("foreground",color.name()); |
1875 | qDebug("foreground "+color.name()); | 1875 | qDebug("foreground "+color.name()); |
1876 | cfg.write(); | 1876 | cfg.write(); |
1877 | 1877 | ||
1878 | qDebug("do other dialog"); | 1878 | qDebug("do other dialog"); |
1879 | #ifdef QT_QWS_OPIE | 1879 | #ifdef QT_QWS_OPIE |
1880 | 1880 | ||
1881 | OColorPopupMenu* penColorPopupMenu2 = new OColorPopupMenu(Qt::black, this,"background color"); | 1881 | Opie::OColorPopupMenu* penColorPopupMenu2 = new Opie::OColorPopupMenu(Qt::black, this,"background color"); |
1882 | connect(penColorPopupMenu2, SIGNAL(colorSelected(const QColor&)), this, | 1882 | connect(penColorPopupMenu2, SIGNAL(colorSelected(const QColor&)), this, |
1883 | SLOT(changeBackgroundColor(const QColor&))); | 1883 | SLOT(changeBackgroundColor(const QColor&))); |
1884 | penColorPopupMenu2->exec(); | 1884 | penColorPopupMenu2->exec(); |
1885 | #endif | 1885 | #endif |
1886 | } | 1886 | } |
1887 | 1887 | ||
1888 | void Konsole::changeBackgroundColor(const QColor &color) | 1888 | void Konsole::changeBackgroundColor(const QColor &color) |
1889 | { | 1889 | { |
1890 | 1890 | ||
1891 | qDebug("Change background"); | 1891 | qDebug("Change background"); |
1892 | Config cfg("Qkonsole"); | 1892 | Config cfg("Qkonsole"); |
1893 | cfg.setGroup("Colors"); | 1893 | cfg.setGroup("Colors"); |
1894 | int r, g, b; | 1894 | int r, g, b; |
1895 | color.rgb(&r,&g,&b); | 1895 | color.rgb(&r,&g,&b); |
1896 | background.setRgb(r,g,b); | 1896 | background.setRgb(r,g,b); |
1897 | cfg.writeEntry("background",color.name()); | 1897 | cfg.writeEntry("background",color.name()); |
1898 | qDebug("background "+color.name()); | 1898 | qDebug("background "+color.name()); |
1899 | cfg.write(); | 1899 | cfg.write(); |
1900 | } | 1900 | } |
1901 | 1901 | ||
1902 | void Konsole::doWrap() | 1902 | void Konsole::doWrap() |
1903 | { | 1903 | { |
1904 | Config cfg("Qkonsole"); | 1904 | Config cfg("Qkonsole"); |
1905 | cfg.setGroup("ScrollBar"); | 1905 | cfg.setGroup("ScrollBar"); |
1906 | TEWidget* te = getTe(); | 1906 | TEWidget* te = getTe(); |
1907 | if( !cfg.readBoolEntry("HorzScroll",0)) | 1907 | if( !cfg.readBoolEntry("HorzScroll",0)) |
1908 | { | 1908 | { |
1909 | te->setWrapAt(0); | 1909 | te->setWrapAt(0); |
1910 | configMenu->setItemChecked( cm_wrap,TRUE); | 1910 | configMenu->setItemChecked( cm_wrap,TRUE); |
1911 | } | 1911 | } |
1912 | else | 1912 | else |
1913 | { | 1913 | { |
1914 | // te->setWrapAt(90); | 1914 | // te->setWrapAt(90); |
1915 | te->setWrapAt(120); | 1915 | te->setWrapAt(120); |
1916 | configMenu->setItemChecked( cm_wrap,FALSE); | 1916 | configMenu->setItemChecked( cm_wrap,FALSE); |
1917 | } | 1917 | } |
1918 | } | 1918 | } |
diff --git a/core/apps/embeddedkonsole/main.cpp b/core/apps/embeddedkonsole/main.cpp index a6a079c..fe30b7e 100644 --- a/core/apps/embeddedkonsole/main.cpp +++ b/core/apps/embeddedkonsole/main.cpp | |||
@@ -1,39 +1,29 @@ | |||
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 <opie2/oapplicationfactory.h> |
25 | #include <opie/oapplicationfactory.h> | ||
26 | |||
27 | #include <qfile.h> | ||
28 | |||
29 | #include <unistd.h> | ||
30 | #include <stdio.h> | ||
31 | #include <stdlib.h> | ||
32 | |||
33 | #include <pwd.h> | ||
34 | #include <sys/types.h> | ||
35 | 25 | ||
36 | 26 | ||
37 | /* --| main |------------------------------------------------------ */ | 27 | /* --| main |------------------------------------------------------ */ |
38 | OPIE_EXPORT_APP( OApplicationFactory<Konsole> ) | 28 | OPIE_EXPORT_APP( OApplicationFactory<Konsole> ) |
39 | 29 | ||
diff --git a/core/apps/embeddedkonsole/opie-embeddedkonsole.control b/core/apps/embeddedkonsole/opie-embeddedkonsole.control index 5807cd1..a338e19 100644 --- a/core/apps/embeddedkonsole/opie-embeddedkonsole.control +++ b/core/apps/embeddedkonsole/opie-embeddedkonsole.control | |||
@@ -1,10 +1,10 @@ | |||
1 | Package: opie-embeddedkonsole | 1 | Package: opie-embeddedkonsole |
2 | Files: plugins/application/libembeddedkonsole.so* bin/embeddedkonsole apps/Applications/embeddedkonsole.desktop pics/konsole | 2 | Files: plugins/application/libembeddedkonsole.so* bin/embeddedkonsole apps/Applications/embeddedkonsole.desktop pics/konsole |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/applications | 4 | Section: opie/applications |
5 | Maintainer: L.J. Potter <lpotter@trolltech.com> | 5 | Maintainer: L.J. Potter <lpotter@trolltech.com> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: task-opie-minimal, libopie1, opie-keytabs | 7 | Depends: task-opie-minimal, libopiecore2, libqtaux2, opie-keytabs |
8 | Description: KDE's konsole (shell terminal) | 8 | Description: KDE's konsole (shell terminal) |
9 | Ported to the Opie environment. | 9 | Ported to the Opie environment. |
10 | Version: $QPE_VERSION$EXTRAVERSION | 10 | Version: $QPE_VERSION$EXTRAVERSION |