-rw-r--r-- | core/apps/embeddedkonsole/TEScreen.cpp | 2 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/TEWidget.cpp | 6 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/commandeditdialog.cpp | 4 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 41 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/main.cpp | 8 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/playlistselection.cpp | 11 |
6 files changed, 38 insertions, 34 deletions
diff --git a/core/apps/embeddedkonsole/TEScreen.cpp b/core/apps/embeddedkonsole/TEScreen.cpp index 3dbcec2..8e69a88 100644 --- a/core/apps/embeddedkonsole/TEScreen.cpp +++ b/core/apps/embeddedkonsole/TEScreen.cpp | |||
@@ -64,17 +64,17 @@ | |||
64 | 64 | ||
65 | /*! creates a `TEScreen' of `lines' lines and `columns' columns. | 65 | /*! creates a `TEScreen' of `lines' lines and `columns' columns. |
66 | */ | 66 | */ |
67 | 67 | ||
68 | TEScreen::TEScreen(int lines, int columns) | 68 | TEScreen::TEScreen(int lines, int columns) |
69 | { | 69 | { |
70 | this->lines = lines; | 70 | this->lines = lines; |
71 | this->columns = columns; | 71 | this->columns = columns; |
72 | // qDebug("Columns %d", columns); | 72 | // odebug << "Columns " << columns << "" << oendl; |
73 | 73 | ||
74 | image = (ca*) malloc(lines*columns*sizeof(ca)); | 74 | image = (ca*) malloc(lines*columns*sizeof(ca)); |
75 | tabstops = NULL; initTabStops(); | 75 | tabstops = NULL; initTabStops(); |
76 | 76 | ||
77 | histCursor = 0; | 77 | histCursor = 0; |
78 | horzCursor = 0; | 78 | horzCursor = 0; |
79 | 79 | ||
80 | clearSelection(); | 80 | clearSelection(); |
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp index 93348f4..3cb1c0a 100644 --- a/core/apps/embeddedkonsole/TEWidget.cpp +++ b/core/apps/embeddedkonsole/TEWidget.cpp | |||
@@ -936,17 +936,17 @@ void TEWidget::setMouseMarks(bool on) | |||
936 | 936 | ||
937 | #undef KeyPress | 937 | #undef KeyPress |
938 | 938 | ||
939 | void TEWidget::emitSelection() | 939 | void TEWidget::emitSelection() |
940 | // Paste Clipboard by simulating keypress events | 940 | // Paste Clipboard by simulating keypress events |
941 | { | 941 | { |
942 | #ifndef QT_NO_CLIPBOARD | 942 | #ifndef QT_NO_CLIPBOARD |
943 | QString text = QApplication::clipboard()->text(); | 943 | QString text = QApplication::clipboard()->text(); |
944 | //qDebug(text); | 944 | //odebug << text << oendl; |
945 | if ( ! text.isNull()) | 945 | if ( ! text.isNull()) |
946 | { | 946 | { |
947 | text.replace(QRegExp("\n"), "\r"); | 947 | text.replace(QRegExp("\n"), "\r"); |
948 | QKeyEvent e(QEvent::KeyPress, 0, -1, 0, text); | 948 | QKeyEvent e(QEvent::KeyPress, 0, -1, 0, text); |
949 | emit keyPressedSignal(&e); // expose as a big fat keypress event | 949 | emit keyPressedSignal(&e); // expose as a big fat keypress event |
950 | emit clearSelectionSignal(); | 950 | emit clearSelectionSignal(); |
951 | } | 951 | } |
952 | #endif | 952 | #endif |
@@ -1023,17 +1023,17 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e ) | |||
1023 | return FALSE; // not us | 1023 | return FALSE; // not us |
1024 | if ( e->type() == QEvent::Wheel) { | 1024 | if ( e->type() == QEvent::Wheel) { |
1025 | QApplication::sendEvent(scrollbar, e); | 1025 | QApplication::sendEvent(scrollbar, e); |
1026 | } | 1026 | } |
1027 | 1027 | ||
1028 | #ifdef FAKE_CTRL_AND_ALT | 1028 | #ifdef FAKE_CTRL_AND_ALT |
1029 | static bool control = FALSE; | 1029 | static bool control = FALSE; |
1030 | static bool alt = FALSE; | 1030 | static bool alt = FALSE; |
1031 | // qDebug(" Has a keyboard with no CTRL and ALT keys, but we fake it:"); | 1031 | // odebug << " Has a keyboard with no CTRL and ALT keys, but we fake it:" << oendl; |
1032 | bool dele=FALSE; | 1032 | bool dele=FALSE; |
1033 | if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { | 1033 | if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { |
1034 | QKeyEvent* ke = (QKeyEvent*)e; | 1034 | QKeyEvent* ke = (QKeyEvent*)e; |
1035 | bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); | 1035 | bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); |
1036 | switch (ke->key()) { | 1036 | switch (ke->key()) { |
1037 | case Key_F9: // let this be "Control" | 1037 | case Key_F9: // let this be "Control" |
1038 | control = keydown; | 1038 | control = keydown; |
1039 | e = new QKeyEvent(QEvent::KeyPress, Key_Control, 0, ke->state()); | 1039 | e = new QKeyEvent(QEvent::KeyPress, Key_Control, 0, ke->state()); |
@@ -1062,17 +1062,17 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e ) | |||
1062 | } | 1062 | } |
1063 | #endif | 1063 | #endif |
1064 | 1064 | ||
1065 | if ( e->type() == QEvent::KeyPress ) { | 1065 | if ( e->type() == QEvent::KeyPress ) { |
1066 | QKeyEvent* ke = (QKeyEvent*)e; | 1066 | QKeyEvent* ke = (QKeyEvent*)e; |
1067 | actSel=0; // Key stroke implies a screen update, so TEWidget won't | 1067 | actSel=0; // Key stroke implies a screen update, so TEWidget won't |
1068 | // know where the current selection is. | 1068 | // know where the current selection is. |
1069 | 1069 | ||
1070 | // qDebug("key pressed is 0x%x, ascii is 0x%x, state %d", ke->key(), ke->ascii(), ke->state()); | 1070 | // odebug << "key pressed is 0x" << ke->key() << ", ascii is 0x" << ke->ascii() << ", state " << ke->state() << "" << oendl; |
1071 | 1071 | ||
1072 | bool special_function = true; | 1072 | bool special_function = true; |
1073 | switch(ke->key()) { | 1073 | switch(ke->key()) { |
1074 | //case 0x201b: // fn-5 | 1074 | //case 0x201b: // fn-5 |
1075 | //case Key_F1: | 1075 | //case Key_F1: |
1076 | // switch sessions (?) | 1076 | // switch sessions (?) |
1077 | // emitText("\\"); // expose (??) | 1077 | // emitText("\\"); // expose (??) |
1078 | // break; | 1078 | // break; |
diff --git a/core/apps/embeddedkonsole/commandeditdialog.cpp b/core/apps/embeddedkonsole/commandeditdialog.cpp index 6587b26..697bf72 100644 --- a/core/apps/embeddedkonsole/commandeditdialog.cpp +++ b/core/apps/embeddedkonsole/commandeditdialog.cpp | |||
@@ -146,23 +146,23 @@ void CommandEditDialog::accept() | |||
146 | int i = 0; | 146 | int i = 0; |
147 | Config *cfg = new Config("Konsole"); | 147 | Config *cfg = new Config("Konsole"); |
148 | cfg->setGroup("Commands"); | 148 | cfg->setGroup("Commands"); |
149 | cfg->clearGroup(); | 149 | cfg->clearGroup(); |
150 | 150 | ||
151 | QListViewItemIterator it( m_PlayListSelection ); | 151 | QListViewItemIterator it( m_PlayListSelection ); |
152 | 152 | ||
153 | for ( ; it.current(); ++it ) { | 153 | for ( ; it.current(); ++it ) { |
154 | // qDebug(it.current()->text(0)); | 154 | // odebug << it.current()->text(0) << oendl; |
155 | cfg->writeEntry(QString::number(i),it.current()->text(0)); | 155 | cfg->writeEntry(QString::number(i),it.current()->text(0)); |
156 | i++; | 156 | i++; |
157 | 157 | ||
158 | } | 158 | } |
159 | cfg->writeEntry("Commands Set","TRUE"); | 159 | cfg->writeEntry("Commands Set","TRUE"); |
160 | // qDebug("CommandEditDialog::accept() - written"); | 160 | // odebug << "CommandEditDialog::accept() - written" << oendl; |
161 | delete cfg; | 161 | delete cfg; |
162 | emit commandsEdited(); | 162 | emit commandsEdited(); |
163 | close(); | 163 | close(); |
164 | 164 | ||
165 | 165 | ||
166 | 166 | ||
167 | 167 | ||
168 | 168 | ||
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index 8207f23..80c8223 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp | |||
@@ -24,16 +24,17 @@ | |||
24 | 24 | ||
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
26 | #include <sys/types.h> | 26 | #include <sys/types.h> |
27 | #include <pwd.h> | 27 | #include <pwd.h> |
28 | #include <unistd.h> | 28 | #include <unistd.h> |
29 | 29 | ||
30 | #ifdef QT_QWS_OPIE | 30 | #ifdef QT_QWS_OPIE |
31 | #include <opie2/ocolorpopupmenu.h> | 31 | #include <opie2/ocolorpopupmenu.h> |
32 | #include <opie2/odebug.h> | ||
32 | using namespace Opie; | 33 | using namespace Opie; |
33 | #endif | 34 | #endif |
34 | 35 | ||
35 | #include <qpe/resource.h> | 36 | #include <qpe/resource.h> |
36 | 37 | ||
37 | #include <qmenubar.h> | 38 | #include <qmenubar.h> |
38 | #include <qtabbar.h> | 39 | #include <qtabbar.h> |
39 | #include <qpe/config.h> | 40 | #include <qpe/config.h> |
@@ -199,30 +200,30 @@ static const char *commonCmds[] = | |||
199 | */ | 200 | */ |
200 | 201 | ||
201 | "exit", | 202 | "exit", |
202 | NULL | 203 | NULL |
203 | }; | 204 | }; |
204 | 205 | ||
205 | 206 | ||
206 | static void konsoleInit(const char** shell) { | 207 | static void konsoleInit(const char** shell) { |
207 | if(setuid(getuid()) !=0) qDebug("setuid failed"); | 208 | if(setuid(getuid()) !=0) odebug << "setuid failed" << oendl; |
208 | if(setgid(getgid()) != 0) qDebug("setgid failed"); // drop privileges | 209 | if(setgid(getgid()) != 0) odebug << "setgid failed" << oendl; // drop privileges |
209 | 210 | ||
210 | 211 | ||
211 | // QPEApplication::grabKeyboard(); // for CTRL and ALT | 212 | // QPEApplication::grabKeyboard(); // for CTRL and ALT |
212 | 213 | ||
213 | qDebug("keyboard grabbed"); | 214 | odebug << "keyboard grabbed" << oendl; |
214 | #ifdef FAKE_CTRL_AND_ALT | 215 | #ifdef FAKE_CTRL_AND_ALT |
215 | qDebug("Fake Ctrl and Alt defined"); | 216 | odebug << "Fake Ctrl and Alt defined" << oendl; |
216 | QPEApplication::grabKeyboard(); // for CTRL and ALT | 217 | QPEApplication::grabKeyboard(); // for CTRL and ALT |
217 | #endif | 218 | #endif |
218 | 219 | ||
219 | *shell = getenv("SHELL"); | 220 | *shell = getenv("SHELL"); |
220 | qWarning("SHell initially is %s", *shell ); | 221 | owarn << "SHell initially is " << *shell << "" << oendl; |
221 | 222 | ||
222 | if (shell == NULL || *shell == '\0') { | 223 | if (shell == NULL || *shell == '\0') { |
223 | struct passwd *ent = 0; | 224 | struct passwd *ent = 0; |
224 | uid_t me = getuid(); | 225 | uid_t me = getuid(); |
225 | *shell = "/bin/sh"; | 226 | *shell = "/bin/sh"; |
226 | 227 | ||
227 | while ( (ent = getpwent()) != 0 ) { | 228 | while ( (ent = getpwent()) != 0 ) { |
228 | if (ent->pw_uid == me) { | 229 | if (ent->pw_uid == me) { |
@@ -230,17 +231,17 @@ static void konsoleInit(const char** shell) { | |||
230 | *shell = ent->pw_shell; | 231 | *shell = ent->pw_shell; |
231 | break; | 232 | break; |
232 | } | 233 | } |
233 | } | 234 | } |
234 | endpwent(); | 235 | endpwent(); |
235 | } | 236 | } |
236 | 237 | ||
237 | if( putenv((char*)"COLORTERM=") !=0) | 238 | if( putenv((char*)"COLORTERM=") !=0) |
238 | qDebug("putenv failed"); // to trigger mc's color detection | 239 | odebug << "putenv failed" << oendl; // to trigger mc's color detection |
239 | } | 240 | } |
240 | 241 | ||
241 | 242 | ||
242 | Konsole::Konsole(QWidget* parent, const char* name, WFlags fl) : | 243 | Konsole::Konsole(QWidget* parent, const char* name, WFlags fl) : |
243 | QMainWindow(parent, name, fl) | 244 | QMainWindow(parent, name, fl) |
244 | { | 245 | { |
245 | QStrList tmp; const char* shell; | 246 | QStrList tmp; const char* shell; |
246 | 247 | ||
@@ -276,17 +277,17 @@ class HistoryList : public QList<HistoryItem> | |||
276 | if (c1 < c2) | 277 | if (c1 < c2) |
277 | return(-1); | 278 | return(-1); |
278 | return(0); | 279 | return(0); |
279 | } | 280 | } |
280 | }; | 281 | }; |
281 | 282 | ||
282 | void Konsole::initCommandList() | 283 | void Konsole::initCommandList() |
283 | { | 284 | { |
284 | // qDebug("Konsole::initCommandList"); | 285 | // odebug << "Konsole::initCommandList" << oendl; |
285 | Config cfg( "Konsole" ); | 286 | Config cfg( "Konsole" ); |
286 | cfg.setGroup("Commands"); | 287 | cfg.setGroup("Commands"); |
287 | // commonCombo->setInsertionPolicy(QComboBox::AtCurrent); | 288 | // commonCombo->setInsertionPolicy(QComboBox::AtCurrent); |
288 | commonCombo->clear(); | 289 | commonCombo->clear(); |
289 | 290 | ||
290 | if (cfg.readEntry("ShellHistory","TRUE") == "TRUE") | 291 | if (cfg.readEntry("ShellHistory","TRUE") == "TRUE") |
291 | { | 292 | { |
292 | QString histfilename = QString(getenv("HOME")) + "/.bash_history"; | 293 | QString histfilename = QString(getenv("HOME")) + "/.bash_history"; |
@@ -508,17 +509,17 @@ void Konsole::init(const char* _pgm, QStrList & _args) | |||
508 | menuToolBar = new QToolBar( this ); | 509 | menuToolBar = new QToolBar( this ); |
509 | menuToolBar->setHorizontalStretchable( TRUE ); | 510 | menuToolBar->setHorizontalStretchable( TRUE ); |
510 | 511 | ||
511 | QMenuBar *menuBar = new QMenuBar( menuToolBar ); | 512 | QMenuBar *menuBar = new QMenuBar( menuToolBar ); |
512 | 513 | ||
513 | setFont(cfont); | 514 | setFont(cfont); |
514 | 515 | ||
515 | configMenu = new QPopupMenu( this); | 516 | configMenu = new QPopupMenu( this); |
516 | colorMenu = new QPopupMenu( this); | 517 | colorMenu = new QPopupMenu( this); |
517 | scrollMenu = new QPopupMenu( this); | 518 | scrollMenu = new QPopupMenu( this); |
518 | editCommandListMenu = new QPopupMenu( this); | 519 | editCommandListMenu = new QPopupMenu( this); |
519 | 520 | ||
520 | configMenu->insertItem(tr("Command List"), editCommandListMenu); | 521 | configMenu->insertItem(tr("Command List"), editCommandListMenu); |
521 | 522 | ||
522 | bool listHidden; | 523 | bool listHidden; |
523 | cfg.setGroup("Menubar"); | 524 | cfg.setGroup("Menubar"); |
524 | if( cfg.readEntry("Hidden","FALSE") == "TRUE") | 525 | if( cfg.readEntry("Hidden","FALSE") == "TRUE") |
@@ -1062,17 +1063,17 @@ QSize Konsole::calcSize(int columns, int lines) | |||
1062 | 1063 | ||
1063 | /** | 1064 | /** |
1064 | sets application window to a size based on columns X lines of the te | 1065 | sets application window to a size based on columns X lines of the te |
1065 | guest widget. Call with (0,0) for setting default size. | 1066 | guest widget. Call with (0,0) for setting default size. |
1066 | */ | 1067 | */ |
1067 | 1068 | ||
1068 | void Konsole::setColLin(int columns, int lines) | 1069 | void Konsole::setColLin(int columns, int lines) |
1069 | { | 1070 | { |
1070 | qDebug("konsole::setColLin:: Columns %d", columns); | 1071 | odebug << "konsole::setColLin:: Columns " << columns << "" << oendl; |
1071 | 1072 | ||
1072 | if ((columns==0) || (lines==0)) | 1073 | if ((columns==0) || (lines==0)) |
1073 | { | 1074 | { |
1074 | if (defaultSize.isEmpty()) // not in config file : set default value | 1075 | if (defaultSize.isEmpty()) // not in config file : set default value |
1075 | { | 1076 | { |
1076 | defaultSize = calcSize(80,24); | 1077 | defaultSize = calcSize(80,24); |
1077 | // notifySize(24,80); // set menu items (strange arg order !) | 1078 | // notifySize(24,80); // set menu items (strange arg order !) |
1078 | } | 1079 | } |
@@ -1110,17 +1111,17 @@ void Konsole::setFont(int fontno) | |||
1110 | n_font = fontno; | 1111 | n_font = fontno; |
1111 | } | 1112 | } |
1112 | */ | 1113 | */ |
1113 | 1114 | ||
1114 | // --| color selection |------------------------------------------------------- | 1115 | // --| color selection |------------------------------------------------------- |
1115 | 1116 | ||
1116 | void Konsole::changeColumns(int /*columns*/) | 1117 | void Konsole::changeColumns(int /*columns*/) |
1117 | { //FIXME this seems to cause silliness when reset command is executed | 1118 | { //FIXME this seems to cause silliness when reset command is executed |
1118 | // qDebug("change columns"); | 1119 | // odebug << "change columns" << oendl; |
1119 | // TEWidget* te = getTe(); | 1120 | // TEWidget* te = getTe(); |
1120 | // if (te != 0) { | 1121 | // if (te != 0) { |
1121 | // setColLin(columns,te->Lines()); | 1122 | // setColLin(columns,te->Lines()); |
1122 | // te->update(); | 1123 | // te->update(); |
1123 | // } | 1124 | // } |
1124 | } | 1125 | } |
1125 | 1126 | ||
1126 | //FIXME: If a child dies during session swap, | 1127 | //FIXME: If a child dies during session swap, |
@@ -1408,17 +1409,17 @@ void Konsole::colorMenuIsSelected(int iD) | |||
1408 | 1409 | ||
1409 | /// ------------------------------- some new stuff by L.J. Potter | 1410 | /// ------------------------------- some new stuff by L.J. Potter |
1410 | 1411 | ||
1411 | 1412 | ||
1412 | void Konsole::colorMenuSelected(int iD) | 1413 | void Konsole::colorMenuSelected(int iD) |
1413 | { | 1414 | { |
1414 | // this is NOT pretty, elegant or anything else besides functional | 1415 | // this is NOT pretty, elegant or anything else besides functional |
1415 | // QString temp; | 1416 | // QString temp; |
1416 | // qDebug( temp.sprintf("colormenu %d", iD)); | 1417 | // odebug << temp.sprintf("colormenu " << iD) << "" << oendl; |
1417 | 1418 | ||
1418 | TEWidget* te = getTe(); | 1419 | TEWidget* te = getTe(); |
1419 | Config cfg( "Konsole" ); | 1420 | Config cfg( "Konsole" ); |
1420 | cfg.setGroup("Colors"); | 1421 | cfg.setGroup("Colors"); |
1421 | 1422 | ||
1422 | ColorEntry m_table[TABLE_COLORS]; | 1423 | ColorEntry m_table[TABLE_COLORS]; |
1423 | const ColorEntry * defaultCt=te->getdefaultColorTable(); | 1424 | const ColorEntry * defaultCt=te->getdefaultColorTable(); |
1424 | 1425 | ||
@@ -1524,17 +1525,17 @@ void Konsole::colorMenuSelected(int iD) | |||
1524 | background.setRgb(0x00,0x00,0x00); | 1525 | background.setRgb(0x00,0x00,0x00); |
1525 | foreground.setRgb(255,215,105); | 1526 | foreground.setRgb(255,215,105); |
1526 | colorMenu->setItemChecked(cm_ab,TRUE); | 1527 | colorMenu->setItemChecked(cm_ab,TRUE); |
1527 | } | 1528 | } |
1528 | #ifdef QT_QWS_OPIE | 1529 | #ifdef QT_QWS_OPIE |
1529 | if(iD==-19) | 1530 | if(iD==-19) |
1530 | { | 1531 | { |
1531 | // Custom | 1532 | // Custom |
1532 | qDebug("do custom"); | 1533 | odebug << "do custom" << oendl; |
1533 | if(fromMenu) | 1534 | if(fromMenu) |
1534 | { | 1535 | { |
1535 | Opie::OColorPopupMenu* penColorPopupMenu = new Opie::OColorPopupMenu(Qt::black, this, "foreground color"); | 1536 | Opie::OColorPopupMenu* penColorPopupMenu = new Opie::OColorPopupMenu(Qt::black, this, "foreground color"); |
1536 | connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, | 1537 | connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, |
1537 | SLOT(changeForegroundColor(const QColor&))); | 1538 | SLOT(changeForegroundColor(const QColor&))); |
1538 | penColorPopupMenu->exec(); | 1539 | penColorPopupMenu->exec(); |
1539 | } | 1540 | } |
1540 | if(!fromMenu) | 1541 | if(!fromMenu) |
@@ -1629,17 +1630,17 @@ void Konsole::tabMenuSelected(int id) | |||
1629 | tabMenu->setItemChecked(id, true); | 1630 | tabMenu->setItemChecked(id, true); |
1630 | tabPos = id; | 1631 | tabPos = id; |
1631 | } | 1632 | } |
1632 | 1633 | ||
1633 | 1634 | ||
1634 | void Konsole::configMenuSelected(int iD) | 1635 | void Konsole::configMenuSelected(int iD) |
1635 | { | 1636 | { |
1636 | // QString temp; | 1637 | // QString temp; |
1637 | // qDebug( temp.sprintf("configmenu %d",iD)); | 1638 | // odebug << temp.sprintf("configmenu " << iD) << "" << oendl; |
1638 | 1639 | ||
1639 | TEWidget* te = getTe(); | 1640 | TEWidget* te = getTe(); |
1640 | Config cfg( "Konsole" ); | 1641 | Config cfg( "Konsole" ); |
1641 | cfg.setGroup("Menubar"); | 1642 | cfg.setGroup("Menubar"); |
1642 | if(iD == cm_wrap) | 1643 | if(iD == cm_wrap) |
1643 | { | 1644 | { |
1644 | cfg.setGroup("ScrollBar"); | 1645 | cfg.setGroup("ScrollBar"); |
1645 | bool b=cfg.readBoolEntry("HorzScroll",0); | 1646 | bool b=cfg.readBoolEntry("HorzScroll",0); |
@@ -1699,17 +1700,17 @@ void Konsole::setColor(int sess) | |||
1699 | cfg.readNumEntry("backgroundGreen",0)), | 1700 | cfg.readNumEntry("backgroundGreen",0)), |
1700 | cfg.readNumEntry("backgroundBlue"+ss, | 1701 | cfg.readNumEntry("backgroundBlue"+ss, |
1701 | cfg.readNumEntry("backgroundBlue",0))); | 1702 | cfg.readNumEntry("backgroundBlue",0))); |
1702 | setColors(foreground, background); | 1703 | setColors(foreground, background); |
1703 | } | 1704 | } |
1704 | 1705 | ||
1705 | void Konsole::scrollMenuSelected(int index) | 1706 | void Konsole::scrollMenuSelected(int index) |
1706 | { | 1707 | { |
1707 | // qDebug( "scrollbar menu %d",index); | 1708 | // odebug << "scrollbar menu " << index << "" << oendl; |
1708 | 1709 | ||
1709 | TEWidget* te = getTe(); | 1710 | TEWidget* te = getTe(); |
1710 | Config cfg( "Konsole" ); | 1711 | Config cfg( "Konsole" ); |
1711 | cfg.setGroup("ScrollBar"); | 1712 | cfg.setGroup("ScrollBar"); |
1712 | 1713 | ||
1713 | if(index == sm_none) | 1714 | if(index == sm_none) |
1714 | { | 1715 | { |
1715 | te->setScrollbarLocation(0); | 1716 | te->setScrollbarLocation(0); |
@@ -1743,17 +1744,17 @@ void Konsole::scrollMenuSelected(int index) | |||
1743 | // } | 1744 | // } |
1744 | // te->setScrollbarLocation( cfg.readNumEntry("Position",2)); | 1745 | // te->setScrollbarLocation( cfg.readNumEntry("Position",2)); |
1745 | // } | 1746 | // } |
1746 | // break; | 1747 | // break; |
1747 | 1748 | ||
1748 | void Konsole::editCommandListMenuSelected(int iD) | 1749 | void Konsole::editCommandListMenuSelected(int iD) |
1749 | { | 1750 | { |
1750 | // QString temp; | 1751 | // QString temp; |
1751 | // qDebug( temp.sprintf("edit command list %d",iD)); | 1752 | // odebug << temp.sprintf("edit command list " << iD) << "" << oendl; |
1752 | 1753 | ||
1753 | // FIXME: more cleanup needed here | 1754 | // FIXME: more cleanup needed here |
1754 | 1755 | ||
1755 | 1756 | ||
1756 | TEWidget* te = getTe(); | 1757 | TEWidget* te = getTe(); |
1757 | Config cfg( "Konsole" ); | 1758 | Config cfg( "Konsole" ); |
1758 | cfg.setGroup("Menubar"); | 1759 | cfg.setGroup("Menubar"); |
1759 | if( iD == ec_cmdlist) | 1760 | if( iD == ec_cmdlist) |
@@ -1784,17 +1785,17 @@ void Konsole::editCommandListMenuSelected(int iD) | |||
1784 | configMenu->setItemChecked(ec_edit,FALSE); | 1785 | configMenu->setItemChecked(ec_edit,FALSE); |
1785 | commonCombo->setEditable( FALSE ); | 1786 | commonCombo->setEditable( FALSE ); |
1786 | } | 1787 | } |
1787 | } | 1788 | } |
1788 | } | 1789 | } |
1789 | if( iD == ec_quick) | 1790 | if( iD == ec_quick) |
1790 | { | 1791 | { |
1791 | cfg.setGroup("Commands"); | 1792 | cfg.setGroup("Commands"); |
1792 | // qDebug("enableCommandEdit"); | 1793 | // odebug << "enableCommandEdit" << oendl; |
1793 | if( !configMenu->isItemChecked(iD) ) | 1794 | if( !configMenu->isItemChecked(iD) ) |
1794 | { | 1795 | { |
1795 | commonCombo->setEditable( TRUE ); | 1796 | commonCombo->setEditable( TRUE ); |
1796 | configMenu->setItemChecked(iD,TRUE); | 1797 | configMenu->setItemChecked(iD,TRUE); |
1797 | commonCombo->setCurrentItem(0); | 1798 | commonCombo->setCurrentItem(0); |
1798 | cfg.writeEntry("EditEnabled","TRUE"); | 1799 | cfg.writeEntry("EditEnabled","TRUE"); |
1799 | } | 1800 | } |
1800 | else | 1801 | else |
@@ -1872,40 +1873,40 @@ void Konsole::changeForegroundColor(const QColor &color) | |||
1872 | { | 1873 | { |
1873 | Config cfg( "Konsole" ); | 1874 | Config cfg( "Konsole" ); |
1874 | cfg.setGroup("Colors"); | 1875 | cfg.setGroup("Colors"); |
1875 | int r, g, b; | 1876 | int r, g, b; |
1876 | color.rgb(&r,&g,&b); | 1877 | color.rgb(&r,&g,&b); |
1877 | foreground.setRgb(r,g,b); | 1878 | foreground.setRgb(r,g,b); |
1878 | 1879 | ||
1879 | cfg.writeEntry("foreground",color.name()); | 1880 | cfg.writeEntry("foreground",color.name()); |
1880 | qDebug("foreground "+color.name()); | 1881 | odebug << "foreground "+color.name() << oendl; |
1881 | cfg.write(); | 1882 | cfg.write(); |
1882 | 1883 | ||
1883 | qDebug("do other dialog"); | 1884 | odebug << "do other dialog" << oendl; |
1884 | #ifdef QT_QWS_OPIE | 1885 | #ifdef QT_QWS_OPIE |
1885 | 1886 | ||
1886 | Opie::OColorPopupMenu* penColorPopupMenu2 = new Opie::OColorPopupMenu(Qt::black, this,"background color"); | 1887 | Opie::OColorPopupMenu* penColorPopupMenu2 = new Opie::OColorPopupMenu(Qt::black, this,"background color"); |
1887 | connect(penColorPopupMenu2, SIGNAL(colorSelected(const QColor&)), this, | 1888 | connect(penColorPopupMenu2, SIGNAL(colorSelected(const QColor&)), this, |
1888 | SLOT(changeBackgroundColor(const QColor&))); | 1889 | SLOT(changeBackgroundColor(const QColor&))); |
1889 | penColorPopupMenu2->exec(); | 1890 | penColorPopupMenu2->exec(); |
1890 | #endif | 1891 | #endif |
1891 | } | 1892 | } |
1892 | 1893 | ||
1893 | void Konsole::changeBackgroundColor(const QColor &color) | 1894 | void Konsole::changeBackgroundColor(const QColor &color) |
1894 | { | 1895 | { |
1895 | 1896 | ||
1896 | qDebug("Change background"); | 1897 | odebug << "Change background" << oendl; |
1897 | Config cfg( "Konsole" ); | 1898 | Config cfg( "Konsole" ); |
1898 | cfg.setGroup("Colors"); | 1899 | cfg.setGroup("Colors"); |
1899 | int r, g, b; | 1900 | int r, g, b; |
1900 | color.rgb(&r,&g,&b); | 1901 | color.rgb(&r,&g,&b); |
1901 | background.setRgb(r,g,b); | 1902 | background.setRgb(r,g,b); |
1902 | cfg.writeEntry("background",color.name()); | 1903 | cfg.writeEntry("background",color.name()); |
1903 | qDebug("background "+color.name()); | 1904 | odebug << "background "+color.name() << oendl; |
1904 | cfg.write(); | 1905 | cfg.write(); |
1905 | } | 1906 | } |
1906 | 1907 | ||
1907 | void Konsole::doWrap() | 1908 | void Konsole::doWrap() |
1908 | { | 1909 | { |
1909 | Config cfg( "Konsole" ); | 1910 | Config cfg( "Konsole" ); |
1910 | cfg.setGroup("ScrollBar"); | 1911 | cfg.setGroup("ScrollBar"); |
1911 | TEWidget* te = getTe(); | 1912 | TEWidget* te = getTe(); |
diff --git a/core/apps/embeddedkonsole/main.cpp b/core/apps/embeddedkonsole/main.cpp index b851d3e..131e782 100644 --- a/core/apps/embeddedkonsole/main.cpp +++ b/core/apps/embeddedkonsole/main.cpp | |||
@@ -40,22 +40,22 @@ OPIE_EXPORT_APP( OApplicationFactory<Konsole> ) | |||
40 | #include <stdlib.h> | 40 | #include <stdlib.h> |
41 | 41 | ||
42 | #include <pwd.h> | 42 | #include <pwd.h> |
43 | #include <sys/types.h> | 43 | #include <sys/types.h> |
44 | 44 | ||
45 | 45 | ||
46 | /* --| main |------------------------------------------------------ */ | 46 | /* --| main |------------------------------------------------------ */ |
47 | int main(int argc, char* argv[]) { | 47 | int main(int argc, char* argv[]) { |
48 | if(setuid(getuid()) !=0) qDebug("setuid failed"); | 48 | if(setuid(getuid()) !=0) odebug << "setuid failed" << oendl; |
49 | if(setgid(getgid()) != 0) qDebug("setgid failed"); // drop privileges | 49 | if(setgid(getgid()) != 0) odebug << "setgid failed" << oendl; // drop privileges |
50 | 50 | ||
51 | QPEApplication a( argc, argv ); | 51 | QPEApplication a( argc, argv ); |
52 | #ifdef FAKE_CTRL_AND_ALT | 52 | #ifdef FAKE_CTRL_AND_ALT |
53 | qDebug("Fake Ctrl and Alt defined"); | 53 | odebug << "Fake Ctrl and Alt defined" << oendl; |
54 | QPEApplication::grabKeyboard(); // for CTRL and ALT | 54 | QPEApplication::grabKeyboard(); // for CTRL and ALT |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | QStrList tmp; | 57 | QStrList tmp; |
58 | const char* shell = getenv("SHELL"); | 58 | const char* shell = getenv("SHELL"); |
59 | 59 | ||
60 | if (shell == NULL || *shell == '\0') { | 60 | if (shell == NULL || *shell == '\0') { |
61 | struct passwd *ent = 0; | 61 | struct passwd *ent = 0; |
@@ -68,17 +68,17 @@ OPIE_EXPORT_APP( OApplicationFactory<Konsole> ) | |||
68 | shell = ent->pw_shell; | 68 | shell = ent->pw_shell; |
69 | break; | 69 | break; |
70 | } | 70 | } |
71 | } | 71 | } |
72 | endpwent(); | 72 | endpwent(); |
73 | } | 73 | } |
74 | 74 | ||
75 | if( putenv((char*)"COLORTERM=") !=0) | 75 | if( putenv((char*)"COLORTERM=") !=0) |
76 | qDebug("putenv failed"); // to trigger mc's color detection | 76 | odebug << "putenv failed" << oendl; // to trigger mc's color detection |
77 | 77 | ||
78 | Konsole m( "test", shell, tmp, TRUE ); | 78 | Konsole m( "test", shell, tmp, TRUE ); |
79 | m.setCaption( Konsole::tr("Terminal") ); | 79 | m.setCaption( Konsole::tr("Terminal") ); |
80 | a.showMainWidget( &m ); | 80 | a.showMainWidget( &m ); |
81 | 81 | ||
82 | return a.exec(); | 82 | return a.exec(); |
83 | } | 83 | } |
84 | 84 | ||
diff --git a/core/apps/embeddedkonsole/playlistselection.cpp b/core/apps/embeddedkonsole/playlistselection.cpp index fc5330f..096d36a 100644 --- a/core/apps/embeddedkonsole/playlistselection.cpp +++ b/core/apps/embeddedkonsole/playlistselection.cpp | |||
@@ -12,24 +12,27 @@ | |||
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 | #include <qheader.h> | ||
21 | 20 | ||
22 | #include "playlistselection.h" | 21 | #include "playlistselection.h" |
23 | 22 | ||
24 | #include <stdlib.h> | 23 | /* OPIE */ |
25 | 24 | #include <opie2/odebug.h> | |
26 | 25 | ||
26 | /* Qt */ | ||
27 | #include <qheader.h> | ||
27 | 28 | ||
29 | /* STD */ | ||
30 | #include <stdlib.h> | ||
28 | 31 | ||
29 | 32 | ||
30 | PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) | 33 | PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) |
31 | : QListView( parent, name ) | 34 | : QListView( parent, name ) |
32 | { | 35 | { |
33 | setAllColumnsShowFocus( TRUE ); | 36 | setAllColumnsShowFocus( TRUE ); |
34 | addColumn( tr( "Command Selection" ) ); | 37 | addColumn( tr( "Command Selection" ) ); |
35 | header()->hide(); | 38 | header()->hide(); |
@@ -76,17 +79,17 @@ void PlayListSelection::addStringToSelection (const QString & lnk) { | |||
76 | QListViewItem *current = selectedItem(); | 79 | QListViewItem *current = selectedItem(); |
77 | if ( current ) | 80 | if ( current ) |
78 | item->moveItem( current ); | 81 | item->moveItem( current ); |
79 | setSelected( item, TRUE ); | 82 | setSelected( item, TRUE ); |
80 | ensureItemVisible( selectedItem() ); | 83 | ensureItemVisible( selectedItem() ); |
81 | 84 | ||
82 | } | 85 | } |
83 | void PlayListSelection::removeSelected() { | 86 | void PlayListSelection::removeSelected() { |
84 | qDebug("removeSelected()"); | 87 | odebug << "removeSelected()" << oendl; |
85 | QListViewItem *item = selectedItem(); | 88 | QListViewItem *item = selectedItem(); |
86 | if ( item ) | 89 | if ( item ) |
87 | delete item; | 90 | delete item; |
88 | setSelected( currentItem(), TRUE ); | 91 | setSelected( currentItem(), TRUE ); |
89 | ensureItemVisible( selectedItem() ); | 92 | ensureItemVisible( selectedItem() ); |
90 | } | 93 | } |
91 | 94 | ||
92 | 95 | ||