summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-05-27 13:48:04 (UTC)
committer llornkcor <llornkcor>2002-05-27 13:48:04 (UTC)
commit22e2c411ad5e6ff1c01c754a2fe824af26c3c9bd (patch) (unidiff)
tree4fdcaa011e88ef93148825ca40696ab58ff2a57c
parent9dd7e9c149a17482fd947139f105946ede672b64 (diff)
downloadopie-22e2c411ad5e6ff1c01c754a2fe824af26c3c9bd.zip
opie-22e2c411ad5e6ff1c01c754a2fe824af26c3c9bd.tar.gz
opie-22e2c411ad5e6ff1c01c754a2fe824af26c3c9bd.tar.bz2
removed redundant entries from suggested commands, added 3 qcop commands to main list
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/commandeditdialog.cpp34
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp3
2 files changed, 8 insertions, 29 deletions
diff --git a/core/apps/embeddedkonsole/commandeditdialog.cpp b/core/apps/embeddedkonsole/commandeditdialog.cpp
index ce21c47..8b2abfa 100644
--- a/core/apps/embeddedkonsole/commandeditdialog.cpp
+++ b/core/apps/embeddedkonsole/commandeditdialog.cpp
@@ -6,100 +6,76 @@
6#include <qpe/config.h> 6#include <qpe/config.h>
7#include <qpe/qpetoolbar.h> 7#include <qpe/qpetoolbar.h>
8#include <qwidget.h> 8#include <qwidget.h>
9#include <qpe/qpemenubar.h> 9#include <qpe/qpemenubar.h>
10#include <qpe/resource.h> 10#include <qpe/resource.h>
11#include <qlist.h> 11#include <qlist.h>
12#include <qtoolbutton.h> 12#include <qtoolbutton.h>
13#include <qvbox.h> 13#include <qvbox.h>
14#include <qlistview.h> 14#include <qlistview.h>
15#include <qlineedit.h> 15#include <qlineedit.h>
16#include <qheader.h> 16#include <qheader.h>
17#include <qlabel.h> 17#include <qlabel.h>
18#include <qmessagebox.h> 18#include <qmessagebox.h>
19#include "smallcommandeditdialogbase.h" 19#include "smallcommandeditdialogbase.h"
20 20
21CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags fl ) 21CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags fl )
22 : CommandEditDialogBase(parent, name, TRUE, fl) 22 : CommandEditDialogBase(parent, name, TRUE, fl)
23 23
24{ 24{
25 m_SuggestedCommandList->addColumn( tr("Command Selection") ); 25 m_SuggestedCommandList->addColumn( tr("Command Selection") );
26 m_SuggestedCommandList->header()->hide(); 26 m_SuggestedCommandList->header()->hide();
27 m_SuggestedCommandList->setSorting(-1,FALSE); 27 m_SuggestedCommandList->setSorting(-1,FALSE);
28 m_SuggestedCommandList->clearSelection(); 28 m_SuggestedCommandList->clearSelection();
29 m_SuggestedCommandList->setSorting(0,TRUE); 29 m_SuggestedCommandList->setSorting(0,TRUE);
30 30 QListViewItem *item;
31 QListViewItem *item;
32
33
34 item = new QListViewItem( m_SuggestedCommandList,"ls ");
35
36 item = new QListViewItem( m_SuggestedCommandList,"cat ");
37 item = new QListViewItem( m_SuggestedCommandList,"cd ");
38 item = new QListViewItem( m_SuggestedCommandList,"chmod ");
39 item = new QListViewItem( m_SuggestedCommandList,"cp ");
40 item = new QListViewItem( m_SuggestedCommandList,"dc ");
41 item = new QListViewItem( m_SuggestedCommandList,"df ");
42 item = new QListViewItem( m_SuggestedCommandList,"dmesg ");
43 item = new QListViewItem( m_SuggestedCommandList,"echo ");
44 item = new QListViewItem( m_SuggestedCommandList,"export "); 31 item = new QListViewItem( m_SuggestedCommandList,"export ");
45 item = new QListViewItem( m_SuggestedCommandList,"env ");
46 item = new QListViewItem( m_SuggestedCommandList,"find ");
47 item = new QListViewItem( m_SuggestedCommandList,"free ");
48 item = new QListViewItem( m_SuggestedCommandList,"ifconfig "); 32 item = new QListViewItem( m_SuggestedCommandList,"ifconfig ");
49 item = new QListViewItem( m_SuggestedCommandList,"ipkg "); 33 item = new QListViewItem( m_SuggestedCommandList,"ipkg ");
50 item = new QListViewItem( m_SuggestedCommandList,"mkdir ");
51 item = new QListViewItem( m_SuggestedCommandList,"mv ");
52 item = new QListViewItem( m_SuggestedCommandList,"nc localhost 7776 ");
53 item = new QListViewItem( m_SuggestedCommandList,"nc localhost 7777 ");
54 item = new QListViewItem( m_SuggestedCommandList,"nslookup ");
55 item = new QListViewItem( m_SuggestedCommandList,"ping ");
56 item = new QListViewItem( m_SuggestedCommandList,"ps aux");
57 item = new QListViewItem( m_SuggestedCommandList,"pwd ");
58 item = new QListViewItem( m_SuggestedCommandList,"rm ");
59 item = new QListViewItem( m_SuggestedCommandList,"rmdir ");
60 item = new QListViewItem( m_SuggestedCommandList,"route ");
61 item = new QListViewItem( m_SuggestedCommandList,"gzip "); 34 item = new QListViewItem( m_SuggestedCommandList,"gzip ");
62 item = new QListViewItem( m_SuggestedCommandList,"gunzip "); 35 item = new QListViewItem( m_SuggestedCommandList,"gunzip ");
63 item = new QListViewItem( m_SuggestedCommandList,"chgrp "); 36 item = new QListViewItem( m_SuggestedCommandList,"chgrp ");
64 item = new QListViewItem( m_SuggestedCommandList,"chown "); 37 item = new QListViewItem( m_SuggestedCommandList,"chown ");
65 item = new QListViewItem( m_SuggestedCommandList,"date "); 38 item = new QListViewItem( m_SuggestedCommandList,"date ");
66 item = new QListViewItem( m_SuggestedCommandList,"dd "); 39 item = new QListViewItem( m_SuggestedCommandList,"dd ");
67 item = new QListViewItem( m_SuggestedCommandList,"df ");
68 item = new QListViewItem( m_SuggestedCommandList,"dmesg "); 40 item = new QListViewItem( m_SuggestedCommandList,"dmesg ");
69 item = new QListViewItem( m_SuggestedCommandList,"fuser "); 41 item = new QListViewItem( m_SuggestedCommandList,"fuser ");
70 item = new QListViewItem( m_SuggestedCommandList,"hostname "); 42 item = new QListViewItem( m_SuggestedCommandList,"hostname ");
71 item = new QListViewItem( m_SuggestedCommandList,"kill "); 43 item = new QListViewItem( m_SuggestedCommandList,"kill ");
72 item = new QListViewItem( m_SuggestedCommandList,"killall "); 44 item = new QListViewItem( m_SuggestedCommandList,"killall ");
73 item = new QListViewItem( m_SuggestedCommandList,"ln "); 45 item = new QListViewItem( m_SuggestedCommandList,"ln ");
74 item = new QListViewItem( m_SuggestedCommandList,"ln -s "); 46 item = new QListViewItem( m_SuggestedCommandList,"ln -s ");
47 item = new QListViewItem( m_SuggestedCommandList,"lsmod");
48 item = new QListViewItem( m_SuggestedCommandList,"depmod -a");
49 item = new QListViewItem( m_SuggestedCommandList,"modprobe ");
75 item = new QListViewItem( m_SuggestedCommandList,"mount "); 50 item = new QListViewItem( m_SuggestedCommandList,"mount ");
76 item = new QListViewItem( m_SuggestedCommandList,"more "); 51 item = new QListViewItem( m_SuggestedCommandList,"more ");
77 item = new QListViewItem( m_SuggestedCommandList,"sort "); 52 item = new QListViewItem( m_SuggestedCommandList,"sort ");
78 item = new QListViewItem( m_SuggestedCommandList,"touch "); 53 item = new QListViewItem( m_SuggestedCommandList,"touch ");
79 item = new QListViewItem( m_SuggestedCommandList,"umount "); 54 item = new QListViewItem( m_SuggestedCommandList,"umount ");
80 item = new QListViewItem( m_SuggestedCommandList,"mknod "); 55 item = new QListViewItem( m_SuggestedCommandList,"mknod ");
81 item = new QListViewItem( m_SuggestedCommandList,"netstat "); 56 item = new QListViewItem( m_SuggestedCommandList,"netstat ");
57 item = new QListViewItem( m_SuggestedCommandList,"route ");
82 item = new QListViewItem( m_SuggestedCommandList,"cardctl eject "); 58 item = new QListViewItem( m_SuggestedCommandList,"cardctl eject ");
83 m_SuggestedCommandList->setSelected(m_SuggestedCommandList->firstChild(),TRUE); 59 m_SuggestedCommandList->setSelected(m_SuggestedCommandList->firstChild(),TRUE);
84 m_SuggestedCommandList->sort(); 60 m_SuggestedCommandList->sort();
85 61
86 connect( m_SuggestedCommandList, SIGNAL( clicked( QListViewItem * ) ), m_PlayListSelection, SLOT( addToSelection( QListViewItem *) ) ); 62 connect( m_SuggestedCommandList, SIGNAL( clicked( QListViewItem * ) ), m_PlayListSelection, SLOT( addToSelection( QListViewItem *) ) );
87 63
88 64
89 65
90 ToolButton1->setTextLabel("new"); 66 ToolButton1->setTextLabel("new");
91 ToolButton1->setPixmap(Resource::loadPixmap("new")); 67 ToolButton1->setPixmap(Resource::loadPixmap("new"));
92 ToolButton1->setAutoRaise(TRUE); 68 ToolButton1->setAutoRaise(TRUE);
93 ToolButton1->setFocusPolicy(QWidget::NoFocus); 69 ToolButton1->setFocusPolicy(QWidget::NoFocus);
94 connect(ToolButton1,SIGNAL(clicked()),this,SLOT(showAddDialog())); 70 connect(ToolButton1,SIGNAL(clicked()),this,SLOT(showAddDialog()));
95 71
96 ToolButton2->setTextLabel("edit"); 72 ToolButton2->setTextLabel("edit");
97 ToolButton2->setPixmap(Resource::loadPixmap("edit")); 73 ToolButton2->setPixmap(Resource::loadPixmap("edit"));
98 ToolButton2->setAutoRaise(TRUE); 74 ToolButton2->setAutoRaise(TRUE);
99 ToolButton2->setFocusPolicy(QWidget::NoFocus); 75 ToolButton2->setFocusPolicy(QWidget::NoFocus);
100 connect(ToolButton2,SIGNAL(clicked()),this,SLOT(showEditDialog())); 76 connect(ToolButton2,SIGNAL(clicked()),this,SLOT(showEditDialog()));
101 77
102 ToolButton3->setTextLabel("delete"); 78 ToolButton3->setTextLabel("delete");
103 ToolButton3->setPixmap(Resource::loadPixmap("editdelete")); 79 ToolButton3->setPixmap(Resource::loadPixmap("editdelete"));
104 ToolButton3->setAutoRaise(TRUE); 80 ToolButton3->setAutoRaise(TRUE);
105 ToolButton3->setFocusPolicy(QWidget::NoFocus); 81 ToolButton3->setFocusPolicy(QWidget::NoFocus);
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index f13d0c9..3f6e0b4 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -108,48 +108,51 @@ static const char *commonCmds[] =
108 "cat ", 108 "cat ",
109 "cd ", 109 "cd ",
110 "chmod ", 110 "chmod ",
111 "clear", 111 "clear",
112 "cp ", 112 "cp ",
113 "dc ", 113 "dc ",
114 "df ", 114 "df ",
115 "dmesg", 115 "dmesg",
116 "echo ", 116 "echo ",
117 "env", 117 "env",
118 "find ", 118 "find ",
119 "free", 119 "free",
120 "grep ", 120 "grep ",
121 "ifconfig ", 121 "ifconfig ",
122 "ipkg ", 122 "ipkg ",
123 "mkdir ", 123 "mkdir ",
124 "mv ", 124 "mv ",
125 "nc localhost 7776", 125 "nc localhost 7776",
126 "nc localhost 7777", 126 "nc localhost 7777",
127 "netstat ", 127 "netstat ",
128 "nslookup ", 128 "nslookup ",
129 "ping ", 129 "ping ",
130 "ps aux", 130 "ps aux",
131 "pwd ", 131 "pwd ",
132 "qcop QPE/System 'linkChanged(QString)' ''",
133 "qcop QPE/System 'restart()'",
134 "qcop QPE/System 'quit()'",
132 "rm ", 135 "rm ",
133 "rmdir ", 136 "rmdir ",
134 "route ", 137 "route ",
135 "set ", 138 "set ",
136 "traceroute", 139 "traceroute",
137 140
138/* 141/*
139 "gzip", 142 "gzip",
140 "gunzip", 143 "gunzip",
141 "chgrp", 144 "chgrp",
142 "chown", 145 "chown",
143 "date", 146 "date",
144 "dd", 147 "dd",
145 "df", 148 "df",
146 "dmesg", 149 "dmesg",
147 "fuser", 150 "fuser",
148 "hostname", 151 "hostname",
149 "kill", 152 "kill",
150 "killall", 153 "killall",
151 "ln", 154 "ln",
152 "ping", 155 "ping",
153 "mount", 156 "mount",
154 "more", 157 "more",
155 "sort", 158 "sort",