-rw-r--r-- | noncore/tools/opie-sh/inputdialog.cpp | 6 | ||||
-rw-r--r-- | noncore/tools/opie-sh/opie-sh.cpp | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/noncore/tools/opie-sh/inputdialog.cpp b/noncore/tools/opie-sh/inputdialog.cpp index 1c4e688..8046795 100644 --- a/noncore/tools/opie-sh/inputdialog.cpp +++ b/noncore/tools/opie-sh/inputdialog.cpp | |||
@@ -78,8 +78,13 @@ InputDialog::InputDialog(int w, int h, int newtype, QString labelString, QString | |||
78 | 78 | ||
79 | listBox->insertStringList(QStringList::split('\n', string)); | 79 | listBox->insertStringList(QStringList::split('\n', string)); |
80 | } | 80 | } |
81 | break; | 81 | break; |
82 | case 3: | ||
83 | lineEdit = new QLineEdit(this, "line edit"); | ||
84 | lineEdit->setEchoMode(QLineEdit::Password); | ||
85 | layout->addWidget(lineEdit); | ||
86 | break; | ||
82 | } | 87 | } |
83 | layout->addSpacing(5); | 88 | layout->addSpacing(5); |
84 | 89 | ||
85 | x=(w/2)-(width()/2); | 90 | x=(w/2)-(width()/2); |
@@ -92,8 +97,9 @@ QString InputDialog::getString() | |||
92 | { | 97 | { |
93 | switch (type) | 98 | switch (type) |
94 | { | 99 | { |
95 | case 0: | 100 | case 0: |
101 | case 3: | ||
96 | return ((QLineEdit *)child("line edit"))->text(); | 102 | return ((QLineEdit *)child("line edit"))->text(); |
97 | break; | 103 | break; |
98 | case 1: | 104 | case 1: |
99 | return ((QComboBox *)child("combo box"))->currentText(); | 105 | return ((QComboBox *)child("combo box"))->currentText(); |
diff --git a/noncore/tools/opie-sh/opie-sh.cpp b/noncore/tools/opie-sh/opie-sh.cpp index 96b4b93..a353d3f 100644 --- a/noncore/tools/opie-sh/opie-sh.cpp +++ b/noncore/tools/opie-sh/opie-sh.cpp | |||
@@ -125,8 +125,9 @@ void printusage() | |||
125 | printf("Input Dialog options:\n"); | 125 | printf("Input Dialog options:\n"); |
126 | printf(" -s A single line of input (output to console)\n"); | 126 | printf(" -s A single line of input (output to console)\n"); |
127 | printf(" -l List input (newline separated list read in from file)\n"); | 127 | printf(" -l List input (newline separated list read in from file)\n"); |
128 | printf(" -b A list box, enabling multiple selections (input same as -l)\n"); | 128 | printf(" -b A list box, enabling multiple selections (input same as -l)\n"); |
129 | printf(" -p Password input (display '*'s)\n"); | ||
129 | printf(" -L [label] The label for the input field\n"); | 130 | printf(" -L [label] The label for the input field\n"); |
130 | printf(" -F [filename] An input file (for when it makes sense) [Default = stdin]\n"); | 131 | printf(" -F [filename] An input file (for when it makes sense) [Default = stdin]\n"); |
131 | printf(" -E Makes list input editable\n"); | 132 | printf(" -E Makes list input editable\n"); |
132 | printf(" -g Disable fullscreen\n"); | 133 | printf(" -g Disable fullscreen\n"); |
@@ -186,8 +187,13 @@ int input(int wi, int h, QWidget *w, int argc, QStringList args) | |||
186 | { | 187 | { |
187 | type = 2; | 188 | type = 2; |
188 | } | 189 | } |
189 | 190 | ||
191 | if(args[i] == "-p") | ||
192 | { | ||
193 | type = 3; | ||
194 | } | ||
195 | |||
190 | if(args[i] == "-t") | 196 | if(args[i] == "-t") |
191 | { | 197 | { |
192 | title = args[i+1]; | 198 | title = args[i+1]; |
193 | } | 199 | } |