Diffstat (limited to 'core/apps/embeddedkonsole/commandeditdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/commandeditdialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/apps/embeddedkonsole/commandeditdialog.cpp b/core/apps/embeddedkonsole/commandeditdialog.cpp index c0066d8..6587b26 100644 --- a/core/apps/embeddedkonsole/commandeditdialog.cpp +++ b/core/apps/embeddedkonsole/commandeditdialog.cpp | |||
@@ -6,97 +6,97 @@ | |||
6 | #include <qpe/resource.h> | 6 | #include <qpe/resource.h> |
7 | #include <qtoolbutton.h> | 7 | #include <qtoolbutton.h> |
8 | #include <qlineedit.h> | 8 | #include <qlineedit.h> |
9 | #include <qheader.h> | 9 | #include <qheader.h> |
10 | #include <qlabel.h> | 10 | #include <qlabel.h> |
11 | #include "smallcommandeditdialogbase.h" | 11 | #include "smallcommandeditdialogbase.h" |
12 | 12 | ||
13 | CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags fl ) | 13 | CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags fl ) |
14 | : CommandEditDialogBase(parent, name, TRUE, fl) | 14 | : CommandEditDialogBase(parent, name, TRUE, fl) |
15 | 15 | ||
16 | { | 16 | { |
17 | m_SuggestedCommandList->addColumn( tr("Command Selection") ); | 17 | m_SuggestedCommandList->addColumn( tr("Command Selection") ); |
18 | m_SuggestedCommandList->header()->hide(); | 18 | m_SuggestedCommandList->header()->hide(); |
19 | m_SuggestedCommandList->setSorting(-1,FALSE); | 19 | m_SuggestedCommandList->setSorting(-1,FALSE); |
20 | m_SuggestedCommandList->clearSelection(); | 20 | m_SuggestedCommandList->clearSelection(); |
21 | m_SuggestedCommandList->setSorting(0,TRUE); | 21 | m_SuggestedCommandList->setSorting(0,TRUE); |
22 | QListViewItem *item; | 22 | QListViewItem *item; |
23 | item = new QListViewItem( m_SuggestedCommandList,"export "); | 23 | item = new QListViewItem( m_SuggestedCommandList,"export "); |
24 | item = new QListViewItem( m_SuggestedCommandList,"ifconfig "); | 24 | item = new QListViewItem( m_SuggestedCommandList,"ifconfig "); |
25 | item = new QListViewItem( m_SuggestedCommandList,"ipkg "); | 25 | item = new QListViewItem( m_SuggestedCommandList,"ipkg "); |
26 | item = new QListViewItem( m_SuggestedCommandList,"gzip "); | 26 | item = new QListViewItem( m_SuggestedCommandList,"gzip "); |
27 | item = new QListViewItem( m_SuggestedCommandList,"gunzip "); | 27 | item = new QListViewItem( m_SuggestedCommandList,"gunzip "); |
28 | item = new QListViewItem( m_SuggestedCommandList,"chgrp "); | 28 | item = new QListViewItem( m_SuggestedCommandList,"chgrp "); |
29 | item = new QListViewItem( m_SuggestedCommandList,"chown "); | 29 | item = new QListViewItem( m_SuggestedCommandList,"chown "); |
30 | item = new QListViewItem( m_SuggestedCommandList,"date "); | 30 | item = new QListViewItem( m_SuggestedCommandList,"date "); |
31 | item = new QListViewItem( m_SuggestedCommandList,"dd "); | 31 | item = new QListViewItem( m_SuggestedCommandList,"dd "); |
32 | item = new QListViewItem( m_SuggestedCommandList,"dmesg "); | 32 | item = new QListViewItem( m_SuggestedCommandList,"dmesg "); |
33 | item = new QListViewItem( m_SuggestedCommandList,"fuser "); | 33 | item = new QListViewItem( m_SuggestedCommandList,"fuser "); |
34 | item = new QListViewItem( m_SuggestedCommandList,"hostname "); | 34 | item = new QListViewItem( m_SuggestedCommandList,"hostname "); |
35 | item = new QListViewItem( m_SuggestedCommandList,"kill "); | 35 | item = new QListViewItem( m_SuggestedCommandList,"kill "); |
36 | item = new QListViewItem( m_SuggestedCommandList,"killall "); | 36 | item = new QListViewItem( m_SuggestedCommandList,"killall "); |
37 | item = new QListViewItem( m_SuggestedCommandList,"ln "); | 37 | item = new QListViewItem( m_SuggestedCommandList,"ln "); |
38 | item = new QListViewItem( m_SuggestedCommandList,"ln -s "); | 38 | item = new QListViewItem( m_SuggestedCommandList,"ln -s "); |
39 | item = new QListViewItem( m_SuggestedCommandList,"lsmod"); | 39 | item = new QListViewItem( m_SuggestedCommandList,"lsmod"); |
40 | item = new QListViewItem( m_SuggestedCommandList,"depmod -a"); | 40 | item = new QListViewItem( m_SuggestedCommandList,"depmod -a"); |
41 | item = new QListViewItem( m_SuggestedCommandList,"modprobe "); | 41 | item = new QListViewItem( m_SuggestedCommandList,"modprobe "); |
42 | item = new QListViewItem( m_SuggestedCommandList,"mount "); | 42 | item = new QListViewItem( m_SuggestedCommandList,"mount "); |
43 | item = new QListViewItem( m_SuggestedCommandList,"more "); | 43 | item = new QListViewItem( m_SuggestedCommandList,"more "); |
44 | item = new QListViewItem( m_SuggestedCommandList,"sort "); | 44 | item = new QListViewItem( m_SuggestedCommandList,"sort "); |
45 | item = new QListViewItem( m_SuggestedCommandList,"touch "); | 45 | item = new QListViewItem( m_SuggestedCommandList,"touch "); |
46 | item = new QListViewItem( m_SuggestedCommandList,"umount "); | 46 | item = new QListViewItem( m_SuggestedCommandList,"umount "); |
47 | item = new QListViewItem( m_SuggestedCommandList,"mknod "); | 47 | item = new QListViewItem( m_SuggestedCommandList,"mknod "); |
48 | item = new QListViewItem( m_SuggestedCommandList,"netstat "); | 48 | item = new QListViewItem( m_SuggestedCommandList,"netstat "); |
49 | item = new QListViewItem( m_SuggestedCommandList,"route "); | 49 | item = new QListViewItem( m_SuggestedCommandList,"route "); |
50 | item = new QListViewItem( m_SuggestedCommandList,"cardctl eject "); | 50 | item = new QListViewItem( m_SuggestedCommandList,"cardctl eject "); |
51 | m_SuggestedCommandList->setSelected(m_SuggestedCommandList->firstChild(),TRUE); | 51 | m_SuggestedCommandList->setSelected(m_SuggestedCommandList->firstChild(),TRUE); |
52 | m_SuggestedCommandList->sort(); | 52 | m_SuggestedCommandList->sort(); |
53 | 53 | ||
54 | connect( m_SuggestedCommandList, SIGNAL( clicked( QListViewItem * ) ), m_PlayListSelection, SLOT( addToSelection( QListViewItem *) ) ); | 54 | connect( m_SuggestedCommandList, SIGNAL( clicked(QListViewItem*) ), m_PlayListSelection, SLOT( addToSelection(QListViewItem*) ) ); |
55 | 55 | ||
56 | 56 | ||
57 | 57 | ||
58 | ToolButton1->setTextLabel("new"); | 58 | ToolButton1->setTextLabel("new"); |
59 | ToolButton1->setPixmap(Resource::loadPixmap("new")); | 59 | ToolButton1->setPixmap(Resource::loadPixmap("new")); |
60 | ToolButton1->setAutoRaise(TRUE); | 60 | ToolButton1->setAutoRaise(TRUE); |
61 | ToolButton1->setFocusPolicy(QWidget::NoFocus); | 61 | ToolButton1->setFocusPolicy(QWidget::NoFocus); |
62 | connect(ToolButton1,SIGNAL(clicked()),this,SLOT(showAddDialog())); | 62 | connect(ToolButton1,SIGNAL(clicked()),this,SLOT(showAddDialog())); |
63 | 63 | ||
64 | ToolButton2->setTextLabel("edit"); | 64 | ToolButton2->setTextLabel("edit"); |
65 | ToolButton2->setPixmap(Resource::loadPixmap("edit")); | 65 | ToolButton2->setPixmap(Resource::loadPixmap("edit")); |
66 | ToolButton2->setAutoRaise(TRUE); | 66 | ToolButton2->setAutoRaise(TRUE); |
67 | ToolButton2->setFocusPolicy(QWidget::NoFocus); | 67 | ToolButton2->setFocusPolicy(QWidget::NoFocus); |
68 | connect(ToolButton2,SIGNAL(clicked()),this,SLOT(showEditDialog())); | 68 | connect(ToolButton2,SIGNAL(clicked()),this,SLOT(showEditDialog())); |
69 | 69 | ||
70 | ToolButton3->setTextLabel("delete"); | 70 | ToolButton3->setTextLabel("delete"); |
71 | ToolButton3->setPixmap(Resource::loadPixmap("editdelete")); | 71 | ToolButton3->setPixmap(Resource::loadPixmap("editdelete")); |
72 | ToolButton3->setAutoRaise(TRUE); | 72 | ToolButton3->setAutoRaise(TRUE); |
73 | ToolButton3->setFocusPolicy(QWidget::NoFocus); | 73 | ToolButton3->setFocusPolicy(QWidget::NoFocus); |
74 | connect(ToolButton3,SIGNAL(clicked()),m_PlayListSelection,SLOT(removeSelected())); | 74 | connect(ToolButton3,SIGNAL(clicked()),m_PlayListSelection,SLOT(removeSelected())); |
75 | 75 | ||
76 | ToolButton4->setTextLabel("up"); | 76 | ToolButton4->setTextLabel("up"); |
77 | ToolButton4->setPixmap(Resource::loadPixmap("up")); | 77 | ToolButton4->setPixmap(Resource::loadPixmap("up")); |
78 | ToolButton4->setAutoRaise(TRUE); | 78 | ToolButton4->setAutoRaise(TRUE); |
79 | ToolButton4->setFocusPolicy(QWidget::NoFocus); | 79 | ToolButton4->setFocusPolicy(QWidget::NoFocus); |
80 | connect(ToolButton4,SIGNAL(clicked()),m_PlayListSelection,SLOT(moveSelectedUp())); | 80 | connect(ToolButton4,SIGNAL(clicked()),m_PlayListSelection,SLOT(moveSelectedUp())); |
81 | 81 | ||
82 | ToolButton5->setTextLabel("down"); | 82 | ToolButton5->setTextLabel("down"); |
83 | ToolButton5->setPixmap(Resource::loadPixmap("down")); | 83 | ToolButton5->setPixmap(Resource::loadPixmap("down")); |
84 | ToolButton5->setAutoRaise(TRUE); | 84 | ToolButton5->setAutoRaise(TRUE); |
85 | ToolButton5->setFocusPolicy(QWidget::NoFocus); | 85 | ToolButton5->setFocusPolicy(QWidget::NoFocus); |
86 | 86 | ||
87 | connect(ToolButton5,SIGNAL(clicked()),m_PlayListSelection,SLOT(moveSelectedDown())); | 87 | connect(ToolButton5,SIGNAL(clicked()),m_PlayListSelection,SLOT(moveSelectedDown())); |
88 | 88 | ||
89 | 89 | ||
90 | 90 | ||
91 | 91 | ||
92 | QListViewItem *current = m_SuggestedCommandList->selectedItem(); | 92 | QListViewItem *current = m_SuggestedCommandList->selectedItem(); |
93 | if ( current ) | 93 | if ( current ) |
94 | item->moveItem( current ); | 94 | item->moveItem( current ); |
95 | m_SuggestedCommandList->setSelected( item, TRUE ); | 95 | m_SuggestedCommandList->setSelected( item, TRUE ); |
96 | m_SuggestedCommandList->ensureItemVisible( m_SuggestedCommandList->selectedItem() ); | 96 | m_SuggestedCommandList->ensureItemVisible( m_SuggestedCommandList->selectedItem() ); |
97 | Config cfg( "Konsole" ); | 97 | Config cfg( "Konsole" ); |
98 | cfg.setGroup("Commands"); | 98 | cfg.setGroup("Commands"); |
99 | if (cfg.readEntry("Commands Set","FALSE") == "TRUE") { | 99 | if (cfg.readEntry("Commands Set","FALSE") == "TRUE") { |
100 | for (int i = 0; i < 100; i++) { | 100 | for (int i = 0; i < 100; i++) { |
101 | QString tmp; | 101 | QString tmp; |
102 | tmp = cfg.readEntry( QString::number(i),""); | 102 | tmp = cfg.readEntry( QString::number(i),""); |