summaryrefslogtreecommitdiff
path: root/noncore/tools/opie-sh/opie-sh.cpp
Unidiff
Diffstat (limited to 'noncore/tools/opie-sh/opie-sh.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/opie-sh/opie-sh.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/tools/opie-sh/opie-sh.cpp b/noncore/tools/opie-sh/opie-sh.cpp
index e898cb1..96b4b93 100644
--- a/noncore/tools/opie-sh/opie-sh.cpp
+++ b/noncore/tools/opie-sh/opie-sh.cpp
@@ -78,78 +78,79 @@ int myMessageBox(int wi, int h, QWidget *w, int argc, QStringList args)
78 { 78 {
79 full = false; 79 full = false;
80 } 80 }
81 } 81 }
82 82
83 MBox *mbox = new MBox(wi, h, (int)type, title, string, &button0Text, &button1Text, &button2Text, w, (QString)"messagebox"); 83 MBox *mbox = new MBox(wi, h, (int)type, title, string, &button0Text, &button1Text, &button2Text, w, (QString)"messagebox");
84 if(full) 84 if(full)
85 { 85 {
86 w->setCaption(title); 86 w->setCaption(title);
87 w->showMaximized(); 87 w->showMaximized();
88 } 88 }
89 //mbox->show(); 89 //mbox->show();
90 switch(mbox->exec() ) 90 switch(mbox->exec() )
91 { 91 {
92 case 0: 92 case 0:
93 return -1; 93 return -1;
94 case 1: 94 case 1:
95 return -1; 95 return -1;
96 case 2: 96 case 2:
97 return 0; 97 return 0;
98 case 3: 98 case 3:
99 return 1; 99 return 1;
100 case 4: 100 case 4:
101 return 2; 101 return 2;
102 default: return -1;
102 } 103 }
103} 104}
104 105
105void printusage() 106void printusage()
106{ 107{
107 printf("Usage instructions for Opie-sh\n"); 108 printf("Usage instructions for Opie-sh\n");
108 printf("Usage: opie-sh [dialog type] [type specific options]\n"); 109 printf("Usage: opie-sh [dialog type] [type specific options]\n");
109 printf("Types:\n"); 110 printf("Types:\n");
110 printf(" -m Message Box\n"); 111 printf(" -m Message Box\n");
111 printf(" -f [filename] View file [Default = stdin]\n"); 112 printf(" -f [filename] View file [Default = stdin]\n");
112 printf(" -i Input dialog\n"); 113 printf(" -i Input dialog\n");
113 printf(" -h --help These instructions\n"); 114 printf(" -h --help These instructions\n");
114 printf(" -t [title] The window/dialog title\n"); 115 printf(" -t [title] The window/dialog title\n");
115 printf("Message box options:\n"); 116 printf("Message box options:\n");
116 printf(" -M [message] The message to display\n"); 117 printf(" -M [message] The message to display\n");
117 printf(" -I Use information icon\n"); 118 printf(" -I Use information icon\n");
118 printf(" -w Use the warning icon\n"); 119 printf(" -w Use the warning icon\n");
119 printf(" -e Use the error icon\n"); 120 printf(" -e Use the error icon\n");
120 printf(" -0 [text] First button text [Default = OK]\n"); 121 printf(" -0 [text] First button text [Default = OK]\n");
121 printf(" -1 [text] Second button text\n"); 122 printf(" -1 [text] Second button text\n");
122 printf(" -2 [text] Third button text\n"); 123 printf(" -2 [text] Third button text\n");
123 printf(" -g Disable fullscreen\n"); 124 printf(" -g Disable fullscreen\n");
124 printf("Input Dialog options:\n"); 125 printf("Input Dialog options:\n");
125 printf(" -s A single line of input (output to console)\n"); 126 printf(" -s A single line of input (output to console)\n");
126 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");
127 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");
128 printf(" -L [label] The label for the input field\n"); 129 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"); 130 printf(" -F [filename] An input file (for when it makes sense) [Default = stdin]\n");
130 printf(" -E Makes list input editable\n"); 131 printf(" -E Makes list input editable\n");
131 printf(" -g Disable fullscreen\n\0"); 132 printf(" -g Disable fullscreen\n");
132} 133}
133 134
134int fileviewer(QPEApplication *a, int argc, QStringList args) 135int fileviewer(QPEApplication *a, int argc, QStringList args)
135{ 136{
136 int i; 137 int i;
137 QString filename, title, icon; 138 QString filename, title, icon;
138 bool update=false; 139 bool update=false;
139 140
140 for(i=0; i < argc; i++) 141 for(i=0; i < argc; i++)
141 { 142 {
142 if(args[i] == "-f") 143 if(args[i] == "-f")
143 { 144 {
144 if(args[i+1][0] != '-') 145 if(args[i+1][0] != '-')
145 { 146 {
146 filename = args[i+1]; 147 filename = args[i+1];
147 } 148 }
148 } 149 }
149 150
150 if(args[i] == "-I") 151 if(args[i] == "-I")
151 { 152 {
152 icon=args[i+1]; 153 icon=args[i+1];
153 } 154 }
154 155
155 if(args[i] == "-t") 156 if(args[i] == "-t")