summaryrefslogtreecommitdiff
path: root/noncore
authorspiralman <spiralman>2002-05-27 00:59:37 (UTC)
committer spiralman <spiralman>2002-05-27 00:59:37 (UTC)
commitd3451ccc7191bc2f761bae12b50c7ce274647bdb (patch) (unidiff)
treef96f3c210de2c91d793d999e19bbcbc81ff02a99 /noncore
parent95d2a3806a39bb31c9cca38c2c6158ecb77818e9 (diff)
downloadopie-d3451ccc7191bc2f761bae12b50c7ce274647bdb.zip
opie-d3451ccc7191bc2f761bae12b50c7ce274647bdb.tar.gz
opie-d3451ccc7191bc2f761bae12b50c7ce274647bdb.tar.bz2
added help files and an icon in the Applications tab
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/opie-sh/fviewer.cpp4
-rw-r--r--noncore/tools/opie-sh/fviewer.h3
-rw-r--r--noncore/tools/opie-sh/opie-sh.control5
-rw-r--r--noncore/tools/opie-sh/opie-sh.cpp16
4 files changed, 20 insertions, 8 deletions
diff --git a/noncore/tools/opie-sh/fviewer.cpp b/noncore/tools/opie-sh/fviewer.cpp
index 5dc09ff..882c72c 100644
--- a/noncore/tools/opie-sh/fviewer.cpp
+++ b/noncore/tools/opie-sh/fviewer.cpp
@@ -12,15 +12,17 @@ Public License for more details.
12 12
13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free 13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
14Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 14Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15*/ 15*/
16#include "fviewer.h" 16#include "fviewer.h"
17 17
18FViewer::FViewer(QString filename, QString title, QWidget *parent=0, const char*name=0):QWidget(parent, name) 18FViewer::FViewer(QString icon, QString filename, QString title, QWidget *parent=0, const char*name=0):QWidget(parent, name)
19{ 19{
20 QVBoxLayout *layout = new QVBoxLayout(this); 20 QVBoxLayout *layout = new QVBoxLayout(this);
21
22 setIcon(Resource::loadPixmap("opie-sh"));
21 23
22 textView = new QTextBrowser(this, "textview"); 24 textView = new QTextBrowser(this, "textview");
23 layout->addWidget(textView); 25 layout->addWidget(textView);
24 26
25 QString string; 27 QString string;
26 28
diff --git a/noncore/tools/opie-sh/fviewer.h b/noncore/tools/opie-sh/fviewer.h
index 488b6ed..cd5206c 100644
--- a/noncore/tools/opie-sh/fviewer.h
+++ b/noncore/tools/opie-sh/fviewer.h
@@ -18,18 +18,19 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18#include <qfile.h> 18#include <qfile.h>
19#include <qtextstream.h> 19#include <qtextstream.h>
20#include <qtextbrowser.h> 20#include <qtextbrowser.h>
21#include <qlayout.h> 21#include <qlayout.h>
22#include <qtimer.h> 22#include <qtimer.h>
23#include <qdir.h> 23#include <qdir.h>
24#include <qpe/resource.h>
24 25
25class FViewer :public QWidget 26class FViewer :public QWidget
26{ 27{
27 Q_OBJECT 28 Q_OBJECT
28public: 29public:
29 FViewer(QString filename, QString title, QWidget *parent=0, const char*name=0); 30 FViewer(QString icon, QString filename, QString title, QWidget *parent=0, const char*name=0);
30private: 31private:
31 QFile *file; 32 QFile *file;
32 QTextBrowser *textView; 33 QTextBrowser *textView;
33 QTextStream *stream; 34 QTextStream *stream;
34 QTimer *timer; 35 QTimer *timer;
35}; 36};
diff --git a/noncore/tools/opie-sh/opie-sh.control b/noncore/tools/opie-sh/opie-sh.control
index e9b13a5..8f586fe 100644
--- a/noncore/tools/opie-sh/opie-sh.control
+++ b/noncore/tools/opie-sh/opie-sh.control
@@ -1,10 +1,11 @@
1Files: bin/opie-sh pics/opie-sh/*.png 1Files: bin/opie-sh* apps/Applications/opie-sh.desktop pics/opie-sh/*.png help/opie-sh/*.html
2Priority: optional 2Priority: optional
3Package: opie-sh
3Section: opie/applications 4Section: opie/applications
4Maintainer: Thomas Stephens <spiralman@softhome.net> 5Maintainer: Thomas Stephens <spiralman@softhome.net>
5Architecture: arm 6Architecture: arm
6Version: 0.4-$SUB_VERSION 7Version: 0.5-$SUB_VERSION
7Depends: opie-base ($QPE_VERSION) 8Depends: opie-base ($QPE_VERSION)
8License: GPL 9License: GPL
9Description: a QDialog shell frontend 10Description: a QDialog shell frontend
10 A program to let you use various dialogs from the console (or a shell script) 11 A program to let you use various dialogs from the console (or a shell script)
diff --git a/noncore/tools/opie-sh/opie-sh.cpp b/noncore/tools/opie-sh/opie-sh.cpp
index a1b8035..e898cb1 100644
--- a/noncore/tools/opie-sh/opie-sh.cpp
+++ b/noncore/tools/opie-sh/opie-sh.cpp
@@ -125,37 +125,42 @@ void printusage()
125 printf(" -s A single line of input (output to console)\n"); 125 printf(" -s A single line of input (output to console)\n");
126 printf(" -l List input (newline separated list read in from file)\n"); 126 printf(" -l List input (newline separated list read in from file)\n");
127 printf(" -b A list box, enabling multiple selections (input same as -l)\n"); 127 printf(" -b A list box, enabling multiple selections (input same as -l)\n");
128 printf(" -L [label] The label for the input field\n"); 128 printf(" -L [label] The label for the input field\n");
129 printf(" -F [filename] An input file (for when it makes sense) [Default = stdin]\n"); 129 printf(" -F [filename] An input file (for when it makes sense) [Default = stdin]\n");
130 printf(" -E Makes list input editable\n"); 130 printf(" -E Makes list input editable\n");
131 printf(" -g Disable fullscreen\n"); 131 printf(" -g Disable fullscreen\n\0");
132} 132}
133 133
134int fileviewer(QPEApplication *a, int argc, QStringList args) 134int fileviewer(QPEApplication *a, int argc, QStringList args)
135{ 135{
136 int i; 136 int i;
137 QString filename, title; 137 QString filename, title, icon;
138 bool update=false; 138 bool update=false;
139 139
140 for(i=0; i < argc; i++) 140 for(i=0; i < argc; i++)
141 { 141 {
142 if(args[i] == "-f") 142 if(args[i] == "-f")
143 { 143 {
144 if(args[i+1][0] != '-') 144 if(args[i+1][0] != '-')
145 { 145 {
146 filename = args[i+1]; 146 filename = args[i+1];
147 } 147 }
148 } 148 }
149 149
150 if(args[i] == "-I")
151 {
152 icon=args[i+1];
153 }
154
150 if(args[i] == "-t") 155 if(args[i] == "-t")
151 { 156 {
152 title = args[i+1]; 157 title = args[i+1];
153 } 158 }
154 } 159 }
155 FViewer *fview = new FViewer(filename, title, 0, (QString) "fileviewer"); 160 FViewer *fview = new FViewer(icon, filename, title, 0, (QString) "fileviewer");
156 a->setMainWidget(fview); 161 a->setMainWidget(fview);
157 fview->showMaximized(); 162 fview->showMaximized();
158 return a->exec(); 163 return a->exec();
159} 164}
160 165
161int input(int wi, int h, QWidget *w, int argc, QStringList args) 166int input(int wi, int h, QWidget *w, int argc, QStringList args)
@@ -190,13 +195,16 @@ int input(int wi, int h, QWidget *w, int argc, QStringList args)
190 { 195 {
191 label = args[i+1]; 196 label = args[i+1];
192 } 197 }
193 198
194 if(args[i] == "-F") 199 if(args[i] == "-F")
195 { 200 {
196 filename = args[i+1]; 201 if(args[i+1][0] != '-')
202 {
203 filename = args[i+1];
204 }
197 } 205 }
198 206
199 if(args[i] =="-E") 207 if(args[i] =="-E")
200 { 208 {
201 edit = true; 209 edit = true;
202 } 210 }