22 files changed, 53 insertions, 55 deletions
@@ -1,86 +1,86 @@ | |||
1 | 1. How to use the Opie build system | 1 | 1. How to use the Opie build system |
2 | ==================================== | 2 | ==================================== |
3 | There's a tutorial document at: | 3 | There's a tutorial document at: |
4 | http://www.uv-ac.de/opiedev/opiedev.html | 4 | http://www.uv-ac.de/opiedev/opiedev.html |
5 | 5 | ||
6 | The API reference currently is at: | 6 | The API reference currently is at: |
7 | http://handhelds.org/~zecke/apidocs/index.html | 7 | http://handhelds.org/~zecke/apidocs/index.html |
8 | 8 | ||
9 | You will need qvfb, uic and | 9 | You will need qvfb, uic and |
10 | (if you want to develop applications) designer | 10 | (if you want to develop applications) designer |
11 | compiled and linked against qt-x11. | 11 | compiled and linked against qt-x11. |
12 | That means you must download and configure/make it. | 12 | That means you must download and configure/make it. |
13 | wget ftp://ftp.trolltech.com/qt/source/qt-x11-2.3.2.tar.gz | 13 | wget ftp://ftp.trolltech.com/qt/source/qt-x11-2.3.2.tar.gz |
14 | (Alternatively, you can get static binaries from http://www.vanille.de/tools) | 14 | (Alternatively, you can get static binaries from http://www.vanille.de/tools) |
15 | 15 | ||
16 | The recommended version of Qt embedded is qt-embedded-2.3.7 | 16 | The recommended version of Qt embedded is qt-embedded-2.3.7 |
17 | 17 | ||
18 | You can get it from: | 18 | You can get it from: |
19 | ftp://ftp.trolltech.com/qt/source/qt-embedded-2.3.7.tar.bz2 | 19 | ftp://ftp.trolltech.com/qt/source/qt-embedded-2.3.7.tar.bz2 |
20 | 20 | ||
21 | Set QTDIR to point to your qt/embedded source tree, such as: | 21 | Set QTDIR to point to your qt/embedded source tree, such as: |
22 | export QTDIR=/opt/qt-2.3.7 | 22 | export QTDIR=/opt/qt-2.3.7 |
23 | 23 | ||
24 | You need to do set the OPIEDIR environment variable: | 24 | You need to do set the OPIEDIR environment variable: |
25 | export OPIEDIR=`pwd` | 25 | export OPIEDIR=`pwd` |
26 | or | 26 | or |
27 | export OPIEDIR=~/projects/sources/opie | 27 | export OPIEDIR=~/projects/sources/opie |
28 | or whereever you placed the Opie sources. | 28 | or whereever you placed the Opie sources. |
29 | 29 | ||
30 | You need to adjust your runtime library search path, | 30 | You need to adjust your runtime library search path, |
31 | so that the Qt/Embedded and Opie libraries can be found: | 31 | so that the Qt/Embedded and Opie libraries can be found: |
32 | export LD_LIBRARY_PATH=$OPIEDIR/lib:$QTDIR/lib:$LD_LIBRARY_PATH | 32 | export LD_LIBRARY_PATH=$OPIEDIR/lib:$QTDIR/lib:$LD_LIBRARY_PATH |
33 | 33 | ||
34 | You have to apply the qte<version>-all.patch to the Qt/Embedded | 34 | You have to apply the qte<version>-all.patch to the Qt/Embedded |
35 | sources and copy the qconfig-qpe.h file to $QTDIR/src/tools: | 35 | sources and copy the qconfig-qpe.h file to $QTDIR/src/tools: |
36 | cd $QTDIR; cat $OPIEDIR/qt/qte<version>*.patch | patch -p0 | 36 | cd $QTDIR; cat $OPIEDIR/qt/qte<version>*.patch | patch -p0 |
37 | cp $OPIEDIR/qt/qpe-config.h $QTDIR/src/tools | 37 | cp $OPIEDIR/qt/qpe-config.h $QTDIR/src/tools |
38 | 38 | ||
39 | You are now ready to configure and build Qt/Embedded | 39 | You are now ready to configure and build Qt/Embedded |
40 | 40 | ||
41 | cd $QTDIR | 41 | cd $QTDIR |
42 | echo 'yes' | ./configure -qconfig qpe -depths 4,16,24,32 -system-jpeg -system-libpng -system-zlib -no-xft -qvfb | 42 | echo 'yes' | ./configure -qconfig qpe -depths 4,16,24,32 -system-jpeg -system-libpng -system-zlib -no-xft -qvfb |
43 | make | 43 | make |
44 | 44 | ||
45 | Once you have these compiled, be sure to set the PATH to ensure your (cross)compiler | 45 | Once you have these compiled, be sure to set the PATH to ensure your (cross)compiler |
46 | is available. | 46 | is available. |
47 | 47 | ||
48 | Then do the following in the opie source tree: | 48 | Then do the following in the opie source tree: |
49 | 49 | ||
50 | make clean | 50 | make clean |
51 | make menuconfig | 51 | make menuconfig |
52 | 52 | ||
53 | Now you can move through the menu and select or deselect anything.. | 53 | Now you can move through the menu and select or deselect anything.. |
54 | Exit and save the configuration and enter "make" to create opie... | 54 | Exit and save the configuration and enter "make" to create opie... |
55 | 55 | ||
56 | Have fun with it ! | 56 | Have fun with it ! |
57 | 57 | ||
58 | If you get into trouble there are other makefile targets | 58 | If you get into trouble there are other makefile targets |
59 | 59 | ||
60 | make clean-configs | 60 | make clean-configs |
61 | is a useful one. | 61 | is a useful one. |
62 | 62 | ||
63 | 2. Used Libraries | 63 | 2. Used Libraries |
64 | ================ | 64 | ================ |
65 | 65 | ||
66 | The following Libraries are used in Opie. | 66 | The following Libraries are used in Opie. |
67 | For a successfull build you must install these librarys and headers. | 67 | For a successful build you must install these librarys and headers. |
68 | The versions are known-good versions. If you successfully try newer ones, | 68 | The versions are known-good versions. If you successfully try newer ones, |
69 | commit a new README or send a mail to opie-devel@handhelds.org | 69 | commit a new README or send a mail to opie-devel@handhelds.org |
70 | 70 | ||
71 | * libsdl 1.2 | 71 | * libsdl 1.2 |
72 | http://www.libsdl.org/download-1.2.php | 72 | http://www.libsdl.org/download-1.2.php |
73 | 73 | ||
74 | * libxine 1.0 beta 11 | 74 | * libxine 1.0 beta 11 |
75 | http://prdownloads.sourceforge.net/xine/ | 75 | http://prdownloads.sourceforge.net/xine/ |
76 | 76 | ||
77 | * libpcap 0.7.2 | 77 | * libpcap 0.7.2 |
78 | http://www.tcpdump.org/release/ | 78 | http://www.tcpdump.org/release/ |
79 | 79 | ||
80 | * libetpan 0.31 | 80 | * libetpan 0.31 |
81 | http://prdownloads.sourceforge.net/libetpan/ + patch in noncore/net/mail/libetpanstuff | 81 | http://prdownloads.sourceforge.net/libetpan/ + patch in noncore/net/mail/libetpanstuff |
82 | 82 | ||
83 | * libsqlite 2.8.6 | 83 | * libsqlite 2.8.6 |
84 | http://www.sqlite.org/download.html | 84 | http://www.sqlite.org/download.html |
85 | 85 | ||
86 | 86 | ||
diff --git a/core/opiealarm/opiealarm.c b/core/opiealarm/opiealarm.c index 90a743f..422865c 100644 --- a/core/opiealarm/opiealarm.c +++ b/core/opiealarm/opiealarm.c | |||
@@ -1,384 +1,384 @@ | |||
1 | /* | 1 | /* |
2 | * opiealarm.c | 2 | * opiealarm.c |
3 | * | 3 | * |
4 | * This program is for extracting the event time/date out | 4 | * This program is for extracting the event time/date out |
5 | * of /var/run/resumeat and setting the RTC alarm to that time/date. | 5 | * of /var/run/resumeat and setting the RTC alarm to that time/date. |
6 | * It is designed to run via a script just before the iPAQ | 6 | * It is designed to run via a script just before the iPAQ |
7 | * is suspended and right after the iPAQ resumes operation. | 7 | * is suspended and right after the iPAQ resumes operation. |
8 | * | 8 | * |
9 | * written and copyrighted by Robert Griebl <sandman@handhelds.org> | 9 | * written and copyrighted by Robert Griebl <sandman@handhelds.org> |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <stdio.h> | 12 | #include <stdio.h> |
13 | #include <linux/rtc.h> | 13 | #include <linux/rtc.h> |
14 | #include <sys/ioctl.h> | 14 | #include <sys/ioctl.h> |
15 | #include <sys/time.h> | 15 | #include <sys/time.h> |
16 | #include <sys/types.h> | 16 | #include <sys/types.h> |
17 | #include <fcntl.h> | 17 | #include <fcntl.h> |
18 | #include <unistd.h> | 18 | #include <unistd.h> |
19 | #include <errno.h> | 19 | #include <errno.h> |
20 | #include <time.h> | 20 | #include <time.h> |
21 | #include <stdlib.h> | 21 | #include <stdlib.h> |
22 | #include <syslog.h> | 22 | #include <syslog.h> |
23 | #include <signal.h> | 23 | #include <signal.h> |
24 | #include <errno.h> | 24 | #include <errno.h> |
25 | #include <string.h> | 25 | #include <string.h> |
26 | 26 | ||
27 | 27 | ||
28 | #define PIDFILE "/var/run/opiealarm.pid" | 28 | #define PIDFILE "/var/run/opiealarm.pid" |
29 | #define TIMEFILE "/var/run/resumeat" | 29 | #define TIMEFILE "/var/run/resumeat" |
30 | #define APMFILE "/proc/apm" | 30 | #define APMFILE "/proc/apm" |
31 | 31 | ||
32 | int resume ( int resuspend ); | 32 | int resume ( int resuspend ); |
33 | int suspend ( int fix_rtc ); | 33 | int suspend ( int fix_rtc ); |
34 | int main ( int argc, char **argv ); | 34 | int main ( int argc, char **argv ); |
35 | int fork_with_pidfile ( void ); | 35 | int fork_with_pidfile ( void ); |
36 | int kill_with_pidfile ( void ); | 36 | int kill_with_pidfile ( void ); |
37 | void remove_pidfile ( void ); | 37 | void remove_pidfile ( void ); |
38 | void usage ( void ); | 38 | void usage ( void ); |
39 | void sig_handler_child ( int sig ); | 39 | void sig_handler_child ( int sig ); |
40 | void sig_handler_parent ( int sig ); | 40 | void sig_handler_parent ( int sig ); |
41 | int onac ( void ); | 41 | int onac ( void ); |
42 | 42 | ||
43 | static int opiealarm_was_running; | 43 | static int opiealarm_was_running; |
44 | static pid_t parent_pid = 0; | 44 | static pid_t parent_pid = 0; |
45 | 45 | ||
46 | 46 | ||
47 | 47 | ||
48 | void sig_handler_child ( int sig ) | 48 | void sig_handler_child ( int sig ) |
49 | { | 49 | { |
50 | // child got SIGUSR2 -> cleanup pidfile and exit | 50 | // child got SIGUSR2 -> cleanup pidfile and exit |
51 | 51 | ||
52 | remove_pidfile ( ); | 52 | remove_pidfile ( ); |
53 | exit ( 0 ); | 53 | exit ( 0 ); |
54 | } | 54 | } |
55 | 55 | ||
56 | void sig_handler_parent ( int sig ) | 56 | void sig_handler_parent ( int sig ) |
57 | { | 57 | { |
58 | // parent got SIGUSR1 -> safe to exit now | 58 | // parent got SIGUSR1 -> safe to exit now |
59 | 59 | ||
60 | parent_pid = 0; | 60 | parent_pid = 0; |
61 | exit ( 0 ); | 61 | exit ( 0 ); |
62 | } | 62 | } |
63 | 63 | ||
64 | void usage ( void ) | 64 | void usage ( void ) |
65 | { | 65 | { |
66 | fprintf ( stderr, "Usage: opiealarm -s [-f] | -r [-a]\n\n" ); | 66 | fprintf ( stderr, "Usage: opiealarm -s [-f] | -r [-a]\n\n" ); |
67 | fprintf ( stderr, "\t-s\tSuspend mode: set RTC alarm\n" ); | 67 | fprintf ( stderr, "\t-s\tSuspend mode: set RTC alarm\n" ); |
68 | fprintf ( stderr, "\t-f \tFix RTC, if RTC and system have more than 5sec difference (suspend mode)\n" ); | 68 | fprintf ( stderr, "\t-f \tFix RTC, if RTC and system have more than 5sec difference (suspend mode)\n" ); |
69 | fprintf ( stderr, "\t-r\tResume mode: kill running opiealarm\n" ); | 69 | fprintf ( stderr, "\t-r\tResume mode: kill running opiealarm\n" ); |
70 | fprintf ( stderr, "\t-a <x>\tResuspend in <x> seconds (resume mode)\n\n" ); | 70 | fprintf ( stderr, "\t-a <x>\tResuspend in <x> seconds (resume mode)\n\n" ); |
71 | exit ( 1 ); | 71 | exit ( 1 ); |
72 | } | 72 | } |
73 | 73 | ||
74 | int fork_with_pidfile ( void ) | 74 | int fork_with_pidfile ( void ) |
75 | { | 75 | { |
76 | FILE *fp; | 76 | FILE *fp; |
77 | pid_t pid; | 77 | pid_t pid; |
78 | 78 | ||
79 | pid = fork ( ); | 79 | pid = fork ( ); |
80 | 80 | ||
81 | if ( pid > 0 ) { | 81 | if ( pid > 0 ) { |
82 | // We can not just exit now, because the kernel could suspend | 82 | // We can not just exit now, because the kernel could suspend |
83 | // the iPAQ just before the child process sets the RTC. | 83 | // the iPAQ just before the child process sets the RTC. |
84 | // Solution: just wait for SIGUSR1 - the child process will | 84 | // Solution: just wait for SIGUSR1 - the child process will |
85 | // signal this when it thinks it is safe to exit. | 85 | // signal this when it thinks it is safe to exit. |
86 | 86 | ||
87 | signal ( SIGUSR1, sig_handler_parent ); | 87 | signal ( SIGUSR1, sig_handler_parent ); |
88 | while ( 1 ) | 88 | while ( 1 ) |
89 | sleep ( 1000 ); | 89 | sleep ( 1000 ); |
90 | exit ( 0 ); | 90 | exit ( 0 ); |
91 | } | 91 | } |
92 | else if ( pid < 0 ) { | 92 | else if ( pid < 0 ) { |
93 | perror ( "forking failed" ); | 93 | perror ( "forking failed" ); |
94 | return 0; | 94 | return 0; |
95 | } | 95 | } |
96 | //sleep( 60 ); | 96 | //sleep( 60 ); |
97 | 97 | ||
98 | // child process needs to react to SIGUSR2. This is sent when | 98 | // child process needs to react to SIGUSR2. This is sent when |
99 | // a new opiealarm process is started. | 99 | // a new opiealarm process is started. |
100 | 100 | ||
101 | signal ( SIGUSR2, sig_handler_child ); | 101 | signal ( SIGUSR2, sig_handler_child ); |
102 | 102 | ||
103 | // save pid | 103 | // save pid |
104 | if (( fp = fopen ( PIDFILE, "w" ))) { | 104 | if (( fp = fopen ( PIDFILE, "w" ))) { |
105 | fprintf ( fp, "%d", getpid ( )); | 105 | fprintf ( fp, "%d", getpid ( )); |
106 | fclose ( fp ); | 106 | fclose ( fp ); |
107 | 107 | ||
108 | // detach | 108 | // detach |
109 | close ( 0 ); | 109 | close ( 0 ); |
110 | close ( 1 ); | 110 | close ( 1 ); |
111 | close ( 2 ); | 111 | close ( 2 ); |
112 | 112 | ||
113 | setpgid ( 0, 0 ); | 113 | setpgid ( 0, 0 ); |
114 | 114 | ||
115 | return 1; | 115 | return 1; |
116 | } | 116 | } |
117 | else { | 117 | else { |
118 | perror ( PIDFILE ); | 118 | perror ( PIDFILE ); |
119 | return 0; | 119 | return 0; |
120 | } | 120 | } |
121 | } | 121 | } |
122 | 122 | ||
123 | int kill_with_pidfile ( void ) | 123 | int kill_with_pidfile ( void ) |
124 | { | 124 | { |
125 | FILE *fp; | 125 | FILE *fp; |
126 | pid_t pid; | 126 | pid_t pid; |
127 | int res = 0; | 127 | int res = 0; |
128 | 128 | ||
129 | // terminate a running opiealarm child process | 129 | // terminate a running opiealarm child process |
130 | // return 1 if we really killed one | 130 | // return 1 if we really killed one |
131 | 131 | ||
132 | if (( fp = fopen ( PIDFILE, "r" ))) { | 132 | if (( fp = fopen ( PIDFILE, "r" ))) { |
133 | if ( fscanf ( fp, "%d", &pid ) == 1 ) | 133 | if ( fscanf ( fp, "%d", &pid ) == 1 ) |
134 | res = ( kill ( pid, SIGUSR2 ) == 0 ) ? 1 : 0; | 134 | res = ( kill ( pid, SIGUSR2 ) == 0 ) ? 1 : 0; |
135 | fclose ( fp ); | 135 | fclose ( fp ); |
136 | } | 136 | } |
137 | return res; | 137 | return res; |
138 | } | 138 | } |
139 | 139 | ||
140 | void remove_pidfile ( void ) | 140 | void remove_pidfile ( void ) |
141 | { | 141 | { |
142 | // child is about to exit - cleanup | 142 | // child is about to exit - cleanup |
143 | 143 | ||
144 | unlink ( PIDFILE ); | 144 | unlink ( PIDFILE ); |
145 | signal ( SIGUSR2, SIG_DFL ); | 145 | signal ( SIGUSR2, SIG_DFL ); |
146 | } | 146 | } |
147 | 147 | ||
148 | 148 | ||
149 | int main ( int argc, char **argv ) | 149 | int main ( int argc, char **argv ) |
150 | { | 150 | { |
151 | int mode = 0; | 151 | int mode = 0; |
152 | int ac_resusp = 0; | 152 | int ac_resusp = 0; |
153 | int fix_rtc = 0; | 153 | int fix_rtc = 0; |
154 | int opt; | 154 | int opt; |
155 | 155 | ||
156 | while (( opt = getopt ( argc, argv, "a:frs" )) != EOF ) { | 156 | while (( opt = getopt ( argc, argv, "a:frs" )) != EOF ) { |
157 | switch ( opt ) { | 157 | switch ( opt ) { |
158 | case 's': | 158 | case 's': |
159 | mode = 's'; | 159 | mode = 's'; |
160 | break; | 160 | break; |
161 | case 'r': | 161 | case 'r': |
162 | mode = 'r'; | 162 | mode = 'r'; |
163 | break; | 163 | break; |
164 | case 'a': | 164 | case 'a': |
165 | ac_resusp = atoi ( optarg ); | 165 | ac_resusp = atoi ( optarg ); |
166 | if ( ac_resusp < 30 ) { | 166 | if ( ac_resusp < 30 ) { |
167 | ac_resusp = 120; | 167 | ac_resusp = 120; |
168 | 168 | ||
169 | fprintf ( stderr, "Warning: resuspend timeout must be >= 30 sec. -- now set to 120 sec\n" ); | 169 | fprintf ( stderr, "Warning: resuspend timeout must be >= 30 sec. -- now set to 120 sec\n" ); |
170 | } | 170 | } |
171 | break; | 171 | break; |
172 | case 'f': | 172 | case 'f': |
173 | fix_rtc = 1; | 173 | fix_rtc = 1; |
174 | break; | 174 | break; |
175 | default: | 175 | default: |
176 | usage ( ); | 176 | usage ( ); |
177 | } | 177 | } |
178 | } | 178 | } |
179 | 179 | ||
180 | if ( geteuid ( ) != 0 ) { | 180 | if ( geteuid ( ) != 0 ) { |
181 | fprintf ( stderr, "You need root priviledges to run opiealarm." ); | 181 | fprintf ( stderr, "You need root priviledges to run opiealarm." ); |
182 | return 2; | 182 | return 2; |
183 | } | 183 | } |
184 | 184 | ||
185 | if ( !mode ) | 185 | if ( !mode ) |
186 | usage ( ); | 186 | usage ( ); |
187 | 187 | ||
188 | 188 | ||
189 | parent_pid = getpid ( ); | 189 | parent_pid = getpid ( ); |
190 | 190 | ||
191 | // kill running opiealarm | 191 | // kill running opiealarm |
192 | opiealarm_was_running = kill_with_pidfile ( ); | 192 | opiealarm_was_running = kill_with_pidfile ( ); |
193 | remove_pidfile ( ); | 193 | remove_pidfile ( ); |
194 | 194 | ||
195 | switch ( mode ) { | 195 | switch ( mode ) { |
196 | case 'r': opt = resume ( ac_resusp ); | 196 | case 'r': opt = resume ( ac_resusp ); |
197 | break; | 197 | break; |
198 | case 's': | 198 | case 's': |
199 | default : opt = suspend ( fix_rtc ); | 199 | default : opt = suspend ( fix_rtc ); |
200 | break; | 200 | break; |
201 | } | 201 | } |
202 | 202 | ||
203 | parent_pid = 0; | 203 | parent_pid = 0; |
204 | return opt; | 204 | return opt; |
205 | } | 205 | } |
206 | 206 | ||
207 | 207 | ||
208 | int suspend ( int fix_rtc ) | 208 | int suspend ( int fix_rtc ) |
209 | { | 209 | { |
210 | FILE *fp = NULL; | 210 | FILE *fp = NULL; |
211 | char buf [64]; | 211 | char buf [64]; |
212 | time_t alrt, syst, rtct; | 212 | time_t alrt, syst, rtct; |
213 | struct tm alr, sys, rtc; | 213 | struct tm alr, sys, rtc; |
214 | int fd; | 214 | int fd; |
215 | int rtc_sys_diff; | 215 | int rtc_sys_diff; |
216 | 216 | ||
217 | 217 | ||
218 | if ( !fork_with_pidfile ( )) | 218 | if ( !fork_with_pidfile ( )) |
219 | return 3; | 219 | return 3; |
220 | 220 | ||
221 | // we are the child process from here on ... | 221 | // we are the child process from here on ... |
222 | 222 | ||
223 | tzset ( ); // not sure if it is really needed -- it probably doesn't hurt ... | 223 | tzset ( ); // not sure if it is really needed -- it probably doesn't hurt ... |
224 | 224 | ||
225 | time ( &syst );// get the UNIX system time | 225 | time ( &syst );// get the UNIX system time |
226 | sys = *localtime ( &syst ); | 226 | sys = *localtime ( &syst ); |
227 | 227 | ||
228 | do { | 228 | do { |
229 | 229 | ||
230 | if (( fd = open ( "/dev/misc/rtc", O_RDWR )) < 0 ) | 230 | if (( fd = open ( "/dev/misc/rtc", O_RDWR )) < 0 ) |
231 | if (( fd = open ( "/dev/rtc", O_RDWR )) < 0 ) | 231 | if (( fd = open ( "/dev/rtc", O_RDWR )) < 0 ) |
232 | break; // ( 1, "rtc" ); | 232 | break; // ( 1, "rtc" ); |
233 | 233 | ||
234 | memset ( &rtc, 0, sizeof ( struct tm )); // get the RTC time | 234 | memset ( &rtc, 0, sizeof ( struct tm )); // get the RTC time |
235 | 235 | ||
236 | if ( ioctl ( fd, RTC_RD_TIME, &rtc ) < 0 ) | 236 | if ( ioctl ( fd, RTC_RD_TIME, &rtc ) < 0 ) |
237 | break; // ( 1, "ioctl RTC_RD_TIME" ); | 237 | break; // ( 1, "ioctl RTC_RD_TIME" ); |
238 | 238 | ||
239 | rtct = mktime ( &rtc ); | 239 | rtct = mktime ( &rtc ); |
240 | 240 | ||
241 | rtc_sys_diff = ( syst - rtct ) - sys. tm_gmtoff; // calculate the difference between system and hardware time | 241 | rtc_sys_diff = ( syst - rtct ) - sys. tm_gmtoff; // calculate the difference between system and hardware time |
242 | 242 | ||
243 | if ( fix_rtc && (( rtc_sys_diff < -3 ) || ( rtc_sys_diff > 3 ))) { | 243 | if ( fix_rtc && (( rtc_sys_diff < -3 ) || ( rtc_sys_diff > 3 ))) { |
244 | struct tm set; | 244 | struct tm set; |
245 | set = *gmtime ( &syst ); | 245 | set = *gmtime ( &syst ); |
246 | 246 | ||
247 | // if the difference between system and hardware time is more than 3 seconds, | 247 | // if the difference between system and hardware time is more than 3 seconds, |
248 | // we have to set the RTC (hwclock --systohc), or alarms won't work reliably. | 248 | // we have to set the RTC (hwclock --systohc), or alarms won't work reliably. |
249 | 249 | ||
250 | if ( ioctl ( fd, RTC_SET_TIME, &set ) < 0 ) | 250 | if ( ioctl ( fd, RTC_SET_TIME, &set ) < 0 ) |
251 | break; // ( 1, "ioctl RTC_SET_TIME" ); | 251 | break; // ( 1, "ioctl RTC_SET_TIME" ); |
252 | } | 252 | } |
253 | 253 | ||
254 | // read the wakeup time from TIMEFILE | 254 | // read the wakeup time from TIMEFILE |
255 | if (!( fp = fopen ( TIMEFILE, "r" ))) | 255 | if (!( fp = fopen ( TIMEFILE, "r" ))) |
256 | break; // ( 1, TIMEFILE ); | 256 | break; // ( 1, TIMEFILE ); |
257 | 257 | ||
258 | if ( !fgets ( buf, sizeof( buf ) - 1, fp )) | 258 | if ( !fgets ( buf, sizeof( buf ) - 1, fp )) |
259 | break; // ( 1, TIMEFILE ); | 259 | break; // ( 1, TIMEFILE ); |
260 | 260 | ||
261 | fclose ( fp ); | 261 | fclose ( fp ); |
262 | fp = NULL; | 262 | fp = NULL; |
263 | 263 | ||
264 | alrt = atoi ( buf ); // get the alarm time | 264 | alrt = atoi ( buf ); // get the alarm time |
265 | 265 | ||
266 | if ( alrt == 0 ) | 266 | if ( alrt == 0 ) |
267 | break; // ( 0, TIMEFILE " contains an invalid time description" ); | 267 | break; // ( 0, TIMEFILE " contains an invalid time description" ); |
268 | alrt -= 5; // wake up 5 sec before the specified time | 268 | alrt -= 5; // wake up 5 sec before the specified time |
269 | 269 | ||
270 | alr = *gmtime ( &alrt ); | 270 | alr = *gmtime ( &alrt ); |
271 | 271 | ||
272 | if ( ioctl ( fd, RTC_ALM_SET, &alr ) < 0 ) // set RTC alarm time | 272 | if ( ioctl ( fd, RTC_ALM_SET, &alr ) < 0 ) // set RTC alarm time |
273 | break; // ( 1, "ioctl RTC_ALM_SET" ); | 273 | break; // ( 1, "ioctl RTC_ALM_SET" ); |
274 | 274 | ||
275 | if ( ioctl ( fd, RTC_AIE_ON, 0 ) < 0 ) | 275 | if ( ioctl ( fd, RTC_AIE_ON, 0 ) < 0 ) |
276 | break; // ( 1, "ioctl RTC_AIE_ON" ); // enable RTC alarm irq | 276 | break; // ( 1, "ioctl RTC_AIE_ON" ); // enable RTC alarm irq |
277 | 277 | ||
278 | // tell the parent it is safe to exit now .. we have set the RTC alarm | 278 | // tell the parent it is safe to exit now .. we have set the RTC alarm |
279 | kill ( parent_pid, SIGUSR1 ); | 279 | kill ( parent_pid, SIGUSR1 ); |
280 | 280 | ||
281 | if ( read ( fd, buf, sizeof( unsigned long )) < 0 ) // wait for the RTC alarm irq | 281 | if ( read ( fd, buf, sizeof( unsigned long )) < 0 ) // wait for the RTC alarm irq |
282 | break; // ( 1, "read rtc alarm" ); | 282 | break; // ( 1, "read rtc alarm" ); |
283 | 283 | ||
284 | // iPAQ woke up via RTC irq -- otherwise we would have received a SIGUSR2 | 284 | // iPAQ woke up via RTC irq -- otherwise we would have received a SIGUSR2 |
285 | // from the "resume instance" of opiealarm. | 285 | // from the "resume instance" of opiealarm. |
286 | 286 | ||
287 | if ( ioctl ( fd, RTC_AIE_OFF, 0 ) < 0 ) // disable RTC alarm irq | 287 | if ( ioctl ( fd, RTC_AIE_OFF, 0 ) < 0 ) // disable RTC alarm irq |
288 | break; // ( 1, "ioctl RTC_AIE_OFF" ); | 288 | break; // ( 1, "ioctl RTC_AIE_OFF" ); |
289 | 289 | ||
290 | close ( fd ); | 290 | close ( fd ); |
291 | fd = -1; | 291 | fd = -1; |
292 | 292 | ||
293 | remove_pidfile ( ); | 293 | remove_pidfile ( ); |
294 | 294 | ||
295 | return 0; | 295 | return 0; |
296 | 296 | ||
297 | } while ( 0 ); | 297 | } while ( 0 ); |
298 | 298 | ||
299 | if ( fp != NULL ) | 299 | if ( fp != NULL ) |
300 | fclose ( fp ); | 300 | fclose ( fp ); |
301 | 301 | ||
302 | if ( fd != -1 ) | 302 | if ( fd != -1 ) |
303 | close ( fd ); | 303 | close ( fd ); |
304 | 304 | ||
305 | kill ( parent_pid, SIGUSR1 ); | 305 | kill ( parent_pid, SIGUSR1 ); |
306 | 306 | ||
307 | while ( 1 ) // pretend that we are waiting on RTC, so opiealarm -r can kill us | 307 | while ( 1 ) // pretend that we are waiting on RTC, so opiealarm -r can kill us |
308 | sleep ( 1000 ); // if we don't do this, the "resuspend on AC" would be triggerd | 308 | sleep ( 1000 ); // if we don't do this, the "resuspend on AC" would be triggerd |
309 | return 0; | 309 | return 0; |
310 | } | 310 | } |
311 | 311 | ||
312 | int onac ( void ) | 312 | int onac ( void ) |
313 | { | 313 | { |
314 | FILE *fp; | 314 | FILE *fp; |
315 | int on = 0; | 315 | int on = 0; |
316 | 316 | ||
317 | // check the apm proc interface for AC status | 317 | // check the apm proc interface for AC status |
318 | 318 | ||
319 | if (( fp = fopen ( APMFILE, "r" ))) { | 319 | if (( fp = fopen ( APMFILE, "r" ))) { |
320 | int ac = 0; | 320 | int ac = 0; |
321 | 321 | ||
322 | if ( fscanf ( fp, "%*[^ ] %*d.%*d 0x%*x 0x%x 0x%*x 0x%*x %*d%% %*i %*c", &ac ) == 1 ) | 322 | if ( fscanf ( fp, "%*[^ ] %*d.%*d 0x%*x 0x%x 0x%*x 0x%*x %*d%% %*i %*c", &ac ) == 1 ) |
323 | on = ( ac == 0x01 ) ? 1 : 0; | 323 | on = ( ac == 0x01 ) ? 1 : 0; |
324 | 324 | ||
325 | fclose ( fp ); | 325 | fclose ( fp ); |
326 | } | 326 | } |
327 | return on; | 327 | return on; |
328 | } | 328 | } |
329 | 329 | ||
330 | int resume ( int resuspend ) | 330 | int resume ( int resuspend ) |
331 | { | 331 | { |
332 | FILE *fp; | 332 | FILE *fp; |
333 | 333 | ||
334 | // re-suspend when on AC (optional) when woken up via RTC | 334 | // re-suspend when on AC (optional) when woken up via RTC |
335 | 335 | ||
336 | if ( !opiealarm_was_running ) { | 336 | if ( !opiealarm_was_running ) { |
337 | // if opiealarm -s didn't wake up via RTC, the old process gets killed | 337 | // if opiealarm -s didn't wake up via RTC, the old process gets killed |
338 | // by kill_by_pidfile(), which is recorded in opiealarm_was_running | 338 | // by kill_by_pidfile(), which is recorded in opiealarm_was_running |
339 | 339 | ||
340 | if ( resuspend && onac ( )) { | 340 | if ( resuspend && onac ( )) { |
341 | time_t start, now; | 341 | time_t start, now; |
342 | char *argv [4]; | 342 | char *argv [4]; |
343 | 343 | ||
344 | if ( !fork_with_pidfile ( )) | 344 | if ( !fork_with_pidfile ( )) |
345 | return 4; | 345 | return 4; |
346 | 346 | ||
347 | // we can't wait for the resuspend timeout in the parent process. | 347 | // we can't wait for the resuspend timeout in the parent process. |
348 | // so we fork and tell the parent it can exit immediatly | 348 | // so we fork and tell the parent it can exit immediatly |
349 | 349 | ||
350 | kill ( parent_pid, SIGUSR1 ); | 350 | kill ( parent_pid, SIGUSR1 ); |
351 | 351 | ||
352 | // sleep <resuspend> seconds - this method is much more precise than sleep() ! | 352 | // sleep <resuspend> seconds - this method is much more precise than sleep() ! |
353 | time ( &start ); | 353 | time ( &start ); |
354 | do { | 354 | do { |
355 | sleep ( 1 ); | 355 | sleep ( 1 ); |
356 | time ( &now ); | 356 | time ( &now ); |
357 | } while (( now - start ) < resuspend ); | 357 | } while (( now - start ) < resuspend ); |
358 | 358 | ||
359 | if ( onac ( )) { // still on ac ? | 359 | if ( onac ( )) { // still on ac ? |
360 | argv[0] = "qcop"; | 360 | argv[0] = "qcop"; |
361 | argv[1] = "QPE/Desktop"; | 361 | argv[1] = "QPE/Desktop"; |
362 | argv[2] = "suspend()"; | 362 | argv[2] = "suspend()"; |
363 | argv[3] = 0; | 363 | argv[3] = 0; |
364 | 364 | ||
365 | // hard coded for now ...but needed | 365 | // hard coded for now ...but needed |
366 | // another way would be to simulate a power-button press | 366 | // another way would be to simulate a power-button press |
367 | 367 | ||
368 | setenv ( "LOGNAME", "root", 1 ); | 368 | setenv ( "LOGNAME", "root", 1 ); |
369 | setenv ( "HOME", "/root", 1 ); | 369 | setenv ( "HOME", "/root", 1 ); |
370 | setenv ( "LD_LIBRARY_PATH", "/opt/QtPalmtop/lib", 1 ); | 370 | setenv ( "LD_LIBRARY_PATH", "/opt/QtPalmtop/lib", 1 ); |
371 | setenv ( "QTDIR", "/opt/QtPalmtop", 1 ); | 371 | setenv ( "QTDIR", "/opt/QtPalmtop", 1 ); |
372 | 372 | ||
373 | remove_pidfile ( ); | 373 | remove_pidfile ( ); |
374 | 374 | ||
375 | // no need for system() since this process is no longer usefull anyway | 375 | // no need for system() since this process is no longer useful anyway |
376 | execv ( "/opt/QtPalmtop/bin/qcop", argv ); | 376 | execv ( "/opt/QtPalmtop/bin/qcop", argv ); |
377 | 377 | ||
378 | perror ( "exec for qcop failed" ); | 378 | perror ( "exec for qcop failed" ); |
379 | return 5; | 379 | return 5; |
380 | } | 380 | } |
381 | } | 381 | } |
382 | } | 382 | } |
383 | return 0; | 383 | return 0; |
384 | } | 384 | } |
diff --git a/etc/dict/words b/etc/dict/words index 1568032..0f14205 100644 --- a/etc/dict/words +++ b/etc/dict/words | |||
@@ -3776,1537 +3776,1537 @@ balk | |||
3776 | Balkan | 3776 | Balkan |
3777 | Balkanization | 3777 | Balkanization |
3778 | Balkanizations | 3778 | Balkanizations |
3779 | Balkanize | 3779 | Balkanize |
3780 | balkanized | 3780 | balkanized |
3781 | Balkanizes | 3781 | Balkanizes |
3782 | balkanizing | 3782 | balkanizing |
3783 | Balkans | 3783 | Balkans |
3784 | balked | 3784 | balked |
3785 | balkiness | 3785 | balkiness |
3786 | balking | 3786 | balking |
3787 | balks | 3787 | balks |
3788 | balky | 3788 | balky |
3789 | ball | 3789 | ball |
3790 | ballad | 3790 | ballad |
3791 | ballads | 3791 | ballads |
3792 | Ballard | 3792 | Ballard |
3793 | Ballards | 3793 | Ballards |
3794 | ballast | 3794 | ballast |
3795 | ballasts | 3795 | ballasts |
3796 | balled | 3796 | balled |
3797 | baller | 3797 | baller |
3798 | ballerina | 3798 | ballerina |
3799 | ballerinas | 3799 | ballerinas |
3800 | ballers | 3800 | ballers |
3801 | ballet | 3801 | ballet |
3802 | ballets | 3802 | ballets |
3803 | ballgown | 3803 | ballgown |
3804 | balling | 3804 | balling |
3805 | ballistic | 3805 | ballistic |
3806 | ballistics | 3806 | ballistics |
3807 | balloon | 3807 | balloon |
3808 | ballooned | 3808 | ballooned |
3809 | ballooner | 3809 | ballooner |
3810 | ballooners | 3810 | ballooners |
3811 | ballooning | 3811 | ballooning |
3812 | balloons | 3812 | balloons |
3813 | ballot | 3813 | ballot |
3814 | ballots | 3814 | ballots |
3815 | ballpark | 3815 | ballpark |
3816 | ballparks | 3816 | ballparks |
3817 | ballplayer | 3817 | ballplayer |
3818 | ballplayers | 3818 | ballplayers |
3819 | ballroom | 3819 | ballroom |
3820 | ballrooms | 3820 | ballrooms |
3821 | balls | 3821 | balls |
3822 | ballyhoo | 3822 | ballyhoo |
3823 | balm | 3823 | balm |
3824 | balms | 3824 | balms |
3825 | balmy | 3825 | balmy |
3826 | balsa | 3826 | balsa |
3827 | balsam | 3827 | balsam |
3828 | Baltic | 3828 | Baltic |
3829 | Baltimore | 3829 | Baltimore |
3830 | Baltimorean | 3830 | Baltimorean |
3831 | balustrade | 3831 | balustrade |
3832 | balustrades | 3832 | balustrades |
3833 | Balzac | 3833 | Balzac |
3834 | Bamako | 3834 | Bamako |
3835 | Bamberger | 3835 | Bamberger |
3836 | Bambi | 3836 | Bambi |
3837 | bamboo | 3837 | bamboo |
3838 | ban | 3838 | ban |
3839 | Banach | 3839 | Banach |
3840 | banal | 3840 | banal |
3841 | banally | 3841 | banally |
3842 | banana | 3842 | banana |
3843 | bananas | 3843 | bananas |
3844 | Banbury | 3844 | Banbury |
3845 | Bancroft | 3845 | Bancroft |
3846 | band | 3846 | band |
3847 | bandage | 3847 | bandage |
3848 | bandaged | 3848 | bandaged |
3849 | bandages | 3849 | bandages |
3850 | bandaging | 3850 | bandaging |
3851 | banded | 3851 | banded |
3852 | bandied | 3852 | bandied |
3853 | bandies | 3853 | bandies |
3854 | banding | 3854 | banding |
3855 | bandit | 3855 | bandit |
3856 | bandits | 3856 | bandits |
3857 | bandpass | 3857 | bandpass |
3858 | bands | 3858 | bands |
3859 | bandstand | 3859 | bandstand |
3860 | bandstands | 3860 | bandstands |
3861 | bandwagon | 3861 | bandwagon |
3862 | bandwagons | 3862 | bandwagons |
3863 | bandwidth | 3863 | bandwidth |
3864 | bandwidths | 3864 | bandwidths |
3865 | bandy | 3865 | bandy |
3866 | bandying | 3866 | bandying |
3867 | bane | 3867 | bane |
3868 | baneful | 3868 | baneful |
3869 | bang | 3869 | bang |
3870 | banged | 3870 | banged |
3871 | banging | 3871 | banging |
3872 | Bangladesh | 3872 | Bangladesh |
3873 | bangle | 3873 | bangle |
3874 | bangles | 3874 | bangles |
3875 | Bangor | 3875 | Bangor |
3876 | bangs | 3876 | bangs |
3877 | Bangui | 3877 | Bangui |
3878 | banish | 3878 | banish |
3879 | banished | 3879 | banished |
3880 | banishes | 3880 | banishes |
3881 | banishing | 3881 | banishing |
3882 | banishment | 3882 | banishment |
3883 | banister | 3883 | banister |
3884 | banisters | 3884 | banisters |
3885 | banjo | 3885 | banjo |
3886 | banjos | 3886 | banjos |
3887 | bank | 3887 | bank |
3888 | banked | 3888 | banked |
3889 | banker | 3889 | banker |
3890 | bankers | 3890 | bankers |
3891 | banking | 3891 | banking |
3892 | bankrupt | 3892 | bankrupt |
3893 | bankruptcies | 3893 | bankruptcies |
3894 | bankruptcy | 3894 | bankruptcy |
3895 | bankrupted | 3895 | bankrupted |
3896 | bankrupting | 3896 | bankrupting |
3897 | bankrupts | 3897 | bankrupts |
3898 | Banks | 3898 | Banks |
3899 | banned | 3899 | banned |
3900 | banner | 3900 | banner |
3901 | banners | 3901 | banners |
3902 | banning | 3902 | banning |
3903 | banquet | 3903 | banquet |
3904 | banqueting | 3904 | banqueting |
3905 | banquetings | 3905 | banquetings |
3906 | banquets | 3906 | banquets |
3907 | bans | 3907 | bans |
3908 | banshee | 3908 | banshee |
3909 | banshees | 3909 | banshees |
3910 | bantam | 3910 | bantam |
3911 | banter | 3911 | banter |
3912 | bantered | 3912 | bantered |
3913 | bantering | 3913 | bantering |
3914 | banters | 3914 | banters |
3915 | Bantu | 3915 | Bantu |
3916 | Bantus | 3916 | Bantus |
3917 | baptism | 3917 | baptism |
3918 | baptismal | 3918 | baptismal |
3919 | baptisms | 3919 | baptisms |
3920 | Baptist | 3920 | Baptist |
3921 | Baptiste | 3921 | Baptiste |
3922 | baptistery | 3922 | baptistery |
3923 | baptistries | 3923 | baptistries |
3924 | baptistry | 3924 | baptistry |
3925 | Baptists | 3925 | Baptists |
3926 | baptize | 3926 | baptize |
3927 | baptized | 3927 | baptized |
3928 | baptizes | 3928 | baptizes |
3929 | baptizing | 3929 | baptizing |
3930 | bar | 3930 | bar |
3931 | barb | 3931 | barb |
3932 | Barbados | 3932 | Barbados |
3933 | Barbara | 3933 | Barbara |
3934 | barbarian | 3934 | barbarian |
3935 | barbarians | 3935 | barbarians |
3936 | barbaric | 3936 | barbaric |
3937 | barbarism | 3937 | barbarism |
3938 | barbarities | 3938 | barbarities |
3939 | barbarity | 3939 | barbarity |
3940 | barbarous | 3940 | barbarous |
3941 | barbarously | 3941 | barbarously |
3942 | barbecue | 3942 | barbecue |
3943 | barbecued | 3943 | barbecued |
3944 | barbecues | 3944 | barbecues |
3945 | barbed | 3945 | barbed |
3946 | barbell | 3946 | barbell |
3947 | barbells | 3947 | barbells |
3948 | barber | 3948 | barber |
3949 | barbital | 3949 | barbital |
3950 | barbiturate | 3950 | barbiturate |
3951 | barbiturates | 3951 | barbiturates |
3952 | Barbour | 3952 | Barbour |
3953 | barbs | 3953 | barbs |
3954 | Barcelona | 3954 | Barcelona |
3955 | Barclay | 3955 | Barclay |
3956 | bard | 3956 | bard |
3957 | bards | 3957 | bards |
3958 | bare | 3958 | bare |
3959 | bared | 3959 | bared |
3960 | barefaced | 3960 | barefaced |
3961 | barefoot | 3961 | barefoot |
3962 | barefooted | 3962 | barefooted |
3963 | barely | 3963 | barely |
3964 | bareness | 3964 | bareness |
3965 | barer | 3965 | barer |
3966 | bares | 3966 | bares |
3967 | barest | 3967 | barest |
3968 | barflies | 3968 | barflies |
3969 | barfly | 3969 | barfly |
3970 | bargain | 3970 | bargain |
3971 | bargained | 3971 | bargained |
3972 | bargaining | 3972 | bargaining |
3973 | bargains | 3973 | bargains |
3974 | barge | 3974 | barge |
3975 | barges | 3975 | barges |
3976 | barging | 3976 | barging |
3977 | Barhop | 3977 | Barhop |
3978 | baring | 3978 | baring |
3979 | baritone | 3979 | baritone |
3980 | baritones | 3980 | baritones |
3981 | barium | 3981 | barium |
3982 | bark | 3982 | bark |
3983 | barked | 3983 | barked |
3984 | barker | 3984 | barker |
3985 | barkers | 3985 | barkers |
3986 | barking | 3986 | barking |
3987 | barks | 3987 | barks |
3988 | barley | 3988 | barley |
3989 | Barlow | 3989 | Barlow |
3990 | barn | 3990 | barn |
3991 | Barnabas | 3991 | Barnabas |
3992 | Barnard | 3992 | Barnard |
3993 | Barnes | 3993 | Barnes |
3994 | Barnet | 3994 | Barnet |
3995 | Barnett | 3995 | Barnett |
3996 | Barney | 3996 | Barney |
3997 | Barnhard | 3997 | Barnhard |
3998 | barns | 3998 | barns |
3999 | barnstorm | 3999 | barnstorm |
4000 | barnstormed | 4000 | barnstormed |
4001 | barnstorming | 4001 | barnstorming |
4002 | barnstorms | 4002 | barnstorms |
4003 | Barnum | 4003 | Barnum |
4004 | barnyard | 4004 | barnyard |
4005 | barnyards | 4005 | barnyards |
4006 | barometer | 4006 | barometer |
4007 | barometers | 4007 | barometers |
4008 | barometric | 4008 | barometric |
4009 | baron | 4009 | baron |
4010 | baroness | 4010 | baroness |
4011 | baronial | 4011 | baronial |
4012 | baronies | 4012 | baronies |
4013 | barons | 4013 | barons |
4014 | barony | 4014 | barony |
4015 | baroque | 4015 | baroque |
4016 | baroqueness | 4016 | baroqueness |
4017 | Barr | 4017 | Barr |
4018 | barrack | 4018 | barrack |
4019 | barracks | 4019 | barracks |
4020 | barrage | 4020 | barrage |
4021 | barrages | 4021 | barrages |
4022 | barred | 4022 | barred |
4023 | barrel | 4023 | barrel |
4024 | barrelled | 4024 | barrelled |
4025 | barrelling | 4025 | barrelling |
4026 | barrels | 4026 | barrels |
4027 | barren | 4027 | barren |
4028 | barrenness | 4028 | barrenness |
4029 | Barrett | 4029 | Barrett |
4030 | barricade | 4030 | barricade |
4031 | barricades | 4031 | barricades |
4032 | barrier | 4032 | barrier |
4033 | barriers | 4033 | barriers |
4034 | barring | 4034 | barring |
4035 | barringer | 4035 | barringer |
4036 | Barrington | 4036 | Barrington |
4037 | Barron | 4037 | Barron |
4038 | barrow | 4038 | barrow |
4039 | Barry | 4039 | Barry |
4040 | Barrymore | 4040 | Barrymore |
4041 | Barrymores | 4041 | Barrymores |
4042 | bars | 4042 | bars |
4043 | Barstow | 4043 | Barstow |
4044 | Bart | 4044 | Bart |
4045 | bartender | 4045 | bartender |
4046 | bartenders | 4046 | bartenders |
4047 | barter | 4047 | barter |
4048 | bartered | 4048 | bartered |
4049 | bartering | 4049 | bartering |
4050 | barters | 4050 | barters |
4051 | Barth | 4051 | Barth |
4052 | Bartholomew | 4052 | Bartholomew |
4053 | Bartlett | 4053 | Bartlett |
4054 | Bartok | 4054 | Bartok |
4055 | Barton | 4055 | Barton |
4056 | basal | 4056 | basal |
4057 | basalt | 4057 | basalt |
4058 | Bascom | 4058 | Bascom |
4059 | base | 4059 | base |
4060 | baseball | 4060 | baseball |
4061 | baseballs | 4061 | baseballs |
4062 | baseband | 4062 | baseband |
4063 | baseboard | 4063 | baseboard |
4064 | baseboards | 4064 | baseboards |
4065 | based | 4065 | based |
4066 | Basel | 4066 | Basel |
4067 | baseless | 4067 | baseless |
4068 | baseline | 4068 | baseline |
4069 | baselines | 4069 | baselines |
4070 | basely | 4070 | basely |
4071 | baseman | 4071 | baseman |
4072 | basement | 4072 | basement |
4073 | basements | 4073 | basements |
4074 | baseness | 4074 | baseness |
4075 | baser | 4075 | baser |
4076 | bases | 4076 | bases |
4077 | bash | 4077 | bash |
4078 | bashed | 4078 | bashed |
4079 | bashes | 4079 | bashes |
4080 | bashful | 4080 | bashful |
4081 | bashfulness | 4081 | bashfulness |
4082 | bashing | 4082 | bashing |
4083 | BASIC | 4083 | BASIC |
4084 | Basic | 4084 | Basic |
4085 | basic | 4085 | basic |
4086 | basically | 4086 | basically |
4087 | basics | 4087 | basics |
4088 | Basie | 4088 | Basie |
4089 | basil | 4089 | basil |
4090 | basin | 4090 | basin |
4091 | basing | 4091 | basing |
4092 | basins | 4092 | basins |
4093 | basis | 4093 | basis |
4094 | bask | 4094 | bask |
4095 | basked | 4095 | basked |
4096 | basket | 4096 | basket |
4097 | basketball | 4097 | basketball |
4098 | basketballs | 4098 | basketballs |
4099 | baskets | 4099 | baskets |
4100 | basking | 4100 | basking |
4101 | Basque | 4101 | Basque |
4102 | bass | 4102 | bass |
4103 | basses | 4103 | basses |
4104 | basset | 4104 | basset |
4105 | Bassett | 4105 | Bassett |
4106 | bassinet | 4106 | bassinet |
4107 | bassinets | 4107 | bassinets |
4108 | bastard | 4108 | bastard |
4109 | bastards | 4109 | bastards |
4110 | baste | 4110 | baste |
4111 | basted | 4111 | basted |
4112 | bastes | 4112 | bastes |
4113 | basting | 4113 | basting |
4114 | bastion | 4114 | bastion |
4115 | bastions | 4115 | bastions |
4116 | bat | 4116 | bat |
4117 | Batavia | 4117 | Batavia |
4118 | batch | 4118 | batch |
4119 | batched | 4119 | batched |
4120 | Batchelder | 4120 | Batchelder |
4121 | batches | 4121 | batches |
4122 | Bateman | 4122 | Bateman |
4123 | Bates | 4123 | Bates |
4124 | bath | 4124 | bath |
4125 | bathe | 4125 | bathe |
4126 | bathed | 4126 | bathed |
4127 | bather | 4127 | bather |
4128 | bathers | 4128 | bathers |
4129 | bathes | 4129 | bathes |
4130 | bathing | 4130 | bathing |
4131 | bathos | 4131 | bathos |
4132 | bathrobe | 4132 | bathrobe |
4133 | bathrobes | 4133 | bathrobes |
4134 | bathroom | 4134 | bathroom |
4135 | bathrooms | 4135 | bathrooms |
4136 | baths | 4136 | baths |
4137 | bathtub | 4137 | bathtub |
4138 | bathtubs | 4138 | bathtubs |
4139 | Bathurst | 4139 | Bathurst |
4140 | Batista | 4140 | Batista |
4141 | baton | 4141 | baton |
4142 | batons | 4142 | batons |
4143 | Bator | 4143 | Bator |
4144 | bats | 4144 | bats |
4145 | battalion | 4145 | battalion |
4146 | battalions | 4146 | battalions |
4147 | batted | 4147 | batted |
4148 | Battelle | 4148 | Battelle |
4149 | batten | 4149 | batten |
4150 | battens | 4150 | battens |
4151 | batter | 4151 | batter |
4152 | battered | 4152 | battered |
4153 | batteries | 4153 | batteries |
4154 | battering | 4154 | battering |
4155 | batters | 4155 | batters |
4156 | battery | 4156 | battery |
4157 | batting | 4157 | batting |
4158 | battle | 4158 | battle |
4159 | battled | 4159 | battled |
4160 | battlefield | 4160 | battlefield |
4161 | battlefields | 4161 | battlefields |
4162 | battlefront | 4162 | battlefront |
4163 | battlefronts | 4163 | battlefronts |
4164 | battleground | 4164 | battleground |
4165 | battlegrounds | 4165 | battlegrounds |
4166 | battlement | 4166 | battlement |
4167 | battlements | 4167 | battlements |
4168 | battler | 4168 | battler |
4169 | battlers | 4169 | battlers |
4170 | battles | 4170 | battles |
4171 | battleship | 4171 | battleship |
4172 | battleships | 4172 | battleships |
4173 | battling | 4173 | battling |
4174 | bauble | 4174 | bauble |
4175 | baubles | 4175 | baubles |
4176 | baud | 4176 | baud |
4177 | Baudelaire | 4177 | Baudelaire |
4178 | Bauer | 4178 | Bauer |
4179 | Bauhaus | 4179 | Bauhaus |
4180 | Bausch | 4180 | Bausch |
4181 | bauxite | 4181 | bauxite |
4182 | Bavaria | 4182 | Bavaria |
4183 | Bavarian | 4183 | Bavarian |
4184 | bawdy | 4184 | bawdy |
4185 | bawl | 4185 | bawl |
4186 | bawled | 4186 | bawled |
4187 | bawling | 4187 | bawling |
4188 | bawls | 4188 | bawls |
4189 | Baxter | 4189 | Baxter |
4190 | bay | 4190 | bay |
4191 | Bayda | 4191 | Bayda |
4192 | bayed | 4192 | bayed |
4193 | Bayes | 4193 | Bayes |
4194 | Bayesian | 4194 | Bayesian |
4195 | baying | 4195 | baying |
4196 | Baylor | 4196 | Baylor |
4197 | bayonet | 4197 | bayonet |
4198 | bayonets | 4198 | bayonets |
4199 | Bayonne | 4199 | Bayonne |
4200 | bayou | 4200 | bayou |
4201 | bayous | 4201 | bayous |
4202 | Bayport | 4202 | Bayport |
4203 | Bayreuth | 4203 | Bayreuth |
4204 | bays | 4204 | bays |
4205 | bazaar | 4205 | bazaar |
4206 | bazaars | 4206 | bazaars |
4207 | be | 4207 | be |
4208 | beach | 4208 | beach |
4209 | beached | 4209 | beached |
4210 | beaches | 4210 | beaches |
4211 | beachhead | 4211 | beachhead |
4212 | beachheads | 4212 | beachheads |
4213 | beaching | 4213 | beaching |
4214 | beacon | 4214 | beacon |
4215 | beacons | 4215 | beacons |
4216 | bead | 4216 | bead |
4217 | beaded | 4217 | beaded |
4218 | beading | 4218 | beading |
4219 | beadle | 4219 | beadle |
4220 | beadles | 4220 | beadles |
4221 | beads | 4221 | beads |
4222 | beady | 4222 | beady |
4223 | beagle | 4223 | beagle |
4224 | beagles | 4224 | beagles |
4225 | beak | 4225 | beak |
4226 | beaked | 4226 | beaked |
4227 | beaker | 4227 | beaker |
4228 | beakers | 4228 | beakers |
4229 | beaks | 4229 | beaks |
4230 | beam | 4230 | beam |
4231 | beamed | 4231 | beamed |
4232 | beamer | 4232 | beamer |
4233 | beamers | 4233 | beamers |
4234 | beaming | 4234 | beaming |
4235 | beams | 4235 | beams |
4236 | bean | 4236 | bean |
4237 | beanbag | 4237 | beanbag |
4238 | beaned | 4238 | beaned |
4239 | beaner | 4239 | beaner |
4240 | beaners | 4240 | beaners |
4241 | beaning | 4241 | beaning |
4242 | beans | 4242 | beans |
4243 | bear | 4243 | bear |
4244 | bearable | 4244 | bearable |
4245 | bearably | 4245 | bearably |
4246 | beard | 4246 | beard |
4247 | bearded | 4247 | bearded |
4248 | beardless | 4248 | beardless |
4249 | beards | 4249 | beards |
4250 | Beardsley | 4250 | Beardsley |
4251 | bearer | 4251 | bearer |
4252 | bearers | 4252 | bearers |
4253 | bearing | 4253 | bearing |
4254 | bearings | 4254 | bearings |
4255 | bearish | 4255 | bearish |
4256 | bears | 4256 | bears |
4257 | beast | 4257 | beast |
4258 | beastly | 4258 | beastly |
4259 | beasts | 4259 | beasts |
4260 | beat | 4260 | beat |
4261 | beatable | 4261 | beatable |
4262 | beatably | 4262 | beatably |
4263 | beaten | 4263 | beaten |
4264 | beater | 4264 | beater |
4265 | beaters | 4265 | beaters |
4266 | beatific | 4266 | beatific |
4267 | beatification | 4267 | beatification |
4268 | beatify | 4268 | beatify |
4269 | beating | 4269 | beating |
4270 | beatings | 4270 | beatings |
4271 | beatitude | 4271 | beatitude |
4272 | beatitudes | 4272 | beatitudes |
4273 | beatnik | 4273 | beatnik |
4274 | beatniks | 4274 | beatniks |
4275 | Beatrice | 4275 | Beatrice |
4276 | beats | 4276 | beats |
4277 | beau | 4277 | beau |
4278 | Beauchamps | 4278 | Beauchamps |
4279 | Beaujolais | 4279 | Beaujolais |
4280 | Beaumont | 4280 | Beaumont |
4281 | Beauregard | 4281 | Beauregard |
4282 | beaus | 4282 | beaus |
4283 | beauteous | 4283 | beauteous |
4284 | beauteously | 4284 | beauteously |
4285 | beauties | 4285 | beauties |
4286 | beautifications | 4286 | beautifications |
4287 | beautified | 4287 | beautified |
4288 | beautifier | 4288 | beautifier |
4289 | beautifiers | 4289 | beautifiers |
4290 | beautifies | 4290 | beautifies |
4291 | beautiful | 4291 | beautiful |
4292 | beautifully | 4292 | beautifully |
4293 | beautify | 4293 | beautify |
4294 | beautifying | 4294 | beautifying |
4295 | beauty | 4295 | beauty |
4296 | beaver | 4296 | beaver |
4297 | beavers | 4297 | beavers |
4298 | Beaverton | 4298 | Beaverton |
4299 | becalm | 4299 | becalm |
4300 | becalmed | 4300 | becalmed |
4301 | becalming | 4301 | becalming |
4302 | becalms | 4302 | becalms |
4303 | became | 4303 | became |
4304 | because | 4304 | because |
4305 | Bechtel | 4305 | Bechtel |
4306 | beck | 4306 | beck |
4307 | Becker | 4307 | Becker |
4308 | Beckman | 4308 | Beckman |
4309 | beckon | 4309 | beckon |
4310 | beckoned | 4310 | beckoned |
4311 | beckoning | 4311 | beckoning |
4312 | beckons | 4312 | beckons |
4313 | Becky | 4313 | Becky |
4314 | become | 4314 | become |
4315 | becomes | 4315 | becomes |
4316 | becoming | 4316 | becoming |
4317 | becomingly | 4317 | becomingly |
4318 | bed | 4318 | bed |
4319 | bedazzle | 4319 | bedazzle |
4320 | bedazzled | 4320 | bedazzled |
4321 | bedazzlement | 4321 | bedazzlement |
4322 | bedazzles | 4322 | bedazzles |
4323 | bedazzling | 4323 | bedazzling |
4324 | bedbug | 4324 | bedbug |
4325 | bedbugs | 4325 | bedbugs |
4326 | bedded | 4326 | bedded |
4327 | bedder | 4327 | bedder |
4328 | bedders | 4328 | bedders |
4329 | bedding | 4329 | bedding |
4330 | bedevil | 4330 | bedevil |
4331 | bedeviled | 4331 | bedeviled |
4332 | bedeviling | 4332 | bedeviling |
4333 | bedevils | 4333 | bedevils |
4334 | bedfast | 4334 | bedfast |
4335 | Bedford | 4335 | Bedford |
4336 | bedlam | 4336 | bedlam |
4337 | bedpost | 4337 | bedpost |
4338 | bedposts | 4338 | bedposts |
4339 | bedraggle | 4339 | bedraggle |
4340 | bedraggled | 4340 | bedraggled |
4341 | bedridden | 4341 | bedridden |
4342 | bedrock | 4342 | bedrock |
4343 | bedroom | 4343 | bedroom |
4344 | bedrooms | 4344 | bedrooms |
4345 | beds | 4345 | beds |
4346 | bedside | 4346 | bedside |
4347 | bedspread | 4347 | bedspread |
4348 | bedspreads | 4348 | bedspreads |
4349 | bedspring | 4349 | bedspring |
4350 | bedsprings | 4350 | bedsprings |
4351 | bedstead | 4351 | bedstead |
4352 | bedsteads | 4352 | bedsteads |
4353 | bedtime | 4353 | bedtime |
4354 | bee | 4354 | bee |
4355 | Beebe | 4355 | Beebe |
4356 | beech | 4356 | beech |
4357 | Beecham | 4357 | Beecham |
4358 | beechen | 4358 | beechen |
4359 | beecher | 4359 | beecher |
4360 | beef | 4360 | beef |
4361 | beefed | 4361 | beefed |
4362 | beefer | 4362 | beefer |
4363 | beefers | 4363 | beefers |
4364 | beefing | 4364 | beefing |
4365 | beefs | 4365 | beefs |
4366 | beefsteak | 4366 | beefsteak |
4367 | beefy | 4367 | beefy |
4368 | beehive | 4368 | beehive |
4369 | beehives | 4369 | beehives |
4370 | been | 4370 | been |
4371 | beep | 4371 | beep |
4372 | beeps | 4372 | beeps |
4373 | beer | 4373 | beer |
4374 | beers | 4374 | beers |
4375 | bees | 4375 | bees |
4376 | beet | 4376 | beet |
4377 | Beethoven | 4377 | Beethoven |
4378 | beetle | 4378 | beetle |
4379 | beetled | 4379 | beetled |
4380 | beetles | 4380 | beetles |
4381 | beetling | 4381 | beetling |
4382 | beets | 4382 | beets |
4383 | befall | 4383 | befall |
4384 | befallen | 4384 | befallen |
4385 | befalling | 4385 | befalling |
4386 | befalls | 4386 | befalls |
4387 | befell | 4387 | befell |
4388 | befit | 4388 | befit |
4389 | befits | 4389 | befits |
4390 | befitted | 4390 | befitted |
4391 | befitting | 4391 | befitting |
4392 | befog | 4392 | befog |
4393 | befogged | 4393 | befogged |
4394 | befogging | 4394 | befogging |
4395 | before | 4395 | before |
4396 | beforehand | 4396 | beforehand |
4397 | befoul | 4397 | befoul |
4398 | befouled | 4398 | befouled |
4399 | befouling | 4399 | befouling |
4400 | befouls | 4400 | befouls |
4401 | befriend | 4401 | befriend |
4402 | befriended | 4402 | befriended |
4403 | befriending | 4403 | befriending |
4404 | befriends | 4404 | befriends |
4405 | befuddle | 4405 | befuddle |
4406 | befuddled | 4406 | befuddled |
4407 | befuddles | 4407 | befuddles |
4408 | befuddling | 4408 | befuddling |
4409 | beg | 4409 | beg |
4410 | began | 4410 | began |
4411 | beget | 4411 | beget |
4412 | begets | 4412 | begets |
4413 | begetting | 4413 | begetting |
4414 | beggar | 4414 | beggar |
4415 | beggarly | 4415 | beggarly |
4416 | beggars | 4416 | beggars |
4417 | beggary | 4417 | beggary |
4418 | begged | 4418 | begged |
4419 | begging | 4419 | begging |
4420 | begin | 4420 | begin |
4421 | beginner | 4421 | beginner |
4422 | beginners | 4422 | beginners |
4423 | beginning | 4423 | beginning |
4424 | beginnings | 4424 | beginnings |
4425 | begins | 4425 | begins |
4426 | begot | 4426 | begot |
4427 | begotten | 4427 | begotten |
4428 | begrudge | 4428 | begrudge |
4429 | begrudged | 4429 | begrudged |
4430 | begrudges | 4430 | begrudges |
4431 | begrudging | 4431 | begrudging |
4432 | begrudgingly | 4432 | begrudgingly |
4433 | begs | 4433 | begs |
4434 | beguile | 4434 | beguile |
4435 | beguiled | 4435 | beguiled |
4436 | beguiles | 4436 | beguiles |
4437 | beguiling | 4437 | beguiling |
4438 | begun | 4438 | begun |
4439 | behalf | 4439 | behalf |
4440 | behave | 4440 | behave |
4441 | behaved | 4441 | behaved |
4442 | behaves | 4442 | behaves |
4443 | behaving | 4443 | behaving |
4444 | behavior | 4444 | behavior |
4445 | behavioral | 4445 | behavioral |
4446 | behaviorally | 4446 | behaviorally |
4447 | behaviorism | 4447 | behaviorism |
4448 | behavioristic | 4448 | behavioristic |
4449 | behaviors | 4449 | behaviors |
4450 | behead | 4450 | behead |
4451 | beheading | 4451 | beheading |
4452 | beheld | 4452 | beheld |
4453 | behemoth | 4453 | behemoth |
4454 | behemoths | 4454 | behemoths |
4455 | behest | 4455 | behest |
4456 | behind | 4456 | behind |
4457 | behold | 4457 | behold |
4458 | beholden | 4458 | beholden |
4459 | beholder | 4459 | beholder |
4460 | beholders | 4460 | beholders |
4461 | beholding | 4461 | beholding |
4462 | beholds | 4462 | beholds |
4463 | behoove | 4463 | behoove |
4464 | behooves | 4464 | behooves |
4465 | beige | 4465 | beige |
4466 | Beijing | 4466 | Beijing |
4467 | being | 4467 | being |
4468 | beings | 4468 | beings |
4469 | Beirut | 4469 | Beirut |
4470 | Bela | 4470 | Bela |
4471 | belabor | 4471 | belabor |
4472 | belabored | 4472 | belabored |
4473 | belaboring | 4473 | belaboring |
4474 | belabors | 4474 | belabors |
4475 | belated | 4475 | belated |
4476 | belatedly | 4476 | belatedly |
4477 | belay | 4477 | belay |
4478 | belayed | 4478 | belayed |
4479 | belaying | 4479 | belaying |
4480 | belays | 4480 | belays |
4481 | belch | 4481 | belch |
4482 | belched | 4482 | belched |
4483 | belches | 4483 | belches |
4484 | belching | 4484 | belching |
4485 | Belfast | 4485 | Belfast |
4486 | belfries | 4486 | belfries |
4487 | belfry | 4487 | belfry |
4488 | Belgian | 4488 | Belgian |
4489 | Belgians | 4489 | Belgians |
4490 | Belgium | 4490 | Belgium |
4491 | Belgrade | 4491 | Belgrade |
4492 | belie | 4492 | belie |
4493 | belied | 4493 | belied |
4494 | belief | 4494 | belief |
4495 | beliefs | 4495 | beliefs |
4496 | belies | 4496 | belies |
4497 | believable | 4497 | believable |
4498 | believably | 4498 | believably |
4499 | believe | 4499 | believe |
4500 | believed | 4500 | believed |
4501 | believer | 4501 | believer |
4502 | believers | 4502 | believers |
4503 | believes | 4503 | believes |
4504 | believing | 4504 | believing |
4505 | belittle | 4505 | belittle |
4506 | belittled | 4506 | belittled |
4507 | belittles | 4507 | belittles |
4508 | belittling | 4508 | belittling |
4509 | Belize | 4509 | Belize |
4510 | bell | 4510 | bell |
4511 | Bella | 4511 | Bella |
4512 | Bellamy | 4512 | Bellamy |
4513 | Bellatrix | 4513 | Bellatrix |
4514 | bellboy | 4514 | bellboy |
4515 | bellboys | 4515 | bellboys |
4516 | belle | 4516 | belle |
4517 | belles | 4517 | belles |
4518 | Belleville | 4518 | Belleville |
4519 | bellhop | 4519 | bellhop |
4520 | bellhops | 4520 | bellhops |
4521 | bellicose | 4521 | bellicose |
4522 | bellicosity | 4522 | bellicosity |
4523 | bellies | 4523 | bellies |
4524 | belligerence | 4524 | belligerence |
4525 | belligerent | 4525 | belligerent |
4526 | belligerently | 4526 | belligerently |
4527 | belligerents | 4527 | belligerents |
4528 | Bellingham | 4528 | Bellingham |
4529 | Bellini | 4529 | Bellini |
4530 | bellman | 4530 | bellman |
4531 | bellmen | 4531 | bellmen |
4532 | Bellovin | 4532 | Bellovin |
4533 | bellow | 4533 | bellow |
4534 | bellowed | 4534 | bellowed |
4535 | bellowing | 4535 | bellowing |
4536 | bellows | 4536 | bellows |
4537 | bells | 4537 | bells |
4538 | bellum | 4538 | bellum |
4539 | bellwether | 4539 | bellwether |
4540 | bellwethers | 4540 | bellwethers |
4541 | Bellwood | 4541 | Bellwood |
4542 | belly | 4542 | belly |
4543 | bellyache | 4543 | bellyache |
4544 | bellyfull | 4544 | bellyful |
4545 | Belmont | 4545 | Belmont |
4546 | Beloit | 4546 | Beloit |
4547 | belong | 4547 | belong |
4548 | belonged | 4548 | belonged |
4549 | belonging | 4549 | belonging |
4550 | belongings | 4550 | belongings |
4551 | belongs | 4551 | belongs |
4552 | beloved | 4552 | beloved |
4553 | below | 4553 | below |
4554 | Belshazzar | 4554 | Belshazzar |
4555 | belt | 4555 | belt |
4556 | belted | 4556 | belted |
4557 | belting | 4557 | belting |
4558 | Belton | 4558 | Belton |
4559 | belts | 4559 | belts |
4560 | Beltsville | 4560 | Beltsville |
4561 | Belushi | 4561 | Belushi |
4562 | bely | 4562 | bely |
4563 | belying | 4563 | belying |
4564 | bemoan | 4564 | bemoan |
4565 | bemoaned | 4565 | bemoaned |
4566 | bemoaning | 4566 | bemoaning |
4567 | bemoans | 4567 | bemoans |
4568 | Ben | 4568 | Ben |
4569 | Benares | 4569 | Benares |
4570 | bench | 4570 | bench |
4571 | benched | 4571 | benched |
4572 | benches | 4572 | benches |
4573 | benchmark | 4573 | benchmark |
4574 | benchmarking | 4574 | benchmarking |
4575 | benchmarks | 4575 | benchmarks |
4576 | bend | 4576 | bend |
4577 | bendable | 4577 | bendable |
4578 | Bender | 4578 | Bender |
4579 | benders | 4579 | benders |
4580 | bending | 4580 | bending |
4581 | Bendix | 4581 | Bendix |
4582 | bends | 4582 | bends |
4583 | beneath | 4583 | beneath |
4584 | Benedict | 4584 | Benedict |
4585 | Benedictine | 4585 | Benedictine |
4586 | benediction | 4586 | benediction |
4587 | benedictions | 4587 | benedictions |
4588 | Benedikt | 4588 | Benedikt |
4589 | benefactor | 4589 | benefactor |
4590 | benefactors | 4590 | benefactors |
4591 | beneficence | 4591 | beneficence |
4592 | beneficences | 4592 | beneficences |
4593 | beneficent | 4593 | beneficent |
4594 | beneficial | 4594 | beneficial |
4595 | beneficially | 4595 | beneficially |
4596 | beneficiaries | 4596 | beneficiaries |
4597 | beneficiary | 4597 | beneficiary |
4598 | benefit | 4598 | benefit |
4599 | benefited | 4599 | benefited |
4600 | benefiting | 4600 | benefiting |
4601 | benefits | 4601 | benefits |
4602 | benefitted | 4602 | benefitted |
4603 | benefitting | 4603 | benefitting |
4604 | Benelux | 4604 | Benelux |
4605 | benevolence | 4605 | benevolence |
4606 | benevolent | 4606 | benevolent |
4607 | Bengal | 4607 | Bengal |
4608 | Bengali | 4608 | Bengali |
4609 | benighted | 4609 | benighted |
4610 | benign | 4610 | benign |
4611 | benignly | 4611 | benignly |
4612 | Benjamin | 4612 | Benjamin |
4613 | Bennett | 4613 | Bennett |
4614 | Bennington | 4614 | Bennington |
4615 | Benny | 4615 | Benny |
4616 | Benson | 4616 | Benson |
4617 | bent | 4617 | bent |
4618 | Bentham | 4618 | Bentham |
4619 | Bentley | 4619 | Bentley |
4620 | Bentleys | 4620 | Bentleys |
4621 | Benton | 4621 | Benton |
4622 | Benz | 4622 | Benz |
4623 | Benzedrine | 4623 | Benzedrine |
4624 | benzene | 4624 | benzene |
4625 | Beograd | 4625 | Beograd |
4626 | Beowulf | 4626 | Beowulf |
4627 | bequeath | 4627 | bequeath |
4628 | bequeathal | 4628 | bequeathal |
4629 | bequeathed | 4629 | bequeathed |
4630 | bequeathing | 4630 | bequeathing |
4631 | bequeaths | 4631 | bequeaths |
4632 | bequest | 4632 | bequest |
4633 | bequests | 4633 | bequests |
4634 | berate | 4634 | berate |
4635 | berated | 4635 | berated |
4636 | berates | 4636 | berates |
4637 | berating | 4637 | berating |
4638 | Berea | 4638 | Berea |
4639 | bereave | 4639 | bereave |
4640 | bereaved | 4640 | bereaved |
4641 | bereavement | 4641 | bereavement |
4642 | bereavements | 4642 | bereavements |
4643 | bereaves | 4643 | bereaves |
4644 | bereaving | 4644 | bereaving |
4645 | bereft | 4645 | bereft |
4646 | Berenices | 4646 | Berenices |
4647 | Beresford | 4647 | Beresford |
4648 | beret | 4648 | beret |
4649 | berets | 4649 | berets |
4650 | Bergen | 4650 | Bergen |
4651 | Bergland | 4651 | Bergland |
4652 | Berglund | 4652 | Berglund |
4653 | Bergman | 4653 | Bergman |
4654 | Bergson | 4654 | Bergson |
4655 | Bergsten | 4655 | Bergsten |
4656 | Bergstrom | 4656 | Bergstrom |
4657 | beribboned | 4657 | beribboned |
4658 | beriberi | 4658 | beriberi |
4659 | Beringer | 4659 | Beringer |
4660 | Berkeley | 4660 | Berkeley |
4661 | berkelium | 4661 | berkelium |
4662 | Berkowitz | 4662 | Berkowitz |
4663 | Berkshire | 4663 | Berkshire |
4664 | Berkshires | 4664 | Berkshires |
4665 | Berlin | 4665 | Berlin |
4666 | Berliner | 4666 | Berliner |
4667 | Berliners | 4667 | Berliners |
4668 | Berlinize | 4668 | Berlinize |
4669 | Berlinizes | 4669 | Berlinizes |
4670 | Berlioz | 4670 | Berlioz |
4671 | Berlitz | 4671 | Berlitz |
4672 | Berman | 4672 | Berman |
4673 | Bermuda | 4673 | Bermuda |
4674 | Bern | 4674 | Bern |
4675 | Bernadine | 4675 | Bernadine |
4676 | Bernard | 4676 | Bernard |
4677 | Bernardine | 4677 | Bernardine |
4678 | Bernardino | 4678 | Bernardino |
4679 | Bernardo | 4679 | Bernardo |
4680 | berne | 4680 | berne |
4681 | Bernet | 4681 | Bernet |
4682 | Bernhard | 4682 | Bernhard |
4683 | Bernice | 4683 | Bernice |
4684 | Bernie | 4684 | Bernie |
4685 | Berniece | 4685 | Berniece |
4686 | Bernini | 4686 | Bernini |
4687 | Bernoulli | 4687 | Bernoulli |
4688 | Bernstein | 4688 | Bernstein |
4689 | Berra | 4689 | Berra |
4690 | berries | 4690 | berries |
4691 | berry | 4691 | berry |
4692 | berserk | 4692 | berserk |
4693 | Bert | 4693 | Bert |
4694 | berth | 4694 | berth |
4695 | Bertha | 4695 | Bertha |
4696 | berths | 4696 | berths |
4697 | Bertie | 4697 | Bertie |
4698 | Bertram | 4698 | Bertram |
4699 | Bertrand | 4699 | Bertrand |
4700 | Berwick | 4700 | Berwick |
4701 | beryl | 4701 | beryl |
4702 | beryllium | 4702 | beryllium |
4703 | beseech | 4703 | beseech |
4704 | beseeches | 4704 | beseeches |
4705 | beseeching | 4705 | beseeching |
4706 | beset | 4706 | beset |
4707 | besets | 4707 | besets |
4708 | besetting | 4708 | besetting |
4709 | beside | 4709 | beside |
4710 | besides | 4710 | besides |
4711 | besiege | 4711 | besiege |
4712 | besieged | 4712 | besieged |
4713 | besieger | 4713 | besieger |
4714 | besiegers | 4714 | besiegers |
4715 | besieging | 4715 | besieging |
4716 | besmirch | 4716 | besmirch |
4717 | besmirched | 4717 | besmirched |
4718 | besmirches | 4718 | besmirches |
4719 | besmirching | 4719 | besmirching |
4720 | besotted | 4720 | besotted |
4721 | besotter | 4721 | besotter |
4722 | besotting | 4722 | besotting |
4723 | besought | 4723 | besought |
4724 | bespeak | 4724 | bespeak |
4725 | bespeaks | 4725 | bespeaks |
4726 | bespectacled | 4726 | bespectacled |
4727 | bespoke | 4727 | bespoke |
4728 | Bess | 4728 | Bess |
4729 | Bessel | 4729 | Bessel |
4730 | Bessemer | 4730 | Bessemer |
4731 | Bessemerize | 4731 | Bessemerize |
4732 | Bessemerizes | 4732 | Bessemerizes |
4733 | Bessie | 4733 | Bessie |
4734 | best | 4734 | best |
4735 | bested | 4735 | bested |
4736 | bestial | 4736 | bestial |
4737 | besting | 4737 | besting |
4738 | bestir | 4738 | bestir |
4739 | bestirring | 4739 | bestirring |
4740 | bestow | 4740 | bestow |
4741 | bestowal | 4741 | bestowal |
4742 | bestowed | 4742 | bestowed |
4743 | bests | 4743 | bests |
4744 | bestseller | 4744 | bestseller |
4745 | bestsellers | 4745 | bestsellers |
4746 | bestselling | 4746 | bestselling |
4747 | bet | 4747 | bet |
4748 | beta | 4748 | beta |
4749 | betatron | 4749 | betatron |
4750 | betel | 4750 | betel |
4751 | Betelgeuse | 4751 | Betelgeuse |
4752 | Bethesda | 4752 | Bethesda |
4753 | Bethlehem | 4753 | Bethlehem |
4754 | betide | 4754 | betide |
4755 | betray | 4755 | betray |
4756 | betrayal | 4756 | betrayal |
4757 | betrayed | 4757 | betrayed |
4758 | betrayer | 4758 | betrayer |
4759 | betraying | 4759 | betraying |
4760 | betrays | 4760 | betrays |
4761 | betroth | 4761 | betroth |
4762 | betrothal | 4762 | betrothal |
4763 | betrothed | 4763 | betrothed |
4764 | bets | 4764 | bets |
4765 | Betsey | 4765 | Betsey |
4766 | Betsy | 4766 | Betsy |
4767 | Bette | 4767 | Bette |
4768 | better | 4768 | better |
4769 | bettered | 4769 | bettered |
4770 | bettering | 4770 | bettering |
4771 | betterment | 4771 | betterment |
4772 | betterments | 4772 | betterments |
4773 | betters | 4773 | betters |
4774 | Betties | 4774 | Betties |
4775 | betting | 4775 | betting |
4776 | Betty | 4776 | Betty |
4777 | between | 4777 | between |
4778 | betwixt | 4778 | betwixt |
4779 | bevel | 4779 | bevel |
4780 | beveled | 4780 | beveled |
4781 | beveling | 4781 | beveling |
4782 | bevels | 4782 | bevels |
4783 | beverage | 4783 | beverage |
4784 | beverages | 4784 | beverages |
4785 | Beverly | 4785 | Beverly |
4786 | bevy | 4786 | bevy |
4787 | bewail | 4787 | bewail |
4788 | bewailed | 4788 | bewailed |
4789 | bewailing | 4789 | bewailing |
4790 | bewails | 4790 | bewails |
4791 | beware | 4791 | beware |
4792 | bewhiskered | 4792 | bewhiskered |
4793 | bewilder | 4793 | bewilder |
4794 | bewildered | 4794 | bewildered |
4795 | bewildering | 4795 | bewildering |
4796 | bewilderingly | 4796 | bewilderingly |
4797 | bewilderment | 4797 | bewilderment |
4798 | bewilders | 4798 | bewilders |
4799 | bewitch | 4799 | bewitch |
4800 | bewitched | 4800 | bewitched |
4801 | bewitches | 4801 | bewitches |
4802 | bewitching | 4802 | bewitching |
4803 | beyond | 4803 | beyond |
4804 | Bhagavad-Gita | 4804 | Bhagavad-Gita |
4805 | Bhutan | 4805 | Bhutan |
4806 | Bialystok | 4806 | Bialystok |
4807 | Bianco | 4807 | Bianco |
4808 | biannual | 4808 | biannual |
4809 | bias | 4809 | bias |
4810 | biased | 4810 | biased |
4811 | biases | 4811 | biases |
4812 | biasing | 4812 | biasing |
4813 | bib | 4813 | bib |
4814 | bibbed | 4814 | bibbed |
4815 | bibbing | 4815 | bibbing |
4816 | Bible | 4816 | Bible |
4817 | bibles | 4817 | bibles |
4818 | biblical | 4818 | biblical |
4819 | biblically | 4819 | biblically |
4820 | bibliographic | 4820 | bibliographic |
4821 | bibliographical | 4821 | bibliographical |
4822 | bibliographies | 4822 | bibliographies |
4823 | bibliography | 4823 | bibliography |
4824 | bibliophile | 4824 | bibliophile |
4825 | bibs | 4825 | bibs |
4826 | bicameral | 4826 | bicameral |
4827 | bicarbonate | 4827 | bicarbonate |
4828 | bicentennial | 4828 | bicentennial |
4829 | bicep | 4829 | bicep |
4830 | biceps | 4830 | biceps |
4831 | bicker | 4831 | bicker |
4832 | bickered | 4832 | bickered |
4833 | bickering | 4833 | bickering |
4834 | bickers | 4834 | bickers |
4835 | biconcave | 4835 | biconcave |
4836 | biconnected | 4836 | biconnected |
4837 | biconvex | 4837 | biconvex |
4838 | bicycle | 4838 | bicycle |
4839 | bicycled | 4839 | bicycled |
4840 | bicycler | 4840 | bicycler |
4841 | bicyclers | 4841 | bicyclers |
4842 | bicycles | 4842 | bicycles |
4843 | bicycling | 4843 | bicycling |
4844 | bid | 4844 | bid |
4845 | biddable | 4845 | biddable |
4846 | bidden | 4846 | bidden |
4847 | bidder | 4847 | bidder |
4848 | bidders | 4848 | bidders |
4849 | biddies | 4849 | biddies |
4850 | bidding | 4850 | bidding |
4851 | Biddle | 4851 | Biddle |
4852 | biddy | 4852 | biddy |
4853 | bide | 4853 | bide |
4854 | bidirectional | 4854 | bidirectional |
4855 | bids | 4855 | bids |
4856 | Bien | 4856 | Bien |
4857 | biennial | 4857 | biennial |
4858 | biennium | 4858 | biennium |
4859 | Bienville | 4859 | Bienville |
4860 | bier | 4860 | bier |
4861 | Bierce | 4861 | Bierce |
4862 | bifocal | 4862 | bifocal |
4863 | bifocals | 4863 | bifocals |
4864 | bifurcate | 4864 | bifurcate |
4865 | big | 4865 | big |
4866 | Bigelow | 4866 | Bigelow |
4867 | bigger | 4867 | bigger |
4868 | biggest | 4868 | biggest |
4869 | Biggs | 4869 | Biggs |
4870 | bight | 4870 | bight |
4871 | bights | 4871 | bights |
4872 | bigness | 4872 | bigness |
4873 | bigot | 4873 | bigot |
4874 | bigoted | 4874 | bigoted |
4875 | bigotry | 4875 | bigotry |
4876 | bigots | 4876 | bigots |
4877 | biharmonic | 4877 | biharmonic |
4878 | bijection | 4878 | bijection |
4879 | bijections | 4879 | bijections |
4880 | bijective | 4880 | bijective |
4881 | bijectively | 4881 | bijectively |
4882 | bike | 4882 | bike |
4883 | bikes | 4883 | bikes |
4884 | biking | 4884 | biking |
4885 | bikini | 4885 | bikini |
4886 | bikinis | 4886 | bikinis |
4887 | bilabial | 4887 | bilabial |
4888 | bilateral | 4888 | bilateral |
4889 | bilaterally | 4889 | bilaterally |
4890 | Bilbao | 4890 | Bilbao |
4891 | Bilbo | 4891 | Bilbo |
4892 | bile | 4892 | bile |
4893 | bilge | 4893 | bilge |
4894 | bilges | 4894 | bilges |
4895 | bilinear | 4895 | bilinear |
4896 | bilingual | 4896 | bilingual |
4897 | bilk | 4897 | bilk |
4898 | bilked | 4898 | bilked |
4899 | bilking | 4899 | bilking |
4900 | bilks | 4900 | bilks |
4901 | bill | 4901 | bill |
4902 | billboard | 4902 | billboard |
4903 | billboards | 4903 | billboards |
4904 | billed | 4904 | billed |
4905 | biller | 4905 | biller |
4906 | billers | 4906 | billers |
4907 | billet | 4907 | billet |
4908 | billeted | 4908 | billeted |
4909 | billeting | 4909 | billeting |
4910 | billets | 4910 | billets |
4911 | billiard | 4911 | billiard |
4912 | billiards | 4912 | billiards |
4913 | Billie | 4913 | Billie |
4914 | Billiken | 4914 | Billiken |
4915 | Billikens | 4915 | Billikens |
4916 | billing | 4916 | billing |
4917 | Billings | 4917 | Billings |
4918 | billion | 4918 | billion |
4919 | billions | 4919 | billions |
4920 | billionth | 4920 | billionth |
4921 | billow | 4921 | billow |
4922 | billowed | 4922 | billowed |
4923 | billows | 4923 | billows |
4924 | bills | 4924 | bills |
4925 | Biltmore | 4925 | Biltmore |
4926 | bimetallic | 4926 | bimetallic |
4927 | bimetallism | 4927 | bimetallism |
4928 | Bimini | 4928 | Bimini |
4929 | bimodal | 4929 | bimodal |
4930 | bimolecular | 4930 | bimolecular |
4931 | bimonthlies | 4931 | bimonthlies |
4932 | bimonthly | 4932 | bimonthly |
4933 | bin | 4933 | bin |
4934 | binaries | 4934 | binaries |
4935 | binary | 4935 | binary |
4936 | binaural | 4936 | binaural |
4937 | bind | 4937 | bind |
4938 | binder | 4938 | binder |
4939 | binders | 4939 | binders |
4940 | binding | 4940 | binding |
4941 | bindings | 4941 | bindings |
4942 | binds | 4942 | binds |
4943 | bing | 4943 | bing |
4944 | binge | 4944 | binge |
4945 | binges | 4945 | binges |
4946 | Bingham | 4946 | Bingham |
4947 | Binghamton | 4947 | Binghamton |
4948 | bingo | 4948 | bingo |
4949 | Bini | 4949 | Bini |
4950 | binocular | 4950 | binocular |
4951 | binoculars | 4951 | binoculars |
4952 | binomial | 4952 | binomial |
4953 | bins | 4953 | bins |
4954 | binuclear | 4954 | binuclear |
4955 | biochemical | 4955 | biochemical |
4956 | biochemist | 4956 | biochemist |
4957 | biochemistry | 4957 | biochemistry |
4958 | biofeedback | 4958 | biofeedback |
4959 | biographer | 4959 | biographer |
4960 | biographers | 4960 | biographers |
4961 | biographic | 4961 | biographic |
4962 | biographical | 4962 | biographical |
4963 | biographically | 4963 | biographically |
4964 | biographies | 4964 | biographies |
4965 | biography | 4965 | biography |
4966 | biological | 4966 | biological |
4967 | biologically | 4967 | biologically |
4968 | biologist | 4968 | biologist |
4969 | biologists | 4969 | biologists |
4970 | biology | 4970 | biology |
4971 | biomedical | 4971 | biomedical |
4972 | biomedicine | 4972 | biomedicine |
4973 | biophysical | 4973 | biophysical |
4974 | biophysicist | 4974 | biophysicist |
4975 | biophysics | 4975 | biophysics |
4976 | biopsies | 4976 | biopsies |
4977 | biopsy | 4977 | biopsy |
4978 | bioscience | 4978 | bioscience |
4979 | biosphere | 4979 | biosphere |
4980 | biostatistic | 4980 | biostatistic |
4981 | biosynthesize | 4981 | biosynthesize |
4982 | biota | 4982 | biota |
4983 | biotic | 4983 | biotic |
4984 | bipartisan | 4984 | bipartisan |
4985 | bipartite | 4985 | bipartite |
4986 | biped | 4986 | biped |
4987 | bipeds | 4987 | bipeds |
4988 | biplane | 4988 | biplane |
4989 | biplanes | 4989 | biplanes |
4990 | bipolar | 4990 | bipolar |
4991 | biracial | 4991 | biracial |
4992 | birch | 4992 | birch |
4993 | birchen | 4993 | birchen |
4994 | birches | 4994 | birches |
4995 | bird | 4995 | bird |
4996 | birdbath | 4996 | birdbath |
4997 | birdbaths | 4997 | birdbaths |
4998 | birdie | 4998 | birdie |
4999 | birdied | 4999 | birdied |
5000 | birdies | 5000 | birdies |
5001 | birdlike | 5001 | birdlike |
5002 | birds | 5002 | birds |
5003 | birefringence | 5003 | birefringence |
5004 | birefringent | 5004 | birefringent |
5005 | Birgit | 5005 | Birgit |
5006 | Birmingham | 5006 | Birmingham |
5007 | Birminghamize | 5007 | Birminghamize |
5008 | Birminghamizes | 5008 | Birminghamizes |
5009 | birth | 5009 | birth |
5010 | birthday | 5010 | birthday |
5011 | birthdays | 5011 | birthdays |
5012 | birthed | 5012 | birthed |
5013 | birthplace | 5013 | birthplace |
5014 | birthplaces | 5014 | birthplaces |
5015 | birthright | 5015 | birthright |
5016 | birthrights | 5016 | birthrights |
5017 | births | 5017 | births |
5018 | Biscayne | 5018 | Biscayne |
5019 | biscuit | 5019 | biscuit |
5020 | biscuits | 5020 | biscuits |
5021 | bisect | 5021 | bisect |
5022 | bisected | 5022 | bisected |
5023 | bisecting | 5023 | bisecting |
5024 | bisection | 5024 | bisection |
5025 | bisections | 5025 | bisections |
5026 | bisector | 5026 | bisector |
5027 | bisectors | 5027 | bisectors |
5028 | bisects | 5028 | bisects |
5029 | bishop | 5029 | bishop |
5030 | bishops | 5030 | bishops |
5031 | Bismarck | 5031 | Bismarck |
5032 | Bismark | 5032 | Bismark |
5033 | bismuth | 5033 | bismuth |
5034 | bison | 5034 | bison |
5035 | bisons | 5035 | bisons |
5036 | bisque | 5036 | bisque |
5037 | bisques | 5037 | bisques |
5038 | Bissau | 5038 | Bissau |
5039 | bistable | 5039 | bistable |
5040 | bistate | 5040 | bistate |
5041 | bit | 5041 | bit |
5042 | bitch | 5042 | bitch |
5043 | bitches | 5043 | bitches |
5044 | bite | 5044 | bite |
5045 | biter | 5045 | biter |
5046 | biters | 5046 | biters |
5047 | bites | 5047 | bites |
5048 | biting | 5048 | biting |
5049 | bitingly | 5049 | bitingly |
5050 | bitmap | 5050 | bitmap |
5051 | BITNET | 5051 | BITNET |
5052 | bits | 5052 | bits |
5053 | bitten | 5053 | bitten |
5054 | bitter | 5054 | bitter |
5055 | bitterer | 5055 | bitterer |
5056 | bitterest | 5056 | bitterest |
5057 | bitterly | 5057 | bitterly |
5058 | bitterness | 5058 | bitterness |
5059 | bitternut | 5059 | bitternut |
5060 | bitterroot | 5060 | bitterroot |
5061 | bitters | 5061 | bitters |
5062 | bittersweet | 5062 | bittersweet |
5063 | bitumen | 5063 | bitumen |
5064 | bituminous | 5064 | bituminous |
5065 | bitwise | 5065 | bitwise |
5066 | bivalve | 5066 | bivalve |
5067 | bivalves | 5067 | bivalves |
5068 | bivariate | 5068 | bivariate |
5069 | bivouac | 5069 | bivouac |
5070 | bivouacs | 5070 | bivouacs |
5071 | biweekly | 5071 | biweekly |
5072 | bizarre | 5072 | bizarre |
5073 | Bizet | 5073 | Bizet |
5074 | blab | 5074 | blab |
5075 | blabbed | 5075 | blabbed |
5076 | blabbermouth | 5076 | blabbermouth |
5077 | blabbermouths | 5077 | blabbermouths |
5078 | blabbing | 5078 | blabbing |
5079 | blabs | 5079 | blabs |
5080 | black | 5080 | black |
5081 | blackberries | 5081 | blackberries |
5082 | blackberry | 5082 | blackberry |
5083 | blackbird | 5083 | blackbird |
5084 | blackbirds | 5084 | blackbirds |
5085 | blackboard | 5085 | blackboard |
5086 | blackboards | 5086 | blackboards |
5087 | Blackburn | 5087 | Blackburn |
5088 | blacked | 5088 | blacked |
5089 | blacken | 5089 | blacken |
5090 | blackened | 5090 | blackened |
5091 | blackening | 5091 | blackening |
5092 | blackens | 5092 | blackens |
5093 | blacker | 5093 | blacker |
5094 | blackest | 5094 | blackest |
5095 | Blackfeet | 5095 | Blackfeet |
5096 | Blackfoot | 5096 | Blackfoot |
5097 | Blackfoots | 5097 | Blackfoots |
5098 | blacking | 5098 | blacking |
5099 | blackjack | 5099 | blackjack |
5100 | blackjacks | 5100 | blackjacks |
5101 | blacklist | 5101 | blacklist |
5102 | blacklisted | 5102 | blacklisted |
5103 | blacklisting | 5103 | blacklisting |
5104 | blacklists | 5104 | blacklists |
5105 | blackly | 5105 | blackly |
5106 | blackmail | 5106 | blackmail |
5107 | blackmailed | 5107 | blackmailed |
5108 | blackmailer | 5108 | blackmailer |
5109 | blackmailers | 5109 | blackmailers |
5110 | blackmailing | 5110 | blackmailing |
5111 | blackmails | 5111 | blackmails |
5112 | Blackman | 5112 | Blackman |
5113 | Blackmer | 5113 | Blackmer |
5114 | blackness | 5114 | blackness |
5115 | blackout | 5115 | blackout |
5116 | blackouts | 5116 | blackouts |
5117 | blacks | 5117 | blacks |
5118 | blacksmith | 5118 | blacksmith |
5119 | blacksmiths | 5119 | blacksmiths |
5120 | Blackstone | 5120 | Blackstone |
5121 | Blackwell | 5121 | Blackwell |
5122 | Blackwells | 5122 | Blackwells |
5123 | bladder | 5123 | bladder |
5124 | bladders | 5124 | bladders |
5125 | blade | 5125 | blade |
5126 | blades | 5126 | blades |
5127 | Blaine | 5127 | Blaine |
5128 | Blair | 5128 | Blair |
5129 | Blake | 5129 | Blake |
5130 | Blakey | 5130 | Blakey |
5131 | blamable | 5131 | blamable |
5132 | blame | 5132 | blame |
5133 | blamed | 5133 | blamed |
5134 | blameless | 5134 | blameless |
5135 | blamelessness | 5135 | blamelessness |
5136 | blamer | 5136 | blamer |
5137 | blamers | 5137 | blamers |
5138 | blames | 5138 | blames |
5139 | blameworthy | 5139 | blameworthy |
5140 | blaming | 5140 | blaming |
5141 | blanch | 5141 | blanch |
5142 | Blanchard | 5142 | Blanchard |
5143 | Blanche | 5143 | Blanche |
5144 | blanched | 5144 | blanched |
5145 | blanches | 5145 | blanches |
5146 | blanching | 5146 | blanching |
5147 | bland | 5147 | bland |
5148 | blandly | 5148 | blandly |
5149 | blandness | 5149 | blandness |
5150 | blank | 5150 | blank |
5151 | blanked | 5151 | blanked |
5152 | blanker | 5152 | blanker |
5153 | blankest | 5153 | blankest |
5154 | blanket | 5154 | blanket |
5155 | blanketed | 5155 | blanketed |
5156 | blanketer | 5156 | blanketer |
5157 | blanketers | 5157 | blanketers |
5158 | blanketing | 5158 | blanketing |
5159 | blankets | 5159 | blankets |
5160 | blanking | 5160 | blanking |
5161 | blankly | 5161 | blankly |
5162 | blankness | 5162 | blankness |
5163 | blanks | 5163 | blanks |
5164 | Blanton | 5164 | Blanton |
5165 | blare | 5165 | blare |
5166 | blared | 5166 | blared |
5167 | blares | 5167 | blares |
5168 | blaring | 5168 | blaring |
5169 | blase | 5169 | blase |
5170 | blaspheme | 5170 | blaspheme |
5171 | blasphemed | 5171 | blasphemed |
5172 | blasphemes | 5172 | blasphemes |
5173 | blasphemies | 5173 | blasphemies |
5174 | blaspheming | 5174 | blaspheming |
5175 | blasphemous | 5175 | blasphemous |
5176 | blasphemously | 5176 | blasphemously |
5177 | blasphemousness | 5177 | blasphemousness |
5178 | blasphemy | 5178 | blasphemy |
5179 | blast | 5179 | blast |
5180 | blasted | 5180 | blasted |
5181 | blaster | 5181 | blaster |
5182 | blasters | 5182 | blasters |
5183 | blasting | 5183 | blasting |
5184 | blasts | 5184 | blasts |
5185 | blatant | 5185 | blatant |
5186 | blatantly | 5186 | blatantly |
5187 | Blatz | 5187 | Blatz |
5188 | blaze | 5188 | blaze |
5189 | blazed | 5189 | blazed |
5190 | blazer | 5190 | blazer |
5191 | blazers | 5191 | blazers |
5192 | blazes | 5192 | blazes |
5193 | blazing | 5193 | blazing |
5194 | bleach | 5194 | bleach |
5195 | bleached | 5195 | bleached |
5196 | bleacher | 5196 | bleacher |
5197 | bleachers | 5197 | bleachers |
5198 | bleaches | 5198 | bleaches |
5199 | bleaching | 5199 | bleaching |
5200 | bleak | 5200 | bleak |
5201 | bleaker | 5201 | bleaker |
5202 | bleakly | 5202 | bleakly |
5203 | bleakness | 5203 | bleakness |
5204 | blear | 5204 | blear |
5205 | bleary | 5205 | bleary |
5206 | bleat | 5206 | bleat |
5207 | bleating | 5207 | bleating |
5208 | bleats | 5208 | bleats |
5209 | bled | 5209 | bled |
5210 | bleed | 5210 | bleed |
5211 | bleeder | 5211 | bleeder |
5212 | bleeding | 5212 | bleeding |
5213 | bleedings | 5213 | bleedings |
5214 | bleeds | 5214 | bleeds |
5215 | Bleeker | 5215 | Bleeker |
5216 | blemish | 5216 | blemish |
5217 | blemishes | 5217 | blemishes |
5218 | blend | 5218 | blend |
5219 | blended | 5219 | blended |
5220 | blender | 5220 | blender |
5221 | blending | 5221 | blending |
5222 | blends | 5222 | blends |
5223 | Blenheim | 5223 | Blenheim |
5224 | bless | 5224 | bless |
5225 | blessed | 5225 | blessed |
5226 | blessing | 5226 | blessing |
5227 | blessings | 5227 | blessings |
5228 | blew | 5228 | blew |
5229 | blight | 5229 | blight |
5230 | blighted | 5230 | blighted |
5231 | blimp | 5231 | blimp |
5232 | blimps | 5232 | blimps |
5233 | blind | 5233 | blind |
5234 | blinded | 5234 | blinded |
5235 | blinder | 5235 | blinder |
5236 | blinders | 5236 | blinders |
5237 | blindfold | 5237 | blindfold |
5238 | blindfolded | 5238 | blindfolded |
5239 | blindfolding | 5239 | blindfolding |
5240 | blindfolds | 5240 | blindfolds |
5241 | blinding | 5241 | blinding |
5242 | blindingly | 5242 | blindingly |
5243 | blindly | 5243 | blindly |
5244 | blindness | 5244 | blindness |
5245 | blinds | 5245 | blinds |
5246 | blink | 5246 | blink |
5247 | blinked | 5247 | blinked |
5248 | blinker | 5248 | blinker |
5249 | blinkers | 5249 | blinkers |
5250 | blinking | 5250 | blinking |
5251 | blinks | 5251 | blinks |
5252 | Blinn | 5252 | Blinn |
5253 | blip | 5253 | blip |
5254 | blips | 5254 | blips |
5255 | bliss | 5255 | bliss |
5256 | blissful | 5256 | blissful |
5257 | blissfully | 5257 | blissfully |
5258 | blister | 5258 | blister |
5259 | blistered | 5259 | blistered |
5260 | blistering | 5260 | blistering |
5261 | blisters | 5261 | blisters |
5262 | blithe | 5262 | blithe |
5263 | blithely | 5263 | blithely |
5264 | blitz | 5264 | blitz |
5265 | blitzes | 5265 | blitzes |
5266 | blitzkrieg | 5266 | blitzkrieg |
5267 | blizzard | 5267 | blizzard |
5268 | blizzards | 5268 | blizzards |
5269 | bloat | 5269 | bloat |
5270 | bloated | 5270 | bloated |
5271 | bloater | 5271 | bloater |
5272 | bloating | 5272 | bloating |
5273 | bloats | 5273 | bloats |
5274 | blob | 5274 | blob |
5275 | blobs | 5275 | blobs |
5276 | bloc | 5276 | bloc |
5277 | Bloch | 5277 | Bloch |
5278 | block | 5278 | block |
5279 | blockade | 5279 | blockade |
5280 | blockaded | 5280 | blockaded |
5281 | blockades | 5281 | blockades |
5282 | blockading | 5282 | blockading |
5283 | blockage | 5283 | blockage |
5284 | blockages | 5284 | blockages |
5285 | blocked | 5285 | blocked |
5286 | blocker | 5286 | blocker |
5287 | blockers | 5287 | blockers |
5288 | blockhouse | 5288 | blockhouse |
5289 | blockhouses | 5289 | blockhouses |
5290 | blocking | 5290 | blocking |
5291 | blocks | 5291 | blocks |
5292 | blocs | 5292 | blocs |
5293 | bloke | 5293 | bloke |
5294 | blokes | 5294 | blokes |
5295 | Blomberg | 5295 | Blomberg |
5296 | Blomquist | 5296 | Blomquist |
5297 | blond | 5297 | blond |
5298 | blonde | 5298 | blonde |
5299 | blondes | 5299 | blondes |
5300 | blonds | 5300 | blonds |
5301 | blood | 5301 | blood |
5302 | bloodbath | 5302 | bloodbath |
5303 | blooded | 5303 | blooded |
5304 | bloodhound | 5304 | bloodhound |
5305 | bloodhounds | 5305 | bloodhounds |
5306 | bloodied | 5306 | bloodied |
5307 | bloodiest | 5307 | bloodiest |
5308 | bloodless | 5308 | bloodless |
5309 | bloods | 5309 | bloods |
5310 | bloodshed | 5310 | bloodshed |
5311 | bloodshot | 5311 | bloodshot |
5312 | bloodstain | 5312 | bloodstain |
diff --git a/help/opie-sh/node3.html b/help/opie-sh/node3.html index 8d16696..f3f1e73 100644 --- a/help/opie-sh/node3.html +++ b/help/opie-sh/node3.html | |||
@@ -1,71 +1,71 @@ | |||
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
2 | 2 | ||
3 | <!--Converted with LaTeX2HTML 2002-1 (1.68) | 3 | <!--Converted with LaTeX2HTML 2002-1 (1.68) |
4 | original version by: Nikos Drakos, CBLU, University of Leeds | 4 | original version by: Nikos Drakos, CBLU, University of Leeds |
5 | * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan | 5 | * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan |
6 | * with significant contributions from: | 6 | * with significant contributions from: |
7 | Jens Lippmann, Marek Rouchal, Martin Wilck and others --> | 7 | Jens Lippmann, Marek Rouchal, Martin Wilck and others --> |
8 | <HTML> | 8 | <HTML> |
9 | <HEAD> | 9 | <HEAD> |
10 | <TITLE>What it is for</TITLE> | 10 | <TITLE>What it is for</TITLE> |
11 | <META NAME="description" CONTENT="What it is for"> | 11 | <META NAME="description" CONTENT="What it is for"> |
12 | <META NAME="keywords" CONTENT="opie-sh-howto"> | 12 | <META NAME="keywords" CONTENT="opie-sh-howto"> |
13 | <META NAME="resource-type" CONTENT="document"> | 13 | <META NAME="resource-type" CONTENT="document"> |
14 | <META NAME="distribution" CONTENT="global"> | 14 | <META NAME="distribution" CONTENT="global"> |
15 | 15 | ||
16 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> | 16 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
17 | <META NAME="Generator" CONTENT="LaTeX2HTML v2002-1"> | 17 | <META NAME="Generator" CONTENT="LaTeX2HTML v2002-1"> |
18 | <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> | 18 | <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> |
19 | 19 | ||
20 | <LINK REL="STYLESHEET" HREF="opie-sh-howto.css"> | 20 | <LINK REL="STYLESHEET" HREF="opie-sh-howto.css"> |
21 | 21 | ||
22 | <LINK REL="next" HREF="node4.html"> | 22 | <LINK REL="next" HREF="node4.html"> |
23 | <LINK REL="previous" HREF="node2.html"> | 23 | <LINK REL="previous" HREF="node2.html"> |
24 | <LINK REL="up" HREF="node2.html"> | 24 | <LINK REL="up" HREF="node2.html"> |
25 | <LINK REL="next" HREF="node4.html"> | 25 | <LINK REL="next" HREF="node4.html"> |
26 | </HEAD> | 26 | </HEAD> |
27 | 27 | ||
28 | <BODY > | 28 | <BODY > |
29 | <!--Navigation Panel--> | 29 | <!--Navigation Panel--> |
30 | <A NAME="tex2html71" | 30 | <A NAME="tex2html71" |
31 | HREF="node4.html"> | 31 | HREF="node4.html"> |
32 | <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" | 32 | <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" |
33 | SRC="file:/usr/local/share/lib/latex2html/icons/next.gif"></A> | 33 | SRC="file:/usr/local/share/lib/latex2html/icons/next.gif"></A> |
34 | <A NAME="tex2html67" | 34 | <A NAME="tex2html67" |
35 | HREF="node2.html"> | 35 | HREF="node2.html"> |
36 | <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" | 36 | <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" |
37 | SRC="file:/usr/local/share/lib/latex2html/icons/up.gif"></A> | 37 | SRC="file:/usr/local/share/lib/latex2html/icons/up.gif"></A> |
38 | <A NAME="tex2html61" | 38 | <A NAME="tex2html61" |
39 | HREF="node2.html"> | 39 | HREF="node2.html"> |
40 | <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" | 40 | <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" |
41 | SRC="file:/usr/local/share/lib/latex2html/icons/prev.gif"></A> | 41 | SRC="file:/usr/local/share/lib/latex2html/icons/prev.gif"></A> |
42 | <A NAME="tex2html69" | 42 | <A NAME="tex2html69" |
43 | HREF="node1.html"> | 43 | HREF="node1.html"> |
44 | <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" | 44 | <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" |
45 | SRC="file:/usr/local/share/lib/latex2html/icons/contents.gif"></A> | 45 | SRC="file:/usr/local/share/lib/latex2html/icons/contents.gif"></A> |
46 | <BR> | 46 | <BR> |
47 | <B> Next:</B> <A NAME="tex2html72" | 47 | <B> Next:</B> <A NAME="tex2html72" |
48 | HREF="node4.html">What it can do</A> | 48 | HREF="node4.html">What it can do</A> |
49 | <B> Up:</B> <A NAME="tex2html68" | 49 | <B> Up:</B> <A NAME="tex2html68" |
50 | HREF="node2.html">Introduction</A> | 50 | HREF="node2.html">Introduction</A> |
51 | <B> Previous:</B> <A NAME="tex2html62" | 51 | <B> Previous:</B> <A NAME="tex2html62" |
52 | HREF="node2.html">Introduction</A> | 52 | HREF="node2.html">Introduction</A> |
53 |   <B> <A NAME="tex2html70" | 53 |   <B> <A NAME="tex2html70" |
54 | HREF="node1.html">Contents</A></B> | 54 | HREF="node1.html">Contents</A></B> |
55 | <BR> | 55 | <BR> |
56 | <BR> | 56 | <BR> |
57 | <!--End of Navigation Panel--> | 57 | <!--End of Navigation Panel--> |
58 | 58 | ||
59 | <H2><A NAME="SECTION00021000000000000000"> | 59 | <H2><A NAME="SECTION00021000000000000000"> |
60 | What it is for</A> | 60 | What it is for</A> |
61 | </H2> | 61 | </H2> |
62 | Opie-sh is designed to be a frontend to Opie that can be used from the console. This is especially usefull for creating interactive shell scripts, as it will use the Opie interface (which is presumably familiar to the user) instead of a text based interface (which can be confusing). It can also be convinient for prototyping an app that you want to write for Opie without actually bothering to break out the cross compiler. Opie-sh does not use an Opie specific libs, so you can just as easily use it with Qtopia. | 62 | Opie-sh is designed to be a frontend to Opie that can be used from the console. This is especially useful for creating interactive shell scripts, as it will use the Opie interface (which is presumably familiar to the user) instead of a text based interface (which can be confusing). It can also be convinient for prototyping an app that you want to write for Opie without actually bothering to break out the cross compiler. Opie-sh does not use an Opie specific libs, so you can just as easily use it with Qtopia. |
63 | 63 | ||
64 | <P> | 64 | <P> |
65 | <BR><HR> | 65 | <BR><HR> |
66 | <ADDRESS> | 66 | <ADDRESS> |
67 | 67 | ||
68 | 2002-05-15 | 68 | 2002-05-15 |
69 | </ADDRESS> | 69 | </ADDRESS> |
70 | </BODY> | 70 | </BODY> |
71 | </HTML> | 71 | </HTML> |
diff --git a/help/opie-sh/node9.html b/help/opie-sh/node9.html index b047cf9..e4358ad 100644 --- a/help/opie-sh/node9.html +++ b/help/opie-sh/node9.html | |||
@@ -1,121 +1,121 @@ | |||
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
2 | 2 | ||
3 | <!--Converted with LaTeX2HTML 2002-1 (1.68) | 3 | <!--Converted with LaTeX2HTML 2002-1 (1.68) |
4 | original version by: Nikos Drakos, CBLU, University of Leeds | 4 | original version by: Nikos Drakos, CBLU, University of Leeds |
5 | * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan | 5 | * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan |
6 | * with significant contributions from: | 6 | * with significant contributions from: |
7 | Jens Lippmann, Marek Rouchal, Martin Wilck and others --> | 7 | Jens Lippmann, Marek Rouchal, Martin Wilck and others --> |
8 | <HTML> | 8 | <HTML> |
9 | <HEAD> | 9 | <HEAD> |
10 | <TITLE>Icons</TITLE> | 10 | <TITLE>Icons</TITLE> |
11 | <META NAME="description" CONTENT="Icons"> | 11 | <META NAME="description" CONTENT="Icons"> |
12 | <META NAME="keywords" CONTENT="opie-sh-howto"> | 12 | <META NAME="keywords" CONTENT="opie-sh-howto"> |
13 | <META NAME="resource-type" CONTENT="document"> | 13 | <META NAME="resource-type" CONTENT="document"> |
14 | <META NAME="distribution" CONTENT="global"> | 14 | <META NAME="distribution" CONTENT="global"> |
15 | 15 | ||
16 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> | 16 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
17 | <META NAME="Generator" CONTENT="LaTeX2HTML v2002-1"> | 17 | <META NAME="Generator" CONTENT="LaTeX2HTML v2002-1"> |
18 | <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> | 18 | <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> |
19 | 19 | ||
20 | <LINK REL="STYLESHEET" HREF="opie-sh-howto.css"> | 20 | <LINK REL="STYLESHEET" HREF="opie-sh-howto.css"> |
21 | 21 | ||
22 | <LINK REL="previous" HREF="node8.html"> | 22 | <LINK REL="previous" HREF="node8.html"> |
23 | <LINK REL="up" HREF="node6.html"> | 23 | <LINK REL="up" HREF="node6.html"> |
24 | <LINK REL="next" HREF="node10.html"> | 24 | <LINK REL="next" HREF="node10.html"> |
25 | </HEAD> | 25 | </HEAD> |
26 | 26 | ||
27 | <BODY > | 27 | <BODY > |
28 | <!--Navigation Panel--> | 28 | <!--Navigation Panel--> |
29 | <A NAME="tex2html144" | 29 | <A NAME="tex2html144" |
30 | HREF="node10.html"> | 30 | HREF="node10.html"> |
31 | <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" | 31 | <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" |
32 | SRC="file:/usr/local/share/lib/latex2html/icons/next.gif"></A> | 32 | SRC="file:/usr/local/share/lib/latex2html/icons/next.gif"></A> |
33 | <A NAME="tex2html140" | 33 | <A NAME="tex2html140" |
34 | HREF="node6.html"> | 34 | HREF="node6.html"> |
35 | <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" | 35 | <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" |
36 | SRC="file:/usr/local/share/lib/latex2html/icons/up.gif"></A> | 36 | SRC="file:/usr/local/share/lib/latex2html/icons/up.gif"></A> |
37 | <A NAME="tex2html136" | 37 | <A NAME="tex2html136" |
38 | HREF="node8.html"> | 38 | HREF="node8.html"> |
39 | <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" | 39 | <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" |
40 | SRC="file:/usr/local/share/lib/latex2html/icons/prev.gif"></A> | 40 | SRC="file:/usr/local/share/lib/latex2html/icons/prev.gif"></A> |
41 | <A NAME="tex2html142" | 41 | <A NAME="tex2html142" |
42 | HREF="node1.html"> | 42 | HREF="node1.html"> |
43 | <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" | 43 | <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" |
44 | SRC="file:/usr/local/share/lib/latex2html/icons/contents.gif"></A> | 44 | SRC="file:/usr/local/share/lib/latex2html/icons/contents.gif"></A> |
45 | <BR> | 45 | <BR> |
46 | <B> Next:</B> <A NAME="tex2html145" | 46 | <B> Next:</B> <A NAME="tex2html145" |
47 | HREF="node10.html">Fileviewer</A> | 47 | HREF="node10.html">Fileviewer</A> |
48 | <B> Up:</B> <A NAME="tex2html141" | 48 | <B> Up:</B> <A NAME="tex2html141" |
49 | HREF="node6.html">Usage</A> | 49 | HREF="node6.html">Usage</A> |
50 | <B> Previous:</B> <A NAME="tex2html137" | 50 | <B> Previous:</B> <A NAME="tex2html137" |
51 | HREF="node8.html">Buttons</A> | 51 | HREF="node8.html">Buttons</A> |
52 |   <B> <A NAME="tex2html143" | 52 |   <B> <A NAME="tex2html143" |
53 | HREF="node1.html">Contents</A></B> | 53 | HREF="node1.html">Contents</A></B> |
54 | <BR> | 54 | <BR> |
55 | <BR> | 55 | <BR> |
56 | <!--End of Navigation Panel--> | 56 | <!--End of Navigation Panel--> |
57 | 57 | ||
58 | <H3><A NAME="SECTION00031300000000000000"> | 58 | <H3><A NAME="SECTION00031300000000000000"> |
59 | Icons</A> | 59 | Icons</A> |
60 | </H3> | 60 | </H3> |
61 | There are three icons that you can display with a message box: information, warning, and error. These are designed to help inform the user what type of message you are giving them. | 61 | There are three icons that you can display with a message box: information, warning, and error. These are designed to help inform the user what type of message you are giving them. |
62 | 62 | ||
63 | <P> | 63 | <P> |
64 | An information icon is specified with the ``-I'' flag, and should be used for outputing non-critical information to the user, or asking them a simple question. It is also the default icon, and will be used if you do not specify another one. Example: | 64 | An information icon is specified with the ``-I'' flag, and should be used for outputing non-critical information to the user, or asking them a simple question. It is also the default icon, and will be used if you do not specify another one. Example: |
65 | 65 | ||
66 | <P> | 66 | <P> |
67 | <PRE> | 67 | <PRE> |
68 | opie-sh -m -I | 68 | opie-sh -m -I |
69 | </PRE> | 69 | </PRE> |
70 | 70 | ||
71 | <P> | 71 | <P> |
72 | A warning icon is specified with the ``-w'' flag, and should be used for problems that the user should know about, but that will not necessarily cause the program to stop working. For example, if the program cannot find a configureation file, you might pop up a warning, notifying the user that the default configuration will be used. This is also usefull for asking the user if they want to continue doing something that might damage the system (editing rc scripts, for instance). Example: | 72 | A warning icon is specified with the ``-w'' flag, and should be used for problems that the user should know about, but that will not necessarily cause the program to stop working. For example, if the program cannot find a configureation file, you might pop up a warning, notifying the user that the default configuration will be used. This is also useful for asking the user if they want to continue doing something that might damage the system (editing rc scripts, for instance). Example: |
73 | 73 | ||
74 | <P> | 74 | <P> |
75 | <PRE> | 75 | <PRE> |
76 | opie-sh -m -w | 76 | opie-sh -m -w |
77 | </PRE> | 77 | </PRE> |
78 | 78 | ||
79 | <P> | 79 | <P> |
80 | An error icon is specified with the ``-e'' flag, and should be used for problems that will cause the program to stop running, or otherwise do the wrong thing. It should be used sparingly, as it signifies that something is seriously wrong. Example: | 80 | An error icon is specified with the ``-e'' flag, and should be used for problems that will cause the program to stop running, or otherwise do the wrong thing. It should be used sparingly, as it signifies that something is seriously wrong. Example: |
81 | 81 | ||
82 | <P> | 82 | <P> |
83 | <PRE> | 83 | <PRE> |
84 | opie-sh -m -e | 84 | opie-sh -m -e |
85 | </PRE> | 85 | </PRE> |
86 | 86 | ||
87 | <P> | 87 | <P> |
88 | <HR> | 88 | <HR> |
89 | <!--Navigation Panel--> | 89 | <!--Navigation Panel--> |
90 | <A NAME="tex2html144" | 90 | <A NAME="tex2html144" |
91 | HREF="node10.html"> | 91 | HREF="node10.html"> |
92 | <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" | 92 | <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" |
93 | SRC="file:/usr/local/share/lib/latex2html/icons/next.gif"></A> | 93 | SRC="file:/usr/local/share/lib/latex2html/icons/next.gif"></A> |
94 | <A NAME="tex2html140" | 94 | <A NAME="tex2html140" |
95 | HREF="node6.html"> | 95 | HREF="node6.html"> |
96 | <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" | 96 | <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" |
97 | SRC="file:/usr/local/share/lib/latex2html/icons/up.gif"></A> | 97 | SRC="file:/usr/local/share/lib/latex2html/icons/up.gif"></A> |
98 | <A NAME="tex2html136" | 98 | <A NAME="tex2html136" |
99 | HREF="node8.html"> | 99 | HREF="node8.html"> |
100 | <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" | 100 | <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" |
101 | SRC="file:/usr/local/share/lib/latex2html/icons/prev.gif"></A> | 101 | SRC="file:/usr/local/share/lib/latex2html/icons/prev.gif"></A> |
102 | <A NAME="tex2html142" | 102 | <A NAME="tex2html142" |
103 | HREF="node1.html"> | 103 | HREF="node1.html"> |
104 | <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" | 104 | <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" |
105 | SRC="file:/usr/local/share/lib/latex2html/icons/contents.gif"></A> | 105 | SRC="file:/usr/local/share/lib/latex2html/icons/contents.gif"></A> |
106 | <BR> | 106 | <BR> |
107 | <B> Next:</B> <A NAME="tex2html145" | 107 | <B> Next:</B> <A NAME="tex2html145" |
108 | HREF="node10.html">Fileviewer</A> | 108 | HREF="node10.html">Fileviewer</A> |
109 | <B> Up:</B> <A NAME="tex2html141" | 109 | <B> Up:</B> <A NAME="tex2html141" |
110 | HREF="node6.html">Usage</A> | 110 | HREF="node6.html">Usage</A> |
111 | <B> Previous:</B> <A NAME="tex2html137" | 111 | <B> Previous:</B> <A NAME="tex2html137" |
112 | HREF="node8.html">Buttons</A> | 112 | HREF="node8.html">Buttons</A> |
113 |   <B> <A NAME="tex2html143" | 113 |   <B> <A NAME="tex2html143" |
114 | HREF="node1.html">Contents</A></B> | 114 | HREF="node1.html">Contents</A></B> |
115 | <!--End of Navigation Panel--> | 115 | <!--End of Navigation Panel--> |
116 | <ADDRESS> | 116 | <ADDRESS> |
117 | 117 | ||
118 | 2002-05-15 | 118 | 2002-05-15 |
119 | </ADDRESS> | 119 | </ADDRESS> |
120 | </BODY> | 120 | </BODY> |
121 | </HTML> | 121 | </HTML> |
diff --git a/noncore/apps/odict/eng_ita.dic b/noncore/apps/odict/eng_ita.dic index f338faa..6db2389 100644 --- a/noncore/apps/odict/eng_ita.dic +++ b/noncore/apps/odict/eng_ita.dic | |||
@@ -9835,1537 +9835,1536 @@ ruination\distruzione | |||
9835 | ruined\distrussi | 9835 | ruined\distrussi |
9836 | rule\prescrizione, norma, dominio, regnare, criterio | 9836 | rule\prescrizione, norma, dominio, regnare, criterio |
9837 | ruler\regolo, regolatore, sovrano | 9837 | ruler\regolo, regolatore, sovrano |
9838 | rules\regolare, dominato | 9838 | rules\regolare, dominato |
9839 | rumble\rumoreggiare | 9839 | rumble\rumoreggiare |
9840 | ruminative\pensieroso | 9840 | ruminative\pensieroso |
9841 | rumor\vociferare | 9841 | rumor\vociferare |
9842 | rumour\fama | 9842 | rumour\fama |
9843 | rump\torso | 9843 | rump\torso |
9844 | rumpus\sommossa | 9844 | rumpus\sommossa |
9845 | run\esercitare, circolare, affiuenza, fuga, correre | 9845 | run\esercitare, circolare, affiuenza, fuga, correre |
9846 | run away\scappare | 9846 | run away\scappare |
9847 | run over\travolto | 9847 | run over\travolto |
9848 | runaround\schivare | 9848 | runaround\schivare |
9849 | rundown\decorrere, spiegazione | 9849 | rundown\decorrere, spiegazione |
9850 | rung\suonato, gradino | 9850 | rung\suonato, gradino |
9851 | runner\corridore | 9851 | runner\corridore |
9852 | running\decollare, corro, corre | 9852 | running\decollare, corro, corre |
9853 | running start\abbrivo | 9853 | running start\abbrivo |
9854 | runt\nano | 9854 | runt\nano |
9855 | runts\nani | 9855 | runts\nani |
9856 | runty\minuscolo | 9856 | runty\minuscolo |
9857 | rupee\rupia | 9857 | rupee\rupia |
9858 | rupture\frantumare, frattura | 9858 | rupture\frantumare, frattura |
9859 | rupturing\lacerante | 9859 | rupturing\lacerante |
9860 | rural\villereccio | 9860 | rural\villereccio |
9861 | ruse\pizzicotto | 9861 | ruse\pizzicotto |
9862 | rush\affiuenza, furia, spingere, smaniare, pigiare | 9862 | rush\affiuenza, furia, spingere, smaniare, pigiare |
9863 | rush mat\stuoia | 9863 | rush mat\stuoia |
9864 | rush order\commissione urgente | 9864 | rush order\commissione urgente |
9865 | rusk\biscotto | 9865 | rusk\biscotto |
9866 | Russia\Russia | 9866 | Russia\Russia |
9867 | Russian\Russo | 9867 | Russian\Russo |
9868 | rust\arrugginire, griglia | 9868 | rust\arrugginire, griglia |
9869 | rusted\arrugginito, arrugginito | 9869 | rusted\arrugginito, arrugginito |
9870 | rustic\rurale, semplice, villereccio | 9870 | rustic\rurale, semplice, villereccio |
9871 | rustily\rugginoso | 9871 | rustily\rugginoso |
9872 | rusting\arrugginire | 9872 | rusting\arrugginire |
9873 | rustle\crepitìo, rubare | 9873 | rustle\crepitìo, rubare |
9874 | rustled\acciaio | 9874 | rustled\acciaio |
9875 | rustles\ruba | 9875 | rustles\ruba |
9876 | rustless\inossidabile | 9876 | rustless\inossidabile |
9877 | rustproof\inossidabile | 9877 | rustproof\inossidabile |
9878 | rusts\arrugginito | 9878 | rusts\arrugginito |
9879 | rusty\rugginoso | 9879 | rusty\rugginoso |
9880 | rutabaga\navone | 9880 | rutabaga\navone |
9881 | ruth\compassione | 9881 | ruth\compassione |
9882 | rye\segale | 9882 | rye\segale |
9883 | sabdwich\pane imburrato | 9883 | sabdwich\pane imburrato |
9884 | sable\zibellino | 9884 | sable\zibellino |
9885 | sables\zibellino | 9885 | sables\zibellino |
9886 | sabot\zoccolo | 9886 | sabot\zoccolo |
9887 | sabotage\sabotaggio, sabotare | 9887 | sabotage\sabotaggio, sabotare |
9888 | sabre\sciabola | 9888 | sabre\sciabola |
9889 | sac\sacchetto | 9889 | sac\sacchetto |
9890 | saccharated\zuccherino | 9890 | saccharated\zuccherino |
9891 | sack\licenziare, buttare fuori, sacco | 9891 | sack\licenziare, buttare fuori, sacco |
9892 | sackful\sacco | 9892 | sackful\sacco |
9893 | sackfuls\sacco, sacchi | 9893 | sackfuls\sacco, sacchi |
9894 | sacred\santo | 9894 | sacred\santo |
9895 | sacredly\santa | 9895 | sacredly\santa |
9896 | sacredness\santità | 9896 | sacredness\santità |
9897 | sacrifice\sacrificio, sacrificare | 9897 | sacrifice\sacrificio, sacrificare |
9898 | sacrilege\sacrilegio | 9898 | sacrilege\sacrilegio |
9899 | sacrileges\sacrilegio | 9899 | sacrileges\sacrilegio |
9900 | sacrilegious\scellerato | 9900 | sacrilegious\scellerato |
9901 | sacristan\sagrestano | 9901 | sacristan\sagrestano |
9902 | sacs\sacchetto | 9902 | sacs\sacchetto |
9903 | sad\afflitto, lugubre | 9903 | sad\afflitto, lugubre |
9904 | saddle\sella | 9904 | saddle\sella |
9905 | saddle fast\saldo in sella | 9905 | saddle fast\saldo in sella |
9906 | saddler\sellaio | 9906 | saddler\sellaio |
9907 | saddles\sella | 9907 | saddles\sella |
9908 | sadism\sadismo | 9908 | sadism\sadismo |
9909 | sadly\lugubre | 9909 | sadly\lugubre |
9910 | sadness\tristezza | 9910 | sadness\tristezza |
9911 | safe\sicuramente | 9911 | safe\sicuramente |
9912 | safe keeping\preservamento | 9912 | safe keeping\preservamento |
9913 | safeguard\valvola | 9913 | safeguard\valvola |
9914 | safeguarded\assicurai | 9914 | safeguarded\assicurai |
9915 | safeguards\assicurato | 9915 | safeguards\assicurato |
9916 | safekeeping\preservamento | 9916 | safekeeping\preservamento |
9917 | safely\sicuramente | 9917 | safely\sicuramente |
9918 | safeness\fidatezza, sicurezza | 9918 | safeness\fidatezza, sicurezza |
9919 | safety\sicurezza | 9919 | safety\sicurezza |
9920 | safety belt\cintura di sicurezza | 9920 | safety belt\cintura di sicurezza |
9921 | safety lock\antifurto | 9921 | safety lock\antifurto |
9922 | saffron\zafferano | 9922 | saffron\zafferano |
9923 | sag\depressione | 9923 | sag\depressione |
9924 | sagacious\saggio | 9924 | sagacious\saggio |
9925 | sagaciously\furba | 9925 | sagaciously\furba |
9926 | sagaciousness\saggezza | 9926 | sagaciousness\saggezza |
9927 | sage\salvia | 9927 | sage\salvia |
9928 | sageness\saggezza | 9928 | sageness\saggezza |
9929 | sagittarius\tiratore | 9929 | sagittarius\tiratore |
9930 | sail\veleggiare | 9930 | sail\veleggiare |
9931 | sailer\veliero | 9931 | sailer\veliero |
9932 | sailing\veleggiare | 9932 | sailing\veleggiare |
9933 | sailing boat\barca a vela | 9933 | sailing boat\barca a vela |
9934 | sailing ship\nave a vela | 9934 | sailing ship\nave a vela |
9935 | sailor\navigatore, marinaio | 9935 | sailor\navigatore, marinaio |
9936 | sails\veleggiare, vela | 9936 | sails\veleggiare, vela |
9937 | saint\santa | 9937 | saint\santa |
9938 | sainthood\santuario | 9938 | sainthood\santuario |
9939 | saintliness\santità | 9939 | saintliness\santità |
9940 | saints\santificare | 9940 | saints\santificare |
9941 | salacious\lussurioso | 9941 | salacious\lussurioso |
9942 | salaciousness\voluttà | 9942 | salaciousness\voluttà |
9943 | salad\insalata | 9943 | salad\insalata |
9944 | salads\insalate | 9944 | salads\insalate |
9945 | salary\stipendio | 9945 | salary\stipendio |
9946 | sale\registro, véndita | 9946 | sale\registro, véndita |
9947 | saleable\esitabile | 9947 | saleable\esitabile |
9948 | sales clerk\venditore | 9948 | sales clerk\venditore |
9949 | sales price\prezzo di vendita | 9949 | sales price\prezzo di vendita |
9950 | sales terms\condizioni di vendita | 9950 | sales terms\condizioni di vendita |
9951 | salesgirl\venditrice | 9951 | salesgirl\venditrice |
9952 | salesman\venditore | 9952 | salesman\venditore |
9953 | saline\salina | 9953 | saline\salina |
9954 | saliva\saliva, raggio | 9954 | saliva\saliva, raggio |
9955 | salivary\glàndola salivale | 9955 | salivary\glàndola salivale |
9956 | salivary gland\glàndola salivale | 9956 | salivary gland\glàndola salivale |
9957 | sallow\pallido, pallido, scolorato | 9957 | sallow\pallido, pallido, scolorato |
9958 | sallowness\pallore | 9958 | sallowness\pallore |
9959 | salmon\salmone | 9959 | salmon\salmone |
9960 | salon\salotto, negozio da parrucchiere | 9960 | salon\salotto, negozio da parrucchiere |
9961 | saloon\bètvola | 9961 | saloon\bètvola |
9962 | salt\sale | 9962 | salt\sale |
9963 | salt water\acqua salsa | 9963 | salt water\acqua salsa |
9964 | saltily\salato | 9964 | saltily\salato |
9965 | saltpeter\nitro | 9965 | saltpeter\nitro |
9966 | salts\sali, salare | 9966 | salts\sali, salare |
9967 | saltwater\acqua salsa | 9967 | saltwater\acqua salsa |
9968 | salty\salato | 9968 | salty\salato |
9969 | salubriously\sana | 9969 | salubriously\sana |
9970 | salute\salutare | 9970 | salute\salutare |
9971 | salvages\salva | 9971 | salvages\salva |
9972 | salvation\salvataggio | 9972 | salvation\salvataggio |
9973 | salver\vassoio | 9973 | salver\vassoio |
9974 | salves\unguentare | 9974 | salves\unguentare |
9975 | same\pari | 9975 | same\pari |
9976 | sammy\pasta | 9976 | sammy\pasta |
9977 | sample\prova, esemplare | 9977 | sample\prova, esemplare |
9978 | sanatorium\casa di salute | 9978 | sanatorium\casa di salute |
9979 | sanctify\santificare | 9979 | sanctify\santificare |
9980 | sanctimonious\ipocrita | 9980 | sanctimonious\ipocrita |
9981 | sanctity\santità | 9981 | sanctity\santità |
9982 | sanctuary\santuario | 9982 | sanctuary\santuario |
9983 | sand\sabbia | 9983 | sand\sabbia |
9984 | sand bank\banco di sabbia | 9984 | sand bank\banco di sabbia |
9985 | sand glass\clessidra | 9985 | sand glass\clessidra |
9986 | sand paper\carta smeriglio | 9986 | sand paper\carta smeriglio |
9987 | sand pit\cava di sabbia | 9987 | sand pit\cava di sabbia |
9988 | sandal\sandalo | 9988 | sandal\sandalo |
9989 | sandpaper\carta vetrata | 9989 | sandpaper\carta vetrata |
9990 | sandstorm\tempesta di sabbia | 9990 | sandstorm\tempesta di sabbia |
9991 | sandy\arenoso | 9991 | sandy\arenoso |
9992 | sane\sano di mente | 9992 | sane\sano di mente |
9993 | sanguinary\crudele | 9993 | sanguinary\crudele |
9994 | sanguineous\insanguinato | 9994 | sanguineous\insanguinato |
9995 | sanitarium\luogo climatico | 9995 | sanitarium\luogo climatico |
9996 | sanitary\igiènico | 9996 | sanitary\igiènico |
9997 | sanitary towel\fascia assorbente | 9997 | sanitary towel\fascia assorbente |
9998 | sanitation\risanamento | 9998 | sanitation\risanamento |
9999 | sanity\ragione | 9999 | sanity\ragione |
10000 | sap\succo | 10000 | sap\succo |
10001 | saphire\zaffiro | 10001 | saphire\zaffiro |
10002 | sapience\saggezza | 10002 | sapience\saggezza |
10003 | sapless\scipito | 10003 | sapless\scipito |
10004 | sapphire\zaffiro | 10004 | sapphire\zaffiro |
10005 | sappy\succoso | 10005 | sappy\succoso |
10006 | sartorial\sarto | 10006 | sartorial\sarto |
10007 | sash\ciarpa | 10007 | sash\ciarpa |
10008 | sash window\finestra scorrevole | 10008 | sash window\finestra scorrevole |
10009 | sashayed\scivolai | 10009 | sashayed\scivolai |
10010 | sashays\scivolo | 10010 | sashays\scivolo |
10011 | sassed\inveii | 10011 | sassed\inveii |
10012 | sasses\inveisce | 10012 | sasses\inveisce |
10013 | sassiness\impertinenza | 10013 | sassiness\impertinenza |
10014 | sassy\insolente, sfacciato | 10014 | sassy\insolente, sfacciato |
10015 | sat\sedei | 10015 | sat\sedei |
10016 | sateen\raso | 10016 | sateen\raso |
10017 | satellite\satellite | 10017 | satellite\satellite |
10018 | satiable\saziante | 10018 | satiable\saziante |
10019 | satiably\saziante | 10019 | satiably\saziante |
10020 | satiate\saziare | 10020 | satiate\saziare |
10021 | satiated\saziato | 10021 | satiated\saziato |
10022 | satiating\saziante | 10022 | satiating\saziante |
10023 | satiation\satollamento | 10023 | satiation\satollamento |
10024 | satiety\sazietà | 10024 | satiety\sazietà |
10025 | satin\raso | 10025 | satin\raso |
10026 | satirize\canzonare | 10026 | satirize\canzonare |
10027 | satisfaction\contentezza, soddisfazione | 10027 | satisfaction\contentezza, soddisfazione |
10028 | satisfactory\soddisfacente | 10028 | satisfactory\soddisfacente |
10029 | satisfiable\soddisfacente | 10029 | satisfiable\soddisfacente |
10030 | satisfied\soddisfatto | 10030 | satisfied\soddisfatto |
10031 | satisfies\accontentato | 10031 | satisfies\accontentato |
10032 | satisfy\accontentare | 10032 | satisfy\accontentare |
10033 | sattelite\satellite | 10033 | sattelite\satellite |
10034 | saturate\saziare | 10034 | saturate\saziare |
10035 | saturating\saziante | 10035 | saturating\saziante |
10036 | saturation\satollamento | 10036 | saturation\satollamento |
10037 | Saturday\sabato | 10037 | Saturday\sabato |
10038 | saturday\sabato | 10038 | saturday\sabato |
10039 | saturnine\fosco | 10039 | saturnine\fosco |
10040 | sauce\guazzetto | 10040 | sauce\guazzetto |
10041 | saucepan\pentola | 10041 | saucepan\pentola |
10042 | saucer\sottocoppa | 10042 | saucer\sottocoppa |
10043 | saucer eyed\occhioni | 10043 | saucer eyed\occhioni |
10044 | saucily\insolente | 10044 | saucily\insolente |
10045 | sauciness\esosità | 10045 | sauciness\esosità |
10046 | saucy\sfacciato, gioielli, saccente | 10046 | saucy\sfacciato, gioielli, saccente |
10047 | sauna\sauna | 10047 | sauna\sauna |
10048 | saunter\gironzolare | 10048 | saunter\gironzolare |
10049 | sausage\salsiccia, salsiccia arrosto | 10049 | sausage\salsiccia, salsiccia arrosto |
10050 | sausages\salsicce | 10050 | sausages\salsicce |
10051 | savable\durevole | 10051 | savable\durevole |
10052 | savage\crudele | 10052 | savage\crudele |
10053 | savannah\savana | 10053 | savannah\savana |
10054 | save\salvare, assicurare, serbare, risparmiare | 10054 | save\salvare, assicurare, serbare, risparmiare |
10055 | saved\sicuro | 10055 | saved\sicuro |
10056 | saver\risparmiatore | 10056 | saver\risparmiatore |
10057 | savers\risparmiatore | 10057 | savers\risparmiatore |
10058 | saving\immagazzinare | 10058 | saving\immagazzinare |
10059 | savings\libretto di risparmio, risparmio | 10059 | savings\libretto di risparmio, risparmio |
10060 | savings account\conto di risparmio | 10060 | savings account\conto di risparmio |
10061 | savings bank\cassa di risparmio | 10061 | savings bank\cassa di risparmio |
10062 | savior\Redentore | 10062 | savior\Redentore |
10063 | savor\degnare, gustare, usufruire | 10063 | savor\degnare, gustare, usufruire |
10064 | savored\godei | 10064 | savored\godei |
10065 | savors\godi | 10065 | savors\godi |
10066 | savour\costare, usufruire | 10066 | savour\costare, usufruire |
10067 | savoy\verza | 10067 | savoy\verza |
10068 | savvied\giudizio | 10068 | savvied\giudizio |
10069 | savvier\più furbo | 10069 | savvier\più furbo |
10070 | savvies\comprende | 10070 | savvies\comprende |
10071 | saw\segare, sega | 10071 | saw\segare, sega |
10072 | sawed\segato | 10072 | sawed\segato |
10073 | sawn\segato | 10073 | sawn\segato |
10074 | saws\segare | 10074 | saws\segare |
10075 | sax\sassofono | 10075 | sax\sassofono |
10076 | saxon\sassone | 10076 | saxon\sassone |
10077 | saxophone\sassofono | 10077 | saxophone\sassofono |
10078 | say goodbye\promulgare, licenziarsi | 10078 | say goodbye\promulgare, licenziarsi |
10079 | say thank you\ringraziare | 10079 | say thank you\ringraziare |
10080 | sayings\detti | 10080 | sayings\detti |
10081 | scabies\scabbia | 10081 | scabies\scabbia |
10082 | scabiesious\rognoso | 10082 | scabiesious\rognoso |
10083 | scaffold\patibolo | 10083 | scaffold\patibolo |
10084 | scaffolding\intelaiatura, base | 10084 | scaffolding\intelaiatura, base |
10085 | scale\criterio, squama, piatto della bilancia | 10085 | scale\criterio, squama, piatto della bilancia |
10086 | scales\hangar | 10086 | scales\hangar |
10087 | scandal\scandalo | 10087 | scandal\scandalo |
10088 | scans\esamina | 10088 | scans\esamina |
10089 | scant\scarso | 10089 | scant\scarso |
10090 | scantily\scarso | 10090 | scantily\scarso |
10091 | scantiness\spilorceria | 10091 | scantiness\spilorceria |
10092 | scantness\strettezza | 10092 | scantness\strettezza |
10093 | scanty\scarso, scarso | 10093 | scanty\scarso, scarso |
10094 | scapegoat\espiatorio | 10094 | scapegoat\espiatorio |
10095 | scapula\scapola | 10095 | scapula\scapola |
10096 | scapular\spalla | 10096 | scapular\spalla |
10097 | scar\strato erboso | 10097 | scar\strato erboso |
10098 | scarce\raro, scarso, raro | 10098 | scarce\raro, scarso, raro |
10099 | scarce goods\scarseggiante | 10099 | scarce goods\scarseggiante |
10100 | scarcely\paggio, appena | 10100 | scarcely\paggio, appena |
10101 | scarcity\strettezza | 10101 | scarcity\strettezza |
10102 | scare\spaventi | 10102 | scare\spaventi |
10103 | scarf\scialle, fazzoletto da collo | 10103 | scarf\scialle, fazzoletto da collo |
10104 | scarify\scalfire | 10104 | scarify\scalfire |
10105 | scariness\spavento | 10105 | scariness\spavento |
10106 | scarlet\scarlattina | 10106 | scarlet\scarlattina |
10107 | scarped\dirupato | 10107 | scarped\dirupato |
10108 | scary\angoscioso | 10108 | scary\angoscioso |
10109 | scathe\affronto | 10109 | scathe\affronto |
10110 | scathing\offensivo | 10110 | scathing\offensivo |
10111 | scavenging\lustrale | 10111 | scavenging\lustrale |
10112 | sceened\riparato | 10112 | sceened\riparato |
10113 | scenario\copione | 10113 | scenario\copione |
10114 | scene\scena, scena, tribuna, svolgimento | 10114 | scene\scena, scena, tribuna, svolgimento |
10115 | scenery\ornamento | 10115 | scenery\ornamento |
10116 | scenic\del paesaggio | 10116 | scenic\del paesaggio |
10117 | scent\sostanza odorosa, odore | 10117 | scent\sostanza odorosa, odore |
10118 | scented\subdorato | 10118 | scented\subdorato |
10119 | scepticism\scetticismo | 10119 | scepticism\scetticismo |
10120 | scewed\avvitato | 10120 | scewed\avvitato |
10121 | schedele\ordito | 10121 | schedele\ordito |
10122 | schedule\tabella, registro | 10122 | schedule\tabella, registro |
10123 | schema\schema | 10123 | schema\schema |
10124 | schematic\schematico | 10124 | schematic\schematico |
10125 | schematically\schematico | 10125 | schematically\schematico |
10126 | scheme\disegno, schema | 10126 | scheme\disegno, schema |
10127 | schist\ardesia | 10127 | schist\ardesia |
10128 | schists\ardesia | 10128 | schists\ardesia |
10129 | schlep\trascinare | 10129 | schlep\trascinare |
10130 | schnapps\acquavite | 10130 | schnapps\acquavite |
10131 | schnooks\idioti | 10131 | schnooks\idioti |
10132 | scholarliness\erudizione | 10132 | scholarliness\erudizione |
10133 | scholarly\erudito | 10133 | scholarly\erudito |
10134 | scholarship\erudizione, borsa di studio | 10134 | scholarship\erudizione, borsa di studio |
10135 | school\scuola | 10135 | school\scuola |
10136 | school day friend\amico della gioventù | 10136 | school day friend\amico della gioventù |
10137 | school leaving examination\maturità classica | 10137 | school leaving examination\maturità classica |
10138 | school year\anno scolastico | 10138 | school year\anno scolastico |
10139 | schoolhouses\istruire | 10139 | schoolhouses\istruire |
10140 | schooling\istruzione | 10140 | schooling\istruzione |
10141 | schoolmate\amico scolastico | 10141 | schoolmate\amico scolastico |
10142 | schools\istruire | 10142 | schools\istruire |
10143 | sciatic\sciatica | 10143 | sciatic\sciatica |
10144 | sciatica\sciatica | 10144 | sciatica\sciatica |
10145 | science\scienza | 10145 | science\scienza |
10146 | scientific\scientifico | 10146 | scientific\scientifico |
10147 | scientifical\scientifico | 10147 | scientifical\scientifico |
10148 | scientist\scienziato | 10148 | scientist\scienziato |
10149 | scintillate\fiammeggiare | 10149 | scintillate\fiammeggiare |
10150 | scintillating\lampante | 10150 | scintillating\lampante |
10151 | scission\fenditura | 10151 | scission\fenditura |
10152 | scissors\forbice | 10152 | scissors\forbice |
10153 | scoff\scherno | 10153 | scoff\scherno |
10154 | scoffer\beffatore | 10154 | scoffer\beffatore |
10155 | scold\inveire, sgridare | 10155 | scold\inveire, sgridare |
10156 | scoop\mestola, attìngere | 10156 | scoop\mestola, attìngere |
10157 | scoopful\badile | 10157 | scoopful\badile |
10158 | scoot\mozzare | 10158 | scoot\mozzare |
10159 | scooter\motoretta | 10159 | scooter\motoretta |
10160 | scope\orbita, portata | 10160 | scope\orbita, portata |
10161 | scopes\zone | 10161 | scopes\zone |
10162 | scorch\bruciare | 10162 | scorch\bruciare |
10163 | scorched\arsi | 10163 | scorched\arsi |
10164 | scorcher\senzazione | 10164 | scorcher\senzazione |
10165 | scorches\arde | 10165 | scorches\arde |
10166 | scorching\cocente | 10166 | scorching\cocente |
10167 | score\sparare, partitura | 10167 | score\sparare, partitura |
10168 | scorers\proteggere | 10168 | scorers\proteggere |
10169 | scorn\disprezzare, vilipendi, scherno | 10169 | scorn\disprezzare, vilipendi, scherno |
10170 | scornful\beffardo, sprezzante | 10170 | scornful\beffardo, sprezzante |
10171 | scornfulness\vilipendi | 10171 | scornfulness\vilipendi |
10172 | scorns\disprezzato | 10172 | scorns\disprezzato |
10173 | scorpion\scorpione | 10173 | scorpion\scorpione |
10174 | scorpios\scorpioni | 10174 | scorpios\scorpioni |
10175 | Scot\Scozzese | 10175 | Scot\Scozzese |
10176 | scot\paratia | 10176 | scot\paratia |
10177 | Scotland\Scozia | 10177 | Scotland\Scozia |
10178 | Scotsman\Scozzese | 10178 | Scotsman\Scozzese |
10179 | scoundrel\furfante, mascalzone | 10179 | scoundrel\furfante, mascalzone |
10180 | scour\vagare | 10180 | scour\vagare |
10181 | scourge\frustare | 10181 | scourge\frustare |
10182 | scouring\vagabondo | 10182 | scouring\vagabondo |
10183 | scout\ricognitore | 10183 | scout\ricognitore |
10184 | scoutmaster\guida | 10184 | scoutmaster\guida |
10185 | scow\più leggero | 10185 | scow\più leggero |
10186 | scrabble\strisciare | 10186 | scrabble\strisciare |
10187 | scragg\scheletro | 10187 | scragg\scheletro |
10188 | scram\mozzare | 10188 | scram\mozzare |
10189 | scrambled\uovo strapazzato | 10189 | scrambled\uovo strapazzato |
10190 | scrambling\rampicante | 10190 | scrambling\rampicante |
10191 | scrap\ferraglia | 10191 | scrap\ferraglia |
10192 | scrape\raschiare, graffiare | 10192 | scrape\raschiare, graffiare |
10193 | scrape off\grattare | 10193 | scrape off\grattare |
10194 | scraper\scarafaggio | 10194 | scraper\scarafaggio |
10195 | scrapers\raschiare | 10195 | scrapers\raschiare |
10196 | scratch\graffio, verniciare, graffiare, scalfire | 10196 | scratch\graffio, verniciare, graffiare, scalfire |
10197 | scratch oneself\graffiare | 10197 | scratch oneself\graffiare |
10198 | scratched\grattato | 10198 | scratched\grattato |
10199 | scrawniest\piccolissimo | 10199 | scrawniest\piccolissimo |
10200 | scrawny\snello | 10200 | scrawny\snello |
10201 | scream\gridare | 10201 | scream\gridare |
10202 | screamed\gridai | 10202 | screamed\gridai |
10203 | screaming\urlante | 10203 | screaming\urlante |
10204 | screams\grida | 10204 | screams\grida |
10205 | scree\pietrisco | 10205 | scree\pietrisco |
10206 | screech\stridere | 10206 | screech\stridere |
10207 | screeching\stridente | 10207 | screeching\stridente |
10208 | screen\schermo, reticolo, schermo | 10208 | screen\schermo, reticolo, schermo |
10209 | screened\riparato | 10209 | screened\riparato |
10210 | screenplay\copione | 10210 | screenplay\copione |
10211 | screw driver\cacciavite | 10211 | screw driver\cacciavite |
10212 | screwball\mattoide | 10212 | screwball\mattoide |
10213 | screwdriver\cacciavite | 10213 | screwdriver\cacciavite |
10214 | screwiness\pazzia | 10214 | screwiness\pazzia |
10215 | screws\avvitato | 10215 | screws\avvitato |
10216 | screwy\pazzo | 10216 | screwy\pazzo |
10217 | scribal error\errore ortografico | 10217 | scribal error\errore ortografico |
10218 | scribe\scalfire | 10218 | scribe\scalfire |
10219 | scribed\scrivei | 10219 | scribed\scrivei |
10220 | scribing\scalfire | 10220 | scribing\scalfire |
10221 | script\copione | 10221 | script\copione |
10222 | scripture\documento | 10222 | scripture\documento |
10223 | scroll\sfogliare | 10223 | scroll\sfogliare |
10224 | scrolls\spostare | 10224 | scrolls\spostare |
10225 | scrounge\scroccare | 10225 | scrounge\scroccare |
10226 | scroungers\ladri | 10226 | scroungers\ladri |
10227 | scrub\strofinare, strofinare | 10227 | scrub\strofinare, strofinare |
10228 | scrubbed\strofinato | 10228 | scrubbed\strofinato |
10229 | scrubber\spazzola | 10229 | scrubber\spazzola |
10230 | scruff\sporco | 10230 | scruff\sporco |
10231 | scruffiness\sudiciume | 10231 | scruffiness\sudiciume |
10232 | scruple\scupolo | 10232 | scruple\scupolo |
10233 | scruples\scupolo | 10233 | scruples\scupolo |
10234 | scrupulous\diffidgnte | 10234 | scrupulous\diffidgnte |
10235 | scruter\esplorare | 10235 | scruter\esplorare |
10236 | scrutinize\assaggiare | 10236 | scrutinize\assaggiare |
10237 | scrutinized\esaminai | 10237 | scrutinized\esaminai |
10238 | scrutinizes\esamina | 10238 | scrutinizes\esamina |
10239 | scud\volare | 10239 | scud\volare |
10240 | scuff\logorio | 10240 | scuff\logorio |
10241 | scuffproof\indistruttibile | 10241 | scuffproof\indistruttibile |
10242 | sculler\vogatore | 10242 | sculler\vogatore |
10243 | scullers\vogatore | 10243 | scullers\vogatore |
10244 | sculpt\formare | 10244 | sculpt\formare |
10245 | sculpting\formante | 10245 | sculpting\formante |
10246 | sculptor\scultore | 10246 | sculptor\scultore |
10247 | sculptors\scultore | 10247 | sculptors\scultore |
10248 | scurf\crosta | 10248 | scurf\crosta |
10249 | scurvier\infame | 10249 | scurvier\infame |
10250 | scurvily\infame | 10250 | scurvily\infame |
10251 | scuttle\rovinare | 10251 | scuttle\rovinare |
10252 | se\ipotesi | 10252 | se\ipotesi |
10253 | sea\navale, mare | 10253 | sea\navale, mare |
10254 | seaboard\riviera | 10254 | seaboard\riviera |
10255 | seacoasts\littoraneo | 10255 | seacoasts\littoraneo |
10256 | seafarer\navigatore | 10256 | seafarer\navigatore |
10257 | seagull\gabbiano | 10257 | seagull\gabbiano |
10258 | seal\siggillare, sigillo, foca, guarnizione | 10258 | seal\siggillare, sigillo, foca, guarnizione |
10259 | sealing gasket\guarnizione | 10259 | sealing gasket\guarnizione |
10260 | seals\strisciare, foche | 10260 | seals\strisciare, foche |
10261 | seam\vivagno, scanalatura | 10261 | seam\vivagno, scanalatura |
10262 | seaman\marinaio | 10262 | seaman\marinaio |
10263 | seamen\marinai | 10263 | seamen\marinai |
10264 | seamstress\cucitrice | 10264 | seamstress\cucitrice |
10265 | sear\abbronzare | 10265 | sear\abbronzare |
10266 | search\cerco, indagare | 10266 | search\cerco, indagare |
10267 | searcher\cercatore | 10267 | searcher\cercatore |
10268 | searches\mania | 10268 | searches\mania |
10269 | searchingly\verdastro | 10269 | searchingly\verdastro |
10270 | sears\arsiccio | 10270 | sears\arsiccio |
10271 | seas\mari | 10271 | seas\mari |
10272 | seashell\coccia | 10272 | seashell\coccia |
10273 | seasick\malato di mare | 10273 | seasick\malato di mare |
10274 | seaside\riviera, costa | 10274 | seaside\riviera, costa |
10275 | seaside resort\stazione balneare, località balneare | 10275 | seaside resort\stazione balneare, località balneare |
10276 | season\stagione, stagione, aromatizzare | 10276 | season\stagione, stagione, aromatizzare |
10277 | seasonable\stagionale | 10277 | seasonable\stagionale |
10278 | seasonal surcharge\aumento stagionale | 10278 | seasonal surcharge\aumento stagionale |
10279 | seasoned\maturo | 10279 | seasoned\maturo |
10280 | seasoning\condimento | 10280 | seasoning\condimento |
10281 | seasonings\aromatizzare | 10281 | seasonings\aromatizzare |
10282 | seat\seggio | 10282 | seat\seggio |
10283 | seaweed\alga | 10283 | seaweed\alga |
10284 | second\secondo | 10284 | second\secondo |
10285 | secondary\accidentale, secondario | 10285 | secondary\accidentale, secondario |
10286 | secret\riservato, segreto, segreto | 10286 | secret\riservato, segreto, segreto |
10287 | secretariat\segretariato | 10287 | secretariat\segretariato |
10288 | secretary\segretaria, segretario | 10288 | secretary\segretaria, segretario |
10289 | secretion\eliminazione | 10289 | secretion\eliminazione |
10290 | secrets\segreti | 10290 | secrets\segreti |
10291 | sect\setta | 10291 | sect\setta |
10292 | section\taglio | 10292 | section\taglio |
10293 | sector\settore, area | 10293 | sector\settore, area |
10294 | security\sicurezza | 10294 | security\sicurezza |
10295 | seduce\sedurre | 10295 | seduce\sedurre |
10296 | seduction\seduzione | 10296 | seduction\seduzione |
10297 | seductress\seduttrice | 10297 | seductress\seduttrice |
10298 | sedulous\assiduo | 10298 | sedulous\assiduo |
10299 | see\vedere, visitare | 10299 | see\vedere, visitare |
10300 | seed\germe, seme, seme | 10300 | seed\germe, seme, seme |
10301 | seek\cercare, cerco | 10301 | seek\cercare, cerco |
10302 | seer\profeta | 10302 | seer\profeta |
10303 | seize\confiscare, prendere, impaccare, acchiappare | 10303 | seize\confiscare, prendere, impaccare, acchiappare |
10304 | seldom\raramente | 10304 | seldom\raramente |
10305 | select\selezionare | 10305 | select\selezionare |
10306 | selection\selezione, eletta | 10306 | selection\selezione, eletta |
10307 | self acting\automàtico | 10307 | self acting\automàtico |
10308 | self confidence\fiducia in sê | 10308 | self confidence\fiducia in sê |
10309 | sell out\esaurire | 10309 | sell out\esaurire |
10310 | semi\mezzo | 10310 | semi\mezzo |
10311 | semi automatical\semiautomatico | 10311 | semi automatical\semiautomatico |
10312 | semicolon\punto e virgola | 10312 | semicolon\punto e virgola |
10313 | senate\senato, consiglio federale | 10313 | senate\senato, consiglio federale |
10314 | send\mando, mandare | 10314 | send\mando, mandare |
10315 | sender\mittente | 10315 | sender\mittente |
10316 | senior\superiore | 10316 | senior\superiore |
10317 | sensation\sensazione | 10317 | sensation\sensazione |
10318 | sense\levatura, accezione | 10318 | sense\levatura, accezione |
10319 | senselessly\senza senso | 10319 | senselessly\senza senso |
10320 | senses\giudizio | 10320 | senses\giudizio |
10321 | sensible\ragionevole, ragionevole | 10321 | sensible\ragionevole, ragionevole |
10322 | sensitive\sensibile, sensibile | 10322 | sensitive\sensibile, sensibile |
10323 | sensitivity\sensibilità | 10323 | sensitivity\sensibilità |
10324 | sensual\sensuale | 10324 | sensual\sensuale |
10325 | sensuality\sensualità | 10325 | sensuality\sensualità |
10326 | sensuously\libidine | 10326 | sensuously\libidine |
10327 | sentence\punizione, condannare, frase | 10327 | sentence\punizione, condannare, frase |
10328 | sentiments\emozioni | 10328 | sentiments\emozioni |
10329 | sentinels\custodito | 10329 | sentinels\custodito |
10330 | separate\separato, separato, separare | 10330 | separate\separato, separato, separare |
10331 | separating\singola | 10331 | separating\singola |
10332 | September\settembre | 10332 | September\settembre |
10333 | sequence\successione | 10333 | sequence\successione |
10334 | serendipity\scoperta | 10334 | serendipity\scoperta |
10335 | serene\sereno | 10335 | serene\sereno |
10336 | serenity\ilarità | 10336 | serenity\ilarità |
10337 | serializing\ordinatore | 10337 | serializing\ordinatore |
10338 | serials\in fila | 10338 | serials\in fila |
10339 | series\seria | 10339 | series\seria |
10340 | series of reactions\reazione a catena | 10340 | series of reactions\reazione a catena |
10341 | serious\pesante, serio, grave | 10341 | serious\pesante, serio, grave |
10342 | seriously\serio, serio | 10342 | seriously\serio, serio |
10343 | serpent\serpente | 10343 | serpent\serpente |
10344 | serpentine\contorto | 10344 | serpentine\contorto |
10345 | servant\domèstica, famulo | 10345 | servant\domèstica, famulo |
10346 | serve\servire, servire, servire | 10346 | serve\servire, servire, servire |
10347 | service\attèndere, servizio, funzione, manutenzione | 10347 | service\attèndere, servizio, funzione, manutenzione |
10348 | service station\distributore di benzina | 10348 | service station\distributore di benzina |
10349 | serviceman\soldato | 10349 | serviceman\soldato |
10350 | serving\porzione | 10350 | serving\porzione |
10351 | session\seduta | 10351 | session\seduta |
10352 | set\assortimento, stabilito, mettere, apparecchio | 10352 | set\assortimento, stabilito, mettere, apparecchio |
10353 | set up\allineare, sè, fondare | 10353 | set up\allineare, sè, fondare |
10354 | setting\naufragio, missione | 10354 | setting\naufragio, missione |
10355 | setting up\succursale | 10355 | setting up\succursale |
10356 | settle\fissare, liquidare | 10356 | settle\fissare, liquidare |
10357 | settlement\accordo | 10357 | settlement\accordo |
10358 | seven\sette | 10358 | seven\sette |
10359 | seventeen\diciassette, diciasette | 10359 | seventeen\diciassette, diciasette |
10360 | seventieth\settantesimo | 10360 | seventieth\settantesimo |
10361 | seventy\settanta | 10361 | seventy\settanta |
10362 | several\alquanti, parecchi | 10362 | several\alquanti, parecchi |
10363 | several times\talvolta | 10363 | several times\talvolta |
10364 | severe\severo | 10364 | severe\severo |
10365 | sew\cucire | 10365 | sew\cucire |
10366 | sewage\acqua di scarico | 10366 | sewage\acqua di scarico |
10367 | sewing\saldatura | 10367 | sewing\saldatura |
10368 | sex\sesso | 10368 | sex\sesso |
10369 | sexual\storico | 10369 | sexual\storico |
10370 | shack\capanna | 10370 | shack\capanna |
10371 | shade\ombra, tinta | 10371 | shade\ombra, tinta |
10372 | shadow\ombrosità, ombra | 10372 | shadow\ombrosità, ombra |
10373 | shadowy\incerto | 10373 | shadowy\incerto |
10374 | shake\scuotere | 10374 | shake\scuotere |
10375 | shale\sasso | 10375 | shale\sasso |
10376 | shall\dovere | 10376 | shall\dovere |
10377 | shallop\scialuppa | 10377 | shallop\scialuppa |
10378 | sham\simulare | 10378 | sham\simulare |
10379 | shame\pudore, disonore | 10379 | shame\pudore, disonore |
10380 | shape\formare, formare, forma | 10380 | shape\formare, formare, forma |
10381 | share\partecipazione, spartire, parte | 10381 | share\partecipazione, spartire, parte |
10382 | shareholder\azionista | 10382 | shareholder\azionista |
10383 | shark\pescecane | 10383 | shark\pescecane |
10384 | sharp\nitido, acuto, stridulo, elevato | 10384 | sharp\nitido, acuto, stridulo, elevato |
10385 | sharp witted\perspicace | 10385 | sharp witted\perspicace |
10386 | sharpen\acuire, trascinare | 10386 | sharpen\acuire, trascinare |
10387 | she\lei | 10387 | she\lei |
10388 | sheaf\covone | 10388 | sheaf\covone |
10389 | shears\forbice | 10389 | shears\forbice |
10390 | sheath\involucro | 10390 | sheath\involucro |
10391 | shed\granaio, hangar | 10391 | shed\granaio, hangar |
10392 | sheep\pecora | 10392 | sheep\pecora |
10393 | sheepherders\pecoraio | 10393 | sheepherders\pecoraio |
10394 | sheerly\solamente | 10394 | sheerly\solamente |
10395 | sheet\lenzuolo, falda, foglia | 10395 | sheet\lenzuolo, falda, foglia |
10396 | sheet metal\latta, lamiera | 10396 | sheet metal\latta, lamiera |
10397 | shelf\scaffale | 10397 | shelf\scaffale |
10398 | shell\conchiglia, proiettile | 10398 | shell\conchiglia, proiettile |
10399 | shelter\protezione, riparare, ricovero, riparo, rifugio | 10399 | shelter\protezione, riparare, ricovero, riparo, rifugio |
10400 | shepherd\pecoraio | 10400 | shepherd\pecoraio |
10401 | shift\muovere | 10401 | shift\muovere |
10402 | shifting\trasferimento | 10402 | shifting\trasferimento |
10403 | shine\splendere, brillare | 10403 | shine\splendere, brillare |
10404 | shiners\far lume | 10404 | shiners\far lume |
10405 | shining\brillante, fulgente | 10405 | shining\brillante, fulgente |
10406 | ship\vascello, spedire, trasportare | 10406 | ship\vascello, spedire, trasportare |
10407 | shipboy\mozzo | 10407 | shipboy\mozzo |
10408 | shipes\navi | 10408 | shipes\navi |
10409 | shipment\spedizione | 10409 | shipment\spedizione |
10410 | shirt\camicia | 10410 | shirt\camicia |
10411 | shit\merda | 10411 | shit\merda |
10412 | shiver\aver dei brividi | 10412 | shiver\aver dei brividi |
10413 | shock\scandalizzare, crollo | 10413 | shock\scandalizzare, crollo |
10414 | shock absorber\ammortizzatore | 10414 | shock absorber\ammortizzatore |
10415 | shoe\scarpa | 10415 | shoe\scarpa |
10416 | shoot\sparare | 10416 | shoot\sparare |
10417 | shooting\sparare | 10417 | shooting\sparare |
10418 | shop\impresa | 10418 | shop\impresa |
10419 | shop-window\vetrina | 10419 | shop-window\vetrina |
10420 | shop assistant\venditore | 10420 | shop assistant\venditore |
10421 | shop operation\fase di lavorazione | 10421 | shop operation\fase di lavorazione |
10422 | shopping\comperare, compera | 10422 | shopping\comperare, compera |
10423 | shopping street\via dei negozi | 10423 | shopping street\via dei negozi |
10424 | shore\sponda, costa | 10424 | shore\sponda, costa |
10425 | short\breve | 10425 | short\breve |
10426 | short-sighted\miope | 10426 | short-sighted\miope |
10427 | short-term\sollecito | 10427 | short-term\sollecito |
10428 | short circuit\corto circuito | 10428 | short circuit\corto circuito |
10429 | shortage\strettezza, difetto | 10429 | shortage\strettezza, difetto |
10430 | shorten\abbreviare | 10430 | shorten\abbreviare |
10431 | shortfall\deficit | 10431 | shortfall\deficit |
10432 | shortly\prossimamente | 10432 | shortly\prossimamente |
10433 | shot\sparo | 10433 | shot\sparo |
10434 | shoulder\spalla | 10434 | shoulder\spalla |
10435 | shout\esclamare, gridare, grido | 10435 | shout\esclamare, gridare, grido |
10436 | shovel\vanga, badile | 10436 | shovel\vanga, badile |
10437 | show\indicare, espongo, messa | 10437 | show\indicare, espongo, messa |
10438 | shower\doccia, rovescio | 10438 | shower\doccia, rovescio |
10439 | shrill\elevato, stridulo | 10439 | shrill\elevato, stridulo |
10440 | shrimp\granchiolino | 10440 | shrimp\granchiolino |
10441 | shrink\restringere | 10441 | shrink\restringere |
10442 | shrub\arbusto | 10442 | shrub\arbusto |
10443 | shut\chiudere | 10443 | shut\chiudere |
10444 | shutout\esclusivo | 10444 | shutout\esclusivo |
10445 | shutter\imposta | 10445 | shutter\imposta |
10446 | shy\timido, timido | 10446 | shy\timido, timido |
10447 | sick\egro, malato | 10447 | sick\egro, malato |
10448 | sick person\malata | 10448 | sick person\malata |
10449 | sickle\falce | 10449 | sickle\falce |
10450 | sickness\malattia | 10450 | sickness\malattia |
10451 | side\lato | 10451 | side\lato |
10452 | sideboard\armadio | 10452 | sideboard\armadio |
10453 | sides\laterale | 10453 | sides\laterale |
10454 | sideshow\questione secondaria | 10454 | sideshow\questione secondaria |
10455 | sidewards\a lato | 10455 | sidewards\a lato |
10456 | siege\assedio | 10456 | siege\assedio |
10457 | sieve\cola | 10457 | sieve\cola |
10458 | sieved\settimo | 10458 | sieved\settimo |
10459 | sifter\cola | 10459 | sifter\cola |
10460 | sigh\sospirare | 10460 | sigh\sospirare |
10461 | sight\cosa notevole, aspetto | 10461 | sight\cosa notevole, aspetto |
10462 | sightless\cieco | 10462 | sightless\cieco |
10463 | sightlessly\cieca | 10463 | sightlessly\cieca |
10464 | sightliness\cospicuità | 10464 | sightliness\cospicuità |
10465 | sightseeing\curioso, ispezione | 10465 | sightseeing\curioso, ispezione |
10466 | sightseer\escursionista | 10466 | sightseer\escursionista |
10467 | sign\affisso, scudo, firmare, simbolo | 10467 | sign\affisso, scudo, firmare, simbolo |
10468 | sign over\volturare, volturare | 10468 | sign over\volturare, volturare |
10469 | signal\segnale | 10469 | signal\segnale |
10470 | signaling\denunciante | 10470 | signaling\denunciante |
10471 | signalize\segnalare | 10471 | signalize\segnalare |
10472 | signatories\firmatario | 10472 | signatories\firmatario |
10473 | signature\firma | 10473 | signature\firma |
10474 | signed\marcato | 10474 | signed\marcato |
10475 | signer\firmatario | 10475 | signer\firmatario |
10476 | signets\sigillo | 10476 | signets\sigillo |
10477 | significant\importante | 10477 | significant\importante |
10478 | signification\accezione, levatura | 10478 | signification\accezione, levatura |
10479 | signify\volere dire | 10479 | signify\volere dire |
10480 | signifying\importante | 10480 | signifying\importante |
10481 | signor\signore | 10481 | signor\signore |
10482 | signora\signora | 10482 | signora\signora |
10483 | signoras\donne | 10483 | signoras\donne |
10484 | signorina\signorina | 10484 | signorina\signorina |
10485 | signors\signori | 10485 | signors\signori |
10486 | signpost\segnavia, scudo | 10486 | signpost\segnavia, scudo |
10487 | signposts\insegne | 10487 | signposts\insegne |
10488 | signs\simbolo | 10488 | signs\simbolo |
10489 | signs and symbols\leggenda | 10489 | signs and symbols\leggenda |
10490 | silence\calma, tacere, ristoro | 10490 | silence\calma, tacere, ristoro |
10491 | silencer\silenziatore | 10491 | silencer\silenziatore |
10492 | silences\tace | 10492 | silences\tace |
10493 | silent\sommesso, muto, calma, equilibrato, calmo | 10493 | silent\sommesso, muto, calma, equilibrato, calmo |
10494 | silently\calmo | 10494 | silently\calmo |
10495 | silentness\calma | 10495 | silentness\calma |
10496 | silicic\ciottolo | 10496 | silicic\ciottolo |
10497 | silk\seta | 10497 | silk\seta |
10498 | silkily\serico | 10498 | silkily\serico |
10499 | silkiness\dolcezza | 10499 | silkiness\dolcezza |
10500 | silks\di seta | 10500 | silks\di seta |
10501 | silkworm\baco da seta | 10501 | silkworm\baco da seta |
10502 | sill\soglia | 10502 | sill\soglia |
10503 | silliness\ocaggine | 10503 | silliness\ocaggine |
10504 | silly\stolto, sciocco | 10504 | silly\stolto, sciocco |
10505 | silt\insabbiare | 10505 | silt\insabbiare |
10506 | silver\argènteo, argento | 10506 | silver\argènteo, argento |
10507 | similar\pari, consimile, simile | 10507 | similar\pari, consimile, simile |
10508 | similarity\omogeneità | 10508 | similarity\omogeneità |
10509 | similarly\simile | 10509 | similarly\simile |
10510 | simile\paragone | 10510 | simile\paragone |
10511 | similitude\assomiglianza | 10511 | similitude\assomiglianza |
10512 | simmer\bollore | 10512 | simmer\bollore |
10513 | simpatico\simpatico | 10513 | simpatico\simpatico |
10514 | simper\sciocco | 10514 | simper\sciocco |
10515 | simple\semplice | 10515 | simple\semplice |
10516 | simple minded\ingenuo | 10516 | simple minded\ingenuo |
10517 | simpleminded\semplice | 10517 | simpleminded\semplice |
10518 | simplemindedness\semplicità | 10518 | simplemindedness\semplicità |
10519 | simpleness\semplicità | 10519 | simpleness\semplicità |
10520 | simpletons\pennellare | 10520 | simpletons\pennellare |
10521 | simplicity\semplicità | 10521 | simplicity\semplicità |
10522 | simplification\semplificazione | 10522 | simplification\semplificazione |
10523 | simplify\semplificare | 10523 | simplify\semplificare |
10524 | simply\semplice | 10524 | simply\semplice |
10525 | simular\simile | 10525 | simular\simile |
10526 | simulate\simulare, simulare | 10526 | simulate\simulare, simulare |
10527 | simulated\artefatto | 10527 | simulated\artefatto |
10528 | simultaneous\simultaneo | 10528 | simultaneous\simultaneo |
10529 | simultaneously\simultaneo | 10529 | simultaneously\simultaneo |
10530 | sin\peccato | 10530 | sin\peccato |
10531 | since\da, da allora, perchè | 10531 | since\da, da allora, perchè |
10532 | since then\da allora | 10532 | since then\da allora |
10533 | sincere\sincero | 10533 | sincere\sincero |
10534 | sincerely\umilissimo, sincera | 10534 | sincerely\umilissimo, sincera |
10535 | sinful\peccaminoso | 10535 | sinful\peccaminoso |
10536 | sing\cantare | 10536 | sing\cantare |
10537 | singable\cantàbile | 10537 | singable\cantàbile |
10538 | singer\cantante | 10538 | singer\cantante |
10539 | singing\canto | 10539 | singing\canto |
10540 | singings\canti | 10540 | singings\canti |
10541 | single\nubile, singolo | 10541 | single\nubile, singolo |
10542 | single lane\a senso unico | 10542 | single lane\a senso unico |
10543 | single phase\monofase | 10543 | single phase\monofase |
10544 | single room\càmera sìngola | 10544 | single room\càmera sìngola |
10545 | single ticket\biglietto sémplice | 10545 | single ticket\biglietto sémplice |
10546 | singled\divorziato | 10546 | singled\divorziato |
10547 | singly\singolo | 10547 | singly\singolo |
10548 | sings\canta | 10548 | sings\canta |
10549 | singular\singolare | 10549 | singular\singolare |
10550 | singularness\stranezza | 10550 | singularness\stranezza |
10551 | sinister\nefasto | 10551 | sinister\nefasto |
10552 | sink\abbassarsi, catinella, abbassarsi, lavello | 10552 | sink\abbassarsi, catinella, abbassarsi, lavello |
10553 | sinking\affondamento | 10553 | sinking\affondamento |
10554 | sinks\abbassa | 10554 | sinks\abbassa |
10555 | sinned\peccato | 10555 | sinned\peccato |
10556 | sinner\peccatore | 10556 | sinner\peccatore |
10557 | sins\peccati | 10557 | sins\peccati |
10558 | sinuous\contorto | 10558 | sinuous\contorto |
10559 | sip\sorso | 10559 | sip\sorso |
10560 | sir\signore | 10560 | sir\signore |
10561 | sire\testimoniare | 10561 | sire\testimoniare |
10562 | sirloin\lonza | 10562 | sirloin\lonza |
10563 | sissy\effeminato | 10563 | sissy\effeminato |
10564 | sister\sorella | 10564 | sister\sorella |
10565 | sister in law\cognata | 10565 | sister in law\cognata |
10566 | sit\star seduto | 10566 | sit\star seduto |
10567 | sit down\accomodarsi | 10567 | sit down\accomodarsi |
10568 | site\posto, circostanza | 10568 | site\posto, circostanza |
10569 | site of crime\luogo del fatto | 10569 | site of crime\luogo del fatto |
10570 | sits\siede | 10570 | sits\siede |
10571 | sitting\seduto | 10571 | sitting\seduto |
10572 | sitting room\salotto | 10572 | sitting room\salotto |
10573 | situate\allineare, mettere, mettere | 10573 | situate\allineare, mettere, mettere |
10574 | situated\posto | 10574 | situated\posto |
10575 | situation\situazione, posizione, circostanza | 10575 | situation\situazione, posizione, circostanza |
10576 | six\sei | 10576 | six\sei |
10577 | sixfold\sestuplo | 10577 | sixfold\sestuplo |
10578 | sixteen\sedici | 10578 | sixteen\sedici |
10579 | sixteenth\sedicesimo, sedicesima | 10579 | sixteenth\sedicesimo, sedicesima |
10580 | sixth\sesto, sesta | 10580 | sixth\sesto, sesta |
10581 | sixty\sessanta | 10581 | sixty\sessanta |
10582 | size\grossezza | 10582 | size\grossezza |
10583 | size of shoe\numero di scarpa | 10583 | size of shoe\numero di scarpa |
10584 | sizzle\grillare | 10584 | sizzle\grillare |
10585 | skating\pattinaggio artistico | 10585 | skating\pattinaggio artistico |
10586 | skating ring\pista di ghiaccio | 10586 | skating ring\pista di ghiaccio |
10587 | skating rink\pista di ghiaccio | 10587 | skating rink\pista di ghiaccio |
10588 | skein\capestro | 10588 | skein\capestro |
10589 | skeins\capestri | 10589 | skeins\capestri |
10590 | skeleton\scheletro | 10590 | skeleton\scheletro |
10591 | skeletons\scheletri | 10591 | skeletons\scheletri |
10592 | skepticalness\scetticismo | 10592 | skepticalness\scetticismo |
10593 | skepticism\scetticismo | 10593 | skepticism\scetticismo |
10594 | sketch\abbozzo, abbozzare | 10594 | sketch\abbozzo, abbozzare |
10595 | sketchily\volatile, abbozzaticcio, superficiale | 10595 | sketchily\volatile, abbozzaticcio, superficiale |
10596 | sketchiness\poca chiarezza | 10596 | sketchiness\poca chiarezza |
10597 | sketchy\torbido | 10597 | sketchy\torbido |
10598 | skews\storto | 10598 | skews\storto |
10599 | ski\sci | 10599 | ski\sci |
10600 | skid\discesa a valle, avventare | 10600 | skid\discesa a valle, avventare |
10601 | skiful\esperto | 10601 | skiful\esperto |
10602 | skilful\apprèndere, azzeccato | 10602 | skilful\apprèndere, azzeccato |
10603 | skilfull\apprèndere | ||
10604 | skill\sorte, disinvoltura | 10603 | skill\sorte, disinvoltura |
10605 | skilled\versato | 10604 | skilled\versato |
10606 | skilled worker\operaio specializzato | 10605 | skilled worker\operaio specializzato |
10607 | skillet\tegame | 10606 | skillet\tegame |
10608 | skillful\lesto, sveglio, esperto | 10607 | skillful\lesto, sveglio, esperto |
10609 | skillfulness\disinvoltura | 10608 | skillfulness\disinvoltura |
10610 | skimp\lesinare | 10609 | skimp\lesinare |
10611 | skimpiest\piccolissimo | 10610 | skimpiest\piccolissimo |
10612 | skimpily\scarso | 10611 | skimpily\scarso |
10613 | skimpiness\strettezza | 10612 | skimpiness\strettezza |
10614 | skimpy\scarso | 10613 | skimpy\scarso |
10615 | skin\epidèrmide, epidermide | 10614 | skin\epidèrmide, epidermide |
10616 | skinny\scremato, magro, secco | 10615 | skinny\scremato, magro, secco |
10617 | skins\pelli, pelli | 10616 | skins\pelli, pelli |
10618 | skip\saltellare, lancio | 10617 | skip\saltellare, lancio |
10619 | skipper\marinaio | 10618 | skipper\marinaio |
10620 | skirt\gonna | 10619 | skirt\gonna |
10621 | skirting board\battiscopa | 10620 | skirting board\battiscopa |
10622 | skit\satira | 10621 | skit\satira |
10623 | skittle\birillo | 10622 | skittle\birillo |
10624 | skittle alley\gioco dei birilli | 10623 | skittle alley\gioco dei birilli |
10625 | skivvy\biancherìa ìntima | 10624 | skivvy\biancherìa ìntima |
10626 | skulker\lima sorda | 10625 | skulker\lima sorda |
10627 | skunk\puzzola | 10626 | skunk\puzzola |
10628 | sky\cielo | 10627 | sky\cielo |
10629 | skylark\lodola | 10628 | skylark\lodola |
10630 | skyrocket\razzo | 10629 | skyrocket\razzo |
10631 | skyscraper\grattacielo, grattacielo | 10630 | skyscraper\grattacielo, grattacielo |
10632 | skyscrapers\grattacielo | 10631 | skyscrapers\grattacielo |
10633 | slab\frantumare | 10632 | slab\frantumare |
10634 | slack\lasco, floscio | 10633 | slack\lasco, floscio |
10635 | slack joint\contatto lasco | 10634 | slack joint\contatto lasco |
10636 | slack period\ristagno | 10635 | slack period\ristagno |
10637 | slacken\rilassare, rilassare | 10636 | slacken\rilassare, rilassare |
10638 | slackens\rilassato | 10637 | slackens\rilassato |
10639 | slacker\scansafatiche | 10638 | slacker\scansafatiche |
10640 | slacks\pantaloni | 10639 | slacks\pantaloni |
10641 | slake\allattamento | 10640 | slake\allattamento |
10642 | slam\sbattere | 10641 | slam\sbattere |
10643 | slammed\sbattuto | 10642 | slammed\sbattuto |
10644 | slander\calunniare | 10643 | slander\calunniare |
10645 | slanderer\calunniatore | 10644 | slanderer\calunniatore |
10646 | slanderous\calunnioso | 10645 | slanderous\calunnioso |
10647 | slanderousness\calunnia | 10646 | slanderousness\calunnia |
10648 | slant\declinazione | 10647 | slant\declinazione |
10649 | slanting\obliquo, obliquo | 10648 | slanting\obliquo, obliquo |
10650 | slantingly\obliqua | 10649 | slantingly\obliqua |
10651 | slap\picchiare, ceffone | 10650 | slap\picchiare, ceffone |
10652 | slap in the face\ceffone | 10651 | slap in the face\ceffone |
10653 | slaphappy\avventurato | 10652 | slaphappy\avventurato |
10654 | slaps in the face\schiaffeggiare | 10653 | slaps in the face\schiaffeggiare |
10655 | slash\taglio | 10654 | slash\taglio |
10656 | slat\picchiare | 10655 | slat\picchiare |
10657 | slate\ardesia, abusare | 10656 | slate\ardesia, abusare |
10658 | slatted\picchiai | 10657 | slatted\picchiai |
10659 | slattern\donnaccia | 10658 | slattern\donnaccia |
10660 | slaughter\macellare | 10659 | slaughter\macellare |
10661 | slaughter cattle\bestiame da macello | 10660 | slaughter cattle\bestiame da macello |
10662 | slaughter house\mattatoio | 10661 | slaughter house\mattatoio |
10663 | slaughtered\macellato | 10662 | slaughtered\macellato |
10664 | slaughterhouse\mattatoio | 10663 | slaughterhouse\mattatoio |
10665 | slave\schiava, schiavo | 10664 | slave\schiava, schiavo |
10666 | slave trader\negriere | 10665 | slave trader\negriere |
10667 | slavered\sbavato | 10666 | slavered\sbavato |
10668 | slavery\schiavitù | 10667 | slavery\schiavitù |
10669 | slay\uccidere | 10668 | slay\uccidere |
10670 | slayer\strangolatore, uccisore | 10669 | slayer\strangolatore, uccisore |
10671 | slays\uccide | 10670 | slays\uccide |
10672 | sleazily\sciatto | 10671 | sleazily\sciatto |
10673 | sleazy\untuoso | 10672 | sleazy\untuoso |
10674 | sleek\netto | 10673 | sleek\netto |
10675 | sleekly\liscia | 10674 | sleekly\liscia |
10676 | sleep\dormire, sonno, dormicchiare | 10675 | sleep\dormire, sonno, dormicchiare |
10677 | sleeper\vagone letto | 10676 | sleeper\vagone letto |
10678 | sleeping car\vagone letto | 10677 | sleeping car\vagone letto |
10679 | sleeping pill\sonnifero | 10678 | sleeping pill\sonnifero |
10680 | sleepless\insonne | 10679 | sleepless\insonne |
10681 | sleeplessness\insonnia | 10680 | sleeplessness\insonnia |
10682 | sleeps\dorme | 10681 | sleeps\dorme |
10683 | sleeve\manica | 10682 | sleeve\manica |
10684 | sleight\disinvoltura | 10683 | sleight\disinvoltura |
10685 | slender\esile, snello, snello | 10684 | slender\esile, snello, snello |
10686 | slice\tagliare, pezzo, fetta | 10685 | slice\tagliare, pezzo, fetta |
10687 | sliced\taglio | 10686 | sliced\taglio |
10688 | slicing\tagliente | 10687 | slicing\tagliente |
10689 | slick\brunire | 10688 | slick\brunire |
10690 | slicker\imbroglione | 10689 | slicker\imbroglione |
10691 | slickness\disinvoltura | 10690 | slickness\disinvoltura |
10692 | slide\spingere | 10691 | slide\spingere |
10693 | slides\spinge | 10692 | slides\spinge |
10694 | sliding roof\tetto scorrevole | 10693 | sliding roof\tetto scorrevole |
10695 | sliding window\finestra scorrevole | 10694 | sliding window\finestra scorrevole |
10696 | slight\magro, scarso, oltraggiare, labkle | 10695 | slight\magro, scarso, oltraggiare, labkle |
10697 | slightness\esiguità | 10696 | slightness\esiguità |
10698 | slim\togliere, snello | 10697 | slim\togliere, snello |
10699 | slime\muco | 10698 | slime\muco |
10700 | sling\avventare | 10699 | sling\avventare |
10701 | slingshot\fionda | 10700 | slingshot\fionda |
10702 | slingshots\avventare | 10701 | slingshots\avventare |
10703 | slink\strisciare | 10702 | slink\strisciare |
10704 | slinks\striscia | 10703 | slinks\striscia |
10705 | slip\scivolare, ordito, vizio | 10704 | slip\scivolare, ordito, vizio |
10706 | slip of paper\ordito | 10705 | slip of paper\ordito |
10707 | slipcover\involucro protettivo | 10706 | slipcover\involucro protettivo |
10708 | slipper\pantofola, ciabatta | 10707 | slipper\pantofola, ciabatta |
10709 | slippery\lubrico | 10708 | slippery\lubrico |
10710 | slippy\agile | 10709 | slippy\agile |
10711 | slipshod\sciatto | 10710 | slipshod\sciatto |
10712 | slipup\vizio | 10711 | slipup\vizio |
10713 | slithery\lubrico | 10712 | slithery\lubrico |
10714 | slits\fessure | 10713 | slits\fessure |
10715 | sliver\scheggiare | 10714 | sliver\scheggiare |
10716 | slob\donnaccia, balordo | 10715 | slob\donnaccia, balordo |
10717 | slobber\poltiglia | 10716 | slobber\poltiglia |
10718 | slobbery\sdolcinato | 10717 | slobbery\sdolcinato |
10719 | slogs\bastonato | 10718 | slogs\bastonato |
10720 | sloop\scialuppa | 10719 | sloop\scialuppa |
10721 | slope\discesa, pendio, pista | 10720 | slope\discesa, pendio, pista |
10722 | sloped\obliquo | 10721 | sloped\obliquo |
10723 | sloping\obliquo | 10722 | sloping\obliquo |
10724 | slopingly\obliquo | 10723 | slopingly\obliquo |
10725 | sloppiness\sciatteria | 10724 | sloppiness\sciatteria |
10726 | sloppy\sciatto | 10725 | sloppy\sciatto |
10727 | slosh\spruzzare | 10726 | slosh\spruzzare |
10728 | slot\fèndere | 10727 | slot\fèndere |
10729 | sloth\pigrizia | 10728 | sloth\pigrizia |
10730 | slothful\pigro | 10729 | slothful\pigro |
10731 | slothfulness\pigrizia | 10730 | slothfulness\pigrizia |
10732 | slouchily\strascicato | 10731 | slouchily\strascicato |
10733 | slouchy\strascicato | 10732 | slouchy\strascicato |
10734 | slow\fiacco, guardingo, lungo | 10733 | slow\fiacco, guardingo, lungo |
10735 | slow down\tardare, allentare | 10734 | slow down\tardare, allentare |
10736 | slow match\miccia | 10735 | slow match\miccia |
10737 | slow motion\rallentatore | 10736 | slow motion\rallentatore |
10738 | slow motion apparatur\rallentatore | 10737 | slow motion apparatur\rallentatore |
10739 | slow worm\orbettino | 10738 | slow worm\orbettino |
10740 | slowdown\allentare | 10739 | slowdown\allentare |
10741 | slower\più lento | 10740 | slower\più lento |
10742 | slowly\placido, lungo, lenta | 10741 | slowly\placido, lungo, lenta |
10743 | slowness\lentezza | 10742 | slowness\lentezza |
10744 | slue\voltare | 10743 | slue\voltare |
10745 | slug\picchiare, lumaca | 10744 | slug\picchiare, lumaca |
10746 | sluggard\pigro | 10745 | sluggard\pigro |
10747 | slugged\picchiai | 10746 | slugged\picchiai |
10748 | sluice\cateratta, emanare | 10747 | sluice\cateratta, emanare |
10749 | slum\catapecchia | 10748 | slum\catapecchia |
10750 | slumber\dormicchiare, sopore | 10749 | slumber\dormicchiare, sopore |
10751 | slumbered\pisolato | 10750 | slumbered\pisolato |
10752 | slumberous\assonnato | 10751 | slumberous\assonnato |
10753 | slumberously\assonnato | 10752 | slumberously\assonnato |
10754 | slump\crollo dei prezzi | 10753 | slump\crollo dei prezzi |
10755 | slunk\strisciato | 10754 | slunk\strisciato |
10756 | slur\calunniare | 10755 | slur\calunniare |
10757 | slush\neve bagnata | 10756 | slush\neve bagnata |
10758 | slut\donnaccia | 10757 | slut\donnaccia |
10759 | sluttish\sciatto | 10758 | sluttish\sciatto |
10760 | sly\furbo | 10759 | sly\furbo |
10761 | slyness\astuzia | 10760 | slyness\astuzia |
10762 | slynesses\astuzia | 10761 | slynesses\astuzia |
10763 | smack\schioccare un bacio | 10762 | smack\schioccare un bacio |
10764 | small\piccolo, minuscolo | 10763 | small\piccolo, minuscolo |
10765 | small blister\vescicola | 10764 | small blister\vescicola |
10766 | small bottle\flacone | 10765 | small bottle\flacone |
10767 | small box\cassettino | 10766 | small box\cassettino |
10768 | small car\vetturetta | 10767 | small car\vetturetta |
10769 | small crumb\briciola | 10768 | small crumb\briciola |
10770 | small house\casetta | 10769 | small house\casetta |
10771 | small intestine\intestino | 10770 | small intestine\intestino |
10772 | small letter\lettera minuscola | 10771 | small letter\lettera minuscola |
10773 | small parcel\pacchetto | 10772 | small parcel\pacchetto |
10774 | small piece\pezzettino | 10773 | small piece\pezzettino |
10775 | small ship\navicella | 10774 | small ship\navicella |
10776 | small wheel\rotellina | 10775 | small wheel\rotellina |
10777 | smallpox\vaioloso | 10776 | smallpox\vaioloso |
10778 | smart\furbo, stile | 10777 | smart\furbo, stile |
10779 | smartly\furbo | 10778 | smartly\furbo |
10780 | smartness\scaltrezza | 10779 | smartness\scaltrezza |
10781 | smash\schiacciare | 10780 | smash\schiacciare |
10782 | smashed\sfracellato | 10781 | smashed\sfracellato |
10783 | smashup\fallimento | 10782 | smashup\fallimento |
10784 | smear\ingrassare | 10783 | smear\ingrassare |
10785 | smeary\untuoso | 10784 | smeary\untuoso |
10786 | smell\profumo, odorato, odoro | 10785 | smell\profumo, odorato, odoro |
10787 | smelling\odorifero | 10786 | smelling\odorifero |
10788 | smells\profuma, odora | 10787 | smells\profuma, odora |
10789 | smelly\muffaticcio | 10788 | smelly\muffaticcio |
10790 | smelt\fusione | 10789 | smelt\fusione |
10791 | smelting\fondente | 10790 | smelting\fondente |
10792 | smile\sorridere | 10791 | smile\sorridere |
10793 | smile at\sorridere | 10792 | smile at\sorridere |
10794 | smirkingly\leccato | 10793 | smirkingly\leccato |
10795 | smith\fabbro | 10794 | smith\fabbro |
10796 | smithereens\brandello | 10795 | smithereens\brandello |
10797 | smithies\forgiare | 10796 | smithies\forgiare |
10798 | smithy\fucina | 10797 | smithy\fucina |
10799 | smock\camice | 10798 | smock\camice |
10800 | smoke\fumo, fumare | 10799 | smoke\fumo, fumare |
10801 | smoked\fumato, affumicato | 10800 | smoked\fumato, affumicato |
10802 | smoker\fumatore | 10801 | smoker\fumatore |
10803 | smokers\fumatore | 10802 | smokers\fumatore |
10804 | smokestack\fumaiuolo | 10803 | smokestack\fumaiuolo |
10805 | smokily\fumoso | 10804 | smokily\fumoso |
10806 | smoking\affumicare | 10805 | smoking\affumicare |
10807 | smooch\pomiciare | 10806 | smooch\pomiciare |
10808 | smooth\levigare, netto | 10807 | smooth\levigare, netto |
10809 | smoothed\lisciato | 10808 | smoothed\lisciato |
10810 | smoothly\equilibrato | 10809 | smoothly\equilibrato |
10811 | smother\affogare | 10810 | smother\affogare |
10812 | smudge\insudiciare | 10811 | smudge\insudiciare |
10813 | smudginess\lordura | 10812 | smudginess\lordura |
10814 | smudgy\untuoso | 10813 | smudgy\untuoso |
10815 | smuggle\contrabbandare | 10814 | smuggle\contrabbandare |
10816 | smuggled\contrabbandato | 10815 | smuggled\contrabbandato |
10817 | smuggler\contrabbandiere | 10816 | smuggler\contrabbandiere |
10818 | smuggling\contrabbando | 10817 | smuggling\contrabbando |
10819 | smutty\fangoso | 10818 | smutty\fangoso |
10820 | snack\spuntino | 10819 | snack\spuntino |
10821 | snag\nocchio | 10820 | snag\nocchio |
10822 | snaggy\nocchieruto | 10821 | snaggy\nocchieruto |
10823 | snail\chiocciola | 10822 | snail\chiocciola |
10824 | snake\serpente | 10823 | snake\serpente |
10825 | snake bite\morso di serpe | 10824 | snake bite\morso di serpe |
10826 | snake venom\veleno di serpente | 10825 | snake venom\veleno di serpente |
10827 | snaky\perfido | 10826 | snaky\perfido |
10828 | snap\dipinto, accertare, accettazione | 10827 | snap\dipinto, accertare, accettazione |
10829 | snapping\accertamento | 10828 | snapping\accertamento |
10830 | snappish\dentellato | 10829 | snappish\dentellato |
10831 | snaps\acchiappa | 10830 | snaps\acchiappa |
10832 | snare\accalappiare, tranello | 10831 | snare\accalappiare, tranello |
10833 | snared\acchiappai | 10832 | snared\acchiappai |
10834 | snares\acchiappa | 10833 | snares\acchiappa |
10835 | snarl\ringhiare | 10834 | snarl\ringhiare |
10836 | snarling\ringhiante | 10835 | snarling\ringhiante |
10837 | snatched up\accogliticcio | 10836 | snatched up\accogliticcio |
10838 | sneak\strisciare | 10837 | sneak\strisciare |
10839 | sneerer\beffatore | 10838 | sneerer\beffatore |
10840 | sneeze\starnutire | 10839 | sneeze\starnutire |
10841 | snicker\ridacchiare | 10840 | snicker\ridacchiare |
10842 | snickering\ridacchiante | 10841 | snickering\ridacchiante |
10843 | sniff\sbuffare | 10842 | sniff\sbuffare |
10844 | sniffy\sdegnoso, muffaticcio | 10843 | sniffy\sdegnoso, muffaticcio |
10845 | snigger\ridacchiare, ghigno | 10844 | snigger\ridacchiare, ghigno |
10846 | snipe\beccaccia | 10845 | snipe\beccaccia |
10847 | sniper\bersagliere | 10846 | sniper\bersagliere |
10848 | snivel\singhiozzare | 10847 | snivel\singhiozzare |
10849 | snobbish\borioso | 10848 | snobbish\borioso |
10850 | snooper\ficcanaso | 10849 | snooper\ficcanaso |
10851 | snoopy\curioso | 10850 | snoopy\curioso |
10852 | snoozing\sonnecchiante | 10851 | snoozing\sonnecchiante |
10853 | snore\russare | 10852 | snore\russare |
10854 | snort\sbuffare | 10853 | snort\sbuffare |
10855 | snot\moccio | 10854 | snot\moccio |
10856 | snottily\moccioso | 10855 | snottily\moccioso |
10857 | snottiness\vigliaccheria | 10856 | snottiness\vigliaccheria |
10858 | snotty\moccioso | 10857 | snotty\moccioso |
10859 | snout\ceffo | 10858 | snout\ceffo |
10860 | snow\nevicare, neve | 10859 | snow\nevicare, neve |
10861 | snow chains\catene da neve | 10860 | snow chains\catene da neve |
10862 | snow covered\nevoso | 10861 | snow covered\nevoso |
10863 | snow flake\fiocco di neve | 10862 | snow flake\fiocco di neve |
10864 | snow flurry\nevischio | 10863 | snow flurry\nevischio |
10865 | snow plough\spazzaneve | 10864 | snow plough\spazzaneve |
10866 | snow storm\tempesta di neve | 10865 | snow storm\tempesta di neve |
10867 | snow white\niveo | 10866 | snow white\niveo |
10868 | snowball\palla di neve | 10867 | snowball\palla di neve |
10869 | snowballing\accelerativo | 10868 | snowballing\accelerativo |
10870 | snowcap\colibri | 10869 | snowcap\colibri |
10871 | snowcapped\nevoso | 10870 | snowcapped\nevoso |
10872 | snowfall\nevata | 10871 | snowfall\nevata |
10873 | snowflake\fiocco di neve | 10872 | snowflake\fiocco di neve |
10874 | snowily\nevoso | 10873 | snowily\nevoso |
10875 | snowing\nevicare | 10874 | snowing\nevicare |
10876 | snowman\pupazzo di neve | 10875 | snowman\pupazzo di neve |
10877 | snowstorm\tempesta di neve | 10876 | snowstorm\tempesta di neve |
10878 | snowy\nevoso | 10877 | snowy\nevoso |
10879 | snuff\raffreddore | 10878 | snuff\raffreddore |
10880 | snuffler\ficcanaso | 10879 | snuffler\ficcanaso |
10881 | snuggle\accarezzare | 10880 | snuggle\accarezzare |
10882 | snugly\accogliente | 10881 | snugly\accogliente |
10883 | so\orbene, cosi, cosiffatto | 10882 | so\orbene, cosi, cosiffatto |
10884 | so far\finora | 10883 | so far\finora |
10885 | so long\arrivederci | 10884 | so long\arrivederci |
10886 | soak\ammollare | 10885 | soak\ammollare |
10887 | soaker\sbevazzatore | 10886 | soaker\sbevazzatore |
10888 | soap\sapone | 10887 | soap\sapone |
10889 | soap bubble\bolla di sapone | 10888 | soap bubble\bolla di sapone |
10890 | soaps\insaponare | 10889 | soaps\insaponare |
10891 | soapstone\lardite | 10890 | soapstone\lardite |
10892 | soar\esalare | 10891 | soar\esalare |
10893 | soaring\ascendente | 10892 | soaring\ascendente |
10894 | sob\singhiozzare | 10893 | sob\singhiozzare |
10895 | sober\digiuno | 10894 | sober\digiuno |
10896 | soberingly\realistico | 10895 | soberingly\realistico |
10897 | soberly\digiuno | 10896 | soberly\digiuno |
10898 | sobriquet\nomignolo | 10897 | sobriquet\nomignolo |
10899 | soccer\pallone | 10898 | soccer\pallone |
10900 | sociable\socievole | 10899 | sociable\socievole |
10901 | sociably\socievole | 10900 | sociably\socievole |
10902 | social\sociale, socievole | 10901 | social\sociale, socievole |
10903 | society\comitiva | 10902 | society\comitiva |
10904 | sock\picchiare, calzetta | 10903 | sock\picchiare, calzetta |
10905 | socked\picchiai | 10904 | socked\picchiai |
10906 | socket\legatura, presa di corrente | 10905 | socket\legatura, presa di corrente |
10907 | sofa\sofà | 10906 | sofa\sofà |
10908 | soft\placido, soffice, dolce | 10907 | soft\placido, soffice, dolce |
10909 | soft boiled\bazzotto | 10908 | soft boiled\bazzotto |
10910 | soft parts\parti molli | 10909 | soft parts\parti molli |
10911 | softies\imbecille | 10910 | softies\imbecille |
10912 | softly\soffice | 10911 | softly\soffice |
10913 | softness\flessibilità, dolcezza | 10912 | softness\flessibilità, dolcezza |
10914 | soggily\umido | 10913 | soggily\umido |
10915 | sogginess\umidità | 10914 | sogginess\umidità |
10916 | soggy\umido | 10915 | soggy\umido |
10917 | soigne\coltivare | 10916 | soigne\coltivare |
10918 | soil\terra, insudiciare, suolo | 10917 | soil\terra, insudiciare, suolo |
10919 | soils\insudiciato | 10918 | soils\insudiciato |
10920 | sojourner\ospite | 10919 | sojourner\ospite |
10921 | sojourners\ospiti | 10920 | sojourners\ospiti |
10922 | solace\consolare | 10921 | solace\consolare |
10923 | solaces\consola | 10922 | solaces\consola |
10924 | solar eclipse\eclissi solare | 10923 | solar eclipse\eclissi solare |
10925 | solar energy\energia solare | 10924 | solar energy\energia solare |
10926 | solar system\sistema solare | 10925 | solar system\sistema solare |
10927 | sold\vende | 10926 | sold\vende |
10928 | solder\ferruminare | 10927 | solder\ferruminare |
10929 | solder joint\saldatura | 10928 | solder joint\saldatura |
10930 | solderable\saldabile | 10929 | solderable\saldabile |
10931 | soldering iron\saldatoio | 10930 | soldering iron\saldatoio |
10932 | soldier\soldato | 10931 | soldier\soldato |
10933 | sole\solo, suola, sogliola | 10932 | sole\solo, suola, sogliola |
10934 | sole distributors\esclusività di spaccio | 10933 | sole distributors\esclusività di spaccio |
10935 | solemn\solenne | 10934 | solemn\solenne |
10936 | solemnity\solennità | 10935 | solemnity\solennità |
10937 | solemnness\solennità | 10936 | solemnness\solennità |
10938 | solenoid\bobina | 10937 | solenoid\bobina |
10939 | solicitor\legale | 10938 | solicitor\legale |
10940 | solid\compatto, fisso, solido, attendìbile | 10939 | solid\compatto, fisso, solido, attendìbile |
10941 | solidness\fermezza | 10940 | solidness\fermezza |
10942 | solitary\singolo, solo | 10941 | solitary\singolo, solo |
10943 | soloist\solista | 10942 | soloist\solista |
10944 | soluble\solubile | 10943 | soluble\solubile |
10945 | solution\dissoluzione | 10944 | solution\dissoluzione |
10946 | solve\sciogliere, chiarire | 10945 | solve\sciogliere, chiarire |
10947 | solvent\solvente | 10946 | solvent\solvente |
10948 | somber\fosco | 10947 | somber\fosco |
10949 | some\qualche, alquanti, qualcosa, parecchio | 10948 | some\qualche, alquanti, qualcosa, parecchio |
10950 | somebody\qualcheduno, alcuno | 10949 | somebody\qualcheduno, alcuno |
10951 | someplace\in qualche luogo | 10950 | someplace\in qualche luogo |
10952 | somersault\salto | 10951 | somersault\salto |
10953 | something\qualcosa, qualcosa | 10952 | something\qualcosa, qualcosa |
10954 | sometimes\talvolta | 10953 | sometimes\talvolta |
10955 | somewhere\in qualche luogo | 10954 | somewhere\in qualche luogo |
10956 | son\figlio, figliuolo | 10955 | son\figlio, figliuolo |
10957 | son-in-law\gènero | 10956 | son-in-law\gènero |
10958 | sonata\sonata | 10957 | sonata\sonata |
10959 | song\canzone | 10958 | song\canzone |
10960 | soon\prossimamente | 10959 | soon\prossimamente |
10961 | soothe\calmare | 10960 | soothe\calmare |
10962 | soothsayer\chiromante | 10961 | soothsayer\chiromante |
10963 | sophomore\allievo | 10962 | sophomore\allievo |
10964 | soprano\soprano | 10963 | soprano\soprano |
10965 | sorb\sorbo | 10964 | sorb\sorbo |
10966 | sore throat\angina | 10965 | sore throat\angina |
10967 | sorenesses\dolere | 10966 | sorenesses\dolere |
10968 | sorrow\pena, fastidio | 10967 | sorrow\pena, fastidio |
10969 | sorrowful\afflitto, disgraziato | 10968 | sorrowful\afflitto, disgraziato |
10970 | sorry\scusa, afflitto, purtroppo | 10969 | sorry\scusa, afflitto, purtroppo |
10971 | sort\fare, sorta, razza, assortire | 10970 | sort\fare, sorta, razza, assortire |
10972 | sortie\perdita | 10971 | sortie\perdita |
10973 | sorties\perdite | 10972 | sorties\perdite |
10974 | sot\sbevazzatore | 10973 | sot\sbevazzatore |
10975 | sound\sano, solido, suono, secondo, rumore, suono | 10974 | sound\sano, solido, suono, secondo, rumore, suono |
10976 | sound-proof\isolamento acustico | 10975 | sound-proof\isolamento acustico |
10977 | soup\minestra | 10976 | soup\minestra |
10978 | sour\acido | 10977 | sour\acido |
10979 | source\sorgente, origine, fonte | 10978 | source\sorgente, origine, fonte |
10980 | south\ostro, sud | 10979 | south\ostro, sud |
10981 | southwester\libeccio | 10980 | southwester\libeccio |
10982 | souvenir\ricordo | 10981 | souvenir\ricordo |
10983 | Soviet Union\unione Sovietica | 10982 | Soviet Union\unione Sovietica |
10984 | sow\seminare | 10983 | sow\seminare |
10985 | sown\seminato | 10984 | sown\seminato |
10986 | sox\calzetta | 10985 | sox\calzetta |
10987 | spa\località balneare | 10986 | spa\località balneare |
10988 | space\spazio, buca | 10987 | space\spazio, buca |
10989 | spaceship\veicolo spaziale | 10988 | spaceship\veicolo spaziale |
10990 | spacious\ampio | 10989 | spacious\ampio |
10991 | spade\vanga, badile | 10990 | spade\vanga, badile |
10992 | Spain\Spagna | 10991 | Spain\Spagna |
10993 | spangle\fronzoli | 10992 | spangle\fronzoli |
10994 | Spaniard\Spagnuolo | 10993 | Spaniard\Spagnuolo |
10995 | spare\tempo libero | 10994 | spare\tempo libero |
10996 | spare part\pezzo di ricambio | 10995 | spare part\pezzo di ricambio |
10997 | spark\trasmettere alla radio | 10996 | spark\trasmettere alla radio |
10998 | sparkle\sfavillare | 10997 | sparkle\sfavillare |
10999 | sparklers\diamanti | 10998 | sparklers\diamanti |
11000 | sparkling wine\spumante | 10999 | sparkling wine\spumante |
11001 | sparrow\passero, astore | 11000 | sparrow\passero, astore |
11002 | spasm\spasma | 11001 | spasm\spasma |
11003 | spatula\spatola | 11002 | spatula\spatola |
11004 | speak\discorrere, favellare | 11003 | speak\discorrere, favellare |
11005 | speak to\rivolgere la parola | 11004 | speak to\rivolgere la parola |
11006 | speaker\altoparlante | 11005 | speaker\altoparlante |
11007 | speaking\parla | 11006 | speaking\parla |
11008 | spear\lancia | 11007 | spear\lancia |
11009 | special field\ramo di competenza | 11008 | special field\ramo di competenza |
11010 | special language\linguaggio tecnico | 11009 | special language\linguaggio tecnico |
11011 | special offer\offerta speciale | 11010 | special offer\offerta speciale |
11012 | specialist\specialista, specialista | 11011 | specialist\specialista, specialista |
11013 | specialist shop\negozio specializzato | 11012 | specialist shop\negozio specializzato |
11014 | specialize\specializzare | 11013 | specialize\specializzare |
11015 | species\fare | 11014 | species\fare |
11016 | specimen\esemplare | 11015 | specimen\esemplare |
11017 | spectacles\occhiali, lente | 11016 | spectacles\occhiali, lente |
11018 | spectator\spettatore | 11017 | spectator\spettatore |
11019 | spectators\spettatore | 11018 | spectators\spettatore |
11020 | speech\idioma, orazione | 11019 | speech\idioma, orazione |
11021 | speed\numero dei giri, volare, andatura, velocità | 11020 | speed\numero dei giri, volare, andatura, velocità |
11022 | speed limit\limite di velocità | 11021 | speed limit\limite di velocità |
11023 | speed up\accelerare | 11022 | speed up\accelerare |
11024 | spell\compitare | 11023 | spell\compitare |
11025 | spend\emettere, passare, largire | 11024 | spend\emettere, passare, largire |
11026 | sperm\sperma | 11025 | sperm\sperma |
11027 | spice\aromatizzare, spezie | 11026 | spice\aromatizzare, spezie |
11028 | spicule\spilla | 11027 | spicule\spilla |
11029 | spider\ragno | 11028 | spider\ragno |
11030 | spiders\filare | 11029 | spiders\filare |
11031 | spill\versamtento | 11030 | spill\versamtento |
11032 | spinach\spinaci, spinacci | 11031 | spinach\spinaci, spinacci |
11033 | spinner\mattoide | 11032 | spinner\mattoide |
11034 | spirit\mente | 11033 | spirit\mente |
11035 | spirit level\livella | 11034 | spirit level\livella |
11036 | spiritlessness\insulsaggine | 11035 | spiritlessness\insulsaggine |
11037 | spirits\acquavite | 11036 | spirits\acquavite |
11038 | spit\spiedo, saliva | 11037 | spit\spiedo, saliva |
11039 | spite\nonostante, rancore | 11038 | spite\nonostante, rancore |
11040 | spitefulness\malignità | 11039 | spitefulness\malignità |
11041 | splendit\brillante | 11040 | splendit\brillante |
11042 | splendor\magnificenza | 11041 | splendor\magnificenza |
11043 | split\fèndere | 11042 | split\fèndere |
11044 | spoil\viziare | 11043 | spoil\viziare |
11045 | spoils\bottino | 11044 | spoils\bottino |
11046 | spoke\raggio | 11045 | spoke\raggio |
11047 | spokeswoman\oratrice | 11046 | spokeswoman\oratrice |
11048 | sponge\spugna | 11047 | sponge\spugna |
11049 | spongy\spugnoso | 11048 | spongy\spugnoso |
11050 | spontaneous\spontaneo | 11049 | spontaneous\spontaneo |
11051 | spook\apparizione | 11050 | spook\apparizione |
11052 | spoon\cucchiaio | 11051 | spoon\cucchiaio |
11053 | spoor\traccia | 11052 | spoor\traccia |
11054 | sports\sport | 11053 | sports\sport |
11055 | sports car\vettura sportiva | 11054 | sports car\vettura sportiva |
11056 | sports ground\campo sportivo | 11055 | sports ground\campo sportivo |
11057 | sports shirt\camicia sportiva | 11056 | sports shirt\camicia sportiva |
11058 | sportsman\sportivo | 11057 | sportsman\sportivo |
11059 | spot\posto, macchia | 11058 | spot\posto, macchia |
11060 | sprawl\espandersi | 11059 | sprawl\espandersi |
11061 | spray\raggio, nebulizzare | 11060 | spray\raggio, nebulizzare |
11062 | spread\espandersi, verniciare, spargere | 11061 | spread\espandersi, verniciare, spargere |
11063 | spreads\allarghi | 11062 | spreads\allarghi |
11064 | spring\piuma, sorgente, abbrivo, saltare, slancio, fonte | 11063 | spring\piuma, sorgente, abbrivo, saltare, slancio, fonte |
11065 | springiness\elasticità | 11064 | springiness\elasticità |
11066 | springtime\primavera | 11065 | springtime\primavera |
11067 | spur\sprone | 11066 | spur\sprone |
11068 | spurt\spruzzare | 11067 | spurt\spruzzare |
11069 | spy\spia | 11068 | spy\spia |
11070 | spying\spionaggio | 11069 | spying\spionaggio |
11071 | squabblers\attaccabriche | 11070 | squabblers\attaccabriche |
11072 | square\quadrangolo, quadrato, quadro, spigoloso, piazza | 11071 | square\quadrangolo, quadrato, quadro, spigoloso, piazza |
11073 | square metre\metro quadrato | 11072 | square metre\metro quadrato |
11074 | squash\succo | 11073 | squash\succo |
11075 | squeal\tradire | 11074 | squeal\tradire |
11076 | squeeze\premere | 11075 | squeeze\premere |
11077 | squid\calamaro | 11076 | squid\calamaro |
11078 | squint\strabico | 11077 | squint\strabico |
11079 | squirrel\scoiattolo | 11078 | squirrel\scoiattolo |
11080 | squirt\spruzzare | 11079 | squirt\spruzzare |
11081 | stable\stanla, stalla | 11080 | stable\stanla, stalla |
11082 | stable in value\di valore fisso | 11081 | stable in value\di valore fisso |
11083 | stadium\stadio | 11082 | stadium\stadio |
11084 | staff\personale, redazione | 11083 | staff\personale, redazione |
11085 | staffer\impiegato | 11084 | staffer\impiegato |
11086 | stage\fase, tribuna, scena, piedistallo | 11085 | stage\fase, tribuna, scena, piedistallo |
11087 | staggers\oscilla | 11086 | staggers\oscilla |
11088 | stain\macchia, insudiciare, imbrattare | 11087 | stain\macchia, insudiciare, imbrattare |
11089 | staircase\scala | 11088 | staircase\scala |
11090 | stairs\scala | 11089 | stairs\scala |
11091 | stake\stanga, missione | 11090 | stake\stanga, missione |
11092 | stall\posizione, stalla | 11091 | stall\posizione, stalla |
11093 | stamp\bollo, bollare, francobollo | 11092 | stamp\bollo, bollare, francobollo |
11094 | stand\stare, granaio, continuare | 11093 | stand\stare, granaio, continuare |
11095 | standalone\indipendente | 11094 | standalone\indipendente |
11096 | standing\in piedi | 11095 | standing\in piedi |
11097 | standing order\incarico permanente | 11096 | standing order\incarico permanente |
11098 | staple\affissare | 11097 | staple\affissare |
11099 | star\stella, vedette | 11098 | star\stella, vedette |
11100 | stardom\vanto | 11099 | stardom\vanto |
11101 | starling\vedette | 11100 | starling\vedette |
11102 | stars\stelle | 11101 | stars\stelle |
11103 | start\esordire, decollare, principio, comincio, inizio | 11102 | start\esordire, decollare, principio, comincio, inizio |
11104 | start up\decollare | 11103 | start up\decollare |
11105 | starter\avviamento | 11104 | starter\avviamento |
11106 | state\esporre, posizione, asserzioni | 11105 | state\esporre, posizione, asserzioni |
11107 | statedly\stabilito | 11106 | statedly\stabilito |
11108 | stately\prestante | 11107 | stately\prestante |
11109 | statement\asserzione, estratto di conto, costatazione | 11108 | statement\asserzione, estratto di conto, costatazione |
11110 | statue\statua | 11109 | statue\statua |
11111 | stay\soggiorno | 11110 | stay\soggiorno |
11112 | stay here\rimanere | 11111 | stay here\rimanere |
11113 | stays\rimane, stà | 11112 | stays\rimane, stà |
11114 | steady\continuo, proporzionato | 11113 | steady\continuo, proporzionato |
11115 | steak\bistecca | 11114 | steak\bistecca |
11116 | steal\sotrarre, rubare | 11115 | steal\sotrarre, rubare |
11117 | steam\vapore | 11116 | steam\vapore |
11118 | steamer\vapore | 11117 | steamer\vapore |
11119 | steamership\vapore | 11118 | steamership\vapore |
11120 | steel\acciao, acciaio | 11119 | steel\acciao, acciaio |
11121 | steelwork\acciaieria | 11120 | steelwork\acciaieria |
11122 | steep\erto | 11121 | steep\erto |
11123 | steer\dirigere | 11122 | steer\dirigere |
11124 | steering wheel\volante | 11123 | steering wheel\volante |
11125 | stem\tronco, sollevare | 11124 | stem\tronco, sollevare |
11126 | stench\lezzo | 11125 | stench\lezzo |
11127 | step\passo, procedere, gradino | 11126 | step\passo, procedere, gradino |
11128 | step by step\graduale | 11127 | step by step\graduale |
11129 | stern\poppa | 11128 | stern\poppa |
11130 | stewards\fattore | 11129 | stewards\fattore |
11131 | stewed fruit\composta | 11130 | stewed fruit\composta |
11132 | stick\incollare, bastone, ficcare | 11131 | stick\incollare, bastone, ficcare |
11133 | sticky\glutinoso | 11132 | sticky\glutinoso |
11134 | stiff\rigido | 11133 | stiff\rigido |
11135 | still\pari, però, calmo, ancora | 11134 | still\pari, però, calmo, ancora |
11136 | stillborn\nato morto | 11135 | stillborn\nato morto |
11137 | stimulate\eccitare, esacerbare | 11136 | stimulate\eccitare, esacerbare |
11138 | sting\colpo, pungere | 11137 | sting\colpo, pungere |
11139 | stingy\avareggiare | 11138 | stingy\avareggiare |
11140 | stink\puzzare, lezzo | 11139 | stink\puzzare, lezzo |
11141 | stipulate\fissare | 11140 | stipulate\fissare |
11142 | stir\muovere, commuòvere | 11141 | stir\muovere, commuòvere |
11143 | stock\immagazzinare | 11142 | stock\immagazzinare |
11144 | Stock Exchange\borsellino | 11143 | Stock Exchange\borsellino |
11145 | stockfish\baccalà | 11144 | stockfish\baccalà |
11146 | stocking\calza, calza maglia | 11145 | stocking\calza, calza maglia |
11147 | stole\acciaio | 11146 | stole\acciaio |
11148 | stomach\ventricolo | 11147 | stomach\ventricolo |
11149 | stomp\beccheggiare | 11148 | stomp\beccheggiare |
11150 | stone\sasso, pierra | 11149 | stone\sasso, pierra |
11151 | stoniness\durezza | 11150 | stoniness\durezza |
11152 | stool\sgabello | 11151 | stool\sgabello |
11153 | stop\ostruire, alt, fermare, fermarsi, fermata, finire | 11152 | stop\ostruire, alt, fermare, fermarsi, fermata, finire |
11154 | storage\immagazzinaggio, deposito, immagazzinamento | 11153 | storage\immagazzinaggio, deposito, immagazzinamento |
11155 | storage battery\accumulatore | 11154 | storage battery\accumulatore |
11156 | store\immagazzinare, campeggio, immagazzinare | 11155 | store\immagazzinare, campeggio, immagazzinare |
11157 | storefront\facciata | 11156 | storefront\facciata |
11158 | storing\accampato | 11157 | storing\accampato |
11159 | stork\cicogna | 11158 | stork\cicogna |
11160 | storm\tempesta, burrasca | 11159 | storm\tempesta, burrasca |
11161 | story\farsa, rapporto, fiaba, racconto, storia | 11160 | story\farsa, rapporto, fiaba, racconto, storia |
11162 | storybook\libro di fiabe | 11161 | storybook\libro di fiabe |
11163 | stove\stufa | 11162 | stove\stufa |
11164 | strabismus\strabico | 11163 | strabismus\strabico |
11165 | straight\pari | 11164 | straight\pari |
11166 | straight away\subito | 11165 | straight away\subito |
11167 | straighten out\drizzare | 11166 | straighten out\drizzare |
11168 | strain\aggravio, fatica | 11167 | strain\aggravio, fatica |
11169 | strait\stretto | 11168 | strait\stretto |
11170 | strange\strano, caratteristico, straniero, estroso | 11169 | strange\strano, caratteristico, straniero, estroso |
11171 | strangling\strozzare | 11170 | strangling\strozzare |
11172 | strap\cinghia | 11171 | strap\cinghia |
11173 | straw\paglia | 11172 | straw\paglia |
11174 | strawbeery\fràgola | 11173 | strawbeery\fràgola |
11175 | strawberry\fragola, fràgola | 11174 | strawberry\fragola, fràgola |
11176 | stream\corrente, ruscello | 11175 | stream\corrente, ruscello |
11177 | streamline\modernizzare | 11176 | streamline\modernizzare |
11178 | street\via, contrada | 11177 | street\via, contrada |
11179 | streets\strade | 11178 | streets\strade |
11180 | strengh\forza, potenza | 11179 | strengh\forza, potenza |
11181 | strenght\forza | 11180 | strenght\forza |
11182 | strength\forza, vigoria | 11181 | strength\forza, vigoria |
11183 | strengthen\amplificare | 11182 | strengthen\amplificare |
11184 | stress\accentuare, accento | 11183 | stress\accentuare, accento |
11185 | stretch\estendersi, stirato, espandere, stendere | 11184 | stretch\estendersi, stirato, espandere, stendere |
11186 | stretcher\bara | 11185 | stretcher\bara |
11187 | strews\sparge | 11186 | strews\sparge |
11188 | strict\severo | 11187 | strict\severo |
11189 | stride\passo | 11188 | stride\passo |
11190 | stridently\tagliente | 11189 | stridently\tagliente |
11191 | strike\affìggere, sciopero, picchiare, scioperare | 11190 | strike\affìggere, sciopero, picchiare, scioperare |
11192 | striked\scioperai | 11191 | striked\scioperai |
11193 | string\spago, cordicella | 11192 | string\spago, cordicella |
11194 | strip\lista, denudare, smontare | 11193 | strip\lista, denudare, smontare |
11195 | striped\zebrato | 11194 | striped\zebrato |
11196 | stroke\accarezzare, riga | 11195 | stroke\accarezzare, riga |
11197 | stroll\passeggiare | 11196 | stroll\passeggiare |
11198 | strong\poderoso, benportante | 11197 | strong\poderoso, benportante |
11199 | strongest\fortissima | 11198 | strongest\fortissima |
11200 | struggle\combattimento | 11199 | struggle\combattimento |
11201 | student\studente | 11200 | student\studente |
11202 | study\fare gli studi superiori | 11201 | study\fare gli studi superiori |
11203 | stuff\stoffa, materiale | 11202 | stuff\stoffa, materiale |
11204 | stuffed\farcito | 11203 | stuffed\farcito |
11205 | stuffing\otturazione | 11204 | stuffing\otturazione |
11206 | stuffs\inzeppa | 11205 | stuffs\inzeppa |
11207 | stuffy\muffaticcio | 11206 | stuffy\muffaticcio |
11208 | stumble\incespicare | 11207 | stumble\incespicare |
11209 | stumps\sbalordito | 11208 | stumps\sbalordito |
11210 | stun\assordare | 11209 | stun\assordare |
11211 | stupefy\ottundere | 11210 | stupefy\ottundere |
11212 | stupefying\assordante | 11211 | stupefying\assordante |
11213 | stupid\stupido, idiotico, balordo | 11212 | stupid\stupido, idiotico, balordo |
11214 | stupid thing\ocaggine | 11213 | stupid thing\ocaggine |
11215 | stupide\stupido | 11214 | stupide\stupido |
11216 | stupidity\ocaggine | 11215 | stupidity\ocaggine |
11217 | stupor\stupirsi | 11216 | stupor\stupirsi |
11218 | sturdy\valido | 11217 | sturdy\valido |
11219 | stutter\tartagliare | 11218 | stutter\tartagliare |
11220 | sty\stalla | 11219 | sty\stalla |
11221 | style\taglio, eloquio | 11220 | style\taglio, eloquio |
11222 | subject\oggetti, casella, assoggettato, soggetto, tema | 11221 | subject\oggetti, casella, assoggettato, soggetto, tema |
11223 | subject matter\tema | 11222 | subject matter\tema |
11224 | subjected\assoggetai | 11223 | subjected\assoggetai |
11225 | subjects\assogetta | 11224 | subjects\assogetta |
11226 | subjugating\vincente | 11225 | subjugating\vincente |
11227 | sublime\elevato | 11226 | sublime\elevato |
11228 | submarine\sommergibile | 11227 | submarine\sommergibile |
11229 | submission\soggiogamento | 11228 | submission\soggiogamento |
11230 | submit\sottoporre, soggiogare | 11229 | submit\sottoporre, soggiogare |
11231 | subscribe\abbonarsi | 11230 | subscribe\abbonarsi |
11232 | subscriber\partecipante, abbonato | 11231 | subscriber\partecipante, abbonato |
11233 | subscription\abbonamento | 11232 | subscription\abbonamento |
11234 | subsidy\sovvenzione | 11233 | subsidy\sovvenzione |
11235 | subsist\esistere | 11234 | subsist\esistere |
11236 | subsribe\firmare | 11235 | subsribe\firmare |
11237 | substance\sostanza | 11236 | substance\sostanza |
11238 | substandard\di valore scadente | 11237 | substandard\di valore scadente |
11239 | substitute\facente funzione | 11238 | substitute\facente funzione |
11240 | substitution\indennizzo | 11239 | substitution\indennizzo |
11241 | subsume\prendere | 11240 | subsume\prendere |
11242 | subterfuge\scusa | 11241 | subterfuge\scusa |
11243 | subtle\astuto, perspicace | 11242 | subtle\astuto, perspicace |
11244 | subtract\falcidiare | 11243 | subtract\falcidiare |
11245 | suburb\sobborgo | 11244 | suburb\sobborgo |
11246 | suburbia\borgo | 11245 | suburbia\borgo |
11247 | subverts\rovinato | 11246 | subverts\rovinato |
11248 | succeed\seguire, riuscire | 11247 | succeed\seguire, riuscire |
11249 | success\successo | 11248 | success\successo |
11250 | successful\correttamente | 11249 | successful\correttamente |
11251 | successfully\correttamente | 11250 | successfully\correttamente |
11252 | successive\consecutivo | 11251 | successive\consecutivo |
11253 | successor\seguace | 11252 | successor\seguace |
11254 | succumb\soccombere | 11253 | succumb\soccombere |
11255 | such\cosiffatto | 11254 | such\cosiffatto |
11256 | such as\come | 11255 | such as\come |
11257 | suck\succhiare, succhiare | 11256 | suck\succhiare, succhiare |
11258 | suck in\aspirare, succhiare | 11257 | suck in\aspirare, succhiare |
11259 | suckle\allattare | 11258 | suckle\allattare |
11260 | suddenly\improvvisamente | 11259 | suddenly\improvvisamente |
11261 | suffer\soffrire, patire | 11260 | suffer\soffrire, patire |
11262 | suffering\soffrire | 11261 | suffering\soffrire |
11263 | suffice\bastare | 11262 | suffice\bastare |
11264 | sufficiently\abbastanza | 11263 | sufficiently\abbastanza |
11265 | suffix\aggiunta | 11264 | suffix\aggiunta |
11266 | suffocate\affogare | 11265 | suffocate\affogare |
11267 | suffocation\affogare | 11266 | suffocation\affogare |
11268 | sugar\zucchero | 11267 | sugar\zucchero |
11269 | sugar bowl\zuccheriera | 11268 | sugar bowl\zuccheriera |
11270 | suggestion\appoggiatura | 11269 | suggestion\appoggiatura |
11271 | suggestions\proposte | 11270 | suggestions\proposte |
11272 | suicide\suicidio | 11271 | suicide\suicidio |
11273 | suit\procedimento, vestito | 11272 | suit\procedimento, vestito |
11274 | suitable\appropriato | 11273 | suitable\appropriato |
11275 | suitcase\valigia | 11274 | suitcase\valigia |
11276 | suitor\pretendente | 11275 | suitor\pretendente |
11277 | sulfurous\fervoroso | 11276 | sulfurous\fervoroso |
11278 | sulk\ammusare | 11277 | sulk\ammusare |
11279 | sulkiness\capriccio | 11278 | sulkiness\capriccio |
11280 | sum up\addizionare | 11279 | sum up\addizionare |
11281 | summary\raccolta | 11280 | summary\raccolta |
11282 | summation\addizione | 11281 | summation\addizione |
11283 | summer\estate, estivo | 11282 | summer\estate, estivo |
11284 | summer holidays\vacanze estive | 11283 | summer holidays\vacanze estive |
11285 | summerly\estivo | 11284 | summerly\estivo |
11286 | summit\cùlmine | 11285 | summit\cùlmine |
11287 | summon\chiamare | 11286 | summon\chiamare |
11288 | summoner\fattorino | 11287 | summoner\fattorino |
11289 | sumptuous\fastoso, lussuoso | 11288 | sumptuous\fastoso, lussuoso |
11290 | sun\sole | 11289 | sun\sole |
11291 | sunbathing\bagno di sole | 11290 | sunbathing\bagno di sole |
11292 | sunburned\abbronzito | 11291 | sunburned\abbronzito |
11293 | Sunday\doménica, domenica | 11292 | Sunday\doménica, domenica |
11294 | sunflower\elianto | 11293 | sunflower\elianto |
11295 | sunny\soleggiato | 11294 | sunny\soleggiato |
11296 | sunstroke\insolazione | 11295 | sunstroke\insolazione |
11297 | super\favolosamente | 11296 | super\favolosamente |
11298 | supercharger\mantice | 11297 | supercharger\mantice |
11299 | supercilious\orgoglioso | 11298 | supercilious\orgoglioso |
11300 | superficial\superficiale | 11299 | superficial\superficiale |
11301 | superior\migliore, più alto, superiore | 11300 | superior\migliore, più alto, superiore |
11302 | superlarge\grossissimo | 11301 | superlarge\grossissimo |
11303 | supernal\ultraterreno | 11302 | supernal\ultraterreno |
11304 | supernatural\ultraterreno | 11303 | supernatural\ultraterreno |
11305 | supervise\vigilare | 11304 | supervise\vigilare |
11306 | supervision\supervisione | 11305 | supervision\supervisione |
11307 | supplement\completamento, integrare | 11306 | supplement\completamento, integrare |
11308 | supplier\fornitore | 11307 | supplier\fornitore |
11309 | supply\fornitura, rifornimento, provvedere, fornire | 11308 | supply\fornitura, rifornimento, provvedere, fornire |
11310 | support\sostenere, appogiare, appoggio, poggiare, sostegno | 11309 | support\sostenere, appogiare, appoggio, poggiare, sostegno |
11311 | supporte\fiancheggiare | 11310 | supporte\fiancheggiare |
11312 | supposable\supposto | 11311 | supposable\supposto |
11313 | suppose\assùmere, supporre | 11312 | suppose\assùmere, supporre |
11314 | supposition\supposizione | 11313 | supposition\supposizione |
11315 | suppository\ugola | 11314 | suppository\ugola |
11316 | suppression\vuoto di cassa | 11315 | suppression\vuoto di cassa |
11317 | sure\sicuramente | 11316 | sure\sicuramente |
11318 | sureness\certezza | 11317 | sureness\certezza |
11319 | surer\più sicuro | 11318 | surer\più sicuro |
11320 | surface\superficie, superficie | 11319 | surface\superficie, superficie |
11321 | surge\frangenti | 11320 | surge\frangenti |
11322 | surgeon\chirurgo | 11321 | surgeon\chirurgo |
11323 | surgery\chirurgìa, pratica | 11322 | surgery\chirurgìa, pratica |
11324 | surmount\eccedere, eccedere | 11323 | surmount\eccedere, eccedere |
11325 | surprise\sorprendere, sorprendere | 11324 | surprise\sorprendere, sorprendere |
11326 | surprised\sorprende, sorprende | 11325 | surprised\sorprende, sorprende |
11327 | surprising\strano, sorprendente | 11326 | surprising\strano, sorprendente |
11328 | surrender\consegnare | 11327 | surrender\consegnare |
11329 | surround\circondare | 11328 | surround\circondare |
11330 | surroundings\dintorni | 11329 | surroundings\dintorni |
11331 | survival\sopportare, sopportare | 11330 | survival\sopportare, sopportare |
11332 | survive\sopravvivere | 11331 | survive\sopravvivere |
11333 | survives\sopravvive | 11332 | survives\sopravvive |
11334 | suspect\dubitare, supporre, presentire | 11333 | suspect\dubitare, supporre, presentire |
11335 | suspence\rinvio | 11334 | suspence\rinvio |
11336 | suspended\interrotto | 11335 | suspended\interrotto |
11337 | suspension\molleggio | 11336 | suspension\molleggio |
11338 | suspicion\sospetto, ombrosità | 11337 | suspicion\sospetto, ombrosità |
11339 | suspicious\sospetto, diffidgnte | 11338 | suspicious\sospetto, diffidgnte |
11340 | sustain\poggiare, appogiare, sostenere | 11339 | sustain\poggiare, appogiare, sostenere |
11341 | swabian\svevo | 11340 | swabian\svevo |
11342 | swallow\rondine, ingoio, divorare | 11341 | swallow\rondine, ingoio, divorare |
11343 | swamp\palude | 11342 | swamp\palude |
11344 | swan\cigno | 11343 | swan\cigno |
11345 | swarthy\farsi scuro | 11344 | swarthy\farsi scuro |
11346 | swatter\ammazzamosche | 11345 | swatter\ammazzamosche |
11347 | sweat\sudare, sudore | 11346 | sweat\sudare, sudore |
11348 | sweater\maglia, pullover | 11347 | sweater\maglia, pullover |
11349 | Swede\Svedese | 11348 | Swede\Svedese |
11350 | Sweden\Svezia | 11349 | Sweden\Svezia |
11351 | sweep\scopare, spazzare, ribaltabile | 11350 | sweep\scopare, spazzare, ribaltabile |
11352 | sweet\caramella, dolce, dessert, abboccato | 11351 | sweet\caramella, dolce, dessert, abboccato |
11353 | sweetness\dolciume | 11352 | sweetness\dolciume |
11354 | sweets\dolci | 11353 | sweets\dolci |
11355 | swell\enfiare, frangenti | 11354 | swell\enfiare, frangenti |
11356 | swiftly\presto | 11355 | swiftly\presto |
11357 | swill\risciacquare | 11356 | swill\risciacquare |
11358 | swim\nuotare, fanno il bagno | 11357 | swim\nuotare, fanno il bagno |
11359 | swimmer\nuoto | 11358 | swimmer\nuoto |
11360 | swimming\nuotare, fanno il bagno | 11359 | swimming\nuotare, fanno il bagno |
11361 | swimming-pool\piscina | 11360 | swimming-pool\piscina |
11362 | swimming trunks\calzoncini da bagno | 11361 | swimming trunks\calzoncini da bagno |
11363 | swims\nuota | 11362 | swims\nuota |
11364 | swindle\capogiro, marioleria | 11363 | swindle\capogiro, marioleria |
11365 | swindler\lestofante | 11364 | swindler\lestofante |
11366 | swing\altalena, brandire | 11365 | swing\altalena, brandire |
11367 | swings\dondolare | 11366 | swings\dondolare |
11368 | Swiss\Svizzero | 11367 | Swiss\Svizzero |
11369 | switch\interruttore | 11368 | switch\interruttore |
11370 | switch off\spegnere, posare, estinguere | 11369 | switch off\spegnere, posare, estinguere |
11371 | switch on\accèndere | 11370 | switch on\accèndere |
@@ -11884,1537 +11883,1536 @@ tobacco\tabacco | |||
11884 | tobacco pouch\borsa del tabacco | 11883 | tobacco pouch\borsa del tabacco |
11885 | tobacconist's\tabaccheria | 11884 | tobacconist's\tabaccheria |
11886 | today\oggi | 11885 | today\oggi |
11887 | toddle\trotterellare | 11886 | toddle\trotterellare |
11888 | toddy\grog | 11887 | toddy\grog |
11889 | toes\dita dei piedi | 11888 | toes\dita dei piedi |
11890 | tog\vestire | 11889 | tog\vestire |
11891 | together\contemporaneamente, unitamente, insieme, comune | 11890 | together\contemporaneamente, unitamente, insieme, comune |
11892 | together with\velluto | 11891 | together with\velluto |
11893 | toggle\bavaglio, verificare | 11892 | toggle\bavaglio, verificare |
11894 | toiled\tormentò | 11893 | toiled\tormentò |
11895 | toiler\lavorante | 11894 | toiler\lavorante |
11896 | toilet\gabinetto, abbigliatura | 11895 | toilet\gabinetto, abbigliatura |
11897 | toilet paper\carta igiènica | 11896 | toilet paper\carta igiènica |
11898 | toils\tormenta | 11897 | toils\tormenta |
11899 | toilsome\faticoso | 11898 | toilsome\faticoso |
11900 | tolerance\tolleranza | 11899 | tolerance\tolleranza |
11901 | tolerate\amméttere, tollerare, sopportare | 11900 | tolerate\amméttere, tollerare, sopportare |
11902 | tolerated\ammesso | 11901 | tolerated\ammesso |
11903 | tolerates\sopporta | 11902 | tolerates\sopporta |
11904 | tolerating\indulgente | 11903 | tolerating\indulgente |
11905 | toleration\sopportazione | 11904 | toleration\sopportazione |
11906 | tollable\soggetto a dogana | 11905 | tollable\soggetto a dogana |
11907 | tolled\picchiai | 11906 | tolled\picchiai |
11908 | tolling\convincente | 11907 | tolling\convincente |
11909 | tomato\pomodoro | 11908 | tomato\pomodoro |
11910 | tomb\sepolcro | 11909 | tomb\sepolcro |
11911 | tomboyish\selvaggio | 11910 | tomboyish\selvaggio |
11912 | tombstone\lapide | 11911 | tombstone\lapide |
11913 | tomfoolery\ocaggine | 11912 | tomfoolery\ocaggine |
11914 | tomorrow\domani, oriente | 11913 | tomorrow\domani, oriente |
11915 | tomorrow morning\domattina | 11914 | tomorrow morning\domattina |
11916 | tomtit\cincia | 11915 | tomtit\cincia |
11917 | tone\suono | 11916 | tone\suono |
11918 | toneless\afono | 11917 | toneless\afono |
11919 | tones\voce, pronuncia | 11918 | tones\voce, pronuncia |
11920 | tongue\idioma, lingua | 11919 | tongue\idioma, lingua |
11921 | tongues\linguale | 11920 | tongues\linguale |
11922 | tonicity\elasticità | 11921 | tonicity\elasticità |
11923 | toning bath\viraggio | 11922 | toning bath\viraggio |
11924 | tonque\lingua | 11923 | tonque\lingua |
11925 | tony\stile | 11924 | tony\stile |
11926 | too\anche, a tavola, troppo, oltremodo | 11925 | too\anche, a tavola, troppo, oltremodo |
11927 | too expensive\impagabile | 11926 | too expensive\impagabile |
11928 | too little\troppo poco | 11927 | too little\troppo poco |
11929 | too much\troppo | 11928 | too much\troppo |
11930 | took\prese | 11929 | took\prese |
11931 | took over\mi incaricai, mi incaricai | 11930 | took over\mi incaricai, mi incaricai |
11932 | toolmaker\attrezzista | 11931 | toolmaker\attrezzista |
11933 | tooth\dente | 11932 | tooth\dente |
11934 | tooth decay\carie | 11933 | tooth decay\carie |
11935 | toothbrush\spazzolino da denti | 11934 | toothbrush\spazzolino da denti |
11936 | toothless\sdentata, sdentato | 11935 | toothless\sdentata, sdentato |
11937 | toothpaste\dentifricio | 11936 | toothpaste\dentifricio |
11938 | toothpick\stuzzicadenti | 11937 | toothpick\stuzzicadenti |
11939 | toothsome\gustoso | 11938 | toothsome\gustoso |
11940 | top\principio, cùlmine, sù, fermatura, cappotta | 11939 | top\principio, cùlmine, sù, fermatura, cappotta |
11941 | top floor\soffitta | 11940 | top floor\soffitta |
11942 | topic\volume, tema | 11941 | topic\volume, tema |
11943 | topical\conforme al tempo | 11942 | topical\conforme al tempo |
11944 | topmast\severità | 11943 | topmast\severità |
11945 | topmost\colonello | 11944 | topmost\colonello |
11946 | topples\cade | 11945 | topples\cade |
11947 | torch\fiàccola | 11946 | torch\fiàccola |
11948 | torches\fiaccole | 11947 | torches\fiaccole |
11949 | tormented\inquieto | 11948 | tormented\inquieto |
11950 | torn off\stracciato | 11949 | torn off\stracciato |
11951 | torn up\stracciato | 11950 | torn up\stracciato |
11952 | torpedo boat\lanciasiluri | 11951 | torpedo boat\lanciasiluri |
11953 | torpid\assordato | 11952 | torpid\assordato |
11954 | torpidity\anestesia | 11953 | torpidity\anestesia |
11955 | torpidness\accidia | 11954 | torpidness\accidia |
11956 | torridness\ustione | 11955 | torridness\ustione |
11957 | tortoise\tartaruga | 11956 | tortoise\tartaruga |
11958 | torture\tortura, tormento | 11957 | torture\tortura, tormento |
11959 | torture chamber\stanza di tortura | 11958 | torture chamber\stanza di tortura |
11960 | torus\circolo | 11959 | torus\circolo |
11961 | toss\avventare | 11960 | toss\avventare |
11962 | total\intero, completo, tutta | 11961 | total\intero, completo, tutta |
11963 | total weight\peso complessivo | 11962 | total weight\peso complessivo |
11964 | totaled\contai | 11963 | totaled\contai |
11965 | totality\complesso | 11964 | totality\complesso |
11966 | totally\completo | 11965 | totally\completo |
11967 | totals\conta | 11966 | totals\conta |
11968 | tots\conta | 11967 | tots\conta |
11969 | totter\barcollare | 11968 | totter\barcollare |
11970 | touch\affisso, inpugnare, toccare | 11969 | touch\affisso, inpugnare, toccare |
11971 | touchdown\ottenere | 11970 | touchdown\ottenere |
11972 | touched\afferrato | 11971 | touched\afferrato |
11973 | touchiness\suscettibilità | 11972 | touchiness\suscettibilità |
11974 | touching\afferrante | 11973 | touching\afferrante |
11975 | touchy\irritabile, sensibile | 11974 | touchy\irritabile, sensibile |
11976 | tough\ostinato | 11975 | tough\ostinato |
11977 | tougher\più duro | 11976 | tougher\più duro |
11978 | toughing\commovente | 11977 | toughing\commovente |
11979 | toughly\solido | 11978 | toughly\solido |
11980 | toughs\lestofante | 11979 | toughs\lestofante |
11981 | tour\circolazione, giro turistico, giro turìstico | 11980 | tour\circolazione, giro turistico, giro turìstico |
11982 | tourism\escursionismo | 11981 | tourism\escursionismo |
11983 | tourist\escursionista, escursionista | 11982 | tourist\escursionista, escursionista |
11984 | tourist class\classe turìstica | 11983 | tourist class\classe turìstica |
11985 | tourist party\gruppo turìstico | 11984 | tourist party\gruppo turìstico |
11986 | tourist traffic\movimento turistico | 11985 | tourist traffic\movimento turistico |
11987 | tournament\competizione, giostra | 11986 | tournament\competizione, giostra |
11988 | tourney\giostra | 11987 | tourney\giostra |
11989 | tousles\arruffato | 11988 | tousles\arruffato |
11990 | tout\arruolare | 11989 | tout\arruolare |
11991 | tow\trascinare, trascinare, estrassi | 11990 | tow\trascinare, trascinare, estrassi |
11992 | tow off\trascinare | 11991 | tow off\trascinare |
11993 | tow rope\cavo di rimorchio | 11992 | tow rope\cavo di rimorchio |
11994 | toward\arrendevole | 11993 | toward\arrendevole |
11995 | towards\in, a tavola, inverso | 11994 | towards\in, a tavola, inverso |
11996 | towel\asciugamano | 11995 | towel\asciugamano |
11997 | toweled\asciugato | 11996 | toweled\asciugato |
11998 | towels\asciugamani | 11997 | towels\asciugamani |
11999 | tower\torre | 11998 | tower\torre |
12000 | towering\poderoso | 11999 | towering\poderoso |
12001 | town\città | 12000 | town\città |
12002 | town-hall\municipio | 12001 | town-hall\municipio |
12003 | town-planing\urbanistica | 12002 | town-planing\urbanistica |
12004 | town council\assessore municipale | 12003 | town council\assessore municipale |
12005 | townplan\piantina | 12004 | townplan\piantina |
12006 | township\congreguari | 12005 | township\congreguari |
12007 | towrope\cavo di rimorchio | 12006 | towrope\cavo di rimorchio |
12008 | toxic\virulento | 12007 | toxic\virulento |
12009 | toxin\veleno | 12008 | toxin\veleno |
12010 | toxins\veleni | 12009 | toxins\veleni |
12011 | toy\giocàttolo | 12010 | toy\giocàttolo |
12012 | toyed\giocai | 12011 | toyed\giocai |
12013 | track\binario | 12012 | track\binario |
12014 | track hound\segugio | 12013 | track hound\segugio |
12015 | tracking\inseguire | 12014 | tracking\inseguire |
12016 | trackless\senza traccia | 12015 | trackless\senza traccia |
12017 | tract\territorio | 12016 | tract\territorio |
12018 | tractive\boccata | 12017 | tractive\boccata |
12019 | trade\impresa, arte, ramo di commercio, commercio | 12018 | trade\impresa, arte, ramo di commercio, commercio |
12020 | trade union\sindacato | 12019 | trade union\sindacato |
12021 | trade unionist\sindacalista | 12020 | trade unionist\sindacalista |
12022 | tradeoff\cambio | 12021 | tradeoff\cambio |
12023 | tradeoffs\scambio | 12022 | tradeoffs\scambio |
12024 | tradesman\omo, signora | 12023 | tradesman\omo, signora |
12025 | tradeunion\sindacato | 12024 | tradeunion\sindacato |
12026 | tradeunionist\sindacalista | 12025 | tradeunionist\sindacalista |
12027 | tradition\tradizione, tradizione | 12026 | tradition\tradizione, tradizione |
12028 | traduce\calunniare | 12027 | traduce\calunniare |
12029 | traffic\traffico | 12028 | traffic\traffico |
12030 | traffic light\semaforo | 12029 | traffic light\semaforo |
12031 | traffic lights\semaforo, semafori, semaforo | 12030 | traffic lights\semaforo, semafori, semaforo |
12032 | traffic sign\cartello stradale | 12031 | traffic sign\cartello stradale |
12033 | trafficking\commercio | 12032 | trafficking\commercio |
12034 | tragedy\tragedia, tragedia | 12033 | tragedy\tragedia, tragedia |
12035 | tragic\tragico | 12034 | tragic\tragico |
12036 | trailer\nudista | 12035 | trailer\nudista |
12037 | train\ammaestrare, educare, allenamento, ferroviario | 12036 | train\ammaestrare, educare, allenamento, ferroviario |
12038 | train of thought\ragionamento | 12037 | train of thought\ragionamento |
12039 | trained\esercitato | 12038 | trained\esercitato |
12040 | trainee\apprendista | 12039 | trainee\apprendista |
12041 | trainer\allenatore | 12040 | trainer\allenatore |
12042 | trainers\allenatore | 12041 | trainers\allenatore |
12043 | training\istruzione, educazione | 12042 | training\istruzione, educazione |
12044 | training ship\nave scuola | 12043 | training ship\nave scuola |
12045 | trains\treni | 12044 | trains\treni |
12046 | traipse\strascicare | 12045 | traipse\strascicare |
12047 | tram\tram | 12046 | tram\tram |
12048 | tramp\vagabondaggio | 12047 | tramp\vagabondaggio |
12049 | transaction\evasione | 12048 | transaction\evasione |
12050 | transcendence\elevatezza | 12049 | transcendence\elevatezza |
12051 | transfer\trasferire, imbarazzato, cessione, trasportare | 12050 | transfer\trasferire, imbarazzato, cessione, trasportare |
12052 | transform\convertire, commutare, alterare | 12051 | transform\convertire, commutare, alterare |
12053 | transient\corruttìbile | 12052 | transient\corruttìbile |
12054 | transit\tragitto | 12053 | transit\tragitto |
12055 | translate\tradurre, tradurre | 12054 | translate\tradurre, tradurre |
12056 | translation\traduzione, traduzione | 12055 | translation\traduzione, traduzione |
12057 | transmarine\oltremarino, oltremarino | 12056 | transmarine\oltremarino, oltremarino |
12058 | transmission\spedizione | 12057 | transmission\spedizione |
12059 | transmit\cèdere, cèdere | 12058 | transmit\cèdere, cèdere |
12060 | transmitter\trasmettitore | 12059 | transmitter\trasmettitore |
12061 | transparent\vaporoso | 12060 | transparent\vaporoso |
12062 | transplant\trapiantare | 12061 | transplant\trapiantare |
12063 | transport\avanzamento, trasporto, trasportare | 12062 | transport\avanzamento, trasporto, trasportare |
12064 | transubstantiate\commutare | 12063 | transubstantiate\commutare |
12065 | transversal\obliquo | 12064 | transversal\obliquo |
12066 | trap\tranello | 12065 | trap\tranello |
12067 | trascan\secchio delle immondizie | 12066 | trascan\secchio delle immondizie |
12068 | trashcan\cestino | 12067 | trashcan\cestino |
12069 | travel\andara | 12068 | travel\andara |
12070 | travel agency\ufficio viaggi | 12069 | travel agency\ufficio viaggi |
12071 | travel office\ufficio viaggi | 12070 | travel office\ufficio viaggi |
12072 | traveler\viaggiatore | 12071 | traveler\viaggiatore |
12073 | traveller\viaggiatore, viaggiatore | 12072 | traveller\viaggiatore, viaggiatore |
12074 | travelling bag\borsa da viaggio | 12073 | travelling bag\borsa da viaggio |
12075 | travelling expenses\spese di viaggio | 12074 | travelling expenses\spese di viaggio |
12076 | tray\vassoio | 12075 | tray\vassoio |
12077 | tread\pedata | 12076 | tread\pedata |
12078 | treasure\tesoro | 12077 | treasure\tesoro |
12079 | treat\coltivare | 12078 | treat\coltivare |
12080 | treatment\elettorale, cura | 12079 | treatment\elettorale, cura |
12081 | tree\albero, àlbero | 12080 | tree\albero, àlbero |
12082 | tree-trunk\tronco | 12081 | tree-trunk\tronco |
12083 | tremendous\grandioso, poderoso | 12082 | tremendous\grandioso, poderoso |
12084 | tremulously\tremante | 12083 | tremulously\tremante |
12085 | trend\declinazione | 12084 | trend\declinazione |
12086 | trial\esperimento, procedimento | 12085 | trial\esperimento, procedimento |
12087 | triangle\triangolo | 12086 | triangle\triangolo |
12088 | tribulation\tormento | 12087 | tribulation\tormento |
12089 | trick\trucco, furberia | 12088 | trick\trucco, furberia |
12090 | tricky\intricato | 12089 | tricky\intricato |
12091 | tricolors\tricolore | 12090 | tricolors\tricolore |
12092 | trifles\quisquilie | 12091 | trifles\quisquilie |
12093 | trimly\curato | 12092 | trimly\curato |
12094 | tringing\tinntinnare, sonare il campanello | 12093 | tringing\tinntinnare, sonare il campanello |
12095 | trip\escursione, tratto, incespicare | 12094 | trip\escursione, tratto, incespicare |
12096 | tripod\cavalletto | 12095 | tripod\cavalletto |
12097 | triviality\insulsaggine | 12096 | triviality\insulsaggine |
12098 | troop\truppa | 12097 | troop\truppa |
12099 | trot\trottare | 12098 | trot\trottare |
12100 | trouble\fastidio, disturbo, fatica, penuria, problema | 12099 | trouble\fastidio, disturbo, fatica, penuria, problema |
12101 | troublesome\noioso | 12100 | troublesome\noioso |
12102 | trough\per mezzo di ciò | 12101 | trough\per mezzo di ciò |
12103 | trousers\pantaloni | 12102 | trousers\pantaloni |
12104 | trout\trota | 12103 | trout\trota |
12105 | truck\camion | 12104 | truck\camion |
12106 | true\vero | 12105 | true\vero |
12107 | trump\brìscola | 12106 | trump\brìscola |
12108 | trumpet\tromba | 12107 | trumpet\tromba |
12109 | trunk\tronco, torso | 12108 | trunk\tronco, torso |
12110 | trust\confidenza | 12109 | trust\confidenza |
12111 | trusted\fidai | 12110 | trusted\fidai |
12112 | truth\verità | 12111 | truth\verità |
12113 | try\esperimentare, provare | 12112 | try\esperimentare, provare |
12114 | tube\tubetto, tubo, tubo | 12113 | tube\tubetto, tubo, tubo |
12115 | Tuesday\martedì, martedí | 12114 | Tuesday\martedì, martedí |
12116 | tug\trascinare | 12115 | tug\trascinare |
12117 | tulip\tulipano | 12116 | tulip\tulipano |
12118 | tumour\tumore | 12117 | tumour\tumore |
12119 | tuna\tonno | 12118 | tuna\tonno |
12120 | tuna-fish\tonno | 12119 | tuna-fish\tonno |
12121 | tune\melodia | 12120 | tune\melodia |
12122 | tunes\esatto | 12121 | tunes\esatto |
12123 | tuning\votazione | 12122 | tuning\votazione |
12124 | tunnel\galleria | 12123 | tunnel\galleria |
12125 | tunny\tonno | 12124 | tunny\tonno |
12126 | turbine\turbina | 12125 | turbine\turbina |
12127 | Turk\Turco | 12126 | Turk\Turco |
12128 | turkey\tacchino | 12127 | turkey\tacchino |
12129 | Turkey\Turchia | 12128 | Turkey\Turchia |
12130 | turn\fila, girata, voltarsi, girare | 12129 | turn\fila, girata, voltarsi, girare |
12131 | turn around\voltare | 12130 | turn around\voltare |
12132 | turn off\posare | 12131 | turn off\posare |
12133 | turn on\accèndere | 12132 | turn on\accèndere |
12134 | turn round\ritornare | 12133 | turn round\ritornare |
12135 | turn screw\cacciavite | 12134 | turn screw\cacciavite |
12136 | turnings\trucioli | 12135 | turnings\trucioli |
12137 | turnip\rapa | 12136 | turnip\rapa |
12138 | turnover\movimento degli affari | 12137 | turnover\movimento degli affari |
12139 | turret\torretta | 12138 | turret\torretta |
12140 | turtle\tartaruga | 12139 | turtle\tartaruga |
12141 | TV\televisione | 12140 | TV\televisione |
12142 | twain\paio | 12141 | twain\paio |
12143 | twelve\dodici | 12142 | twelve\dodici |
12144 | twenty\venti | 12143 | twenty\venti |
12145 | twenty-three\ventitré | 12144 | twenty-three\ventitré |
12146 | twerps\uomini | 12145 | twerps\uomini |
12147 | twiddled\giocai | 12146 | twiddled\giocai |
12148 | twiddles\gioca | 12147 | twiddles\gioca |
12149 | twins\gemelli | 12148 | twins\gemelli |
12150 | twirl\girare | 12149 | twirl\girare |
12151 | twist\storcere, girata | 12150 | twist\storcere, girata |
12152 | twitch\ticchio | 12151 | twitch\ticchio |
12153 | two\due | 12152 | two\due |
12154 | two hundred\duecento | 12153 | two hundred\duecento |
12155 | twofold\dùplice | 12154 | twofold\dùplice |
12156 | twoseater\biposto | 12155 | twoseater\biposto |
12157 | tympanum\timpano | 12156 | tympanum\timpano |
12158 | type\fare, scommettere, tipo, sorta, vergare | 12157 | type\fare, scommettere, tipo, sorta, vergare |
12159 | typhoon\tifone | 12158 | typhoon\tifone |
12160 | typical\tipico | 12159 | typical\tipico |
12161 | tyran\tiranno | 12160 | tyran\tiranno |
12162 | tyrant\tiranno | 12161 | tyrant\tiranno |
12163 | udder\mammella | 12162 | udder\mammella |
12164 | ugly\laido | 12163 | ugly\laido |
12165 | ulcers\ulcere | 12164 | ulcers\ulcere |
12166 | ultimate\alla fin fine | 12165 | ultimate\alla fin fine |
12167 | ultimately\finalmente | 12166 | ultimately\finalmente |
12168 | ultrared\ultrarosso | 12167 | ultrared\ultrarosso |
12169 | umbrageous\ombreggiato | 12168 | umbrageous\ombreggiato |
12170 | umbrella\parapioggia, ombrello | 12169 | umbrella\parapioggia, ombrello |
12171 | umpire\arbitro | 12170 | umpire\arbitro |
12172 | unabating\incessante | 12171 | unabating\incessante |
12173 | unable\inadatto, incapace | 12172 | unable\inadatto, incapace |
12174 | unable to work\inabile al lavoro | 12173 | unable to work\inabile al lavoro |
12175 | unaltered\immutato | 12174 | unaltered\immutato |
12176 | unanimous\a una voce | 12175 | unanimous\a una voce |
12177 | unanimously\a una voce | 12176 | unanimously\a una voce |
12178 | unattempted\intentato | 12177 | unattempted\intentato |
12179 | unauthorized\non autorizzato | 12178 | unauthorized\non autorizzato |
12180 | unavailable\trasceso | 12179 | unavailable\trasceso |
12181 | unavoidable\inevitabile | 12180 | unavoidable\inevitabile |
12182 | unbeknownst\sconosciuto | 12181 | unbeknownst\sconosciuto |
12183 | unbelievable\incredibile | 12182 | unbelievable\incredibile |
12184 | unboundedly\illimitato | 12183 | unboundedly\illimitato |
12185 | unburdened\licenziato | 12184 | unburdened\licenziato |
12186 | uncertain\incerto, malsicuro | 12185 | uncertain\incerto, malsicuro |
12187 | uncertainty\incertezza | 12186 | uncertainty\incertezza |
12188 | unchallengeable\irrefutabile | 12187 | unchallengeable\irrefutabile |
12189 | uncle\zio | 12188 | uncle\zio |
12190 | uncloaking\svelante | 12189 | uncloaking\svelante |
12191 | uncomfortable\scomodo | 12190 | uncomfortable\scomodo |
12192 | unconditional\incondizionato | 12191 | unconditional\incondizionato |
12193 | unconscious\inconsapevole | 12192 | unconscious\inconsapevole |
12194 | unconstitutional\anticostituzionale | 12193 | unconstitutional\anticostituzionale |
12195 | uncork\stappare | 12194 | uncork\stappare |
12196 | unction\unzione | 12195 | unction\unzione |
12197 | unctious\untuoso | 12196 | unctious\untuoso |
12198 | unctuous\cremoso | 12197 | unctuous\cremoso |
12199 | unctuousness\unzione | 12198 | unctuousness\unzione |
12200 | uncurable\inguaribile | 12199 | uncurable\inguaribile |
12201 | uncurbed\sbrogliato | 12200 | uncurbed\sbrogliato |
12202 | undate\ondulato | 12201 | undate\ondulato |
12203 | undazzled\intatto | 12202 | undazzled\intatto |
12204 | undecent\indecente | 12203 | undecent\indecente |
12205 | undecided\incerto | 12204 | undecided\incerto |
12206 | undeck\scoprire | 12205 | undeck\scoprire |
12207 | undefeated\inbattuto | 12206 | undefeated\inbattuto |
12208 | undefiled\pulito | 12207 | undefiled\pulito |
12209 | undefined\vago | 12208 | undefined\vago |
12210 | undeliberate\senza volere | 12209 | undeliberate\senza volere |
12211 | undelightful\mostruoso | 12210 | undelightful\mostruoso |
12212 | undemanding\senza esigenza | 12211 | undemanding\senza esigenza |
12213 | undeniably\incontestabile | 12212 | undeniably\incontestabile |
12214 | under\là sotto, sotto, abbasso | 12213 | under\là sotto, sotto, abbasso |
12215 | under age\minorenne | 12214 | under age\minorenne |
12216 | under carriage\carrello | 12215 | under carriage\carrello |
12217 | under developed\arretrato | 12216 | under developed\arretrato |
12218 | under it\là sotto | 12217 | under it\là sotto |
12219 | underage\minorenne | 12218 | underage\minorenne |
12220 | underarm\avambraccio | 12219 | underarm\avambraccio |
12221 | underbid\offrire sotto costo | 12220 | underbid\offrire sotto costo |
12222 | undercarriage\carrello | 12221 | undercarriage\carrello |
12223 | undercover\riservato | 12222 | undercover\riservato |
12224 | undercut\offrire sotto costo | 12223 | undercut\offrire sotto costo |
12225 | underestimate\sottovalutare | 12224 | underestimate\sottovalutare |
12226 | undergo\vissi | 12225 | undergo\vissi |
12227 | undergraduate\studente | 12226 | undergraduate\studente |
12228 | underground\sotterraneo, sottosuolo | 12227 | underground\sotterraneo, sottosuolo |
12229 | underground railway\ferrovia sotterranea | 12228 | underground railway\ferrovia sotterranea |
12230 | undergrowth\sterpaglia | 12229 | undergrowth\sterpaglia |
12231 | underhand\segreto | 12230 | underhand\segreto |
12232 | underlie\soccombere | 12231 | underlie\soccombere |
12233 | underline\sottolineare | 12232 | underline\sottolineare |
12234 | undermine\minare | 12233 | undermine\minare |
12235 | underneath\sotto | 12234 | underneath\sotto |
12236 | underpants\mutande | 12235 | underpants\mutande |
12237 | underrate\sottovalutare | 12236 | underrate\sottovalutare |
12238 | underscore\sottolineare | 12237 | underscore\sottolineare |
12239 | undersell\offrire sotto costo | 12238 | undersell\offrire sotto costo |
12240 | undershirt\maglia | 12239 | undershirt\maglia |
12241 | underside\parte inferiore | 12240 | underside\parte inferiore |
12242 | undersigned\firmato | 12241 | undersigned\firmato |
12243 | undersized\minuscolo | 12242 | undersized\minuscolo |
12244 | underskirt\sottana | 12243 | underskirt\sottana |
12245 | understand\capire, comprendere | 12244 | understand\capire, comprendere |
12246 | understanded\giudizio, nozione | 12245 | understanded\giudizio, nozione |
12247 | understanding\comprensione | 12246 | understanding\comprensione |
12248 | understands\comprende | 12247 | understands\comprende |
12249 | undertake\intraprendere | 12248 | undertake\intraprendere |
12250 | undertaken\intrapreso | 12249 | undertaken\intrapreso |
12251 | undertakes\intraprende | 12250 | undertakes\intraprende |
12252 | undertaking\intraprendere | 12251 | undertaking\intraprendere |
12253 | undertakings\esercizi | 12252 | undertakings\esercizi |
12254 | undertook\intrapresi | 12253 | undertook\intrapresi |
12255 | undervalue\sottovalutare | 12254 | undervalue\sottovalutare |
12256 | underwear\biancherìa ìntima | 12255 | underwear\biancherìa ìntima |
12257 | underworld\regno dei morti | 12256 | underworld\regno dei morti |
12258 | underwrite\garantire, firmare | 12257 | underwrite\garantire, firmare |
12259 | underwrites\garantito | 12258 | underwrites\garantito |
12260 | underwriting\assicurazione | 12259 | underwriting\assicurazione |
12261 | underwritten\garantito | 12260 | underwritten\garantito |
12262 | undesignated\vago | 12261 | undesignated\vago |
12263 | undesigning\sincero | 12262 | undesigning\sincero |
12264 | undetermined\vago | 12263 | undetermined\vago |
12265 | undeveloped\embrionale | 12264 | undeveloped\embrionale |
12266 | undies\biancherìa ìntima | 12265 | undies\biancherìa ìntima |
12267 | undigested\non digerito | 12266 | undigested\non digerito |
12268 | undilated\non diluito | 12267 | undilated\non diluito |
12269 | undischarged\non pagato | 12268 | undischarged\non pagato |
12270 | undisclosed\anònimo | 12269 | undisclosed\anònimo |
12271 | undistinguishable\indistinto | 12270 | undistinguishable\indistinto |
12272 | undisturbed\indisturbato | 12271 | undisturbed\indisturbato |
12273 | undivorced\sposato | 12272 | undivorced\sposato |
12274 | undoable\solubile | 12273 | undoable\solubile |
12275 | undreamt\inaudito | 12274 | undreamt\inaudito |
12276 | undubbed\anònimo | 12275 | undubbed\anònimo |
12277 | undue\insufficiente | 12276 | undue\insufficiente |
12278 | undulated\ondulatorio | 12277 | undulated\ondulatorio |
12279 | undying\immortale | 12278 | undying\immortale |
12280 | unearth\disotterrare | 12279 | unearth\disotterrare |
12281 | unease\inquietudine | 12280 | unease\inquietudine |
12282 | uneasily\sconfortevole | 12281 | uneasily\sconfortevole |
12283 | uneasy\sconfortevole | 12282 | uneasy\sconfortevole |
12284 | uneatable\immangiabile | 12283 | uneatable\immangiabile |
12285 | uneligible\disadatto | 12284 | uneligible\disadatto |
12286 | unembarrassed\spudorato | 12285 | unembarrassed\spudorato |
12287 | unemphatic\indistinto | 12286 | unemphatic\indistinto |
12288 | unemployable\inservibile | 12287 | unemployable\inservibile |
12289 | unemployed\senza lavoro | 12288 | unemployed\senza lavoro |
12290 | unemployment\disoccupazione | 12289 | unemployment\disoccupazione |
12291 | unendurable\insopportabile | 12290 | unendurable\insopportabile |
12292 | unenjoyable\immangiabile | 12291 | unenjoyable\immangiabile |
12293 | unenriched\non annunciato | 12292 | unenriched\non annunciato |
12294 | unenslaved\esente | 12293 | unenslaved\esente |
12295 | unequable\sleale | 12294 | unequable\sleale |
12296 | unequably\sleale | 12295 | unequably\sleale |
12297 | unequal\ineguale | 12296 | unequal\ineguale |
12298 | unequaled\senza esempio | 12297 | unequaled\senza esempio |
12299 | unequivocal\univoco | 12298 | unequivocal\univoco |
12300 | unescorted\unico | 12299 | unescorted\unico |
12301 | unessential\accidentale | 12300 | unessential\accidentale |
12302 | unestimable\inestimabile | 12301 | unestimable\inestimabile |
12303 | unethical\senza scrupoli | 12302 | unethical\senza scrupoli |
12304 | uneven\ineguale | 12303 | uneven\ineguale |
12305 | unexcelled\insuperato | 12304 | unexcelled\insuperato |
12306 | unexceptional\senza eccezione | 12305 | unexceptional\senza eccezione |
12307 | unexpected\inatteso | 12306 | unexpected\inatteso |
12308 | unexperienced\novizio | 12307 | unexperienced\novizio |
12309 | unexplicit\indistinto | 12308 | unexplicit\indistinto |
12310 | unfailing\senza errori, attendìbile | 12309 | unfailing\senza errori, attendìbile |
12311 | unfairly\sleale | 12310 | unfairly\sleale |
12312 | unfaithful\infedele, infedele | 12311 | unfaithful\infedele, infedele |
12313 | unfaltering\inflessibile | 12312 | unfaltering\inflessibile |
12314 | unfathomable\inpenetrabile | 12313 | unfathomable\inpenetrabile |
12315 | unfatiguing\instancabile | 12314 | unfatiguing\instancabile |
12316 | unfavorable\sfavorevole | 12315 | unfavorable\sfavorevole |
12317 | unfavourable\sfavorevole | 12316 | unfavourable\sfavorevole |
12318 | unfeeling\insensibile | 12317 | unfeeling\insensibile |
12319 | unfeigned\vero | 12318 | unfeigned\vero |
12320 | unfeminine\maschile | 12319 | unfeminine\maschile |
12321 | unfertile\sterile | 12320 | unfertile\sterile |
12322 | unfetter\esimere | 12321 | unfetter\esimere |
12323 | unfinished\incompiuta | 12322 | unfinished\incompiuta |
12324 | unfirm\malfermo | 12323 | unfirm\malfermo |
12325 | unfit\inadatto, inabile al lavoro, disadatto | 12324 | unfit\inadatto, inabile al lavoro, disadatto |
12326 | unfit for work\incapace al lavoro | 12325 | unfit for work\incapace al lavoro |
12327 | unfitness\inattitudine | 12326 | unfitness\inattitudine |
12328 | unfitted\disadatto | 12327 | unfitted\disadatto |
12329 | unfitting\sconveniente | 12328 | unfitting\sconveniente |
12330 | unfix\sciogliere | 12329 | unfix\sciogliere |
12331 | unflagging\instancabile | 12330 | unflagging\instancabile |
12332 | unflavored\senza gusto | 12331 | unflavored\senza gusto |
12333 | unflinching\deciso | 12332 | unflinching\deciso |
12334 | unflustered\equilibrato | 12333 | unflustered\equilibrato |
12335 | unfold\esplicare | 12334 | unfold\esplicare |
12336 | unforced\spontaneo | 12335 | unforced\spontaneo |
12337 | unforeseen\imprevisto | 12336 | unforeseen\imprevisto |
12338 | unforgettable\indimenticabile | 12337 | unforgettable\indimenticabile |
12339 | unforgivable\inperdonabile | 12338 | unforgivable\inperdonabile |
12340 | unforgivably\inperdonabile | 12339 | unforgivably\inperdonabile |
12341 | unforgotten\indimenticato | 12340 | unforgotten\indimenticato |
12342 | unformal\poco stretto | 12341 | unformal\poco stretto |
12343 | unfortunately\per disgrazia, purtroppo | 12342 | unfortunately\per disgrazia, purtroppo |
12344 | unfrank\disonesto | 12343 | unfrank\disonesto |
12345 | unfrequent\raro | 12344 | unfrequent\raro |
12346 | unfrequently\rara | 12345 | unfrequently\rara |
12347 | unfriendly\scortese | 12346 | unfriendly\scortese |
12348 | unfruitful\infecondo | 12347 | unfruitful\infecondo |
12349 | ungainliness\zoticaggine | 12348 | ungainliness\zoticaggine |
12350 | ungentlemanly\sconveniente | 12349 | ungentlemanly\sconveniente |
12351 | ungirt\poco stretto | 12350 | ungirt\poco stretto |
12352 | ungiving\insensibile | 12351 | ungiving\insensibile |
12353 | ungraceful\grossolano | 12352 | ungraceful\grossolano |
12354 | ungracefully\goffa | 12353 | ungracefully\goffa |
12355 | ungraciousness\sfavore | 12354 | ungraciousness\sfavore |
12356 | ungrateful\ingrato | 12355 | ungrateful\ingrato |
12357 | ungratefully\ingrato | 12356 | ungratefully\ingrato |
12358 | ungratefulness\ingratitudine, ingratitudine | 12357 | ungratefulness\ingratitudine, ingratitudine |
12359 | ungrudging\senza invidia | 12358 | ungrudging\senza invidia |
12360 | unhalted\sbrogliato | 12359 | unhalted\sbrogliato |
12361 | unhappily\per disgrazia | 12360 | unhappily\per disgrazia |
12362 | unhappiness\miserabile | 12361 | unhappiness\miserabile |
12363 | unhappy\disgraziato, afflitto | 12362 | unhappy\disgraziato, afflitto |
12364 | unharbored\scoperto | 12363 | unharbored\scoperto |
12365 | unharmed\illeso | 12364 | unharmed\illeso |
12366 | unharmfully\sicura | 12365 | unharmfully\sicura |
12367 | unheated\inosservato | 12366 | unheated\inosservato |
12368 | unhesitant\volonteroso | 12367 | unhesitant\volonteroso |
12369 | unhesitating\immediato | 12368 | unhesitating\immediato |
12370 | unhomogeneous\ineguale | 12369 | unhomogeneous\ineguale |
12371 | unhuman\disumano | 12370 | unhuman\disumano |
12372 | unicellular\unicellulare | 12371 | unicellular\unicellulare |
12373 | unicoloured\unicolore | 12372 | unicoloured\unicolore |
12374 | unicorn\liocorno | 12373 | unicorn\liocorno |
12375 | unidentified\sconosciuto | 12374 | unidentified\sconosciuto |
12376 | unidimensional\lineare | 12375 | unidimensional\lineare |
12377 | unification\unificazione | 12376 | unification\unificazione |
12378 | unified\uniti | 12377 | unified\uniti |
12379 | unifies\unito | 12378 | unifies\unito |
12380 | uniform\unito | 12379 | uniform\unito |
12381 | uniformity\uniformità | 12380 | uniformity\uniformità |
12382 | unilateral\unilaterale | 12381 | unilateral\unilaterale |
12383 | unillumined\ignorante | 12382 | unillumined\ignorante |
12384 | unimaginable\inimmaginabile | 12383 | unimaginable\inimmaginabile |
12385 | unimaginative\senza immagginazione | 12384 | unimaginative\senza immagginazione |
12386 | unimagined\imprevisto | 12385 | unimagined\imprevisto |
12387 | unimpeachable\intoccabile | 12386 | unimpeachable\intoccabile |
12388 | unimpeded\indisturbato | 12387 | unimpeded\indisturbato |
12389 | unimportance\cosa di nessuna importanza | 12388 | unimportance\cosa di nessuna importanza |
12390 | unimportant\senza importanza | 12389 | unimportant\senza importanza |
12391 | unimportntant\senza importanza | 12390 | unimportntant\senza importanza |
12392 | uninformed\ignorante | 12391 | uninformed\ignorante |
12393 | uninhabited\disabitato | 12392 | uninhabited\disabitato |
12394 | unintelligently\insulso | 12393 | unintelligently\insulso |
12395 | unintended\senza volere | 12394 | unintended\senza volere |
12396 | unintentional\senza volere | 12395 | unintentional\senza volere |
12397 | uninterrupted\durabile, incessante | 12396 | uninterrupted\durabile, incessante |
12398 | unintimate\scomodo | 12397 | unintimate\scomodo |
12399 | union\unione, unione, sindacato, lega | 12398 | union\unione, unione, sindacato, lega |
12400 | unique\singolo, unico, straordinario, eccezzionale | 12399 | unique\singolo, unico, straordinario, eccezzionale |
12401 | unison\unisono | 12400 | unison\unisono |
12402 | unisonous\congruente | 12401 | unisonous\congruente |
12403 | unit\meccanismo, elemento, semplice | 12402 | unit\meccanismo, elemento, semplice |
12404 | unitary\unito | 12403 | unitary\unito |
12405 | unite\unificare, unirsi | 12404 | unite\unificare, unirsi |
12406 | united\uniti, in comune | 12405 | united\uniti, in comune |
12407 | unites\unito | 12406 | unites\unito |
12408 | unity\elemento, concordia | 12407 | unity\elemento, concordia |
12409 | universalize\generalizzare | 12408 | universalize\generalizzare |
12410 | universally\notorio | 12409 | universally\notorio |
12411 | universally known\notorio | 12410 | universally known\notorio |
12412 | universe\universo | 12411 | universe\universo |
12413 | university\università, accademia | 12412 | university\università, accademia |
12414 | university graduate\accadèmico | 12413 | university graduate\accadèmico |
12415 | unkind\scortese, insensibile | 12414 | unkind\scortese, insensibile |
12416 | unkindly\insensibile | 12415 | unkindly\insensibile |
12417 | unkindness\insensibilità | 12416 | unkindness\insensibilità |
12418 | unknowable\ignorante | 12417 | unknowable\ignorante |
12419 | unknown\sconosciuto | 12418 | unknown\sconosciuto |
12420 | unlabored\facilmente | 12419 | unlabored\facilmente |
12421 | unlade\scaricare | 12420 | unlade\scaricare |
12422 | unlawful\illegale | 12421 | unlawful\illegale |
12423 | unleaded\senza piombo | 12422 | unleaded\senza piombo |
12424 | unlearn\disimparare | 12423 | unlearn\disimparare |
12425 | unless\tranne che | 12424 | unless\tranne che |
12426 | unlettered\incolto | 12425 | unlettered\incolto |
12427 | unlevel\dìspari | 12426 | unlevel\dìspari |
12428 | unlicensed\non permesso | 12427 | unlicensed\non permesso |
12429 | unlifelike\imitato | 12428 | unlifelike\imitato |
12430 | unlimited\illimitato | 12429 | unlimited\illimitato |
12431 | unlink\separare | 12430 | unlink\separare |
12432 | unlinked\sciolto | 12431 | unlinked\sciolto |
12433 | unliquidated\non pagato | 12432 | unliquidated\non pagato |
12434 | unliteral\figurato | 12433 | unliteral\figurato |
12435 | unload\scaricare, scaricare | 12434 | unload\scaricare, scaricare |
12436 | unloaded\scaricato | 12435 | unloaded\scaricato |
12437 | unloading\scaricare | 12436 | unloading\scaricare |
12438 | unloading point\deposito | 12437 | unloading point\deposito |
12439 | unlock\disserrare | 12438 | unlock\disserrare |
12440 | unloving\frigido | 12439 | unloving\frigido |
12441 | unluckily\per disgrazia | 12440 | unluckily\per disgrazia |
12442 | unlucky\disgraziato, infelice | 12441 | unlucky\disgraziato, infelice |
12443 | unlucky fellow\corvo del malaugurio | 12442 | unlucky fellow\corvo del malaugurio |
12444 | unmagical\insipido | 12443 | unmagical\insipido |
12445 | unmake\levatura | 12444 | unmake\levatura |
12446 | unmannerly\screanzato | 12445 | unmannerly\screanzato |
12447 | unmarried\nubile | 12446 | unmarried\nubile |
12448 | unmasculine\femminino | 12447 | unmasculine\femminino |
12449 | unmask\comprométtere | 12448 | unmask\comprométtere |
12450 | unmasking\smascherante | 12449 | unmasking\smascherante |
12451 | unmerciful\spietato | 12450 | unmerciful\spietato |
12452 | unmindful\sconsiderato | 12451 | unmindful\sconsiderato |
12453 | unmistakably\inconfondibile | 12452 | unmistakably\inconfondibile |
12454 | unmistaken\sicuramente | 12453 | unmistaken\sicuramente |
12455 | unmodified\immutato | 12454 | unmodified\immutato |
12456 | unmovable\immobile | 12455 | unmovable\immobile |
12457 | unmoved\impassibile | 12456 | unmoved\impassibile |
12458 | unnecessary\inutile | 12457 | unnecessary\inutile |
12459 | unneighborly\scortese | 12458 | unneighborly\scortese |
12460 | unnoted\inosservato | 12459 | unnoted\inosservato |
12461 | unnoticeable\inosservato | 12460 | unnoticeable\inosservato |
12462 | unnoticed\inosservato | 12461 | unnoticed\inosservato |
12463 | unobjectionable\legittimo | 12462 | unobjectionable\legittimo |
12464 | unobscured\sereno | 12463 | unobscured\sereno |
12465 | unobservant\disattento | 12464 | unobservant\disattento |
12466 | unobtainable\irraggiungibile | 12465 | unobtainable\irraggiungibile |
12467 | unoccupied\vacante | 12466 | unoccupied\vacante |
12468 | unoffending\innocuo | 12467 | unoffending\innocuo |
12469 | unofficial\ufficioso | 12468 | unofficial\ufficioso |
12470 | unostentatious\senza esigenza | 12469 | unostentatious\senza esigenza |
12471 | unpaid\non pagato | 12470 | unpaid\non pagato |
12472 | unpalatably\cattiva | 12471 | unpalatably\cattiva |
12473 | unparallel\eccezzionale | 12472 | unparallel\eccezzionale |
12474 | unpassable\sconveniente | 12473 | unpassable\sconveniente |
12475 | unperceived\inosservato | 12474 | unperceived\inosservato |
12476 | unpitying\spietato | 12475 | unpitying\spietato |
12477 | unpleasant\laido, dispiacévole | 12476 | unpleasant\laido, dispiacévole |
12478 | unpleasantness\spiacevolezza | 12477 | unpleasantness\spiacevolezza |
12479 | unpleasing\dispiacévole | 12478 | unpleasing\dispiacévole |
12480 | unpredictable\imprevedibile | 12479 | unpredictable\imprevedibile |
12481 | unpremeditated\estemporàneo | 12480 | unpremeditated\estemporàneo |
12482 | unpretentious\senza esigenza | 12481 | unpretentious\senza esigenza |
12483 | unpreventable\inevitabile, estemporàneo | 12482 | unpreventable\inevitabile, estemporàneo |
12484 | unprimitive\colto | 12483 | unprimitive\colto |
12485 | unprincipled\incostante | 12484 | unprincipled\incostante |
12486 | unprofessional\incompetente | 12485 | unprofessional\incompetente |
12487 | unpromising\fallito | 12486 | unpromising\fallito |
12488 | unpromisingly\fallito | 12487 | unpromisingly\fallito |
12489 | unpropitious\sfavorevole | 12488 | unpropitious\sfavorevole |
12490 | unprotected\indifeso | 12489 | unprotected\indifeso |
12491 | unprotected game\libera cacciagione | 12490 | unprotected game\libera cacciagione |
12492 | unquestionable\indiscutibile | 12491 | unquestionable\indiscutibile |
12493 | unquiet\secondo | 12492 | unquiet\secondo |
12494 | unquietly\liuto | 12493 | unquietly\liuto |
12495 | unreachable\irraggiungibile | 12494 | unreachable\irraggiungibile |
12496 | unreadably\illeggìbile | 12495 | unreadably\illeggìbile |
12497 | unreal\fantomatico, spettrale | 12496 | unreal\fantomatico, spettrale |
12498 | unrealistic\irrealistico | 12497 | unrealistic\irrealistico |
12499 | unreasonable\irragionevole | 12498 | unreasonable\irragionevole |
12500 | unreasonableness\insensatezza | 12499 | unreasonableness\insensatezza |
12501 | unreckonable\imprevedibile | 12500 | unreckonable\imprevedibile |
12502 | unrecognized\non riconosciuto | 12501 | unrecognized\non riconosciuto |
12503 | unreflecting\sbadato | 12502 | unreflecting\sbadato |
12504 | unregulated\non regolato | 12503 | unregulated\non regolato |
12505 | unrelenting\inflessibile | 12504 | unrelenting\inflessibile |
12506 | unremitting\incessante | 12505 | unremitting\incessante |
12507 | unremorseful\spietato | 12506 | unremorseful\spietato |
12508 | unrepentant\impenitente | 12507 | unrepentant\impenitente |
12509 | unresting\incessante | 12508 | unresting\incessante |
12510 | unrestrained\sbrogliato | 12509 | unrestrained\sbrogliato |
12511 | unrestricted\illimitato | 12510 | unrestricted\illimitato |
12512 | unright\sleale | 12511 | unright\sleale |
12513 | unrighteous\abietto | 12512 | unrighteous\abietto |
12514 | unripe\acerbo | 12513 | unripe\acerbo |
12515 | unrude\educato | 12514 | unrude\educato |
12516 | unruffled\netto | 12515 | unruffled\netto |
12517 | unruly\disattento | 12516 | unruly\disattento |
12518 | unsalaried\non pagato | 12517 | unsalaried\non pagato |
12519 | unsatisfied\insoddisfatto | 12518 | unsatisfied\insoddisfatto |
12520 | unschooled\incolto | 12519 | unschooled\incolto |
12521 | unscrew\avvitare | 12520 | unscrew\avvitare |
12522 | unscrupulous\senza scrupoli, scoscenziato | 12521 | unscrupulous\senza scrupoli, scoscenziato |
12523 | unseat\esonerare | 12522 | unseat\esonerare |
12524 | unseeable\invisibile | 12523 | unseeable\invisibile |
12525 | unseeing\cieco | 12524 | unseeing\cieco |
12526 | unselfish\altruista | 12525 | unselfish\altruista |
12527 | unselfishness\altruismo | 12526 | unselfishness\altruismo |
12528 | unsettle\inquietare | 12527 | unsettle\inquietare |
12529 | unsettles\inquieto | 12528 | unsettles\inquieto |
12530 | unsettling\inquietante | 12529 | unsettling\inquietante |
12531 | unshackle\esimere | 12530 | unshackle\esimere |
12532 | unshackles\liberato | 12531 | unshackles\liberato |
12533 | unshackling\liberante | 12532 | unshackling\liberante |
12534 | unshapely\deforme | 12533 | unshapely\deforme |
12535 | unsheltered\senza tetto | 12534 | unsheltered\senza tetto |
12536 | unshrinking\intrepido | 12535 | unshrinking\intrepido |
12537 | unskimmed milk\latte integrale | 12536 | unskimmed milk\latte integrale |
12538 | unsmiling\grave | 12537 | unsmiling\grave |
12539 | unsoiled\lindo | 12538 | unsoiled\lindo |
12540 | unsolicited\non richiesto | 12539 | unsolicited\non richiesto |
12541 | unsolicitous\volontario | 12540 | unsolicitous\volontario |
12542 | unsophisticatedly\ingenua | 12541 | unsophisticatedly\ingenua |
12543 | unsounded\fasullo | 12542 | unsounded\fasullo |
12544 | unstable\labile, volubile | 12543 | unstable\labile, volubile |
12545 | unstableness\incertezza | 12544 | unstableness\incertezza |
12546 | unstably\malsicuro | 12545 | unstably\malsicuro |
12547 | unsteadily\malfermo | 12546 | unsteadily\malfermo |
12548 | unsteadiness\incertezza | 12547 | unsteadiness\incertezza |
12549 | unsteady\volubile | 12548 | unsteady\volubile |
12550 | unstopping\aprente | 12549 | unstopping\aprente |
12551 | unstudied\natura secondo | 12550 | unstudied\natura secondo |
12552 | unsubstantiated\infondato | 12551 | unsubstantiated\infondato |
12553 | unsubtle\rozzo, zotico | 12552 | unsubtle\rozzo, zotico |
12554 | unsuitable\disadatto | 12553 | unsuitable\disadatto |
12555 | unsuited\disadatto | 12554 | unsuited\disadatto |
12556 | unsure\malsicuro | 12555 | unsure\malsicuro |
12557 | unsureness\incertezza | 12556 | unsureness\incertezza |
12558 | unsurpassed\insuperato | 12557 | unsurpassed\insuperato |
12559 | unsympathetic\antipàtico | 12558 | unsympathetic\antipàtico |
12560 | untainted\senza macchia | 12559 | untainted\senza macchia |
12561 | untarnished\immacolato | 12560 | untarnished\immacolato |
12562 | unthankful\ingrato | 12561 | unthankful\ingrato |
12563 | unthankfulness\ingratitudine | 12562 | unthankfulness\ingratitudine |
12564 | unthinkable\impensabile | 12563 | unthinkable\impensabile |
12565 | unthought\sconsiderato | 12564 | unthought\sconsiderato |
12566 | untimeliness\tempo inopportuno | 12565 | untimeliness\tempo inopportuno |
12567 | untimely\prematuro | 12566 | untimely\prematuro |
12568 | untirable\instancabile | 12567 | untirable\instancabile |
12569 | unto\a tavola | 12568 | unto\a tavola |
12570 | untrapped\esente | 12569 | untrapped\esente |
12571 | untried\intentato | 12570 | untried\intentato |
12572 | untroubled\indisturbato | 12571 | untroubled\indisturbato |
12573 | untruth\menzogna | 12572 | untruth\menzogna |
12574 | untwine\lievitazione | 12573 | untwine\lievitazione |
12575 | unusable\inservibile | 12574 | unusable\inservibile |
12576 | unusual\strano, inconsueto | 12575 | unusual\strano, inconsueto |
12577 | unusually\raro | 12576 | unusually\raro |
12578 | unusualness\stranezza | 12577 | unusualness\stranezza |
12579 | unutterable\indicibile | 12578 | unutterable\indicibile |
12580 | unvaried\immutato | 12579 | unvaried\immutato |
12581 | unveil\svelare | 12580 | unveil\svelare |
12582 | unveiling\svelante | 12581 | unveiling\svelante |
12583 | unventilated\muffaticcio | 12582 | unventilated\muffaticcio |
12584 | unversed\novizio | 12583 | unversed\novizio |
12585 | unwarily\incauto | 12584 | unwarily\incauto |
12586 | unwarped\spassionato | 12585 | unwarped\spassionato |
12587 | unwarranted\non autorizzato | 12586 | unwarranted\non autorizzato |
12588 | unwary\incauto | 12587 | unwary\incauto |
12589 | unwavering\incrollabile | 12588 | unwavering\incrollabile |
12590 | unwearable\intollerabile | 12589 | unwearable\intollerabile |
12591 | unweary\instancabile | 12590 | unweary\instancabile |
12592 | unwed\nubile | 12591 | unwed\nubile |
12593 | unwell\indisposto | 12592 | unwell\indisposto |
12594 | unwillingly\malvolentieri | 12593 | unwillingly\malvolentieri |
12595 | unwillingness\disgusto | 12594 | unwillingness\disgusto |
12596 | unwind\dipanare | 12595 | unwind\dipanare |
12597 | unwinds\rilassato | 12596 | unwinds\rilassato |
12598 | unwise\imprudente | 12597 | unwise\imprudente |
12599 | unwitting\senza volere | 12598 | unwitting\senza volere |
12600 | unwontedly\inconsueto | 12599 | unwontedly\inconsueto |
12601 | unworried\spensierato | 12600 | unworried\spensierato |
12602 | unworthy\indegno | 12601 | unworthy\indegno |
12603 | unwounded\illeso | 12602 | unwounded\illeso |
12604 | unwrought\grezzo | 12603 | unwrought\grezzo |
12605 | up\sù, a, sù, sù | 12604 | up\sù, a, sù, sù |
12606 | up above\sù | 12605 | up above\sù |
12607 | up there\lassù | 12606 | up there\lassù |
12608 | upbraiding\rimprovero | 12607 | upbraiding\rimprovero |
12609 | upbringing\creanza | 12608 | upbringing\creanza |
12610 | upchuck\vòmito | 12609 | upchuck\vòmito |
12611 | upcoming\prossimamente | 12610 | upcoming\prossimamente |
12612 | upgrade\estensione, ampliare | 12611 | upgrade\estensione, ampliare |
12613 | upgrades\trasportato | 12612 | upgrades\trasportato |
12614 | upgrading\estensione | 12613 | upgrading\estensione |
12615 | upheaval\elevamento | 12614 | upheaval\elevamento |
12616 | uphold\durare | 12615 | uphold\durare |
12617 | upholster\imbottire | 12616 | upholster\imbottire |
12618 | upholsterer\tappezziere | 12617 | upholsterer\tappezziere |
12619 | upkeep\manutenzione | 12618 | upkeep\manutenzione |
12620 | uplift\esaltare | 12619 | uplift\esaltare |
12621 | uplifting\alzante | 12620 | uplifting\alzante |
12622 | upon\a | 12621 | upon\a |
12623 | upper arm\braccio superiore | 12622 | upper arm\braccio superiore |
12624 | upper case character\lettera maiuscola | 12623 | upper case character\lettera maiuscola |
12625 | uppish\impettito | 12624 | uppish\impettito |
12626 | uppity\baldanzoso | 12625 | uppity\baldanzoso |
12627 | upraise\esaltare | 12626 | upraise\esaltare |
12628 | upraising\alzante | 12627 | upraising\alzante |
12629 | upright\pari, verticale | 12628 | upright\pari, verticale |
12630 | uprise\levarsi | 12629 | uprise\levarsi |
12631 | uproar\eccitazione | 12630 | uproar\eccitazione |
12632 | uproariously\liuto | 12631 | uproariously\liuto |
12633 | upshot\risultato | 12632 | upshot\risultato |
12634 | upstage\arrivista | 12633 | upstage\arrivista |
12635 | upstairs\in alto, sù | 12634 | upstairs\in alto, sù |
12636 | upturn\incremento | 12635 | upturn\incremento |
12637 | upwards\sù | 12636 | upwards\sù |
12638 | uranium\uranio | 12637 | uranium\uranio |
12639 | urban\urbano | 12638 | urban\urbano |
12640 | urge\premura, incoraggiare | 12639 | urge\premura, incoraggiare |
12641 | urgency\urgenza | 12640 | urgency\urgenza |
12642 | urgent\urgente, legante | 12641 | urgent\urgente, legante |
12643 | urine\orina, uroscopia | 12642 | urine\orina, uroscopia |
12644 | urn\urna | 12643 | urn\urna |
12645 | us\noi, a noi | 12644 | us\noi, a noi |
12646 | usable\usabile | 12645 | usable\usabile |
12647 | usage\uso | 12646 | usage\uso |
12648 | use\uso, adoperare | 12647 | use\uso, adoperare |
12649 | use up\esaurire | 12648 | use up\esaurire |
12650 | used\usato | 12649 | used\usato |
12651 | useful\utile | 12650 | useful\utile |
12652 | usefull\utile | ||
12653 | useless\inutile, disùtile, inservibile | 12651 | useless\inutile, disùtile, inservibile |
12654 | user\utente | 12652 | user\utente |
12655 | uses\usato | 12653 | uses\usato |
12656 | usual\usuale, ordinario | 12654 | usual\usuale, ordinario |
12657 | usually\ordinario | 12655 | usually\ordinario |
12658 | usuries\usura | 12656 | usuries\usura |
12659 | usury\usura | 12657 | usury\usura |
12660 | Utopian\utopico | 12658 | Utopian\utopico |
12661 | utter\estrinsecare | 12659 | utter\estrinsecare |
12662 | vacant\vacante | 12660 | vacant\vacante |
12663 | vacation\vacanze, ferie | 12661 | vacation\vacanze, ferie |
12664 | vaccinate\vaccinare | 12662 | vaccinate\vaccinare |
12665 | vaccination\vaccinazione | 12663 | vaccination\vaccinazione |
12666 | vaccine\vaccino | 12664 | vaccine\vaccino |
12667 | vacuum\vuotaggine | 12665 | vacuum\vuotaggine |
12668 | vacuum cleaner\aspirapòlvere | 12666 | vacuum cleaner\aspirapòlvere |
12669 | vagabond\vagabondaggio | 12667 | vagabond\vagabondaggio |
12670 | vagina\fòdero | 12668 | vagina\fòdero |
12671 | vailable\disponìbile | 12669 | vailable\disponìbile |
12672 | vain\vano | 12670 | vain\vano |
12673 | valerian\valeriana | 12671 | valerian\valeriana |
12674 | valid\valevole | 12672 | valid\valevole |
12675 | validity\validità | 12673 | validity\validità |
12676 | validness\validità | 12674 | validness\validità |
12677 | valley\valle | 12675 | valley\valle |
12678 | valorize\valorizzare | 12676 | valorize\valorizzare |
12679 | valse\valzer | 12677 | valse\valzer |
12680 | valuable\pregiato | 12678 | valuable\pregiato |
12681 | valuables\valori | 12679 | valuables\valori |
12682 | value\valutare, valore | 12680 | value\valutare, valore |
12683 | valuejudgment\valutazione | 12681 | valuejudgment\valutazione |
12684 | valve\valvola, valvola | 12682 | valve\valvola, valvola |
12685 | vanguard\avanguardia | 12683 | vanguard\avanguardia |
12686 | vanilla\vainiglia | 12684 | vanilla\vainiglia |
12687 | vanish\scomparire | 12685 | vanish\scomparire |
12688 | vanity\fatuità | 12686 | vanity\fatuità |
12689 | vaporizer\vaporizzatore | 12687 | vaporizer\vaporizzatore |
12690 | vapors\evaporazione | 12688 | vapors\evaporazione |
12691 | vapour\vapore | 12689 | vapour\vapore |
12692 | variable\variàbile | 12690 | variable\variàbile |
12693 | variance\contrarietà | 12691 | variance\contrarietà |
12694 | variation\aberrazione | 12692 | variation\aberrazione |
12695 | varicosity\varice | 12693 | varicosity\varice |
12696 | various\differente | 12694 | various\differente |
12697 | variousness\varietà | 12695 | variousness\varietà |
12698 | varnish\vernice | 12696 | varnish\vernice |
12699 | vary\variare | 12697 | vary\variare |
12700 | vascular\recipiente | 12698 | vascular\recipiente |
12701 | vase\vaso, vaso da fiori | 12699 | vase\vaso, vaso da fiori |
12702 | vast\vasto | 12700 | vast\vasto |
12703 | vault\volta | 12701 | vault\volta |
12704 | vaulted\volta | 12702 | vaulted\volta |
12705 | veal\carne di vitello | 12703 | veal\carne di vitello |
12706 | veda\sapere | 12704 | veda\sapere |
12707 | vegetable\pianta | 12705 | vegetable\pianta |
12708 | vegetable soup\zuppa di verdura | 12706 | vegetable soup\zuppa di verdura |
12709 | vegetables\legume | 12707 | vegetables\legume |
12710 | vegetatively\vegetativo | 12708 | vegetatively\vegetativo |
12711 | vehicle\carro, veicolo | 12709 | vehicle\carro, veicolo |
12712 | veil\veletta | 12710 | veil\veletta |
12713 | vein\vena, vena | 12711 | vein\vena, vena |
12714 | veined\venato | 12712 | veined\venato |
12715 | velocity\velocità | 12713 | velocity\velocità |
12716 | velvet\velluto | 12714 | velvet\velluto |
12717 | vending machine\autòma | 12715 | vending machine\autòma |
12718 | vendue\licitazione | 12716 | vendue\licitazione |
12719 | vengeance\vendetta | 12717 | vengeance\vendetta |
12720 | vengeful\vendicativo | 12718 | vengeful\vendicativo |
12721 | venom\veleno | 12719 | venom\veleno |
12722 | ventilate\ventilare, arieggiare, aerare | 12720 | ventilate\ventilare, arieggiare, aerare |
12723 | ventilating\ventilazione | 12721 | ventilating\ventilazione |
12724 | venturous\rischioso | 12722 | venturous\rischioso |
12725 | veraciousness\veridicità | 12723 | veraciousness\veridicità |
12726 | verbal\orale | 12724 | verbal\orale |
12727 | verdict\giudizio | 12725 | verdict\giudizio |
12728 | verifield\giustezza | 12726 | verifield\giustezza |
12729 | verify\verificare, esaminare | 12727 | verify\verificare, esaminare |
12730 | verity\verità | 12728 | verity\verità |
12731 | vermicide\vermifugo | 12729 | vermicide\vermifugo |
12732 | vermilion\cinabro | 12730 | vermilion\cinabro |
12733 | verminous\impidocchiato | 12731 | verminous\impidocchiato |
12734 | versatile\multilaterale | 12732 | versatile\multilaterale |
12735 | version\versione, emissione | 12733 | version\versione, emissione |
12736 | vertical\verticale | 12734 | vertical\verticale |
12737 | vessel\recipiente, vascello | 12735 | vessel\recipiente, vascello |
12738 | vest\maglia | 12736 | vest\maglia |
12739 | vet\veterinario | 12737 | vet\veterinario |
12740 | vetoed\divieto | 12738 | vetoed\divieto |
12741 | vex\molestare | 12739 | vex\molestare |
12742 | vexation\rancore, nonostante | 12740 | vexation\rancore, nonostante |
12743 | via\sopra | 12741 | via\sopra |
12744 | viaduct\viadotto | 12742 | viaduct\viadotto |
12745 | viand\vettovaglia | 12743 | viand\vettovaglia |
12746 | vice\vizio | 12744 | vice\vizio |
12747 | vicious\vizioso | 12745 | vicious\vizioso |
12748 | victim\sacrificio | 12746 | victim\sacrificio |
12749 | victor\vincitore | 12747 | victor\vincitore |
12750 | victorious\vittorioso | 12748 | victorious\vittorioso |
12751 | victory\vincita | 12749 | victory\vincita |
12752 | victualer\fornitore | 12750 | victualer\fornitore |
12753 | victuals\commestìbili | 12751 | victuals\commestìbili |
12754 | videotaping\nota | 12752 | videotaping\nota |
12755 | vie\gareggiare | 12753 | vie\gareggiare |
12756 | viennese\viennese | 12754 | viennese\viennese |
12757 | view\parere, concezione, vista, veduta, visuale | 12755 | view\parere, concezione, vista, veduta, visuale |
12758 | viewer\negli, spettatore | 12756 | viewer\negli, spettatore |
12759 | viewpoint\belvedere | 12757 | viewpoint\belvedere |
12760 | views\vedute | 12758 | views\vedute |
12761 | vigorous\benportante, energico | 12759 | vigorous\benportante, energico |
12762 | vile\infame | 12760 | vile\infame |
12763 | villa\villa | 12761 | villa\villa |
12764 | village\villaggio | 12762 | village\villaggio |
12765 | villain\pezzente | 12763 | villain\pezzente |
12766 | vine\vite, vigna | 12764 | vine\vite, vigna |
12767 | vintage\annata | 12765 | vintage\annata |
12768 | vintner\vinaio | 12766 | vintner\vinaio |
12769 | violation\infrazione | 12767 | violation\infrazione |
12770 | violator\violatore | 12768 | violator\violatore |
12771 | violence\balìa | 12769 | violence\balìa |
12772 | violent\violento, veemente | 12770 | violent\violento, veemente |
12773 | violent temper\irascibilità | 12771 | violent temper\irascibilità |
12774 | violet\viola | 12772 | violet\viola |
12775 | violin\violino | 12773 | violin\violino |
12776 | viper\biscia | 12774 | viper\biscia |
12777 | viral\virus | 12775 | viral\virus |
12778 | virgin\intatto, nuovo di fabbrica | 12776 | virgin\intatto, nuovo di fabbrica |
12779 | virginity\verginità | 12777 | virginity\verginità |
12780 | viril\maschile | 12778 | viril\maschile |
12781 | virtual\virtuale | 12779 | virtual\virtuale |
12782 | virtue\virtù | 12780 | virtue\virtù |
12783 | virtuoso\campione | 12781 | virtuoso\campione |
12784 | virtuous\virtuoso | 12782 | virtuous\virtuoso |
12785 | virtuousness\virtù | 12783 | virtuousness\virtù |
12786 | visa\visto | 12784 | visa\visto |
12787 | visible\visibile | 12785 | visible\visibile |
12788 | visibleness\visibilità | 12786 | visibleness\visibilità |
12789 | visionary\visionario | 12787 | visionary\visionario |
12790 | visit\ispezionare, visitare, visita, vìsita | 12788 | visit\ispezionare, visitare, visita, vìsita |
12791 | visitor\visitatore | 12789 | visitor\visitatore |
12792 | visors\ombrelli | 12790 | visors\ombrelli |
12793 | vital\importante | 12791 | vital\importante |
12794 | vitality\vitalità | 12792 | vitality\vitalità |
12795 | vitamin\vitamina | 12793 | vitamin\vitamina |
12796 | vitiation\depravazione | 12794 | vitiation\depravazione |
12797 | viticulture\enofilo | 12795 | viticulture\enofilo |
12798 | vituperation\vituperio | 12796 | vituperation\vituperio |
12799 | vividly\chiara | 12797 | vividly\chiara |
12800 | vocabulary\dizionario | 12798 | vocabulary\dizionario |
12801 | vocalists\cantante | 12799 | vocalists\cantante |
12802 | vocation\appello | 12800 | vocation\appello |
12803 | vocational\per lavoro | 12801 | vocational\per lavoro |
12804 | vodka\vodka | 12802 | vodka\vodka |
12805 | voice\voce | 12803 | voice\voce |
12806 | voiceclerk\fatturista | 12804 | voiceclerk\fatturista |
12807 | void\vuotaggine | 12805 | void\vuotaggine |
12808 | volcano\vulano | 12806 | volcano\vulano |
12809 | volitive\essere disposto | 12807 | volitive\essere disposto |
12810 | voltage\voltaggio | 12808 | voltage\voltaggio |
12811 | volume\volume, volume | 12809 | volume\volume, volume |
12812 | voluntary\volontario | 12810 | voluntary\volontario |
12813 | volunteer\volontario, volontario | 12811 | volunteer\volontario, volontario |
12814 | volution\voluta | 12812 | volution\voluta |
12815 | vomit\vòmito | 12813 | vomit\vòmito |
12816 | voracious\vorace, àvido | 12814 | voracious\vorace, àvido |
12817 | vote\voce, eleggere, votazione, votare, elezione | 12815 | vote\voce, eleggere, votazione, votare, elezione |
12818 | vouch\obbligarsi | 12816 | vouch\obbligarsi |
12819 | voucher\biglietto di garanzia | 12817 | voucher\biglietto di garanzia |
12820 | vulcanize\vulcanizzare | 12818 | vulcanize\vulcanizzare |
12821 | vulnerability\vulnerabilità | 12819 | vulnerability\vulnerabilità |
12822 | vulnerable\vulnerabile | 12820 | vulnerable\vulnerabile |
12823 | vulture\avvoltoio | 12821 | vulture\avvoltoio |
12824 | wadding\incluso | 12822 | wadding\incluso |
12825 | wade\sguazzare | 12823 | wade\sguazzare |
12826 | wads\fardello | 12824 | wads\fardello |
12827 | wage\stipendio | 12825 | wage\stipendio |
12828 | wages\stipendio | 12826 | wages\stipendio |
12829 | waist\vita | 12827 | waist\vita |
12830 | waistband\lega | 12828 | waistband\lega |
12831 | waiter\cameriere | 12829 | waiter\cameriere |
12832 | wake\destare | 12830 | wake\destare |
12833 | wake up\svegliarsi | 12831 | wake up\svegliarsi |
12834 | walk\camminare, corro, giro | 12832 | walk\camminare, corro, giro |
12835 | walked\andai | 12833 | walked\andai |
12836 | wall\parete, muro | 12834 | wall\parete, muro |
12837 | wallet\portamonete | 12835 | wallet\portamonete |
12838 | wallpaper\tappezzeria | 12836 | wallpaper\tappezzeria |
12839 | walnut-tree\noce | 12837 | walnut-tree\noce |
12840 | waltz\valzer | 12838 | waltz\valzer |
12841 | want\vuole, volere | 12839 | want\vuole, volere |
12842 | wants\desiderare | 12840 | wants\desiderare |
12843 | war\guerra, guerre | 12841 | war\guerra, guerre |
12844 | wardens\guardiana | 12842 | wardens\guardiana |
12845 | wardrobe\vestiario | 12843 | wardrobe\vestiario |
12846 | warehouse\campeggio | 12844 | warehouse\campeggio |
12847 | warm up\riscaldare | 12845 | warm up\riscaldare |
12848 | warmth\calore | 12846 | warmth\calore |
12849 | warn\dissuadere | 12847 | warn\dissuadere |
12850 | warn out\stanco | 12848 | warn out\stanco |
12851 | warning\ammonizione | 12849 | warning\ammonizione |
12852 | warrant\mandato di cattura | 12850 | warrant\mandato di cattura |
12853 | warrantirs\facoltà | 12851 | warrantirs\facoltà |
12854 | warranty\garanzia | 12852 | warranty\garanzia |
12855 | warship\nave da guerra | 12853 | warship\nave da guerra |
12856 | was absent\mancai | 12854 | was absent\mancai |
12857 | was allowed\potei | 12855 | was allowed\potei |
12858 | was astonished\mi stupii | 12856 | was astonished\mi stupii |
12859 | was called\mi chiamavo | 12857 | was called\mi chiamavo |
12860 | was cold\gelai | 12858 | was cold\gelai |
12861 | was valid\valsi | 12859 | was valid\valsi |
12862 | wash\lavare | 12860 | wash\lavare |
12863 | washbasin\catinella | 12861 | washbasin\catinella |
12864 | washer\lavatore | 12862 | washer\lavatore |
12865 | washing\lavabiancheria | 12863 | washing\lavabiancheria |
12866 | washing machine\lavabiancheria | 12864 | washing machine\lavabiancheria |
12867 | wasp\vespa | 12865 | wasp\vespa |
12868 | waste\sperperare, eremo | 12866 | waste\sperperare, eremo |
12869 | waste of time\perdita di tempo | 12867 | waste of time\perdita di tempo |
12870 | waste water\acqua di scarico | 12868 | waste water\acqua di scarico |
12871 | wastes\sperperato | 12869 | wastes\sperperato |
12872 | watch\orologio, sorvegliare | 12870 | watch\orologio, sorvegliare |
12873 | watch dog\cane da guardia | 12871 | watch dog\cane da guardia |
12874 | watch television\televisione | 12872 | watch television\televisione |
12875 | watchdog\cane da guardia | 12873 | watchdog\cane da guardia |
12876 | watcher\guardia | 12874 | watcher\guardia |
12877 | watchful\vigile | 12875 | watchful\vigile |
12878 | watchfulness\vigilanza | 12876 | watchfulness\vigilanza |
12879 | watchmaker\orologiaio | 12877 | watchmaker\orologiaio |
12880 | water\diluviare, annaffiare, acqua, bagnare | 12878 | water\diluviare, annaffiare, acqua, bagnare |
12881 | water colour\acquerello | 12879 | water colour\acquerello |
12882 | water for rinsing\lavatura | 12880 | water for rinsing\lavatura |
12883 | water gun\autopompa | 12881 | water gun\autopompa |
12884 | water melon\anguria | 12882 | water melon\anguria |
12885 | water rat\lupo di mare | 12883 | water rat\lupo di mare |
12886 | water sports\sport acquatico | 12884 | water sports\sport acquatico |
12887 | watercolor\acquerello | 12885 | watercolor\acquerello |
12888 | waterfall\cascata | 12886 | waterfall\cascata |
12889 | watergate\cateratta | 12887 | watergate\cateratta |
12890 | watering can\annaffiatoio | 12888 | watering can\annaffiatoio |
12891 | watermark\filigrana | 12889 | watermark\filigrana |
12892 | watermarks\filigrana | 12890 | watermarks\filigrana |
12893 | watermelon\anguria | 12891 | watermelon\anguria |
12894 | waterproof\impermabile | 12892 | waterproof\impermabile |
12895 | watertight\impermabile | 12893 | watertight\impermabile |
12896 | watery\acquoso | 12894 | watery\acquoso |
12897 | wattle\ostacolo | 12895 | wattle\ostacolo |
12898 | watts\bassofondo | 12896 | watts\bassofondo |
12899 | wave\flutto, sventolare, soffiare, svolazzare, onda | 12897 | wave\flutto, sventolare, soffiare, svolazzare, onda |
12900 | wave about\brandire | 12898 | wave about\brandire |
12901 | wave to\accennare | 12899 | wave to\accennare |
12902 | wavelike\ondulatorio | 12900 | wavelike\ondulatorio |
12903 | waver\svolazzare, barcollare, ondeggiamento, vertere | 12901 | waver\svolazzare, barcollare, ondeggiamento, vertere |
12904 | wavered\oscillai | 12902 | wavered\oscillai |
12905 | wavering\vacilncnve | 12903 | wavering\vacilncnve |
12906 | wavers\oscilla | 12904 | wavers\oscilla |
12907 | wavily\ondulato | 12905 | wavily\ondulato |
12908 | wavy\ondulato | 12906 | wavy\ondulato |
12909 | wax\cera, créscere | 12907 | wax\cera, créscere |
12910 | wax candle\candela di cera | 12908 | wax candle\candela di cera |
12911 | wax figure\figura di cera | 12909 | wax figure\figura di cera |
12912 | waxwork\figura di cera | 12910 | waxwork\figura di cera |
12913 | waxy\cèreo | 12911 | waxy\cèreo |
12914 | way\cammino, strada, strada, direzione | 12912 | way\cammino, strada, strada, direzione |
12915 | way bill\lettera di porto | 12913 | way bill\lettera di porto |
12916 | way out\esito, passaggio | 12914 | way out\esito, passaggio |
12917 | wayfarer\viaggiatore | 12915 | wayfarer\viaggiatore |
12918 | waylay\appostare | 12916 | waylay\appostare |
12919 | wayward\bisbètico | 12917 | wayward\bisbètico |
12920 | waywardness\cocciutaggine | 12918 | waywardness\cocciutaggine |
12921 | WC\abbigliatura | 12919 | WC\abbigliatura |
12922 | we\noi altri, noi | 12920 | we\noi altri, noi |
12923 | weak\gràcile, debole, labkle | 12921 | weak\gràcile, debole, labkle |
12924 | weaken\indebolire, debilitare | 12922 | weaken\indebolire, debilitare |
12925 | weakening\indebolimento | 12923 | weakening\indebolimento |
12926 | weakling\codardo | 12924 | weakling\codardo |
12927 | weakly\gràcile | 12925 | weakly\gràcile |
12928 | weakness\mancare, debolezza, debolezza | 12926 | weakness\mancare, debolezza, debolezza |
12929 | weakness of character\debolezza di carattere | 12927 | weakness of character\debolezza di carattere |
12930 | weaknesses\indebolire | 12928 | weaknesses\indebolire |
12931 | wealth\opulenza | 12929 | wealth\opulenza |
12932 | wealthier\ricco | 12930 | wealthier\ricco |
12933 | wealthily\ricco | 12931 | wealthily\ricco |
12934 | wealthiness\opulenza | 12932 | wealthiness\opulenza |
12935 | wealthy\ricco, benestante, facoltoso | 12933 | wealthy\ricco, benestante, facoltoso |
12936 | wean\divezzare | 12934 | wean\divezzare |
12937 | weans\divezzo | 12935 | weans\divezzo |
12938 | weapon\armi, arma, arme | 12936 | weapon\armi, arma, arme |
12939 | weapond\armato | 12937 | weapond\armato |
12940 | weaponless\disarmato | 12938 | weaponless\disarmato |
12941 | weaponries\armi | 12939 | weaponries\armi |
12942 | weapons\nucleare | 12940 | weapons\nucleare |
12943 | wear\abbigliare | 12941 | wear\abbigliare |
12944 | wear and tear\logorio | 12942 | wear and tear\logorio |
12945 | wear out\logorare | 12943 | wear out\logorare |
12946 | wearer\vettore | 12944 | wearer\vettore |
12947 | weariness\sfinitezza | 12945 | weariness\sfinitezza |
12948 | wearout\logorio | 12946 | wearout\logorio |
12949 | weary\stracco | 12947 | weary\stracco |
12950 | weather chart\carta meteorologica | 12948 | weather chart\carta meteorologica |
12951 | weather forecast\bollettino meteorològico | 12949 | weather forecast\bollettino meteorològico |
12952 | weather observation\meteorologia | 12950 | weather observation\meteorologia |
12953 | weather vane\voltagabbana | 12951 | weather vane\voltagabbana |
12954 | weave\tessere | 12952 | weave\tessere |
12955 | weaver\tessitore | 12953 | weaver\tessitore |
12956 | weavers\tessitrice | 12954 | weavers\tessitrice |
12957 | wedding\nozze, sposalizio | 12955 | wedding\nozze, sposalizio |
12958 | wedding dress\abito da sposa | 12956 | wedding dress\abito da sposa |
12959 | wedding ring\anello matrimoniale | 12957 | wedding ring\anello matrimoniale |
12960 | wedge\mania, cùneo | 12958 | wedge\mania, cùneo |
12961 | wedge shaped\cuneiforme | 12959 | wedge shaped\cuneiforme |
12962 | wedges\cunei | 12960 | wedges\cunei |
12963 | Wednesday\mercoledí | 12961 | Wednesday\mercoledí |
12964 | wednesday\mercoledì | 12962 | wednesday\mercoledì |
12965 | wee\minuscolo | 12963 | wee\minuscolo |
12966 | weed\erbaccia | 12964 | weed\erbaccia |
12967 | weeding\sarchiare | 12965 | weeding\sarchiare |
12968 | week\settimana | 12966 | week\settimana |
12969 | weekend\fine settimana | 12967 | weekend\fine settimana |
12970 | weekly\ebdomadario, settimanalmente | 12968 | weekly\ebdomadario, settimanalmente |
12971 | weekly paper\ebdomadario | 12969 | weekly paper\ebdomadario |
12972 | weeks\settimane | 12970 | weeks\settimane |
12973 | ween\sperare | 12971 | ween\sperare |
12974 | weep\lacrimare | 12972 | weep\lacrimare |
12975 | weeps\piange, piansi | 12973 | weeps\piange, piansi |
12976 | weigh\pesare | 12974 | weigh\pesare |
12977 | weighable\pesabile | 12975 | weighable\pesabile |
12978 | weightily\pesante | 12976 | weightily\pesante |
12979 | weights\pesi | 12977 | weights\pesi |
12980 | weighty\pesante | 12978 | weighty\pesante |
12981 | welcome\salutare, gradito, desiderato, benvenuto | 12979 | welcome\salutare, gradito, desiderato, benvenuto |
12982 | weld\saldare | 12980 | weld\saldare |
12983 | welding\sudore, saldare | 12981 | welding\sudore, saldare |
12984 | welfare\benessere, assistenza pubblica | 12982 | welfare\benessere, assistenza pubblica |
12985 | well\bene, benessere, pozzo, sano, interamente, ebbene | 12983 | well\bene, benessere, pozzo, sano, interamente, ebbene |
12986 | well behaved\educato | 12984 | well behaved\educato |
12987 | well built\benfatto | 12985 | well built\benfatto |
12988 | well deserved\benemèrito | 12986 | well deserved\benemèrito |
12989 | well fed\ben nutrito | 12987 | well fed\ben nutrito |
12990 | well meant\con buone intenzioni | 12988 | well meant\con buone intenzioni |
12991 | well off\benestante | 12989 | well off\benestante |
12992 | well read\erudito | 12990 | well read\erudito |
12993 | well thought out\ponderato | 12991 | well thought out\ponderato |
12994 | well tried\esperimentato | 12992 | well tried\esperimentato |
12995 | well understood\beninteso | 12993 | well understood\beninteso |
12996 | well well\così così | 12994 | well well\così così |
12997 | wellfare\benessere | 12995 | wellfare\benessere |
12998 | welling\scaturente | 12996 | welling\scaturente |
12999 | wells\pozzo | 12997 | wells\pozzo |
13000 | welter weight\welter | 12998 | welter weight\welter |
13001 | welters\ondeggiamento | 12999 | welters\ondeggiamento |
13002 | wench\prostituta | 13000 | wench\prostituta |
13003 | wenches\fornicare | 13001 | wenches\fornicare |
13004 | wend\dirìgersi | 13002 | wend\dirìgersi |
13005 | went up\salii | 13003 | went up\salii |
13006 | wept\piansi | 13004 | wept\piansi |
13007 | were\sua | 13005 | were\sua |
13008 | werewolf\lupo mannaro | 13006 | werewolf\lupo mannaro |
13009 | west\ovest | 13007 | west\ovest |
13010 | West\ovest | 13008 | West\ovest |
13011 | western\occidentale | 13009 | western\occidentale |
13012 | westwards\verso ovest | 13010 | westwards\verso ovest |
13013 | wet\umido, inumidire, bagnato | 13011 | wet\umido, inumidire, bagnato |
13014 | wether\montone | 13012 | wether\montone |
13015 | wetly\bagnato | 13013 | wetly\bagnato |
13016 | wetness\fradicezza | 13014 | wetness\fradicezza |
13017 | whack\legnare | 13015 | whack\legnare |
13018 | whacked\picchiai | 13016 | whacked\picchiai |
13019 | whacking\convincente | 13017 | whacking\convincente |
13020 | whale\balena | 13018 | whale\balena |
13021 | whaler\baleniere | 13019 | whaler\baleniere |
13022 | whalers\baleniere | 13020 | whalers\baleniere |
13023 | wham\battuta | 13021 | wham\battuta |
13024 | whammy\assalto | 13022 | whammy\assalto |
13025 | whams\colpi | 13023 | whams\colpi |
13026 | wharf\molo | 13024 | wharf\molo |
13027 | what\che, che cosa | 13025 | what\che, che cosa |
13028 | whatever\checché | 13026 | whatever\checché |
13029 | wheat\frumento, grano | 13027 | wheat\frumento, grano |
13030 | wheel\ruota | 13028 | wheel\ruota |
13031 | wheel barrow\carriola | 13029 | wheel barrow\carriola |
13032 | wheel chair\sedia a rotelle | 13030 | wheel chair\sedia a rotelle |
13033 | wheel suspension\sospensione delle ruote | 13031 | wheel suspension\sospensione delle ruote |
13034 | wheelbarrows\carriola | 13032 | wheelbarrows\carriola |
13035 | wheelchair\sedia a rotelle | 13033 | wheelchair\sedia a rotelle |
13036 | wheeled\carreggiabile | 13034 | wheeled\carreggiabile |
13037 | wheeler\veicolo | 13035 | wheeler\veicolo |
13038 | wheels\arruotare, ruote | 13036 | wheels\arruotare, ruote |
13039 | wheeze\anelare | 13037 | wheeze\anelare |
13040 | wheezy\affannoso | 13038 | wheezy\affannoso |
13041 | whelp\cucciolo | 13039 | whelp\cucciolo |
13042 | when\laddove, appena che, quando, allorché | 13040 | when\laddove, appena che, quando, allorché |
13043 | whence\donde | 13041 | whence\donde |
13044 | whenever\ogni qual volta | 13042 | whenever\ogni qual volta |
13045 | whensoever\qualvolta | 13043 | whensoever\qualvolta |
13046 | where\ove, presso al quale, dove | 13044 | where\ove, presso al quale, dove |
13047 | whereabout\rimanenza, luogo di soggiorno | 13045 | whereabout\rimanenza, luogo di soggiorno |
13048 | whereas\presso al quale | 13046 | whereas\presso al quale |
13049 | whereby\per cui, presso al quale | 13047 | whereby\per cui, presso al quale |
13050 | wherefore\per quale scopo | 13048 | wherefore\per quale scopo |
13051 | wherefrom\donde | 13049 | wherefrom\donde |
13052 | whereof\a che cosa | 13050 | whereof\a che cosa |
13053 | whereon\onde | 13051 | whereon\onde |
13054 | wheresoever\dovunque | 13052 | wheresoever\dovunque |
13055 | whereto\ove | 13053 | whereto\ove |
13056 | wherry\yole | 13054 | wherry\yole |
13057 | whether\come se | 13055 | whether\come se |
13058 | whetstone\cote | 13056 | whetstone\cote |
13059 | whey\siero | 13057 | whey\siero |
13060 | which\che | 13058 | which\che |
13061 | whichever\che | 13059 | whichever\che |
13062 | whiffed\soffiai | 13060 | whiffed\soffiai |
13063 | whiffing\soffiante | 13061 | whiffing\soffiante |
13064 | whiffs\soffia | 13062 | whiffs\soffia |
13065 | while\finchè, laddove, durante, tratto di tempo | 13063 | while\finchè, laddove, durante, tratto di tempo |
13066 | whilst\laddove, durante | 13064 | whilst\laddove, durante |
13067 | whim\capriccio | 13065 | whim\capriccio |
13068 | whimper\mugolare | 13066 | whimper\mugolare |
13069 | whimsical\bizzaro | 13067 | whimsical\bizzaro |
13070 | whimsy\capriccio | 13068 | whimsy\capriccio |
13071 | whine\mugolare | 13069 | whine\mugolare |
13072 | whinny\nitrire | 13070 | whinny\nitrire |
13073 | whip\frusta | 13071 | whip\frusta |
13074 | whipped cream\panna montata | 13072 | whipped cream\panna montata |
13075 | whips\frustare | 13073 | whips\frustare |
13076 | whirlpool\vortice | 13074 | whirlpool\vortice |
13077 | whirlpools\vortice | 13075 | whirlpools\vortice |
13078 | whirlwind\turbine | 13076 | whirlwind\turbine |
13079 | whisper\sussurrare | 13077 | whisper\sussurrare |
13080 | whisper to\sussurrare | 13078 | whisper to\sussurrare |
13081 | whistle\fischio, fischietto, zufolare | 13079 | whistle\fischio, fischietto, zufolare |
13082 | whistled\fischio | 13080 | whistled\fischio |
13083 | whistles\zufolare, fischia | 13081 | whistles\zufolare, fischia |
13084 | whit\un pochino | 13082 | whit\un pochino |
13085 | white\bianco | 13083 | white\bianco |
13086 | white cabbage\cavolo bianco | 13084 | white cabbage\cavolo bianco |
13087 | white haired\canuto | 13085 | white haired\canuto |
13088 | white hot\incandescente | 13086 | white hot\incandescente |
13089 | white wine\vernaccia | 13087 | white wine\vernaccia |
13090 | whitely\biancastro | 13088 | whitely\biancastro |
13091 | whiteness\bianca | 13089 | whiteness\bianca |
13092 | whiter\uomo bianco | 13090 | whiter\uomo bianco |
13093 | whites\sai | 13091 | whites\sai |
13094 | whitethorn\biancospino | 13092 | whitethorn\biancospino |
13095 | whitish\biancastro | 13093 | whitish\biancastro |
13096 | whitlow\circolazione | 13094 | whitlow\circolazione |
13097 | Whitsun\pentecoste | 13095 | Whitsun\pentecoste |
13098 | whitsuntide\pentecoste | 13096 | whitsuntide\pentecoste |
13099 | whittle\intagliare | 13097 | whittle\intagliare |
13100 | whiz\grillare | 13098 | whiz\grillare |
13101 | who\che, chi | 13099 | who\che, chi |
13102 | whoever\chiunque | 13100 | whoever\chiunque |
13103 | whole\tutta | 13101 | whole\tutta |
13104 | wholehearted\serio | 13102 | wholehearted\serio |
13105 | wholeness\interezza | 13103 | wholeness\interezza |
13106 | wholesale dealer\grossista | 13104 | wholesale dealer\grossista |
13107 | wholesaler\grossista | 13105 | wholesaler\grossista |
13108 | wholesome\sano | 13106 | wholesome\sano |
13109 | wholesomely\sana | 13107 | wholesomely\sana |
13110 | wholly\interamente | 13108 | wholly\interamente |
13111 | whom\chi | 13109 | whom\chi |
13112 | whooping cough\tosse canina | 13110 | whooping cough\tosse canina |
13113 | whoopingcough\tosse canina | 13111 | whoopingcough\tosse canina |
13114 | whopping\colossale | 13112 | whopping\colossale |
13115 | whore\prostituta | 13113 | whore\prostituta |
13116 | whores\fornicare | 13114 | whores\fornicare |
13117 | whorl\voluta | 13115 | whorl\voluta |
13118 | whose\di questo, di che | 13116 | whose\di questo, di che |
13119 | whoseever\che | 13117 | whoseever\che |
13120 | why\per quale ragione | 13118 | why\per quale ragione |
13121 | wick\stoppino | 13119 | wick\stoppino |
13122 | wicked\malizioso, cattivo | 13120 | wicked\malizioso, cattivo |
13123 | wickedness\nequizia | 13121 | wickedness\nequizia |
13124 | wide\largo, vasto, latitudine | 13122 | wide\largo, vasto, latitudine |
13125 | widely\vasto | 13123 | widely\vasto |
13126 | widely ramified\molto ramificato | 13124 | widely ramified\molto ramificato |
13127 | wideness\vastità | 13125 | wideness\vastità |
13128 | widespread\molto diffuso | 13126 | widespread\molto diffuso |
13129 | widget\fatto giuochi di prestigio | 13127 | widget\fatto giuochi di prestigio |
13130 | widow\védova | 13128 | widow\védova |
13131 | widowed\védovo | 13129 | widowed\védovo |
13132 | widower\védovo | 13130 | widower\védovo |
13133 | width\latitudine, vastità | 13131 | width\latitudine, vastità |
13134 | wielding\esercente | 13132 | wielding\esercente |
13135 | wife\moglie, femmina, signora | 13133 | wife\moglie, femmina, signora |
13136 | wig\parrucca | 13134 | wig\parrucca |
13137 | wihtout\senza | 13135 | wihtout\senza |
13138 | wild\licenzioso | 13136 | wild\licenzioso |
13139 | wild boar\verro | 13137 | wild boar\verro |
13140 | wilderness\luogo selvaggio | 13138 | wilderness\luogo selvaggio |
13141 | wilful\intenzionale | 13139 | wilful\intenzionale |
13142 | will\volli, favore, testamento, volere, diventa | 13140 | will\volli, favore, testamento, volere, diventa |
13143 | will less\abulico | 13141 | will less\abulico |
13144 | will power\volitivo | 13142 | will power\volitivo |
13145 | willed\voglioso | 13143 | willed\voglioso |
13146 | willful\intenzionale | 13144 | willful\intenzionale |
13147 | willing\disposto, volonteroso, essere disposto, vuole | 13145 | willing\disposto, volonteroso, essere disposto, vuole |
13148 | willingly\volontieri, volontiere | 13146 | willingly\volontieri, volontiere |
13149 | willow\salcio | 13147 | willow\salcio |
13150 | wimble\trapano | 13148 | wimble\trapano |
13151 | win\guadagnare, vincere | 13149 | win\guadagnare, vincere |
13152 | wind\avvoltare, avvolgere, soffiare, vento | 13150 | wind\avvoltare, avvolgere, soffiare, vento |
13153 | wind force\velocità del vento | 13151 | wind force\velocità del vento |
13154 | wind gauge\anemometro | 13152 | wind gauge\anemometro |
13155 | wind mill\mulino a vento | 13153 | wind mill\mulino a vento |
13156 | wind tunnel\canale aerodinamico | 13154 | wind tunnel\canale aerodinamico |
13157 | wind up\avvoltare | 13155 | wind up\avvoltare |
13158 | windcheater\giacca a vento | 13156 | windcheater\giacca a vento |
13159 | window\fetta, finestra, finestrino, oblo | 13157 | window\fetta, finestra, finestrino, oblo |
13160 | window pane\lastra | 13158 | window pane\lastra |
13161 | window seat\posto alla finestra | 13159 | window seat\posto alla finestra |
13162 | window sill\davanzale | 13160 | window sill\davanzale |
13163 | windows\finestrino | 13161 | windows\finestrino |
13164 | windscreen\parabrezzo | 13162 | windscreen\parabrezzo |
13165 | windshield\parabrezzo | 13163 | windshield\parabrezzo |
13166 | windy\ventoso | 13164 | windy\ventoso |
13167 | wine\vino | 13165 | wine\vino |
13168 | wine cask\botte di vino | 13166 | wine cask\botte di vino |
13169 | wine cellars\casa vinicola | 13167 | wine cellars\casa vinicola |
13170 | wine glas\bicchiere da vino | 13168 | wine glas\bicchiere da vino |
13171 | wine growing\enofilo | 13169 | wine growing\enofilo |
13172 | wine list\lista dei vini | 13170 | wine list\lista dei vini |
13173 | wine merchant\vinaio | 13171 | wine merchant\vinaio |
13174 | wine store\bottiglierìa | 13172 | wine store\bottiglierìa |
13175 | wine tavern\fiaschetteria | 13173 | wine tavern\fiaschetteria |
13176 | winegrower\viticoltore | 13174 | winegrower\viticoltore |
13177 | wines\vini | 13175 | wines\vini |
13178 | wing of a door\battente | 13176 | wing of a door\battente |
13179 | winner\vincitore | 13177 | winner\vincitore |
13180 | winning\vittorioso | 13178 | winning\vittorioso |
13181 | wins\vince | 13179 | wins\vince |
13182 | winter\verno | 13180 | winter\verno |
13183 | winter sleep\letargo | 13181 | winter sleep\letargo |
13184 | winter sports\sport invernale | 13182 | winter sports\sport invernale |
13185 | winterly\invernale | 13183 | winterly\invernale |
13186 | wintertime\verno | 13184 | wintertime\verno |
13187 | wipes out\estingue | 13185 | wipes out\estingue |
13188 | wire\cavo, fil di ferro | 13186 | wire\cavo, fil di ferro |
13189 | wire brush\spazzola metallica | 13187 | wire brush\spazzola metallica |
13190 | wire fencing\traliccio | 13188 | wire fencing\traliccio |
13191 | wires\fili | 13189 | wires\fili |
13192 | wisdom\saggezza, saggezza, freccia | 13190 | wisdom\saggezza, saggezza, freccia |
13193 | wisdom tooth\dente del giudizio | 13191 | wisdom tooth\dente del giudizio |
13194 | wise\saggio, ragionevole | 13192 | wise\saggio, ragionevole |
13195 | wiseacre\saputello | 13193 | wiseacre\saputello |
13196 | wish\voto | 13194 | wish\voto |
13197 | wished\desiderato | 13195 | wished\desiderato |
13198 | wishes\desidero | 13196 | wishes\desidero |
13199 | wishing\volitivo | 13197 | wishing\volitivo |
13200 | wisp\strofinaccio | 13198 | wisp\strofinaccio |
13201 | wistful\malinconico | 13199 | wistful\malinconico |
13202 | wistfully\malinconico | 13200 | wistfully\malinconico |
13203 | wit\giudizio | 13201 | wit\giudizio |
13204 | witch\maga, fattucchiera | 13202 | witch\maga, fattucchiera |
13205 | witchcraft\stregoneria | 13203 | witchcraft\stregoneria |
13206 | witcheries\forza magica | 13204 | witcheries\forza magica |
13207 | witches\stregare | 13205 | witches\stregare |
13208 | with\con | 13206 | with\con |
13209 | with it\onde | 13207 | with it\onde |
13210 | with pleasure\volontiere | 13208 | with pleasure\volontiere |
13211 | with what\con che cosa | 13209 | with what\con che cosa |
13212 | withal\presso | 13210 | withal\presso |
13213 | withdraw\levare | 13211 | withdraw\levare |
13214 | withdrawn\ritirato | 13212 | withdrawn\ritirato |
13215 | wither\appassire, sfiorire | 13213 | wither\appassire, sfiorire |
13216 | withers\sfiorito | 13214 | withers\sfiorito |
13217 | withhold\ritenere | 13215 | withhold\ritenere |
13218 | within\dentro, frà | 13216 | within\dentro, frà |
13219 | within the company\aziendale | 13217 | within the company\aziendale |
13220 | without\senza | 13218 | without\senza |
13221 | without contradiction\non contradditorio | 13219 | without contradiction\non contradditorio |
13222 | without engagement\non impegnativo | 13220 | without engagement\non impegnativo |
13223 | without exception\senza eccezione | 13221 | without exception\senza eccezione |
13224 | without fail\immancabile | 13222 | without fail\immancabile |
13225 | without holding on\a mano libera | 13223 | without holding on\a mano libera |
13226 | without notice\senza avviso | 13224 | without notice\senza avviso |
13227 | without permission\non permesso | 13225 | without permission\non permesso |
13228 | without result\senza esito | 13226 | without result\senza esito |
13229 | without using cash\senza denaro in contanti | 13227 | without using cash\senza denaro in contanti |
13230 | witness\testimonio | 13228 | witness\testimonio |
13231 | witnesses\testimoniare | 13229 | witnesses\testimoniare |
13232 | witnessing\testimoniante | 13230 | witnessing\testimoniante |
13233 | wits\giudizio | 13231 | wits\giudizio |
13234 | witted\sensato | 13232 | witted\sensato |
13235 | witticism\lazzo | 13233 | witticism\lazzo |
13236 | wittily\faceto | 13234 | wittily\faceto |
13237 | wizard\fattucchiera | 13235 | wizard\fattucchiera |
13238 | wobbliness\incertezza | 13236 | wobbliness\incertezza |
13239 | wobbly\malfermo | 13237 | wobbly\malfermo |
13240 | woes\soffrire | 13238 | woes\soffrire |
13241 | woken\svegliato | 13239 | woken\svegliato |
13242 | wolf\lupo | 13240 | wolf\lupo |
13243 | wolfish\lupino | 13241 | wolfish\lupino |
13244 | wolfish appetite\fame da lupo | 13242 | wolfish appetite\fame da lupo |
13245 | wolves\lupi | 13243 | wolves\lupi |
13246 | woman\donna, signora, morta | 13244 | woman\donna, signora, morta |
13247 | woman hairdresser\parrucchiera | 13245 | woman hairdresser\parrucchiera |
13248 | womanliness\femminilità | 13246 | womanliness\femminilità |
13249 | women\donne | 13247 | women\donne |
13250 | women folk\donne | 13248 | women folk\donne |
13251 | womenfolk\donne | 13249 | womenfolk\donne |
13252 | won\vinsi, vinto | 13250 | won\vinsi, vinto |
13253 | wonder\miracolo, stupore, chièdere | 13251 | wonder\miracolo, stupore, chièdere |
13254 | wonder of the world\prodigio | 13252 | wonder of the world\prodigio |
13255 | wondered\sorpreso | 13253 | wondered\sorpreso |
13256 | wonderful\favolosamente, grandioso, magnifico | 13254 | wonderful\favolosamente, grandioso, magnifico |
13257 | wonderfulness\splendore | 13255 | wonderfulness\splendore |
13258 | wondering\stupefatto | 13256 | wondering\stupefatto |
13259 | wonderingly\attònito | 13257 | wonderingly\attònito |
13260 | wonderment\stupore | 13258 | wonderment\stupore |
13261 | wondrous\meraviglioso | 13259 | wondrous\meraviglioso |
13262 | wondrousness\stupirsi | 13260 | wondrousness\stupirsi |
13263 | woo\arruolare | 13261 | woo\arruolare |
13264 | wood\legno, selva, boschetto, legna | 13262 | wood\legno, selva, boschetto, legna |
13265 | wood grouse\urogallo | 13263 | wood grouse\urogallo |
13266 | woodpecker\picchio | 13264 | woodpecker\picchio |
13267 | woods\bosco, selve | 13265 | woods\bosco, selve |
13268 | woodsman\guardiaboschi | 13266 | woodsman\guardiaboschi |
13269 | woodstrawberry\fragola dei boschi | 13267 | woodstrawberry\fragola dei boschi |
13270 | woodworker\legnaiolo | 13268 | woodworker\legnaiolo |
13271 | woody\legnoso | 13269 | woody\legnoso |
13272 | wool\lana | 13270 | wool\lana |
13273 | wool spinning mill\lanificio | 13271 | wool spinning mill\lanificio |
13274 | woollen\volere, laneria | 13272 | woollen\volere, laneria |
13275 | woolly\lanuto | 13273 | woolly\lanuto |
13276 | wools\lana | 13274 | wools\lana |
13277 | woozily\farraginoso | 13275 | woozily\farraginoso |
13278 | word\formulare, parola, vocàbolo | 13276 | word\formulare, parola, vocàbolo |
13279 | wording\lettera | 13277 | wording\lettera |
13280 | wordlessness\mutezza | 13278 | wordlessness\mutezza |
13281 | words\parole | 13279 | words\parole |
13282 | wore\portai | 13280 | wore\portai |
13283 | work\lavorare, funzionare, lavorare, opera, occupazione | 13281 | work\lavorare, funzionare, lavorare, opera, occupazione |
13284 | work in a factory\lavoro in fabbrica | 13282 | work in a factory\lavoro in fabbrica |
13285 | work out\calcolare | 13283 | work out\calcolare |
13286 | worked up\irritato, nervoso, emozionato | 13284 | worked up\irritato, nervoso, emozionato |
13287 | working hours\orario di lavoro | 13285 | working hours\orario di lavoro |
13288 | working time\orario di lavoro | 13286 | working time\orario di lavoro |
13289 | workman\artéfice | 13287 | workman\artéfice |
13290 | workmanship\equipaggio | 13288 | workmanship\equipaggio |
13291 | works council\consiglio aziendale | 13289 | works council\consiglio aziendale |
13292 | workshop\corso avanzato, officina | 13290 | workshop\corso avanzato, officina |
13293 | workshops\officine | 13291 | workshops\officine |
13294 | world\mondo | 13292 | world\mondo |
13295 | world domination\dominio del mondo | 13293 | world domination\dominio del mondo |
13296 | world economy\economia mondiale | 13294 | world economy\economia mondiale |
13297 | world history\storia universale | 13295 | world history\storia universale |
13298 | world outlook\concezione del mondo | 13296 | world outlook\concezione del mondo |
13299 | world record\primato mondiale | 13297 | world record\primato mondiale |
13300 | world war\guerra mondiale | 13298 | world war\guerra mondiale |
13301 | worldliness\mondanità | 13299 | worldliness\mondanità |
13302 | worldly\laico | 13300 | worldly\laico |
13303 | worldly innocent\estraneo al mondo | 13301 | worldly innocent\estraneo al mondo |
13304 | worm\baco, verme | 13302 | worm\baco, verme |
13305 | wormwood\vermut | 13303 | wormwood\vermut |
13306 | worn\portato | 13304 | worn\portato |
13307 | worn out\liso | 13305 | worn out\liso |
13308 | worried\pieno di timore, affannoso | 13306 | worried\pieno di timore, affannoso |
13309 | worries\stare in pensiero | 13307 | worries\stare in pensiero |
13310 | worriment\seccatura | 13308 | worriment\seccatura |
13311 | worrisome\noioso | 13309 | worrisome\noioso |
13312 | worry\fastidio, stare in pensiero, disturba, arrabiare | 13310 | worry\fastidio, stare in pensiero, disturba, arrabiare |
13313 | worryingly\inquietante | 13311 | worryingly\inquietante |
13314 | worse\più cattivo, peggiore | 13312 | worse\più cattivo, peggiore |
13315 | worship\venerare, adorare, venerazione | 13313 | worship\venerare, adorare, venerazione |
13316 | worshiper\veneratore | 13314 | worshiper\veneratore |
13317 | worships\venerato | 13315 | worships\venerato |
13318 | worst\cattivissima | 13316 | worst\cattivissima |
13319 | worth\valore | 13317 | worth\valore |
13320 | worth seeing\da vedere | 13318 | worth seeing\da vedere |
13321 | worthily\equo | 13319 | worthily\equo |
13322 | worthiness\valore | 13320 | worthiness\valore |
13323 | worthless\senza valore | 13321 | worthless\senza valore |
13324 | worthwhile\redditizio | 13322 | worthwhile\redditizio |
13325 | worthy\meritevole | 13323 | worthy\meritevole |
13326 | would\volei, decoro | 13324 | would\volei, decoro |
13327 | would like\vuole | 13325 | would like\vuole |
13328 | would like to\vuole | 13326 | would like to\vuole |
13329 | wound\fegriva, ferire | 13327 | wound\fegriva, ferire |
13330 | woven\tessuto | 13328 | woven\tessuto |
13331 | wow\successone | 13329 | wow\successone |
13332 | wraith\fantasma | 13330 | wraith\fantasma |
13333 | wraiths\lemuri | 13331 | wraiths\lemuri |
13334 | wrangle\questione | 13332 | wrangle\questione |
13335 | wrangled\litigai | 13333 | wrangled\litigai |
13336 | wrangles\litiga | 13334 | wrangles\litiga |
13337 | wrap\infagottare, involgere, avvolgere, avvòlgere | 13335 | wrap\infagottare, involgere, avvolgere, avvòlgere |
13338 | wrap up\avvòlgere | 13336 | wrap up\avvòlgere |
13339 | wrapper\involucro | 13337 | wrapper\involucro |
13340 | wrappers\involgere | 13338 | wrappers\involgere |
13341 | wrath\furia | 13339 | wrath\furia |
13342 | wrathful\adirato | 13340 | wrathful\adirato |
13343 | wreak\spingere | 13341 | wreak\spingere |
13344 | wreaks\esercita | 13342 | wreaks\esercita |
13345 | wreath\ghirlanda | 13343 | wreath\ghirlanda |
13346 | wreck\naufragio, disfare, guaio | 13344 | wreck\naufragio, disfare, guaio |
13347 | wrecked\distrussi | 13345 | wrecked\distrussi |
13348 | wrecking service\servizio recupero automezzi | 13346 | wrecking service\servizio recupero automezzi |
13349 | wrecks\distrutto, sporcato | 13347 | wrecks\distrutto, sporcato |
13350 | wren\scricciolo | 13348 | wren\scricciolo |
13351 | wrench\chiave | 13349 | wrench\chiave |
13352 | wrest\arraffare | 13350 | wrest\arraffare |
13353 | wrestle\lottare | 13351 | wrestle\lottare |
13354 | wrestled\rango | 13352 | wrestled\rango |
13355 | wrestler\lottatore, lottatore | 13353 | wrestler\lottatore, lottatore |
13356 | wretchedness\miserabile | 13354 | wretchedness\miserabile |
13357 | wrinkle\trucco, grinza, suggerimento, pizzicotto | 13355 | wrinkle\trucco, grinza, suggerimento, pizzicotto |
13358 | wrinkled\increspato | 13356 | wrinkled\increspato |
13359 | wrinkles\corrugare | 13357 | wrinkles\corrugare |
13360 | wrist\polso | 13358 | wrist\polso |
13361 | wristband\braccialetto | 13359 | wristband\braccialetto |
13362 | writ\documento | 13360 | writ\documento |
13363 | writ of execution\esecutorio | 13361 | writ of execution\esecutorio |
13364 | write\vergare, scrivere | 13362 | write\vergare, scrivere |
13365 | write down\appuntare | 13363 | write down\appuntare |
13366 | write error\errore ortografico | 13364 | write error\errore ortografico |
13367 | write fault error\errore ortografico | 13365 | write fault error\errore ortografico |
13368 | write out\appuntare, emettere | 13366 | write out\appuntare, emettere |
13369 | write poetry\comporre versi | 13367 | write poetry\comporre versi |
13370 | writer\quattrocentista, autore | 13368 | writer\quattrocentista, autore |
13371 | writes\scrive | 13369 | writes\scrive |
13372 | writing\vergare, scrittura | 13370 | writing\vergare, scrittura |
13373 | writing paper\carta da scrivere | 13371 | writing paper\carta da scrivere |
13374 | written\scritto | 13372 | written\scritto |
13375 | wrong\fasullo, inverso, non giusto, colpevole | 13373 | wrong\fasullo, inverso, non giusto, colpevole |
13376 | wrong conclusion\argomentazione sbagliata | 13374 | wrong conclusion\argomentazione sbagliata |
13377 | wrongdoer\malfattore | 13375 | wrongdoer\malfattore |
13378 | wrongly\erroneamente | 13376 | wrongly\erroneamente |
13379 | wrongous\illegale | 13377 | wrongous\illegale |
13380 | wrongously\illegale | 13378 | wrongously\illegale |
13381 | wrote\scrivei | 13379 | wrote\scrivei |
13382 | wrought\lavorato | 13380 | wrought\lavorato |
13383 | wroughtiron\ferro battuto | 13381 | wroughtiron\ferro battuto |
13384 | wry\obliquo | 13382 | wry\obliquo |
13385 | wryly\storto | 13383 | wryly\storto |
13386 | wryness\obliqua | 13384 | wryness\obliqua |
13387 | xenophobia\xenofobia | 13385 | xenophobia\xenofobia |
13388 | xenophobic\xenofobo | 13386 | xenophobic\xenofobo |
13389 | yacht\yacht | 13387 | yacht\yacht |
13390 | yachting\velismo | 13388 | yachting\velismo |
13391 | yachtsman\veliero | 13389 | yachtsman\veliero |
13392 | yachtswoman\veleggiatrice | 13390 | yachtswoman\veleggiatrice |
13393 | yahoo\mascalzone | 13391 | yahoo\mascalzone |
13394 | yank\estrarre | 13392 | yank\estrarre |
13395 | yankeedoodle\canto popolare | 13393 | yankeedoodle\canto popolare |
13396 | yap\muso | 13394 | yap\muso |
13397 | yaps\bocche | 13395 | yaps\bocche |
13398 | yard\ulna, cortile | 13396 | yard\ulna, cortile |
13399 | yards\cortili | 13397 | yards\cortili |
13400 | yardstick\criterio | 13398 | yardstick\criterio |
13401 | yarn\filo | 13399 | yarn\filo |
13402 | yarns\fili | 13400 | yarns\fili |
13403 | yarrow\achillea | 13401 | yarrow\achillea |
13404 | yawn\sbadigliare | 13402 | yawn\sbadigliare |
13405 | yawns\sbadiglia | 13403 | yawns\sbadiglia |
13406 | yclept\nominato | 13404 | yclept\nominato |
13407 | ye\il | 13405 | ye\il |
13408 | yea\si | 13406 | yea\si |
13409 | yeah\sereno | 13407 | yeah\sereno |
13410 | year\anno | 13408 | year\anno |
13411 | year of birth\anno di nascita | 13409 | year of birth\anno di nascita |
13412 | year of construction\anno di costruzione | 13410 | year of construction\anno di costruzione |
13413 | yearbook\effemeride | 13411 | yearbook\effemeride |
13414 | yearbooks\annali | 13412 | yearbooks\annali |
13415 | yearlong\di un anno | 13413 | yearlong\di un anno |
13416 | yearly\ànnuo, annualmente | 13414 | yearly\ànnuo, annualmente |
13417 | yearning\ansia | 13415 | yearning\ansia |
13418 | yeast\fondaccio | 13416 | yeast\fondaccio |
13419 | yegg\vagabondaggio | 13417 | yegg\vagabondaggio |
13420 | yell\gridare, stridere | 13418 | yell\gridare, stridere |
diff --git a/noncore/apps/opie-console/filereceive.cpp b/noncore/apps/opie-console/filereceive.cpp index e387273..452be60 100644 --- a/noncore/apps/opie-console/filereceive.cpp +++ b/noncore/apps/opie-console/filereceive.cpp | |||
@@ -1,162 +1,162 @@ | |||
1 | #include <unistd.h> | 1 | #include <unistd.h> |
2 | #include <fcntl.h> | 2 | #include <fcntl.h> |
3 | #include <signal.h> | 3 | #include <signal.h> |
4 | #include <errno.h> | 4 | #include <errno.h> |
5 | 5 | ||
6 | #include <qsocketnotifier.h> | 6 | #include <qsocketnotifier.h> |
7 | 7 | ||
8 | #include "io_layer.h" | 8 | #include "io_layer.h" |
9 | #include "procctl.h" | 9 | #include "procctl.h" |
10 | #include "filereceive.h" | 10 | #include "filereceive.h" |
11 | 11 | ||
12 | FileReceive::FileReceive( Type t, IOLayer* lay, const QString& dir ) | 12 | FileReceive::FileReceive( Type t, IOLayer* lay, const QString& dir ) |
13 | : ReceiveLayer(lay, dir ), m_type( t ) | 13 | : ReceiveLayer(lay, dir ), m_type( t ) |
14 | { | 14 | { |
15 | m_fd = -1; | 15 | m_fd = -1; |
16 | m_not = 0l; | 16 | m_not = 0l; |
17 | m_proc = 0l; | 17 | m_proc = 0l; |
18 | } | 18 | } |
19 | FileReceive::~FileReceive() { | 19 | FileReceive::~FileReceive() { |
20 | } | 20 | } |
21 | void FileReceive::receive() { | 21 | void FileReceive::receive() { |
22 | receive( currentDir() ); | 22 | receive( currentDir() ); |
23 | } | 23 | } |
24 | void FileReceive::receive( const QString& dir ) { | 24 | void FileReceive::receive( const QString& dir ) { |
25 | m_prog = -1; | 25 | m_prog = -1; |
26 | m_fd = layer()->rawIO(); | 26 | m_fd = layer()->rawIO(); |
27 | m_curDir = dir; | 27 | m_curDir = dir; |
28 | 28 | ||
29 | if (pipe( m_comm ) < 0 ) | 29 | if (pipe( m_comm ) < 0 ) |
30 | m_comm[0] = m_comm[1] = 0; | 30 | m_comm[0] = m_comm[1] = 0; |
31 | if (pipe( m_info ) < 0 ) | 31 | if (pipe( m_info ) < 0 ) |
32 | m_info[0] = m_info[1] = 0; | 32 | m_info[0] = m_info[1] = 0; |
33 | 33 | ||
34 | m_pid = fork(); | 34 | m_pid = fork(); |
35 | switch( m_pid ) { | 35 | switch( m_pid ) { |
36 | case -1: | 36 | case -1: |
37 | //emit error | 37 | //emit error |
38 | slotExec(); | 38 | slotExec(); |
39 | break; | 39 | break; |
40 | /* child */ | 40 | /* child */ |
41 | case 0: { | 41 | case 0: { |
42 | setupChild(); | 42 | setupChild(); |
43 | char* typus = NULL; | 43 | char* typus = NULL; |
44 | switch(m_type ) { | 44 | switch(m_type ) { |
45 | case SZ: | 45 | case SZ: |
46 | break; | 46 | break; |
47 | case SX: | 47 | case SX: |
48 | typus = "-X"; | 48 | typus = "-X"; |
49 | break; | 49 | break; |
50 | case SY: | 50 | case SY: |
51 | typus = "--ymodem"; | 51 | typus = "--ymodem"; |
52 | break; | 52 | break; |
53 | } | 53 | } |
54 | 54 | ||
55 | /* we should never return from here */ | 55 | /* we should never return from here */ |
56 | if( m_type == SX ) | 56 | if( m_type == SX ) |
57 | // FIXME: file name should be configurable - currently we ensure it | 57 | // FIXME: file name should be configurable - currently we ensure it |
58 | // doesn't get overwritten by -E (--rename) | 58 | // doesn't get overwritten by -E (--rename) |
59 | execlp("rz", "rz", typus, "--overwrite", QObject::tr("SynchronizedFile").latin1(), NULL ); | 59 | execlp("rz", "rz", typus, "--overwrite", QObject::tr("SynchronizedFile").latin1(), NULL ); |
60 | else | 60 | else |
61 | execlp("rz", "rz", typus, "--overwrite", NULL ); | 61 | execlp("rz", "rz", typus, "--overwrite", NULL ); |
62 | 62 | ||
63 | char resultByte = 1; | 63 | char resultByte = 1; |
64 | if (m_info[1] ) | 64 | if (m_info[1] ) |
65 | ::write(m_info[1], &resultByte, 1 ); | 65 | ::write(m_info[1], &resultByte, 1 ); |
66 | 66 | ||
67 | _exit( -1 ); | 67 | _exit( -1 ); |
68 | break; | 68 | break; |
69 | } | 69 | } |
70 | default: { | 70 | default: { |
71 | if ( m_info[1] ) | 71 | if ( m_info[1] ) |
72 | close( m_info[1] ); | 72 | close( m_info[1] ); |
73 | 73 | ||
74 | if ( m_info[0] ) for (;;) { | 74 | if ( m_info[0] ) for (;;) { |
75 | char resultByte; int len; | 75 | char resultByte; int len; |
76 | len = read(m_info[0], &resultByte, 1 ); | 76 | len = read(m_info[0], &resultByte, 1 ); |
77 | /* len == 1 start up failed */ | 77 | /* len == 1 start up failed */ |
78 | if ( len == 1 ) { | 78 | if ( len == 1 ) { |
79 | emit error( StartError, tr("Could not start") ); | 79 | emit error( StartError, tr("Could not start") ); |
80 | return; | 80 | return; |
81 | } | 81 | } |
82 | if ( len == -1 ) | 82 | if ( len == -1 ) |
83 | if ( (errno == ECHILD ) || (errno == EINTR ) ) | 83 | if ( (errno == ECHILD ) || (errno == EINTR ) ) |
84 | continue; | 84 | continue; |
85 | 85 | ||
86 | // len == 0 or something like this | 86 | // len == 0 or something like this |
87 | break; | 87 | break; |
88 | } | 88 | } |
89 | 89 | ||
90 | if ( m_info[0] ) | 90 | if ( m_info[0] ) |
91 | close( m_info[0] ); | 91 | close( m_info[0] ); |
92 | 92 | ||
93 | m_not = new QSocketNotifier(m_comm[0], QSocketNotifier::Read ); | 93 | m_not = new QSocketNotifier(m_comm[0], QSocketNotifier::Read ); |
94 | connect(m_not, SIGNAL(activated(int) ), | 94 | connect(m_not, SIGNAL(activated(int) ), |
95 | this, SLOT(slotRead() ) ); | 95 | this, SLOT(slotRead() ) ); |
96 | if ( pipe(m_term) < 0 ) | 96 | if ( pipe(m_term) < 0 ) |
97 | m_term[0] = m_term[1] = 0; | 97 | m_term[0] = m_term[1] = 0; |
98 | 98 | ||
99 | ProcCtl::self()->add(m_pid, m_term[1] ); | 99 | ProcCtl::self()->add(m_pid, m_term[1] ); |
100 | m_proc = new QSocketNotifier(m_term[0], QSocketNotifier::Read ); | 100 | m_proc = new QSocketNotifier(m_term[0], QSocketNotifier::Read ); |
101 | connect(m_proc, SIGNAL(activated(int) ), | 101 | connect(m_proc, SIGNAL(activated(int) ), |
102 | this, SLOT(slotExec() ) ); | 102 | this, SLOT(slotExec() ) ); |
103 | 103 | ||
104 | } | 104 | } |
105 | break; | 105 | break; |
106 | 106 | ||
107 | } | 107 | } |
108 | 108 | ||
109 | } | 109 | } |
110 | void FileReceive::cancel() { | 110 | void FileReceive::cancel() { |
111 | ::kill(m_pid, 9 ); | 111 | ::kill(m_pid, 9 ); |
112 | } | 112 | } |
113 | void FileReceive::setupChild() { | 113 | void FileReceive::setupChild() { |
114 | changeDir( currentDir() ); | 114 | changeDir( currentDir() ); |
115 | /* | 115 | /* |
116 | * we do not want to read from our | 116 | * we do not want to read from our |
117 | * information channel | 117 | * information channel |
118 | */ | 118 | */ |
119 | if (m_info[0] ) | 119 | if (m_info[0] ) |
120 | close(m_info[0] ); | 120 | close(m_info[0] ); |
121 | /* | 121 | /* |
122 | * FD_CLOEXEC will close the | 122 | * FD_CLOEXEC will close the |
123 | * fd on successfull exec | 123 | * fd on successful exec |
124 | */ | 124 | */ |
125 | if (m_info[1] ) | 125 | if (m_info[1] ) |
126 | fcntl(m_info[1], F_SETFD, FD_CLOEXEC ); | 126 | fcntl(m_info[1], F_SETFD, FD_CLOEXEC ); |
127 | 127 | ||
128 | if (m_comm[0] ) | 128 | if (m_comm[0] ) |
129 | close( m_comm[0] ); | 129 | close( m_comm[0] ); |
130 | /* | 130 | /* |
131 | * now set the communication | 131 | * now set the communication |
132 | * m_fd STDIN_FILENO | 132 | * m_fd STDIN_FILENO |
133 | * STDOUT_FILENO | 133 | * STDOUT_FILENO |
134 | * STDERR_FILENO | 134 | * STDERR_FILENO |
135 | */ | 135 | */ |
136 | dup2( m_fd, STDIN_FILENO ); | 136 | dup2( m_fd, STDIN_FILENO ); |
137 | dup2( m_fd, STDOUT_FILENO ); | 137 | dup2( m_fd, STDOUT_FILENO ); |
138 | dup2( m_comm[1], STDERR_FILENO ); | 138 | dup2( m_comm[1], STDERR_FILENO ); |
139 | } | 139 | } |
140 | void FileReceive::slotRead() { | 140 | void FileReceive::slotRead() { |
141 | QByteArray ar(4096); | 141 | QByteArray ar(4096); |
142 | int len = read(m_comm[0], ar.data(), 4096 ); | 142 | int len = read(m_comm[0], ar.data(), 4096 ); |
143 | for (int i = 0; i < len; i++ ) { | 143 | for (int i = 0; i < len; i++ ) { |
144 | // printf("%c", ar[i] ); | 144 | // printf("%c", ar[i] ); |
145 | } | 145 | } |
146 | ar.resize( len ); | 146 | ar.resize( len ); |
147 | QString str( ar ); | 147 | QString str( ar ); |
148 | } | 148 | } |
149 | void FileReceive::slotExec() { | 149 | void FileReceive::slotExec() { |
150 | char buf[2]; | 150 | char buf[2]; |
151 | ::read(m_term[0], buf, 1 ); | 151 | ::read(m_term[0], buf, 1 ); |
152 | delete m_proc; | 152 | delete m_proc; |
153 | delete m_not; | 153 | delete m_not; |
154 | m_not = m_proc = 0l; | 154 | m_not = m_proc = 0l; |
155 | close( m_term[0] ); | 155 | close( m_term[0] ); |
156 | close( m_term[1] ); | 156 | close( m_term[1] ); |
157 | close( m_comm[0] ); | 157 | close( m_comm[0] ); |
158 | close( m_comm[1] ); | 158 | close( m_comm[1] ); |
159 | layer()->closeRawIO(m_fd); | 159 | layer()->closeRawIO(m_fd); |
160 | emit received(QString::null); | 160 | emit received(QString::null); |
161 | 161 | ||
162 | } | 162 | } |
diff --git a/noncore/apps/opie-console/filetransfer.cpp b/noncore/apps/opie-console/filetransfer.cpp index 221838c..5144941 100644 --- a/noncore/apps/opie-console/filetransfer.cpp +++ b/noncore/apps/opie-console/filetransfer.cpp | |||
@@ -1,251 +1,251 @@ | |||
1 | #include <stdio.h> | 1 | #include <stdio.h> |
2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | #include <errno.h> | 3 | #include <errno.h> |
4 | #include <fcntl.h> | 4 | #include <fcntl.h> |
5 | #include <unistd.h> | 5 | #include <unistd.h> |
6 | 6 | ||
7 | #include <qcstring.h> | 7 | #include <qcstring.h> |
8 | #include <qsocketnotifier.h> | 8 | #include <qsocketnotifier.h> |
9 | 9 | ||
10 | #include <opie/oprocess.h> | 10 | #include <opie/oprocess.h> |
11 | 11 | ||
12 | #include "procctl.h" | 12 | #include "procctl.h" |
13 | #include "filetransfer.h" | 13 | #include "filetransfer.h" |
14 | 14 | ||
15 | 15 | ||
16 | FileTransfer::FileTransfer( Type t, IOLayer* lay ) | 16 | FileTransfer::FileTransfer( Type t, IOLayer* lay ) |
17 | : FileTransferLayer( lay ), m_type( t ), m_pid ( 0 ) { | 17 | : FileTransferLayer( lay ), m_type( t ), m_pid ( 0 ) { |
18 | signal(SIGPIPE, SIG_IGN ); | 18 | signal(SIGPIPE, SIG_IGN ); |
19 | 19 | ||
20 | m_pid = 0; | 20 | m_pid = 0; |
21 | m_not = 0l; | 21 | m_not = 0l; |
22 | m_proc = 0l; | 22 | m_proc = 0l; |
23 | } | 23 | } |
24 | FileTransfer::~FileTransfer() { | 24 | FileTransfer::~FileTransfer() { |
25 | } | 25 | } |
26 | 26 | ||
27 | /** | 27 | /** |
28 | * now we will send the file. | 28 | * now we will send the file. |
29 | * | 29 | * |
30 | * we request an fd. The IOLayer should be closed | 30 | * we request an fd. The IOLayer should be closed |
31 | * then we will setup a pipe for progress communication | 31 | * then we will setup a pipe for progress communication |
32 | * then we will dup2 the m_fd in the forked process | 32 | * then we will dup2 the m_fd in the forked process |
33 | * to do direct IO from and to the fd | 33 | * to do direct IO from and to the fd |
34 | */ | 34 | */ |
35 | void FileTransfer::sendFile( const QString& file ) { | 35 | void FileTransfer::sendFile( const QString& file ) { |
36 | m_prog =-1; | 36 | m_prog =-1; |
37 | m_fd = layer()->rawIO(); | 37 | m_fd = layer()->rawIO(); |
38 | // | 38 | // |
39 | // m_fd = ::open("/dev/ttyS0", O_RDWR); | 39 | // m_fd = ::open("/dev/ttyS0", O_RDWR); |
40 | 40 | ||
41 | m_file = file; | 41 | m_file = file; |
42 | if ( pipe( m_comm ) < 0 ) | 42 | if ( pipe( m_comm ) < 0 ) |
43 | m_comm[0] = m_comm[1] = 0; | 43 | m_comm[0] = m_comm[1] = 0; |
44 | if ( pipe( m_info ) < 0 ) | 44 | if ( pipe( m_info ) < 0 ) |
45 | m_info[0] = m_info[1] = 0; | 45 | m_info[0] = m_info[1] = 0; |
46 | 46 | ||
47 | 47 | ||
48 | m_pid = fork(); | 48 | m_pid = fork(); |
49 | switch( m_pid ) { | 49 | switch( m_pid ) { |
50 | case -1: | 50 | case -1: |
51 | emit error( StartError, tr("Was not able to fork") ); | 51 | emit error( StartError, tr("Was not able to fork") ); |
52 | slotExec(); | 52 | slotExec(); |
53 | break; | 53 | break; |
54 | case 0:{ | 54 | case 0:{ |
55 | setupChild(); | 55 | setupChild(); |
56 | /* exec */ | 56 | /* exec */ |
57 | char* verbose = "-vv"; | 57 | char* verbose = "-vv"; |
58 | char* binray = "-b"; | 58 | char* binray = "-b"; |
59 | 59 | ||
60 | 60 | ||
61 | char* typus; | 61 | char* typus; |
62 | switch(m_type ) { | 62 | switch(m_type ) { |
63 | default: | 63 | default: |
64 | case SZ: | 64 | case SZ: |
65 | typus = ""; | 65 | typus = ""; |
66 | break; | 66 | break; |
67 | case SX: | 67 | case SX: |
68 | typus = "-X"; | 68 | typus = "-X"; |
69 | break; | 69 | break; |
70 | case SY: | 70 | case SY: |
71 | typus = "--ymodem"; | 71 | typus = "--ymodem"; |
72 | break; | 72 | break; |
73 | } | 73 | } |
74 | 74 | ||
75 | /* we should never return from here */ | 75 | /* we should never return from here */ |
76 | execlp("sz", "sz", verbose, binray, file.latin1(), typus, NULL ); | 76 | execlp("sz", "sz", verbose, binray, file.latin1(), typus, NULL ); |
77 | 77 | ||
78 | /* communication for error!*/ | 78 | /* communication for error!*/ |
79 | char resultByte =1; | 79 | char resultByte =1; |
80 | if (m_info[1] ) | 80 | if (m_info[1] ) |
81 | write(m_info[1], &resultByte, 1 ); | 81 | write(m_info[1], &resultByte, 1 ); |
82 | _exit( -1 ); | 82 | _exit( -1 ); |
83 | break; | 83 | break; |
84 | } | 84 | } |
85 | default:{ | 85 | default:{ |
86 | if ( m_info[1] ) | 86 | if ( m_info[1] ) |
87 | close( m_info[1] ); | 87 | close( m_info[1] ); |
88 | if ( m_info[0] ) for (;;) { | 88 | if ( m_info[0] ) for (;;) { |
89 | char resultByte; int len; | 89 | char resultByte; int len; |
90 | len = read(m_info[0], &resultByte, 1 ); | 90 | len = read(m_info[0], &resultByte, 1 ); |
91 | /* len == 1 start up failed */ | 91 | /* len == 1 start up failed */ |
92 | if ( len == 1 ) { | 92 | if ( len == 1 ) { |
93 | emit error( StartError, tr("Could not start") ); | 93 | emit error( StartError, tr("Could not start") ); |
94 | return; | 94 | return; |
95 | } | 95 | } |
96 | if ( len == -1 ) | 96 | if ( len == -1 ) |
97 | if ( (errno == ECHILD ) || (errno == EINTR ) ) | 97 | if ( (errno == ECHILD ) || (errno == EINTR ) ) |
98 | continue; | 98 | continue; |
99 | 99 | ||
100 | // len == 0 or something like this | 100 | // len == 0 or something like this |
101 | break; | 101 | break; |
102 | } | 102 | } |
103 | if ( m_info[0] ) | 103 | if ( m_info[0] ) |
104 | close( m_info[0] ); | 104 | close( m_info[0] ); |
105 | 105 | ||
106 | 106 | ||
107 | 107 | ||
108 | /* replace by QSocketNotifier!!! */ | 108 | /* replace by QSocketNotifier!!! */ |
109 | m_not = new QSocketNotifier(m_comm[0], QSocketNotifier::Read ); | 109 | m_not = new QSocketNotifier(m_comm[0], QSocketNotifier::Read ); |
110 | connect(m_not, SIGNAL(activated(int) ), | 110 | connect(m_not, SIGNAL(activated(int) ), |
111 | this, SLOT(slotRead() ) ); | 111 | this, SLOT(slotRead() ) ); |
112 | if ( pipe(m_term) < 0 ) | 112 | if ( pipe(m_term) < 0 ) |
113 | m_term[0] = m_term[1] = 0; | 113 | m_term[0] = m_term[1] = 0; |
114 | 114 | ||
115 | ProcCtl::self()->add(m_pid, m_term[1] ); | 115 | ProcCtl::self()->add(m_pid, m_term[1] ); |
116 | m_proc = new QSocketNotifier(m_term[0], QSocketNotifier::Read ); | 116 | m_proc = new QSocketNotifier(m_term[0], QSocketNotifier::Read ); |
117 | connect(m_proc, SIGNAL(activated(int) ), | 117 | connect(m_proc, SIGNAL(activated(int) ), |
118 | this, SLOT(slotExec() ) ); | 118 | this, SLOT(slotExec() ) ); |
119 | 119 | ||
120 | } | 120 | } |
121 | break; | 121 | break; |
122 | } | 122 | } |
123 | } | 123 | } |
124 | /* | 124 | /* |
125 | * let's call the one with the filename | 125 | * let's call the one with the filename |
126 | */ | 126 | */ |
127 | void FileTransfer::sendFile( const QFile& file ) { | 127 | void FileTransfer::sendFile( const QFile& file ) { |
128 | sendFile( file.name() ); | 128 | sendFile( file.name() ); |
129 | } | 129 | } |
130 | 130 | ||
131 | /* | 131 | /* |
132 | * setting up communication | 132 | * setting up communication |
133 | * between parent child and ioLayer | 133 | * between parent child and ioLayer |
134 | */ | 134 | */ |
135 | void FileTransfer::setupChild() { | 135 | void FileTransfer::setupChild() { |
136 | /* | 136 | /* |
137 | * we do not want to read from our | 137 | * we do not want to read from our |
138 | * information channel | 138 | * information channel |
139 | */ | 139 | */ |
140 | if (m_info[0] ) | 140 | if (m_info[0] ) |
141 | close(m_info[0] ); | 141 | close(m_info[0] ); |
142 | /* | 142 | /* |
143 | * FD_CLOEXEC will close the | 143 | * FD_CLOEXEC will close the |
144 | * fd on successfull exec | 144 | * fd on successful exec |
145 | */ | 145 | */ |
146 | if (m_info[1] ) | 146 | if (m_info[1] ) |
147 | fcntl(m_info[1], F_SETFD, FD_CLOEXEC ); | 147 | fcntl(m_info[1], F_SETFD, FD_CLOEXEC ); |
148 | 148 | ||
149 | if (m_comm[0] ) | 149 | if (m_comm[0] ) |
150 | close( m_comm[0] ); | 150 | close( m_comm[0] ); |
151 | /* | 151 | /* |
152 | * now set the communication | 152 | * now set the communication |
153 | * m_fd STDIN_FILENO | 153 | * m_fd STDIN_FILENO |
154 | * STDOUT_FILENO | 154 | * STDOUT_FILENO |
155 | * STDERR_FILENO | 155 | * STDERR_FILENO |
156 | */ | 156 | */ |
157 | dup2( m_fd, STDIN_FILENO ); | 157 | dup2( m_fd, STDIN_FILENO ); |
158 | dup2( m_fd, STDOUT_FILENO ); | 158 | dup2( m_fd, STDOUT_FILENO ); |
159 | dup2( m_comm[1], STDERR_FILENO ); | 159 | dup2( m_comm[1], STDERR_FILENO ); |
160 | } | 160 | } |
161 | 161 | ||
162 | /* | 162 | /* |
163 | * read from the stderr of the child | 163 | * read from the stderr of the child |
164 | * process | 164 | * process |
165 | */ | 165 | */ |
166 | void FileTransfer::slotRead() { | 166 | void FileTransfer::slotRead() { |
167 | QByteArray ar(4096); | 167 | QByteArray ar(4096); |
168 | int len = read(m_comm[0], ar.data(), 4096 ); | 168 | int len = read(m_comm[0], ar.data(), 4096 ); |
169 | for (int i = 0; i < len; i++ ) { | 169 | for (int i = 0; i < len; i++ ) { |
170 | // printf("%c", ar[i] ); | 170 | // printf("%c", ar[i] ); |
171 | } | 171 | } |
172 | ar.resize( len ); | 172 | ar.resize( len ); |
173 | QString str( ar ); | 173 | QString str( ar ); |
174 | QStringList lis = QStringList::split(' ', str ); | 174 | QStringList lis = QStringList::split(' ', str ); |
175 | /* | 175 | /* |
176 | * Transfer finished.. either complete or incomplete | 176 | * Transfer finished.. either complete or incomplete |
177 | */ | 177 | */ |
178 | if ( lis[0].simplifyWhiteSpace() == "Transfer" ) { | 178 | if ( lis[0].simplifyWhiteSpace() == "Transfer" ) { |
179 | return; | 179 | return; |
180 | } | 180 | } |
181 | /* | 181 | /* |
182 | * do progress reading | 182 | * do progress reading |
183 | */ | 183 | */ |
184 | slotProgress( lis ); | 184 | slotProgress( lis ); |
185 | 185 | ||
186 | 186 | ||
187 | } | 187 | } |
188 | /* | 188 | /* |
189 | * find the progress | 189 | * find the progress |
190 | */ | 190 | */ |
191 | void FileTransfer::slotProgress( const QStringList& list ) { | 191 | void FileTransfer::slotProgress( const QStringList& list ) { |
192 | if ( m_type != SZ ) | 192 | if ( m_type != SZ ) |
193 | return; | 193 | return; |
194 | bool complete = true; | 194 | bool complete = true; |
195 | int min, sec; | 195 | int min, sec; |
196 | int bps; | 196 | int bps; |
197 | unsigned long sent, total; | 197 | unsigned long sent, total; |
198 | 198 | ||
199 | min = sec = bps = -1; | 199 | min = sec = bps = -1; |
200 | sent = total = 0; | 200 | sent = total = 0; |
201 | 201 | ||
202 | // Data looks like this | 202 | // Data looks like this |
203 | // 0 1 2 3 4 5 | 203 | // 0 1 2 3 4 5 |
204 | // Bytes Sent 65536/11534336 BPS:7784 ETA 24:33 | 204 | // Bytes Sent 65536/11534336 BPS:7784 ETA 24:33 |
205 | QStringList progi = QStringList::split('/', list[2].simplifyWhiteSpace() ); | 205 | QStringList progi = QStringList::split('/', list[2].simplifyWhiteSpace() ); |
206 | sent = progi[0].toULong(&complete ); | 206 | sent = progi[0].toULong(&complete ); |
207 | if (!complete ) return; | 207 | if (!complete ) return; |
208 | 208 | ||
209 | total = progi[1].toULong(&complete ); | 209 | total = progi[1].toULong(&complete ); |
210 | if (!complete || total == 0) { | 210 | if (!complete || total == 0) { |
211 | return; | 211 | return; |
212 | } | 212 | } |
213 | 213 | ||
214 | 214 | ||
215 | double pro = (double)sent/total; | 215 | double pro = (double)sent/total; |
216 | int prog = pro * 100; | 216 | int prog = pro * 100; |
217 | 217 | ||
218 | // speed | 218 | // speed |
219 | progi = QStringList::split(':', list[3].simplifyWhiteSpace() ); | 219 | progi = QStringList::split(':', list[3].simplifyWhiteSpace() ); |
220 | bps = progi[1].toInt(); | 220 | bps = progi[1].toInt(); |
221 | 221 | ||
222 | // time | 222 | // time |
223 | progi = QStringList::split(':', list[5].simplifyWhiteSpace() ); | 223 | progi = QStringList::split(':', list[5].simplifyWhiteSpace() ); |
224 | min = progi[0].toInt(); | 224 | min = progi[0].toInt(); |
225 | sec = progi[1].toInt(); | 225 | sec = progi[1].toInt(); |
226 | 226 | ||
227 | 227 | ||
228 | if ( prog > m_prog ) { | 228 | if ( prog > m_prog ) { |
229 | m_prog = prog; | 229 | m_prog = prog; |
230 | emit progress(m_file, m_prog, bps, -1, min , sec ); | 230 | emit progress(m_file, m_prog, bps, -1, min , sec ); |
231 | } | 231 | } |
232 | 232 | ||
233 | } | 233 | } |
234 | void FileTransfer::cancel() { | 234 | void FileTransfer::cancel() { |
235 | if(m_pid > 0) ::kill(m_pid,9 ); | 235 | if(m_pid > 0) ::kill(m_pid,9 ); |
236 | 236 | ||
237 | } | 237 | } |
238 | void FileTransfer::slotExec() { | 238 | void FileTransfer::slotExec() { |
239 | char buf[2]; | 239 | char buf[2]; |
240 | ::read(m_term[0], buf, 1 ); | 240 | ::read(m_term[0], buf, 1 ); |
241 | delete m_proc; | 241 | delete m_proc; |
242 | delete m_not; | 242 | delete m_not; |
243 | m_proc = m_not = 0l; | 243 | m_proc = m_not = 0l; |
244 | close( m_term[0] ); | 244 | close( m_term[0] ); |
245 | close( m_term[1] ); | 245 | close( m_term[1] ); |
246 | close( m_comm[0] ); | 246 | close( m_comm[0] ); |
247 | close( m_comm[1] ); | 247 | close( m_comm[1] ); |
248 | layer()->closeRawIO( m_fd ); | 248 | layer()->closeRawIO( m_fd ); |
249 | emit sent(); | 249 | emit sent(); |
250 | m_pid = 0; | 250 | m_pid = 0; |
251 | } | 251 | } |
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 3250627..2b29d83 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -1,1515 +1,1515 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | opieftp.cpp | 2 | opieftp.cpp |
3 | ------------------- | 3 | ------------------- |
4 | ** Created: Sat Mar 9 23:33:09 2002 | 4 | ** Created: Sat Mar 9 23:33:09 2002 |
5 | copyright : (C) 2002 by ljp | 5 | copyright : (C) 2002 by ljp |
6 | email : ljp@llornkcor.com | 6 | email : ljp@llornkcor.com |
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
9 | * the Free Software Foundation; either version 2 of the License, or * | 9 | * the Free Software Foundation; either version 2 of the License, or * |
10 | * (at your option) any later version. * | 10 | * (at your option) any later version. * |
11 | ***************************************************************************/ | 11 | ***************************************************************************/ |
12 | //#define DEVELOPERS_VERSION | 12 | //#define DEVELOPERS_VERSION |
13 | 13 | ||
14 | #include "opieftp.h" | 14 | #include "opieftp.h" |
15 | 15 | ||
16 | extern "C" { | 16 | extern "C" { |
17 | #include "../ftplib/ftplib.h" | 17 | #include "../ftplib/ftplib.h" |
18 | } | 18 | } |
19 | 19 | ||
20 | #include "inputDialog.h" | 20 | #include "inputDialog.h" |
21 | 21 | ||
22 | #include <qmenubar.h> | 22 | #include <qmenubar.h> |
23 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
24 | #include <qpe/resource.h> | 24 | #include <qpe/resource.h> |
25 | #include <qpe/config.h> | 25 | #include <qpe/config.h> |
26 | #include <qpe/mimetype.h> | 26 | #include <qpe/mimetype.h> |
27 | 27 | ||
28 | #include <qtextstream.h> | 28 | #include <qtextstream.h> |
29 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
30 | #include <qtoolbutton.h> | 30 | #include <qtoolbutton.h> |
31 | #include <qcombobox.h> | 31 | #include <qcombobox.h> |
32 | #include <qlistview.h> | 32 | #include <qlistview.h> |
33 | #include <qlabel.h> | 33 | #include <qlabel.h> |
34 | #include <qprogressbar.h> | 34 | #include <qprogressbar.h> |
35 | #include <qspinbox.h> | 35 | #include <qspinbox.h> |
36 | #include <qtabwidget.h> | 36 | #include <qtabwidget.h> |
37 | #include <qlayout.h> | 37 | #include <qlayout.h> |
38 | #include <qmessagebox.h> | 38 | #include <qmessagebox.h> |
39 | #include <qlineedit.h> | 39 | #include <qlineedit.h> |
40 | #include <qlistbox.h> | 40 | #include <qlistbox.h> |
41 | 41 | ||
42 | #include <unistd.h> | 42 | #include <unistd.h> |
43 | #include <stdlib.h> | 43 | #include <stdlib.h> |
44 | 44 | ||
45 | 45 | ||
46 | QProgressBar *ProgressBar; | 46 | QProgressBar *ProgressBar; |
47 | static netbuf *conn=NULL; | 47 | static netbuf *conn=NULL; |
48 | 48 | ||
49 | static int log_progress(netbuf *, int xfered, void *) | 49 | static int log_progress(netbuf *, int xfered, void *) |
50 | { | 50 | { |
51 | // int fsz = *(int *)arg; | 51 | // int fsz = *(int *)arg; |
52 | // int pct = (xfered * 100) / fsz; | 52 | // int pct = (xfered * 100) / fsz; |
53 | // printf("%3d%%\r", pct); | 53 | // printf("%3d%%\r", pct); |
54 | // fflush(stdout); | 54 | // fflush(stdout); |
55 | ProgressBar->setProgress(xfered); | 55 | ProgressBar->setProgress(xfered); |
56 | qApp->processEvents(); | 56 | qApp->processEvents(); |
57 | return 1; | 57 | return 1; |
58 | } | 58 | } |
59 | 59 | ||
60 | OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) | 60 | OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) |
61 | : QMainWindow( parent, name, fl ) | 61 | : QMainWindow( parent, name, fl ) |
62 | { | 62 | { |
63 | setCaption( tr( "OpieFtp" ) ); | 63 | setCaption( tr( "OpieFtp" ) ); |
64 | fuckeduphack=FALSE; | 64 | fuckeduphack=FALSE; |
65 | QGridLayout *layout = new QGridLayout( this ); | 65 | QGridLayout *layout = new QGridLayout( this ); |
66 | layout->setSpacing( 2); | 66 | layout->setSpacing( 2); |
67 | layout->setMargin( 2); | 67 | layout->setMargin( 2); |
68 | 68 | ||
69 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 69 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
70 | 70 | ||
71 | QMenuBar *menuBar = new QMenuBar(this); | 71 | QMenuBar *menuBar = new QMenuBar(this); |
72 | // QToolBar *menuBar = new QToolBar(this); | 72 | // QToolBar *menuBar = new QToolBar(this); |
73 | // menuBar->setHorizontalStretchable( TRUE ); | 73 | // menuBar->setHorizontalStretchable( TRUE ); |
74 | 74 | ||
75 | QWMatrix matrix; | 75 | QWMatrix matrix; |
76 | QPixmap pix(Resource::loadPixmap( "UnknownDocument" )); | 76 | QPixmap pix(Resource::loadPixmap( "UnknownDocument" )); |
77 | matrix.scale( .4, .4); | 77 | matrix.scale( .4, .4); |
78 | unknownXpm = pix.xForm(matrix); | 78 | unknownXpm = pix.xForm(matrix); |
79 | 79 | ||
80 | connectionMenu = new QPopupMenu( this ); | 80 | connectionMenu = new QPopupMenu( this ); |
81 | localMenu = new QPopupMenu( this ); | 81 | localMenu = new QPopupMenu( this ); |
82 | remoteMenu = new QPopupMenu( this ); | 82 | remoteMenu = new QPopupMenu( this ); |
83 | tabMenu = new QPopupMenu( this ); | 83 | tabMenu = new QPopupMenu( this ); |
84 | 84 | ||
85 | layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); | 85 | layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); |
86 | 86 | ||
87 | menuBar->insertItem( tr( "Connection" ), connectionMenu); | 87 | menuBar->insertItem( tr( "Connection" ), connectionMenu); |
88 | // menuBar->insertItem( tr( "Local" ), localMenu); | 88 | // menuBar->insertItem( tr( "Local" ), localMenu); |
89 | // menuBar->insertItem( tr( "Remote" ), remoteMenu); | 89 | // menuBar->insertItem( tr( "Remote" ), remoteMenu); |
90 | menuBar->insertItem( tr( "View" ), tabMenu); | 90 | menuBar->insertItem( tr( "View" ), tabMenu); |
91 | 91 | ||
92 | tabMenu->insertItem( tr( "Local" ), localMenu); | 92 | tabMenu->insertItem( tr( "Local" ), localMenu); |
93 | tabMenu->insertItem( tr( "Remote" ), remoteMenu); | 93 | tabMenu->insertItem( tr( "Remote" ), remoteMenu); |
94 | 94 | ||
95 | connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); | 95 | connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); |
96 | connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); | 96 | connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); |
97 | connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() )); | 97 | connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() )); |
98 | 98 | ||
99 | localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); | 99 | localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); |
100 | localMenu->insertSeparator(); | 100 | localMenu->insertSeparator(); |
101 | localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); | 101 | localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); |
102 | localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); | 102 | localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); |
103 | localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() )); | 103 | localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() )); |
104 | localMenu->insertSeparator(); | 104 | localMenu->insertSeparator(); |
105 | localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); | 105 | localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); |
106 | localMenu->setCheckable(TRUE); | 106 | localMenu->setCheckable(TRUE); |
107 | 107 | ||
108 | remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); | 108 | remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); |
109 | remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); | 109 | remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); |
110 | remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); | 110 | remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); |
111 | remoteMenu->insertSeparator(); | 111 | remoteMenu->insertSeparator(); |
112 | remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); | 112 | remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); |
113 | 113 | ||
114 | tabMenu->insertSeparator(); | 114 | tabMenu->insertSeparator(); |
115 | tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); | 115 | tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); |
116 | tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); | 116 | tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); |
117 | tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); | 117 | tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); |
118 | tabMenu->insertSeparator(); | 118 | tabMenu->insertSeparator(); |
119 | // tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); | 119 | // tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); |
120 | tabMenu->setCheckable(TRUE); | 120 | tabMenu->setCheckable(TRUE); |
121 | 121 | ||
122 | 122 | ||
123 | 123 | ||
124 | cdUpButton = new QToolButton( this,"cdUpButton"); | 124 | cdUpButton = new QToolButton( this,"cdUpButton"); |
125 | cdUpButton->setPixmap(Resource::loadPixmap("up")); | 125 | cdUpButton->setPixmap(Resource::loadPixmap("up")); |
126 | cdUpButton ->setFixedSize( QSize( 20, 20 ) ); | 126 | cdUpButton ->setFixedSize( QSize( 20, 20 ) ); |
127 | connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); | 127 | connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); |
128 | layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 ); | 128 | layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 ); |
129 | cdUpButton->hide(); | 129 | cdUpButton->hide(); |
130 | 130 | ||
131 | // docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); | 131 | // docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); |
132 | // docButton->setFixedSize( QSize( 20, 20 ) ); | 132 | // docButton->setFixedSize( QSize( 20, 20 ) ); |
133 | // connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); | 133 | // connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); |
134 | // docButton->setFlat(TRUE); | 134 | // docButton->setFlat(TRUE); |
135 | // layout->addMultiCellWidget( docButton, 0, 0, 6, 6 ); | 135 | // layout->addMultiCellWidget( docButton, 0, 0, 6, 6 ); |
136 | 136 | ||
137 | homeButton = new QToolButton(this,"homeButton"); | 137 | homeButton = new QToolButton(this,"homeButton"); |
138 | homeButton->setPixmap( Resource::loadPixmap("home")); | 138 | homeButton->setPixmap( Resource::loadPixmap("home")); |
139 | homeButton->setFixedSize( QSize( 20, 20 ) ); | 139 | homeButton->setFixedSize( QSize( 20, 20 ) ); |
140 | connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); | 140 | connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); |
141 | layout->addMultiCellWidget( homeButton, 0, 0, 4, 4); | 141 | layout->addMultiCellWidget( homeButton, 0, 0, 4, 4); |
142 | homeButton->hide(); | 142 | homeButton->hide(); |
143 | 143 | ||
144 | TabWidget = new QTabWidget( this, "TabWidget" ); | 144 | TabWidget = new QTabWidget( this, "TabWidget" ); |
145 | layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 ); | 145 | layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 ); |
146 | 146 | ||
147 | // TabWidget->setTabShape(QTabWidget::Triangular); | 147 | // TabWidget->setTabShape(QTabWidget::Triangular); |
148 | 148 | ||
149 | tab = new QWidget( TabWidget, "tab" ); | 149 | tab = new QWidget( TabWidget, "tab" ); |
150 | tabLayout = new QGridLayout( tab ); | 150 | tabLayout = new QGridLayout( tab ); |
151 | tabLayout->setSpacing( 2); | 151 | tabLayout->setSpacing( 2); |
152 | tabLayout->setMargin( 2); | 152 | tabLayout->setMargin( 2); |
153 | 153 | ||
154 | Local_View = new QListView( tab, "Local_View" ); | 154 | Local_View = new QListView( tab, "Local_View" ); |
155 | // Local_View->setResizePolicy( QListView::AutoOneFit ); | 155 | // Local_View->setResizePolicy( QListView::AutoOneFit ); |
156 | Local_View->addColumn( tr("File"),150); | 156 | Local_View->addColumn( tr("File"),150); |
157 | Local_View->addColumn( tr("Date"),-1); | 157 | Local_View->addColumn( tr("Date"),-1); |
158 | Local_View->setColumnAlignment(1,QListView::AlignRight); | 158 | Local_View->setColumnAlignment(1,QListView::AlignRight); |
159 | Local_View->addColumn( tr("Size"),-1); | 159 | Local_View->addColumn( tr("Size"),-1); |
160 | Local_View->setColumnAlignment(2,QListView::AlignRight); | 160 | Local_View->setColumnAlignment(2,QListView::AlignRight); |
161 | Local_View->setAllColumnsShowFocus(TRUE); | 161 | Local_View->setAllColumnsShowFocus(TRUE); |
162 | 162 | ||
163 | Local_View->setMultiSelection( TRUE); | 163 | Local_View->setMultiSelection( TRUE); |
164 | Local_View->setSelectionMode(QListView::Extended); | 164 | Local_View->setSelectionMode(QListView::Extended); |
165 | Local_View->setFocusPolicy(QWidget::ClickFocus); | 165 | Local_View->setFocusPolicy(QWidget::ClickFocus); |
166 | 166 | ||
167 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); | 167 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); |
168 | 168 | ||
169 | tabLayout->addWidget( Local_View, 0, 0 ); | 169 | tabLayout->addWidget( Local_View, 0, 0 ); |
170 | 170 | ||
171 | connect( Local_View, SIGNAL( clicked( QListViewItem*)), | 171 | connect( Local_View, SIGNAL( clicked( QListViewItem*)), |
172 | this,SLOT( localListClicked(QListViewItem *)) ); | 172 | this,SLOT( localListClicked(QListViewItem *)) ); |
173 | // connect( Local_View, SIGNAL( doubleClicked( QListViewItem*)), | 173 | // connect( Local_View, SIGNAL( doubleClicked( QListViewItem*)), |
174 | // this,SLOT( localListClicked(QListViewItem *)) ); | 174 | // this,SLOT( localListClicked(QListViewItem *)) ); |
175 | connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 175 | connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), |
176 | this,SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) ); | 176 | this,SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) ); |
177 | 177 | ||
178 | TabWidget->insertTab( tab, tr( "Local" ) ); | 178 | TabWidget->insertTab( tab, tr( "Local" ) ); |
179 | 179 | ||
180 | tab_2 = new QWidget( TabWidget, "tab_2" ); | 180 | tab_2 = new QWidget( TabWidget, "tab_2" ); |
181 | tabLayout_2 = new QGridLayout( tab_2 ); | 181 | tabLayout_2 = new QGridLayout( tab_2 ); |
182 | tabLayout_2->setSpacing( 2); | 182 | tabLayout_2->setSpacing( 2); |
183 | tabLayout_2->setMargin( 2); | 183 | tabLayout_2->setMargin( 2); |
184 | 184 | ||
185 | Remote_View = new QListView( tab_2, "Remote_View" ); | 185 | Remote_View = new QListView( tab_2, "Remote_View" ); |
186 | Remote_View->addColumn( tr("File"),150); | 186 | Remote_View->addColumn( tr("File"),150); |
187 | Remote_View->addColumn( tr("Date"),-1); | 187 | Remote_View->addColumn( tr("Date"),-1); |
188 | // Remote_View->setColumnAlignment(1,QListView::AlignRight); | 188 | // Remote_View->setColumnAlignment(1,QListView::AlignRight); |
189 | Remote_View->addColumn( tr("Size"),-1); | 189 | Remote_View->addColumn( tr("Size"),-1); |
190 | Remote_View->setColumnAlignment(2,QListView::AlignRight); | 190 | Remote_View->setColumnAlignment(2,QListView::AlignRight); |
191 | Remote_View->setColumnAlignment(3,QListView::AlignCenter); | 191 | Remote_View->setColumnAlignment(3,QListView::AlignCenter); |
192 | Remote_View->addColumn( tr("Dir"),-1); | 192 | Remote_View->addColumn( tr("Dir"),-1); |
193 | Remote_View->setColumnAlignment(4,QListView::AlignRight); | 193 | Remote_View->setColumnAlignment(4,QListView::AlignRight); |
194 | Remote_View->setAllColumnsShowFocus(TRUE); | 194 | Remote_View->setAllColumnsShowFocus(TRUE); |
195 | 195 | ||
196 | Remote_View->setMultiSelection( FALSE); | 196 | Remote_View->setMultiSelection( FALSE); |
197 | Remote_View->setSelectionMode(QListView::Extended); | 197 | Remote_View->setSelectionMode(QListView::Extended); |
198 | Remote_View->setFocusPolicy(QWidget::ClickFocus); | 198 | Remote_View->setFocusPolicy(QWidget::ClickFocus); |
199 | 199 | ||
200 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); | 200 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); |
201 | 201 | ||
202 | connect( Remote_View, SIGNAL( clicked( QListViewItem*)), | 202 | connect( Remote_View, SIGNAL( clicked( QListViewItem*)), |
203 | this,SLOT( remoteListClicked(QListViewItem *)) ); | 203 | this,SLOT( remoteListClicked(QListViewItem *)) ); |
204 | connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 204 | connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), |
205 | this,SLOT( RemoteListPressed(int, QListViewItem *, const QPoint&, int)) ); | 205 | this,SLOT( RemoteListPressed(int, QListViewItem *, const QPoint&, int)) ); |
206 | 206 | ||
207 | tabLayout_2->addWidget( Remote_View, 0, 0 ); | 207 | tabLayout_2->addWidget( Remote_View, 0, 0 ); |
208 | 208 | ||
209 | TabWidget->insertTab( tab_2, tr( "Remote" ) ); | 209 | TabWidget->insertTab( tab_2, tr( "Remote" ) ); |
210 | 210 | ||
211 | tab_3 = new QWidget( TabWidget, "tab_3" ); | 211 | tab_3 = new QWidget( TabWidget, "tab_3" ); |
212 | tabLayout_3 = new QGridLayout( tab_3 ); | 212 | tabLayout_3 = new QGridLayout( tab_3 ); |
213 | tabLayout_3->setSpacing( 2); | 213 | tabLayout_3->setSpacing( 2); |
214 | tabLayout_3->setMargin( 2); | 214 | tabLayout_3->setMargin( 2); |
215 | 215 | ||
216 | TextLabel1 = new QLabel( tab_3, "TextLabel1" ); | 216 | TextLabel1 = new QLabel( tab_3, "TextLabel1" ); |
217 | TextLabel1->setText( tr( "Username" ) ); | 217 | TextLabel1->setText( tr( "Username" ) ); |
218 | tabLayout_3->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 ); | 218 | tabLayout_3->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 ); |
219 | 219 | ||
220 | UsernameComboBox = new QComboBox( FALSE, tab_3, "UsernameComboBox" ); | 220 | UsernameComboBox = new QComboBox( FALSE, tab_3, "UsernameComboBox" ); |
221 | UsernameComboBox->setEditable(TRUE); | 221 | UsernameComboBox->setEditable(TRUE); |
222 | tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 ); | 222 | tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 ); |
223 | 223 | ||
224 | connect( UsernameComboBox,SIGNAL(textChanged(const QString &)),this, | 224 | connect( UsernameComboBox,SIGNAL(textChanged(const QString &)),this, |
225 | SLOT( UsernameComboBoxEdited(const QString & ) )); | 225 | SLOT( UsernameComboBoxEdited(const QString & ) )); |
226 | 226 | ||
227 | TextLabel2 = new QLabel( tab_3, "TextLabel2" ); | 227 | TextLabel2 = new QLabel( tab_3, "TextLabel2" ); |
228 | TextLabel2->setText( tr( "Password" ) ); | 228 | TextLabel2->setText( tr( "Password" ) ); |
229 | tabLayout_3->addMultiCellWidget( TextLabel2, 0, 0, 2, 3 ); | 229 | tabLayout_3->addMultiCellWidget( TextLabel2, 0, 0, 2, 3 ); |
230 | 230 | ||
231 | PasswordEdit = new QLineEdit( "", tab_3, "PasswordComboBox" ); | 231 | PasswordEdit = new QLineEdit( "", tab_3, "PasswordComboBox" ); |
232 | PasswordEdit->setEchoMode(QLineEdit::Password); | 232 | PasswordEdit->setEchoMode(QLineEdit::Password); |
233 | tabLayout_3->addMultiCellWidget( PasswordEdit, 1, 1, 2, 3 ); | 233 | tabLayout_3->addMultiCellWidget( PasswordEdit, 1, 1, 2, 3 ); |
234 | 234 | ||
235 | connect( PasswordEdit,SIGNAL(textChanged(const QString &)),this, | 235 | connect( PasswordEdit,SIGNAL(textChanged(const QString &)),this, |
236 | SLOT( PasswordEditEdited(const QString & ) )); | 236 | SLOT( PasswordEditEdited(const QString & ) )); |
237 | 237 | ||
238 | //PasswordEdit->setFixedWidth(85); | 238 | //PasswordEdit->setFixedWidth(85); |
239 | TextLabel3 = new QLabel( tab_3, "TextLabel3" ); | 239 | TextLabel3 = new QLabel( tab_3, "TextLabel3" ); |
240 | TextLabel3->setText( tr( "Remote server" ) ); | 240 | TextLabel3->setText( tr( "Remote server" ) ); |
241 | tabLayout_3->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 ); | 241 | tabLayout_3->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 ); |
242 | 242 | ||
243 | ServerComboBox = new QComboBox( FALSE, tab_3, "ServerComboBox" ); | 243 | ServerComboBox = new QComboBox( FALSE, tab_3, "ServerComboBox" ); |
244 | ServerComboBox->setEditable(TRUE); | 244 | ServerComboBox->setEditable(TRUE); |
245 | tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 ); | 245 | tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 ); |
246 | 246 | ||
247 | connect(ServerComboBox,SIGNAL(activated(int)),this,SLOT(serverComboSelected(int ) )); | 247 | connect(ServerComboBox,SIGNAL(activated(int)),this,SLOT(serverComboSelected(int ) )); |
248 | connect(ServerComboBox,SIGNAL(textChanged(const QString &)),this, | 248 | connect(ServerComboBox,SIGNAL(textChanged(const QString &)),this, |
249 | SLOT(serverComboEdited(const QString & ) )); | 249 | SLOT(serverComboEdited(const QString & ) )); |
250 | 250 | ||
251 | QLabel *TextLabel5 = new QLabel( tab_3, "TextLabel5" ); | 251 | QLabel *TextLabel5 = new QLabel( tab_3, "TextLabel5" ); |
252 | TextLabel5->setText( tr( "Remote path" ) ); | 252 | TextLabel5->setText( tr( "Remote path" ) ); |
253 | tabLayout_3->addMultiCellWidget( TextLabel5, 2, 2, 2, 3 ); | 253 | tabLayout_3->addMultiCellWidget( TextLabel5, 2, 2, 2, 3 ); |
254 | 254 | ||
255 | 255 | ||
256 | remotePath = new QLineEdit( "/", tab_3, "remotePath" ); | 256 | remotePath = new QLineEdit( "/", tab_3, "remotePath" ); |
257 | tabLayout_3->addMultiCellWidget( remotePath, 3, 3, 2, 3 ); | 257 | tabLayout_3->addMultiCellWidget( remotePath, 3, 3, 2, 3 ); |
258 | TextLabel4 = new QLabel( tab_3, "TextLabel4" ); | 258 | TextLabel4 = new QLabel( tab_3, "TextLabel4" ); |
259 | TextLabel4->setText( tr( "Port" ) ); | 259 | TextLabel4->setText( tr( "Port" ) ); |
260 | tabLayout_3->addMultiCellWidget( TextLabel4, 4, 4, 0, 1 ); | 260 | tabLayout_3->addMultiCellWidget( TextLabel4, 4, 4, 0, 1 ); |
261 | 261 | ||
262 | PortSpinBox = new QSpinBox( tab_3, "PortSpinBox" ); | 262 | PortSpinBox = new QSpinBox( tab_3, "PortSpinBox" ); |
263 | PortSpinBox->setButtonSymbols( QSpinBox::UpDownArrows ); | 263 | PortSpinBox->setButtonSymbols( QSpinBox::UpDownArrows ); |
264 | PortSpinBox->setMaxValue(32786); | 264 | PortSpinBox->setMaxValue(32786); |
265 | tabLayout_3->addMultiCellWidget( PortSpinBox, 4, 4, 1, 1); | 265 | tabLayout_3->addMultiCellWidget( PortSpinBox, 4, 4, 1, 1); |
266 | 266 | ||
267 | serverListView = new QListBox( tab_3, "ServerListView" ); | 267 | serverListView = new QListBox( tab_3, "ServerListView" ); |
268 | tabLayout_3->addMultiCellWidget( serverListView , 5, 5, 0, 5); | 268 | tabLayout_3->addMultiCellWidget( serverListView , 5, 5, 0, 5); |
269 | 269 | ||
270 | connect( serverListView, SIGNAL( highlighted( const QString &)), | 270 | connect( serverListView, SIGNAL( highlighted( const QString &)), |
271 | this,SLOT( serverListClicked( const QString &) ) ); | 271 | this,SLOT( serverListClicked( const QString &) ) ); |
272 | 272 | ||
273 | connectServerBtn = new QPushButton( tr("Connect"), tab_3 , "ConnectButton" ); | 273 | connectServerBtn = new QPushButton( tr("Connect"), tab_3 , "ConnectButton" ); |
274 | tabLayout_3->addMultiCellWidget( connectServerBtn, 6, 6, 0, 1); | 274 | tabLayout_3->addMultiCellWidget( connectServerBtn, 6, 6, 0, 1); |
275 | connectServerBtn->setToggleButton(TRUE); | 275 | connectServerBtn->setToggleButton(TRUE); |
276 | connect(connectServerBtn,SIGNAL( toggled( bool)),SLOT( connectorBtnToggled(bool) )); | 276 | connect(connectServerBtn,SIGNAL( toggled( bool)),SLOT( connectorBtnToggled(bool) )); |
277 | 277 | ||
278 | newServerButton= new QPushButton( tr("Add"), tab_3 , "NewServerButton" ); | 278 | newServerButton= new QPushButton( tr("Add"), tab_3 , "NewServerButton" ); |
279 | tabLayout_3->addMultiCellWidget( newServerButton, 6, 6, 2, 2); | 279 | tabLayout_3->addMultiCellWidget( newServerButton, 6, 6, 2, 2); |
280 | connect( newServerButton,SIGNAL( clicked()),SLOT( NewServer() )); | 280 | connect( newServerButton,SIGNAL( clicked()),SLOT( NewServer() )); |
281 | 281 | ||
282 | QPushButton *deleteServerBtn; | 282 | QPushButton *deleteServerBtn; |
283 | deleteServerBtn = new QPushButton( tr("Delete"), tab_3 , "OpenButton" ); | 283 | deleteServerBtn = new QPushButton( tr("Delete"), tab_3 , "OpenButton" ); |
284 | tabLayout_3->addMultiCellWidget( deleteServerBtn, 6, 6, 3, 3); | 284 | tabLayout_3->addMultiCellWidget( deleteServerBtn, 6, 6, 3, 3); |
285 | 285 | ||
286 | connect(deleteServerBtn,SIGNAL(clicked()),SLOT(deleteServer())); | 286 | connect(deleteServerBtn,SIGNAL(clicked()),SLOT(deleteServer())); |
287 | 287 | ||
288 | 288 | ||
289 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); | 289 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); |
290 | tabLayout_3->addItem( spacer, 5, 0 ); | 290 | tabLayout_3->addItem( spacer, 5, 0 ); |
291 | 291 | ||
292 | TabWidget->insertTab( tab_3, tr( "Config" ) ); | 292 | TabWidget->insertTab( tab_3, tr( "Config" ) ); |
293 | 293 | ||
294 | connect(TabWidget,SIGNAL(currentChanged(QWidget *)), | 294 | connect(TabWidget,SIGNAL(currentChanged(QWidget *)), |
295 | this,SLOT(tabChanged(QWidget*))); | 295 | this,SLOT(tabChanged(QWidget*))); |
296 | 296 | ||
297 | currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); | 297 | currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); |
298 | currentDir.setPath( QDir::currentDirPath()); | 298 | currentDir.setPath( QDir::currentDirPath()); |
299 | // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); | 299 | // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); |
300 | 300 | ||
301 | currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); | 301 | currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); |
302 | layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 4); | 302 | layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 4); |
303 | currentPathCombo ->setFixedWidth(220); | 303 | currentPathCombo ->setFixedWidth(220); |
304 | currentPathCombo->setEditable(TRUE); | 304 | currentPathCombo->setEditable(TRUE); |
305 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 305 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
306 | 306 | ||
307 | connect( currentPathCombo, SIGNAL( activated( const QString & ) ), | 307 | connect( currentPathCombo, SIGNAL( activated( const QString & ) ), |
308 | this, SLOT( currentPathComboActivated( const QString & ) ) ); | 308 | this, SLOT( currentPathComboActivated( const QString & ) ) ); |
309 | 309 | ||
310 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), | 310 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), |
311 | this,SLOT(currentPathComboChanged())); | 311 | this,SLOT(currentPathComboChanged())); |
312 | 312 | ||
313 | ProgressBar = new QProgressBar( this, "ProgressBar" ); | 313 | ProgressBar = new QProgressBar( this, "ProgressBar" ); |
314 | layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4); | 314 | layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4); |
315 | ProgressBar->setMaximumHeight(10); | 315 | ProgressBar->setMaximumHeight(10); |
316 | filterStr="*"; | 316 | filterStr="*"; |
317 | b=FALSE; | 317 | b=FALSE; |
318 | populateLocalView(); | 318 | populateLocalView(); |
319 | readConfig(); | 319 | readConfig(); |
320 | 320 | ||
321 | // ServerComboBox->setCurrentItem(currentServerConfig); | 321 | // ServerComboBox->setCurrentItem(currentServerConfig); |
322 | 322 | ||
323 | TabWidget->setCurrentPage(2); | 323 | TabWidget->setCurrentPage(2); |
324 | } | 324 | } |
325 | 325 | ||
326 | OpieFtp::~OpieFtp() | 326 | OpieFtp::~OpieFtp() |
327 | { | 327 | { |
328 | } | 328 | } |
329 | 329 | ||
330 | void OpieFtp::cleanUp() | 330 | void OpieFtp::cleanUp() |
331 | { | 331 | { |
332 | if(conn) | 332 | if(conn) |
333 | FtpQuit(conn); | 333 | FtpQuit(conn); |
334 | QString sfile=QDir::homeDirPath(); | 334 | QString sfile=QDir::homeDirPath(); |
335 | if(sfile.right(1) != "/") | 335 | if(sfile.right(1) != "/") |
336 | sfile+="/._temp"; | 336 | sfile+="/._temp"; |
337 | else | 337 | else |
338 | sfile+="._temp"; | 338 | sfile+="._temp"; |
339 | QFile file( sfile); | 339 | QFile file( sfile); |
340 | if(file.exists()) | 340 | if(file.exists()) |
341 | file.remove(); | 341 | file.remove(); |
342 | Config cfg("opieftp"); | 342 | Config cfg("opieftp"); |
343 | cfg.setGroup("Server"); | 343 | cfg.setGroup("Server"); |
344 | cfg.writeEntry("currentServer", currentServerConfig); | 344 | cfg.writeEntry("currentServer", currentServerConfig); |
345 | 345 | ||
346 | exit(0); | 346 | exit(0); |
347 | } | 347 | } |
348 | 348 | ||
349 | void OpieFtp::tabChanged(QWidget *) | 349 | void OpieFtp::tabChanged(QWidget *) |
350 | { | 350 | { |
351 | if (TabWidget->currentPageIndex() == 0) { | 351 | if (TabWidget->currentPageIndex() == 0) { |
352 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 352 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
353 | tabMenu->setItemChecked(tabMenu->idAt(0),TRUE); | 353 | tabMenu->setItemChecked(tabMenu->idAt(0),TRUE); |
354 | tabMenu->setItemChecked(tabMenu->idAt(1),FALSE); | 354 | tabMenu->setItemChecked(tabMenu->idAt(1),FALSE); |
355 | tabMenu->setItemChecked(tabMenu->idAt(2),FALSE); | 355 | tabMenu->setItemChecked(tabMenu->idAt(2),FALSE); |
356 | if(cdUpButton->isHidden()) | 356 | if(cdUpButton->isHidden()) |
357 | cdUpButton->show(); | 357 | cdUpButton->show(); |
358 | if(homeButton->isHidden()) | 358 | if(homeButton->isHidden()) |
359 | homeButton->show(); | 359 | homeButton->show(); |
360 | 360 | ||
361 | } | 361 | } |
362 | if (TabWidget->currentPageIndex() == 1) { | 362 | if (TabWidget->currentPageIndex() == 1) { |
363 | currentPathCombo->lineEdit()->setText( currentRemoteDir ); | 363 | currentPathCombo->lineEdit()->setText( currentRemoteDir ); |
364 | tabMenu->setItemChecked(tabMenu->idAt(1),TRUE); | 364 | tabMenu->setItemChecked(tabMenu->idAt(1),TRUE); |
365 | tabMenu->setItemChecked(tabMenu->idAt(0),FALSE); | 365 | tabMenu->setItemChecked(tabMenu->idAt(0),FALSE); |
366 | tabMenu->setItemChecked(tabMenu->idAt(2),FALSE); | 366 | tabMenu->setItemChecked(tabMenu->idAt(2),FALSE); |
367 | if(cdUpButton->isHidden()) | 367 | if(cdUpButton->isHidden()) |
368 | cdUpButton->show(); | 368 | cdUpButton->show(); |
369 | homeButton->hide(); | 369 | homeButton->hide(); |
370 | 370 | ||
371 | } | 371 | } |
372 | if (TabWidget->currentPageIndex() == 2) { | 372 | if (TabWidget->currentPageIndex() == 2) { |
373 | tabMenu->setItemChecked(tabMenu->idAt(2),TRUE); | 373 | tabMenu->setItemChecked(tabMenu->idAt(2),TRUE); |
374 | tabMenu->setItemChecked(tabMenu->idAt(0),FALSE); | 374 | tabMenu->setItemChecked(tabMenu->idAt(0),FALSE); |
375 | tabMenu->setItemChecked(tabMenu->idAt(1),FALSE); | 375 | tabMenu->setItemChecked(tabMenu->idAt(1),FALSE); |
376 | cdUpButton->hide(); | 376 | cdUpButton->hide(); |
377 | homeButton->hide(); | 377 | homeButton->hide(); |
378 | } | 378 | } |
379 | } | 379 | } |
380 | 380 | ||
381 | void OpieFtp::newConnection() | 381 | void OpieFtp::newConnection() |
382 | { | 382 | { |
383 | UsernameComboBox->lineEdit()->setText(""); | 383 | UsernameComboBox->lineEdit()->setText(""); |
384 | PasswordEdit->setText( "" ); | 384 | PasswordEdit->setText( "" ); |
385 | ServerComboBox->lineEdit()->setText( ""); | 385 | ServerComboBox->lineEdit()->setText( ""); |
386 | remotePath->setText( currentRemoteDir = "/"); | 386 | remotePath->setText( currentRemoteDir = "/"); |
387 | PortSpinBox->setValue( 21); | 387 | PortSpinBox->setValue( 21); |
388 | TabWidget->setCurrentPage(2); | 388 | TabWidget->setCurrentPage(2); |
389 | } | 389 | } |
390 | 390 | ||
391 | void OpieFtp::serverComboEdited(const QString & ) | 391 | void OpieFtp::serverComboEdited(const QString & ) |
392 | { | 392 | { |
393 | // if( ServerComboBox->text(currentServerConfig) != edit /*edit.isEmpty() */) { | 393 | // if( ServerComboBox->text(currentServerConfig) != edit /*edit.isEmpty() */) { |
394 | // qDebug("ServerComboEdited"); | 394 | // qDebug("ServerComboEdited"); |
395 | // // currentServerConfig = -1; | 395 | // // currentServerConfig = -1; |
396 | // } | 396 | // } |
397 | } | 397 | } |
398 | 398 | ||
399 | void OpieFtp::UsernameComboBoxEdited(const QString &) { | 399 | void OpieFtp::UsernameComboBoxEdited(const QString &) { |
400 | // currentServerConfig = -1; | 400 | // currentServerConfig = -1; |
401 | } | 401 | } |
402 | 402 | ||
403 | void OpieFtp::PasswordEditEdited(const QString & ) { | 403 | void OpieFtp::PasswordEditEdited(const QString & ) { |
404 | // currentServerConfig = -1; | 404 | // currentServerConfig = -1; |
405 | } | 405 | } |
406 | 406 | ||
407 | void OpieFtp::connectorBtnToggled(bool On) | 407 | void OpieFtp::connectorBtnToggled(bool On) |
408 | { | 408 | { |
409 | if(On) { | 409 | if(On) { |
410 | connector(); | 410 | connector(); |
411 | } else { | 411 | } else { |
412 | disConnector(); | 412 | disConnector(); |
413 | } | 413 | } |
414 | 414 | ||
415 | } | 415 | } |
416 | 416 | ||
417 | void OpieFtp::connector() | 417 | void OpieFtp::connector() |
418 | { | 418 | { |
419 | // QCopEnvelope ( "QPE/System", "busy()" ); | 419 | // QCopEnvelope ( "QPE/System", "busy()" ); |
420 | // qApp->processEvents(); | 420 | // qApp->processEvents(); |
421 | currentRemoteDir=remotePath->text(); | 421 | currentRemoteDir=remotePath->text(); |
422 | 422 | ||
423 | if( ServerComboBox->currentText().isEmpty()) { | 423 | if( ServerComboBox->currentText().isEmpty()) { |
424 | 424 | ||
425 | QMessageBox::warning(this,tr("Ftp"),tr("Please set the server info"),tr("Ok"),0,0); | 425 | QMessageBox::warning(this,tr("Ftp"),tr("Please set the server info"),tr("Ok"),0,0); |
426 | TabWidget->setCurrentPage(2); | 426 | TabWidget->setCurrentPage(2); |
427 | ServerComboBox->setFocus(); | 427 | ServerComboBox->setFocus(); |
428 | connectServerBtn->setOn(FALSE); | 428 | connectServerBtn->setOn(FALSE); |
429 | connectServerBtn->setText( tr("Connect")); | 429 | connectServerBtn->setText( tr("Connect")); |
430 | return; | 430 | return; |
431 | } | 431 | } |
432 | 432 | ||
433 | FtpInit(); | 433 | FtpInit(); |
434 | 434 | ||
435 | TabWidget->setCurrentPage(1); | 435 | TabWidget->setCurrentPage(1); |
436 | QString ftp_host = ServerComboBox->currentText(); | 436 | QString ftp_host = ServerComboBox->currentText(); |
437 | QString ftp_user = UsernameComboBox->currentText(); | 437 | QString ftp_user = UsernameComboBox->currentText(); |
438 | QString ftp_pass = PasswordEdit->text(); | 438 | QString ftp_pass = PasswordEdit->text(); |
439 | QString port=PortSpinBox->cleanText(); | 439 | QString port=PortSpinBox->cleanText(); |
440 | port.stripWhiteSpace(); | 440 | port.stripWhiteSpace(); |
441 | 441 | ||
442 | Config cfg("opieftp"); | 442 | Config cfg("opieftp"); |
443 | cfg.setGroup("Server"); | 443 | cfg.setGroup("Server"); |
444 | // int current=cfg.readNumEntry("currentServer", 1); | 444 | // int current=cfg.readNumEntry("currentServer", 1); |
445 | 445 | ||
446 | // if(ftp_host!= cfg.readEntry(QString::number( current))) | 446 | // if(ftp_host!= cfg.readEntry(QString::number( current))) |
447 | // currentServerConfig=-1; | 447 | // currentServerConfig=-1; |
448 | // cfg.setGroup(QString::number(current)); | 448 | // cfg.setGroup(QString::number(current)); |
449 | // if( ftp_user != cfg.readEntry("Username")) | 449 | // if( ftp_user != cfg.readEntry("Username")) |
450 | // currentServerConfig=-1; | 450 | // currentServerConfig=-1; |
451 | // if(ftp_pass != cfg.readEntry(cfg.readEntry("Username"))) | 451 | // if(ftp_pass != cfg.readEntry(cfg.readEntry("Username"))) |
452 | // currentServerConfig=-1; | 452 | // currentServerConfig=-1; |
453 | 453 | ||
454 | 454 | ||
455 | if(ftp_host.find("ftp://",0, TRUE) != -1 ) | 455 | if(ftp_host.find("ftp://",0, TRUE) != -1 ) |
456 | ftp_host=ftp_host.right(ftp_host.length()-6); | 456 | ftp_host=ftp_host.right(ftp_host.length()-6); |
457 | ftp_host+=":"+port; | 457 | ftp_host+=":"+port; |
458 | 458 | ||
459 | if (!FtpConnect( ftp_host.latin1(), &conn)) { | 459 | if (!FtpConnect( ftp_host.latin1(), &conn)) { |
460 | QMessageBox::message(tr("Note"),tr("Unable to connect to\n")+ftp_host); | 460 | QMessageBox::message(tr("Note"),tr("Unable to connect to\n")+ftp_host); |
461 | connectServerBtn->setOn(FALSE); | 461 | connectServerBtn->setOn(FALSE); |
462 | connectServerBtn->setText( tr("Connect")); | 462 | connectServerBtn->setText( tr("Connect")); |
463 | return ; | 463 | return ; |
464 | } | 464 | } |
465 | 465 | ||
466 | if (!FtpLogin( ftp_user.latin1(), ftp_pass.latin1(),conn )) { | 466 | if (!FtpLogin( ftp_user.latin1(), ftp_pass.latin1(),conn )) { |
467 | QString msg; | 467 | QString msg; |
468 | msg.sprintf(tr("Unable to log in\n")+"%s",FtpLastResponse(conn)); | 468 | msg.sprintf(tr("Unable to log in\n")+"%s",FtpLastResponse(conn)); |
469 | msg.replace(QRegExp(":"),"\n"); | 469 | msg.replace(QRegExp(":"),"\n"); |
470 | QMessageBox::message(tr("Note"),msg); | 470 | QMessageBox::message(tr("Note"),msg); |
471 | if(conn) | 471 | if(conn) |
472 | FtpQuit(conn); | 472 | FtpQuit(conn); |
473 | connectServerBtn->setOn(FALSE); | 473 | connectServerBtn->setOn(FALSE); |
474 | connectServerBtn->setText( tr("Connect")); | 474 | connectServerBtn->setText( tr("Connect")); |
475 | return ; | 475 | return ; |
476 | } | 476 | } |
477 | 477 | ||
478 | remoteDirList("/") ; | 478 | remoteDirList("/") ; |
479 | setCaption(ftp_host); | 479 | setCaption(ftp_host); |
480 | if( currentServerConfig == -1) | 480 | if( currentServerConfig == -1) |
481 | writeConfig(); | 481 | writeConfig(); |
482 | connectServerBtn->setText( tr("Disconnect")); | 482 | connectServerBtn->setText( tr("Disconnect")); |
483 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 483 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
484 | } | 484 | } |
485 | 485 | ||
486 | void OpieFtp::disConnector() | 486 | void OpieFtp::disConnector() |
487 | { | 487 | { |
488 | if(conn) | 488 | if(conn) |
489 | FtpQuit(conn); | 489 | FtpQuit(conn); |
490 | setCaption("OpieFtp"); | 490 | setCaption("OpieFtp"); |
491 | currentRemoteDir="/"; | 491 | currentRemoteDir="/"; |
492 | Remote_View->clear(); | 492 | Remote_View->clear(); |
493 | connectServerBtn->setText( tr("Connect")); | 493 | connectServerBtn->setText( tr("Connect")); |
494 | connectServerBtn->setOn(FALSE); | 494 | connectServerBtn->setOn(FALSE); |
495 | setCaption("OpieFtp"); | 495 | setCaption("OpieFtp"); |
496 | } | 496 | } |
497 | 497 | ||
498 | void OpieFtp::localUpload() | 498 | void OpieFtp::localUpload() |
499 | { | 499 | { |
500 | int fsz; | 500 | int fsz; |
501 | // QCopEnvelope ( "QPE/System", "busy()" ); | 501 | // QCopEnvelope ( "QPE/System", "busy()" ); |
502 | // qApp->processEvents(); | 502 | // qApp->processEvents(); |
503 | QList<QListViewItem> * getSelectedItems( QListView * Local_View ); | 503 | QList<QListViewItem> * getSelectedItems( QListView * Local_View ); |
504 | QListViewItemIterator it( Local_View ); | 504 | QListViewItemIterator it( Local_View ); |
505 | for ( ; it.current(); ++it ) { | 505 | for ( ; it.current(); ++it ) { |
506 | if ( it.current()->isSelected() ) { | 506 | if ( it.current()->isSelected() ) { |
507 | QString strItem = it.current()->text(0); | 507 | QString strItem = it.current()->text(0); |
508 | QString localFile = currentDir.canonicalPath()+"/"+strItem; | 508 | QString localFile = currentDir.canonicalPath()+"/"+strItem; |
509 | QString remoteFile= currentRemoteDir+strItem; | 509 | QString remoteFile= currentRemoteDir+strItem; |
510 | QFileInfo fi(localFile); | 510 | QFileInfo fi(localFile); |
511 | if( !fi.isDir()) { | 511 | if( !fi.isDir()) { |
512 | fsz=fi.size(); | 512 | fsz=fi.size(); |
513 | ProgressBar->setTotalSteps(fsz); | 513 | ProgressBar->setTotalSteps(fsz); |
514 | 514 | ||
515 | FtpOptions(FTPLIB_CALLBACK, (long) log_progress, conn); | 515 | FtpOptions(FTPLIB_CALLBACK, (long) log_progress, conn); |
516 | FtpOptions(FTPLIB_IDLETIME, (long) 1000, conn); | 516 | FtpOptions(FTPLIB_IDLETIME, (long) 1000, conn); |
517 | FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn); | 517 | FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn); |
518 | FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn); | 518 | FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn); |
519 | qDebug("Put: %s, %s",localFile.latin1(),remoteFile.latin1()); | 519 | qDebug("Put: %s, %s",localFile.latin1(),remoteFile.latin1()); |
520 | 520 | ||
521 | if( !FtpPut( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) { | 521 | if( !FtpPut( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) { |
522 | QString msg; | 522 | QString msg; |
523 | msg.sprintf(tr("Unable to upload\n")+"%s",FtpLastResponse(conn)); | 523 | msg.sprintf(tr("Unable to upload\n")+"%s",FtpLastResponse(conn)); |
524 | msg.replace(QRegExp(":"),"\n"); | 524 | msg.replace(QRegExp(":"),"\n"); |
525 | QMessageBox::message(tr("Note"),msg); | 525 | QMessageBox::message(tr("Note"),msg); |
526 | } | 526 | } |
527 | } else { | 527 | } else { |
528 | QMessageBox::message(tr("Note"),tr("Cannot upload directories")); | 528 | QMessageBox::message(tr("Note"),tr("Cannot upload directories")); |
529 | } | 529 | } |
530 | ProgressBar->reset(); | 530 | ProgressBar->reset(); |
531 | nullifyCallBack(); | 531 | nullifyCallBack(); |
532 | it.current()->setSelected(FALSE); | 532 | it.current()->setSelected(FALSE); |
533 | } //end currentSelected | 533 | } //end currentSelected |
534 | } | 534 | } |
535 | for ( ; it.current(); ++it ) { | 535 | for ( ; it.current(); ++it ) { |
536 | Local_View->clearSelection(); | 536 | Local_View->clearSelection(); |
537 | } | 537 | } |
538 | Local_View->clearFocus(); | 538 | Local_View->clearFocus(); |
539 | TabWidget->setCurrentPage(1); | 539 | TabWidget->setCurrentPage(1); |
540 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate | 540 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate |
541 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 541 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
542 | } | 542 | } |
543 | 543 | ||
544 | void OpieFtp::nullifyCallBack() | 544 | void OpieFtp::nullifyCallBack() |
545 | { | 545 | { |
546 | FtpOptions(FTPLIB_CALLBACK, 0, conn); | 546 | FtpOptions(FTPLIB_CALLBACK, 0, conn); |
547 | FtpOptions(FTPLIB_IDLETIME, 0, conn); | 547 | FtpOptions(FTPLIB_IDLETIME, 0, conn); |
548 | FtpOptions(FTPLIB_CALLBACKARG, 0, conn); | 548 | FtpOptions(FTPLIB_CALLBACKARG, 0, conn); |
549 | FtpOptions(FTPLIB_CALLBACKBYTES, 0, conn); | 549 | FtpOptions(FTPLIB_CALLBACKBYTES, 0, conn); |
550 | } | 550 | } |
551 | 551 | ||
552 | void OpieFtp::remoteDownload() | 552 | void OpieFtp::remoteDownload() |
553 | { | 553 | { |
554 | // qApp->processEvents(); | 554 | // qApp->processEvents(); |
555 | int fsz; | 555 | int fsz; |
556 | // QCopEnvelope ( "QPE/System", "busy()" ); | 556 | // QCopEnvelope ( "QPE/System", "busy()" ); |
557 | 557 | ||
558 | QList<QListViewItem> * getSelectedItems( QListView * Remote_View ); | 558 | QList<QListViewItem> * getSelectedItems( QListView * Remote_View ); |
559 | QListViewItemIterator it( Remote_View ); | 559 | QListViewItemIterator it( Remote_View ); |
560 | for ( ; it.current(); ++it ) { | 560 | for ( ; it.current(); ++it ) { |
561 | if ( it.current()->isSelected() ) { | 561 | if ( it.current()->isSelected() ) { |
562 | QString strItem = it.current()->text(0); | 562 | QString strItem = it.current()->text(0); |
563 | // strItem=strItem.right(strItem.length()-1); | 563 | // strItem=strItem.right(strItem.length()-1); |
564 | QString localFile = currentDir.canonicalPath(); | 564 | QString localFile = currentDir.canonicalPath(); |
565 | if(localFile.right(1).find("/",0,TRUE) == -1) | 565 | if(localFile.right(1).find("/",0,TRUE) == -1) |
566 | localFile += "/"; | 566 | localFile += "/"; |
567 | localFile += strItem; | 567 | localFile += strItem; |
568 | // QString localFile = currentDir.canonicalPath()+"/"+strItem; | 568 | // QString localFile = currentDir.canonicalPath()+"/"+strItem; |
569 | QString remoteFile= currentRemoteDir+strItem; | 569 | QString remoteFile= currentRemoteDir+strItem; |
570 | if (!FtpSize( remoteFile.latin1(), &fsz, FTPLIB_ASCII, conn)) | 570 | if (!FtpSize( remoteFile.latin1(), &fsz, FTPLIB_ASCII, conn)) |
571 | fsz = 0; | 571 | fsz = 0; |
572 | QString temp; | 572 | QString temp; |
573 | temp.sprintf( remoteFile+" "+" %dkb", fsz); | 573 | temp.sprintf( remoteFile+" "+" %dkb", fsz); |
574 | 574 | ||
575 | ProgressBar->setTotalSteps(fsz); | 575 | ProgressBar->setTotalSteps(fsz); |
576 | FtpOptions(FTPLIB_CALLBACK, (long) log_progress, conn); | 576 | FtpOptions(FTPLIB_CALLBACK, (long) log_progress, conn); |
577 | FtpOptions(FTPLIB_IDLETIME, (long) 1000, conn); | 577 | FtpOptions(FTPLIB_IDLETIME, (long) 1000, conn); |
578 | FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn); | 578 | FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn); |
579 | FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn); | 579 | FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn); |
580 | qDebug("Get: %s, %s",localFile.latin1(),remoteFile.latin1()); | 580 | qDebug("Get: %s, %s",localFile.latin1(),remoteFile.latin1()); |
581 | 581 | ||
582 | if(!FtpGet( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) { | 582 | if(!FtpGet( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) { |
583 | QString msg; | 583 | QString msg; |
584 | msg.sprintf(tr("Unable to download \n")+"%s",FtpLastResponse(conn)); | 584 | msg.sprintf(tr("Unable to download \n")+"%s",FtpLastResponse(conn)); |
585 | msg.replace(QRegExp(":"),"\n"); | 585 | msg.replace(QRegExp(":"),"\n"); |
586 | QMessageBox::message(tr("Note"),msg); | 586 | QMessageBox::message(tr("Note"),msg); |
587 | } | 587 | } |
588 | ProgressBar->reset(); | 588 | ProgressBar->reset(); |
589 | nullifyCallBack(); | 589 | nullifyCallBack(); |
590 | it.current()->setSelected(FALSE); | 590 | it.current()->setSelected(FALSE); |
591 | } | 591 | } |
592 | } | 592 | } |
593 | for ( ; it.current(); ++it ) { | 593 | for ( ; it.current(); ++it ) { |
594 | Remote_View->clearSelection(); | 594 | Remote_View->clearSelection(); |
595 | } | 595 | } |
596 | Remote_View->setFocus(); | 596 | Remote_View->setFocus(); |
597 | TabWidget->setCurrentPage(0); | 597 | TabWidget->setCurrentPage(0); |
598 | populateLocalView(); | 598 | populateLocalView(); |
599 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 599 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
600 | } | 600 | } |
601 | 601 | ||
602 | bool OpieFtp::remoteDirList(const QString &dir) | 602 | bool OpieFtp::remoteDirList(const QString &dir) |
603 | { | 603 | { |
604 | QString tmp = QDir::homeDirPath(); | 604 | QString tmp = QDir::homeDirPath(); |
605 | if(tmp.right(1) != "/") | 605 | if(tmp.right(1) != "/") |
606 | tmp+="/._temp"; | 606 | tmp+="/._temp"; |
607 | else | 607 | else |
608 | tmp+="._temp"; | 608 | tmp+="._temp"; |
609 | // qDebug("Listing remote dir "+tmp); | 609 | // qDebug("Listing remote dir "+tmp); |
610 | // QCopEnvelope ( "QPE/System", "busy()" ); | 610 | // QCopEnvelope ( "QPE/System", "busy()" ); |
611 | if (!FtpDir( tmp.latin1(), dir.latin1(), conn) ) { | 611 | if (!FtpDir( tmp.latin1(), dir.latin1(), conn) ) { |
612 | QString msg; | 612 | QString msg; |
613 | msg.sprintf(tr("Unable to list the directory\n")+dir+"\n%s",FtpLastResponse(conn) ); | 613 | msg.sprintf(tr("Unable to list the directory\n")+dir+"\n%s",FtpLastResponse(conn) ); |
614 | msg.replace(QRegExp(":"),"\n"); | 614 | msg.replace(QRegExp(":"),"\n"); |
615 | QMessageBox::message(tr("Note"),msg); | 615 | QMessageBox::message(tr("Note"),msg); |
616 | return false; | 616 | return false; |
617 | } | 617 | } |
618 | populateRemoteView() ; | 618 | populateRemoteView() ; |
619 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 619 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
620 | return true; | 620 | return true; |
621 | } | 621 | } |
622 | 622 | ||
623 | bool OpieFtp::remoteChDir(const QString &dir) | 623 | bool OpieFtp::remoteChDir(const QString &dir) |
624 | { | 624 | { |
625 | // QCopEnvelope ( "QPE/System", "busy()" ); | 625 | // QCopEnvelope ( "QPE/System", "busy()" ); |
626 | if (!FtpChdir( dir.latin1(), conn )) { | 626 | if (!FtpChdir( dir.latin1(), conn )) { |
627 | QString msg; | 627 | QString msg; |
628 | msg.sprintf(tr("Unable to change directories\n")+dir+"\n%s",FtpLastResponse(conn)); | 628 | msg.sprintf(tr("Unable to change directories\n")+dir+"\n%s",FtpLastResponse(conn)); |
629 | msg.replace(QRegExp(":"),"\n"); | 629 | msg.replace(QRegExp(":"),"\n"); |
630 | QMessageBox::message(tr("Note"),msg); | 630 | QMessageBox::message(tr("Note"),msg); |
631 | // qDebug(msg); | 631 | // qDebug(msg); |
632 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 632 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
633 | return FALSE; | 633 | return FALSE; |
634 | } | 634 | } |
635 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 635 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
636 | return TRUE; | 636 | return TRUE; |
637 | } | 637 | } |
638 | 638 | ||
639 | void OpieFtp::populateLocalView() | 639 | void OpieFtp::populateLocalView() |
640 | { | 640 | { |
641 | Local_View->clear(); | 641 | Local_View->clear(); |
642 | currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); | 642 | currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); |
643 | currentDir.setMatchAllDirs(TRUE); | 643 | currentDir.setMatchAllDirs(TRUE); |
644 | currentDir.setNameFilter(filterStr); | 644 | currentDir.setNameFilter(filterStr); |
645 | QString fileL, fileS, fileDate; | 645 | QString fileL, fileS, fileDate; |
646 | bool isDir=FALSE; | 646 | bool isDir=FALSE; |
647 | const QFileInfoList *list = currentDir.entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/); | 647 | const QFileInfoList *list = currentDir.entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/); |
648 | QFileInfoListIterator it(*list); | 648 | QFileInfoListIterator it(*list); |
649 | QFileInfo *fi; | 649 | QFileInfo *fi; |
650 | while ( (fi=it.current()) ) { | 650 | while ( (fi=it.current()) ) { |
651 | if (fi->isSymLink() ){ | 651 | if (fi->isSymLink() ){ |
652 | QString symLink=fi->readLink(); | 652 | QString symLink=fi->readLink(); |
653 | // qDebug("Symlink detected "+symLink); | 653 | // qDebug("Symlink detected "+symLink); |
654 | QFileInfo sym( symLink); | 654 | QFileInfo sym( symLink); |
655 | fileS.sprintf( "%10i", sym.size() ); | 655 | fileS.sprintf( "%10i", sym.size() ); |
656 | fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() ); | 656 | fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() ); |
657 | fileDate = sym.lastModified().toString(); | 657 | fileDate = sym.lastModified().toString(); |
658 | } else { | 658 | } else { |
659 | // qDebug("Not a dir: "+currentDir.canonicalPath()+fileL); | 659 | // qDebug("Not a dir: "+currentDir.canonicalPath()+fileL); |
660 | fileS.sprintf( "%10i", fi->size() ); | 660 | fileS.sprintf( "%10i", fi->size() ); |
661 | fileL.sprintf( "%s",fi->fileName().data() ); | 661 | fileL.sprintf( "%s",fi->fileName().data() ); |
662 | fileDate= fi->lastModified().toString(); | 662 | fileDate= fi->lastModified().toString(); |
663 | if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) { | 663 | if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) { |
664 | fileL+="/"; | 664 | fileL+="/"; |
665 | isDir=TRUE; | 665 | isDir=TRUE; |
666 | // qDebug( fileL); | 666 | // qDebug( fileL); |
667 | } | 667 | } |
668 | } | 668 | } |
669 | if(fileL !="./" && fi->exists()) { | 669 | if(fileL !="./" && fi->exists()) { |
670 | item = new QListViewItem( Local_View,fileL, fileDate, fileS ); | 670 | item = new QListViewItem( Local_View,fileL, fileDate, fileS ); |
671 | QPixmap pm; | 671 | QPixmap pm; |
672 | 672 | ||
673 | if(isDir || fileL.find("/",0,TRUE) != -1) { | 673 | if(isDir || fileL.find("/",0,TRUE) != -1) { |
674 | if( !QDir( fi->filePath() ).isReadable()) | 674 | if( !QDir( fi->filePath() ).isReadable()) |
675 | pm = Resource::loadPixmap( "lockedfolder" ); | 675 | pm = Resource::loadPixmap( "lockedfolder" ); |
676 | else | 676 | else |
677 | pm= Resource::loadPixmap( "folder" ); | 677 | pm= Resource::loadPixmap( "folder" ); |
678 | item->setPixmap( 0,pm ); | 678 | item->setPixmap( 0,pm ); |
679 | } else { | 679 | } else { |
680 | if( !fi->isReadable() ) | 680 | if( !fi->isReadable() ) |
681 | pm = Resource::loadPixmap( "locked" ); | 681 | pm = Resource::loadPixmap( "locked" ); |
682 | else { | 682 | else { |
683 | MimeType mt(fi->filePath()); | 683 | MimeType mt(fi->filePath()); |
684 | pm=mt.pixmap(); //sets the correct pixmap for mimetype | 684 | pm=mt.pixmap(); //sets the correct pixmap for mimetype |
685 | if(pm.isNull()) | 685 | if(pm.isNull()) |
686 | pm = unknownXpm; | 686 | pm = unknownXpm; |
687 | } | 687 | } |
688 | } | 688 | } |
689 | if( fileL.find("->",0,TRUE) != -1) { | 689 | if( fileL.find("->",0,TRUE) != -1) { |
690 | // overlay link image | 690 | // overlay link image |
691 | pm= Resource::loadPixmap( "folder" ); | 691 | pm= Resource::loadPixmap( "folder" ); |
692 | QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); | 692 | QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); |
693 | QPainter painter( &pm ); | 693 | QPainter painter( &pm ); |
694 | painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); | 694 | painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); |
695 | pm.setMask( pm.createHeuristicMask( FALSE ) ); | 695 | pm.setMask( pm.createHeuristicMask( FALSE ) ); |
696 | } | 696 | } |
697 | item->setPixmap( 0,pm); | 697 | item->setPixmap( 0,pm); |
698 | } | 698 | } |
699 | isDir=FALSE; | 699 | isDir=FALSE; |
700 | ++it; | 700 | ++it; |
701 | } | 701 | } |
702 | Local_View->setSorting( 3,FALSE); | 702 | Local_View->setSorting( 3,FALSE); |
703 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath() ); | 703 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath() ); |
704 | fillCombo( (const QString &)currentDir); | 704 | fillCombo( (const QString &)currentDir); |
705 | } | 705 | } |
706 | 706 | ||
707 | bool OpieFtp::populateRemoteView( ) | 707 | bool OpieFtp::populateRemoteView( ) |
708 | { | 708 | { |
709 | // qDebug("populate remoteview"); | 709 | // qDebug("populate remoteview"); |
710 | QString sfile=QDir::homeDirPath(); | 710 | QString sfile=QDir::homeDirPath(); |
711 | if(sfile.right(1) != "/") | 711 | if(sfile.right(1) != "/") |
712 | sfile+="/._temp"; | 712 | sfile+="/._temp"; |
713 | else | 713 | else |
714 | sfile+="._temp"; | 714 | sfile+="._temp"; |
715 | QFile file( sfile); | 715 | QFile file( sfile); |
716 | Remote_View->clear(); | 716 | Remote_View->clear(); |
717 | QString s, File_Name; | 717 | QString s, File_Name; |
718 | QListViewItem *itemDir=NULL, *itemFile=NULL; | 718 | QListViewItem *itemDir=NULL, *itemFile=NULL; |
719 | QRegExp monthRe(" [JFMASOND][eapuecoe][brynlgptvc] [ 0-9][0-9] [ 0-9][0-9][:0-9][0-9][0-9] "); | 719 | QRegExp monthRe(" [JFMASOND][eapuecoe][brynlgptvc] [ 0-9][0-9] [ 0-9][0-9][:0-9][0-9][0-9] "); |
720 | QString fileL, fileS, fileDate; | 720 | QString fileL, fileS, fileDate; |
721 | if ( file.open(IO_ReadOnly)) { | 721 | if ( file.open(IO_ReadOnly)) { |
722 | QTextStream t( &file ); // use a text stream | 722 | QTextStream t( &file ); // use a text stream |
723 | while ( !t.eof()) { | 723 | while ( !t.eof()) { |
724 | s = t.readLine(); | 724 | s = t.readLine(); |
725 | 725 | ||
726 | if(s.find("total",0,TRUE) == 0) | 726 | if(s.find("total",0,TRUE) == 0) |
727 | continue; | 727 | continue; |
728 | 728 | ||
729 | int len, month = monthRe.match(s, 0, &len); | 729 | int len, month = monthRe.match(s, 0, &len); |
730 | fileDate = s.mid(month + 1, len - 2); // minus spaces | 730 | fileDate = s.mid(month + 1, len - 2); // minus spaces |
731 | fileL = s.right(s.length() - month - len); | 731 | fileL = s.right(s.length() - month - len); |
732 | if(s.left(1) == "d") | 732 | if(s.left(1) == "d") |
733 | fileL = fileL+"/"; | 733 | fileL = fileL+"/"; |
734 | fileS = s.mid(month - 8, 8); // FIXME | 734 | fileS = s.mid(month - 8, 8); // FIXME |
735 | fileS = fileS.stripWhiteSpace(); | 735 | fileS = fileS.stripWhiteSpace(); |
736 | 736 | ||
737 | if(s.left(1) == "d" || fileL.find("/",0,TRUE) != -1) { | 737 | if(s.left(1) == "d" || fileL.find("/",0,TRUE) != -1) { |
738 | QListViewItem * item = new QListViewItem( Remote_View, fileL, fileDate, fileS,"d"); | 738 | QListViewItem * item = new QListViewItem( Remote_View, fileL, fileDate, fileS,"d"); |
739 | item->setPixmap( 0, Resource::loadPixmap( "folder" )); | 739 | item->setPixmap( 0, Resource::loadPixmap( "folder" )); |
740 | // if(itemDir) | 740 | // if(itemDir) |
741 | item->moveItem(itemDir); | 741 | item->moveItem(itemDir); |
742 | itemDir=item; | 742 | itemDir=item; |
743 | } else { | 743 | } else { |
744 | QListViewItem * item = new QListViewItem( Remote_View, fileL, fileDate, fileS,"f"); | 744 | QListViewItem * item = new QListViewItem( Remote_View, fileL, fileDate, fileS,"f"); |
745 | item->setPixmap( 0, Resource::loadPixmap( "fileopen" )); | 745 | item->setPixmap( 0, Resource::loadPixmap( "fileopen" )); |
746 | // if(itemFile) | 746 | // if(itemFile) |
747 | item->moveItem(itemDir); | 747 | item->moveItem(itemDir); |
748 | item->moveItem(itemFile); | 748 | item->moveItem(itemFile); |
749 | itemFile=item; | 749 | itemFile=item; |
750 | } | 750 | } |
751 | } | 751 | } |
752 | QListViewItem * item1 = new QListViewItem( Remote_View, "../"); | 752 | QListViewItem * item1 = new QListViewItem( Remote_View, "../"); |
753 | item1->setPixmap( 0, Resource::loadPixmap( "folder" )); | 753 | item1->setPixmap( 0, Resource::loadPixmap( "folder" )); |
754 | file.close(); | 754 | file.close(); |
755 | if( file.exists()) | 755 | if( file.exists()) |
756 | file. remove(); | 756 | file. remove(); |
757 | } else | 757 | } else |
758 | qDebug("temp file not opened successfullly "+sfile); | 758 | qDebug("temp file not opened successfully "+sfile); |
759 | Remote_View->setSorting( 4,TRUE); | 759 | Remote_View->setSorting( 4,TRUE); |
760 | return true; | 760 | return true; |
761 | } | 761 | } |
762 | 762 | ||
763 | void OpieFtp::remoteListClicked(QListViewItem *selectedItem) | 763 | void OpieFtp::remoteListClicked(QListViewItem *selectedItem) |
764 | { | 764 | { |
765 | if( selectedItem) { | 765 | if( selectedItem) { |
766 | // if(selectedItem!= NULL) { | 766 | // if(selectedItem!= NULL) { |
767 | // QCopEnvelope ( "QPE/System", "busy()" ); | 767 | // QCopEnvelope ( "QPE/System", "busy()" ); |
768 | QString oldRemoteCurrentDir = currentRemoteDir; | 768 | QString oldRemoteCurrentDir = currentRemoteDir; |
769 | QString strItem=selectedItem->text(0); | 769 | QString strItem=selectedItem->text(0); |
770 | strItem=strItem.simplifyWhiteSpace(); | 770 | strItem=strItem.simplifyWhiteSpace(); |
771 | if(strItem == "../") { // the user wants to go ^ | 771 | if(strItem == "../") { // the user wants to go ^ |
772 | if( FtpCDUp( conn) == 0) { | 772 | if( FtpCDUp( conn) == 0) { |
773 | QString msg; | 773 | QString msg; |
774 | msg.sprintf(tr("Unable to cd up\n")+"%s",FtpLastResponse(conn)); | 774 | msg.sprintf(tr("Unable to cd up\n")+"%s",FtpLastResponse(conn)); |
775 | msg.replace(QRegExp(":"),"\n"); | 775 | msg.replace(QRegExp(":"),"\n"); |
776 | QMessageBox::message(tr("Note"),msg); | 776 | QMessageBox::message(tr("Note"),msg); |
777 | // qDebug(msg); | 777 | // qDebug(msg); |
778 | } | 778 | } |
779 | char path[256]; | 779 | char path[256]; |
780 | if( FtpPwd( path,sizeof(path),conn) == 0) { //this is easier than fudging the string | 780 | if( FtpPwd( path,sizeof(path),conn) == 0) { //this is easier than fudging the string |
781 | QString msg; | 781 | QString msg; |
782 | msg.sprintf(tr("Unable to get working dir\n")+"%s",FtpLastResponse(conn)); | 782 | msg.sprintf(tr("Unable to get working dir\n")+"%s",FtpLastResponse(conn)); |
783 | msg.replace(QRegExp(":"),"\n"); | 783 | msg.replace(QRegExp(":"),"\n"); |
784 | QMessageBox::message(tr("Note"),msg); | 784 | QMessageBox::message(tr("Note"),msg); |
785 | // qDebug(msg); | 785 | // qDebug(msg); |
786 | } | 786 | } |
787 | currentRemoteDir=path; | 787 | currentRemoteDir=path; |
788 | } else { | 788 | } else { |
789 | if(strItem.find("->",0,TRUE) != -1) { //symlink on some servers | 789 | if(strItem.find("->",0,TRUE) != -1) { //symlink on some servers |
790 | strItem=strItem.right( strItem.length() - strItem.find("->",0,TRUE) - 2 ); | 790 | strItem=strItem.right( strItem.length() - strItem.find("->",0,TRUE) - 2 ); |
791 | strItem = strItem.stripWhiteSpace(); | 791 | strItem = strItem.stripWhiteSpace(); |
792 | currentRemoteDir = strItem; | 792 | currentRemoteDir = strItem; |
793 | if( !remoteChDir( (const QString &)strItem)) { | 793 | if( !remoteChDir( (const QString &)strItem)) { |
794 | currentRemoteDir = oldRemoteCurrentDir; | 794 | currentRemoteDir = oldRemoteCurrentDir; |
795 | strItem=""; | 795 | strItem=""; |
796 | // qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); | 796 | // qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); |
797 | } | 797 | } |
798 | } else if(strItem.find("/",0,TRUE) != -1) { // this is a directory | 798 | } else if(strItem.find("/",0,TRUE) != -1) { // this is a directory |
799 | if( !remoteChDir( (const QString &)currentRemoteDir + strItem)) { | 799 | if( !remoteChDir( (const QString &)currentRemoteDir + strItem)) { |
800 | currentRemoteDir = oldRemoteCurrentDir; | 800 | currentRemoteDir = oldRemoteCurrentDir; |
801 | strItem=""; | 801 | strItem=""; |
802 | // qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); | 802 | // qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); |
803 | 803 | ||
804 | } else { | 804 | } else { |
805 | currentRemoteDir = currentRemoteDir+strItem; | 805 | currentRemoteDir = currentRemoteDir+strItem; |
806 | } | 806 | } |
807 | } else { | 807 | } else { |
808 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 808 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
809 | return; | 809 | return; |
810 | } | 810 | } |
811 | } | 811 | } |
812 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate | 812 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate |
813 | if(currentRemoteDir.right(1) !="/") | 813 | if(currentRemoteDir.right(1) !="/") |
814 | currentRemoteDir +="/"; | 814 | currentRemoteDir +="/"; |
815 | currentPathCombo->lineEdit()->setText( currentRemoteDir); | 815 | currentPathCombo->lineEdit()->setText( currentRemoteDir); |
816 | fillRemoteCombo( (const QString &)currentRemoteDir); | 816 | fillRemoteCombo( (const QString &)currentRemoteDir); |
817 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 817 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
818 | Remote_View->ensureItemVisible(Remote_View->firstChild()); | 818 | Remote_View->ensureItemVisible(Remote_View->firstChild()); |
819 | 819 | ||
820 | } | 820 | } |
821 | } | 821 | } |
822 | 822 | ||
823 | void OpieFtp::localListClicked(QListViewItem *selectedItem) | 823 | void OpieFtp::localListClicked(QListViewItem *selectedItem) |
824 | { | 824 | { |
825 | if(selectedItem!= NULL) { | 825 | if(selectedItem!= NULL) { |
826 | 826 | ||
827 | QString strItem=selectedItem->text(0); | 827 | QString strItem=selectedItem->text(0); |
828 | QString strSize=selectedItem->text(1); | 828 | QString strSize=selectedItem->text(1); |
829 | strSize=strSize.stripWhiteSpace(); | 829 | strSize=strSize.stripWhiteSpace(); |
830 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink | 830 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink |
831 | // is symlink | 831 | // is symlink |
832 | QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); | 832 | QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); |
833 | if(QDir(strItem2).exists() ) { | 833 | if(QDir(strItem2).exists() ) { |
834 | currentDir.cd(strItem2, TRUE); | 834 | currentDir.cd(strItem2, TRUE); |
835 | populateLocalView(); | 835 | populateLocalView(); |
836 | } | 836 | } |
837 | } else { // not a symlink | 837 | } else { // not a symlink |
838 | if(strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) { | 838 | if(strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) { |
839 | 839 | ||
840 | if(QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem)).exists() ) { | 840 | if(QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem)).exists() ) { |
841 | strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem); | 841 | strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem); |
842 | currentDir.cd(strItem,FALSE); | 842 | currentDir.cd(strItem,FALSE); |
843 | populateLocalView(); | 843 | populateLocalView(); |
844 | } else { | 844 | } else { |
845 | currentDir.cdUp(); | 845 | currentDir.cdUp(); |
846 | populateLocalView(); | 846 | populateLocalView(); |
847 | } | 847 | } |
848 | if(QDir(strItem).exists()){ | 848 | if(QDir(strItem).exists()){ |
849 | currentDir.cd(strItem, TRUE); | 849 | currentDir.cd(strItem, TRUE); |
850 | populateLocalView(); | 850 | populateLocalView(); |
851 | } | 851 | } |
852 | } else { | 852 | } else { |
853 | strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem); | 853 | strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem); |
854 | if( QFile::exists(strItem ) ) { | 854 | if( QFile::exists(strItem ) ) { |
855 | // qDebug("upload "+strItem); | 855 | // qDebug("upload "+strItem); |
856 | return; | 856 | return; |
857 | } | 857 | } |
858 | } //end not symlink | 858 | } //end not symlink |
859 | chdir(strItem.latin1()); | 859 | chdir(strItem.latin1()); |
860 | } | 860 | } |
861 | Local_View->ensureItemVisible(Local_View->firstChild()); | 861 | Local_View->ensureItemVisible(Local_View->firstChild()); |
862 | } | 862 | } |
863 | } | 863 | } |
864 | 864 | ||
865 | void OpieFtp::doLocalCd() | 865 | void OpieFtp::doLocalCd() |
866 | { | 866 | { |
867 | localListClicked( Local_View->currentItem()); | 867 | localListClicked( Local_View->currentItem()); |
868 | } | 868 | } |
869 | 869 | ||
870 | void OpieFtp:: doRemoteCd() | 870 | void OpieFtp:: doRemoteCd() |
871 | { | 871 | { |
872 | remoteListClicked( Remote_View->currentItem()); | 872 | remoteListClicked( Remote_View->currentItem()); |
873 | 873 | ||
874 | } | 874 | } |
875 | 875 | ||
876 | void OpieFtp::showHidden() | 876 | void OpieFtp::showHidden() |
877 | { | 877 | { |
878 | if (!b) { | 878 | if (!b) { |
879 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 879 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
880 | localMenu->setItemChecked(localMenu->idAt(0),TRUE); | 880 | localMenu->setItemChecked(localMenu->idAt(0),TRUE); |
881 | // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); | 881 | // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); |
882 | b=TRUE; | 882 | b=TRUE; |
883 | 883 | ||
884 | } else { | 884 | } else { |
885 | currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); | 885 | currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); |
886 | localMenu->setItemChecked(localMenu->idAt(0),FALSE); | 886 | localMenu->setItemChecked(localMenu->idAt(0),FALSE); |
887 | // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); | 887 | // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); |
888 | b=FALSE; | 888 | b=FALSE; |
889 | } | 889 | } |
890 | populateLocalView(); | 890 | populateLocalView(); |
891 | } | 891 | } |
892 | 892 | ||
893 | void OpieFtp::ListPressed( int mouse, QListViewItem *item, const QPoint &, int) | 893 | void OpieFtp::ListPressed( int mouse, QListViewItem *item, const QPoint &, int) |
894 | { | 894 | { |
895 | // if(item) | 895 | // if(item) |
896 | if (mouse == 2) { | 896 | if (mouse == 2) { |
897 | showLocalMenu(item); | 897 | showLocalMenu(item); |
898 | } | 898 | } |
899 | } | 899 | } |
900 | 900 | ||
901 | void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &, int ) | 901 | void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &, int ) |
902 | { | 902 | { |
903 | if(mouse == 2) { | 903 | if(mouse == 2) { |
904 | showRemoteMenu(item); | 904 | showRemoteMenu(item); |
905 | } | 905 | } |
906 | } | 906 | } |
907 | 907 | ||
908 | void OpieFtp::showRemoteMenu(QListViewItem * item) | 908 | void OpieFtp::showRemoteMenu(QListViewItem * item) |
909 | { | 909 | { |
910 | QPopupMenu * m;// = new QPopupMenu( Local_View ); | 910 | QPopupMenu * m;// = new QPopupMenu( Local_View ); |
911 | m = new QPopupMenu(this); | 911 | m = new QPopupMenu(this); |
912 | if(item != NULL ) { | 912 | if(item != NULL ) { |
913 | if( item->text(0).find("/",0,TRUE) != -1) | 913 | if( item->text(0).find("/",0,TRUE) != -1) |
914 | m->insertItem( tr( "Change Directory" ), this, SLOT( doRemoteCd() )); | 914 | m->insertItem( tr( "Change Directory" ), this, SLOT( doRemoteCd() )); |
915 | else | 915 | else |
916 | m->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); | 916 | m->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); |
917 | } | 917 | } |
918 | m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); | 918 | m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); |
919 | m->insertItem( tr("Rescan"), this, SLOT( populateLocalView() )); | 919 | m->insertItem( tr("Rescan"), this, SLOT( populateLocalView() )); |
920 | m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); | 920 | m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); |
921 | m->insertSeparator(); | 921 | m->insertSeparator(); |
922 | m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); | 922 | m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); |
923 | m->exec( QCursor::pos() ); | 923 | m->exec( QCursor::pos() ); |
924 | delete m; | 924 | delete m; |
925 | } | 925 | } |
926 | 926 | ||
927 | void OpieFtp::showLocalMenu(QListViewItem * item) | 927 | void OpieFtp::showLocalMenu(QListViewItem * item) |
928 | { | 928 | { |
929 | 929 | ||
930 | QPopupMenu *m; | 930 | QPopupMenu *m; |
931 | m = new QPopupMenu( this); | 931 | m = new QPopupMenu( this); |
932 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); | 932 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); |
933 | m->insertSeparator(); | 933 | m->insertSeparator(); |
934 | if(item != NULL ) { | 934 | if(item != NULL ) { |
935 | if( item->text(0).find("/",0,TRUE) !=-1) | 935 | if( item->text(0).find("/",0,TRUE) !=-1) |
936 | m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); | 936 | m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); |
937 | else | 937 | else |
938 | m->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); | 938 | m->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); |
939 | } | 939 | } |
940 | m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); | 940 | m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); |
941 | m->insertItem( tr("Rescan"), this, SLOT( populateRemoteView() )); | 941 | m->insertItem( tr("Rescan"), this, SLOT( populateRemoteView() )); |
942 | m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); | 942 | m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); |
943 | m->insertSeparator(); | 943 | m->insertSeparator(); |
944 | m->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); | 944 | m->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); |
945 | m->setCheckable(TRUE); | 945 | m->setCheckable(TRUE); |
946 | if (b) | 946 | if (b) |
947 | m->setItemChecked(m->idAt(0),TRUE); | 947 | m->setItemChecked(m->idAt(0),TRUE); |
948 | else | 948 | else |
949 | m->setItemChecked(m->idAt(0),FALSE); | 949 | m->setItemChecked(m->idAt(0),FALSE); |
950 | 950 | ||
951 | m->exec( QCursor::pos() ); | 951 | m->exec( QCursor::pos() ); |
952 | delete m; | 952 | delete m; |
953 | } | 953 | } |
954 | 954 | ||
955 | void OpieFtp::localMakDir() | 955 | void OpieFtp::localMakDir() |
956 | { | 956 | { |
957 | InputDialog *fileDlg; | 957 | InputDialog *fileDlg; |
958 | fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0); | 958 | fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0); |
959 | fileDlg->exec(); | 959 | fileDlg->exec(); |
960 | if( fileDlg->result() == 1 ) { | 960 | if( fileDlg->result() == 1 ) { |
961 | QString filename = fileDlg->LineEdit1->text(); | 961 | QString filename = fileDlg->LineEdit1->text(); |
962 | currentDir.mkdir( currentDir.canonicalPath()+"/"+filename); | 962 | currentDir.mkdir( currentDir.canonicalPath()+"/"+filename); |
963 | } | 963 | } |
964 | populateLocalView(); | 964 | populateLocalView(); |
965 | } | 965 | } |
966 | 966 | ||
967 | void OpieFtp::localDelete() | 967 | void OpieFtp::localDelete() |
968 | { | 968 | { |
969 | QList<QListViewItem> * getSelectedItems( QListView * Local_View ); | 969 | QList<QListViewItem> * getSelectedItems( QListView * Local_View ); |
970 | QListViewItemIterator it( Local_View ); | 970 | QListViewItemIterator it( Local_View ); |
971 | for ( ; it.current(); ++it ) { | 971 | for ( ; it.current(); ++it ) { |
972 | if ( it.current()->isSelected() ) { | 972 | if ( it.current()->isSelected() ) { |
973 | QString f = it.current()->text(0); | 973 | QString f = it.current()->text(0); |
974 | it.current()->setSelected(FALSE); | 974 | it.current()->setSelected(FALSE); |
975 | 975 | ||
976 | // QString f = Local_View->currentItem()->text(0); | 976 | // QString f = Local_View->currentItem()->text(0); |
977 | if(QDir(f).exists() ) { | 977 | if(QDir(f).exists() ) { |
978 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+ | 978 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+ |
979 | tr(" ?\nIt must be empty"),tr("Yes"),tr("No"),0,0,1) ) { | 979 | tr(" ?\nIt must be empty"),tr("Yes"),tr("No"),0,0,1) ) { |
980 | case 0: { | 980 | case 0: { |
981 | f=currentDir.canonicalPath()+"/"+f; | 981 | f=currentDir.canonicalPath()+"/"+f; |
982 | QString cmd="rmdir "+f; | 982 | QString cmd="rmdir "+f; |
983 | system( cmd.latin1()); | 983 | system( cmd.latin1()); |
984 | } | 984 | } |
985 | break; | 985 | break; |
986 | case 1: | 986 | case 1: |
987 | // exit | 987 | // exit |
988 | break; | 988 | break; |
989 | }; | 989 | }; |
990 | 990 | ||
991 | } else { | 991 | } else { |
992 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f | 992 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f |
993 | +" ?",tr("Yes"),tr("No"),0,0,1) ) { | 993 | +" ?",tr("Yes"),tr("No"),0,0,1) ) { |
994 | case 0: { | 994 | case 0: { |
995 | f=currentDir.canonicalPath()+"/"+f; | 995 | f=currentDir.canonicalPath()+"/"+f; |
996 | QString cmd="rm "+f; | 996 | QString cmd="rm "+f; |
997 | system( cmd.latin1()); | 997 | system( cmd.latin1()); |
998 | } | 998 | } |
999 | break; | 999 | break; |
1000 | case 1: | 1000 | case 1: |
1001 | // exit | 1001 | // exit |
1002 | break; | 1002 | break; |
1003 | }; | 1003 | }; |
1004 | } | 1004 | } |
1005 | } | 1005 | } |
1006 | } | 1006 | } |
1007 | populateLocalView(); | 1007 | populateLocalView(); |
1008 | 1008 | ||
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | void OpieFtp::remoteMakDir() | 1011 | void OpieFtp::remoteMakDir() |
1012 | { | 1012 | { |
1013 | InputDialog *fileDlg; | 1013 | InputDialog *fileDlg; |
1014 | fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0); | 1014 | fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0); |
1015 | fileDlg->exec(); | 1015 | fileDlg->exec(); |
1016 | if( fileDlg->result() == 1 ) { | 1016 | if( fileDlg->result() == 1 ) { |
1017 | QString filename = fileDlg->LineEdit1->text();//+".playlist"; | 1017 | QString filename = fileDlg->LineEdit1->text();//+".playlist"; |
1018 | QString tmp=currentRemoteDir+filename; | 1018 | QString tmp=currentRemoteDir+filename; |
1019 | // QCopEnvelope ( "QPE/System", "busy()" ); | 1019 | // QCopEnvelope ( "QPE/System", "busy()" ); |
1020 | if(FtpMkdir( tmp.latin1(), conn) == 0) { | 1020 | if(FtpMkdir( tmp.latin1(), conn) == 0) { |
1021 | QString msg; | 1021 | QString msg; |
1022 | msg.sprintf(tr("Unable to make directory\n")+"%s",FtpLastResponse(conn)); | 1022 | msg.sprintf(tr("Unable to make directory\n")+"%s",FtpLastResponse(conn)); |
1023 | msg.replace(QRegExp(":"),"\n"); | 1023 | msg.replace(QRegExp(":"),"\n"); |
1024 | QMessageBox::message(tr("Note"),msg); | 1024 | QMessageBox::message(tr("Note"),msg); |
1025 | } | 1025 | } |
1026 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 1026 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
1027 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate | 1027 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate |
1028 | } | 1028 | } |
1029 | } | 1029 | } |
1030 | 1030 | ||
1031 | void OpieFtp::remoteDelete() | 1031 | void OpieFtp::remoteDelete() |
1032 | { | 1032 | { |
1033 | QList<QListViewItem> * getSelectedItems( QListView * Remote_View ); | 1033 | QList<QListViewItem> * getSelectedItems( QListView * Remote_View ); |
1034 | QListViewItemIterator it( Remote_View ); | 1034 | QListViewItemIterator it( Remote_View ); |
1035 | for ( ; it.current(); ++it ) { | 1035 | for ( ; it.current(); ++it ) { |
1036 | if ( it.current()->isSelected() ) { | 1036 | if ( it.current()->isSelected() ) { |
1037 | QString f = it.current()->text(0); | 1037 | QString f = it.current()->text(0); |
1038 | // QString f = Remote_View->currentItem()->text(0); | 1038 | // QString f = Remote_View->currentItem()->text(0); |
1039 | // QCopEnvelope ( "QPE/System", "busy()" ); | 1039 | // QCopEnvelope ( "QPE/System", "busy()" ); |
1040 | if( f.right(1) =="/") { | 1040 | if( f.right(1) =="/") { |
1041 | QString path= currentRemoteDir+f; | 1041 | QString path= currentRemoteDir+f; |
1042 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+"?" | 1042 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+"?" |
1043 | ,tr("Yes"),tr("No"),0,0,1) ) { | 1043 | ,tr("Yes"),tr("No"),0,0,1) ) { |
1044 | case 0: { | 1044 | case 0: { |
1045 | f=currentDir.canonicalPath()+"/"+f; | 1045 | f=currentDir.canonicalPath()+"/"+f; |
1046 | if(FtpRmdir( path.latin1(), conn) ==0) { | 1046 | if(FtpRmdir( path.latin1(), conn) ==0) { |
1047 | QString msg; | 1047 | QString msg; |
1048 | msg.sprintf(tr("Unable to remove directory\n")+"%s",FtpLastResponse(conn)); | 1048 | msg.sprintf(tr("Unable to remove directory\n")+"%s",FtpLastResponse(conn)); |
1049 | msg.replace(QRegExp(":"),"\n"); | 1049 | msg.replace(QRegExp(":"),"\n"); |
1050 | QMessageBox::message(tr("Note"),msg); | 1050 | QMessageBox::message(tr("Note"),msg); |
1051 | } | 1051 | } |
1052 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate | 1052 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate |
1053 | } | 1053 | } |
1054 | break; | 1054 | break; |
1055 | }; | 1055 | }; |
1056 | } else { | 1056 | } else { |
1057 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+"?" | 1057 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+"?" |
1058 | ,tr("Yes"),tr("No"),0,0,1) ) { | 1058 | ,tr("Yes"),tr("No"),0,0,1) ) { |
1059 | case 0: { | 1059 | case 0: { |
1060 | QString path= currentRemoteDir+f; | 1060 | QString path= currentRemoteDir+f; |
1061 | if(FtpDelete( path.latin1(), conn)==0) { | 1061 | if(FtpDelete( path.latin1(), conn)==0) { |
1062 | QString msg; | 1062 | QString msg; |
1063 | msg.sprintf(tr("Unable to delete file\n")+"%s",FtpLastResponse(conn)); | 1063 | msg.sprintf(tr("Unable to delete file\n")+"%s",FtpLastResponse(conn)); |
1064 | msg.replace(QRegExp(":"),"\n"); | 1064 | msg.replace(QRegExp(":"),"\n"); |
1065 | QMessageBox::message(tr("Note"),msg); | 1065 | QMessageBox::message(tr("Note"),msg); |
1066 | } | 1066 | } |
1067 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate | 1067 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate |
1068 | } | 1068 | } |
1069 | break; | 1069 | break; |
1070 | }; | 1070 | }; |
1071 | } | 1071 | } |
1072 | } | 1072 | } |
1073 | } | 1073 | } |
1074 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 1074 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
1075 | } | 1075 | } |
1076 | 1076 | ||
1077 | void OpieFtp::remoteRename() | 1077 | void OpieFtp::remoteRename() |
1078 | { | 1078 | { |
1079 | QString curFile = Remote_View->currentItem()->text(0); | 1079 | QString curFile = Remote_View->currentItem()->text(0); |
1080 | InputDialog *fileDlg; | 1080 | InputDialog *fileDlg; |
1081 | fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); | 1081 | fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); |
1082 | fileDlg->setTextEdit((const QString &)curFile); | 1082 | fileDlg->setTextEdit((const QString &)curFile); |
1083 | fileDlg->exec(); | 1083 | fileDlg->exec(); |
1084 | if( fileDlg->result() == 1 ) { | 1084 | if( fileDlg->result() == 1 ) { |
1085 | QString oldName = currentRemoteDir +"/"+ curFile; | 1085 | QString oldName = currentRemoteDir +"/"+ curFile; |
1086 | QString newName = currentRemoteDir +"/"+ fileDlg->LineEdit1->text();//+".playlist"; | 1086 | QString newName = currentRemoteDir +"/"+ fileDlg->LineEdit1->text();//+".playlist"; |
1087 | // QCopEnvelope ( "QPE/System", "busy()" ); | 1087 | // QCopEnvelope ( "QPE/System", "busy()" ); |
1088 | if(FtpRename( oldName.latin1(), newName.latin1(),conn) == 0) { | 1088 | if(FtpRename( oldName.latin1(), newName.latin1(),conn) == 0) { |
1089 | QString msg; | 1089 | QString msg; |
1090 | msg.sprintf(tr("Unable to rename file\n")+"%s",FtpLastResponse(conn)); | 1090 | msg.sprintf(tr("Unable to rename file\n")+"%s",FtpLastResponse(conn)); |
1091 | msg.replace(QRegExp(":"),"\n"); | 1091 | msg.replace(QRegExp(":"),"\n"); |
1092 | QMessageBox::message(tr("Note"),msg); | 1092 | QMessageBox::message(tr("Note"),msg); |
1093 | } | 1093 | } |
1094 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 1094 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
1095 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate | 1095 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate |
1096 | } | 1096 | } |
1097 | } | 1097 | } |
1098 | 1098 | ||
1099 | void OpieFtp::localRename() | 1099 | void OpieFtp::localRename() |
1100 | { | 1100 | { |
1101 | QString curFile = Local_View->currentItem()->text(0); | 1101 | QString curFile = Local_View->currentItem()->text(0); |
1102 | InputDialog *fileDlg; | 1102 | InputDialog *fileDlg; |
1103 | fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); | 1103 | fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); |
1104 | fileDlg->setTextEdit((const QString &)curFile); | 1104 | fileDlg->setTextEdit((const QString &)curFile); |
1105 | fileDlg->exec(); | 1105 | fileDlg->exec(); |
1106 | if( fileDlg->result() == 1 ) { | 1106 | if( fileDlg->result() == 1 ) { |
1107 | QString oldname = currentDir.canonicalPath() + "/" + curFile; | 1107 | QString oldname = currentDir.canonicalPath() + "/" + curFile; |
1108 | QString newName = currentDir.canonicalPath() + "/" + fileDlg->LineEdit1->text();//+".playlist"; | 1108 | QString newName = currentDir.canonicalPath() + "/" + fileDlg->LineEdit1->text();//+".playlist"; |
1109 | if( rename(oldname.latin1(), newName.latin1())== -1) | 1109 | if( rename(oldname.latin1(), newName.latin1())== -1) |
1110 | QMessageBox::message(tr("Note"),tr("Could not rename")); | 1110 | QMessageBox::message(tr("Note"),tr("Could not rename")); |
1111 | } | 1111 | } |
1112 | populateLocalView(); | 1112 | populateLocalView(); |
1113 | } | 1113 | } |
1114 | 1114 | ||
1115 | void OpieFtp::currentPathComboActivated(const QString & currentPath) { | 1115 | void OpieFtp::currentPathComboActivated(const QString & currentPath) { |
1116 | if (TabWidget->currentPageIndex() == 0) { | 1116 | if (TabWidget->currentPageIndex() == 0) { |
1117 | chdir( currentPath.latin1() ); | 1117 | chdir( currentPath.latin1() ); |
1118 | currentDir.cd( currentPath, TRUE); | 1118 | currentDir.cd( currentPath, TRUE); |
1119 | populateLocalView(); | 1119 | populateLocalView(); |
1120 | update(); | 1120 | update(); |
1121 | } else { | 1121 | } else { |
1122 | // chdir( currentPath.latin1() ); | 1122 | // chdir( currentPath.latin1() ); |
1123 | // currentDir.cd( currentPath, TRUE); | 1123 | // currentDir.cd( currentPath, TRUE); |
1124 | // populateList(); | 1124 | // populateList(); |
1125 | // update(); | 1125 | // update(); |
1126 | 1126 | ||
1127 | } | 1127 | } |
1128 | } | 1128 | } |
1129 | 1129 | ||
1130 | void OpieFtp::fillCombo(const QString ¤tPath) { | 1130 | void OpieFtp::fillCombo(const QString ¤tPath) { |
1131 | 1131 | ||
1132 | currentPathCombo->lineEdit()->setText(currentPath); | 1132 | currentPathCombo->lineEdit()->setText(currentPath); |
1133 | if( localDirPathStringList.grep(currentPath,TRUE).isEmpty() ) { | 1133 | if( localDirPathStringList.grep(currentPath,TRUE).isEmpty() ) { |
1134 | currentPathCombo->clear(); | 1134 | currentPathCombo->clear(); |
1135 | localDirPathStringList.prepend(currentPath ); | 1135 | localDirPathStringList.prepend(currentPath ); |
1136 | currentPathCombo->insertStringList( localDirPathStringList,-1); | 1136 | currentPathCombo->insertStringList( localDirPathStringList,-1); |
1137 | } | 1137 | } |
1138 | currentPathCombo->lineEdit()->setText(currentPath); | 1138 | currentPathCombo->lineEdit()->setText(currentPath); |
1139 | if( remoteDirPathStringList.grep(currentPath,TRUE).isEmpty() ) { | 1139 | if( remoteDirPathStringList.grep(currentPath,TRUE).isEmpty() ) { |
1140 | currentPathCombo->clear(); | 1140 | currentPathCombo->clear(); |
1141 | remoteDirPathStringList.prepend(currentPath ); | 1141 | remoteDirPathStringList.prepend(currentPath ); |
1142 | currentPathCombo->insertStringList( remoteDirPathStringList,-1); | 1142 | currentPathCombo->insertStringList( remoteDirPathStringList,-1); |
1143 | } | 1143 | } |
1144 | } | 1144 | } |
1145 | 1145 | ||
1146 | void OpieFtp::fillRemoteCombo(const QString ¤tPath) { | 1146 | void OpieFtp::fillRemoteCombo(const QString ¤tPath) { |
1147 | 1147 | ||
1148 | currentPathCombo->lineEdit()->setText(currentPath); | 1148 | currentPathCombo->lineEdit()->setText(currentPath); |
1149 | if( remoteDirPathStringList.grep(currentPath,TRUE).isEmpty() ) { | 1149 | if( remoteDirPathStringList.grep(currentPath,TRUE).isEmpty() ) { |
1150 | currentPathCombo->clear(); | 1150 | currentPathCombo->clear(); |
1151 | remoteDirPathStringList.prepend(currentPath ); | 1151 | remoteDirPathStringList.prepend(currentPath ); |
1152 | currentPathCombo->insertStringList( remoteDirPathStringList,-1); | 1152 | currentPathCombo->insertStringList( remoteDirPathStringList,-1); |
1153 | } | 1153 | } |
1154 | } | 1154 | } |
1155 | 1155 | ||
1156 | void OpieFtp::currentPathComboChanged() | 1156 | void OpieFtp::currentPathComboChanged() |
1157 | { | 1157 | { |
1158 | QString oldRemoteCurrentDir = currentRemoteDir; | 1158 | QString oldRemoteCurrentDir = currentRemoteDir; |
1159 | // qDebug("oldRemoteCurrentDir "+oldRemoteCurrentDir); | 1159 | // qDebug("oldRemoteCurrentDir "+oldRemoteCurrentDir); |
1160 | if (TabWidget->currentPageIndex() == 0) { | 1160 | if (TabWidget->currentPageIndex() == 0) { |
1161 | if(QDir( currentPathCombo->lineEdit()->text()).exists()) { | 1161 | if(QDir( currentPathCombo->lineEdit()->text()).exists()) { |
1162 | currentDir.setPath( currentPathCombo->lineEdit()->text() ); | 1162 | currentDir.setPath( currentPathCombo->lineEdit()->text() ); |
1163 | populateLocalView(); | 1163 | populateLocalView(); |
1164 | } else { | 1164 | } else { |
1165 | QMessageBox::message(tr("Note"),tr("That directory does not exist")); | 1165 | QMessageBox::message(tr("Note"),tr("That directory does not exist")); |
1166 | } | 1166 | } |
1167 | } | 1167 | } |
1168 | if (TabWidget->currentPageIndex() == 1) { | 1168 | if (TabWidget->currentPageIndex() == 1) { |
1169 | currentRemoteDir = currentPathCombo->lineEdit()->text(); | 1169 | currentRemoteDir = currentPathCombo->lineEdit()->text(); |
1170 | if(currentRemoteDir.right(1) !="/") { | 1170 | if(currentRemoteDir.right(1) !="/") { |
1171 | currentRemoteDir = currentRemoteDir +"/"; | 1171 | currentRemoteDir = currentRemoteDir +"/"; |
1172 | currentPathCombo->lineEdit()->setText( currentRemoteDir ); | 1172 | currentPathCombo->lineEdit()->setText( currentRemoteDir ); |
1173 | } | 1173 | } |
1174 | if( !remoteChDir( (const QString &)currentRemoteDir) ) { | 1174 | if( !remoteChDir( (const QString &)currentRemoteDir) ) { |
1175 | currentRemoteDir = oldRemoteCurrentDir; | 1175 | currentRemoteDir = oldRemoteCurrentDir; |
1176 | currentPathCombo->lineEdit()->setText( currentRemoteDir ); | 1176 | currentPathCombo->lineEdit()->setText( currentRemoteDir ); |
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | remoteDirList( (const QString &)currentRemoteDir); | 1179 | remoteDirList( (const QString &)currentRemoteDir); |
1180 | } | 1180 | } |
1181 | } | 1181 | } |
1182 | 1182 | ||
1183 | void OpieFtp::switchToLocalTab() | 1183 | void OpieFtp::switchToLocalTab() |
1184 | { | 1184 | { |
1185 | TabWidget->setCurrentPage(0); | 1185 | TabWidget->setCurrentPage(0); |
1186 | } | 1186 | } |
1187 | 1187 | ||
1188 | void OpieFtp::switchToRemoteTab() | 1188 | void OpieFtp::switchToRemoteTab() |
1189 | { | 1189 | { |
1190 | TabWidget->setCurrentPage(1); | 1190 | TabWidget->setCurrentPage(1); |
1191 | } | 1191 | } |
1192 | 1192 | ||
1193 | void OpieFtp::switchToConfigTab() | 1193 | void OpieFtp::switchToConfigTab() |
1194 | { | 1194 | { |
1195 | TabWidget->setCurrentPage(2); | 1195 | TabWidget->setCurrentPage(2); |
1196 | } | 1196 | } |
1197 | 1197 | ||
1198 | void OpieFtp::readConfig() | 1198 | void OpieFtp::readConfig() |
1199 | { | 1199 | { |
1200 | fillCombos(); | 1200 | fillCombos(); |
1201 | Config cfg("opieftp"); | 1201 | Config cfg("opieftp"); |
1202 | cfg.setGroup("Server"); | 1202 | cfg.setGroup("Server"); |
1203 | currentServerConfig = cfg.readNumEntry("currentServer", -1); | 1203 | currentServerConfig = cfg.readNumEntry("currentServer", -1); |
1204 | 1204 | ||
1205 | // qDebug("Reading %d", currentServerConfig); | 1205 | // qDebug("Reading %d", currentServerConfig); |
1206 | serverComboSelected( currentServerConfig-1); | 1206 | serverComboSelected( currentServerConfig-1); |
1207 | 1207 | ||
1208 | } | 1208 | } |
1209 | 1209 | ||
1210 | void OpieFtp::writeConfig() | 1210 | void OpieFtp::writeConfig() |
1211 | { | 1211 | { |
1212 | qDebug("write config"); | 1212 | qDebug("write config"); |
1213 | Config cfg("opieftp"); | 1213 | Config cfg("opieftp"); |
1214 | cfg.setGroup("Server"); | 1214 | cfg.setGroup("Server"); |
1215 | 1215 | ||
1216 | QString username, remoteServerStr, remotePathStr, password, port, temp; | 1216 | QString username, remoteServerStr, remotePathStr, password, port, temp; |
1217 | 1217 | ||
1218 | int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); | 1218 | int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); |
1219 | 1219 | ||
1220 | if( currentServerConfig == -1) { | 1220 | if( currentServerConfig == -1) { |
1221 | 1221 | ||
1222 | for (int i = 1; i <= numberOfEntries; i++) { | 1222 | for (int i = 1; i <= numberOfEntries; i++) { |
1223 | temp.setNum(i); | 1223 | temp.setNum(i); |
1224 | cfg.setGroup("Server"); | 1224 | cfg.setGroup("Server"); |
1225 | QString tempStr = cfg.readEntry( temp,""); | 1225 | QString tempStr = cfg.readEntry( temp,""); |
1226 | } | 1226 | } |
1227 | 1227 | ||
1228 | temp.setNum( numberOfEntries + 1); | 1228 | temp.setNum( numberOfEntries + 1); |
1229 | cfg.setGroup("Server"); | 1229 | cfg.setGroup("Server"); |
1230 | 1230 | ||
1231 | remoteServerStr = cfg.readEntry( temp,""); | 1231 | remoteServerStr = cfg.readEntry( temp,""); |
1232 | 1232 | ||
1233 | int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); | 1233 | int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); |
1234 | remoteServerStr = remoteServerStr.left(remoteServerStr.length()-divider); | 1234 | remoteServerStr = remoteServerStr.left(remoteServerStr.length()-divider); |
1235 | 1235 | ||
1236 | temp.setNum(numberOfEntries+1); | 1236 | temp.setNum(numberOfEntries+1); |
1237 | cfg.setGroup("Server"); | 1237 | cfg.setGroup("Server"); |
1238 | 1238 | ||
1239 | cfg.writeEntry( temp, ServerComboBox->currentText() +":"+PortSpinBox->cleanText() ); | 1239 | cfg.writeEntry( temp, ServerComboBox->currentText() +":"+PortSpinBox->cleanText() ); |
1240 | cfg.writeEntry("currentServer", numberOfEntries+1); | 1240 | cfg.writeEntry("currentServer", numberOfEntries+1); |
1241 | 1241 | ||
1242 | currentServerConfig = numberOfEntries+1; | 1242 | currentServerConfig = numberOfEntries+1; |
1243 | qDebug("setting currentserverconfig to %d", currentServerConfig); | 1243 | qDebug("setting currentserverconfig to %d", currentServerConfig); |
1244 | 1244 | ||
1245 | cfg.setGroup(temp); | 1245 | cfg.setGroup(temp); |
1246 | if(!newServerName.isEmpty()) | 1246 | if(!newServerName.isEmpty()) |
1247 | cfg.writeEntry("ServerName", newServerName); | 1247 | cfg.writeEntry("ServerName", newServerName); |
1248 | 1248 | ||
1249 | cfg.writeEntry("RemotePath", remotePath->text()); | 1249 | cfg.writeEntry("RemotePath", remotePath->text()); |
1250 | 1250 | ||
1251 | cfg.writeEntry("Username", UsernameComboBox->currentText()); | 1251 | cfg.writeEntry("Username", UsernameComboBox->currentText()); |
1252 | 1252 | ||
1253 | cfg.writeEntryCrypt( UsernameComboBox->currentText(), PasswordEdit->text()); | 1253 | cfg.writeEntryCrypt( UsernameComboBox->currentText(), PasswordEdit->text()); |
1254 | cfg.setGroup("Server"); | 1254 | cfg.setGroup("Server"); |
1255 | 1255 | ||
1256 | cfg.writeEntry("numberOfEntries", QString::number(numberOfEntries + 1 )); | 1256 | cfg.writeEntry("numberOfEntries", QString::number(numberOfEntries + 1 )); |
1257 | 1257 | ||
1258 | } | 1258 | } |
1259 | } | 1259 | } |
1260 | 1260 | ||
1261 | void OpieFtp::clearCombos() { | 1261 | void OpieFtp::clearCombos() { |
1262 | qDebug("clearing"); | 1262 | qDebug("clearing"); |
1263 | ServerComboBox->clear(); | 1263 | ServerComboBox->clear(); |
1264 | UsernameComboBox->clear(); | 1264 | UsernameComboBox->clear(); |
1265 | PasswordEdit->clear(); | 1265 | PasswordEdit->clear(); |
1266 | serverListView->clear(); | 1266 | serverListView->clear(); |
1267 | } | 1267 | } |
1268 | 1268 | ||
1269 | 1269 | ||
1270 | void OpieFtp::fillCombos() | 1270 | void OpieFtp::fillCombos() |
1271 | { | 1271 | { |
1272 | clearCombos(); | 1272 | clearCombos(); |
1273 | 1273 | ||
1274 | Config cfg("opieftp"); | 1274 | Config cfg("opieftp"); |
1275 | cfg.setGroup("Server"); | 1275 | cfg.setGroup("Server"); |
1276 | QString username, remoteServerStr, remotePathStr, password, port, temp; | 1276 | QString username, remoteServerStr, remotePathStr, password, port, temp; |
1277 | int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); | 1277 | int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); |
1278 | 1278 | ||
1279 | for (int i = 1; i <= numberOfEntries; i++) { | 1279 | for (int i = 1; i <= numberOfEntries; i++) { |
1280 | temp.setNum(i); | 1280 | temp.setNum(i); |
1281 | qDebug(temp); | 1281 | qDebug(temp); |
1282 | cfg.setGroup("Server"); | 1282 | cfg.setGroup("Server"); |
1283 | remoteServerStr = cfg.readEntry( temp,""); | 1283 | remoteServerStr = cfg.readEntry( temp,""); |
1284 | qDebug( remoteServerStr); | 1284 | qDebug( remoteServerStr); |
1285 | 1285 | ||
1286 | int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); | 1286 | int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); |
1287 | port = remoteServerStr.right( divider - 1); | 1287 | port = remoteServerStr.right( divider - 1); |
1288 | bool ok; | 1288 | bool ok; |
1289 | PortSpinBox->setValue( port.toInt(&ok,10)); | 1289 | PortSpinBox->setValue( port.toInt(&ok,10)); |
1290 | 1290 | ||
1291 | remoteServerStr = remoteServerStr.left(remoteServerStr.length()-divider); | 1291 | remoteServerStr = remoteServerStr.left(remoteServerStr.length()-divider); |
1292 | qDebug( "remote server string "+remoteServerStr); | 1292 | qDebug( "remote server string "+remoteServerStr); |
1293 | ServerComboBox->insertItem( remoteServerStr ); | 1293 | ServerComboBox->insertItem( remoteServerStr ); |
1294 | 1294 | ||
1295 | cfg.setGroup(temp); | 1295 | cfg.setGroup(temp); |
1296 | 1296 | ||
1297 | username = cfg.readEntry(temp); | 1297 | username = cfg.readEntry(temp); |
1298 | UsernameComboBox->insertItem(username); | 1298 | UsernameComboBox->insertItem(username); |
1299 | password = cfg.readEntryCrypt(username,""); | 1299 | password = cfg.readEntryCrypt(username,""); |
1300 | PasswordEdit->setText(password); | 1300 | PasswordEdit->setText(password); |
1301 | 1301 | ||
1302 | serverListView->insertItem( cfg.readEntry("ServerName")); | 1302 | serverListView->insertItem( cfg.readEntry("ServerName")); |
1303 | } | 1303 | } |
1304 | } | 1304 | } |
1305 | 1305 | ||
1306 | 1306 | ||
1307 | void OpieFtp::serverComboSelected(int index) | 1307 | void OpieFtp::serverComboSelected(int index) |
1308 | { | 1308 | { |
1309 | currentServerConfig = index+1; | 1309 | currentServerConfig = index+1; |
1310 | qDebug("server combo selected %d", index+1); | 1310 | qDebug("server combo selected %d", index+1); |
1311 | QString username, remoteServerStr, remotePathStr, password, port, temp; | 1311 | QString username, remoteServerStr, remotePathStr, password, port, temp; |
1312 | // remoteServerStr = ServerComboBox->text(index); | 1312 | // remoteServerStr = ServerComboBox->text(index); |
1313 | 1313 | ||
1314 | Config cfg("opieftp"); | 1314 | Config cfg("opieftp"); |
1315 | cfg.setGroup("Server"); | 1315 | cfg.setGroup("Server"); |
1316 | // int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); | 1316 | // int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); |
1317 | 1317 | ||
1318 | temp.setNum(index+1); | 1318 | temp.setNum(index+1); |
1319 | remoteServerStr = cfg.readEntry( temp,""); | 1319 | remoteServerStr = cfg.readEntry( temp,""); |
1320 | 1320 | ||
1321 | qDebug("Group" +temp); | 1321 | qDebug("Group" +temp); |
1322 | cfg.setGroup(temp); | 1322 | cfg.setGroup(temp); |
1323 | // qDebug(temp); | 1323 | // qDebug(temp); |
1324 | int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); | 1324 | int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); |
1325 | port = remoteServerStr.right( divider - 1); | 1325 | port = remoteServerStr.right( divider - 1); |
1326 | bool ok; | 1326 | bool ok; |
1327 | int portInt = port.toInt(&ok,10); | 1327 | int portInt = port.toInt(&ok,10); |
1328 | if( portInt == 0) portInt = 21; | 1328 | if( portInt == 0) portInt = 21; |
1329 | 1329 | ||
1330 | ServerComboBox->lineEdit()->setText(remoteServerStr.left( remoteServerStr.find(":",0,TRUE))); | 1330 | ServerComboBox->lineEdit()->setText(remoteServerStr.left( remoteServerStr.find(":",0,TRUE))); |
1331 | 1331 | ||
1332 | PortSpinBox->setValue( portInt); | 1332 | PortSpinBox->setValue( portInt); |
1333 | 1333 | ||
1334 | remotePath->setText(cfg.readEntry("RemotePath", "/")); | 1334 | remotePath->setText(cfg.readEntry("RemotePath", "/")); |
1335 | 1335 | ||
1336 | username = cfg.readEntry("Username", "anonymous"); | 1336 | username = cfg.readEntry("Username", "anonymous"); |
1337 | UsernameComboBox->lineEdit()->setText(username); | 1337 | UsernameComboBox->lineEdit()->setText(username); |
1338 | qDebug(username); | 1338 | qDebug(username); |
1339 | // qDebug("Password is "+cfg.readEntryCrypt(username, "me@opieftp.org")); | 1339 | // qDebug("Password is "+cfg.readEntryCrypt(username, "me@opieftp.org")); |
1340 | PasswordEdit->setText(cfg.readEntryCrypt(username, "me@opieftp.org")); | 1340 | PasswordEdit->setText(cfg.readEntryCrypt(username, "me@opieftp.org")); |
1341 | // UsernameComboBox | 1341 | // UsernameComboBox |
1342 | // PasswordEdit | 1342 | // PasswordEdit |
1343 | 1343 | ||
1344 | cfg.setGroup("Server"); | 1344 | cfg.setGroup("Server"); |
1345 | temp.sprintf("%d",currentServerConfig); | 1345 | temp.sprintf("%d",currentServerConfig); |
1346 | cfg.writeEntry("currentServer", temp); | 1346 | cfg.writeEntry("currentServer", temp); |
1347 | 1347 | ||
1348 | fuckeduphack = TRUE; | 1348 | fuckeduphack = TRUE; |
1349 | serverListView->setCurrentItem( index); | 1349 | serverListView->setCurrentItem( index); |
1350 | fuckeduphack=FALSE; | 1350 | fuckeduphack=FALSE; |
1351 | qDebug("server list set selected %d",index); | 1351 | qDebug("server list set selected %d",index); |
1352 | update(); | 1352 | update(); |
1353 | } | 1353 | } |
1354 | 1354 | ||
1355 | void OpieFtp::deleteServer() | 1355 | void OpieFtp::deleteServer() |
1356 | { | 1356 | { |
1357 | QString username, remoteServerStr, remotePathStr, password, port, temp, servername; | 1357 | QString username, remoteServerStr, remotePathStr, password, port, temp, servername; |
1358 | remoteServerStr = ServerComboBox->currentText( ); | 1358 | remoteServerStr = ServerComboBox->currentText( ); |
1359 | username = UsernameComboBox->currentText(); | 1359 | username = UsernameComboBox->currentText(); |
1360 | servername=serverListView->currentText(); | 1360 | servername=serverListView->currentText(); |
1361 | 1361 | ||
1362 | Config cfg("opieftp"); | 1362 | Config cfg("opieftp"); |
1363 | cfg.setGroup("Server"); | 1363 | cfg.setGroup("Server"); |
1364 | QString tempname; | 1364 | QString tempname; |
1365 | int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); | 1365 | int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); |
1366 | 1366 | ||
1367 | for (int i = 1; i <= numberOfEntries; i++) { | 1367 | for (int i = 1; i <= numberOfEntries; i++) { |
1368 | temp.setNum(i); | 1368 | temp.setNum(i); |
1369 | // cfg.setGroup("Server"); | 1369 | // cfg.setGroup("Server"); |
1370 | cfg.setGroup(QString::number(i)); | 1370 | cfg.setGroup(QString::number(i)); |
1371 | tempname=cfg.readEntry( "ServerName",""); | 1371 | tempname=cfg.readEntry( "ServerName",""); |
1372 | 1372 | ||
1373 | if( tempname.find( servername,0,TRUE) != -1 ) { | 1373 | if( tempname.find( servername,0,TRUE) != -1 ) { |
1374 | // servername.find( cfg.readEntry("ServerName")) != -1 && | 1374 | // servername.find( cfg.readEntry("ServerName")) != -1 && |
1375 | // remoteServerStr.find( cfg.readEntry("RemotePath")) != -1 && | 1375 | // remoteServerStr.find( cfg.readEntry("RemotePath")) != -1 && |
1376 | // username.find( cfg.readEntry("Username")) != -1) { | 1376 | // username.find( cfg.readEntry("Username")) != -1) { |
1377 | 1377 | ||
1378 | serverListView->removeItem(i); | 1378 | serverListView->removeItem(i); |
1379 | 1379 | ||
1380 | qDebug("OK DELETE "+tempname); | 1380 | qDebug("OK DELETE "+tempname); |
1381 | cfg.removeEntry(QString::number(i)); | 1381 | cfg.removeEntry(QString::number(i)); |
1382 | for ( ; i <= numberOfEntries; i++) { | 1382 | for ( ; i <= numberOfEntries; i++) { |
1383 | cfg.setGroup("Server"); | 1383 | cfg.setGroup("Server"); |
1384 | cfg.writeEntry("Server", QString::number(numberOfEntries + 1 )); | 1384 | cfg.writeEntry("Server", QString::number(numberOfEntries + 1 )); |
1385 | 1385 | ||
1386 | cfg.setGroup(QString::number(i+1)); //get next server config | 1386 | cfg.setGroup(QString::number(i+1)); //get next server config |
1387 | servername=cfg.readEntry("ServerName"); | 1387 | servername=cfg.readEntry("ServerName"); |
1388 | remoteServerStr=cfg.readEntry("RemotePath"); | 1388 | remoteServerStr=cfg.readEntry("RemotePath"); |
1389 | username=cfg.readEntry("Username"); | 1389 | username=cfg.readEntry("Username"); |
1390 | password=cfg.readEntryCrypt( username); | 1390 | password=cfg.readEntryCrypt( username); |
1391 | 1391 | ||
1392 | cfg.setGroup(QString::number(i)); | 1392 | cfg.setGroup(QString::number(i)); |
1393 | 1393 | ||
1394 | cfg.writeEntry("RemotePath", remoteServerStr); | 1394 | cfg.writeEntry("RemotePath", remoteServerStr); |
1395 | cfg.writeEntry("ServerName", servername); | 1395 | cfg.writeEntry("ServerName", servername); |
1396 | cfg.writeEntry("Username", username); | 1396 | cfg.writeEntry("Username", username); |
1397 | cfg.writeEntryCrypt( username, password); | 1397 | cfg.writeEntryCrypt( username, password); |
1398 | 1398 | ||
1399 | } | 1399 | } |
1400 | cfg.setGroup("Server"); | 1400 | cfg.setGroup("Server"); |
1401 | cfg.writeEntry("numberOfEntries", QString::number(numberOfEntries - 1 )); | 1401 | cfg.writeEntry("numberOfEntries", QString::number(numberOfEntries - 1 )); |
1402 | } | 1402 | } |
1403 | } | 1403 | } |
1404 | cfg.setGroup(QString::number(numberOfEntries)); | 1404 | cfg.setGroup(QString::number(numberOfEntries)); |
1405 | cfg.removeEntry("Server"); | 1405 | cfg.removeEntry("Server"); |
1406 | cfg.removeEntry("RemotePath"); | 1406 | cfg.removeEntry("RemotePath"); |
1407 | cfg.removeEntry("ServerName"); | 1407 | cfg.removeEntry("ServerName"); |
1408 | username=cfg.readEntry("Username"); | 1408 | username=cfg.readEntry("Username"); |
1409 | cfg.removeEntry("Username"); | 1409 | cfg.removeEntry("Username"); |
1410 | cfg.removeEntry(username); | 1410 | cfg.removeEntry(username); |
1411 | 1411 | ||
1412 | currentServerConfig=currentServerConfig-1; | 1412 | currentServerConfig=currentServerConfig-1; |
1413 | 1413 | ||
1414 | fillCombos(); | 1414 | fillCombos(); |
1415 | update(); | 1415 | update(); |
1416 | } | 1416 | } |
1417 | 1417 | ||
1418 | void OpieFtp::upDir() | 1418 | void OpieFtp::upDir() |
1419 | { | 1419 | { |
1420 | if (TabWidget->currentPageIndex() == 0) { | 1420 | if (TabWidget->currentPageIndex() == 0) { |
1421 | QString current = currentDir.canonicalPath(); | 1421 | QString current = currentDir.canonicalPath(); |
1422 | QDir dir(current); | 1422 | QDir dir(current); |
1423 | dir.cdUp(); | 1423 | dir.cdUp(); |
1424 | current = dir.canonicalPath(); | 1424 | current = dir.canonicalPath(); |
1425 | chdir( current.latin1() ); | 1425 | chdir( current.latin1() ); |
1426 | currentDir.cd( current, TRUE); | 1426 | currentDir.cd( current, TRUE); |
1427 | populateLocalView(); | 1427 | populateLocalView(); |
1428 | update(); | 1428 | update(); |
1429 | } else { | 1429 | } else { |
1430 | if( FtpCDUp( conn) == 0) { | 1430 | if( FtpCDUp( conn) == 0) { |
1431 | QString msg; | 1431 | QString msg; |
1432 | msg.sprintf(tr("Unable to cd up\n")+"%s",FtpLastResponse(conn)); | 1432 | msg.sprintf(tr("Unable to cd up\n")+"%s",FtpLastResponse(conn)); |
1433 | msg.replace(QRegExp(":"),"\n"); | 1433 | msg.replace(QRegExp(":"),"\n"); |
1434 | QMessageBox::message(tr("Note"),msg); | 1434 | QMessageBox::message(tr("Note"),msg); |
1435 | // qDebug(msg); | 1435 | // qDebug(msg); |
1436 | } | 1436 | } |
1437 | char path[256]; | 1437 | char path[256]; |
1438 | if( FtpPwd( path,sizeof(path),conn) == 0) { //this is easier than fudging the string | 1438 | if( FtpPwd( path,sizeof(path),conn) == 0) { //this is easier than fudging the string |
1439 | QString msg; | 1439 | QString msg; |
1440 | msg.sprintf(tr("Unable to get working dir\n")+"%s",FtpLastResponse(conn)); | 1440 | msg.sprintf(tr("Unable to get working dir\n")+"%s",FtpLastResponse(conn)); |
1441 | msg.replace(QRegExp(":"),"\n"); | 1441 | msg.replace(QRegExp(":"),"\n"); |
1442 | QMessageBox::message(tr("Note"),msg); | 1442 | QMessageBox::message(tr("Note"),msg); |
1443 | // qDebug(msg); | 1443 | // qDebug(msg); |
1444 | } | 1444 | } |
1445 | currentRemoteDir=path; | 1445 | currentRemoteDir=path; |
1446 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate | 1446 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate |
1447 | if(currentRemoteDir.right(1) !="/") | 1447 | if(currentRemoteDir.right(1) !="/") |
1448 | currentRemoteDir +="/"; | 1448 | currentRemoteDir +="/"; |
1449 | currentPathCombo->lineEdit()->setText( currentRemoteDir); | 1449 | currentPathCombo->lineEdit()->setText( currentRemoteDir); |
1450 | fillRemoteCombo( (const QString &)currentRemoteDir); | 1450 | fillRemoteCombo( (const QString &)currentRemoteDir); |
1451 | 1451 | ||
1452 | } | 1452 | } |
1453 | } | 1453 | } |
1454 | 1454 | ||
1455 | void OpieFtp::docButtonPushed() { | 1455 | void OpieFtp::docButtonPushed() { |
1456 | QString current = QPEApplication::documentDir(); | 1456 | QString current = QPEApplication::documentDir(); |
1457 | chdir( current.latin1() ); | 1457 | chdir( current.latin1() ); |
1458 | currentDir.cd( current, TRUE); | 1458 | currentDir.cd( current, TRUE); |
1459 | populateLocalView(); | 1459 | populateLocalView(); |
1460 | update(); | 1460 | update(); |
1461 | 1461 | ||
1462 | } | 1462 | } |
1463 | 1463 | ||
1464 | void OpieFtp::homeButtonPushed() { | 1464 | void OpieFtp::homeButtonPushed() { |
1465 | QString current = QDir::homeDirPath(); | 1465 | QString current = QDir::homeDirPath(); |
1466 | chdir( current.latin1() ); | 1466 | chdir( current.latin1() ); |
1467 | currentDir.cd( current, TRUE); | 1467 | currentDir.cd( current, TRUE); |
1468 | populateLocalView(); | 1468 | populateLocalView(); |
1469 | update(); | 1469 | update(); |
1470 | } | 1470 | } |
1471 | 1471 | ||
1472 | void OpieFtp::doAbout() { | 1472 | void OpieFtp::doAbout() { |
1473 | QMessageBox::message("OpieFtp","Opie ftp client is copyright 2002 by\n" | 1473 | QMessageBox::message("OpieFtp","Opie ftp client is copyright 2002 by\n" |
1474 | "L.J.Potter<llornkcor@handhelds.org>\n" | 1474 | "L.J.Potter<llornkcor@handhelds.org>\n" |
1475 | "and uses ftplib copyright 1996-2000\n" | 1475 | "and uses ftplib copyright 1996-2000\n" |
1476 | "by Thomas Pfau, pfau@cnj.digex.net\n\n" | 1476 | "by Thomas Pfau, pfau@cnj.digex.net\n\n" |
1477 | "and is licensed by the GPL"); | 1477 | "and is licensed by the GPL"); |
1478 | } | 1478 | } |
1479 | 1479 | ||
1480 | void OpieFtp::NewServer() { | 1480 | void OpieFtp::NewServer() { |
1481 | InputDialog *fileDlg; | 1481 | InputDialog *fileDlg; |
1482 | fileDlg = new InputDialog(this,tr("New Server name"),TRUE, 0); | 1482 | fileDlg = new InputDialog(this,tr("New Server name"),TRUE, 0); |
1483 | fileDlg->exec(); | 1483 | fileDlg->exec(); |
1484 | Config cfg("opieftp"); | 1484 | Config cfg("opieftp"); |
1485 | if( fileDlg->result() == 1 ) { | 1485 | if( fileDlg->result() == 1 ) { |
1486 | newServerName = fileDlg->LineEdit1->text(); | 1486 | newServerName = fileDlg->LineEdit1->text(); |
1487 | for(int i=1;i<serverListView->count();i++) { | 1487 | for(int i=1;i<serverListView->count();i++) { |
1488 | cfg.setGroup( QString::number(i)); | 1488 | cfg.setGroup( QString::number(i)); |
1489 | if(cfg.readEntry("ServerName").find(newServerName,0,TRUE) != -1) { | 1489 | if(cfg.readEntry("ServerName").find(newServerName,0,TRUE) != -1) { |
1490 | QMessageBox::message(tr("OpieFtp"),tr("Sorry name already taken")); | 1490 | QMessageBox::message(tr("OpieFtp"),tr("Sorry name already taken")); |
1491 | return; | 1491 | return; |
1492 | } | 1492 | } |
1493 | } | 1493 | } |
1494 | currentServerConfig =-1; | 1494 | currentServerConfig =-1; |
1495 | writeConfig(); | 1495 | writeConfig(); |
1496 | serverListView->insertItem( newServerName ); | 1496 | serverListView->insertItem( newServerName ); |
1497 | serverListView->setCurrentItem( serverListView->count()); | 1497 | serverListView->setCurrentItem( serverListView->count()); |
1498 | } | 1498 | } |
1499 | } | 1499 | } |
1500 | 1500 | ||
1501 | void OpieFtp::serverListClicked( const QString &item) { | 1501 | void OpieFtp::serverListClicked( const QString &item) { |
1502 | if(item.isEmpty()) return; | 1502 | if(item.isEmpty()) return; |
1503 | Config cfg("opieftp"); | 1503 | Config cfg("opieftp"); |
1504 | qDebug("highltined "+item); | 1504 | qDebug("highltined "+item); |
1505 | int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); | 1505 | int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); |
1506 | for (int i = 1; i <= numberOfEntries; i++) { | 1506 | for (int i = 1; i <= numberOfEntries; i++) { |
1507 | cfg.setGroup(QString::number(i)); | 1507 | cfg.setGroup(QString::number(i)); |
1508 | if(cfg.readEntry( "ServerName").find(item) != -1 && !fuckeduphack) | 1508 | if(cfg.readEntry( "ServerName").find(item) != -1 && !fuckeduphack) |
1509 | serverComboSelected(i-1); | 1509 | serverComboSelected(i-1); |
1510 | } | 1510 | } |
1511 | } | 1511 | } |
1512 | 1512 | ||
1513 | void OpieFtp::timerOut() { | 1513 | void OpieFtp::timerOut() { |
1514 | 1514 | ||
1515 | } | 1515 | } |
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp index 477e24d..93bedf6 100644 --- a/noncore/settings/backup/backuprestore.cpp +++ b/noncore/settings/backup/backuprestore.cpp | |||
@@ -1,471 +1,471 @@ | |||
1 | 1 | ||
2 | #include "backuprestore.h" | 2 | #include "backuprestore.h" |
3 | //#include "output.h" | 3 | //#include "output.h" |
4 | #include "errordialog.h" | 4 | #include "errordialog.h" |
5 | 5 | ||
6 | #include <qapplication.h> | 6 | #include <qapplication.h> |
7 | #include <qmultilineedit.h> | 7 | #include <qmultilineedit.h> |
8 | 8 | ||
9 | #include <qdir.h> | 9 | #include <qdir.h> |
10 | #include <qfile.h> | 10 | #include <qfile.h> |
11 | #include <qfileinfo.h> | 11 | #include <qfileinfo.h> |
12 | #include <qlistview.h> | 12 | #include <qlistview.h> |
13 | #include <qpushbutton.h> | 13 | #include <qpushbutton.h> |
14 | #include <qheader.h> | 14 | #include <qheader.h> |
15 | #include <qpe/resource.h> | 15 | #include <qpe/resource.h> |
16 | #include <qpe/config.h> | 16 | #include <qpe/config.h> |
17 | #include <qmessagebox.h> | 17 | #include <qmessagebox.h> |
18 | #include <qcombobox.h> | 18 | #include <qcombobox.h> |
19 | #include <qlist.h> | 19 | #include <qlist.h> |
20 | #include <stdlib.h> | 20 | #include <stdlib.h> |
21 | #include <qregexp.h> | 21 | #include <qregexp.h> |
22 | #include <qtextstream.h> | 22 | #include <qtextstream.h> |
23 | #include <qtextview.h> | 23 | #include <qtextview.h> |
24 | #include <qpe/storage.h> | 24 | #include <qpe/storage.h> |
25 | 25 | ||
26 | #include <errno.h> | 26 | #include <errno.h> |
27 | #include <stdlib.h> | 27 | #include <stdlib.h> |
28 | #include <unistd.h> | 28 | #include <unistd.h> |
29 | #include <sys/stat.h> | 29 | #include <sys/stat.h> |
30 | #include <dirent.h> | 30 | #include <dirent.h> |
31 | 31 | ||
32 | #define HEADER_NAME 0 | 32 | #define HEADER_NAME 0 |
33 | #define HEADER_BACKUP 1 | 33 | #define HEADER_BACKUP 1 |
34 | #define BACKUP_LOCATION 2 | 34 | #define BACKUP_LOCATION 2 |
35 | 35 | ||
36 | #define EXTENSION ".bck" | 36 | #define EXTENSION ".bck" |
37 | 37 | ||
38 | const QString tempFileName = "/tmp/backup.err"; | 38 | const QString tempFileName = "/tmp/backup.err"; |
39 | 39 | ||
40 | 40 | ||
41 | BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name, WFlags fl) | 41 | BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name, WFlags fl) |
42 | : BackupAndRestoreBase(parent, name, fl) | 42 | : BackupAndRestoreBase(parent, name, fl) |
43 | { | 43 | { |
44 | this->showMaximized(); | 44 | this->showMaximized(); |
45 | backupList->header()->hide(); | 45 | backupList->header()->hide(); |
46 | restoreList->header()->hide(); | 46 | restoreList->header()->hide(); |
47 | connect(backupButton, SIGNAL(clicked()), | 47 | connect(backupButton, SIGNAL(clicked()), |
48 | this, SLOT(backup())); | 48 | this, SLOT(backup())); |
49 | connect(restoreButton, SIGNAL(clicked()), | 49 | connect(restoreButton, SIGNAL(clicked()), |
50 | this, SLOT(restore())); | 50 | this, SLOT(restore())); |
51 | connect(backupList, SIGNAL(clicked( QListViewItem * )), | 51 | connect(backupList, SIGNAL(clicked( QListViewItem * )), |
52 | this, SLOT(selectItem(QListViewItem*))); | 52 | this, SLOT(selectItem(QListViewItem*))); |
53 | connect(restoreSource, SIGNAL(activated( int )), | 53 | connect(restoreSource, SIGNAL(activated( int )), |
54 | this, SLOT(sourceDirChanged(int))); | 54 | this, SLOT(sourceDirChanged(int))); |
55 | connect(updateList, SIGNAL(clicked()), | 55 | connect(updateList, SIGNAL(clicked()), |
56 | this, SLOT( fileListUpdate())); | 56 | this, SLOT( fileListUpdate())); |
57 | 57 | ||
58 | //add directorys for backing up | 58 | //add directorys for backing up |
59 | applicationSettings = new QListViewItem(backupList, "Application Settings", "", "Settings/"); | 59 | applicationSettings = new QListViewItem(backupList, "Application Settings", "", "Settings/"); |
60 | selectItem(applicationSettings); | 60 | selectItem(applicationSettings); |
61 | applicationSettings = new QListViewItem(backupList, "Application Data", "", "Applications/"); | 61 | applicationSettings = new QListViewItem(backupList, "Application Data", "", "Applications/"); |
62 | selectItem(applicationSettings); | 62 | selectItem(applicationSettings); |
63 | documents= new QListViewItem(backupList, "Documents", "", "Documents/"); | 63 | documents= new QListViewItem(backupList, "Documents", "", "Documents/"); |
64 | selectItem(documents); | 64 | selectItem(documents); |
65 | 65 | ||
66 | scanForApplicationSettings(); | 66 | scanForApplicationSettings(); |
67 | 67 | ||
68 | backupLocations.insert( "Documents", QDir::homeDirPath() + "/Documents" ); | 68 | backupLocations.insert( "Documents", QDir::homeDirPath() + "/Documents" ); |
69 | if (StorageInfo::hasCf()) | 69 | if (StorageInfo::hasCf()) |
70 | { | 70 | { |
71 | backupLocations.insert("CF", "/mnt/cf"); | 71 | backupLocations.insert("CF", "/mnt/cf"); |
72 | } | 72 | } |
73 | if (StorageInfo::hasSd() || StorageInfo::hasMmc()) | 73 | if (StorageInfo::hasSd() || StorageInfo::hasMmc()) |
74 | { | 74 | { |
75 | backupLocations.insert("SD", "/mnt/card"); | 75 | backupLocations.insert("SD", "/mnt/card"); |
76 | } | 76 | } |
77 | 77 | ||
78 | Config config("BackupAndRestore"); | 78 | Config config("BackupAndRestore"); |
79 | //read last locations | 79 | //read last locations |
80 | config.setGroup("LastLocation"); | 80 | config.setGroup("LastLocation"); |
81 | QString lastStoreLocation = config.readEntry( "LastStoreLocation", "" ); | 81 | QString lastStoreLocation = config.readEntry( "LastStoreLocation", "" ); |
82 | QString lastRestoreLocation = config.readEntry( "LastRestoreLocation", "" ); | 82 | QString lastRestoreLocation = config.readEntry( "LastRestoreLocation", "" ); |
83 | int locationIndex = 0; | 83 | int locationIndex = 0; |
84 | 84 | ||
85 | QMap<QString, QString>::Iterator it; | 85 | QMap<QString, QString>::Iterator it; |
86 | for( it = backupLocations.begin(); it != backupLocations.end(); ++it ) | 86 | for( it = backupLocations.begin(); it != backupLocations.end(); ++it ) |
87 | { | 87 | { |
88 | storeToLocation->insertItem(it.key()); | 88 | storeToLocation->insertItem(it.key()); |
89 | restoreSource->insertItem(it.key()); | 89 | restoreSource->insertItem(it.key()); |
90 | 90 | ||
91 | //check for last locations | 91 | //check for last locations |
92 | if ( it.key() == lastStoreLocation ) | 92 | if ( it.key() == lastStoreLocation ) |
93 | storeToLocation->setCurrentItem( locationIndex ); | 93 | storeToLocation->setCurrentItem( locationIndex ); |
94 | if ( it.key() == lastRestoreLocation ) | 94 | if ( it.key() == lastRestoreLocation ) |
95 | restoreSource->setCurrentItem( locationIndex ); | 95 | restoreSource->setCurrentItem( locationIndex ); |
96 | locationIndex++; | 96 | locationIndex++; |
97 | } | 97 | } |
98 | 98 | ||
99 | // Read the list of items to ignore. | 99 | // Read the list of items to ignore. |
100 | QList<QString> dontBackupList; | 100 | QList<QString> dontBackupList; |
101 | dontBackupList.setAutoDelete(true); | 101 | dontBackupList.setAutoDelete(true); |
102 | config.setGroup("DontBackup"); | 102 | config.setGroup("DontBackup"); |
103 | int total = config.readNumEntry("Total", 0); | 103 | int total = config.readNumEntry("Total", 0); |
104 | for(int i = 0; i < total; i++) | 104 | for(int i = 0; i < total; i++) |
105 | { | 105 | { |
106 | dontBackupList.append(new QString(config.readEntry(QString("%1").arg(i), ""))); | 106 | dontBackupList.append(new QString(config.readEntry(QString("%1").arg(i), ""))); |
107 | } | 107 | } |
108 | 108 | ||
109 | QList<QListViewItem> list; | 109 | QList<QListViewItem> list; |
110 | getAllItems(backupList->firstChild(), list); | 110 | getAllItems(backupList->firstChild(), list); |
111 | 111 | ||
112 | for(uint i = 0; i < list.count(); i++) | 112 | for(uint i = 0; i < list.count(); i++) |
113 | { | 113 | { |
114 | QString text = list.at(i)->text(HEADER_NAME); | 114 | QString text = list.at(i)->text(HEADER_NAME); |
115 | for(uint i2 = 0; i2 < dontBackupList.count(); i2++) | 115 | for(uint i2 = 0; i2 < dontBackupList.count(); i2++) |
116 | { | 116 | { |
117 | if(*dontBackupList.at(i2) == text) | 117 | if(*dontBackupList.at(i2) == text) |
118 | { | 118 | { |
119 | selectItem(list.at(i)); | 119 | selectItem(list.at(i)); |
120 | break; | 120 | break; |
121 | } | 121 | } |
122 | } | 122 | } |
123 | } | 123 | } |
124 | } | 124 | } |
125 | 125 | ||
126 | BackupAndRestore::~BackupAndRestore() | 126 | BackupAndRestore::~BackupAndRestore() |
127 | { | 127 | { |
128 | QList<QListViewItem> list; | 128 | QList<QListViewItem> list; |
129 | getAllItems(backupList->firstChild(), list); | 129 | getAllItems(backupList->firstChild(), list); |
130 | 130 | ||
131 | Config config("BackupAndRestore"); | 131 | Config config("BackupAndRestore"); |
132 | config.setGroup("DontBackup"); | 132 | config.setGroup("DontBackup"); |
133 | config.clearGroup(); | 133 | config.clearGroup(); |
134 | 134 | ||
135 | int count = 0; | 135 | int count = 0; |
136 | for(uint i = 0; i < list.count(); i++) | 136 | for(uint i = 0; i < list.count(); i++) |
137 | { | 137 | { |
138 | if(list.at(i)->text(HEADER_BACKUP) == "") | 138 | if(list.at(i)->text(HEADER_BACKUP) == "") |
139 | { | 139 | { |
140 | config.writeEntry(QString("%1").arg(count), list.at(i)->text(HEADER_NAME)); | 140 | config.writeEntry(QString("%1").arg(count), list.at(i)->text(HEADER_NAME)); |
141 | count++; | 141 | count++; |
142 | } | 142 | } |
143 | } | 143 | } |
144 | config.writeEntry("Total", count); | 144 | config.writeEntry("Total", count); |
145 | 145 | ||
146 | // Remove Temp File | 146 | // Remove Temp File |
147 | if ( QFile::exists( tempFileName ) ) | 147 | if ( QFile::exists( tempFileName ) ) |
148 | QFile::remove( tempFileName ); | 148 | QFile::remove( tempFileName ); |
149 | } | 149 | } |
150 | 150 | ||
151 | QList<QListViewItem> BackupAndRestore::getAllItems(QListViewItem *item, QList<QListViewItem> &list) | 151 | QList<QListViewItem> BackupAndRestore::getAllItems(QListViewItem *item, QList<QListViewItem> &list) |
152 | { | 152 | { |
153 | while(item) | 153 | while(item) |
154 | { | 154 | { |
155 | if(item->childCount() > 0) | 155 | if(item->childCount() > 0) |
156 | getAllItems(item->firstChild(), list); | 156 | getAllItems(item->firstChild(), list); |
157 | list.append(item); | 157 | list.append(item); |
158 | item = item->nextSibling(); | 158 | item = item->nextSibling(); |
159 | } | 159 | } |
160 | return list; | 160 | return list; |
161 | } | 161 | } |
162 | 162 | ||
163 | /** | 163 | /** |
164 | * Selects and unselects the item by setting the HEADER_BACKUP to B or !. | 164 | * Selects and unselects the item by setting the HEADER_BACKUP to B or !. |
165 | * and changing the icon to match | 165 | * and changing the icon to match |
166 | * @param currentItem the item to swich the selection choice. | 166 | * @param currentItem the item to swich the selection choice. |
167 | */ | 167 | */ |
168 | void BackupAndRestore::selectItem(QListViewItem *currentItem) | 168 | void BackupAndRestore::selectItem(QListViewItem *currentItem) |
169 | { | 169 | { |
170 | if(!currentItem) | 170 | if(!currentItem) |
171 | return; | 171 | return; |
172 | 172 | ||
173 | if(currentItem->text(HEADER_BACKUP) == "B") | 173 | if(currentItem->text(HEADER_BACKUP) == "B") |
174 | { | 174 | { |
175 | currentItem->setPixmap(HEADER_NAME, Resource::loadPixmap("backup/null")); | 175 | currentItem->setPixmap(HEADER_NAME, Resource::loadPixmap("backup/null")); |
176 | currentItem->setText(HEADER_BACKUP, ""); | 176 | currentItem->setText(HEADER_BACKUP, ""); |
177 | } | 177 | } |
178 | else | 178 | else |
179 | { | 179 | { |
180 | currentItem->setPixmap(HEADER_NAME, Resource::loadPixmap("backup/check")); | 180 | currentItem->setPixmap(HEADER_NAME, Resource::loadPixmap("backup/check")); |
181 | currentItem->setText(HEADER_BACKUP, "B"); | 181 | currentItem->setText(HEADER_BACKUP, "B"); |
182 | } | 182 | } |
183 | } | 183 | } |
184 | 184 | ||
185 | void BackupAndRestore::scanForApplicationSettings() | 185 | void BackupAndRestore::scanForApplicationSettings() |
186 | { | 186 | { |
187 | QDir d( QDir::homeDirPath() + "/" + QString( applicationSettings->text(BACKUP_LOCATION) ) ); | 187 | QDir d( QDir::homeDirPath() + "/" + QString( applicationSettings->text(BACKUP_LOCATION) ) ); |
188 | d.setFilter( QDir::Dirs | QDir::Files | QDir::NoSymLinks ); | 188 | d.setFilter( QDir::Dirs | QDir::Files | QDir::NoSymLinks ); |
189 | const QFileInfoList *list = d.entryInfoList(); | 189 | const QFileInfoList *list = d.entryInfoList(); |
190 | QFileInfoListIterator it( *list ); | 190 | QFileInfoListIterator it( *list ); |
191 | QFileInfo *fi; | 191 | QFileInfo *fi; |
192 | while ( (fi=it.current()) ) | 192 | while ( (fi=it.current()) ) |
193 | { | 193 | { |
194 | //qDebug((d.path()+"/"+fi->fileName()).latin1()); | 194 | //qDebug((d.path()+"/"+fi->fileName()).latin1()); |
195 | if ( ( fi->fileName() != "." ) && ( fi->fileName() != ".." ) ) | 195 | if ( ( fi->fileName() != "." ) && ( fi->fileName() != ".." ) ) |
196 | { | 196 | { |
197 | QListViewItem *newItem = new QListViewItem(applicationSettings, fi->fileName()); | 197 | QListViewItem *newItem = new QListViewItem(applicationSettings, fi->fileName()); |
198 | selectItem(newItem); | 198 | selectItem(newItem); |
199 | } | 199 | } |
200 | ++it; | 200 | ++it; |
201 | } | 201 | } |
202 | } | 202 | } |
203 | 203 | ||
204 | /** | 204 | /** |
205 | * The "Backup" button has been pressed. Get a list of all of the files that | 205 | * The "Backup" button has been pressed. Get a list of all of the files that |
206 | * should be backed up. If there are no files, emit and error and exit. | 206 | * should be backed up. If there are no files, emit and error and exit. |
207 | * Determine the file name to store the backup in. Backup the file(s) using | 207 | * Determine the file name to store the backup in. Backup the file(s) using |
208 | * tar and gzip --best. Report failure or success | 208 | * tar and gzip --best. Report failure or success |
209 | */ | 209 | */ |
210 | void BackupAndRestore::backup() | 210 | void BackupAndRestore::backup() |
211 | { | 211 | { |
212 | QString backupFiles; | 212 | QString backupFiles; |
213 | if(getBackupFiles(backupFiles, NULL) == 0) | 213 | if(getBackupFiles(backupFiles, NULL) == 0) |
214 | { | 214 | { |
215 | QMessageBox::critical(this, "Message", | 215 | QMessageBox::critical(this, "Message", |
216 | "No items selected.",QString("Ok") ); | 216 | "No items selected.",QString("Ok") ); |
217 | return; | 217 | return; |
218 | } | 218 | } |
219 | 219 | ||
220 | setCaption(tr("Backup and Restore... working...")); | 220 | setCaption(tr("Backup and Restore... working...")); |
221 | QString outputFile = backupLocations[storeToLocation->currentText()]; | 221 | QString outputFile = backupLocations[storeToLocation->currentText()]; |
222 | 222 | ||
223 | QDateTime datetime = QDateTime::currentDateTime(); | 223 | QDateTime datetime = QDateTime::currentDateTime(); |
224 | QString dateString = QString::number( datetime.date().year() ) + QString::number( datetime.date().month() ).rightJustify(2, '0') + | 224 | QString dateString = QString::number( datetime.date().year() ) + QString::number( datetime.date().month() ).rightJustify(2, '0') + |
225 | QString::number( datetime.date().day() ).rightJustify(2, '0'); | 225 | QString::number( datetime.date().day() ).rightJustify(2, '0'); |
226 | 226 | ||
227 | outputFile += "/" + dateString; | 227 | outputFile += "/" + dateString; |
228 | 228 | ||
229 | QString t = outputFile; | 229 | QString t = outputFile; |
230 | int c = 1; | 230 | int c = 1; |
231 | while(QFile::exists(outputFile + EXTENSION)) | 231 | while(QFile::exists(outputFile + EXTENSION)) |
232 | { | 232 | { |
233 | outputFile = t + QString("%1").arg(c); | 233 | outputFile = t + QString("%1").arg(c); |
234 | c++; | 234 | c++; |
235 | } | 235 | } |
236 | 236 | ||
237 | // We execute tar and compressing its output with gzip.. | 237 | // We execute tar and compressing its output with gzip.. |
238 | // The error output will be written into a temp-file which could be provided | 238 | // The error output will be written into a temp-file which could be provided |
239 | // for debugging.. | 239 | // for debugging.. |
240 | qDebug( "Storing file: %s", outputFile.latin1() ); | 240 | qDebug( "Storing file: %s", outputFile.latin1() ); |
241 | outputFile += EXTENSION; | 241 | outputFile += EXTENSION; |
242 | 242 | ||
243 | QString commandLine = QString( "(tar -C %1 -c %2 | gzip > %3 ) 2> %4" ).arg( QDir::homeDirPath() ) | 243 | QString commandLine = QString( "(tar -C %1 -c %2 | gzip > %3 ) 2> %4" ).arg( QDir::homeDirPath() ) |
244 | .arg( backupFiles ) | 244 | .arg( backupFiles ) |
245 | .arg( outputFile.latin1() ) | 245 | .arg( outputFile.latin1() ) |
246 | .arg( tempFileName.latin1() ); | 246 | .arg( tempFileName.latin1() ); |
247 | 247 | ||
248 | qDebug( commandLine ); | 248 | qDebug( commandLine ); |
249 | 249 | ||
250 | int r = system( commandLine ); | 250 | int r = system( commandLine ); |
251 | 251 | ||
252 | if(r != 0) | 252 | if(r != 0) |
253 | { | 253 | { |
254 | perror("Error: "); | 254 | perror("Error: "); |
255 | QString errorMsg= tr( "Error from System:\n" ) + (QString)strerror( errno ); | 255 | QString errorMsg= tr( "Error from System:\n" ) + (QString)strerror( errno ); |
256 | 256 | ||
257 | switch( QMessageBox::critical(this, tr( "Message" ), tr( "Backup Failed!" ) + "\n" | 257 | switch( QMessageBox::critical(this, tr( "Message" ), tr( "Backup Failed!" ) + "\n" |
258 | + errorMsg, QString( tr( "Ok" ) ), QString( tr( "Details" ) ) ) ) | 258 | + errorMsg, QString( tr( "Ok" ) ), QString( tr( "Details" ) ) ) ) |
259 | { | 259 | { |
260 | 260 | ||
261 | case 1: | 261 | case 1: |
262 | qWarning("Details pressed !"); | 262 | qWarning("Details pressed !"); |
263 | ErrorDialog* pErrDialog = new ErrorDialog( this, NULL, true ); | 263 | ErrorDialog* pErrDialog = new ErrorDialog( this, NULL, true ); |
264 | QFile errorFile( tempFileName ); | 264 | QFile errorFile( tempFileName ); |
265 | if ( errorFile.open(IO_ReadOnly) ) | 265 | if ( errorFile.open(IO_ReadOnly) ) |
266 | { | 266 | { |
267 | QTextStream t( &errorFile ); | 267 | QTextStream t( &errorFile ); |
268 | QString s; | 268 | QString s; |
269 | while ( !t.eof() ) | 269 | while ( !t.eof() ) |
270 | { // until end of file... | 270 | { // until end of file... |
271 | s += t.readLine(); // line of text excluding '\n' | 271 | s += t.readLine(); // line of text excluding '\n' |
272 | } | 272 | } |
273 | errorFile.close(); | 273 | errorFile.close(); |
274 | 274 | ||
275 | pErrDialog->m_textarea->setText( s ); | 275 | pErrDialog->m_textarea->setText( s ); |
276 | } | 276 | } |
277 | else | 277 | else |
278 | { | 278 | { |
279 | pErrDialog->m_textarea->setText( "Unable to open File: /tmp/backup.er" ); | 279 | pErrDialog->m_textarea->setText( "Unable to open File: /tmp/backup.er" ); |
280 | } | 280 | } |
281 | pErrDialog->showMaximized(); | 281 | pErrDialog->showMaximized(); |
282 | pErrDialog->exec(); | 282 | pErrDialog->exec(); |
283 | delete pErrDialog; | 283 | delete pErrDialog; |
284 | break; | 284 | break; |
285 | } | 285 | } |
286 | setCaption(tr("Backup and Restore.. Failed !!")); | 286 | setCaption(tr("Backup and Restore.. Failed !!")); |
287 | return; | 287 | return; |
288 | } | 288 | } |
289 | else | 289 | else |
290 | { | 290 | { |
291 | QMessageBox::information(this, tr( "Message" ), tr( "Backup Successfull." ), QString(tr( "Ok" ) ) ); | 291 | QMessageBox::information(this, tr( "Message" ), tr( "Backup Successful." ), QString(tr( "Ok" ) ) ); |
292 | 292 | ||
293 | } | 293 | } |
294 | 294 | ||
295 | //write store-location | 295 | //write store-location |
296 | Config config( "BackupAndRestore" ); | 296 | Config config( "BackupAndRestore" ); |
297 | config.setGroup( "LastLocation" ); | 297 | config.setGroup( "LastLocation" ); |
298 | config.writeEntry( "LastStoreLocation", storeToLocation->currentText() ); | 298 | config.writeEntry( "LastStoreLocation", storeToLocation->currentText() ); |
299 | 299 | ||
300 | setCaption(tr("Backup and Restore")); | 300 | setCaption(tr("Backup and Restore")); |
301 | } | 301 | } |
302 | 302 | ||
303 | /*** | 303 | /*** |
304 | * Get a list of all of the files to backup. | 304 | * Get a list of all of the files to backup. |
305 | */ | 305 | */ |
306 | int BackupAndRestore::getBackupFiles(QString &backupFiles, QListViewItem *parent) | 306 | int BackupAndRestore::getBackupFiles(QString &backupFiles, QListViewItem *parent) |
307 | { | 307 | { |
308 | QListViewItem * currentItem; | 308 | QListViewItem * currentItem; |
309 | QString currentHome; | 309 | QString currentHome; |
310 | if(!parent) | 310 | if(!parent) |
311 | currentItem = backupList->firstChild(); | 311 | currentItem = backupList->firstChild(); |
312 | else | 312 | else |
313 | { | 313 | { |
314 | currentItem = parent->firstChild(); | 314 | currentItem = parent->firstChild(); |
315 | currentHome = parent->text(BACKUP_LOCATION); | 315 | currentHome = parent->text(BACKUP_LOCATION); |
316 | } | 316 | } |
317 | 317 | ||
318 | uint count = 0; | 318 | uint count = 0; |
319 | while( currentItem != 0 ) | 319 | while( currentItem != 0 ) |
320 | { | 320 | { |
321 | if(currentItem->text(HEADER_BACKUP) == "B" ) | 321 | if(currentItem->text(HEADER_BACKUP) == "B" ) |
322 | { | 322 | { |
323 | if(currentItem->childCount() == 0 ) | 323 | if(currentItem->childCount() == 0 ) |
324 | { | 324 | { |
325 | if(parent == NULL) | 325 | if(parent == NULL) |
326 | backupFiles += currentItem->text(BACKUP_LOCATION); | 326 | backupFiles += currentItem->text(BACKUP_LOCATION); |
327 | else | 327 | else |
328 | backupFiles += currentHome + currentItem->text(HEADER_NAME); | 328 | backupFiles += currentHome + currentItem->text(HEADER_NAME); |
329 | backupFiles += " "; | 329 | backupFiles += " "; |
330 | count++; | 330 | count++; |
331 | } | 331 | } |
332 | else | 332 | else |
333 | { | 333 | { |
334 | count += getBackupFiles(backupFiles, currentItem); | 334 | count += getBackupFiles(backupFiles, currentItem); |
335 | } | 335 | } |
336 | } | 336 | } |
337 | currentItem = currentItem->nextSibling(); | 337 | currentItem = currentItem->nextSibling(); |
338 | } | 338 | } |
339 | return count; | 339 | return count; |
340 | } | 340 | } |
341 | 341 | ||
342 | void BackupAndRestore::sourceDirChanged(int selection) | 342 | void BackupAndRestore::sourceDirChanged(int selection) |
343 | { | 343 | { |
344 | restoreList->clear(); | 344 | restoreList->clear(); |
345 | rescanFolder(backupLocations[restoreSource->text(selection)]); | 345 | rescanFolder(backupLocations[restoreSource->text(selection)]); |
346 | } | 346 | } |
347 | 347 | ||
348 | void BackupAndRestore::fileListUpdate() | 348 | void BackupAndRestore::fileListUpdate() |
349 | { | 349 | { |
350 | qWarning("void BackupAndRestore::fileListUpdate()"); | 350 | qWarning("void BackupAndRestore::fileListUpdate()"); |
351 | restoreList->clear(); | 351 | restoreList->clear(); |
352 | rescanFolder( backupLocations[restoreSource->currentText()] ); | 352 | rescanFolder( backupLocations[restoreSource->currentText()] ); |
353 | } | 353 | } |
354 | 354 | ||
355 | /** | 355 | /** |
356 | * Scans directory for any backup files. Will recursivly go down, | 356 | * Scans directory for any backup files. Will recursivly go down, |
357 | * but will not follow symlinks. | 357 | * but will not follow symlinks. |
358 | * @param directory - the directory to look in. | 358 | * @param directory - the directory to look in. |
359 | */ | 359 | */ |
360 | void BackupAndRestore::rescanFolder(QString directory) | 360 | void BackupAndRestore::rescanFolder(QString directory) |
361 | { | 361 | { |
362 | //qDebug(QString("rescanFolder: ") + directory.latin1()); | 362 | //qDebug(QString("rescanFolder: ") + directory.latin1()); |
363 | QDir d(directory); | 363 | QDir d(directory); |
364 | if(!d.exists()) | 364 | if(!d.exists()) |
365 | return; | 365 | return; |
366 | 366 | ||
367 | d.setFilter( QDir::Files | QDir::Hidden | QDir::Dirs); | 367 | d.setFilter( QDir::Files | QDir::Hidden | QDir::Dirs); |
368 | const QFileInfoList *list = d.entryInfoList(); | 368 | const QFileInfoList *list = d.entryInfoList(); |
369 | QFileInfoListIterator it( *list ); | 369 | QFileInfoListIterator it( *list ); |
370 | QFileInfo *file; | 370 | QFileInfo *file; |
371 | while ( (file=it.current()) ) | 371 | while ( (file=it.current()) ) |
372 | { // for each file... | 372 | { // for each file... |
373 | // If it is a dir and not .. or . then add it as a tab and go down. | 373 | // If it is a dir and not .. or . then add it as a tab and go down. |
374 | if(file->isDir()) | 374 | if(file->isDir()) |
375 | { | 375 | { |
376 | if(file->fileName() != ".." && file->fileName() != ".") | 376 | if(file->fileName() != ".." && file->fileName() != ".") |
377 | { | 377 | { |
378 | rescanFolder(directory + "/" + file->fileName()); | 378 | rescanFolder(directory + "/" + file->fileName()); |
379 | } | 379 | } |
380 | } | 380 | } |
381 | else | 381 | else |
382 | { | 382 | { |
383 | // If it is a backup file add to list. | 383 | // If it is a backup file add to list. |
384 | if(file->fileName().contains(EXTENSION)) | 384 | if(file->fileName().contains(EXTENSION)) |
385 | (void)new QListViewItem(restoreList, file->fileName()); | 385 | (void)new QListViewItem(restoreList, file->fileName()); |
386 | } | 386 | } |
387 | ++it; | 387 | ++it; |
388 | } | 388 | } |
389 | } | 389 | } |
390 | 390 | ||
391 | /** | 391 | /** |
392 | * Restore a backup file. | 392 | * Restore a backup file. |
393 | * Report errors or success | 393 | * Report errors or success |
394 | */ | 394 | */ |
395 | void BackupAndRestore::restore() | 395 | void BackupAndRestore::restore() |
396 | { | 396 | { |
397 | QListViewItem *restoreItem = restoreList->currentItem(); | 397 | QListViewItem *restoreItem = restoreList->currentItem(); |
398 | if(!restoreItem) | 398 | if(!restoreItem) |
399 | { | 399 | { |
400 | QMessageBox::critical(this, tr( "Message" ), | 400 | QMessageBox::critical(this, tr( "Message" ), |
401 | tr( "Please select something to restore." ),QString( tr( "Ok") ) ); | 401 | tr( "Please select something to restore." ),QString( tr( "Ok") ) ); |
402 | return; | 402 | return; |
403 | } | 403 | } |
404 | setCaption(tr("Backup and Restore... working...")); | 404 | setCaption(tr("Backup and Restore... working...")); |
405 | 405 | ||
406 | QString restoreFile = backupLocations[restoreSource->currentText()]; | 406 | QString restoreFile = backupLocations[restoreSource->currentText()]; |
407 | 407 | ||
408 | restoreFile += "/" + restoreItem->text(0); | 408 | restoreFile += "/" + restoreItem->text(0); |
409 | 409 | ||
410 | qDebug( restoreFile ); | 410 | qDebug( restoreFile ); |
411 | 411 | ||
412 | QString commandLine = QString( "tar -C %1 -zxf %2 2> %3" ).arg( QDir::homeDirPath() ) | 412 | QString commandLine = QString( "tar -C %1 -zxf %2 2> %3" ).arg( QDir::homeDirPath() ) |
413 | .arg( restoreFile.latin1() ) | 413 | .arg( restoreFile.latin1() ) |
414 | .arg( tempFileName.latin1() ); | 414 | .arg( tempFileName.latin1() ); |
415 | 415 | ||
416 | qDebug( commandLine ); | 416 | qDebug( commandLine ); |
417 | 417 | ||
418 | int r = system( commandLine ); | 418 | int r = system( commandLine ); |
419 | 419 | ||
420 | if(r != 0) | 420 | if(r != 0) |
421 | { | 421 | { |
422 | QString errorMsg= tr( "Error from System:\n" ) + (QString)strerror( errno ); | 422 | QString errorMsg= tr( "Error from System:\n" ) + (QString)strerror( errno ); |
423 | switch( QMessageBox::critical(this, tr( "Message" ), tr( "Restore Failed." ) + "\n" | 423 | switch( QMessageBox::critical(this, tr( "Message" ), tr( "Restore Failed." ) + "\n" |
424 | + errorMsg, QString( tr( "Ok") ), QString( tr( "Details" ) ) ) ) | 424 | + errorMsg, QString( tr( "Ok") ), QString( tr( "Details" ) ) ) ) |
425 | { | 425 | { |
426 | case 1: | 426 | case 1: |
427 | qWarning("Details pressed !"); | 427 | qWarning("Details pressed !"); |
428 | ErrorDialog* pErrDialog = new ErrorDialog( this, NULL, true ); | 428 | ErrorDialog* pErrDialog = new ErrorDialog( this, NULL, true ); |
429 | QFile errorFile( tempFileName ); | 429 | QFile errorFile( tempFileName ); |
430 | if ( errorFile.open(IO_ReadOnly) ) | 430 | if ( errorFile.open(IO_ReadOnly) ) |
431 | { | 431 | { |
432 | QTextStream t( &errorFile ); | 432 | QTextStream t( &errorFile ); |
433 | QString s; | 433 | QString s; |
434 | while ( !t.eof() ) | 434 | while ( !t.eof() ) |
435 | { // until end of file... | 435 | { // until end of file... |
436 | s += t.readLine(); // line of text excluding '\n' | 436 | s += t.readLine(); // line of text excluding '\n' |
437 | } | 437 | } |
438 | errorFile.close(); | 438 | errorFile.close(); |
439 | 439 | ||
440 | pErrDialog->m_textarea->setText( s ); | 440 | pErrDialog->m_textarea->setText( s ); |
441 | } | 441 | } |
442 | else | 442 | else |
443 | { | 443 | { |
444 | pErrDialog->m_textarea->setText( tr( "Unable to open File: %1" ).arg( "/tmp/backup.er" ) ); | 444 | pErrDialog->m_textarea->setText( tr( "Unable to open File: %1" ).arg( "/tmp/backup.er" ) ); |
445 | } | 445 | } |
446 | pErrDialog->showMaximized(); | 446 | pErrDialog->showMaximized(); |
447 | pErrDialog->exec(); | 447 | pErrDialog->exec(); |
448 | delete pErrDialog; | 448 | delete pErrDialog; |
449 | 449 | ||
450 | setCaption(tr("Backup and Restore.. Failed !!")); | 450 | setCaption(tr("Backup and Restore.. Failed !!")); |
451 | return; | 451 | return; |
452 | 452 | ||
453 | break; | 453 | break; |
454 | 454 | ||
455 | } | 455 | } |
456 | } | 456 | } |
457 | else | 457 | else |
458 | { | 458 | { |
459 | QMessageBox::information(this, tr( "Message" ), tr( "Restore Successfull." ), QString( tr( "Ok") ) ); | 459 | QMessageBox::information(this, tr( "Message" ), tr( "Restore Successful." ), QString( tr( "Ok") ) ); |
460 | } | 460 | } |
461 | 461 | ||
462 | //write restore-location | 462 | //write restore-location |
463 | Config config( "BackupAndRestore" ); | 463 | Config config( "BackupAndRestore" ); |
464 | config.setGroup( "LastLocation" ); | 464 | config.setGroup( "LastLocation" ); |
465 | config.writeEntry( "LastRestoreLocation", restoreSource->currentText() ); | 465 | config.writeEntry( "LastRestoreLocation", restoreSource->currentText() ); |
466 | 466 | ||
467 | setCaption(tr("Backup and Restore")); | 467 | setCaption(tr("Backup and Restore")); |
468 | } | 468 | } |
469 | 469 | ||
470 | // backuprestore.cpp | 470 | // backuprestore.cpp |
471 | 471 | ||
diff --git a/noncore/settings/networksettings/interfaces/interface.cpp b/noncore/settings/networksettings/interfaces/interface.cpp index 69b55d1..b00b899 100644 --- a/noncore/settings/networksettings/interfaces/interface.cpp +++ b/noncore/settings/networksettings/interfaces/interface.cpp | |||
@@ -1,302 +1,302 @@ | |||
1 | /** | 1 | /** |
2 | * $Author$ | 2 | * $Author$ |
3 | * $Date$ | 3 | * $Date$ |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "interface.h" | 6 | #include "interface.h" |
7 | #include <qdatetime.h> | 7 | #include <qdatetime.h> |
8 | #include <qfile.h> | 8 | #include <qfile.h> |
9 | #include <qdir.h> | 9 | #include <qdir.h> |
10 | #include <qfileinfo.h> | 10 | #include <qfileinfo.h> |
11 | #include <qtextstream.h> | 11 | #include <qtextstream.h> |
12 | 12 | ||
13 | #define IFCONFIG "/sbin/ifconfig" | 13 | #define IFCONFIG "/sbin/ifconfig" |
14 | #define DHCP_INFO_DIR "/etc/dhcpc" | 14 | #define DHCP_INFO_DIR "/etc/dhcpc" |
15 | 15 | ||
16 | #include <stdio.h> | 16 | #include <stdio.h> |
17 | #include <stdlib.h> | 17 | #include <stdlib.h> |
18 | 18 | ||
19 | Interface::Interface(QObject * parent, const char * name, bool newSatus): QObject(parent, name), hardwareName("Unknown"), moduleOwner(NULL), status(newSatus), attached(false), dhcp(false), macAddress(""), ip("0.0.0.0"), broadcast(""), subnetMask("0.0.0.0"){ | 19 | Interface::Interface(QObject * parent, const char * name, bool newSatus): QObject(parent, name), hardwareName("Unknown"), moduleOwner(NULL), status(newSatus), attached(false), dhcp(false), macAddress(""), ip("0.0.0.0"), broadcast(""), subnetMask("0.0.0.0"){ |
20 | refresh(); | 20 | refresh(); |
21 | } | 21 | } |
22 | 22 | ||
23 | /** | 23 | /** |
24 | * Set status | 24 | * Set status |
25 | * @param newStatus - the new status | 25 | * @param newStatus - the new status |
26 | * emit updateInterface | 26 | * emit updateInterface |
27 | */ | 27 | */ |
28 | void Interface::setStatus(bool newStatus){ | 28 | void Interface::setStatus(bool newStatus){ |
29 | if(status != newStatus){ | 29 | if(status != newStatus){ |
30 | status = newStatus; | 30 | status = newStatus; |
31 | refresh(); | 31 | refresh(); |
32 | } | 32 | } |
33 | }; | 33 | }; |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * Set if attached or not (802.11 card pulled out for example) | 36 | * Set if attached or not (802.11 card pulled out for example) |
37 | * @param isAttached - if attached | 37 | * @param isAttached - if attached |
38 | * emit updateInterface | 38 | * emit updateInterface |
39 | */ | 39 | */ |
40 | void Interface::setAttached(bool isAttached){ | 40 | void Interface::setAttached(bool isAttached){ |
41 | attached = isAttached; | 41 | attached = isAttached; |
42 | emit(updateInterface(this)); | 42 | emit(updateInterface(this)); |
43 | }; | 43 | }; |
44 | 44 | ||
45 | /** | 45 | /** |
46 | * Set Hardware name | 46 | * Set Hardware name |
47 | * @param name - the new name | 47 | * @param name - the new name |
48 | * emit updateInterface | 48 | * emit updateInterface |
49 | */ | 49 | */ |
50 | void Interface::setHardwareName(const QString &name){ | 50 | void Interface::setHardwareName(const QString &name){ |
51 | hardwareName = name; | 51 | hardwareName = name; |
52 | emit(updateInterface(this)); | 52 | emit(updateInterface(this)); |
53 | }; | 53 | }; |
54 | 54 | ||
55 | /** | 55 | /** |
56 | * Set Module owner | 56 | * Set Module owner |
57 | * @param owner - the new owner | 57 | * @param owner - the new owner |
58 | * emit updateInterface | 58 | * emit updateInterface |
59 | */ | 59 | */ |
60 | void Interface::setModuleOwner(Module *owner){ | 60 | void Interface::setModuleOwner(Module *owner){ |
61 | moduleOwner = owner; | 61 | moduleOwner = owner; |
62 | emit(updateInterface(this)); | 62 | emit(updateInterface(this)); |
63 | }; | 63 | }; |
64 | 64 | ||
65 | 65 | ||
66 | /** | 66 | /** |
67 | * Try to start the interface. | 67 | * Try to start the interface. |
68 | */ | 68 | */ |
69 | void Interface::start(){ | 69 | void Interface::start(){ |
70 | // check to see if we are already running. | 70 | // check to see if we are already running. |
71 | if(true == status){ | 71 | if(true == status){ |
72 | emit (updateMessage("Unable to start interface,\n already started")); | 72 | emit (updateMessage("Unable to start interface,\n already started")); |
73 | return; | 73 | return; |
74 | } | 74 | } |
75 | 75 | ||
76 | int ret = system(QString("%1 %2 up").arg(IFCONFIG).arg(this->name()).latin1()); | 76 | int ret = system(QString("%1 %2 up").arg(IFCONFIG).arg(this->name()).latin1()); |
77 | // See if it was successfull... | 77 | // See if it was successful... |
78 | if(ret != 0){ | 78 | if(ret != 0){ |
79 | emit (updateMessage("Starting interface failed")); | 79 | emit (updateMessage("Starting interface failed")); |
80 | return; | 80 | return; |
81 | } | 81 | } |
82 | 82 | ||
83 | status = true; | 83 | status = true; |
84 | refresh(); | 84 | refresh(); |
85 | emit (updateMessage("Start successfull")); | 85 | emit (updateMessage("Start successful")); |
86 | } | 86 | } |
87 | 87 | ||
88 | /** | 88 | /** |
89 | * Try to stop the interface. | 89 | * Try to stop the interface. |
90 | */ | 90 | */ |
91 | void Interface::stop(){ | 91 | void Interface::stop(){ |
92 | // check to see if we are already stopped. | 92 | // check to see if we are already stopped. |
93 | if(false == status){ | 93 | if(false == status){ |
94 | emit (updateMessage("Unable to stop interface,\n already stopped")); | 94 | emit (updateMessage("Unable to stop interface,\n already stopped")); |
95 | return; | 95 | return; |
96 | } | 96 | } |
97 | 97 | ||
98 | int ret = system(QString("%1 %2 down").arg(IFCONFIG).arg(this->name()).latin1()); | 98 | int ret = system(QString("%1 %2 down").arg(IFCONFIG).arg(this->name()).latin1()); |
99 | if(ret != 0){ | 99 | if(ret != 0){ |
100 | emit (updateMessage("Stopping interface failed")); | 100 | emit (updateMessage("Stopping interface failed")); |
101 | return; | 101 | return; |
102 | } | 102 | } |
103 | 103 | ||
104 | status = false; | 104 | status = false; |
105 | refresh(); | 105 | refresh(); |
106 | emit (updateMessage("Stop successfull")); | 106 | emit (updateMessage("Stop successful")); |
107 | } | 107 | } |
108 | 108 | ||
109 | /** | 109 | /** |
110 | * Try to restart the interface. | 110 | * Try to restart the interface. |
111 | */ | 111 | */ |
112 | void Interface::restart(){ | 112 | void Interface::restart(){ |
113 | stop(); | 113 | stop(); |
114 | start(); | 114 | start(); |
115 | } | 115 | } |
116 | 116 | ||
117 | /** | 117 | /** |
118 | * Try to refresh the information about the interface. | 118 | * Try to refresh the information about the interface. |
119 | * First call ifconfig, then check the dhcp-info file | 119 | * First call ifconfig, then check the dhcp-info file |
120 | * @return bool true if successfull. | 120 | * @return bool true if successful. |
121 | */ | 121 | */ |
122 | bool Interface::refresh(){ | 122 | bool Interface::refresh(){ |
123 | // See if we are up. | 123 | // See if we are up. |
124 | if(status == false){ | 124 | if(status == false){ |
125 | macAddress = ""; | 125 | macAddress = ""; |
126 | ip = "0.0.0.0"; | 126 | ip = "0.0.0.0"; |
127 | subnetMask = "0.0.0.0"; | 127 | subnetMask = "0.0.0.0"; |
128 | broadcast = ""; | 128 | broadcast = ""; |
129 | dhcp = false; | 129 | dhcp = false; |
130 | dhcpServerIp = ""; | 130 | dhcpServerIp = ""; |
131 | leaseObtained = ""; | 131 | leaseObtained = ""; |
132 | leaseExpires = ""; | 132 | leaseExpires = ""; |
133 | emit(updateInterface(this)); | 133 | emit(updateInterface(this)); |
134 | return true; | 134 | return true; |
135 | } | 135 | } |
136 | 136 | ||
137 | QString fileName = QString("/tmp/%1_ifconfig_info").arg(this->name()); | 137 | QString fileName = QString("/tmp/%1_ifconfig_info").arg(this->name()); |
138 | int ret = system(QString("LANG=C %1 %2 > %3").arg(IFCONFIG).arg(this->name()).arg(fileName).latin1()); | 138 | int ret = system(QString("LANG=C %1 %2 > %3").arg(IFCONFIG).arg(this->name()).arg(fileName).latin1()); |
139 | if(ret != 0){ | 139 | if(ret != 0){ |
140 | qDebug(QString("Interface: Ifconfig return value: %1, is not 0").arg(ret).latin1()); | 140 | qDebug(QString("Interface: Ifconfig return value: %1, is not 0").arg(ret).latin1()); |
141 | return false; | 141 | return false; |
142 | } | 142 | } |
143 | 143 | ||
144 | QFile file(fileName); | 144 | QFile file(fileName); |
145 | if (!file.open(IO_ReadOnly)){ | 145 | if (!file.open(IO_ReadOnly)){ |
146 | qDebug(QString("Interface: Can't open file: %1").arg(fileName).latin1()); | 146 | qDebug(QString("Interface: Can't open file: %1").arg(fileName).latin1()); |
147 | return false; | 147 | return false; |
148 | } | 148 | } |
149 | 149 | ||
150 | // Set to the defaults | 150 | // Set to the defaults |
151 | macAddress = ""; | 151 | macAddress = ""; |
152 | ip = "0.0.0.0"; | 152 | ip = "0.0.0.0"; |
153 | subnetMask = "0.0.0.0"; | 153 | subnetMask = "0.0.0.0"; |
154 | broadcast = ""; | 154 | broadcast = ""; |
155 | 155 | ||
156 | QTextStream stream( &file ); | 156 | QTextStream stream( &file ); |
157 | QString line; | 157 | QString line; |
158 | while ( !stream.eof() ) { | 158 | while ( !stream.eof() ) { |
159 | line = stream.readLine(); | 159 | line = stream.readLine(); |
160 | if(line.contains("HWaddr")){ | 160 | if(line.contains("HWaddr")){ |
161 | int mac = line.find("HWaddr"); | 161 | int mac = line.find("HWaddr"); |
162 | macAddress = line.mid(mac+7, line.length()); | 162 | macAddress = line.mid(mac+7, line.length()); |
163 | } | 163 | } |
164 | if(line.contains("inet addr")){ | 164 | if(line.contains("inet addr")){ |
165 | int ipl = line.find("inet addr"); | 165 | int ipl = line.find("inet addr"); |
166 | int space = line.find(" ", ipl+10); | 166 | int space = line.find(" ", ipl+10); |
167 | ip = line.mid(ipl+10, space-ipl-10); | 167 | ip = line.mid(ipl+10, space-ipl-10); |
168 | } | 168 | } |
169 | if(line.contains("Mask")){ | 169 | if(line.contains("Mask")){ |
170 | int mask = line.find("Mask"); | 170 | int mask = line.find("Mask"); |
171 | subnetMask = line.mid(mask+5, line.length()); | 171 | subnetMask = line.mid(mask+5, line.length()); |
172 | } | 172 | } |
173 | if(line.contains("Bcast")){ | 173 | if(line.contains("Bcast")){ |
174 | int mask = line.find("Bcast"); | 174 | int mask = line.find("Bcast"); |
175 | int space = line.find(" ", mask+6); | 175 | int space = line.find(" ", mask+6); |
176 | broadcast = line.mid(mask+6, space-mask-6); | 176 | broadcast = line.mid(mask+6, space-mask-6); |
177 | } | 177 | } |
178 | } | 178 | } |
179 | file.close(); | 179 | file.close(); |
180 | QFile::remove(fileName); | 180 | QFile::remove(fileName); |
181 | 181 | ||
182 | // DHCP TESTING | 182 | // DHCP TESTING |
183 | // reset DHCP info | 183 | // reset DHCP info |
184 | dhcpServerIp = ""; | 184 | dhcpServerIp = ""; |
185 | leaseObtained = ""; | 185 | leaseObtained = ""; |
186 | leaseExpires = ""; | 186 | leaseExpires = ""; |
187 | dhcp = false; | 187 | dhcp = false; |
188 | 188 | ||
189 | QString dhcpDirectory(DHCP_INFO_DIR); | 189 | QString dhcpDirectory(DHCP_INFO_DIR); |
190 | QDir d(dhcpDirectory); | 190 | QDir d(dhcpDirectory); |
191 | if(!d.exists(dhcpDirectory)) | 191 | if(!d.exists(dhcpDirectory)) |
192 | dhcpDirectory = "/var/run"; | 192 | dhcpDirectory = "/var/run"; |
193 | 193 | ||
194 | // See if we have | 194 | // See if we have |
195 | QString dhcpFile(QString(dhcpDirectory+"/dhcpcd-%1.info").arg(this->name())); | 195 | QString dhcpFile(QString(dhcpDirectory+"/dhcpcd-%1.info").arg(this->name())); |
196 | // If there is no DHCP information then exit now with no errors. | 196 | // If there is no DHCP information then exit now with no errors. |
197 | if(!QFile::exists(dhcpFile)){ | 197 | if(!QFile::exists(dhcpFile)){ |
198 | emit(updateInterface(this)); | 198 | emit(updateInterface(this)); |
199 | return true; | 199 | return true; |
200 | } | 200 | } |
201 | 201 | ||
202 | file.setName(dhcpFile); | 202 | file.setName(dhcpFile); |
203 | if (!file.open(IO_ReadOnly)){ | 203 | if (!file.open(IO_ReadOnly)){ |
204 | qDebug(QString("Interface: Can't open file: %1").arg(dhcpFile).latin1()); | 204 | qDebug(QString("Interface: Can't open file: %1").arg(dhcpFile).latin1()); |
205 | return false; | 205 | return false; |
206 | } | 206 | } |
207 | 207 | ||
208 | // leaseTime and renewalTime and used if pid and deamon exe can be accessed. | 208 | // leaseTime and renewalTime and used if pid and deamon exe can be accessed. |
209 | int leaseTime = 0; | 209 | int leaseTime = 0; |
210 | int renewalTime = 0; | 210 | int renewalTime = 0; |
211 | 211 | ||
212 | stream.setDevice( &file ); | 212 | stream.setDevice( &file ); |
213 | while ( !stream.eof() ) { | 213 | while ( !stream.eof() ) { |
214 | line = stream.readLine(); | 214 | line = stream.readLine(); |
215 | if(line.contains("DHCPSIADDR=")) | 215 | if(line.contains("DHCPSIADDR=")) |
216 | dhcpServerIp = line.mid(11, line.length()); | 216 | dhcpServerIp = line.mid(11, line.length()); |
217 | if(line.contains("LEASETIME=")) | 217 | if(line.contains("LEASETIME=")) |
218 | leaseTime = line.mid(10, line.length()).toInt(); | 218 | leaseTime = line.mid(10, line.length()).toInt(); |
219 | if(line.contains("RENEWALTIME=")) | 219 | if(line.contains("RENEWALTIME=")) |
220 | renewalTime = line.mid(12, line.length()).toInt(); | 220 | renewalTime = line.mid(12, line.length()).toInt(); |
221 | } | 221 | } |
222 | file.close(); | 222 | file.close(); |
223 | //qDebug(QString("Interface: leaseTime: %1").arg(leaseTime).latin1()); | 223 | //qDebug(QString("Interface: leaseTime: %1").arg(leaseTime).latin1()); |
224 | //qDebug(QString("Interface: renewalTime: %1").arg(renewalTime).latin1()); | 224 | //qDebug(QString("Interface: renewalTime: %1").arg(renewalTime).latin1()); |
225 | 225 | ||
226 | // Get the pid of the deamond | 226 | // Get the pid of the deamond |
227 | dhcpFile = (QString(dhcpDirectory+"/dhcpcd-%1.pid").arg(this->name())); | 227 | dhcpFile = (QString(dhcpDirectory+"/dhcpcd-%1.pid").arg(this->name())); |
228 | file.setName(dhcpFile); | 228 | file.setName(dhcpFile); |
229 | if (!file.open(IO_ReadOnly)){ | 229 | if (!file.open(IO_ReadOnly)){ |
230 | qDebug(QString("Interface: Can't open file: %1").arg(dhcpFile).latin1()); | 230 | qDebug(QString("Interface: Can't open file: %1").arg(dhcpFile).latin1()); |
231 | return false; | 231 | return false; |
232 | } | 232 | } |
233 | 233 | ||
234 | int pid = -1; | 234 | int pid = -1; |
235 | stream.setDevice( &file ); | 235 | stream.setDevice( &file ); |
236 | while ( !stream.eof() ) { | 236 | while ( !stream.eof() ) { |
237 | line = stream.readLine(); | 237 | line = stream.readLine(); |
238 | pid = line.toInt(); | 238 | pid = line.toInt(); |
239 | } | 239 | } |
240 | file.close(); | 240 | file.close(); |
241 | 241 | ||
242 | if( pid == -1){ | 242 | if( pid == -1){ |
243 | qDebug("Interface: Could not get pid of dhcpc deamon."); | 243 | qDebug("Interface: Could not get pid of dhcpc deamon."); |
244 | return false; | 244 | return false; |
245 | } | 245 | } |
246 | 246 | ||
247 | // Get the start running time of the deamon | 247 | // Get the start running time of the deamon |
248 | fileName = (QString("/proc/%1/stat").arg(pid)); | 248 | fileName = (QString("/proc/%1/stat").arg(pid)); |
249 | file.setName(fileName); | 249 | file.setName(fileName); |
250 | stream.setDevice( &file ); | 250 | stream.setDevice( &file ); |
251 | if (!file.open(IO_ReadOnly)){ | 251 | if (!file.open(IO_ReadOnly)){ |
252 | qDebug(QString("Interface: Can't open file: %1").arg(fileName).latin1()); | 252 | qDebug(QString("Interface: Can't open file: %1").arg(fileName).latin1()); |
253 | return false; | 253 | return false; |
254 | } | 254 | } |
255 | while ( !stream.eof() ) { | 255 | while ( !stream.eof() ) { |
256 | line = stream.readLine(); | 256 | line = stream.readLine(); |
257 | } | 257 | } |
258 | file.close(); | 258 | file.close(); |
259 | long time = 0; | 259 | long time = 0; |
260 | // Grab the start time | 260 | // Grab the start time |
261 | // pid com state ppid pgrp session tty_nr tpgid flags | 261 | // pid com state ppid pgrp session tty_nr tpgid flags |
262 | sscanf(line.latin1(), "%*d %*s %*c %*d %*d %*d %*d %*d %*u " | 262 | sscanf(line.latin1(), "%*d %*s %*c %*d %*d %*d %*d %*d %*u " |
263 | // minflt cminflt majflt cmajflt utime stime cutime cstime priority | 263 | // minflt cminflt majflt cmajflt utime stime cutime cstime priority |
264 | "%*u %*u %*u %*u %*u %*u %*d %*d %*d " | 264 | "%*u %*u %*u %*u %*u %*u %*d %*d %*d " |
265 | // nice 0 itrealvalue starttime | 265 | // nice 0 itrealvalue starttime |
266 | "%*d %*d %*d %lu", (long*) &time); | 266 | "%*d %*d %*d %lu", (long*) &time); |
267 | time = time/100; | 267 | time = time/100; |
268 | 268 | ||
269 | QDateTime datetime(QDateTime::currentDateTime()); | 269 | QDateTime datetime(QDateTime::currentDateTime()); |
270 | 270 | ||
271 | // Get the uptime of the computer. | 271 | // Get the uptime of the computer. |
272 | QFile f("/proc/uptime"); | 272 | QFile f("/proc/uptime"); |
273 | if ( f.open(IO_ReadOnly) ) { // file opened successfully | 273 | if ( f.open(IO_ReadOnly) ) { // file opened successfully |
274 | QTextStream t( &f ); // use a text stream | 274 | QTextStream t( &f ); // use a text stream |
275 | int sec = 0; | 275 | int sec = 0; |
276 | t >> sec; | 276 | t >> sec; |
277 | datetime = datetime.addSecs((-1*sec)); | 277 | datetime = datetime.addSecs((-1*sec)); |
278 | f.close(); | 278 | f.close(); |
279 | } | 279 | } |
280 | else{ | 280 | else{ |
281 | qDebug("Interface: Can't open /proc/uptime to retrive uptime."); | 281 | qDebug("Interface: Can't open /proc/uptime to retrive uptime."); |
282 | return false; | 282 | return false; |
283 | } | 283 | } |
284 | 284 | ||
285 | datetime = datetime.addSecs(time); | 285 | datetime = datetime.addSecs(time); |
286 | //qDebug(QString("Interface: %1 %2").arg(datetime.toString()).arg(pid).latin1()); | 286 | //qDebug(QString("Interface: %1 %2").arg(datetime.toString()).arg(pid).latin1()); |
287 | 287 | ||
288 | // Calculate the start and renew times | 288 | // Calculate the start and renew times |
289 | leaseObtained= datetime.toString(); | 289 | leaseObtained= datetime.toString(); |
290 | 290 | ||
291 | // Calculate the start and renew times | 291 | // Calculate the start and renew times |
292 | datetime = datetime.addSecs(leaseTime); | 292 | datetime = datetime.addSecs(leaseTime); |
293 | leaseExpires = datetime.toString(); | 293 | leaseExpires = datetime.toString(); |
294 | 294 | ||
295 | dhcp = true; | 295 | dhcp = true; |
296 | 296 | ||
297 | emit(updateInterface(this)); | 297 | emit(updateInterface(this)); |
298 | return true; | 298 | return true; |
299 | } | 299 | } |
300 | 300 | ||
301 | // interface.cpp | 301 | // interface.cpp |
302 | 302 | ||
diff --git a/noncore/settings/networksettings/interfaces/interfaces.cpp b/noncore/settings/networksettings/interfaces/interfaces.cpp index 436e449..6b161ae 100644 --- a/noncore/settings/networksettings/interfaces/interfaces.cpp +++ b/noncore/settings/networksettings/interfaces/interfaces.cpp | |||
@@ -1,712 +1,712 @@ | |||
1 | #include "interfaces.h" | 1 | #include "interfaces.h" |
2 | 2 | ||
3 | #include <qcheckbox.h> | 3 | #include <qcheckbox.h> |
4 | #include <qfile.h> | 4 | #include <qfile.h> |
5 | #include <qtextstream.h> | 5 | #include <qtextstream.h> |
6 | #include <qregexp.h> | 6 | #include <qregexp.h> |
7 | 7 | ||
8 | // The three stanza's | 8 | // The three stanza's |
9 | #define AUTO "auto" | 9 | #define AUTO "auto" |
10 | #define IFACE "iface" | 10 | #define IFACE "iface" |
11 | #define MAPPING "mapping" | 11 | #define MAPPING "mapping" |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * Constructor. Reads in the interfaces file and then split the file up by | 14 | * Constructor. Reads in the interfaces file and then split the file up by |
15 | * the \n for interfaces variable. | 15 | * the \n for interfaces variable. |
16 | * @param useInterfacesFile if an interface file other then the default is | 16 | * @param useInterfacesFile if an interface file other then the default is |
17 | * desired to be used it should be passed in. | 17 | * desired to be used it should be passed in. |
18 | */ | 18 | */ |
19 | Interfaces::Interfaces(QString useInterfacesFile){ | 19 | Interfaces::Interfaces(QString useInterfacesFile){ |
20 | acceptedFamily.append(INTERFACES_FAMILY_INET); | 20 | acceptedFamily.append(INTERFACES_FAMILY_INET); |
21 | acceptedFamily.append(INTERFACES_FAMILY_IPX); | 21 | acceptedFamily.append(INTERFACES_FAMILY_IPX); |
22 | acceptedFamily.append(INTERFACES_FAMILY_INET6); | 22 | acceptedFamily.append(INTERFACES_FAMILY_INET6); |
23 | 23 | ||
24 | interfacesFile = useInterfacesFile; | 24 | interfacesFile = useInterfacesFile; |
25 | QFile file(interfacesFile); | 25 | QFile file(interfacesFile); |
26 | if (!file.open(IO_ReadOnly)){ | 26 | if (!file.open(IO_ReadOnly)){ |
27 | qDebug("Interfaces: Can't open file: %s for reading.", interfacesFile.latin1() ); | 27 | qDebug("Interfaces: Can't open file: %s for reading.", interfacesFile.latin1() ); |
28 | currentIface = interfaces.end(); | 28 | currentIface = interfaces.end(); |
29 | currentMapping = interfaces.end(); | 29 | currentMapping = interfaces.end(); |
30 | return; | 30 | return; |
31 | } | 31 | } |
32 | QTextStream stream( &file ); | 32 | QTextStream stream( &file ); |
33 | QString line; | 33 | QString line; |
34 | while ( !stream.eof() ) { | 34 | while ( !stream.eof() ) { |
35 | line += stream.readLine(); | 35 | line += stream.readLine(); |
36 | line += "\n"; | 36 | line += "\n"; |
37 | } | 37 | } |
38 | file.close(); | 38 | file.close(); |
39 | interfaces = QStringList::split("\n", line, true); | 39 | interfaces = QStringList::split("\n", line, true); |
40 | 40 | ||
41 | currentIface = interfaces.end(); | 41 | currentIface = interfaces.end(); |
42 | currentMapping = interfaces.end(); | 42 | currentMapping = interfaces.end(); |
43 | } | 43 | } |
44 | 44 | ||
45 | 45 | ||
46 | /** | 46 | /** |
47 | * Get a list of all interfaces in the interface file. Usefull for | 47 | * Get a list of all interfaces in the interface file. Useful for |
48 | * hardware that is not currently connected such as an 802.11b card | 48 | * hardware that is not currently connected such as an 802.11b card |
49 | * not plugged in, but configured for when it is plugged in. | 49 | * not plugged in, but configured for when it is plugged in. |
50 | * @return Return string list of interfaces. | 50 | * @return Return string list of interfaces. |
51 | **/ | 51 | **/ |
52 | QStringList Interfaces::getInterfaceList(){ | 52 | QStringList Interfaces::getInterfaceList(){ |
53 | QStringList list; | 53 | QStringList list; |
54 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { | 54 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { |
55 | QString line = (*it).simplifyWhiteSpace(); | 55 | QString line = (*it).simplifyWhiteSpace(); |
56 | if(line.contains(IFACE) && line.at(0) != '#'){ | 56 | if(line.contains(IFACE) && line.at(0) != '#'){ |
57 | line = line.mid(QString(IFACE).length() +1, line.length()); | 57 | line = line.mid(QString(IFACE).length() +1, line.length()); |
58 | line = line.simplifyWhiteSpace(); | 58 | line = line.simplifyWhiteSpace(); |
59 | int findSpace = line.find(" "); | 59 | int findSpace = line.find(" "); |
60 | if( findSpace >= 0){ | 60 | if( findSpace >= 0){ |
61 | line = line.mid(0, findSpace); | 61 | line = line.mid(0, findSpace); |
62 | list.append(line); | 62 | list.append(line); |
63 | } | 63 | } |
64 | } | 64 | } |
65 | } | 65 | } |
66 | return list; | 66 | return list; |
67 | } | 67 | } |
68 | 68 | ||
69 | /** | 69 | /** |
70 | * Find out if interface is in an "auto" group or not. | 70 | * Find out if interface is in an "auto" group or not. |
71 | * Report any duplicates such as eth0 being in two differnt auto's | 71 | * Report any duplicates such as eth0 being in two differnt auto's |
72 | * @param interface interface to check to see if it is on or not. | 72 | * @param interface interface to check to see if it is on or not. |
73 | * @return true is interface is in auto | 73 | * @return true is interface is in auto |
74 | */ | 74 | */ |
75 | bool Interfaces::isAuto(const QString &interface) const { | 75 | bool Interfaces::isAuto(const QString &interface) const { |
76 | QStringList autoLines = interfaces.grep(QRegExp(AUTO)); | 76 | QStringList autoLines = interfaces.grep(QRegExp(AUTO)); |
77 | QStringList awi = autoLines.grep(QRegExp(interface)); | 77 | QStringList awi = autoLines.grep(QRegExp(interface)); |
78 | if(awi.count() > 1) | 78 | if(awi.count() > 1) |
79 | qDebug(QString("Interfaces: Found more then auto group with interface: %1.").arg(interface).latin1()); | 79 | qDebug(QString("Interfaces: Found more then auto group with interface: %1.").arg(interface).latin1()); |
80 | return awi.count() > 0; | 80 | return awi.count() > 0; |
81 | } | 81 | } |
82 | 82 | ||
83 | /** | 83 | /** |
84 | * Attempt to set the auto option for interface to setAuto. | 84 | * Attempt to set the auto option for interface to setAuto. |
85 | * @param interface the interface to set | 85 | * @param interface the interface to set |
86 | * @param setAuto the value to set interface to. | 86 | * @param setAuto the value to set interface to. |
87 | * @return false if already set to setAuto. | 87 | * @return false if already set to setAuto. |
88 | * */ | 88 | * */ |
89 | bool Interfaces::setAuto(const QString &interface, bool setAuto){ | 89 | bool Interfaces::setAuto(const QString &interface, bool setAuto){ |
90 | // Don't need to set it if it is already set. | 90 | // Don't need to set it if it is already set. |
91 | if(isAuto(interface) == setAuto) | 91 | if(isAuto(interface) == setAuto) |
92 | return false; | 92 | return false; |
93 | 93 | ||
94 | bool changed = false; | 94 | bool changed = false; |
95 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { | 95 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { |
96 | if((*it).contains(AUTO)){ | 96 | if((*it).contains(AUTO)){ |
97 | //We know that they are not in any group so let add to this auto. | 97 | //We know that they are not in any group so let add to this auto. |
98 | if(setAuto){ | 98 | if(setAuto){ |
99 | (*it) = (*it) += " " + interface; | 99 | (*it) = (*it) += " " + interface; |
100 | // Don't care to have such thins as: auto eth0 lo usb0 | 100 | // Don't care to have such thins as: auto eth0 lo usb0 |
101 | (*it) = (*it).simplifyWhiteSpace(); | 101 | (*it) = (*it).simplifyWhiteSpace(); |
102 | changed = true; | 102 | changed = true; |
103 | break; | 103 | break; |
104 | } | 104 | } |
105 | // else see if we need to remove from this one | 105 | // else see if we need to remove from this one |
106 | else{ | 106 | else{ |
107 | if((*it).contains(interface)){ | 107 | if((*it).contains(interface)){ |
108 | (*it) = (*it).replace(QRegExp(interface), ""); | 108 | (*it) = (*it).replace(QRegExp(interface), ""); |
109 | // if AUTO is the only thing left clear the line | 109 | // if AUTO is the only thing left clear the line |
110 | if(((*it).simplifyWhiteSpace()).replace(QRegExp(" "),"") == AUTO) | 110 | if(((*it).simplifyWhiteSpace()).replace(QRegExp(" "),"") == AUTO) |
111 | (*it) = ""; | 111 | (*it) = ""; |
112 | changed = true; | 112 | changed = true; |
113 | // Don't break because we want to make sure we remove all cases. | 113 | // Don't break because we want to make sure we remove all cases. |
114 | } | 114 | } |
115 | } | 115 | } |
116 | } | 116 | } |
117 | } | 117 | } |
118 | // In the case where there is no AUTO field add one. | 118 | // In the case where there is no AUTO field add one. |
119 | if(!changed && setAuto) | 119 | if(!changed && setAuto) |
120 | interfaces.append(QString(AUTO" %1").arg(interface)); | 120 | interfaces.append(QString(AUTO" %1").arg(interface)); |
121 | return true; | 121 | return true; |
122 | } | 122 | } |
123 | 123 | ||
124 | /** | 124 | /** |
125 | * Set the current interface to interface. This needs to be done before you | 125 | * Set the current interface to interface. This needs to be done before you |
126 | * can call getFamily(), getMethod, and get/setOption(). | 126 | * can call getFamily(), getMethod, and get/setOption(). |
127 | * @param interface the name of the interface to set. All whitespace is | 127 | * @param interface the name of the interface to set. All whitespace is |
128 | * removed from the interface name. | 128 | * removed from the interface name. |
129 | * @return bool true if it is successfull. | 129 | * @return bool true if it is successful. |
130 | */ | 130 | */ |
131 | bool Interfaces::setInterface(QString interface){ | 131 | bool Interfaces::setInterface(QString interface){ |
132 | interface = interface.simplifyWhiteSpace(); | 132 | interface = interface.simplifyWhiteSpace(); |
133 | interface = interface.replace(QRegExp(" "), ""); | 133 | interface = interface.replace(QRegExp(" "), ""); |
134 | return setStanza(IFACE, interface, currentIface); | 134 | return setStanza(IFACE, interface, currentIface); |
135 | } | 135 | } |
136 | 136 | ||
137 | /** | 137 | /** |
138 | * A quick helper funtion to see if the current interface is set. | 138 | * A quick helper funtion to see if the current interface is set. |
139 | * @return bool true if set, false otherwise. | 139 | * @return bool true if set, false otherwise. |
140 | */ | 140 | */ |
141 | bool Interfaces::isInterfaceSet() const { | 141 | bool Interfaces::isInterfaceSet() const { |
142 | return (interfaces.end() != currentIface); | 142 | return (interfaces.end() != currentIface); |
143 | } | 143 | } |
144 | 144 | ||
145 | /** | 145 | /** |
146 | * Add a new interface of with the settings - family and method | 146 | * Add a new interface of with the settings - family and method |
147 | * @param interface the name of the interface to set. All whitespace is | 147 | * @param interface the name of the interface to set. All whitespace is |
148 | * removed from the interface name. | 148 | * removed from the interface name. |
149 | * @param family the family of this interface inet or inet, ipx or inet6 | 149 | * @param family the family of this interface inet or inet, ipx or inet6 |
150 | * Must of one of the families defined in interfaces.h | 150 | * Must of one of the families defined in interfaces.h |
151 | * @param method for the family. see interfaces man page for family methods. | 151 | * @param method for the family. see interfaces man page for family methods. |
152 | * @return true if successfull. | 152 | * @return true if successful. |
153 | */ | 153 | */ |
154 | bool Interfaces::addInterface(const QString &interface, const QString &family, const QString &method){ | 154 | bool Interfaces::addInterface(const QString &interface, const QString &family, const QString &method){ |
155 | qDebug("Interfaces::addInterface(%s)",interface.latin1()); | 155 | qDebug("Interfaces::addInterface(%s)",interface.latin1()); |
156 | if(0 == acceptedFamily.contains(family)) | 156 | if(0 == acceptedFamily.contains(family)) |
157 | return false; | 157 | return false; |
158 | QString newInterface = interface.simplifyWhiteSpace(); | 158 | QString newInterface = interface.simplifyWhiteSpace(); |
159 | newInterface = newInterface.replace(QRegExp(" "), ""); | 159 | newInterface = newInterface.replace(QRegExp(" "), ""); |
160 | interfaces.append(""); | 160 | interfaces.append(""); |
161 | interfaces.append(QString(IFACE " %1 %2 %3").arg(newInterface).arg(family).arg(method)); | 161 | interfaces.append(QString(IFACE " %1 %2 %3").arg(newInterface).arg(family).arg(method)); |
162 | return true; | 162 | return true; |
163 | } | 163 | } |
164 | 164 | ||
165 | /** | 165 | /** |
166 | * Copies interface with name interface to name newInterface | 166 | * Copies interface with name interface to name newInterface |
167 | * @param newInterface name of the new interface. | 167 | * @param newInterface name of the new interface. |
168 | * @return bool true if successfull | 168 | * @return bool true if successful |
169 | */ | 169 | */ |
170 | bool Interfaces::copyInterface(const QString &interface, const QString &newInterface){ | 170 | bool Interfaces::copyInterface(const QString &interface, const QString &newInterface){ |
171 | qDebug("copy interface %s to %s", interface.latin1(), newInterface.latin1()); | 171 | qDebug("copy interface %s to %s", interface.latin1(), newInterface.latin1()); |
172 | if(!setInterface(interface)) | 172 | if(!setInterface(interface)) |
173 | return false; | 173 | return false; |
174 | 174 | ||
175 | // Store the old interface and bump past the stanza line. | 175 | // Store the old interface and bump past the stanza line. |
176 | QStringList::Iterator it = currentIface; | 176 | QStringList::Iterator it = currentIface; |
177 | it++; | 177 | it++; |
178 | 178 | ||
179 | // Add the new interface | 179 | // Add the new interface |
180 | bool error; | 180 | bool error; |
181 | addInterface(newInterface, getInterfaceFamily(error), getInterfaceMethod(error)); | 181 | addInterface(newInterface, getInterfaceFamily(error), getInterfaceMethod(error)); |
182 | if(!setInterface(newInterface)) | 182 | if(!setInterface(newInterface)) |
183 | return false; | 183 | return false; |
184 | 184 | ||
185 | QStringList::Iterator newIface = currentIface; | 185 | QStringList::Iterator newIface = currentIface; |
186 | newIface++; | 186 | newIface++; |
187 | 187 | ||
188 | // Copy all of the lines | 188 | // Copy all of the lines |
189 | for ( ; it != interfaces.end(); ++it ){ | 189 | for ( ; it != interfaces.end(); ++it ){ |
190 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO))) | 190 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO))) |
191 | break; | 191 | break; |
192 | newIface = interfaces.insert(newIface, *it); | 192 | newIface = interfaces.insert(newIface, *it); |
193 | } | 193 | } |
194 | 194 | ||
195 | return true; | 195 | return true; |
196 | } | 196 | } |
197 | 197 | ||
198 | /** | 198 | /** |
199 | * Remove the currently selected interface and all of its options. | 199 | * Remove the currently selected interface and all of its options. |
200 | * @return bool if successfull or not. | 200 | * @return bool if successful or not. |
201 | */ | 201 | */ |
202 | bool Interfaces::removeInterface(){ | 202 | bool Interfaces::removeInterface(){ |
203 | return removeStanza(currentIface); | 203 | return removeStanza(currentIface); |
204 | } | 204 | } |
205 | 205 | ||
206 | /** | 206 | /** |
207 | * Gets the hardware name of the interface that is currently selected. | 207 | * Gets the hardware name of the interface that is currently selected. |
208 | * @return QString name of the hardware interface (eth0, usb2, wlan1...). | 208 | * @return QString name of the hardware interface (eth0, usb2, wlan1...). |
209 | * @param error set to true if any error occurs, false otherwise. | 209 | * @param error set to true if any error occurs, false otherwise. |
210 | */ | 210 | */ |
211 | QString Interfaces::getInterfaceName(bool &error){ | 211 | QString Interfaces::getInterfaceName(bool &error){ |
212 | if(currentIface == interfaces.end()){ | 212 | if(currentIface == interfaces.end()){ |
213 | error = true; | 213 | error = true; |
214 | return QString(); | 214 | return QString(); |
215 | } | 215 | } |
216 | QString line = (*currentIface); | 216 | QString line = (*currentIface); |
217 | line = line.mid(QString(IFACE).length() +1, line.length()); | 217 | line = line.mid(QString(IFACE).length() +1, line.length()); |
218 | line = line.simplifyWhiteSpace(); | 218 | line = line.simplifyWhiteSpace(); |
219 | int findSpace = line.find(" "); | 219 | int findSpace = line.find(" "); |
220 | if( findSpace < 0){ | 220 | if( findSpace < 0){ |
221 | error = true; | 221 | error = true; |
222 | return QString(); | 222 | return QString(); |
223 | } | 223 | } |
224 | error = false; | 224 | error = false; |
225 | return line.mid(0, findSpace); | 225 | return line.mid(0, findSpace); |
226 | } | 226 | } |
227 | 227 | ||
228 | /** | 228 | /** |
229 | * Gets the family name of the interface that is currently selected. | 229 | * Gets the family name of the interface that is currently selected. |
230 | * @return QString name of the family (inet, inet6, ipx). | 230 | * @return QString name of the family (inet, inet6, ipx). |
231 | * @param error set to true if any error occurs, false otherwise. | 231 | * @param error set to true if any error occurs, false otherwise. |
232 | */ | 232 | */ |
233 | QString Interfaces::getInterfaceFamily(bool &error){ | 233 | QString Interfaces::getInterfaceFamily(bool &error){ |
234 | QString name = getInterfaceName(error); | 234 | QString name = getInterfaceName(error); |
235 | if(error) | 235 | if(error) |
236 | return QString(); | 236 | return QString(); |
237 | QString line = (*currentIface); | 237 | QString line = (*currentIface); |
238 | line = line.mid(QString(IFACE).length() +1, line.length()); | 238 | line = line.mid(QString(IFACE).length() +1, line.length()); |
239 | line = line.mid(name.length()+1, line.length()); | 239 | line = line.mid(name.length()+1, line.length()); |
240 | line = line.simplifyWhiteSpace(); | 240 | line = line.simplifyWhiteSpace(); |
241 | int findSpace = line.find(" "); | 241 | int findSpace = line.find(" "); |
242 | if( findSpace < 0){ | 242 | if( findSpace < 0){ |
243 | error = true; | 243 | error = true; |
244 | return QString(); | 244 | return QString(); |
245 | } | 245 | } |
246 | error = false; | 246 | error = false; |
247 | return line.mid(0, findSpace); | 247 | return line.mid(0, findSpace); |
248 | } | 248 | } |
249 | 249 | ||
250 | /** | 250 | /** |
251 | * Gets the method of the interface that is currently selected. | 251 | * Gets the method of the interface that is currently selected. |
252 | * @return QString name of the method such as staic or dhcp. | 252 | * @return QString name of the method such as staic or dhcp. |
253 | * See the man page of interfaces for possible methods depending on the family. | 253 | * See the man page of interfaces for possible methods depending on the family. |
254 | * @param error set to true if any error occurs, false otherwise. | 254 | * @param error set to true if any error occurs, false otherwise. |
255 | */ | 255 | */ |
256 | QString Interfaces::getInterfaceMethod(bool &error){ | 256 | QString Interfaces::getInterfaceMethod(bool &error){ |
257 | QString name = getInterfaceName(error); | 257 | QString name = getInterfaceName(error); |
258 | if(error) | 258 | if(error) |
259 | return QString(); | 259 | return QString(); |
260 | QString family = getInterfaceFamily(error); | 260 | QString family = getInterfaceFamily(error); |
261 | if(error) | 261 | if(error) |
262 | return QString(); | 262 | return QString(); |
263 | QString line = (*currentIface); | 263 | QString line = (*currentIface); |
264 | line = line.mid(QString(IFACE).length()+1, line.length()); | 264 | line = line.mid(QString(IFACE).length()+1, line.length()); |
265 | line = line.mid(name.length()+1, line.length()); | 265 | line = line.mid(name.length()+1, line.length()); |
266 | line = line.mid(family.length()+1, line.length()); | 266 | line = line.mid(family.length()+1, line.length()); |
267 | line = line.simplifyWhiteSpace(); | 267 | line = line.simplifyWhiteSpace(); |
268 | error = false; | 268 | error = false; |
269 | return line; | 269 | return line; |
270 | } | 270 | } |
271 | 271 | ||
272 | /** | 272 | /** |
273 | * Sets the interface name to newName. | 273 | * Sets the interface name to newName. |
274 | * @param newName the new name of the interface. All whitespace is removed. | 274 | * @param newName the new name of the interface. All whitespace is removed. |
275 | * @return bool true if successfull. | 275 | * @return bool true if successful. |
276 | */ | 276 | */ |
277 | bool Interfaces::setInterfaceName(const QString &newName){ | 277 | bool Interfaces::setInterfaceName(const QString &newName){ |
278 | qDebug("setInterfaceName %s", newName.latin1()); | 278 | qDebug("setInterfaceName %s", newName.latin1()); |
279 | if(currentIface == interfaces.end()) | 279 | if(currentIface == interfaces.end()) |
280 | return false; | 280 | return false; |
281 | QString name = newName.simplifyWhiteSpace(); | 281 | QString name = newName.simplifyWhiteSpace(); |
282 | name = name.replace(QRegExp(" "), ""); | 282 | name = name.replace(QRegExp(" "), ""); |
283 | bool returnValue = false; | 283 | bool returnValue = false; |
284 | QString tmp = QString("iface %1 %2 %3").arg(name).arg(getInterfaceFamily(returnValue)).arg(getInterfaceMethod(returnValue)); | 284 | QString tmp = QString("iface %1 %2 %3").arg(name).arg(getInterfaceFamily(returnValue)).arg(getInterfaceMethod(returnValue)); |
285 | qDebug("setting %s",tmp.latin1()); | 285 | qDebug("setting %s",tmp.latin1()); |
286 | 286 | ||
287 | (*currentIface) = tmp; | 287 | (*currentIface) = tmp; |
288 | return !returnValue; | 288 | return !returnValue; |
289 | } | 289 | } |
290 | 290 | ||
291 | /** | 291 | /** |
292 | * Sets the interface family to newName. | 292 | * Sets the interface family to newName. |
293 | * @param newName the new name of the interface. Must be one of the families | 293 | * @param newName the new name of the interface. Must be one of the families |
294 | * defined in the interfaces.h file. | 294 | * defined in the interfaces.h file. |
295 | * @return bool true if successfull. | 295 | * @return bool true if successful. |
296 | */ | 296 | */ |
297 | bool Interfaces::setInterfaceFamily(const QString &newName){ | 297 | bool Interfaces::setInterfaceFamily(const QString &newName){ |
298 | if(currentIface == interfaces.end()) | 298 | if(currentIface == interfaces.end()) |
299 | return false; | 299 | return false; |
300 | if(acceptedFamily.contains(newName)==0) | 300 | if(acceptedFamily.contains(newName)==0) |
301 | return false; | 301 | return false; |
302 | bool returnValue = false; | 302 | bool returnValue = false; |
303 | (*currentIface) = QString("iface %1 %2 %3").arg(getInterfaceName(returnValue)).arg(newName).arg(getInterfaceMethod(returnValue)); | 303 | (*currentIface) = QString("iface %1 %2 %3").arg(getInterfaceName(returnValue)).arg(newName).arg(getInterfaceMethod(returnValue)); |
304 | return !returnValue; | 304 | return !returnValue; |
305 | } | 305 | } |
306 | 306 | ||
307 | /** | 307 | /** |
308 | * Sets the interface method to newName | 308 | * Sets the interface method to newName |
309 | * @param newName the new name of the interface | 309 | * @param newName the new name of the interface |
310 | * @return bool true if successfull. | 310 | * @return bool true if successful. |
311 | */ | 311 | */ |
312 | bool Interfaces::setInterfaceMethod(const QString &newName){ | 312 | bool Interfaces::setInterfaceMethod(const QString &newName){ |
313 | if(currentIface == interfaces.end()) | 313 | if(currentIface == interfaces.end()) |
314 | return false; | 314 | return false; |
315 | bool returnValue = false; | 315 | bool returnValue = false; |
316 | (*currentIface) = QString("iface %1 %2 %3").arg(getInterfaceName(returnValue)).arg(getInterfaceFamily(returnValue)).arg(newName); | 316 | (*currentIface) = QString("iface %1 %2 %3").arg(getInterfaceName(returnValue)).arg(getInterfaceFamily(returnValue)).arg(newName); |
317 | return !returnValue; | 317 | return !returnValue; |
318 | } | 318 | } |
319 | 319 | ||
320 | /** | 320 | /** |
321 | * Get a value for an option in the currently selected interface. For example | 321 | * Get a value for an option in the currently selected interface. For example |
322 | * calling getInterfaceOption("address") on the following stanza would | 322 | * calling getInterfaceOption("address") on the following stanza would |
323 | * return 192.168.1.1. | 323 | * return 192.168.1.1. |
324 | * iface eth0 static | 324 | * iface eth0 static |
325 | * address 192.168.1.1 | 325 | * address 192.168.1.1 |
326 | * @param option the options to get the value. | 326 | * @param option the options to get the value. |
327 | * @param error set to true if any error occurs, false otherwise. | 327 | * @param error set to true if any error occurs, false otherwise. |
328 | * @return QString the options value. QString::null if error == true | 328 | * @return QString the options value. QString::null if error == true |
329 | */ | 329 | */ |
330 | QString Interfaces::getInterfaceOption(const QString &option, bool &error){ | 330 | QString Interfaces::getInterfaceOption(const QString &option, bool &error){ |
331 | return getOption(currentIface, option, error); | 331 | return getOption(currentIface, option, error); |
332 | } | 332 | } |
333 | 333 | ||
334 | /** | 334 | /** |
335 | * Set a value for an option in the currently selected interface. If option | 335 | * Set a value for an option in the currently selected interface. If option |
336 | * doesn't exist then it is added along with the value. | 336 | * doesn't exist then it is added along with the value. |
337 | * If value isEmpty() then we will remove the option | 337 | * If value isEmpty() then we will remove the option |
338 | * | 338 | * |
339 | * @param option the options to set the value. | 339 | * @param option the options to set the value. |
340 | * @param value the value that option should be set to. | 340 | * @param value the value that option should be set to. |
341 | * @param error set to true if any error occurs, false otherwise. | 341 | * @param error set to true if any error occurs, false otherwise. |
342 | * @return QString the options value. QString::null if error == true | 342 | * @return QString the options value. QString::null if error == true |
343 | */ | 343 | */ |
344 | bool Interfaces::setInterfaceOption(const QString &option, const QString &value){ | 344 | bool Interfaces::setInterfaceOption(const QString &option, const QString &value){ |
345 | if( value.stripWhiteSpace().isEmpty() ) | 345 | if( value.stripWhiteSpace().isEmpty() ) |
346 | return removeInterfaceOption( option ); | 346 | return removeInterfaceOption( option ); |
347 | 347 | ||
348 | qDebug("iface >%s< option >%s< value >%s<", (*currentIface).latin1(), option.latin1(),value.latin1()); | 348 | qDebug("iface >%s< option >%s< value >%s<", (*currentIface).latin1(), option.latin1(),value.latin1()); |
349 | return setOption(currentIface, option, value); | 349 | return setOption(currentIface, option, value); |
350 | } | 350 | } |
351 | 351 | ||
352 | /** | 352 | /** |
353 | * Removes a value for an option in the currently selected interface. | 353 | * Removes a value for an option in the currently selected interface. |
354 | * @param option the options to set the value. | 354 | * @param option the options to set the value. |
355 | * @param error set to true if any error occurs, false otherwise. | 355 | * @param error set to true if any error occurs, false otherwise. |
356 | * @return QString the options value. QString::null if error == true | 356 | * @return QString the options value. QString::null if error == true |
357 | */ | 357 | */ |
358 | bool Interfaces::removeInterfaceOption(const QString &option){ | 358 | bool Interfaces::removeInterfaceOption(const QString &option){ |
359 | return removeOption(currentIface, option); | 359 | return removeOption(currentIface, option); |
360 | } | 360 | } |
361 | 361 | ||
362 | /** | 362 | /** |
363 | * Removes a value for an option in the currently selected interface. | 363 | * Removes a value for an option in the currently selected interface. |
364 | * @param option the options to set the value. | 364 | * @param option the options to set the value. |
365 | * @param value the value that option should be set to. | 365 | * @param value the value that option should be set to. |
366 | * @param error set to true if any error occurs, false otherwise. | 366 | * @param error set to true if any error occurs, false otherwise. |
367 | * @return QString the options value. QString::null if error == true | 367 | * @return QString the options value. QString::null if error == true |
368 | */ | 368 | */ |
369 | bool Interfaces::removeInterfaceOption(const QString &option, const QString &value){ | 369 | bool Interfaces::removeInterfaceOption(const QString &option, const QString &value){ |
370 | return removeOption(currentIface, option, value); | 370 | return removeOption(currentIface, option, value); |
371 | } | 371 | } |
372 | 372 | ||
373 | /** | 373 | /** |
374 | * Removes all of the options from the currently selected interface. | 374 | * Removes all of the options from the currently selected interface. |
375 | * @return bool error if if successfull | 375 | * @return bool error if if successful |
376 | */ | 376 | */ |
377 | bool Interfaces::removeAllInterfaceOptions(){ | 377 | bool Interfaces::removeAllInterfaceOptions(){ |
378 | return removeAllOptions(currentIface); | 378 | return removeAllOptions(currentIface); |
379 | } | 379 | } |
380 | 380 | ||
381 | /** | 381 | /** |
382 | * Set the current map to interface's map. This needs to be done before you | 382 | * Set the current map to interface's map. This needs to be done before you |
383 | * can call addMapping(), set/getMap(), and get/setScript(). | 383 | * can call addMapping(), set/getMap(), and get/setScript(). |
384 | * @param interface the name of the interface to set. All whitespace is | 384 | * @param interface the name of the interface to set. All whitespace is |
385 | * removed from the interface name. | 385 | * removed from the interface name. |
386 | * @return bool true if it is successfull. | 386 | * @return bool true if it is successful. |
387 | */ | 387 | */ |
388 | bool Interfaces::setMapping(const QString &interface){ | 388 | bool Interfaces::setMapping(const QString &interface){ |
389 | QString interfaceName = interface.simplifyWhiteSpace(); | 389 | QString interfaceName = interface.simplifyWhiteSpace(); |
390 | interfaceName = interfaceName.replace(QRegExp(" "), ""); | 390 | interfaceName = interfaceName.replace(QRegExp(" "), ""); |
391 | return setStanza(MAPPING, interfaceName, currentMapping); | 391 | return setStanza(MAPPING, interfaceName, currentMapping); |
392 | } | 392 | } |
393 | 393 | ||
394 | /** | 394 | /** |
395 | * Adds a new Mapping to the interfaces file with interfaces. | 395 | * Adds a new Mapping to the interfaces file with interfaces. |
396 | * @param interface the name(s) of the interfaces to set to this mapping | 396 | * @param interface the name(s) of the interfaces to set to this mapping |
397 | */ | 397 | */ |
398 | void Interfaces::addMapping(const QString &option){ | 398 | void Interfaces::addMapping(const QString &option){ |
399 | interfaces.append(""); | 399 | interfaces.append(""); |
400 | interfaces.append(QString(MAPPING " %1").arg(option)); | 400 | interfaces.append(QString(MAPPING " %1").arg(option)); |
401 | } | 401 | } |
402 | 402 | ||
403 | /** | 403 | /** |
404 | * Remove the currently selected map and all of its options. | 404 | * Remove the currently selected map and all of its options. |
405 | * @return bool if successfull or not. | 405 | * @return bool if successful or not. |
406 | */ | 406 | */ |
407 | bool Interfaces::removeMapping(){ | 407 | bool Interfaces::removeMapping(){ |
408 | return removeStanza(currentMapping); | 408 | return removeStanza(currentMapping); |
409 | } | 409 | } |
410 | 410 | ||
411 | /** | 411 | /** |
412 | * Set a map option within a mapping. | 412 | * Set a map option within a mapping. |
413 | * @param map map to use | 413 | * @param map map to use |
414 | * @param value value to go with map | 414 | * @param value value to go with map |
415 | * @return bool true if it is successfull. | 415 | * @return bool true if it is successful. |
416 | */ | 416 | */ |
417 | bool Interfaces::setMap(const QString &map, const QString &value){ | 417 | bool Interfaces::setMap(const QString &map, const QString &value){ |
418 | return setOption(currentMapping, map, value); | 418 | return setOption(currentMapping, map, value); |
419 | } | 419 | } |
420 | 420 | ||
421 | /** | 421 | /** |
422 | * Removes a map option within a mapping. | 422 | * Removes a map option within a mapping. |
423 | * @param map map to use | 423 | * @param map map to use |
424 | * @param value value to go with map | 424 | * @param value value to go with map |
425 | * @return bool true if it is successfull. | 425 | * @return bool true if it is successful. |
426 | */ | 426 | */ |
427 | bool Interfaces::removeMap(const QString &map, const QString &value){ | 427 | bool Interfaces::removeMap(const QString &map, const QString &value){ |
428 | return removeOption(currentMapping, map, value); | 428 | return removeOption(currentMapping, map, value); |
429 | } | 429 | } |
430 | 430 | ||
431 | /** | 431 | /** |
432 | * Get a map value within a mapping. | 432 | * Get a map value within a mapping. |
433 | * @param map map to get value of | 433 | * @param map map to get value of |
434 | * @param bool true if it is successfull. | 434 | * @param bool true if it is successful. |
435 | * @return value that goes to the map | 435 | * @return value that goes to the map |
436 | */ | 436 | */ |
437 | QString Interfaces::getMap(const QString &map, bool &error){ | 437 | QString Interfaces::getMap(const QString &map, bool &error){ |
438 | return getOption(currentMapping, map, error); | 438 | return getOption(currentMapping, map, error); |
439 | } | 439 | } |
440 | 440 | ||
441 | /** | 441 | /** |
442 | * Sets a script value of the current mapping to argument. | 442 | * Sets a script value of the current mapping to argument. |
443 | * @param argument the script name. | 443 | * @param argument the script name. |
444 | * @return true if successfull. | 444 | * @return true if successful. |
445 | */ | 445 | */ |
446 | bool Interfaces::setScript(const QString &argument){ | 446 | bool Interfaces::setScript(const QString &argument){ |
447 | return setOption(currentMapping, "script", argument); | 447 | return setOption(currentMapping, "script", argument); |
448 | } | 448 | } |
449 | 449 | ||
450 | /** | 450 | /** |
451 | * @param error true if could not retrieve the current script argument. | 451 | * @param error true if could not retrieve the current script argument. |
452 | * @return QString the argument of the script for the current mapping. | 452 | * @return QString the argument of the script for the current mapping. |
453 | */ | 453 | */ |
454 | QString Interfaces::getScript(bool &error){ | 454 | QString Interfaces::getScript(bool &error){ |
455 | return getOption(currentMapping, "script", error); | 455 | return getOption(currentMapping, "script", error); |
456 | } | 456 | } |
457 | 457 | ||
458 | 458 | ||
459 | 459 | ||
460 | /** | 460 | /** |
461 | * Helper function used to parse through the QStringList and put pointers in | 461 | * Helper function used to parse through the QStringList and put pointers in |
462 | * the correct place. | 462 | * the correct place. |
463 | * @param stanza The stanza (auto, iface, mapping) to look for. | 463 | * @param stanza The stanza (auto, iface, mapping) to look for. |
464 | * @param option string that must be in the stanza's main line. | 464 | * @param option string that must be in the stanza's main line. |
465 | * @param interator interator to place at location of stanza if successfull. | 465 | * @param interator interator to place at location of stanza if successful. |
466 | * @return bool true if the stanza is found. | 466 | * @return bool true if the stanza is found. |
467 | */ | 467 | */ |
468 | bool Interfaces::setStanza(const QString &stanza, const QString &option, QStringList::Iterator &iterator){ | 468 | bool Interfaces::setStanza(const QString &stanza, const QString &option, QStringList::Iterator &iterator){ |
469 | bool found = false; | 469 | bool found = false; |
470 | iterator = interfaces.end(); | 470 | iterator = interfaces.end(); |
471 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { | 471 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { |
472 | QString line = (*it).simplifyWhiteSpace(); | 472 | QString line = (*it).simplifyWhiteSpace(); |
473 | if(line.contains(stanza) && line.contains(option) && line.at(0) != '#'){ | 473 | if(line.contains(stanza) && line.contains(option) && line.at(0) != '#'){ |
474 | uint point = line.find(option); | 474 | uint point = line.find(option); |
475 | bool valid = true; | 475 | bool valid = true; |
476 | if(point > 0){ | 476 | if(point > 0){ |
477 | // There are more chars in the line. check +1 | 477 | // There are more chars in the line. check +1 |
478 | if(line.at(point-1) != ' ') | 478 | if(line.at(point-1) != ' ') |
479 | valid = false; | 479 | valid = false; |
480 | } | 480 | } |
481 | point += option.length(); | 481 | point += option.length(); |
482 | if(point < line.length()-1){ | 482 | if(point < line.length()-1){ |
483 | // There are more chars in the line. check -1 | 483 | // There are more chars in the line. check -1 |
484 | if(line.at(point) != ' ') | 484 | if(line.at(point) != ' ') |
485 | valid = false; | 485 | valid = false; |
486 | } | 486 | } |
487 | if(valid){ | 487 | if(valid){ |
488 | if(found == true){ | 488 | if(found == true){ |
489 | qDebug(QString("Interfaces: Found multiple stanza's for search: %1 %2").arg(stanza).arg(option).latin1()); | 489 | qDebug(QString("Interfaces: Found multiple stanza's for search: %1 %2").arg(stanza).arg(option).latin1()); |
490 | } | 490 | } |
491 | found = true; | 491 | found = true; |
492 | iterator = it; | 492 | iterator = it; |
493 | } | 493 | } |
494 | } | 494 | } |
495 | } | 495 | } |
496 | return found; | 496 | return found; |
497 | } | 497 | } |
498 | 498 | ||
499 | /** | 499 | /** |
500 | * Sets a value of an option in a stanza | 500 | * Sets a value of an option in a stanza |
501 | * @param start the start of the stanza | 501 | * @param start the start of the stanza |
502 | * @param option the option to use when setting value. | 502 | * @param option the option to use when setting value. |
503 | * @return bool true if successfull, false otherwise. | 503 | * @return bool true if successful, false otherwise. |
504 | */ | 504 | */ |
505 | bool Interfaces::setOption(const QStringList::Iterator &start, const QString &option, const QString &value){ | 505 | bool Interfaces::setOption(const QStringList::Iterator &start, const QString &option, const QString &value){ |
506 | if(start == interfaces.end()) | 506 | if(start == interfaces.end()) |
507 | return false; | 507 | return false; |
508 | qDebug("setting option"); | 508 | qDebug("setting option"); |
509 | bool found = false; | 509 | bool found = false; |
510 | bool replaced = false; | 510 | bool replaced = false; |
511 | QStringList::Iterator insertAt = NULL; | 511 | QStringList::Iterator insertAt = NULL; |
512 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { | 512 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { |
513 | qDebug(" Interfaces::setOption got line >%s<",(*it).latin1()); | 513 | qDebug(" Interfaces::setOption got line >%s<",(*it).latin1()); |
514 | // FIXME: was not completly stupid just wrong sice all options got inserted bevore the iface line | 514 | // FIXME: was not completly stupid just wrong sice all options got inserted bevore the iface line |
515 | // but since it works with an empty interfaces file I (tille) will not do anything more | 515 | // but since it works with an empty interfaces file I (tille) will not do anything more |
516 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) ){ | 516 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) ){ |
517 | if (found) break; | 517 | if (found) break; |
518 | // && it != start){ | 518 | // && it != start){ |
519 | // if(!found && value != ""){ | 519 | // if(!found && value != ""){ |
520 | // // Got to the end of the stanza without finding it, so append it. | 520 | // // Got to the end of the stanza without finding it, so append it. |
521 | // qDebug(" Got to the end of the stanza without finding it, so append it."); | 521 | // qDebug(" Got to the end of the stanza without finding it, so append it."); |
522 | // interfaces.insert(--it, QString("\t%1 %2").arg(option).arg(value)); | 522 | // interfaces.insert(--it, QString("\t%1 %2").arg(option).arg(value)); |
523 | // } | 523 | // } |
524 | qDebug("found 1"); | 524 | qDebug("found 1"); |
525 | // interfaces.insert(++it, QString("\t%1 %2").arg(option).arg(value)); | 525 | // interfaces.insert(++it, QString("\t%1 %2").arg(option).arg(value)); |
526 | found = true; | 526 | found = true; |
527 | insertAt = it; | 527 | insertAt = it; |
528 | 528 | ||
529 | } | 529 | } |
530 | if((*it).contains(option) && it != start && (*it).at(0) != '#'){ | 530 | if((*it).contains(option) && it != start && (*it).at(0) != '#'){ |
531 | // Found it in stanza so replace it. | 531 | // Found it in stanza so replace it. |
532 | qDebug("found 2"); | 532 | qDebug("found 2"); |
533 | if(found) | 533 | if(found) |
534 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); | 534 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); |
535 | found = true; | 535 | found = true; |
536 | replaced = true; | 536 | replaced = true; |
537 | (*it) = QString("\t%1 %2").arg(option).arg(value); | 537 | (*it) = QString("\t%1 %2").arg(option).arg(value); |
538 | } | 538 | } |
539 | } | 539 | } |
540 | if(!found){ | 540 | if(!found){ |
541 | qDebug("! found insert anyway"); | 541 | qDebug("! found insert anyway"); |
542 | QStringList::Iterator p = start; | 542 | QStringList::Iterator p = start; |
543 | interfaces.insert(++p, QString("\t%1 %2").arg(option).arg(value)); | 543 | interfaces.insert(++p, QString("\t%1 %2").arg(option).arg(value)); |
544 | found = true; | 544 | found = true; |
545 | } | 545 | } |
546 | 546 | ||
547 | if(found && !replaced){ | 547 | if(found && !replaced){ |
548 | qDebug("found iface but not the option so insert it here..."); | 548 | qDebug("found iface but not the option so insert it here..."); |
549 | interfaces.insert(++insertAt, QString("\t%1 %2").arg(option).arg(value)); | 549 | interfaces.insert(++insertAt, QString("\t%1 %2").arg(option).arg(value)); |
550 | } | 550 | } |
551 | return found; | 551 | return found; |
552 | } | 552 | } |
553 | 553 | ||
554 | /** | 554 | /** |
555 | * Removes a stanza and all of its options | 555 | * Removes a stanza and all of its options |
556 | * @param stanza the stanza to remove | 556 | * @param stanza the stanza to remove |
557 | * @return bool true if successfull. | 557 | * @return bool true if successful. |
558 | */ | 558 | */ |
559 | bool Interfaces::removeStanza(QStringList::Iterator &stanza){ | 559 | bool Interfaces::removeStanza(QStringList::Iterator &stanza){ |
560 | if(stanza == interfaces.end()) | 560 | if(stanza == interfaces.end()) |
561 | return false; | 561 | return false; |
562 | (*stanza) = ""; | 562 | (*stanza) = ""; |
563 | return removeAllOptions(stanza); | 563 | return removeAllOptions(stanza); |
564 | } | 564 | } |
565 | 565 | ||
566 | /** | 566 | /** |
567 | * Removes a option in a stanza | 567 | * Removes a option in a stanza |
568 | * @param start the start of the stanza | 568 | * @param start the start of the stanza |
569 | * @param option the option to remove | 569 | * @param option the option to remove |
570 | * @return bool true if successfull, false otherwise. | 570 | * @return bool true if successful, false otherwise. |
571 | */ | 571 | */ |
572 | bool Interfaces::removeOption(const QStringList::Iterator &start, const QString &option){ | 572 | bool Interfaces::removeOption(const QStringList::Iterator &start, const QString &option){ |
573 | if(start == interfaces.end()) | 573 | if(start == interfaces.end()) |
574 | return false; | 574 | return false; |
575 | 575 | ||
576 | bool found = false; | 576 | bool found = false; |
577 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { | 577 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { |
578 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ | 578 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ |
579 | // got to the end without finding it | 579 | // got to the end without finding it |
580 | break; | 580 | break; |
581 | } | 581 | } |
582 | if((*it).contains(option) && it != start && (*it).at(0) != '#'){ | 582 | if((*it).contains(option) && it != start && (*it).at(0) != '#'){ |
583 | // Found it in stanza so replace it. | 583 | // Found it in stanza so replace it. |
584 | if(found) | 584 | if(found) |
585 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); | 585 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); |
586 | found = true; | 586 | found = true; |
587 | it = interfaces.remove( it ); // we really want to remove the line | 587 | it = interfaces.remove( it ); // we really want to remove the line |
588 | --it; // we do ++it later in the head of the for loop | 588 | --it; // we do ++it later in the head of the for loop |
589 | } | 589 | } |
590 | } | 590 | } |
591 | return found; | 591 | return found; |
592 | } | 592 | } |
593 | 593 | ||
594 | /** | 594 | /** |
595 | * Removes a option in a stanza | 595 | * Removes a option in a stanza |
596 | * @param start the start of the stanza | 596 | * @param start the start of the stanza |
597 | * @param option the option to use when setting value. | 597 | * @param option the option to use when setting value. |
598 | * @return bool true if successfull, false otherwise. | 598 | * @return bool true if successful, false otherwise. |
599 | */ | 599 | */ |
600 | bool Interfaces::removeOption(const QStringList::Iterator &start, const QString &option, const QString &value){ | 600 | bool Interfaces::removeOption(const QStringList::Iterator &start, const QString &option, const QString &value){ |
601 | if(start == interfaces.end()) | 601 | if(start == interfaces.end()) |
602 | return false; | 602 | return false; |
603 | 603 | ||
604 | bool found = false; | 604 | bool found = false; |
605 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { | 605 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { |
606 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ | 606 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ |
607 | // got to the end without finding it | 607 | // got to the end without finding it |
608 | break; | 608 | break; |
609 | } | 609 | } |
610 | if((*it).contains(option) && (*it).contains(value) && it != start && (*it).at(0) != '#'){ | 610 | if((*it).contains(option) && (*it).contains(value) && it != start && (*it).at(0) != '#'){ |
611 | // Found it in stanza so replace it. | 611 | // Found it in stanza so replace it. |
612 | if(found) | 612 | if(found) |
613 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); | 613 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); |
614 | found = true; | 614 | found = true; |
615 | it = interfaces.remove( it ); // we really want to remove the line | 615 | it = interfaces.remove( it ); // we really want to remove the line |
616 | --it; // we do ++it later in the head of the for loop | 616 | --it; // we do ++it later in the head of the for loop |
617 | } | 617 | } |
618 | } | 618 | } |
619 | return found; | 619 | return found; |
620 | } | 620 | } |
621 | 621 | ||
622 | /** | 622 | /** |
623 | * Removes all options in a stanza | 623 | * Removes all options in a stanza |
624 | * @param start the start of the stanza | 624 | * @param start the start of the stanza |
625 | * @return bool true if successfull, false otherwise. | 625 | * @return bool true if successful, false otherwise. |
626 | */ | 626 | */ |
627 | bool Interfaces::removeAllOptions(const QStringList::Iterator &start){ | 627 | bool Interfaces::removeAllOptions(const QStringList::Iterator &start){ |
628 | if(start == interfaces.end()) | 628 | if(start == interfaces.end()) |
629 | return false; | 629 | return false; |
630 | 630 | ||
631 | QStringList::Iterator it = start; | 631 | QStringList::Iterator it = start; |
632 | it = ++it; | 632 | it = ++it; |
633 | for (; it != interfaces.end(); ++it ) { | 633 | for (; it != interfaces.end(); ++it ) { |
634 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ | 634 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ |
635 | break; | 635 | break; |
636 | } | 636 | } |
637 | it = interfaces.remove(it); | 637 | it = interfaces.remove(it); |
638 | it = --it; | 638 | it = --it; |
639 | } | 639 | } |
640 | // Leave a space between this interface and the next. | 640 | // Leave a space between this interface and the next. |
641 | interfaces.insert(it, QString("")); | 641 | interfaces.insert(it, QString("")); |
642 | return true; | 642 | return true; |
643 | } | 643 | } |
644 | 644 | ||
645 | /** | 645 | /** |
646 | * Gets a value of an option in a stanza | 646 | * Gets a value of an option in a stanza |
647 | * @param start the start of the stanza | 647 | * @param start the start of the stanza |
648 | * @param option the option to use when getting the value. | 648 | * @param option the option to use when getting the value. |
649 | * @param bool true if errors false otherwise. | 649 | * @param bool true if errors false otherwise. |
650 | * @return QString the value of option QString::null() if error == true. | 650 | * @return QString the value of option QString::null() if error == true. |
651 | */ | 651 | */ |
652 | QString Interfaces::getOption(const QStringList::Iterator &start, const QString &option, bool &error){ | 652 | QString Interfaces::getOption(const QStringList::Iterator &start, const QString &option, bool &error){ |
653 | if(start == interfaces.end()){ | 653 | if(start == interfaces.end()){ |
654 | error = false; | 654 | error = false; |
655 | return QString(); | 655 | return QString(); |
656 | } | 656 | } |
657 | 657 | ||
658 | QString value; | 658 | QString value; |
659 | bool found = false; | 659 | bool found = false; |
660 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { | 660 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { |
661 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ | 661 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ |
662 | break; | 662 | break; |
663 | } | 663 | } |
664 | if((*it).contains(option) && (*it).at(0) != '#'){ | 664 | if((*it).contains(option) && (*it).at(0) != '#'){ |
665 | if(found) | 665 | if(found) |
666 | qDebug(QString("Interfaces: getOption found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1()); | 666 | qDebug(QString("Interfaces: getOption found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1()); |
667 | found = true; | 667 | found = true; |
668 | QString line = (*it).simplifyWhiteSpace(); | 668 | QString line = (*it).simplifyWhiteSpace(); |
669 | int space = line.find(" ", option.length()); | 669 | int space = line.find(" ", option.length()); |
670 | if(space != -1){ | 670 | if(space != -1){ |
671 | value = line.mid(space+1, line.length()); | 671 | value = line.mid(space+1, line.length()); |
672 | break; | 672 | break; |
673 | } | 673 | } |
674 | } | 674 | } |
675 | } | 675 | } |
676 | error = !found; | 676 | error = !found; |
677 | return value; | 677 | return value; |
678 | } | 678 | } |
679 | 679 | ||
680 | /** | 680 | /** |
681 | * Write out the interfaces file to the file passed into the constructor. | 681 | * Write out the interfaces file to the file passed into the constructor. |
682 | * Removes any excess blank lines over 1 line long. | 682 | * Removes any excess blank lines over 1 line long. |
683 | * @return bool true if successfull, false if not. | 683 | * @return bool true if successful, false if not. |
684 | */ | 684 | */ |
685 | bool Interfaces::write(){ | 685 | bool Interfaces::write(){ |
686 | QFile::remove(interfacesFile); | 686 | QFile::remove(interfacesFile); |
687 | QFile file(interfacesFile); | 687 | QFile file(interfacesFile); |
688 | 688 | ||
689 | if (!file.open(IO_ReadWrite)){ | 689 | if (!file.open(IO_ReadWrite)){ |
690 | qDebug(QString("Interfaces: Can't open file: %1 for writing.").arg(interfacesFile).latin1()); | 690 | qDebug(QString("Interfaces: Can't open file: %1 for writing.").arg(interfacesFile).latin1()); |
691 | return false; | 691 | return false; |
692 | } | 692 | } |
693 | QTextStream stream( &file ); | 693 | QTextStream stream( &file ); |
694 | int whiteSpaceCount = 0; | 694 | int whiteSpaceCount = 0; |
695 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { | 695 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { |
696 | QString line = (*it).simplifyWhiteSpace(); | 696 | QString line = (*it).simplifyWhiteSpace(); |
697 | line = line.replace(QRegExp(" "),""); | 697 | line = line.replace(QRegExp(" "),""); |
698 | if(line.length() == 0) | 698 | if(line.length() == 0) |
699 | whiteSpaceCount++; | 699 | whiteSpaceCount++; |
700 | else | 700 | else |
701 | whiteSpaceCount = 0; | 701 | whiteSpaceCount = 0; |
702 | if(whiteSpaceCount < 2){ | 702 | if(whiteSpaceCount < 2){ |
703 | qDebug((*it).latin1()); | 703 | qDebug((*it).latin1()); |
704 | stream << (*it) << '\n'; | 704 | stream << (*it) << '\n'; |
705 | } | 705 | } |
706 | } | 706 | } |
707 | file.close(); | 707 | file.close(); |
708 | return true; | 708 | return true; |
709 | } | 709 | } |
710 | 710 | ||
711 | // interfaces.cpp | 711 | // interfaces.cpp |
712 | 712 | ||
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp index e844d8a..78466d0 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp +++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp | |||
@@ -1,206 +1,206 @@ | |||
1 | #include "interfacesetupimp.h" | 1 | #include "interfacesetupimp.h" |
2 | #include "interface.h" | 2 | #include "interface.h" |
3 | 3 | ||
4 | #include <qcheckbox.h> | 4 | #include <qcheckbox.h> |
5 | #include <qlineedit.h> | 5 | #include <qlineedit.h> |
6 | #include <qspinbox.h> | 6 | #include <qspinbox.h> |
7 | #include <qgroupbox.h> | 7 | #include <qgroupbox.h> |
8 | #include <qlabel.h> | 8 | #include <qlabel.h> |
9 | 9 | ||
10 | #include <qmessagebox.h> | 10 | #include <qmessagebox.h> |
11 | 11 | ||
12 | #include <opie/oprocess.h> | 12 | #include <opie/oprocess.h> |
13 | 13 | ||
14 | #ifdef QWS | 14 | #ifdef QWS |
15 | #include <opie/owait.h> | 15 | #include <opie/owait.h> |
16 | #include <qpe/global.h> | 16 | #include <qpe/global.h> |
17 | #include <qapplication.h> | 17 | #include <qapplication.h> |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #define DNSSCRIPT "changedns" | 20 | #define DNSSCRIPT "changedns" |
21 | 21 | ||
22 | /** | 22 | /** |
23 | * Constuctor. Set up the connection. A profile must be set. | 23 | * Constuctor. Set up the connection. A profile must be set. |
24 | */ | 24 | */ |
25 | InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), interfaces(j), delInterfaces(false){ | 25 | InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), interfaces(j), delInterfaces(false){ |
26 | if (j == 0) { | 26 | if (j == 0) { |
27 | delInterfaces = true; | 27 | delInterfaces = true; |
28 | interfaces = new Interfaces; | 28 | interfaces = new Interfaces; |
29 | } | 29 | } |
30 | } | 30 | } |
31 | 31 | ||
32 | /** | 32 | /** |
33 | * Destructor | 33 | * Destructor |
34 | */ | 34 | */ |
35 | InterfaceSetupImp::~InterfaceSetupImp(){ | 35 | InterfaceSetupImp::~InterfaceSetupImp(){ |
36 | if(delInterfaces) { | 36 | if(delInterfaces) { |
37 | delete interfaces; | 37 | delete interfaces; |
38 | } | 38 | } |
39 | } | 39 | } |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * Save the current settings, then write out the interfaces file and close. | 42 | * Save the current settings, then write out the interfaces file and close. |
43 | */ | 43 | */ |
44 | bool InterfaceSetupImp::saveChanges(){ | 44 | bool InterfaceSetupImp::saveChanges(){ |
45 | bool error; | 45 | bool error; |
46 | QString iface = interfaces->getInterfaceName(error); | 46 | QString iface = interfaces->getInterfaceName(error); |
47 | qDebug("InterfaceSetupImp::saveChanges saves interface %s", iface.latin1() ); | 47 | qDebug("InterfaceSetupImp::saveChanges saves interface %s", iface.latin1() ); |
48 | if(!saveSettings()) | 48 | if(!saveSettings()) |
49 | return false; | 49 | return false; |
50 | 50 | ||
51 | interfaces->write(); | 51 | interfaces->write(); |
52 | 52 | ||
53 | if (interface->getStatus()) { | 53 | if (interface->getStatus()) { |
54 | QString ifup; | 54 | QString ifup; |
55 | ifup += "ifdown "; | 55 | ifup += "ifdown "; |
56 | ifup += iface; | 56 | ifup += iface; |
57 | ifup += "; ifup "; | 57 | ifup += "; ifup "; |
58 | ifup += iface; | 58 | ifup += iface; |
59 | ifup += ";"; | 59 | ifup += ";"; |
60 | 60 | ||
61 | OProcess restart; | 61 | OProcess restart; |
62 | restart << "sh"; | 62 | restart << "sh"; |
63 | restart << "-c"; | 63 | restart << "-c"; |
64 | restart << ifup; | 64 | restart << ifup; |
65 | 65 | ||
66 | OWait *owait = new OWait(); | 66 | OWait *owait = new OWait(); |
67 | Global::statusMessage( tr( "Restarting interface" ) ); | 67 | Global::statusMessage( tr( "Restarting interface" ) ); |
68 | 68 | ||
69 | owait->show(); | 69 | owait->show(); |
70 | qApp->processEvents(); | 70 | qApp->processEvents(); |
71 | 71 | ||
72 | if (!restart.start(OProcess::Block, OProcess::NoCommunication) ) { | 72 | if (!restart.start(OProcess::Block, OProcess::NoCommunication) ) { |
73 | qWarning("unstable to spawn ifdown/ifup"); | 73 | qWarning("unstable to spawn ifdown/ifup"); |
74 | } | 74 | } |
75 | 75 | ||
76 | owait->hide(); | 76 | owait->hide(); |
77 | delete owait; | 77 | delete owait; |
78 | 78 | ||
79 | interface->refresh(); | 79 | interface->refresh(); |
80 | } | 80 | } |
81 | return true; | 81 | return true; |
82 | } | 82 | } |
83 | 83 | ||
84 | /** | 84 | /** |
85 | * Save the settings for the current Interface. | 85 | * Save the settings for the current Interface. |
86 | * @return bool true if successfull, false otherwise | 86 | * @return bool true if successful, false otherwise |
87 | */ | 87 | */ |
88 | bool InterfaceSetupImp::saveSettings(){ | 88 | bool InterfaceSetupImp::saveSettings(){ |
89 | // eh can't really do anything about it other then return. :-D | 89 | // eh can't really do anything about it other then return. :-D |
90 | if(!interfaces->isInterfaceSet()) | 90 | if(!interfaces->isInterfaceSet()) |
91 | return true; | 91 | return true; |
92 | 92 | ||
93 | bool error = false; | 93 | bool error = false; |
94 | // Loopback case | 94 | // Loopback case |
95 | if(interfaces->getInterfaceMethod(error) == INTERFACES_LOOPBACK){ | 95 | if(interfaces->getInterfaceMethod(error) == INTERFACES_LOOPBACK){ |
96 | interfaces->setAuto(interface->getInterfaceName(), autoStart->isChecked()); | 96 | interfaces->setAuto(interface->getInterfaceName(), autoStart->isChecked()); |
97 | return true; | 97 | return true; |
98 | } | 98 | } |
99 | 99 | ||
100 | if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty())){ | 100 | if(!dhcpCheckBox->isChecked() && (ipAddressEdit->text().isEmpty() || subnetMaskEdit->text().isEmpty())){ |
101 | QMessageBox::information(this, "Not Saved.", "Please fill in the IP address and\n subnet entries.", QMessageBox::Ok); | 101 | QMessageBox::information(this, "Not Saved.", "Please fill in the IP address and\n subnet entries.", QMessageBox::Ok); |
102 | return false; | 102 | return false; |
103 | } | 103 | } |
104 | // DHCP | 104 | // DHCP |
105 | if(dhcpCheckBox->isChecked()) { | 105 | if(dhcpCheckBox->isChecked()) { |
106 | interfaces->setInterfaceMethod(INTERFACES_METHOD_DHCP); | 106 | interfaces->setInterfaceMethod(INTERFACES_METHOD_DHCP); |
107 | interfaces->removeInterfaceOption("address"); | 107 | interfaces->removeInterfaceOption("address"); |
108 | interfaces->removeInterfaceOption("netmask"); | 108 | interfaces->removeInterfaceOption("netmask"); |
109 | interfaces->removeInterfaceOption("gateway"); | 109 | interfaces->removeInterfaceOption("gateway"); |
110 | interfaces->removeInterfaceOption("up "DNSSCRIPT" -a "); | 110 | interfaces->removeInterfaceOption("up "DNSSCRIPT" -a "); |
111 | interfaces->removeInterfaceOption("down "DNSSCRIPT" -r "); | 111 | interfaces->removeInterfaceOption("down "DNSSCRIPT" -r "); |
112 | } else{ | 112 | } else{ |
113 | interfaces->setInterfaceMethod("static"); | 113 | interfaces->setInterfaceMethod("static"); |
114 | interfaces->setInterfaceOption("address", ipAddressEdit->text()); | 114 | interfaces->setInterfaceOption("address", ipAddressEdit->text()); |
115 | interfaces->setInterfaceOption("netmask", subnetMaskEdit->text()); | 115 | interfaces->setInterfaceOption("netmask", subnetMaskEdit->text()); |
116 | interfaces->setInterfaceOption("gateway", gatewayEdit->text()); | 116 | interfaces->setInterfaceOption("gateway", gatewayEdit->text()); |
117 | if(!firstDNSLineEdit->text().isEmpty() || !secondDNSLineEdit->text().isEmpty()){ | 117 | if(!firstDNSLineEdit->text().isEmpty() || !secondDNSLineEdit->text().isEmpty()){ |
118 | QString dns = firstDNSLineEdit->text() + " " + secondDNSLineEdit->text(); | 118 | QString dns = firstDNSLineEdit->text() + " " + secondDNSLineEdit->text(); |
119 | interfaces->setInterfaceOption("up "DNSSCRIPT" -a ", dns); | 119 | interfaces->setInterfaceOption("up "DNSSCRIPT" -a ", dns); |
120 | interfaces->setInterfaceOption("down "DNSSCRIPT" -r ", dns); | 120 | interfaces->setInterfaceOption("down "DNSSCRIPT" -r ", dns); |
121 | }else{ | 121 | }else{ |
122 | interfaces->removeInterfaceOption("up "DNSSCRIPT" -a "); | 122 | interfaces->removeInterfaceOption("up "DNSSCRIPT" -a "); |
123 | interfaces->removeInterfaceOption("down "DNSSCRIPT" -r"); | 123 | interfaces->removeInterfaceOption("down "DNSSCRIPT" -r"); |
124 | } | 124 | } |
125 | } | 125 | } |
126 | 126 | ||
127 | // IP Information | 127 | // IP Information |
128 | interfaces->setAuto(interface->getInterfaceName(), autoStart->isChecked()); | 128 | interfaces->setAuto(interface->getInterfaceName(), autoStart->isChecked()); |
129 | return true; | 129 | return true; |
130 | } | 130 | } |
131 | 131 | ||
132 | /** | 132 | /** |
133 | * The Profile has changed. | 133 | * The Profile has changed. |
134 | * @param QString profile the new profile. | 134 | * @param QString profile the new profile. |
135 | */ | 135 | */ |
136 | void InterfaceSetupImp::setProfile(const QString &profile){ | 136 | void InterfaceSetupImp::setProfile(const QString &profile){ |
137 | /* | 137 | /* |
138 | bool error = false; | 138 | bool error = false; |
139 | if(interfaces->getInterfaceMethod(error) == INTERFACES_LOOPBACK){ | 139 | if(interfaces->getInterfaceMethod(error) == INTERFACES_LOOPBACK){ |
140 | staticGroupBox->hide(); | 140 | staticGroupBox->hide(); |
141 | dhcpCheckBox->hide(); | 141 | dhcpCheckBox->hide(); |
142 | leaseTime->hide(); | 142 | leaseTime->hide(); |
143 | leaseHoursLabel->hide(); | 143 | leaseHoursLabel->hide(); |
144 | } | 144 | } |
145 | */ | 145 | */ |
146 | 146 | ||
147 | QString newInterfaceName = interface->getInterfaceName(); | 147 | QString newInterfaceName = interface->getInterfaceName(); |
148 | if(profile.length() > 0) | 148 | if(profile.length() > 0) |
149 | newInterfaceName += "_" + profile; | 149 | newInterfaceName += "_" + profile; |
150 | // See if we have to make a interface. | 150 | // See if we have to make a interface. |
151 | if(!interfaces->setInterface(newInterfaceName)){ | 151 | if(!interfaces->setInterface(newInterfaceName)){ |
152 | // Add making for this new interface if need too | 152 | // Add making for this new interface if need too |
153 | if(profile != ""){ | 153 | if(profile != ""){ |
154 | interfaces->copyInterface(interface->getInterfaceName(), newInterfaceName); | 154 | interfaces->copyInterface(interface->getInterfaceName(), newInterfaceName); |
155 | if(!interfaces->setMapping(interface->getInterfaceName())){ | 155 | if(!interfaces->setMapping(interface->getInterfaceName())){ |
156 | interfaces->addMapping(interface->getInterfaceName()); | 156 | interfaces->addMapping(interface->getInterfaceName()); |
157 | if(!interfaces->setMapping(interface->getInterfaceName())){ | 157 | if(!interfaces->setMapping(interface->getInterfaceName())){ |
158 | qDebug("InterfaceSetupImp: Added Mapping, but still can't setInterface."); | 158 | qDebug("InterfaceSetupImp: Added Mapping, but still can't setInterface."); |
159 | return; | 159 | return; |
160 | } | 160 | } |
161 | } | 161 | } |
162 | interfaces->setMap("map", newInterfaceName); | 162 | interfaces->setMap("map", newInterfaceName); |
163 | interfaces->setScript("getprofile.sh"); | 163 | interfaces->setScript("getprofile.sh"); |
164 | } | 164 | } |
165 | else{ | 165 | else{ |
166 | interfaces->addInterface(newInterfaceName, INTERFACES_FAMILY_INET, INTERFACES_METHOD_DHCP); | 166 | interfaces->addInterface(newInterfaceName, INTERFACES_FAMILY_INET, INTERFACES_METHOD_DHCP); |
167 | if(!interfaces->setInterface(newInterfaceName)){ | 167 | if(!interfaces->setInterface(newInterfaceName)){ |
168 | qDebug("InterfaceSetupImp: Added interface, but still can't setInterface."); | 168 | qDebug("InterfaceSetupImp: Added interface, but still can't setInterface."); |
169 | return; | 169 | return; |
170 | } | 170 | } |
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | // We must have a valid interface to get this far so read some settings. | 174 | // We must have a valid interface to get this far so read some settings. |
175 | 175 | ||
176 | // DHCP | 176 | // DHCP |
177 | bool error = false; | 177 | bool error = false; |
178 | if(interfaces->getInterfaceMethod(error) == INTERFACES_METHOD_DHCP) | 178 | if(interfaces->getInterfaceMethod(error) == INTERFACES_METHOD_DHCP) |
179 | dhcpCheckBox->setChecked(true); | 179 | dhcpCheckBox->setChecked(true); |
180 | else | 180 | else |
181 | dhcpCheckBox->setChecked(false); | 181 | dhcpCheckBox->setChecked(false); |
182 | 182 | ||
183 | // IP Information | 183 | // IP Information |
184 | autoStart->setChecked(interfaces->isAuto(interface->getInterfaceName())); | 184 | autoStart->setChecked(interfaces->isAuto(interface->getInterfaceName())); |
185 | QString dns = interfaces->getInterfaceOption("up "DNSSCRIPT" -a", error); | 185 | QString dns = interfaces->getInterfaceOption("up "DNSSCRIPT" -a", error); |
186 | qDebug("dns >%s<",dns.latin1()); | 186 | qDebug("dns >%s<",dns.latin1()); |
187 | if(dns.contains(" ")){ | 187 | if(dns.contains(" ")){ |
188 | firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); | 188 | firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); |
189 | secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); | 189 | secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); |
190 | }else firstDNSLineEdit->setText(dns); | 190 | }else firstDNSLineEdit->setText(dns); |
191 | 191 | ||
192 | ipAddressEdit->setText(interfaces->getInterfaceOption("address", error)); | 192 | ipAddressEdit->setText(interfaces->getInterfaceOption("address", error)); |
193 | subnetMaskEdit->setText(interfaces->getInterfaceOption("netmask", error)); | 193 | subnetMaskEdit->setText(interfaces->getInterfaceOption("netmask", error)); |
194 | if (subnetMaskEdit->text().isEmpty()) | 194 | if (subnetMaskEdit->text().isEmpty()) |
195 | subnetMaskEdit->setText( "255.255.255.0" ); | 195 | subnetMaskEdit->setText( "255.255.255.0" ); |
196 | gatewayEdit->setText(interfaces->getInterfaceOption("gateway", error)); | 196 | gatewayEdit->setText(interfaces->getInterfaceOption("gateway", error)); |
197 | 197 | ||
198 | 198 | ||
199 | 199 | ||
200 | qWarning("InterfaceSetupImp::setProfile(%s)\n", profile.latin1()); | 200 | qWarning("InterfaceSetupImp::setProfile(%s)\n", profile.latin1()); |
201 | qWarning("InterfaceSetupImp::setProfile: iface is %s\n", interfaces->getInterfaceName(error).latin1()); | 201 | qWarning("InterfaceSetupImp::setProfile: iface is %s\n", interfaces->getInterfaceName(error).latin1()); |
202 | 202 | ||
203 | } | 203 | } |
204 | 204 | ||
205 | // interfacesetup.cpp | 205 | // interfacesetup.cpp |
206 | 206 | ||
diff --git a/noncore/settings/networksettings/module.h b/noncore/settings/networksettings/module.h index f7d8046..5cc82cd 100644 --- a/noncore/settings/networksettings/module.h +++ b/noncore/settings/networksettings/module.h | |||
@@ -1,113 +1,113 @@ | |||
1 | #ifndef NETCONF_MODULE_H | 1 | #ifndef NETCONF_MODULE_H |
2 | #define NETCONF_MODULE_H | 2 | #define NETCONF_MODULE_H |
3 | 3 | ||
4 | #include <qobject.h> | 4 | #include <qobject.h> |
5 | #if QT_VERSION < 300 | 5 | #if QT_VERSION < 300 |
6 | #include <qlist.h> | 6 | #include <qlist.h> |
7 | #else | 7 | #else |
8 | #include <qptrlist.h> | 8 | #include <qptrlist.h> |
9 | #endif | 9 | #endif |
10 | #include <qmap.h> | 10 | #include <qmap.h> |
11 | #include "interface.h" | 11 | #include "interface.h" |
12 | 12 | ||
13 | class QWidget; | 13 | class QWidget; |
14 | class QTabWidget; | 14 | class QTabWidget; |
15 | 15 | ||
16 | class Module : QObject{ | 16 | class Module : QObject{ |
17 | 17 | ||
18 | signals: | 18 | signals: |
19 | void updateInterface(Interface *i); | 19 | void updateInterface(Interface *i); |
20 | 20 | ||
21 | 21 | ||
22 | public: | 22 | public: |
23 | Module(){}; | 23 | Module(){}; |
24 | 24 | ||
25 | /** | 25 | /** |
26 | * The type of the plugin | 26 | * The type of the plugin |
27 | * and the name of the dcop call | 27 | * and the name of the dcop call |
28 | */ | 28 | */ |
29 | virtual const QString type() = 0; | 29 | virtual const QString type() = 0; |
30 | 30 | ||
31 | /** | 31 | /** |
32 | * The current profile has been changed and the module should do any | 32 | * The current profile has been changed and the module should do any |
33 | * neccesary changes also. | 33 | * neccesary changes also. |
34 | * @param newProfile what the profile should be changed to. | 34 | * @param newProfile what the profile should be changed to. |
35 | */ | 35 | */ |
36 | virtual void setProfile(const QString &newProfile) = 0; | 36 | virtual void setProfile(const QString &newProfile) = 0; |
37 | 37 | ||
38 | /** | 38 | /** |
39 | * get the icon name for this device. | 39 | * get the icon name for this device. |
40 | * @param Interface* can be used in determining the icon. | 40 | * @param Interface* can be used in determining the icon. |
41 | * @return QString the icon name (minus .png, .gif etc) | 41 | * @return QString the icon name (minus .png, .gif etc) |
42 | */ | 42 | */ |
43 | virtual QString getPixmapName(Interface *) = 0; | 43 | virtual QString getPixmapName(Interface *) = 0; |
44 | 44 | ||
45 | /** | 45 | /** |
46 | * Check to see if the interface i is owned by this module. | 46 | * Check to see if the interface i is owned by this module. |
47 | * @param Interface* interface to check against | 47 | * @param Interface* interface to check against |
48 | * @return bool true if i is owned by this module, false otherwise. | 48 | * @return bool true if i is owned by this module, false otherwise. |
49 | */ | 49 | */ |
50 | virtual bool isOwner(Interface *){ return false; }; | 50 | virtual bool isOwner(Interface *){ return false; }; |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * Create and return the WLANConfigure Module | 53 | * Create and return the WLANConfigure Module |
54 | * @param Interface *i the interface to configure. | 54 | * @param Interface *i the interface to configure. |
55 | * @return QWidget* pointer to this modules configure. | 55 | * @return QWidget* pointer to this modules configure. |
56 | */ | 56 | */ |
57 | virtual QWidget *configure(Interface *){ return NULL; } ; | 57 | virtual QWidget *configure(Interface *){ return NULL; } ; |
58 | 58 | ||
59 | /** | 59 | /** |
60 | * Create, and return the Information Module | 60 | * Create, and return the Information Module |
61 | * @param Interface *i the interface to get info on. | 61 | * @param Interface *i the interface to get info on. |
62 | * @return QWidget* pointer to this modules info. | 62 | * @return QWidget* pointer to this modules info. |
63 | */ | 63 | */ |
64 | virtual QWidget *information(Interface *){ return NULL; }; | 64 | virtual QWidget *information(Interface *){ return NULL; }; |
65 | 65 | ||
66 | /** | 66 | /** |
67 | * Get all active (up or down) interfaces | 67 | * Get all active (up or down) interfaces |
68 | * @return QList<Interface> A list of interfaces that exsist that havn't | 68 | * @return QList<Interface> A list of interfaces that exsist that havn't |
69 | * been called by isOwner() | 69 | * been called by isOwner() |
70 | */ | 70 | */ |
71 | virtual QList<Interface> getInterfaces() = 0; | 71 | virtual QList<Interface> getInterfaces() = 0; |
72 | 72 | ||
73 | /** | 73 | /** |
74 | * Adds possible new interfaces to the list (Example: usb(ppp), ir(ppp), | 74 | * Adds possible new interfaces to the list (Example: usb(ppp), ir(ppp), |
75 | * modem ppp) | 75 | * modem ppp) |
76 | */ | 76 | */ |
77 | virtual void possibleNewInterfaces(QMap<QString, QString> &list) = 0; | 77 | virtual void possibleNewInterfaces(QMap<QString, QString> &list) = 0; |
78 | 78 | ||
79 | /** | 79 | /** |
80 | * Attempts to create a new interface from name | 80 | * Attempts to create a new interface from name |
81 | * @return Interface* NULL if it was unable to be created. | 81 | * @return Interface* NULL if it was unable to be created. |
82 | * @param name the type of interface to create | 82 | * @param name the type of interface to create |
83 | */ | 83 | */ |
84 | virtual Interface *addNewInterface(const QString &name) = 0; | 84 | virtual Interface *addNewInterface(const QString &name) = 0; |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * Attempts to remove the interface, doesn't delete i | 87 | * Attempts to remove the interface, doesn't delete i |
88 | * @return bool true if successfull, false otherwise. | 88 | * @return bool true if successful, false otherwise. |
89 | */ | 89 | */ |
90 | virtual bool remove(Interface* i) = 0; | 90 | virtual bool remove(Interface* i) = 0; |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * get dcop calls | 93 | * get dcop calls |
94 | */ | 94 | */ |
95 | virtual void receive(const QCString &msg, const QByteArray &arg) = 0; | 95 | virtual void receive(const QCString &msg, const QByteArray &arg) = 0; |
96 | 96 | ||
97 | QStringList handledInterfaceNames()const { return m_inter; } | 97 | QStringList handledInterfaceNames()const { return m_inter; } |
98 | protected: | 98 | protected: |
99 | /** | 99 | /** |
100 | * set which interfaceNames should not be shown cause they're handled | 100 | * set which interfaceNames should not be shown cause they're handled |
101 | * internally of this module.. An already running ppp link or | 101 | * internally of this module.. An already running ppp link or |
102 | * a tunnel... | 102 | * a tunnel... |
103 | */ | 103 | */ |
104 | void setHandledInterfaceNames( const QStringList& in) { m_inter = in; } | 104 | void setHandledInterfaceNames( const QStringList& in) { m_inter = in; } |
105 | 105 | ||
106 | private: | 106 | private: |
107 | QStringList m_inter; | 107 | QStringList m_inter; |
108 | }; | 108 | }; |
109 | 109 | ||
110 | #endif | 110 | #endif |
111 | 111 | ||
112 | // module.h | 112 | // module.h |
113 | 113 | ||
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp index af05eb7..2462fa4 100644 --- a/noncore/settings/networksettings/ppp/pppmodule.cpp +++ b/noncore/settings/networksettings/ppp/pppmodule.cpp | |||
@@ -1,250 +1,250 @@ | |||
1 | #include <errno.h> | 1 | #include <errno.h> |
2 | #include <signal.h> | 2 | #include <signal.h> |
3 | 3 | ||
4 | 4 | ||
5 | #include <qpe/config.h> | 5 | #include <qpe/config.h> |
6 | 6 | ||
7 | #include "modem.h" | 7 | #include "modem.h" |
8 | #include "pppconfig.h" | 8 | #include "pppconfig.h" |
9 | #include "pppmodule.h" | 9 | #include "pppmodule.h" |
10 | #include "pppdata.h" | 10 | #include "pppdata.h" |
11 | #include "interfaceinformationppp.h" | 11 | #include "interfaceinformationppp.h" |
12 | #include "interfaceppp.h" | 12 | #include "interfaceppp.h" |
13 | 13 | ||
14 | // don't polute global namespace | 14 | // don't polute global namespace |
15 | namespace { | 15 | namespace { |
16 | /* | 16 | /* |
17 | * If network settings is qutting and we've ppp | 17 | * If network settings is qutting and we've ppp |
18 | * devices open we need to save the pid_t the PPData | 18 | * devices open we need to save the pid_t the PPData |
19 | * and the interface number | 19 | * and the interface number |
20 | */ | 20 | */ |
21 | struct Connection { | 21 | struct Connection { |
22 | pid_t pid; | 22 | pid_t pid; |
23 | QString device; | 23 | QString device; |
24 | QString name; | 24 | QString name; |
25 | }; | 25 | }; |
26 | class InterfaceKeeper { | 26 | class InterfaceKeeper { |
27 | public: | 27 | public: |
28 | InterfaceKeeper(); | 28 | InterfaceKeeper(); |
29 | ~InterfaceKeeper(); | 29 | ~InterfaceKeeper(); |
30 | 30 | ||
31 | void addInterface( pid_t, const QString& pppDev, const QString& name ); | 31 | void addInterface( pid_t, const QString& pppDev, const QString& name ); |
32 | QMap<QString, Connection> interfaces()const; // will check if still available | 32 | QMap<QString, Connection> interfaces()const; // will check if still available |
33 | private: | 33 | private: |
34 | bool isAvailable( pid_t )const; | 34 | bool isAvailable( pid_t )const; |
35 | QMap<QString, Connection> m_interfaces; | 35 | QMap<QString, Connection> m_interfaces; |
36 | }; | 36 | }; |
37 | } | 37 | } |
38 | 38 | ||
39 | 39 | ||
40 | /** | 40 | /** |
41 | * Constructor, find all of the possible interfaces | 41 | * Constructor, find all of the possible interfaces |
42 | * We also need to restore the state.. it could be that | 42 | * We also need to restore the state.. it could be that |
43 | * an interface was up while closing the application | 43 | * an interface was up while closing the application |
44 | * we need to be able to shut it down... | 44 | * we need to be able to shut it down... |
45 | */ | 45 | */ |
46 | PPPModule::PPPModule() : Module() | 46 | PPPModule::PPPModule() : Module() |
47 | { | 47 | { |
48 | InterfaceKeeper inFace; | 48 | InterfaceKeeper inFace; |
49 | QMap<QString,Connection> running = inFace.interfaces(); | 49 | QMap<QString,Connection> running = inFace.interfaces(); |
50 | QStringList handledInterfaceNames; | 50 | QStringList handledInterfaceNames; |
51 | 51 | ||
52 | QMap<QString,QString> ifaces = PPPData::getConfiguredInterfaces(); | 52 | QMap<QString,QString> ifaces = PPPData::getConfiguredInterfaces(); |
53 | QMap<QString,QString>::Iterator it; | 53 | QMap<QString,QString>::Iterator it; |
54 | InterfacePPP *iface; | 54 | InterfacePPP *iface; |
55 | qDebug("getting interfaces"); | 55 | qDebug("getting interfaces"); |
56 | for( it = ifaces.begin(); it != ifaces.end(); ++it ){ | 56 | for( it = ifaces.begin(); it != ifaces.end(); ++it ){ |
57 | qDebug("ifaces %s %s", it.key().latin1(), it.data().latin1() ); | 57 | qDebug("ifaces %s %s", it.key().latin1(), it.data().latin1() ); |
58 | iface = new InterfacePPP( 0, it.key() ); | 58 | iface = new InterfacePPP( 0, it.key() ); |
59 | iface->setHardwareName( it.data() ); | 59 | iface->setHardwareName( it.data() ); |
60 | list.append( (Interface*)iface ); | 60 | list.append( (Interface*)iface ); |
61 | 61 | ||
62 | // check if (*it) is one of the running ifaces | 62 | // check if (*it) is one of the running ifaces |
63 | if ( running.contains( it.data() ) ) { | 63 | if ( running.contains( it.data() ) ) { |
64 | qDebug("iface is running %s", it.key().latin1() ); | 64 | qDebug("iface is running %s", it.key().latin1() ); |
65 | handledInterfaceNames << running[it.data()].device; | 65 | handledInterfaceNames << running[it.data()].device; |
66 | iface->setStatus( true ); | 66 | iface->setStatus( true ); |
67 | iface->setPPPDpid( running[it.data()].pid ); | 67 | iface->setPPPDpid( running[it.data()].pid ); |
68 | iface->modem()->setPPPDevice( running[it.data()].device ); | 68 | iface->modem()->setPPPDevice( running[it.data()].device ); |
69 | iface->refresh(); | 69 | iface->refresh(); |
70 | } | 70 | } |
71 | } | 71 | } |
72 | 72 | ||
73 | setHandledInterfaceNames( handledInterfaceNames ); | 73 | setHandledInterfaceNames( handledInterfaceNames ); |
74 | } | 74 | } |
75 | 75 | ||
76 | /** | 76 | /** |
77 | * Delete any interfaces that we own. | 77 | * Delete any interfaces that we own. |
78 | */ | 78 | */ |
79 | PPPModule::~PPPModule(){ | 79 | PPPModule::~PPPModule(){ |
80 | qDebug("PPPModule::~PPPModule() " ); | 80 | qDebug("PPPModule::~PPPModule() " ); |
81 | QMap<QString,QString> ifaces; | 81 | QMap<QString,QString> ifaces; |
82 | InterfaceKeeper keeper; | 82 | InterfaceKeeper keeper; |
83 | Interface *i; | 83 | Interface *i; |
84 | for ( i=list.first(); i != 0; i=list.next() ){ | 84 | for ( i=list.first(); i != 0; i=list.next() ){ |
85 | /* if online save the state */ | 85 | /* if online save the state */ |
86 | if ( i->getStatus() ) { | 86 | if ( i->getStatus() ) { |
87 | qDebug("Iface %s is still up", i->getHardwareName().latin1() ); | 87 | qDebug("Iface %s is still up", i->getHardwareName().latin1() ); |
88 | InterfacePPP* ppp = static_cast<InterfacePPP*>(i); | 88 | InterfacePPP* ppp = static_cast<InterfacePPP*>(i); |
89 | keeper.addInterface( ppp->pppPID(), ppp->pppDev(), ppp->getHardwareName() ); | 89 | keeper.addInterface( ppp->pppPID(), ppp->pppDev(), ppp->getHardwareName() ); |
90 | } | 90 | } |
91 | ifaces.insert( i->getInterfaceName(), i->getHardwareName() ); | 91 | ifaces.insert( i->getInterfaceName(), i->getHardwareName() ); |
92 | delete i; | 92 | delete i; |
93 | } | 93 | } |
94 | PPPData::setConfiguredInterfaces( ifaces ); | 94 | PPPData::setConfiguredInterfaces( ifaces ); |
95 | } | 95 | } |
96 | 96 | ||
97 | /** | 97 | /** |
98 | * Change the current profile | 98 | * Change the current profile |
99 | */ | 99 | */ |
100 | void PPPModule::setProfile(const QString &newProfile){ | 100 | void PPPModule::setProfile(const QString &newProfile){ |
101 | profile = newProfile; | 101 | profile = newProfile; |
102 | } | 102 | } |
103 | 103 | ||
104 | /** | 104 | /** |
105 | * get the icon name for this device. | 105 | * get the icon name for this device. |
106 | * @param Interface* can be used in determining the icon. | 106 | * @param Interface* can be used in determining the icon. |
107 | * @return QString the icon name (minus .png, .gif etc) | 107 | * @return QString the icon name (minus .png, .gif etc) |
108 | */ | 108 | */ |
109 | QString PPPModule::getPixmapName(Interface* ){ | 109 | QString PPPModule::getPixmapName(Interface* ){ |
110 | return "ppp"; | 110 | return "ppp"; |
111 | } | 111 | } |
112 | 112 | ||
113 | /** | 113 | /** |
114 | * Check to see if the interface i is owned by this module. | 114 | * Check to see if the interface i is owned by this module. |
115 | * @param Interface* interface to check against | 115 | * @param Interface* interface to check against |
116 | * @return bool true if i is owned by this module, false otherwise. | 116 | * @return bool true if i is owned by this module, false otherwise. |
117 | */ | 117 | */ |
118 | bool PPPModule::isOwner(Interface *i){ | 118 | bool PPPModule::isOwner(Interface *i){ |
119 | return list.find( i ) != -1; | 119 | return list.find( i ) != -1; |
120 | } | 120 | } |
121 | 121 | ||
122 | /** | 122 | /** |
123 | * Create, and return the WLANConfigure Module | 123 | * Create, and return the WLANConfigure Module |
124 | * @return QWidget* pointer to this modules configure. | 124 | * @return QWidget* pointer to this modules configure. |
125 | */ | 125 | */ |
126 | QWidget *PPPModule::configure(Interface *i){ | 126 | QWidget *PPPModule::configure(Interface *i){ |
127 | qDebug("return ModemWidget"); | 127 | qDebug("return ModemWidget"); |
128 | PPPConfigWidget *pppconfig = new PPPConfigWidget( (InterfacePPP*)i, | 128 | PPPConfigWidget *pppconfig = new PPPConfigWidget( (InterfacePPP*)i, |
129 | 0, "PPPConfig", false, | 129 | 0, "PPPConfig", false, |
130 | Qt::WDestructiveClose | Qt::WStyle_ContextHelp); | 130 | Qt::WDestructiveClose | Qt::WStyle_ContextHelp); |
131 | return pppconfig; | 131 | return pppconfig; |
132 | } | 132 | } |
133 | 133 | ||
134 | /** | 134 | /** |
135 | * Create, and return the Information Module | 135 | * Create, and return the Information Module |
136 | * @return QWidget* pointer to this modules info. | 136 | * @return QWidget* pointer to this modules info. |
137 | */ | 137 | */ |
138 | QWidget *PPPModule::information(Interface *i){ | 138 | QWidget *PPPModule::information(Interface *i){ |
139 | // We don't have any advanced pppd information widget yet :-D | 139 | // We don't have any advanced pppd information widget yet :-D |
140 | // TODO ^ | 140 | // TODO ^ |
141 | 141 | ||
142 | return new InterfaceInformationPPP( 0, "InterfaceInformationPPP", i ); | 142 | return new InterfaceInformationPPP( 0, "InterfaceInformationPPP", i ); |
143 | } | 143 | } |
144 | 144 | ||
145 | /** | 145 | /** |
146 | * Get all active (up or down) interfaces | 146 | * Get all active (up or down) interfaces |
147 | * @return QList<Interface> A list of interfaces that exsist that havn't | 147 | * @return QList<Interface> A list of interfaces that exsist that havn't |
148 | * been called by isOwner() | 148 | * been called by isOwner() |
149 | */ | 149 | */ |
150 | QList<Interface> PPPModule::getInterfaces(){ | 150 | QList<Interface> PPPModule::getInterfaces(){ |
151 | // List all of the files in the peer directory | 151 | // List all of the files in the peer directory |
152 | qDebug("PPPModule::getInterfaces"); | 152 | qDebug("PPPModule::getInterfaces"); |
153 | return list; | 153 | return list; |
154 | } | 154 | } |
155 | 155 | ||
156 | /** | 156 | /** |
157 | * Attempt to add a new interface as defined by name | 157 | * Attempt to add a new interface as defined by name |
158 | * @param name the name of the type of interface that should be created given | 158 | * @param name the name of the type of interface that should be created given |
159 | * by possibleNewInterfaces(); | 159 | * by possibleNewInterfaces(); |
160 | * @return Interface* NULL if it was unable to be created. | 160 | * @return Interface* NULL if it was unable to be created. |
161 | */ | 161 | */ |
162 | Interface *PPPModule::addNewInterface(const QString &newInterface){ | 162 | Interface *PPPModule::addNewInterface(const QString &newInterface){ |
163 | 163 | ||
164 | InterfacePPP *ifaceppp; | 164 | InterfacePPP *ifaceppp; |
165 | Interface *iface; | 165 | Interface *iface; |
166 | ifaceppp = new InterfacePPP(); | 166 | ifaceppp = new InterfacePPP(); |
167 | PPPConfigWidget imp(ifaceppp, 0, "PPPConfigImp", true); | 167 | PPPConfigWidget imp(ifaceppp, 0, "PPPConfigImp", true); |
168 | imp.showMaximized(); | 168 | imp.showMaximized(); |
169 | if(imp.exec() == QDialog::Accepted ){ | 169 | if(imp.exec() == QDialog::Accepted ){ |
170 | iface = (InterfacePPP*) ifaceppp; | 170 | iface = (InterfacePPP*) ifaceppp; |
171 | iface->setModuleOwner( this ); | 171 | iface->setModuleOwner( this ); |
172 | list.append( iface ); | 172 | list.append( iface ); |
173 | return iface; | 173 | return iface; |
174 | }else { | 174 | }else { |
175 | delete ifaceppp; | 175 | delete ifaceppp; |
176 | iface = NULL; | 176 | iface = NULL; |
177 | } | 177 | } |
178 | return iface; | 178 | return iface; |
179 | } | 179 | } |
180 | 180 | ||
181 | /** | 181 | /** |
182 | * Attempts to remove the interface, doesn't delete i | 182 | * Attempts to remove the interface, doesn't delete i |
183 | * @return bool true if successfull, false otherwise. | 183 | * @return bool true if successful, false otherwise. |
184 | */ | 184 | */ |
185 | bool PPPModule::remove(Interface *i){ | 185 | bool PPPModule::remove(Interface *i){ |
186 | return list.remove(i); | 186 | return list.remove(i); |
187 | } | 187 | } |
188 | 188 | ||
189 | void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces) | 189 | void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces) |
190 | { | 190 | { |
191 | newIfaces.insert(QObject::tr("PPP") , | 191 | newIfaces.insert(QObject::tr("PPP") , |
192 | QObject::tr("generic ppp device")); | 192 | QObject::tr("generic ppp device")); |
193 | } | 193 | } |
194 | 194 | ||
195 | 195 | ||
196 | 196 | ||
197 | namespace { | 197 | namespace { |
198 | InterfaceKeeper::InterfaceKeeper( ) { | 198 | InterfaceKeeper::InterfaceKeeper( ) { |
199 | } | 199 | } |
200 | InterfaceKeeper::~InterfaceKeeper() { | 200 | InterfaceKeeper::~InterfaceKeeper() { |
201 | Config cfg("ppp_plugin_keeper"); | 201 | Config cfg("ppp_plugin_keeper"); |
202 | QStringList lst = cfg.groupList(); | 202 | QStringList lst = cfg.groupList(); |
203 | for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { | 203 | for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { |
204 | Connection con; | 204 | Connection con; |
205 | cfg.setGroup( (*it) ); | 205 | cfg.setGroup( (*it) ); |
206 | cfg.clearGroup(); | 206 | cfg.clearGroup(); |
207 | } | 207 | } |
208 | 208 | ||
209 | for (QMap<QString, Connection>::Iterator it = m_interfaces.begin(); it != m_interfaces.end(); ++it ) { | 209 | for (QMap<QString, Connection>::Iterator it = m_interfaces.begin(); it != m_interfaces.end(); ++it ) { |
210 | Connection con = it.data(); | 210 | Connection con = it.data(); |
211 | cfg.setGroup( con.name ); | 211 | cfg.setGroup( con.name ); |
212 | cfg.writeEntry( "pid", con.pid ); | 212 | cfg.writeEntry( "pid", con.pid ); |
213 | cfg.writeEntry( "device", con.device ); | 213 | cfg.writeEntry( "device", con.device ); |
214 | } | 214 | } |
215 | } | 215 | } |
216 | void InterfaceKeeper::addInterface(pid_t pid, const QString& dev, const QString& name ) { | 216 | void InterfaceKeeper::addInterface(pid_t pid, const QString& dev, const QString& name ) { |
217 | Connection con; | 217 | Connection con; |
218 | con.pid = pid; | 218 | con.pid = pid; |
219 | con.device = dev; | 219 | con.device = dev; |
220 | con.name = name; | 220 | con.name = name; |
221 | m_interfaces.insert( name, con ); | 221 | m_interfaces.insert( name, con ); |
222 | } | 222 | } |
223 | QMap<QString, Connection> InterfaceKeeper::interfaces()const { | 223 | QMap<QString, Connection> InterfaceKeeper::interfaces()const { |
224 | Config cfg("ppp_plugin_keeper"); | 224 | Config cfg("ppp_plugin_keeper"); |
225 | QMap<QString, Connection> ifaces; | 225 | QMap<QString, Connection> ifaces; |
226 | QStringList lst = cfg.groupList(); | 226 | QStringList lst = cfg.groupList(); |
227 | for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { | 227 | for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { |
228 | Connection con; | 228 | Connection con; |
229 | cfg.setGroup( (*it) ); | 229 | cfg.setGroup( (*it) ); |
230 | con.name = (*it); | 230 | con.name = (*it); |
231 | con.pid = cfg.readNumEntry("pid"); | 231 | con.pid = cfg.readNumEntry("pid"); |
232 | con.device = cfg.readEntry("device"); | 232 | con.device = cfg.readEntry("device"); |
233 | qDebug(" %s %s %d", con.name.latin1(), con.device.latin1(), con.pid ); | 233 | qDebug(" %s %s %d", con.name.latin1(), con.device.latin1(), con.pid ); |
234 | 234 | ||
235 | if ( con.pid != -1 && isAvailable( con.pid ) ) | 235 | if ( con.pid != -1 && isAvailable( con.pid ) ) |
236 | ifaces.insert( con.name, con ); | 236 | ifaces.insert( con.name, con ); |
237 | } | 237 | } |
238 | return ifaces; | 238 | return ifaces; |
239 | } | 239 | } |
240 | bool InterfaceKeeper::isAvailable( pid_t p)const { | 240 | bool InterfaceKeeper::isAvailable( pid_t p)const { |
241 | if (::kill(p, 0 ) == 0 || errno != ESRCH ) { | 241 | if (::kill(p, 0 ) == 0 || errno != ESRCH ) { |
242 | qDebug("isAvailable %d", p); | 242 | qDebug("isAvailable %d", p); |
243 | return true; | 243 | return true; |
244 | } | 244 | } |
245 | 245 | ||
246 | qDebug("notAvailable %d", p); | 246 | qDebug("notAvailable %d", p); |
247 | return false; | 247 | return false; |
248 | } | 248 | } |
249 | 249 | ||
250 | } | 250 | } |
diff --git a/noncore/settings/networksettings/wlan/wextensions.cpp b/noncore/settings/networksettings/wlan/wextensions.cpp index bd7cf93..d1fff88 100644 --- a/noncore/settings/networksettings/wlan/wextensions.cpp +++ b/noncore/settings/networksettings/wlan/wextensions.cpp | |||
@@ -1,200 +1,200 @@ | |||
1 | #include "wextensions.h" | 1 | #include "wextensions.h" |
2 | 2 | ||
3 | #include <qfile.h> | 3 | #include <qfile.h> |
4 | #include <qtextstream.h> | 4 | #include <qtextstream.h> |
5 | 5 | ||
6 | #include <arpa/inet.h> | 6 | #include <arpa/inet.h> |
7 | #include <sys/socket.h> | 7 | #include <sys/socket.h> |
8 | #include <sys/ioctl.h> | 8 | #include <sys/ioctl.h> |
9 | 9 | ||
10 | #include <math.h> | 10 | #include <math.h> |
11 | 11 | ||
12 | #define PROCNETWIRELESS "/proc/net/wireless" | 12 | #define PROCNETWIRELESS "/proc/net/wireless" |
13 | #define IW_LOWER 0 | 13 | #define IW_LOWER 0 |
14 | #define IW_UPPER 256 | 14 | #define IW_UPPER 256 |
15 | 15 | ||
16 | /** | 16 | /** |
17 | * Constructor. Sets hasWirelessExtensions | 17 | * Constructor. Sets hasWirelessExtensions |
18 | */ | 18 | */ |
19 | WExtensions::WExtensions(QString interfaceName): hasWirelessExtensions(false), interface(interfaceName) { | 19 | WExtensions::WExtensions(QString interfaceName): hasWirelessExtensions(false), interface(interfaceName) { |
20 | fd = socket( AF_INET, SOCK_DGRAM, 0 ); | 20 | fd = socket( AF_INET, SOCK_DGRAM, 0 ); |
21 | if(fd == -1) | 21 | if(fd == -1) |
22 | return; | 22 | return; |
23 | 23 | ||
24 | const char* buffer[200]; | 24 | const char* buffer[200]; |
25 | memset( &iwr, 0, sizeof( iwr ) ); | 25 | memset( &iwr, 0, sizeof( iwr ) ); |
26 | iwr.u.essid.pointer = (caddr_t) buffer; | 26 | iwr.u.essid.pointer = (caddr_t) buffer; |
27 | iwr.u.essid.length = IW_ESSID_MAX_SIZE; | 27 | iwr.u.essid.length = IW_ESSID_MAX_SIZE; |
28 | iwr.u.essid.flags = 0; | 28 | iwr.u.essid.flags = 0; |
29 | 29 | ||
30 | // check if it is an IEEE 802.11 standard conform | 30 | // check if it is an IEEE 802.11 standard conform |
31 | // wireless device by sending SIOCGIWESSID | 31 | // wireless device by sending SIOCGIWESSID |
32 | // which also gives back the Extended Service Set ID | 32 | // which also gives back the Extended Service Set ID |
33 | // (see IEEE 802.11 for more information) | 33 | // (see IEEE 802.11 for more information) |
34 | 34 | ||
35 | const char* iname = interface.latin1(); | 35 | const char* iname = interface.latin1(); |
36 | strcpy( iwr.ifr_ifrn.ifrn_name, (const char *)iname ); | 36 | strcpy( iwr.ifr_ifrn.ifrn_name, (const char *)iname ); |
37 | if ( 0 == ioctl( fd, SIOCGIWESSID, &iwr ) ) | 37 | if ( 0 == ioctl( fd, SIOCGIWESSID, &iwr ) ) |
38 | hasWirelessExtensions = true; | 38 | hasWirelessExtensions = true; |
39 | } | 39 | } |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * @return QString the station name of the access point. | 42 | * @return QString the station name of the access point. |
43 | */ | 43 | */ |
44 | QString WExtensions::station(){ | 44 | QString WExtensions::station(){ |
45 | if(!hasWirelessExtensions) | 45 | if(!hasWirelessExtensions) |
46 | return QString(); | 46 | return QString(); |
47 | const char* buffer[200]; | 47 | const char* buffer[200]; |
48 | iwr.u.data.pointer = (caddr_t) buffer; | 48 | iwr.u.data.pointer = (caddr_t) buffer; |
49 | iwr.u.data.length = IW_ESSID_MAX_SIZE; | 49 | iwr.u.data.length = IW_ESSID_MAX_SIZE; |
50 | iwr.u.data.flags = 0; | 50 | iwr.u.data.flags = 0; |
51 | if ( 0 == ioctl( fd, SIOCGIWNICKN, &iwr )){ | 51 | if ( 0 == ioctl( fd, SIOCGIWNICKN, &iwr )){ |
52 | iwr.u.data.pointer[(unsigned int) iwr.u.data.length-1] = '\0'; | 52 | iwr.u.data.pointer[(unsigned int) iwr.u.data.length-1] = '\0'; |
53 | return QString(iwr.u.data.pointer); | 53 | return QString(iwr.u.data.pointer); |
54 | } | 54 | } |
55 | return QString(); | 55 | return QString(); |
56 | } | 56 | } |
57 | 57 | ||
58 | /** | 58 | /** |
59 | * @return QString the essid of the host 802.11 access point. | 59 | * @return QString the essid of the host 802.11 access point. |
60 | */ | 60 | */ |
61 | QString WExtensions::essid(){ | 61 | QString WExtensions::essid(){ |
62 | if(!hasWirelessExtensions) | 62 | if(!hasWirelessExtensions) |
63 | return QString(); | 63 | return QString(); |
64 | if ( 0 == ioctl( fd, SIOCGIWESSID, &iwr )){ | 64 | if ( 0 == ioctl( fd, SIOCGIWESSID, &iwr )){ |
65 | iwr.u.essid.pointer[(unsigned int) iwr.u.essid.length] = '\0'; | 65 | iwr.u.essid.pointer[(unsigned int) iwr.u.essid.length] = '\0'; |
66 | return QString(iwr.u.essid.pointer); | 66 | return QString(iwr.u.essid.pointer); |
67 | } | 67 | } |
68 | return QString(); | 68 | return QString(); |
69 | } | 69 | } |
70 | 70 | ||
71 | /** | 71 | /** |
72 | * @return QString the mode of interface | 72 | * @return QString the mode of interface |
73 | */ | 73 | */ |
74 | QString WExtensions::mode(){ | 74 | QString WExtensions::mode(){ |
75 | if(!hasWirelessExtensions) | 75 | if(!hasWirelessExtensions) |
76 | return QString(); | 76 | return QString(); |
77 | if ( 0 == ioctl( fd, SIOCGIWMODE, &iwr ) ) | 77 | if ( 0 == ioctl( fd, SIOCGIWMODE, &iwr ) ) |
78 | return QString("%1").arg(iwr.u.mode == IW_MODE_ADHOC ? "Ad-Hoc" : "Managed"); | 78 | return QString("%1").arg(iwr.u.mode == IW_MODE_ADHOC ? "Ad-Hoc" : "Managed"); |
79 | return QString(); | 79 | return QString(); |
80 | } | 80 | } |
81 | 81 | ||
82 | /** | 82 | /** |
83 | * Get the frequency that the interface is running at. | 83 | * Get the frequency that the interface is running at. |
84 | * @return int the frequency that the interfacae is running at. | 84 | * @return int the frequency that the interfacae is running at. |
85 | */ | 85 | */ |
86 | double WExtensions::frequency(){ | 86 | double WExtensions::frequency(){ |
87 | if(!hasWirelessExtensions) | 87 | if(!hasWirelessExtensions) |
88 | return 0; | 88 | return 0; |
89 | if ( 0 == ioctl( fd, SIOCGIWFREQ, &iwr )) | 89 | if ( 0 == ioctl( fd, SIOCGIWFREQ, &iwr )) |
90 | return (double( iwr.u.freq.m ) * pow( 10, iwr.u.freq.e ) / 1000000000); | 90 | return (double( iwr.u.freq.m ) * pow( 10, iwr.u.freq.e ) / 1000000000); |
91 | return 0; | 91 | return 0; |
92 | } | 92 | } |
93 | 93 | ||
94 | /** | 94 | /** |
95 | * Get the channel that the interface is running at. | 95 | * Get the channel that the interface is running at. |
96 | * @return int the channel that the interfacae is running at. | 96 | * @return int the channel that the interfacae is running at. |
97 | */ | 97 | */ |
98 | int WExtensions::channel(){ | 98 | int WExtensions::channel(){ |
99 | if(!hasWirelessExtensions) | 99 | if(!hasWirelessExtensions) |
100 | return 0; | 100 | return 0; |
101 | if ( 0 != ioctl( fd, SIOCGIWFREQ, &iwr )) | 101 | if ( 0 != ioctl( fd, SIOCGIWFREQ, &iwr )) |
102 | return 0; | 102 | return 0; |
103 | 103 | ||
104 | // http://www.elanix.com/pdf/an137e.pdf | 104 | // http://www.elanix.com/pdf/an137e.pdf |
105 | 105 | ||
106 | double num = (double( iwr.u.freq.m ) * pow( 10, iwr.u.freq.e ) / 1000000000); | 106 | double num = (double( iwr.u.freq.m ) * pow( 10, iwr.u.freq.e ) / 1000000000); |
107 | double left = 2.401; | 107 | double left = 2.401; |
108 | double right = 2.416; | 108 | double right = 2.416; |
109 | for(int channel = 1; channel<= 15; channel++){ | 109 | for(int channel = 1; channel<= 15; channel++){ |
110 | if( num >= left && num <= right ) | 110 | if( num >= left && num <= right ) |
111 | return channel; | 111 | return channel; |
112 | left += 0.005; | 112 | left += 0.005; |
113 | right += 0.005; | 113 | right += 0.005; |
114 | } | 114 | } |
115 | qDebug(QString("Unknown frequency: %1, returning -1 for the channel.").arg(num).latin1()); | 115 | qDebug(QString("Unknown frequency: %1, returning -1 for the channel.").arg(num).latin1()); |
116 | return -1; | 116 | return -1; |
117 | } | 117 | } |
118 | 118 | ||
119 | /*** | 119 | /*** |
120 | * Get the current rate that the card is transmiting at. | 120 | * Get the current rate that the card is transmiting at. |
121 | * @return double the rate, 0 if error. | 121 | * @return double the rate, 0 if error. |
122 | */ | 122 | */ |
123 | double WExtensions::rate(){ | 123 | double WExtensions::rate(){ |
124 | if(!hasWirelessExtensions) | 124 | if(!hasWirelessExtensions) |
125 | return 0; | 125 | return 0; |
126 | if(0 == ioctl(fd, SIOCGIWRATE, &iwr)){ | 126 | if(0 == ioctl(fd, SIOCGIWRATE, &iwr)){ |
127 | return ((double)iwr.u.bitrate.value)/1000000; | 127 | return ((double)iwr.u.bitrate.value)/1000000; |
128 | } | 128 | } |
129 | return 0; | 129 | return 0; |
130 | } | 130 | } |
131 | 131 | ||
132 | 132 | ||
133 | /** | 133 | /** |
134 | * @return QString the AccessPoint that the interface is connected to. | 134 | * @return QString the AccessPoint that the interface is connected to. |
135 | */ | 135 | */ |
136 | QString WExtensions::ap(){ | 136 | QString WExtensions::ap(){ |
137 | if(!hasWirelessExtensions) | 137 | if(!hasWirelessExtensions) |
138 | return QString(); | 138 | return QString(); |
139 | if ( 0 == ioctl( fd, SIOCGIWAP, &iwr )){ | 139 | if ( 0 == ioctl( fd, SIOCGIWAP, &iwr )){ |
140 | QString ap; | 140 | QString ap; |
141 | ap = ap.sprintf( "%.2X:%.2X:%.2X:%.2X:%.2X:%.2X", | 141 | ap = ap.sprintf( "%.2X:%.2X:%.2X:%.2X:%.2X:%.2X", |
142 | iwr.u.ap_addr.sa_data[0]&0xff, | 142 | iwr.u.ap_addr.sa_data[0]&0xff, |
143 | iwr.u.ap_addr.sa_data[1]&0xff, | 143 | iwr.u.ap_addr.sa_data[1]&0xff, |
144 | iwr.u.ap_addr.sa_data[2]&0xff, | 144 | iwr.u.ap_addr.sa_data[2]&0xff, |
145 | iwr.u.ap_addr.sa_data[3]&0xff, | 145 | iwr.u.ap_addr.sa_data[3]&0xff, |
146 | iwr.u.ap_addr.sa_data[4]&0xff, | 146 | iwr.u.ap_addr.sa_data[4]&0xff, |
147 | iwr.u.ap_addr.sa_data[5]&0xff ); | 147 | iwr.u.ap_addr.sa_data[5]&0xff ); |
148 | return ap; | 148 | return ap; |
149 | } | 149 | } |
150 | else return QString(); | 150 | else return QString(); |
151 | } | 151 | } |
152 | 152 | ||
153 | /** | 153 | /** |
154 | * Get the stats for interfaces | 154 | * Get the stats for interfaces |
155 | * @param signal the signal strength of interface | 155 | * @param signal the signal strength of interface |
156 | * @param noise the noise level of the interface | 156 | * @param noise the noise level of the interface |
157 | * @param quality the quality level of the interface | 157 | * @param quality the quality level of the interface |
158 | * @return bool true if successfull | 158 | * @return bool true if successful |
159 | */ | 159 | */ |
160 | bool WExtensions::stats(int &signal, int &noise, int &quality){ | 160 | bool WExtensions::stats(int &signal, int &noise, int &quality){ |
161 | // gather link quality from /proc/net/wireless | 161 | // gather link quality from /proc/net/wireless |
162 | if(!QFile::exists(PROCNETWIRELESS)) | 162 | if(!QFile::exists(PROCNETWIRELESS)) |
163 | return false; | 163 | return false; |
164 | 164 | ||
165 | char c; | 165 | char c; |
166 | QString status; | 166 | QString status; |
167 | QString name; | 167 | QString name; |
168 | 168 | ||
169 | QFile wfile( PROCNETWIRELESS ); | 169 | QFile wfile( PROCNETWIRELESS ); |
170 | if(!wfile.open( IO_ReadOnly )) | 170 | if(!wfile.open( IO_ReadOnly )) |
171 | return false; | 171 | return false; |
172 | 172 | ||
173 | QTextStream wstream( &wfile ); | 173 | QTextStream wstream( &wfile ); |
174 | wstream.readLine(); // skip the first two lines | 174 | wstream.readLine(); // skip the first two lines |
175 | wstream.readLine(); // because they only contain headers | 175 | wstream.readLine(); // because they only contain headers |
176 | while(!wstream.atEnd()){ | 176 | while(!wstream.atEnd()){ |
177 | wstream >> name >> status >> quality >> c >> signal >> c >> noise; | 177 | wstream >> name >> status >> quality >> c >> signal >> c >> noise; |
178 | if(name == QString("%1:").arg(interface)){ | 178 | if(name == QString("%1:").arg(interface)){ |
179 | if ( quality > 92 ) | 179 | if ( quality > 92 ) |
180 | qDebug( "WIFIAPPLET: D'oh! Quality %d > estimated max!\n", quality ); | 180 | qDebug( "WIFIAPPLET: D'oh! Quality %d > estimated max!\n", quality ); |
181 | if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) ) | 181 | if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) ) |
182 | qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal ); | 182 | qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal ); |
183 | if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) ) | 183 | if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) ) |
184 | qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise ); | 184 | qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise ); |
185 | //qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1()); | 185 | //qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1()); |
186 | signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER; | 186 | signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER; |
187 | noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER; | 187 | noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER; |
188 | quality = ( quality*100 ) / 92; | 188 | quality = ( quality*100 ) / 92; |
189 | return true; | 189 | return true; |
190 | } | 190 | } |
191 | } | 191 | } |
192 | 192 | ||
193 | qDebug("WExtensions::statsCard no longer present."); | 193 | qDebug("WExtensions::statsCard no longer present."); |
194 | quality = -1; | 194 | quality = -1; |
195 | signal = IW_LOWER; | 195 | signal = IW_LOWER; |
196 | noise = IW_LOWER; | 196 | noise = IW_LOWER; |
197 | return false; | 197 | return false; |
198 | } | 198 | } |
199 | 199 | ||
200 | // wextensions.cpp | 200 | // wextensions.cpp |
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index b4c3509..07bf73f 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp | |||
@@ -1,252 +1,252 @@ | |||
1 | #include "wlanmodule.h" | 1 | #include "wlanmodule.h" |
2 | #include "wlanimp2.h" | 2 | #include "wlanimp2.h" |
3 | #include "infoimp.h" | 3 | #include "infoimp.h" |
4 | #include "wextensions.h" | 4 | #include "wextensions.h" |
5 | #include "interfaceinformationimp.h" | 5 | #include "interfaceinformationimp.h" |
6 | 6 | ||
7 | #include <qcheckbox.h> | 7 | #include <qcheckbox.h> |
8 | #include <qcombobox.h> | 8 | #include <qcombobox.h> |
9 | #include <qlabel.h> | 9 | #include <qlabel.h> |
10 | #include <qlineedit.h> | 10 | #include <qlineedit.h> |
11 | #include <qprogressbar.h> | 11 | #include <qprogressbar.h> |
12 | #include <qspinbox.h> | 12 | #include <qspinbox.h> |
13 | #include <qtabwidget.h> | 13 | #include <qtabwidget.h> |
14 | 14 | ||
15 | 15 | ||
16 | 16 | ||
17 | 17 | ||
18 | /** | 18 | /** |
19 | * Constructor, find all of the possible interfaces | 19 | * Constructor, find all of the possible interfaces |
20 | */ | 20 | */ |
21 | WLANModule::WLANModule() | 21 | WLANModule::WLANModule() |
22 | : Module(), | 22 | : Module(), |
23 | wlanconfigWiget(0) | 23 | wlanconfigWiget(0) |
24 | { | 24 | { |
25 | } | 25 | } |
26 | 26 | ||
27 | /** | 27 | /** |
28 | * Delete any interfaces that we own. | 28 | * Delete any interfaces that we own. |
29 | */ | 29 | */ |
30 | WLANModule::~WLANModule(){ | 30 | WLANModule::~WLANModule(){ |
31 | Interface *i; | 31 | Interface *i; |
32 | for ( i=list.first(); i != 0; i=list.next() ) | 32 | for ( i=list.first(); i != 0; i=list.next() ) |
33 | delete i; | 33 | delete i; |
34 | 34 | ||
35 | } | 35 | } |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * Change the current profile | 38 | * Change the current profile |
39 | */ | 39 | */ |
40 | void WLANModule::setProfile(const QString &newProfile){ | 40 | void WLANModule::setProfile(const QString &newProfile){ |
41 | profile = newProfile; | 41 | profile = newProfile; |
42 | } | 42 | } |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * get the icon name for this device. | 45 | * get the icon name for this device. |
46 | * @param Interface* can be used in determining the icon. | 46 | * @param Interface* can be used in determining the icon. |
47 | * @return QString the icon name (minus .png, .gif etc) | 47 | * @return QString the icon name (minus .png, .gif etc) |
48 | */ | 48 | */ |
49 | QString WLANModule::getPixmapName(Interface* ){ | 49 | QString WLANModule::getPixmapName(Interface* ){ |
50 | return "wlan"; | 50 | return "wlan"; |
51 | } | 51 | } |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * Check to see if the interface i is owned by this module. | 54 | * Check to see if the interface i is owned by this module. |
55 | * @param Interface* interface to check against | 55 | * @param Interface* interface to check against |
56 | * @return bool true if i is owned by this module, false otherwise. | 56 | * @return bool true if i is owned by this module, false otherwise. |
57 | */ | 57 | */ |
58 | bool WLANModule::isOwner(Interface *i){ | 58 | bool WLANModule::isOwner(Interface *i){ |
59 | WExtensions we(i->getInterfaceName()); | 59 | WExtensions we(i->getInterfaceName()); |
60 | if(!we.doesHaveWirelessExtensions()) | 60 | if(!we.doesHaveWirelessExtensions()) |
61 | return false; | 61 | return false; |
62 | 62 | ||
63 | i->setHardwareName("802.11b"); | 63 | i->setHardwareName("802.11b"); |
64 | list.append(i); | 64 | list.append(i); |
65 | return true; | 65 | return true; |
66 | } | 66 | } |
67 | 67 | ||
68 | /** | 68 | /** |
69 | * Create, and return the WLANConfigure Module | 69 | * Create, and return the WLANConfigure Module |
70 | * @return QWidget* pointer to this modules configure. | 70 | * @return QWidget* pointer to this modules configure. |
71 | */ | 71 | */ |
72 | QWidget *WLANModule::configure(Interface *i){ | 72 | QWidget *WLANModule::configure(Interface *i){ |
73 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, true, Qt::WDestructiveClose); | 73 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, true, Qt::WDestructiveClose); |
74 | wlanconfig->setProfile(profile); | 74 | wlanconfig->setProfile(profile); |
75 | return wlanconfig; | 75 | return wlanconfig; |
76 | } | 76 | } |
77 | 77 | ||
78 | /** | 78 | /** |
79 | * Create, and return the Information Module | 79 | * Create, and return the Information Module |
80 | * @return QWidget* pointer to this modules info. | 80 | * @return QWidget* pointer to this modules info. |
81 | */ | 81 | */ |
82 | QWidget *WLANModule::information(Interface *i){ | 82 | QWidget *WLANModule::information(Interface *i){ |
83 | WExtensions we(i->getInterfaceName()); | 83 | WExtensions we(i->getInterfaceName()); |
84 | if(!we.doesHaveWirelessExtensions()) | 84 | if(!we.doesHaveWirelessExtensions()) |
85 | return NULL; | 85 | return NULL; |
86 | 86 | ||
87 | return getInfo( i ); | 87 | return getInfo( i ); |
88 | } | 88 | } |
89 | 89 | ||
90 | /** | 90 | /** |
91 | * Get all active (up or down) interfaces | 91 | * Get all active (up or down) interfaces |
92 | * @return QList<Interface> A list of interfaces that exsist that havn't | 92 | * @return QList<Interface> A list of interfaces that exsist that havn't |
93 | * been called by isOwner() | 93 | * been called by isOwner() |
94 | */ | 94 | */ |
95 | QList<Interface> WLANModule::getInterfaces(){ | 95 | QList<Interface> WLANModule::getInterfaces(){ |
96 | return list; | 96 | return list; |
97 | } | 97 | } |
98 | 98 | ||
99 | /** | 99 | /** |
100 | * Attempt to add a new interface as defined by name | 100 | * Attempt to add a new interface as defined by name |
101 | * @param name the name of the type of interface that should be created given | 101 | * @param name the name of the type of interface that should be created given |
102 | * by possibleNewInterfaces(); | 102 | * by possibleNewInterfaces(); |
103 | * @return Interface* NULL if it was unable to be created. | 103 | * @return Interface* NULL if it was unable to be created. |
104 | */ | 104 | */ |
105 | Interface *WLANModule::addNewInterface(const QString &){ | 105 | Interface *WLANModule::addNewInterface(const QString &){ |
106 | // We can't add a 802.11 interface, either the hardware will be there | 106 | // We can't add a 802.11 interface, either the hardware will be there |
107 | // or it wont. | 107 | // or it wont. |
108 | return NULL; | 108 | return NULL; |
109 | } | 109 | } |
110 | 110 | ||
111 | /** | 111 | /** |
112 | * Attempts to remove the interface, doesn't delete i | 112 | * Attempts to remove the interface, doesn't delete i |
113 | * @return bool true if successfull, false otherwise. | 113 | * @return bool true if successful, false otherwise. |
114 | */ | 114 | */ |
115 | bool WLANModule::remove(Interface*){ | 115 | bool WLANModule::remove(Interface*){ |
116 | // Can't remove a hardware device, you can stop it though. | 116 | // Can't remove a hardware device, you can stop it though. |
117 | return false; | 117 | return false; |
118 | } | 118 | } |
119 | 119 | ||
120 | void WLANModule::receive(const QCString ¶m, const QByteArray &arg) | 120 | void WLANModule::receive(const QCString ¶m, const QByteArray &arg) |
121 | { | 121 | { |
122 | qDebug("WLANModule::receive "+param); | 122 | qDebug("WLANModule::receive "+param); |
123 | QStringList params = QStringList::split(",",param); | 123 | QStringList params = QStringList::split(",",param); |
124 | int count = params.count(); | 124 | int count = params.count(); |
125 | qDebug("WLANModule got %i params", count ); | 125 | qDebug("WLANModule got %i params", count ); |
126 | if (count < 2){ | 126 | if (count < 2){ |
127 | qDebug("Erorr less than 2 parameter"); | 127 | qDebug("Erorr less than 2 parameter"); |
128 | qDebug("RETURNING"); | 128 | qDebug("RETURNING"); |
129 | return; | 129 | return; |
130 | } | 130 | } |
131 | 131 | ||
132 | QDataStream stream(arg,IO_ReadOnly); | 132 | QDataStream stream(arg,IO_ReadOnly); |
133 | QString interface; | 133 | QString interface; |
134 | QString action; | 134 | QString action; |
135 | int countMsgs = 0; | 135 | int countMsgs = 0; |
136 | stream >> interface; | 136 | stream >> interface; |
137 | qDebug("got count? >%s<",interface.latin1()); | 137 | qDebug("got count? >%s<",interface.latin1()); |
138 | if (interface == "count"){ | 138 | if (interface == "count"){ |
139 | qDebug("got count"); | 139 | qDebug("got count"); |
140 | stream >> action; | 140 | stream >> action; |
141 | qDebug("Got count num >%s<", action.latin1()); | 141 | qDebug("Got count num >%s<", action.latin1()); |
142 | countMsgs = action.toInt(); | 142 | countMsgs = action.toInt(); |
143 | } | 143 | } |
144 | 144 | ||
145 | QDialog *toShow; | 145 | QDialog *toShow; |
146 | //while (! stream.atEnd() ){ | 146 | //while (! stream.atEnd() ){ |
147 | for (int i = 0; i < countMsgs; i++){ | 147 | for (int i = 0; i < countMsgs; i++){ |
148 | qDebug("start stream %d/%d",i,countMsgs); | 148 | qDebug("start stream %d/%d",i,countMsgs); |
149 | if (stream.atEnd()){ | 149 | if (stream.atEnd()){ |
150 | qDebug("end of stream"); | 150 | qDebug("end of stream"); |
151 | return; | 151 | return; |
152 | } | 152 | } |
153 | stream >> interface; | 153 | stream >> interface; |
154 | qDebug("got iface"); | 154 | qDebug("got iface"); |
155 | stream >> action; | 155 | stream >> action; |
156 | qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1()); | 156 | qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1()); |
157 | // find interfaces | 157 | // find interfaces |
158 | Interface *ifa=0; | 158 | Interface *ifa=0; |
159 | for ( Interface *i=list.first(); i != 0; i=list.next() ){ | 159 | for ( Interface *i=list.first(); i != 0; i=list.next() ){ |
160 | if (i->getInterfaceName() == interface){ | 160 | if (i->getInterfaceName() == interface){ |
161 | qDebug("WLANModule found interface %s",interface.latin1()); | 161 | qDebug("WLANModule found interface %s",interface.latin1()); |
162 | ifa = i; | 162 | ifa = i; |
163 | } | 163 | } |
164 | } | 164 | } |
165 | 165 | ||
166 | if (ifa == 0){ | 166 | if (ifa == 0){ |
167 | qDebug("WLANModule Did not find %s",interface.latin1()); | 167 | qDebug("WLANModule Did not find %s",interface.latin1()); |
168 | qDebug("skipping"); | 168 | qDebug("skipping"); |
169 | count = 0; | 169 | count = 0; |
170 | } | 170 | } |
171 | 171 | ||
172 | if (count == 2){ | 172 | if (count == 2){ |
173 | // those should call the interface directly | 173 | // those should call the interface directly |
174 | QWidget *info = getInfo( ifa ); | 174 | QWidget *info = getInfo( ifa ); |
175 | info->showMaximized(); | 175 | info->showMaximized(); |
176 | 176 | ||
177 | if ( action.contains("start" ) ){ | 177 | if ( action.contains("start" ) ){ |
178 | ifa->start(); | 178 | ifa->start(); |
179 | } else if ( action.contains("restart" ) ){ | 179 | } else if ( action.contains("restart" ) ){ |
180 | ifa->restart(); | 180 | ifa->restart(); |
181 | } else if ( action.contains("stop" ) ){ | 181 | } else if ( action.contains("stop" ) ){ |
182 | ifa->stop(); | 182 | ifa->stop(); |
183 | }else if ( action.contains("refresh" ) ){ | 183 | }else if ( action.contains("refresh" ) ){ |
184 | ifa->refresh(); | 184 | ifa->refresh(); |
185 | } | 185 | } |
186 | }else if (count == 3){ | 186 | }else if (count == 3){ |
187 | QString value; | 187 | QString value; |
188 | if (!wlanconfigWiget){ | 188 | if (!wlanconfigWiget){ |
189 | //FIXME: what if it got closed meanwhile? | 189 | //FIXME: what if it got closed meanwhile? |
190 | wlanconfigWiget = (WLANImp*) configure(ifa); | 190 | wlanconfigWiget = (WLANImp*) configure(ifa); |
191 | toShow = (QDialog*) wlanconfigWiget; | 191 | toShow = (QDialog*) wlanconfigWiget; |
192 | } | 192 | } |
193 | wlanconfigWiget->showMaximized(); | 193 | wlanconfigWiget->showMaximized(); |
194 | stream >> value; | 194 | stream >> value; |
195 | qDebug("WLANModule (build 4) is setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() ); | 195 | qDebug("WLANModule (build 4) is setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() ); |
196 | if (value.isEmpty()){ | 196 | if (value.isEmpty()){ |
197 | qDebug("value is empty!!!\nreturning"); | 197 | qDebug("value is empty!!!\nreturning"); |
198 | return; | 198 | return; |
199 | } | 199 | } |
200 | if ( action.contains("ESSID") ){ | 200 | if ( action.contains("ESSID") ){ |
201 | QComboBox *combo = wlanconfigWiget->essid; | 201 | QComboBox *combo = wlanconfigWiget->essid; |
202 | bool found = false; | 202 | bool found = false; |
203 | for ( int i = 0; i < combo->count(); i++) | 203 | for ( int i = 0; i < combo->count(); i++) |
204 | if ( combo->text( i ) == value ){ | 204 | if ( combo->text( i ) == value ){ |
205 | combo->setCurrentItem( i ); | 205 | combo->setCurrentItem( i ); |
206 | found = true; | 206 | found = true; |
207 | } | 207 | } |
208 | if (!found) combo->insertItem( value, 0 ); | 208 | if (!found) combo->insertItem( value, 0 ); |
209 | }else if ( action.contains("Mode") ){ | 209 | }else if ( action.contains("Mode") ){ |
210 | QComboBox *combo = wlanconfigWiget->mode; | 210 | QComboBox *combo = wlanconfigWiget->mode; |
211 | for ( int i = 0; i < combo->count(); i++) | 211 | for ( int i = 0; i < combo->count(); i++) |
212 | if ( combo->text( i ) == value ){ | 212 | if ( combo->text( i ) == value ){ |
213 | combo->setCurrentItem( i ); | 213 | combo->setCurrentItem( i ); |
214 | } | 214 | } |
215 | 215 | ||
216 | }else if (action.contains("Channel")){ | 216 | }else if (action.contains("Channel")){ |
217 | bool ok; | 217 | bool ok; |
218 | qDebug("converting channel"); | 218 | qDebug("converting channel"); |
219 | int chan = value.toInt( &ok ); | 219 | int chan = value.toInt( &ok ); |
220 | if (ok){ | 220 | if (ok){ |
221 | qDebug("ok setting channel"); | 221 | qDebug("ok setting channel"); |
222 | wlanconfigWiget->specifyChan->setChecked( true ); | 222 | wlanconfigWiget->specifyChan->setChecked( true ); |
223 | wlanconfigWiget->networkChannel->setValue( chan ); | 223 | wlanconfigWiget->networkChannel->setValue( chan ); |
224 | } | 224 | } |
225 | }else if (action.contains("MacAddr")){ | 225 | }else if (action.contains("MacAddr")){ |
226 | wlanconfigWiget->specifyAp->setChecked( true ); | 226 | wlanconfigWiget->specifyAp->setChecked( true ); |
227 | wlanconfigWiget->macEdit->setText( value ); | 227 | wlanconfigWiget->macEdit->setText( value ); |
228 | }else | 228 | }else |
229 | qDebug("wlan plugin has no clue"); | 229 | qDebug("wlan plugin has no clue"); |
230 | } | 230 | } |
231 | qDebug("next stream"); | 231 | qDebug("next stream"); |
232 | }// while stream | 232 | }// while stream |
233 | qDebug("end of stream"); | 233 | qDebug("end of stream"); |
234 | if (toShow) toShow->exec(); | 234 | if (toShow) toShow->exec(); |
235 | qDebug("returning"); | 235 | qDebug("returning"); |
236 | } | 236 | } |
237 | 237 | ||
238 | QWidget *WLANModule::getInfo( Interface *i) | 238 | QWidget *WLANModule::getInfo( Interface *i) |
239 | { | 239 | { |
240 | qDebug("WLANModule::getInfo start"); | 240 | qDebug("WLANModule::getInfo start"); |
241 | WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose); | 241 | WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose); |
242 | InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i); | 242 | InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i); |
243 | info->tabWidget->insertTab(information, "TCP/IP", 0); | 243 | info->tabWidget->insertTab(information, "TCP/IP", 0); |
244 | info->tabWidget->setCurrentPage( 0 ); | 244 | info->tabWidget->setCurrentPage( 0 ); |
245 | info->tabWidget->showPage( information ); | 245 | info->tabWidget->showPage( information ); |
246 | if (info->tabWidget->currentPage() == information ) qDebug("infotab OK"); | 246 | if (info->tabWidget->currentPage() == information ) qDebug("infotab OK"); |
247 | else qDebug("infotab NOT OK"); | 247 | else qDebug("infotab NOT OK"); |
248 | qDebug("current idx %d", info->tabWidget->currentPageIndex()); | 248 | qDebug("current idx %d", info->tabWidget->currentPageIndex()); |
249 | qDebug("WLANModule::getInfo return"); | 249 | qDebug("WLANModule::getInfo return"); |
250 | return info; | 250 | return info; |
251 | } | 251 | } |
252 | 252 | ||
diff --git a/noncore/settings/tabmanager/tabmanager.cpp b/noncore/settings/tabmanager/tabmanager.cpp index c9d7aed..ff5957c 100644 --- a/noncore/settings/tabmanager/tabmanager.cpp +++ b/noncore/settings/tabmanager/tabmanager.cpp | |||
@@ -1,508 +1,508 @@ | |||
1 | #include "tabmanager.h" | 1 | #include "tabmanager.h" |
2 | #include "app.h" | 2 | #include "app.h" |
3 | #include "wait.h" | 3 | #include "wait.h" |
4 | #include "tabapplnk.h" | 4 | #include "tabapplnk.h" |
5 | 5 | ||
6 | #include <qpe/applnk.h> | 6 | #include <qpe/applnk.h> |
7 | #include <qdir.h> | 7 | #include <qdir.h> |
8 | #include <qfile.h> | 8 | #include <qfile.h> |
9 | #include <qtextstream.h> | 9 | #include <qtextstream.h> |
10 | #include <qlistview.h> | 10 | #include <qlistview.h> |
11 | #include <qheader.h> | 11 | #include <qheader.h> |
12 | #include <qcombobox.h> | 12 | #include <qcombobox.h> |
13 | #include <qlineedit.h> | 13 | #include <qlineedit.h> |
14 | #include <qlabel.h> | 14 | #include <qlabel.h> |
15 | #include <qmessagebox.h> | 15 | #include <qmessagebox.h> |
16 | #include <stdlib.h> | 16 | #include <stdlib.h> |
17 | #include <qpe/qcopenvelope_qws.h> | 17 | #include <qpe/qcopenvelope_qws.h> |
18 | #include <qpe/qpeapplication.h> | 18 | #include <qpe/qpeapplication.h> |
19 | #include <qpe/resource.h> | 19 | #include <qpe/resource.h> |
20 | 20 | ||
21 | 21 | ||
22 | #define HOME_APP_DIR QPEApplication::qpeDir()+"/apps" | 22 | #define HOME_APP_DIR QPEApplication::qpeDir()+"/apps" |
23 | #define HOME_APP_INSTALL_DIR "/usr/lib/ipkg/info" | 23 | #define HOME_APP_INSTALL_DIR "/usr/lib/ipkg/info" |
24 | #define NEW_FOLDER "EmptyTab" | 24 | #define NEW_FOLDER "EmptyTab" |
25 | #define NEW_APPLICATION "NewApp" | 25 | #define NEW_APPLICATION "NewApp" |
26 | #define APPLICATION_EXTENSION ".desktop" | 26 | #define APPLICATION_EXTENSION ".desktop" |
27 | #define APPLICATION_EXTENSION_LENGTH 8 | 27 | #define APPLICATION_EXTENSION_LENGTH 8 |
28 | 28 | ||
29 | /** | 29 | /** |
30 | * Constructor. Sets up signals. Performs initial scan of applications | 30 | * Constructor. Sets up signals. Performs initial scan of applications |
31 | * and tabs | 31 | * and tabs |
32 | */ | 32 | */ |
33 | TabManager::TabManager( QWidget* parent, const char* name):TabManagerBase(parent, name), changed(false), application(NULL){ | 33 | TabManager::TabManager( QWidget* parent, const char* name):TabManagerBase(parent, name), changed(false), application(NULL){ |
34 | rescanFolder(HOME_APP_DIR); | 34 | rescanFolder(HOME_APP_DIR); |
35 | 35 | ||
36 | // Connect the signals and slots | 36 | // Connect the signals and slots |
37 | connect(tabList, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(editItem(QListViewItem*))); | 37 | connect(tabList, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(editItem(QListViewItem*))); |
38 | (tabList->header())->hide(); | 38 | (tabList->header())->hide(); |
39 | connect(tabList, SIGNAL(moveItem(QListViewItem *, QListViewItem *)), this, SLOT(moveApplication(QListViewItem *, QListViewItem *))); | 39 | connect(tabList, SIGNAL(moveItem(QListViewItem *, QListViewItem *)), this, SLOT(moveApplication(QListViewItem *, QListViewItem *))); |
40 | } | 40 | } |
41 | 41 | ||
42 | /** | 42 | /** |
43 | * If anything in the tab's have been changed then update the system or alert | 43 | * If anything in the tab's have been changed then update the system or alert |
44 | * the user. | 44 | * the user. |
45 | */ | 45 | */ |
46 | TabManager::~TabManager(){ | 46 | TabManager::~TabManager(){ |
47 | if(changed){ | 47 | if(changed){ |
48 | // Prompt. | 48 | // Prompt. |
49 | //int answer = QMessageBox::warning(this, "Message", "Should your desktop be","Yes", "Cancel", 0, 1 ); | 49 | //int answer = QMessageBox::warning(this, "Message", "Should your desktop be","Yes", "Cancel", 0, 1 ); |
50 | //if (answer) | 50 | //if (answer) |
51 | // return; | 51 | // return; |
52 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); | 52 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); |
53 | QString link; //we'll just send an empty string | 53 | QString link; //we'll just send an empty string |
54 | e << link; | 54 | e << link; |
55 | } | 55 | } |
56 | } | 56 | } |
57 | 57 | ||
58 | /** | 58 | /** |
59 | * Scans root directory for any tabs or applications. Will recursivly go down, | 59 | * Scans root directory for any tabs or applications. Will recursivly go down, |
60 | * but will not follow symlinks. | 60 | * but will not follow symlinks. |
61 | * @param directory - the directory to look in. | 61 | * @param directory - the directory to look in. |
62 | * @param parent - the parent to place any new tabs or apps into. If parent is | 62 | * @param parent - the parent to place any new tabs or apps into. If parent is |
63 | * NULL then the item is a tab and should be placed as a child of the window. | 63 | * NULL then the item is a tab and should be placed as a child of the window. |
64 | */ | 64 | */ |
65 | void TabManager::rescanFolder(QString directory, QListViewItem* parent){ | 65 | void TabManager::rescanFolder(QString directory, QListViewItem* parent){ |
66 | //qDebug(QString("rescanFolder: ") + directory.latin1()); | 66 | //qDebug(QString("rescanFolder: ") + directory.latin1()); |
67 | 67 | ||
68 | QDir d; | 68 | QDir d; |
69 | d.setPath(directory); | 69 | d.setPath(directory); |
70 | // Show hidden files for .directories | 70 | // Show hidden files for .directories |
71 | d.setFilter( QDir::Files | QDir::Hidden | QDir::Dirs); | 71 | d.setFilter( QDir::Files | QDir::Hidden | QDir::Dirs); |
72 | 72 | ||
73 | const QFileInfoList *list = d.entryInfoList(); | 73 | const QFileInfoList *list = d.entryInfoList(); |
74 | QFileInfoListIterator it( *list ); // create list iterator | 74 | QFileInfoListIterator it( *list ); // create list iterator |
75 | QFileInfo *fi; // pointer for traversing | 75 | QFileInfo *fi; // pointer for traversing |
76 | 76 | ||
77 | while ( (fi=it.current()) ) { // for each file... | 77 | while ( (fi=it.current()) ) { // for each file... |
78 | // If it is a dir and not .. or . then add it as a tab and go down. | 78 | // If it is a dir and not .. or . then add it as a tab and go down. |
79 | if(fi->isDir()){ | 79 | if(fi->isDir()){ |
80 | if(fi->fileName() != ".." && fi->fileName() != ".") { | 80 | if(fi->fileName() != ".." && fi->fileName() != ".") { |
81 | QListViewItem* newItem; | 81 | QListViewItem* newItem; |
82 | if(!parent) | 82 | if(!parent) |
83 | newItem = new QListViewItem(tabList, fi->fileName()); | 83 | newItem = new QListViewItem(tabList, fi->fileName()); |
84 | else | 84 | else |
85 | newItem = new QListViewItem(parent, fi->fileName()); | 85 | newItem = new QListViewItem(parent, fi->fileName()); |
86 | itemList.insert(newItem, directory + "/" + fi->fileName() + "/.directory" ); | 86 | itemList.insert(newItem, directory + "/" + fi->fileName() + "/.directory" ); |
87 | rescanFolder(directory + "/" + fi->fileName(), newItem); | 87 | rescanFolder(directory + "/" + fi->fileName(), newItem); |
88 | } | 88 | } |
89 | } | 89 | } |
90 | else{ | 90 | else{ |
91 | // it is a file, if not a .directory add to parent. | 91 | // it is a file, if not a .directory add to parent. |
92 | 92 | ||
93 | // Change parents name and icon to reflect icon. | 93 | // Change parents name and icon to reflect icon. |
94 | if(fi->fileName() == ".directory"){ | 94 | if(fi->fileName() == ".directory"){ |
95 | AppLnk app(directory + "/" + fi->fileName()); | 95 | AppLnk app(directory + "/" + fi->fileName()); |
96 | if(parent){ | 96 | if(parent){ |
97 | parent->setPixmap(0,app.pixmap()); | 97 | parent->setPixmap(0,app.pixmap()); |
98 | parent->setText(0, app.name()); | 98 | parent->setText(0, app.name()); |
99 | } | 99 | } |
100 | } | 100 | } |
101 | else{ | 101 | else{ |
102 | // Add any desktop files found. | 102 | // Add any desktop files found. |
103 | QListViewItem* newItem; | 103 | QListViewItem* newItem; |
104 | if(directory != HOME_APP_DIR){ | 104 | if(directory != HOME_APP_DIR){ |
105 | if(!parent) | 105 | if(!parent) |
106 | newItem = new QListViewItem(tabList, fi->fileName()); | 106 | newItem = new QListViewItem(tabList, fi->fileName()); |
107 | else | 107 | else |
108 | newItem = new QListViewItem(parent, fi->fileName()); | 108 | newItem = new QListViewItem(parent, fi->fileName()); |
109 | if(fi->fileName().right(APPLICATION_EXTENSION_LENGTH) == APPLICATION_EXTENSION){ | 109 | if(fi->fileName().right(APPLICATION_EXTENSION_LENGTH) == APPLICATION_EXTENSION){ |
110 | AppLnk app(directory + "/" + fi->fileName()); | 110 | AppLnk app(directory + "/" + fi->fileName()); |
111 | newItem->setPixmap(0,app.pixmap()); | 111 | newItem->setPixmap(0,app.pixmap()); |
112 | newItem->setText(0, app.name()); | 112 | newItem->setText(0, app.name()); |
113 | itemList.insert(newItem, directory + "/" + fi->fileName()); | 113 | itemList.insert(newItem, directory + "/" + fi->fileName()); |
114 | } | 114 | } |
115 | } | 115 | } |
116 | } | 116 | } |
117 | } | 117 | } |
118 | ++it; // goto next list element | 118 | ++it; // goto next list element |
119 | } | 119 | } |
120 | } | 120 | } |
121 | 121 | ||
122 | /** | 122 | /** |
123 | * Create a new blank Tab. | 123 | * Create a new blank Tab. |
124 | * Create a physical folder with .directory file | 124 | * Create a physical folder with .directory file |
125 | * Create a item on the list | 125 | * Create a item on the list |
126 | */ | 126 | */ |
127 | void TabManager::newFolder(){ | 127 | void TabManager::newFolder(){ |
128 | QDir r; | 128 | QDir r; |
129 | r.mkdir(QString(HOME_APP_DIR) + "/" + NEW_FOLDER); | 129 | r.mkdir(QString(HOME_APP_DIR) + "/" + NEW_FOLDER); |
130 | system((QString("echo [Desktop Entry] | cat >> ") + HOME_APP_DIR + "/" + NEW_FOLDER "/.directory").latin1()); | 130 | system((QString("echo [Desktop Entry] | cat >> ") + HOME_APP_DIR + "/" + NEW_FOLDER "/.directory").latin1()); |
131 | system((QString("echo Name=" NEW_FOLDER " | cat >> ") + HOME_APP_DIR + "/" + NEW_FOLDER "/.directory").latin1()); | 131 | system((QString("echo Name=" NEW_FOLDER " | cat >> ") + HOME_APP_DIR + "/" + NEW_FOLDER "/.directory").latin1()); |
132 | 132 | ||
133 | QString homeLocation = QString(HOME_APP_DIR) + "/" + NEW_FOLDER + "/.directory"; | 133 | QString homeLocation = QString(HOME_APP_DIR) + "/" + NEW_FOLDER + "/.directory"; |
134 | QListViewItem *newItem = new QListViewItem(tabList, NEW_FOLDER); | 134 | QListViewItem *newItem = new QListViewItem(tabList, NEW_FOLDER); |
135 | itemList.insert(newItem, homeLocation ); | 135 | itemList.insert(newItem, homeLocation ); |
136 | 136 | ||
137 | // We have changed something. | 137 | // We have changed something. |
138 | changed = true; | 138 | changed = true; |
139 | } | 139 | } |
140 | 140 | ||
141 | /** | 141 | /** |
142 | * Create a new blank application | 142 | * Create a new blank application |
143 | * Make sure a tab is selected | 143 | * Make sure a tab is selected |
144 | * create physical file | 144 | * create physical file |
145 | * fill file with default information (entry, name, type). | 145 | * fill file with default information (entry, name, type). |
146 | */ | 146 | */ |
147 | void TabManager::newApplication(){ | 147 | void TabManager::newApplication(){ |
148 | QListViewItem *item = tabList->currentItem(); | 148 | QListViewItem *item = tabList->currentItem(); |
149 | if(!item || item->parent()) | 149 | if(!item || item->parent()) |
150 | return; | 150 | return; |
151 | 151 | ||
152 | QString parentDir = itemList[item].mid(0,itemList[item].length()-11); | 152 | QString parentDir = itemList[item].mid(0,itemList[item].length()-11); |
153 | QString homeLocation = parentDir + "/" NEW_APPLICATION APPLICATION_EXTENSION; | 153 | QString homeLocation = parentDir + "/" NEW_APPLICATION APPLICATION_EXTENSION; |
154 | system((QString("echo [Desktop Entry] | cat >> ") + homeLocation).latin1()); | 154 | system((QString("echo [Desktop Entry] | cat >> ") + homeLocation).latin1()); |
155 | system((QString("echo Name=" NEW_APPLICATION " | cat >> ") + homeLocation).latin1()); | 155 | system((QString("echo Name=" NEW_APPLICATION " | cat >> ") + homeLocation).latin1()); |
156 | int slash = parentDir.findRev('/', -1); | 156 | int slash = parentDir.findRev('/', -1); |
157 | QString folderName = parentDir.mid(slash+1, parentDir.length()); | 157 | QString folderName = parentDir.mid(slash+1, parentDir.length()); |
158 | 158 | ||
159 | system((QString("echo Type=") + folderName + " | cat >> " + homeLocation).latin1()); | 159 | system((QString("echo Type=") + folderName + " | cat >> " + homeLocation).latin1()); |
160 | 160 | ||
161 | // Insert into the tree | 161 | // Insert into the tree |
162 | QListViewItem *newItem = new QListViewItem(item, NEW_APPLICATION); | 162 | QListViewItem *newItem = new QListViewItem(item, NEW_APPLICATION); |
163 | itemList.insert(newItem, homeLocation ); | 163 | itemList.insert(newItem, homeLocation ); |
164 | 164 | ||
165 | // We have changed something. | 165 | // We have changed something. |
166 | changed = true; | 166 | changed = true; |
167 | } | 167 | } |
168 | 168 | ||
169 | /** | 169 | /** |
170 | * Remove the item. | 170 | * Remove the item. |
171 | * Check if we can | 171 | * Check if we can |
172 | * Prompt user | 172 | * Prompt user |
173 | * Delete physical file (Dir, remove .dir, then dir. File, remove file) | 173 | * Delete physical file (Dir, remove .dir, then dir. File, remove file) |
174 | * Remove from installer if need too. | 174 | * Remove from installer if need too. |
175 | */ | 175 | */ |
176 | void TabManager::removeItem(){ | 176 | void TabManager::removeItem(){ |
177 | // Make sure we can delete | 177 | // Make sure we can delete |
178 | QListViewItem *item = tabList->currentItem(); | 178 | QListViewItem *item = tabList->currentItem(); |
179 | if(!item) | 179 | if(!item) |
180 | return; | 180 | return; |
181 | if(item->childCount() > 0){ | 181 | if(item->childCount() > 0){ |
182 | QMessageBox::critical(this, tr("Message"), tr("Can't remove with applications\nstill in the group."), tr("Ok") ); | 182 | QMessageBox::critical(this, tr("Message"), tr("Can't remove with applications\nstill in the group."), tr("Ok") ); |
183 | return; | 183 | return; |
184 | } | 184 | } |
185 | 185 | ||
186 | // Prompt. | 186 | // Prompt. |
187 | int answer = QMessageBox::warning(this, tr("Message"), tr("Are you sure you want to delete?"), tr("Yes"), tr("Cancel"), 0, 1 ); | 187 | int answer = QMessageBox::warning(this, tr("Message"), tr("Are you sure you want to delete?"), tr("Yes"), tr("Cancel"), 0, 1 ); |
188 | if (answer) | 188 | if (answer) |
189 | return; | 189 | return; |
190 | 190 | ||
191 | bool removeSuccessfull = true; | 191 | bool removeSuccessful = true; |
192 | QString location = itemList[item]; | 192 | QString location = itemList[item]; |
193 | // Remove file (.directory in a Directory case) | 193 | // Remove file (.directory in a Directory case) |
194 | if(!QFile::remove(location)) | 194 | if(!QFile::remove(location)) |
195 | removeSuccessfull = false; | 195 | removeSuccessful = false; |
196 | 196 | ||
197 | // Remove directory | 197 | // Remove directory |
198 | if(item->parent() == NULL){ | 198 | if(item->parent() == NULL){ |
199 | // Remove .directory file string | 199 | // Remove .directory file string |
200 | location = location.mid(0,location.length()-10); | 200 | location = location.mid(0,location.length()-10); |
201 | QDir dir; | 201 | QDir dir; |
202 | if(!dir.rmdir(location)) | 202 | if(!dir.rmdir(location)) |
203 | removeSuccessfull = false; | 203 | removeSuccessful = false; |
204 | else | 204 | else |
205 | removeSuccessfull = true; | 205 | removeSuccessful = true; |
206 | } | 206 | } |
207 | 207 | ||
208 | // If removing failed. | 208 | // If removing failed. |
209 | if(!removeSuccessfull){ | 209 | if(!removeSuccessful){ |
210 | qDebug((QString("removeItem: ") + location).latin1()); | 210 | qDebug((QString("removeItem: ") + location).latin1()); |
211 | QMessageBox::critical(this, tr("Message"), tr("Can't remove."), tr("Ok") ); | 211 | QMessageBox::critical(this, tr("Message"), tr("Can't remove."), tr("Ok") ); |
212 | return; | 212 | return; |
213 | } | 213 | } |
214 | 214 | ||
215 | // Remove from the installer so it wont fail. | 215 | // Remove from the installer so it wont fail. |
216 | // Don't need to do this sense the current install uses rm -f so no error | 216 | // Don't need to do this sense the current install uses rm -f so no error |
217 | 217 | ||
218 | // Remove from the gui list. | 218 | // Remove from the gui list. |
219 | itemList.remove(item); | 219 | itemList.remove(item); |
220 | if(item->parent()) | 220 | if(item->parent()) |
221 | item->parent()->takeItem(item); | 221 | item->parent()->takeItem(item); |
222 | delete item; | 222 | delete item; |
223 | 223 | ||
224 | // We have changed something. | 224 | // We have changed something. |
225 | changed = true; | 225 | changed = true; |
226 | } | 226 | } |
227 | 227 | ||
228 | /** | 228 | /** |
229 | * Helper function. Edits the current item. | 229 | * Helper function. Edits the current item. |
230 | * calls editItem with the currently selected item. | 230 | * calls editItem with the currently selected item. |
231 | */ | 231 | */ |
232 | void TabManager::editCurrentItem(){ | 232 | void TabManager::editCurrentItem(){ |
233 | editItem(tabList->currentItem()); | 233 | editItem(tabList->currentItem()); |
234 | } | 234 | } |
235 | 235 | ||
236 | /** | 236 | /** |
237 | * Edit the item that is passed in. | 237 | * Edit the item that is passed in. |
238 | * Show application dialog and if anything changed | 238 | * Show application dialog and if anything changed |
239 | * @param item the item to edit. | 239 | * @param item the item to edit. |
240 | */ | 240 | */ |
241 | void TabManager::editItem( QListViewItem * item){ | 241 | void TabManager::editItem( QListViewItem * item){ |
242 | if(!item) | 242 | if(!item) |
243 | return; | 243 | return; |
244 | 244 | ||
245 | TabAppLnk app(itemList[item]); | 245 | TabAppLnk app(itemList[item]); |
246 | if(!app.isValid()){ | 246 | if(!app.isValid()){ |
247 | qDebug(QString("editItem: Not a valid applnk file: ") + itemList[item].latin1()); | 247 | qDebug(QString("editItem: Not a valid applnk file: ") + itemList[item].latin1()); |
248 | return; | 248 | return; |
249 | } | 249 | } |
250 | 250 | ||
251 | // Fill with all of the icons | 251 | // Fill with all of the icons |
252 | if(!application){ | 252 | if(!application){ |
253 | Wait waitDialog(this, "Wait dialog"); | 253 | Wait waitDialog(this, "Wait dialog"); |
254 | waitDialog.waitLabel->setText(tr("Gathering icons...")); | 254 | waitDialog.waitLabel->setText(tr("Gathering icons...")); |
255 | waitDialog.show(); | 255 | waitDialog.show(); |
256 | qApp->processEvents(); | 256 | qApp->processEvents(); |
257 | application = new AppEdit(this, "Application edit", true); | 257 | application = new AppEdit(this, "Application edit", true); |
258 | 258 | ||
259 | QDir d(QPEApplication::qpeDir() + "/pics/"); | 259 | QDir d(QPEApplication::qpeDir() + "/pics/"); |
260 | d.setFilter( QDir::Files); | 260 | d.setFilter( QDir::Files); |
261 | 261 | ||
262 | const QFileInfoList *list = d.entryInfoList(); | 262 | const QFileInfoList *list = d.entryInfoList(); |
263 | QFileInfoListIterator it( *list ); // create list iterator | 263 | QFileInfoListIterator it( *list ); // create list iterator |
264 | QFileInfo *fi; // pointer for traversing | 264 | QFileInfo *fi; // pointer for traversing |
265 | 265 | ||
266 | while ( (fi=it.current()) ) { // for each file... | 266 | while ( (fi=it.current()) ) { // for each file... |
267 | QString fileName = fi->fileName(); | 267 | QString fileName = fi->fileName(); |
268 | if(fileName.right(4) == ".png"){ | 268 | if(fileName.right(4) == ".png"){ |
269 | fileName = fileName.mid(0,fileName.length()-4); | 269 | fileName = fileName.mid(0,fileName.length()-4); |
270 | QPixmap imageOfFile(Resource::loadPixmap(fileName)); | 270 | QPixmap imageOfFile(Resource::loadPixmap(fileName)); |
271 | QImage foo = imageOfFile.convertToImage(); | 271 | QImage foo = imageOfFile.convertToImage(); |
272 | foo = foo.smoothScale(16,16); | 272 | foo = foo.smoothScale(16,16); |
273 | imageOfFile.convertFromImage(foo); | 273 | imageOfFile.convertFromImage(foo); |
274 | application->iconLineEdit->insertItem(imageOfFile,fileName); | 274 | application->iconLineEdit->insertItem(imageOfFile,fileName); |
275 | } | 275 | } |
276 | //qDebug(fi->fileName().latin1()); | 276 | //qDebug(fi->fileName().latin1()); |
277 | ++it; | 277 | ++it; |
278 | } | 278 | } |
279 | waitDialog.hide(); | 279 | waitDialog.hide(); |
280 | } | 280 | } |
281 | int pixmap = -1; | 281 | int pixmap = -1; |
282 | QString pixmapText = app.pixmapString(); | 282 | QString pixmapText = app.pixmapString(); |
283 | QComboBox *f = application->iconLineEdit; | 283 | QComboBox *f = application->iconLineEdit; |
284 | for(int i = 0; i < application->iconLineEdit->count(); i++){ | 284 | for(int i = 0; i < application->iconLineEdit->count(); i++){ |
285 | if(f->text(i) == pixmapText){ | 285 | if(f->text(i) == pixmapText){ |
286 | pixmap = i; | 286 | pixmap = i; |
287 | break; | 287 | break; |
288 | } | 288 | } |
289 | } | 289 | } |
290 | if(pixmap != -1) | 290 | if(pixmap != -1) |
291 | application->iconLineEdit->setCurrentItem(pixmap); | 291 | application->iconLineEdit->setCurrentItem(pixmap); |
292 | else if(pixmapText.isEmpty()){ | 292 | else if(pixmapText.isEmpty()){ |
293 | application->iconLineEdit->setCurrentItem(0); | 293 | application->iconLineEdit->setCurrentItem(0); |
294 | } | 294 | } |
295 | else{ | 295 | else{ |
296 | QPixmap imageOfFile(Resource::loadPixmap(pixmapText)); | 296 | QPixmap imageOfFile(Resource::loadPixmap(pixmapText)); |
297 | QImage foo = imageOfFile.convertToImage(); | 297 | QImage foo = imageOfFile.convertToImage(); |
298 | foo = foo.smoothScale(16,16); | 298 | foo = foo.smoothScale(16,16); |
299 | imageOfFile.convertFromImage(foo); | 299 | imageOfFile.convertFromImage(foo); |
300 | application->iconLineEdit->insertItem(imageOfFile,pixmapText,0); | 300 | application->iconLineEdit->insertItem(imageOfFile,pixmapText,0); |
301 | application->iconLineEdit->setCurrentItem(0); | 301 | application->iconLineEdit->setCurrentItem(0); |
302 | } | 302 | } |
303 | 303 | ||
304 | application->nameLineEdit->setText(app.name()); | 304 | application->nameLineEdit->setText(app.name()); |
305 | application->execLineEdit->setText(app.exec()); | 305 | application->execLineEdit->setText(app.exec()); |
306 | application->commentLineEdit->setText(app.comment()); | 306 | application->commentLineEdit->setText(app.comment()); |
307 | 307 | ||
308 | if(item->parent() == NULL){ | 308 | if(item->parent() == NULL){ |
309 | application->execLineEdit->setEnabled(false); | 309 | application->execLineEdit->setEnabled(false); |
310 | application->TextLabel3->setEnabled(false); | 310 | application->TextLabel3->setEnabled(false); |
311 | application->setCaption(tr("Tab")); | 311 | application->setCaption(tr("Tab")); |
312 | } | 312 | } |
313 | else{ | 313 | else{ |
314 | application->execLineEdit->setEnabled(true); | 314 | application->execLineEdit->setEnabled(true); |
315 | application->TextLabel3->setEnabled(true); | 315 | application->TextLabel3->setEnabled(true); |
316 | application->setCaption(tr("Application")); | 316 | application->setCaption(tr("Application")); |
317 | } | 317 | } |
318 | 318 | ||
319 | // Only do somthing if they hit OK | 319 | // Only do somthing if they hit OK |
320 | application->showMaximized(); | 320 | application->showMaximized(); |
321 | if(application->exec() == 0) | 321 | if(application->exec() == 0) |
322 | return; | 322 | return; |
323 | 323 | ||
324 | // If nothing has changed exit (hmmm why did they hit ok?) | 324 | // If nothing has changed exit (hmmm why did they hit ok?) |
325 | if(app.name() == application->nameLineEdit->text() && | 325 | if(app.name() == application->nameLineEdit->text() && |
326 | app.pixmapString() == application->iconLineEdit->currentText() && | 326 | app.pixmapString() == application->iconLineEdit->currentText() && |
327 | app.comment() == application->commentLineEdit->text() && | 327 | app.comment() == application->commentLineEdit->text() && |
328 | app.exec() == application->execLineEdit->text()) | 328 | app.exec() == application->execLineEdit->text()) |
329 | return; | 329 | return; |
330 | 330 | ||
331 | // Change the applnk file | 331 | // Change the applnk file |
332 | QString oldName = app.name(); | 332 | QString oldName = app.name(); |
333 | app.setName(application->nameLineEdit->text()); | 333 | app.setName(application->nameLineEdit->text()); |
334 | app.setIcon(application->iconLineEdit->currentText()); | 334 | app.setIcon(application->iconLineEdit->currentText()); |
335 | app.setComment(application->commentLineEdit->text()); | 335 | app.setComment(application->commentLineEdit->text()); |
336 | app.setExec(application->execLineEdit->text()); | 336 | app.setExec(application->execLineEdit->text()); |
337 | if(!app.writeLink()){ | 337 | if(!app.writeLink()){ |
338 | QMessageBox::critical(this, tr("Message"), "Can't save.", tr("Ok") ); | 338 | QMessageBox::critical(this, tr("Message"), "Can't save.", tr("Ok") ); |
339 | return; | 339 | return; |
340 | } | 340 | } |
341 | 341 | ||
342 | // Update the gui icon and name | 342 | // Update the gui icon and name |
343 | item->setText(0,app.name()); | 343 | item->setText(0,app.name()); |
344 | item->setPixmap(0,app.pixmap()); | 344 | item->setPixmap(0,app.pixmap()); |
345 | 345 | ||
346 | // We have changed something. | 346 | // We have changed something. |
347 | changed = true; | 347 | changed = true; |
348 | 348 | ||
349 | // If we were dealing with a new folder or new application change | 349 | // If we were dealing with a new folder or new application change |
350 | // the file names. Also change the item location in itemList | 350 | // the file names. Also change the item location in itemList |
351 | if(oldName == NEW_FOLDER){ | 351 | if(oldName == NEW_FOLDER){ |
352 | QDir r; | 352 | QDir r; |
353 | QString oldName = itemList[item]; | 353 | QString oldName = itemList[item]; |
354 | oldName = oldName.mid(0,oldName.length()-11); | 354 | oldName = oldName.mid(0,oldName.length()-11); |
355 | QString newName = oldName.mid(0,oldName.length()-9); | 355 | QString newName = oldName.mid(0,oldName.length()-9); |
356 | newName = newName + "/" + app.name(); | 356 | newName = newName + "/" + app.name(); |
357 | r.rename(oldName, newName); | 357 | r.rename(oldName, newName); |
358 | itemList.remove(item); | 358 | itemList.remove(item); |
359 | itemList.insert(item, newName + "/.directory" ); | 359 | itemList.insert(item, newName + "/.directory" ); |
360 | } | 360 | } |
361 | else if(oldName == NEW_APPLICATION){ | 361 | else if(oldName == NEW_APPLICATION){ |
362 | if(!item->parent()) | 362 | if(!item->parent()) |
363 | return; | 363 | return; |
364 | QString parentDir = itemList[item->parent()]; | 364 | QString parentDir = itemList[item->parent()]; |
365 | QDir r; | 365 | QDir r; |
366 | QString oldName = itemList[item]; | 366 | QString oldName = itemList[item]; |
367 | QString newName = oldName.mid(0, parentDir.length()-10); | 367 | QString newName = oldName.mid(0, parentDir.length()-10); |
368 | newName = newName + app.name() + APPLICATION_EXTENSION; | 368 | newName = newName + app.name() + APPLICATION_EXTENSION; |
369 | r.rename(oldName, newName); | 369 | r.rename(oldName, newName); |
370 | itemList.remove(item); | 370 | itemList.remove(item); |
371 | itemList.insert(item, newName); | 371 | itemList.insert(item, newName); |
372 | } | 372 | } |
373 | } | 373 | } |
374 | 374 | ||
375 | /** | 375 | /** |
376 | * Move an application from one directory to another. | 376 | * Move an application from one directory to another. |
377 | * Move in the gui, move in the applnk file, move in the installer. | 377 | * Move in the gui, move in the applnk file, move in the installer. |
378 | * @param item the application to move | 378 | * @param item the application to move |
379 | * @pearam newGroup the new parent of this application | 379 | * @pearam newGroup the new parent of this application |
380 | */ | 380 | */ |
381 | void TabManager::moveApplication(QListViewItem *item, QListViewItem *newGroup){ | 381 | void TabManager::moveApplication(QListViewItem *item, QListViewItem *newGroup){ |
382 | // Can we even move it? | 382 | // Can we even move it? |
383 | if(!item || !item->parent() || newGroup->parent()) | 383 | if(!item || !item->parent() || newGroup->parent()) |
384 | return; | 384 | return; |
385 | if(item->parent() == newGroup) | 385 | if(item->parent() == newGroup) |
386 | return; | 386 | return; |
387 | 387 | ||
388 | // Get the new folder, new file name, | 388 | // Get the new folder, new file name, |
389 | QString newFolder = itemList[newGroup]; | 389 | QString newFolder = itemList[newGroup]; |
390 | newFolder = newFolder.mid(0,newFolder.length()-11); | 390 | newFolder = newFolder.mid(0,newFolder.length()-11); |
391 | int slash = newFolder.findRev('/', -1); | 391 | int slash = newFolder.findRev('/', -1); |
392 | QString folderName = newFolder.mid(slash+1, newFolder.length()); | 392 | QString folderName = newFolder.mid(slash+1, newFolder.length()); |
393 | 393 | ||
394 | QString desktopFile = itemList[item]; | 394 | QString desktopFile = itemList[item]; |
395 | slash = desktopFile.findRev('/', -1); | 395 | slash = desktopFile.findRev('/', -1); |
396 | desktopFile = desktopFile.mid(slash, desktopFile.length()); | 396 | desktopFile = desktopFile.mid(slash, desktopFile.length()); |
397 | newFolder = newFolder + desktopFile; | 397 | newFolder = newFolder + desktopFile; |
398 | 398 | ||
399 | // Move file | 399 | // Move file |
400 | QDir r; | 400 | QDir r; |
401 | if(!r.rename(itemList[item], newFolder)){ | 401 | if(!r.rename(itemList[item], newFolder)){ |
402 | QMessageBox::critical(this, tr("Message"), "Can't move application.", tr("Ok") ); | 402 | QMessageBox::critical(this, tr("Message"), "Can't move application.", tr("Ok") ); |
403 | return; | 403 | return; |
404 | } | 404 | } |
405 | //qDebug((QString("moveApplication: ") + itemList[item]).latin1()); | 405 | //qDebug((QString("moveApplication: ") + itemList[item]).latin1()); |
406 | //qDebug((QString("moveApplication: ") + newFolder).latin1()); | 406 | //qDebug((QString("moveApplication: ") + newFolder).latin1()); |
407 | 407 | ||
408 | // Move in the gui | 408 | // Move in the gui |
409 | item->parent()->takeItem(item); | 409 | item->parent()->takeItem(item); |
410 | newGroup->insertItem(item); | 410 | newGroup->insertItem(item); |
411 | newGroup->setOpen(true); | 411 | newGroup->setOpen(true); |
412 | 412 | ||
413 | // Move file in the installer | 413 | // Move file in the installer |
414 | QString installedAppFile; | 414 | QString installedAppFile; |
415 | if(findInstalledApplication(desktopFile, installedAppFile)) | 415 | if(findInstalledApplication(desktopFile, installedAppFile)) |
416 | swapInstalledLocation(installedAppFile, desktopFile, newFolder); | 416 | swapInstalledLocation(installedAppFile, desktopFile, newFolder); |
417 | else | 417 | else |
418 | qDebug("moveApplication: No installed app found for dekstop file"); | 418 | qDebug("moveApplication: No installed app found for dekstop file"); |
419 | 419 | ||
420 | // Move application type | 420 | // Move application type |
421 | AppLnk app(newFolder); | 421 | AppLnk app(newFolder); |
422 | app.setType(folderName); | 422 | app.setType(folderName); |
423 | app.writeLink(); | 423 | app.writeLink(); |
424 | 424 | ||
425 | // Move in our internal list | 425 | // Move in our internal list |
426 | itemList.remove(item); | 426 | itemList.remove(item); |
427 | itemList.insert(item, newFolder); | 427 | itemList.insert(item, newFolder); |
428 | 428 | ||
429 | // We have changed something. | 429 | // We have changed something. |
430 | changed = true; | 430 | changed = true; |
431 | } | 431 | } |
432 | 432 | ||
433 | /** | 433 | /** |
434 | * File the installed application that has this desktop file. | 434 | * File the installed application that has this desktop file. |
435 | * Go through each file in HOME_APP_INSTALL_DIR and see if it contains desktop | 435 | * Go through each file in HOME_APP_INSTALL_DIR and see if it contains desktop |
436 | * file | 436 | * file |
437 | * @param desktopFile - the .desktop file to search for [foo.desktop] | 437 | * @param desktopFile - the .desktop file to search for [foo.desktop] |
438 | * @param installedAppFile - location of the app install list | 438 | * @param installedAppFile - location of the app install list |
439 | * @return true if successfull, false if file not found. | 439 | * @return true if successful, false if file not found. |
440 | */ | 440 | */ |
441 | bool TabManager::findInstalledApplication(QString desktopFile, QString &installedAppFile){ | 441 | bool TabManager::findInstalledApplication(QString desktopFile, QString &installedAppFile){ |
442 | 442 | ||
443 | QDir d; | 443 | QDir d; |
444 | d.setPath(HOME_APP_INSTALL_DIR); | 444 | d.setPath(HOME_APP_INSTALL_DIR); |
445 | d.setFilter( QDir::Files ); | 445 | d.setFilter( QDir::Files ); |
446 | 446 | ||
447 | const QFileInfoList *list = d.entryInfoList(); | 447 | const QFileInfoList *list = d.entryInfoList(); |
448 | QFileInfoListIterator it( *list ); // create list iterator | 448 | QFileInfoListIterator it( *list ); // create list iterator |
449 | QFileInfo *fi; // pointer for traversing | 449 | QFileInfo *fi; // pointer for traversing |
450 | 450 | ||
451 | while ( (fi=it.current()) ) { // for each file... | 451 | while ( (fi=it.current()) ) { // for each file... |
452 | QFile file(QString(HOME_APP_INSTALL_DIR) + "/" + fi->fileName()); | 452 | QFile file(QString(HOME_APP_INSTALL_DIR) + "/" + fi->fileName()); |
453 | if ( file.open(IO_ReadOnly) ) { // file opened successfully | 453 | if ( file.open(IO_ReadOnly) ) { // file opened successfully |
454 | QTextStream stream( &file ); // use a text stream | 454 | QTextStream stream( &file ); // use a text stream |
455 | QString line; | 455 | QString line; |
456 | while ( !stream.eof() ) { // until end of file... | 456 | while ( !stream.eof() ) { // until end of file... |
457 | line = stream.readLine(); // line of text excluding '\n' | 457 | line = stream.readLine(); // line of text excluding '\n' |
458 | if(line.contains(desktopFile)){ | 458 | if(line.contains(desktopFile)){ |
459 | installedAppFile = QString(HOME_APP_INSTALL_DIR) + "/" + fi->fileName(); | 459 | installedAppFile = QString(HOME_APP_INSTALL_DIR) + "/" + fi->fileName(); |
460 | file.close(); | 460 | file.close(); |
461 | return true; | 461 | return true; |
462 | } | 462 | } |
463 | } | 463 | } |
464 | file.close(); | 464 | file.close(); |
465 | } | 465 | } |
466 | else | 466 | else |
467 | qDebug((QString("findInstalledApplication: Can't open file") + HOME_APP_INSTALL_DIR + "/" + fi->fileName()).latin1()); | 467 | qDebug((QString("findInstalledApplication: Can't open file") + HOME_APP_INSTALL_DIR + "/" + fi->fileName()).latin1()); |
468 | ++it; // goto next list element | 468 | ++it; // goto next list element |
469 | } | 469 | } |
470 | return false; | 470 | return false; |
471 | } | 471 | } |
472 | 472 | ||
473 | /** | 473 | /** |
474 | * Open a file and replace a file containing the old desktop file with the new. | 474 | * Open a file and replace a file containing the old desktop file with the new. |
475 | * @param installedAppFile application installed list | 475 | * @param installedAppFile application installed list |
476 | * @param desktopFile old .desktop file | 476 | * @param desktopFile old .desktop file |
477 | * @param newLocation new .desktop file | 477 | * @param newLocation new .desktop file |
478 | */ | 478 | */ |
479 | void TabManager::swapInstalledLocation( QString installedAppFile, QString desktopFile, QString newLocation ){ | 479 | void TabManager::swapInstalledLocation( QString installedAppFile, QString desktopFile, QString newLocation ){ |
480 | QFile file(installedAppFile); | 480 | QFile file(installedAppFile); |
481 | if ( !file.open(IO_ReadOnly) ){ | 481 | if ( !file.open(IO_ReadOnly) ){ |
482 | qDebug(QString("swapInstalledLocation: Can't edit file: %1").arg(installedAppFile).latin1()); | 482 | qDebug(QString("swapInstalledLocation: Can't edit file: %1").arg(installedAppFile).latin1()); |
483 | return; | 483 | return; |
484 | } | 484 | } |
485 | 485 | ||
486 | QTextStream stream( &file ); // use a text stream | 486 | QTextStream stream( &file ); // use a text stream |
487 | QString allLines; | 487 | QString allLines; |
488 | while ( !stream.eof() ) { // until end of file... | 488 | while ( !stream.eof() ) { // until end of file... |
489 | QString line = stream.readLine(); // line of text excluding '\n' | 489 | QString line = stream.readLine(); // line of text excluding '\n' |
490 | if(line.contains(desktopFile)) | 490 | if(line.contains(desktopFile)) |
491 | allLines += newLocation; | 491 | allLines += newLocation; |
492 | else | 492 | else |
493 | allLines += line; | 493 | allLines += line; |
494 | allLines += '\n'; | 494 | allLines += '\n'; |
495 | } | 495 | } |
496 | file.close(); | 496 | file.close(); |
497 | 497 | ||
498 | if ( !file.open(IO_ReadWrite) ){ | 498 | if ( !file.open(IO_ReadWrite) ){ |
499 | qDebug(QString("swapInstalledLocation: Can't edit file: %1").arg(installedAppFile).latin1()); | 499 | qDebug(QString("swapInstalledLocation: Can't edit file: %1").arg(installedAppFile).latin1()); |
500 | return; | 500 | return; |
501 | } | 501 | } |
502 | QTextStream streamOut( &file ); | 502 | QTextStream streamOut( &file ); |
503 | streamOut << allLines; | 503 | streamOut << allLines; |
504 | file.close(); | 504 | file.close(); |
505 | } | 505 | } |
506 | 506 | ||
507 | // tabmanager.cpp | 507 | // tabmanager.cpp |
508 | 508 | ||
diff --git a/noncore/unsupported/mail2/TODO b/noncore/unsupported/mail2/TODO index 4bc434f..3c83fdd 100644 --- a/noncore/unsupported/mail2/TODO +++ b/noncore/unsupported/mail2/TODO | |||
@@ -1,34 +1,34 @@ | |||
1 | Mail TODO | 1 | Mail TODO |
2 | ----------------------------------------------------------------------------- | 2 | ----------------------------------------------------------------------------- |
3 | 3 | ||
4 | General stuff: | 4 | General stuff: |
5 | - This program needs a name! | 5 | - This program needs a name! |
6 | - If password is empty, ask for it during fetch. | 6 | - If password is empty, ask for it during fetch. |
7 | - Check if all necessary fields in AccoundEditor are filled. | 7 | - Check if all necessary fields in AccoundEditor are filled. |
8 | - Seperate Sending and Recieving in configuration. | 8 | - Seperate Sending and Recieving in configuration. |
9 | 9 | ||
10 | Protocol related: | 10 | Protocol related: |
11 | - The IMAP implentation is kinda strange and slow. | 11 | - The IMAP implentation is kinda strange and slow. |
12 | - The SMTP implentation is goddamn strange. | 12 | - The SMTP implentation is goddamn strange. |
13 | - POP3 support would be nice. | 13 | - POP3 support would be nice. |
14 | - NNTP would be kinda neat, too. | 14 | - NNTP would be kinda neat, too. |
15 | - Implent a plugin system. | 15 | - Implent a plugin system. |
16 | 16 | ||
17 | Security related: | 17 | Security related: |
18 | - GnuPG support. This will require a seperate gpg managing utility in | 18 | - GnuPG support. This will require a seperate gpg managing utility in |
19 | the settings tab. | 19 | the settings tab. |
20 | - sMIME? maybe in the distant future. | 20 | - sMIME? maybe in the distant future. |
21 | - Integrated SSH tunneling. | 21 | - Integrated SSH tunneling. |
22 | 22 | ||
23 | Mail management: | 23 | Mail management: |
24 | - Header caching | 24 | - Header caching |
25 | - Sieve filtering support? | 25 | - Sieve filtering support? |
26 | - Enqueueing/Draft support both on the IMAP server and local. | 26 | - Enqueueing/Draft support both on the IMAP server and local. |
27 | 27 | ||
28 | Testing: | 28 | Testing: |
29 | I'm using the courier-imap server at my developement site. I didn't have | 29 | I'm using the courier-imap server at my developement site. I didn't have |
30 | much opportunity to test on other servers. Giving me test-accounts on other | 30 | much opportunity to test on other servers. Giving me test-accounts on other |
31 | servers would be helpfull. | 31 | servers would be helpful. |
32 | 32 | ||
33 | If you want something added, drop a mail. Comments are always welcome. | 33 | If you want something added, drop a mail. Comments are always welcome. |
34 | 34 | ||
diff --git a/noncore/unsupported/mail2/folderwidget.cpp b/noncore/unsupported/mail2/folderwidget.cpp index 6c36e92..d27968b 100644 --- a/noncore/unsupported/mail2/folderwidget.cpp +++ b/noncore/unsupported/mail2/folderwidget.cpp | |||
@@ -1,314 +1,314 @@ | |||
1 | #include <qmessagebox.h> | 1 | #include <qmessagebox.h> |
2 | #include <qtextstream.h> | 2 | #include <qtextstream.h> |
3 | #include <qpopupmenu.h> | 3 | #include <qpopupmenu.h> |
4 | #include <qheader.h> | 4 | #include <qheader.h> |
5 | #include <qfile.h> | 5 | #include <qfile.h> |
6 | #include <qdir.h> | 6 | #include <qdir.h> |
7 | 7 | ||
8 | #include <qpe/resource.h> | 8 | #include <qpe/resource.h> |
9 | 9 | ||
10 | #include <stdlib.h> | 10 | #include <stdlib.h> |
11 | 11 | ||
12 | #include "folderwidget.h" | 12 | #include "folderwidget.h" |
13 | #include "imaphandler.h" | 13 | #include "imaphandler.h" |
14 | #include "imapbase.h" | 14 | #include "imapbase.h" |
15 | #include "rename.h" | 15 | #include "rename.h" |
16 | 16 | ||
17 | FolderWidgetItem::FolderWidgetItem(Folder &folder, QListView *parent) | 17 | FolderWidgetItem::FolderWidgetItem(Folder &folder, QListView *parent) |
18 | : QListViewItem(parent), _folder(folder) | 18 | : QListViewItem(parent), _folder(folder) |
19 | { | 19 | { |
20 | setPixmap(0, QPixmap(Resource::loadPixmap("mail/inbox"))); | 20 | setPixmap(0, QPixmap(Resource::loadPixmap("mail/inbox"))); |
21 | setText(0, _folder.topFolder().account().user() + " (" + _folder.topFolder().account().imapServer() + ")"); | 21 | setText(0, _folder.topFolder().account().user() + " (" + _folder.topFolder().account().imapServer() + ")"); |
22 | setOpen(true); | 22 | setOpen(true); |
23 | } | 23 | } |
24 | 24 | ||
25 | FolderWidgetItem::FolderWidgetItem(Folder &folder, FolderWidgetItem *parent) | 25 | FolderWidgetItem::FolderWidgetItem(Folder &folder, FolderWidgetItem *parent) |
26 | : QListViewItem(parent), _folder(folder) | 26 | : QListViewItem(parent), _folder(folder) |
27 | { | 27 | { |
28 | if (_folder.noCache()) { | 28 | if (_folder.noCache()) { |
29 | setText(0, QObject::tr("<Foldertree not known.>")); | 29 | setText(0, QObject::tr("<Foldertree not known.>")); |
30 | } else { | 30 | } else { |
31 | if (folder.fullName().upper() == "INBOX") { | 31 | if (folder.fullName().upper() == "INBOX") { |
32 | setPixmap(0, QPixmap(Resource::loadPixmap("mail/inbox"))); | 32 | setPixmap(0, QPixmap(Resource::loadPixmap("mail/inbox"))); |
33 | setText(0, QObject::tr("Inbox")); | 33 | setText(0, QObject::tr("Inbox")); |
34 | } else { | 34 | } else { |
35 | setPixmap(0, QPixmap(Resource::loadPixmap("mail/folder"))); | 35 | setPixmap(0, QPixmap(Resource::loadPixmap("mail/folder"))); |
36 | setText(0, folder.fullName()); | 36 | setText(0, folder.fullName()); |
37 | } | 37 | } |
38 | setOpen(true); | 38 | setOpen(true); |
39 | } | 39 | } |
40 | } | 40 | } |
41 | 41 | ||
42 | FolderWidget::FolderWidget(QWidget *parent, const char *name, WFlags fl) | 42 | FolderWidget::FolderWidget(QWidget *parent, const char *name, WFlags fl) |
43 | : ListViewPlus(parent, name, fl) | 43 | : ListViewPlus(parent, name, fl) |
44 | { | 44 | { |
45 | header()->hide(); | 45 | header()->hide(); |
46 | addColumn(""); | 46 | addColumn(""); |
47 | setSorting(-1); | 47 | setSorting(-1); |
48 | 48 | ||
49 | QPopupMenu *menu = new QPopupMenu(); | 49 | QPopupMenu *menu = new QPopupMenu(); |
50 | menu->insertItem(tr("Rename"), MENU_RENAME); | 50 | menu->insertItem(tr("Rename"), MENU_RENAME); |
51 | menu->insertItem(tr("Delete"), MENU_DELETE); | 51 | menu->insertItem(tr("Delete"), MENU_DELETE); |
52 | menu->insertItem(tr("Move"), MENU_MOVE); | 52 | menu->insertItem(tr("Move"), MENU_MOVE); |
53 | menu->insertItem(tr("Copy"), MENU_COPY); | 53 | menu->insertItem(tr("Copy"), MENU_COPY); |
54 | menu->insertSeparator(); | 54 | menu->insertSeparator(); |
55 | menu->insertItem(tr("Create folder"), MENU_CREATE); | 55 | menu->insertItem(tr("Create folder"), MENU_CREATE); |
56 | menu->insertSeparator(); | 56 | menu->insertSeparator(); |
57 | menu->insertItem(tr("Rescan folder list"), MENU_RESCAN); | 57 | menu->insertItem(tr("Rescan folder list"), MENU_RESCAN); |
58 | setPopup(menu); | 58 | setPopup(menu); |
59 | 59 | ||
60 | getAccounts(); | 60 | getAccounts(); |
61 | 61 | ||
62 | connect(menu, SIGNAL(activated(int)), SLOT(slotMenuActivated(int))); | 62 | connect(menu, SIGNAL(activated(int)), SLOT(slotMenuActivated(int))); |
63 | connect(this, SIGNAL(clicked(QListViewItem *)), SLOT(slotItemClicked(QListViewItem *))); | 63 | connect(this, SIGNAL(clicked(QListViewItem *)), SLOT(slotItemClicked(QListViewItem *))); |
64 | } | 64 | } |
65 | 65 | ||
66 | FolderWidget::~FolderWidget() | 66 | FolderWidget::~FolderWidget() |
67 | { | 67 | { |
68 | // TODO: Save folder tree. | 68 | // TODO: Save folder tree. |
69 | } | 69 | } |
70 | 70 | ||
71 | void FolderWidget::update() | 71 | void FolderWidget::update() |
72 | { | 72 | { |
73 | getAccounts(); | 73 | getAccounts(); |
74 | } | 74 | } |
75 | 75 | ||
76 | void FolderWidget::getAccounts() | 76 | void FolderWidget::getAccounts() |
77 | { | 77 | { |
78 | clear(); | 78 | clear(); |
79 | 79 | ||
80 | QValueList<Account> accounts = ConfigFile::getAccounts(); | 80 | QValueList<Account> accounts = ConfigFile::getAccounts(); |
81 | QValueList<Account>::Iterator it; | 81 | QValueList<Account>::Iterator it; |
82 | for (it = accounts.begin(); it != accounts.end(); it++) { | 82 | for (it = accounts.begin(); it != accounts.end(); it++) { |
83 | FolderWidgetItem *item = addAccount(*it); | 83 | FolderWidgetItem *item = addAccount(*it); |
84 | QFile f((QString) getenv("HOME") + "/Applications/mail/foldercache/foldercache-" + (*it).accountName()); | 84 | QFile f((QString) getenv("HOME") + "/Applications/mail/foldercache/foldercache-" + (*it).accountName()); |
85 | if (!f.open(IO_ReadOnly)) { | 85 | if (!f.open(IO_ReadOnly)) { |
86 | Folder folder; | 86 | Folder folder; |
87 | folder.setNoCache(true); | 87 | folder.setNoCache(true); |
88 | addFolder(folder, item); | 88 | addFolder(folder, item); |
89 | } else { | 89 | } else { |
90 | QTextStream t(&f); | 90 | QTextStream t(&f); |
91 | while (!t.atEnd()) { | 91 | while (!t.atEnd()) { |
92 | QString separator = t.readLine(); | 92 | QString separator = t.readLine(); |
93 | QString fullname = t.readLine(); | 93 | QString fullname = t.readLine(); |
94 | Folder folder; | 94 | Folder folder; |
95 | folder.setSeparator(separator); | 95 | folder.setSeparator(separator); |
96 | folder.setFullName(fullname); | 96 | folder.setFullName(fullname); |
97 | folder.setTopFolder(item->folder().topFolder()); | 97 | folder.setTopFolder(item->folder().topFolder()); |
98 | addFolder(folder, item); | 98 | addFolder(folder, item); |
99 | } | 99 | } |
100 | f.close(); | 100 | f.close(); |
101 | } | 101 | } |
102 | } | 102 | } |
103 | } | 103 | } |
104 | 104 | ||
105 | FolderWidgetItem *FolderWidget::addAccount(Account &account) | 105 | FolderWidgetItem *FolderWidget::addAccount(Account &account) |
106 | { | 106 | { |
107 | TopFolder tf; | 107 | TopFolder tf; |
108 | tf.setAccount(account); | 108 | tf.setAccount(account); |
109 | 109 | ||
110 | // XXX This has to change!!! The folderwidget may not create an | 110 | // XXX This has to change!!! The folderwidget may not create an |
111 | // XXX IMAPHandler!!!! Do this in IMAPHandler! | 111 | // XXX IMAPHandler!!!! Do this in IMAPHandler! |
112 | tf.setIMAPHandler(new IMAPHandler(account)); | 112 | tf.setIMAPHandler(new IMAPHandler(account)); |
113 | 113 | ||
114 | Folder folder; | 114 | Folder folder; |
115 | folder.setTopFolder(tf); | 115 | folder.setTopFolder(tf); |
116 | 116 | ||
117 | connect(tf.handler(), SIGNAL(IMAPLookingUpHost()), SLOT(slotIMAPLookingUpHost())); | 117 | connect(tf.handler(), SIGNAL(IMAPLookingUpHost()), SLOT(slotIMAPLookingUpHost())); |
118 | connect(tf.handler(), SIGNAL(IMAPHostFound()), SLOT(slotIMAPHostFound())); | 118 | connect(tf.handler(), SIGNAL(IMAPHostFound()), SLOT(slotIMAPHostFound())); |
119 | connect(tf.handler(), SIGNAL(IMAPConnected()), SLOT(slotIMAPConnected())); | 119 | connect(tf.handler(), SIGNAL(IMAPConnected()), SLOT(slotIMAPConnected())); |
120 | connect(tf.handler(), SIGNAL(IMAPDisconnected()), SLOT(slotIMAPDisconnected())); | 120 | connect(tf.handler(), SIGNAL(IMAPDisconnected()), SLOT(slotIMAPDisconnected())); |
121 | connect(tf.handler(), SIGNAL(IMAPError(int)), SLOT(slotIMAPError(int))); | 121 | connect(tf.handler(), SIGNAL(IMAPError(int)), SLOT(slotIMAPError(int))); |
122 | 122 | ||
123 | return new FolderWidgetItem(folder, this); | 123 | return new FolderWidgetItem(folder, this); |
124 | } | 124 | } |
125 | 125 | ||
126 | FolderWidgetItem *FolderWidget::addFolder(Folder &folder, FolderWidgetItem *folderWidgetItem) | 126 | FolderWidgetItem *FolderWidget::addFolder(Folder &folder, FolderWidgetItem *folderWidgetItem) |
127 | { | 127 | { |
128 | return new FolderWidgetItem(folder, folderWidgetItem); | 128 | return new FolderWidgetItem(folder, folderWidgetItem); |
129 | } | 129 | } |
130 | 130 | ||
131 | void FolderWidget::slotMenuActivated(int itemid) | 131 | void FolderWidget::slotMenuActivated(int itemid) |
132 | { | 132 | { |
133 | if (currentItem() == NULL) { | 133 | if (currentItem() == NULL) { |
134 | QMessageBox::information(this, tr("Error"), tr("<p>Please select an item first.</p>"), tr("Ok")); | 134 | QMessageBox::information(this, tr("Error"), tr("<p>Please select an item first.</p>"), tr("Ok")); |
135 | return; | 135 | return; |
136 | } | 136 | } |
137 | 137 | ||
138 | if (itemid == MENU_RENAME) { | 138 | if (itemid == MENU_RENAME) { |
139 | if (((FolderWidgetItem *)currentItem())->folder().fullName().isEmpty()) return; | 139 | if (((FolderWidgetItem *)currentItem())->folder().fullName().isEmpty()) return; |
140 | 140 | ||
141 | Folder folder = ((FolderWidgetItem *)currentItem())->folder(); | 141 | Folder folder = ((FolderWidgetItem *)currentItem())->folder(); |
142 | QString newName = Rename::rename(folder.fullName(), this); | 142 | QString newName = Rename::rename(folder.fullName(), this); |
143 | if (newName.isNull()) return; | 143 | if (newName.isNull()) return; |
144 | 144 | ||
145 | folder.topFolder().handler()->iRename(folder.fullName(), newName); | 145 | folder.topFolder().handler()->iRename(folder.fullName(), newName); |
146 | connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPRename(IMAPResponse &))); | 146 | connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPRename(IMAPResponse &))); |
147 | } else if (itemid == MENU_DELETE) { | 147 | } else if (itemid == MENU_DELETE) { |
148 | if (((FolderWidgetItem *)currentItem())->folder().fullName().isEmpty()) return; | 148 | if (((FolderWidgetItem *)currentItem())->folder().fullName().isEmpty()) return; |
149 | 149 | ||
150 | Folder folder = ((FolderWidgetItem *)currentItem())->folder(); | 150 | Folder folder = ((FolderWidgetItem *)currentItem())->folder(); |
151 | 151 | ||
152 | int ret = QMessageBox::information(this, tr("Question"), tr("<p>Do you really want to delete <pre>%1</pre>?").arg(folder.fullName()), tr("Yes"), tr("No")); | 152 | int ret = QMessageBox::information(this, tr("Question"), tr("<p>Do you really want to delete <pre>%1</pre>?").arg(folder.fullName()), tr("Yes"), tr("No")); |
153 | if (ret == 1) return; | 153 | if (ret == 1) return; |
154 | 154 | ||
155 | _createFolder = folder; | 155 | _createFolder = folder; |
156 | 156 | ||
157 | folder.topFolder().handler()->iDelete(folder.fullName()); | 157 | folder.topFolder().handler()->iDelete(folder.fullName()); |
158 | connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPDelete(IMAPResponse &))); | 158 | connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPDelete(IMAPResponse &))); |
159 | } else if (itemid == MENU_MOVE) { | 159 | } else if (itemid == MENU_MOVE) { |
160 | 160 | ||
161 | } else if (itemid == MENU_COPY) { | 161 | } else if (itemid == MENU_COPY) { |
162 | 162 | ||
163 | } else if (itemid == MENU_CREATE) { | 163 | } else if (itemid == MENU_CREATE) { |
164 | Folder folder = (((FolderWidgetItem *)currentItem())->folder()); | 164 | Folder folder = (((FolderWidgetItem *)currentItem())->folder()); |
165 | _createFolder = folder; | 165 | _createFolder = folder; |
166 | 166 | ||
167 | QString folderName = Rename::getText(tr("Foldername"), tr("<p>Please enter the name of the new folder.</p>"), this); | 167 | QString folderName = Rename::getText(tr("Foldername"), tr("<p>Please enter the name of the new folder.</p>"), this); |
168 | if (folderName.isNull()) return; | 168 | if (folderName.isNull()) return; |
169 | 169 | ||
170 | folder.topFolder().handler()->iCreate(folder.fullName() + folder.separator() + folderName); | 170 | folder.topFolder().handler()->iCreate(folder.fullName() + folder.separator() + folderName); |
171 | connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPCreate(IMAPResponse &))); | 171 | connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPCreate(IMAPResponse &))); |
172 | } else if (itemid == MENU_RESCAN) { | 172 | } else if (itemid == MENU_RESCAN) { |
173 | Folder folder = (((FolderWidgetItem *)currentItem())->folder()); | 173 | Folder folder = (((FolderWidgetItem *)currentItem())->folder()); |
174 | _rescanAccount = folder.topFolder().account(); | 174 | _rescanAccount = folder.topFolder().account(); |
175 | 175 | ||
176 | folder.topFolder().handler()->iList("", "*"); | 176 | folder.topFolder().handler()->iList("", "*"); |
177 | connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPList(IMAPResponse &))); | 177 | connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPList(IMAPResponse &))); |
178 | } | 178 | } |
179 | } | 179 | } |
180 | 180 | ||
181 | void FolderWidget::slotItemClicked(QListViewItem *item) | 181 | void FolderWidget::slotItemClicked(QListViewItem *item) |
182 | { | 182 | { |
183 | if (item == NULL) return; | 183 | if (item == NULL) return; |
184 | Folder folder = ((FolderWidgetItem *)item)->folder(); | 184 | Folder folder = ((FolderWidgetItem *)item)->folder(); |
185 | if (folder.fullName().isEmpty()) return; | 185 | if (folder.fullName().isEmpty()) return; |
186 | 186 | ||
187 | emit folderSelected(folder); | 187 | emit folderSelected(folder); |
188 | } | 188 | } |
189 | 189 | ||
190 | void FolderWidget::slotIMAPLookingUpHost() | 190 | void FolderWidget::slotIMAPLookingUpHost() |
191 | { | 191 | { |
192 | emit status(tr("Looking up host...")); | 192 | emit status(tr("Looking up host...")); |
193 | emit connecting(); | 193 | emit connecting(); |
194 | } | 194 | } |
195 | 195 | ||
196 | void FolderWidget::slotIMAPHostFound() | 196 | void FolderWidget::slotIMAPHostFound() |
197 | { | 197 | { |
198 | emit status(tr("Host found.")); | 198 | emit status(tr("Host found.")); |
199 | } | 199 | } |
200 | 200 | ||
201 | void FolderWidget::slotIMAPConnected() | 201 | void FolderWidget::slotIMAPConnected() |
202 | { | 202 | { |
203 | emit status(tr("Connected to host.")); | 203 | emit status(tr("Connected to host.")); |
204 | emit connected(); | 204 | emit connected(); |
205 | } | 205 | } |
206 | 206 | ||
207 | void FolderWidget::slotIMAPError(int error) | 207 | void FolderWidget::slotIMAPError(int error) |
208 | { | 208 | { |
209 | if (error == IMAPBase::IMAPErrConnectionRefused) { | 209 | if (error == IMAPBase::IMAPErrConnectionRefused) { |
210 | QMessageBox::warning(this, tr("Error"), tr("<p>The IMAP connection was refused.</p>"), tr("Ok")); | 210 | QMessageBox::warning(this, tr("Error"), tr("<p>The IMAP connection was refused.</p>"), tr("Ok")); |
211 | } else if (error == IMAPBase::IMAPErrHostNotFound) { | 211 | } else if (error == IMAPBase::IMAPErrHostNotFound) { |
212 | QMessageBox::warning(this, tr("Error"), tr("<p>The host was not found.</p>"), tr("Ok")); | 212 | QMessageBox::warning(this, tr("Error"), tr("<p>The host was not found.</p>"), tr("Ok")); |
213 | } else if (error == IMAPBase::IMAPErrSocketRead) { | 213 | } else if (error == IMAPBase::IMAPErrSocketRead) { |
214 | QMessageBox::warning(this, tr("Error"), tr("<p>There was an error while reading from the socket.</p>"), tr("Ok")); | 214 | QMessageBox::warning(this, tr("Error"), tr("<p>There was an error while reading from the socket.</p>"), tr("Ok")); |
215 | } else if (error == IMAPBase::IMAPErrLoginFailed) { | 215 | } else if (error == IMAPBase::IMAPErrLoginFailed) { |
216 | QMessageBox::warning(this, tr("Error"), tr("<p>Login failed. Check your password/username.</p>"), tr("Ok")); | 216 | QMessageBox::warning(this, tr("Error"), tr("<p>Login failed. Check your password/username.</p>"), tr("Ok")); |
217 | } else { | 217 | } else { |
218 | QMessageBox::warning(this, tr("Error"), tr("<p>An unknown error was encountered.</p>"), tr("Ok")); | 218 | QMessageBox::warning(this, tr("Error"), tr("<p>An unknown error was encountered.</p>"), tr("Ok")); |
219 | } | 219 | } |
220 | } | 220 | } |
221 | 221 | ||
222 | void FolderWidget::slotIMAPDisconnected() | 222 | void FolderWidget::slotIMAPDisconnected() |
223 | { | 223 | { |
224 | emit status(tr("Disconnected.")); | 224 | emit status(tr("Disconnected.")); |
225 | emit disconnected(); | 225 | emit disconnected(); |
226 | } | 226 | } |
227 | 227 | ||
228 | void FolderWidget::slotIMAPLogin(IMAPResponse &response) | 228 | void FolderWidget::slotIMAPLogin(IMAPResponse &response) |
229 | { | 229 | { |
230 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPLogin(IMAPResponse &))); | 230 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPLogin(IMAPResponse &))); |
231 | 231 | ||
232 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { | 232 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { |
233 | emit status(tr("Login successfull!")); | 233 | emit status(tr("Login successful!")); |
234 | } else { | 234 | } else { |
235 | QMessageBox::warning(this, tr("Error"), tr("<p>Login failed. Go away.</p>"), tr("Ok")); | 235 | QMessageBox::warning(this, tr("Error"), tr("<p>Login failed. Go away.</p>"), tr("Ok")); |
236 | } | 236 | } |
237 | } | 237 | } |
238 | 238 | ||
239 | void FolderWidget::slotIMAPRename(IMAPResponse &response) | 239 | void FolderWidget::slotIMAPRename(IMAPResponse &response) |
240 | { | 240 | { |
241 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPRename(IMAPResponse &))); | 241 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPRename(IMAPResponse &))); |
242 | 242 | ||
243 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { | 243 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { |
244 | emit status(tr("Renaming successfull!")); | 244 | emit status(tr("Renaming successful!")); |
245 | } else { | 245 | } else { |
246 | QMessageBox::warning(this, tr("Error"), tr("<p>Renaming failed. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok")); | 246 | QMessageBox::warning(this, tr("Error"), tr("<p>Renaming failed. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok")); |
247 | } | 247 | } |
248 | } | 248 | } |
249 | 249 | ||
250 | void FolderWidget::slotIMAPDelete(IMAPResponse &response) | 250 | void FolderWidget::slotIMAPDelete(IMAPResponse &response) |
251 | { | 251 | { |
252 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPDelete(IMAPResponse &))); | 252 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPDelete(IMAPResponse &))); |
253 | 253 | ||
254 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { | 254 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { |
255 | emit status(tr("Deletion successfull!")); | 255 | emit status(tr("Deletion successful!")); |
256 | 256 | ||
257 | _rescanAccount = _createFolder.topFolder().account(); | 257 | _rescanAccount = _createFolder.topFolder().account(); |
258 | 258 | ||
259 | _createFolder.topFolder().handler()->iList(".", "*"); | 259 | _createFolder.topFolder().handler()->iList(".", "*"); |
260 | connect(_createFolder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPList(IMAPResponse &))); | 260 | connect(_createFolder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPList(IMAPResponse &))); |
261 | } else { | 261 | } else { |
262 | QMessageBox::warning(this, tr("Error"), tr("<p>Delete failed. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok")); | 262 | QMessageBox::warning(this, tr("Error"), tr("<p>Delete failed. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok")); |
263 | } | 263 | } |
264 | } | 264 | } |
265 | 265 | ||
266 | void FolderWidget::slotIMAPCreate(IMAPResponse &response) | 266 | void FolderWidget::slotIMAPCreate(IMAPResponse &response) |
267 | { | 267 | { |
268 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPCreate(IMAPResponse &))); | 268 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPCreate(IMAPResponse &))); |
269 | 269 | ||
270 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { | 270 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { |
271 | emit status(tr("Folder created. Rescanning...")); | 271 | emit status(tr("Folder created. Rescanning...")); |
272 | 272 | ||
273 | _rescanAccount = _createFolder.topFolder().account(); | 273 | _rescanAccount = _createFolder.topFolder().account(); |
274 | 274 | ||
275 | _createFolder.topFolder().handler()->iList(".", "*"); | 275 | _createFolder.topFolder().handler()->iList(".", "*"); |
276 | connect(_createFolder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPList(IMAPResponse &))); | 276 | connect(_createFolder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPList(IMAPResponse &))); |
277 | } else { | 277 | } else { |
278 | QMessageBox::warning(this, tr("Error"), tr("<p>The folder could not be created. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok")); | 278 | QMessageBox::warning(this, tr("Error"), tr("<p>The folder could not be created. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok")); |
279 | } | 279 | } |
280 | } | 280 | } |
281 | 281 | ||
282 | void FolderWidget::slotIMAPList(IMAPResponse &response) | 282 | void FolderWidget::slotIMAPList(IMAPResponse &response) |
283 | { | 283 | { |
284 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPList(IMAPResponse &))); | 284 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPList(IMAPResponse &))); |
285 | 285 | ||
286 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { | 286 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { |
287 | QDir d((QString) getenv("HOME") + "/Applications/mail/foldercache"); | 287 | QDir d((QString) getenv("HOME") + "/Applications/mail/foldercache"); |
288 | if (!d.exists()) { | 288 | if (!d.exists()) { |
289 | system("mkdir -p $HOME/Applications/mail/foldercache"); | 289 | system("mkdir -p $HOME/Applications/mail/foldercache"); |
290 | qWarning("Created $HOME/Applications/mail/foldercache."); | 290 | qWarning("Created $HOME/Applications/mail/foldercache."); |
291 | } | 291 | } |
292 | QFile f((QString) getenv("HOME") + "/Applications/mail/foldercache/foldercache-" + _rescanAccount.accountName()); | 292 | QFile f((QString) getenv("HOME") + "/Applications/mail/foldercache/foldercache-" + _rescanAccount.accountName()); |
293 | if (!f.open(IO_WriteOnly)) { | 293 | if (!f.open(IO_WriteOnly)) { |
294 | QMessageBox::critical(this, tr("Error"), tr("<p>Couldn't open folder cache file for writing!</p>"), tr("Ok")); | 294 | QMessageBox::critical(this, tr("Error"), tr("<p>Couldn't open folder cache file for writing!</p>"), tr("Ok")); |
295 | return; | 295 | return; |
296 | } | 296 | } |
297 | QTextStream t(&f); | 297 | QTextStream t(&f); |
298 | 298 | ||
299 | QValueList<IMAPResponseLIST>::Iterator it; | 299 | QValueList<IMAPResponseLIST>::Iterator it; |
300 | QValueList<IMAPResponseLIST> lists = response.LIST(); | 300 | QValueList<IMAPResponseLIST> lists = response.LIST(); |
301 | for (it = lists.begin(); it != lists.end(); it++) { | 301 | for (it = lists.begin(); it != lists.end(); it++) { |
302 | t << (*it).folderSeparator() << "\n"; | 302 | t << (*it).folderSeparator() << "\n"; |
303 | t << (*it).folder() << "\n"; | 303 | t << (*it).folder() << "\n"; |
304 | } | 304 | } |
305 | 305 | ||
306 | f.close(); | 306 | f.close(); |
307 | 307 | ||
308 | emit status(tr("Got folder list.")); | 308 | emit status(tr("Got folder list.")); |
309 | getAccounts(); | 309 | getAccounts(); |
310 | } else { | 310 | } else { |
311 | QMessageBox::warning(this, tr("Error"), tr("<p>Couldn't retrieve the folder list. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok")); | 311 | QMessageBox::warning(this, tr("Error"), tr("<p>Couldn't retrieve the folder list. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok")); |
312 | } | 312 | } |
313 | } | 313 | } |
314 | 314 | ||
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 8525058..b46005b 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp | |||
@@ -1,983 +1,983 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of ________ class. | 4 | ** Definition of ________ class. |
5 | ** | 5 | ** |
6 | ** Created : 970521 | 6 | ** Created : 970521 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the network module of the Qt GUI Toolkit. | 10 | ** This file is part of the network module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition licenses may use this | 21 | ** Licensees holding valid Qt Enterprise Edition licenses may use this |
22 | ** file in accordance with the Qt Commercial License Agreement provided | 22 | ** file in accordance with the Qt Commercial License Agreement provided |
23 | ** with the Software. | 23 | ** with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #include "pbuilder_pbx.h" | 38 | #include "pbuilder_pbx.h" |
39 | #include "option.h" | 39 | #include "option.h" |
40 | #include <qdir.h> | 40 | #include <qdir.h> |
41 | #include <qdict.h> | 41 | #include <qdict.h> |
42 | #include <qregexp.h> | 42 | #include <qregexp.h> |
43 | #include <stdlib.h> | 43 | #include <stdlib.h> |
44 | #include <time.h> | 44 | #include <time.h> |
45 | #ifdef Q_OS_UNIX | 45 | #ifdef Q_OS_UNIX |
46 | # include <sys/types.h> | 46 | # include <sys/types.h> |
47 | # include <sys/stat.h> | 47 | # include <sys/stat.h> |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | // Note: this is fairly hacky, but it does the job... | 50 | // Note: this is fairly hacky, but it does the job... |
51 | 51 | ||
52 | 52 | ||
53 | ProjectBuilderMakefileGenerator::ProjectBuilderMakefileGenerator(QMakeProject *p) : UnixMakefileGenerator(p) | 53 | ProjectBuilderMakefileGenerator::ProjectBuilderMakefileGenerator(QMakeProject *p) : UnixMakefileGenerator(p) |
54 | { | 54 | { |
55 | 55 | ||
56 | } | 56 | } |
57 | 57 | ||
58 | bool | 58 | bool |
59 | ProjectBuilderMakefileGenerator::writeMakefile(QTextStream &t) | 59 | ProjectBuilderMakefileGenerator::writeMakefile(QTextStream &t) |
60 | { | 60 | { |
61 | if(!project->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) { | 61 | if(!project->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) { |
62 | /* for now just dump, I need to generated an empty xml or something.. */ | 62 | /* for now just dump, I need to generated an empty xml or something.. */ |
63 | fprintf(stderr, "Project file not generated because all requirements not met:\n\t%s\n", | 63 | fprintf(stderr, "Project file not generated because all requirements not met:\n\t%s\n", |
64 | var("QMAKE_FAILED_REQUIREMENTS").latin1()); | 64 | var("QMAKE_FAILED_REQUIREMENTS").latin1()); |
65 | return TRUE; | 65 | return TRUE; |
66 | } | 66 | } |
67 | 67 | ||
68 | project->variables()["MAKEFILE"].clear(); | 68 | project->variables()["MAKEFILE"].clear(); |
69 | project->variables()["MAKEFILE"].append("Makefile"); | 69 | project->variables()["MAKEFILE"].append("Makefile"); |
70 | if(project->first("TEMPLATE") == "app" || project->first("TEMPLATE") == "lib") { | 70 | if(project->first("TEMPLATE") == "app" || project->first("TEMPLATE") == "lib") { |
71 | return writeMakeParts(t); | 71 | return writeMakeParts(t); |
72 | } else if(project->first("TEMPLATE") == "subdirs") { | 72 | } else if(project->first("TEMPLATE") == "subdirs") { |
73 | writeSubdirs(t, FALSE); | 73 | writeSubdirs(t, FALSE); |
74 | return TRUE; | 74 | return TRUE; |
75 | } | 75 | } |
76 | return FALSE; | 76 | return FALSE; |
77 | } | 77 | } |
78 | 78 | ||
79 | bool | 79 | bool |
80 | ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) | 80 | ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) |
81 | { | 81 | { |
82 | int i; | 82 | int i; |
83 | QStringList tmp; | 83 | QStringList tmp; |
84 | bool did_preprocess = FALSE; | 84 | bool did_preprocess = FALSE; |
85 | 85 | ||
86 | //HEADER | 86 | //HEADER |
87 | t << "// !$*UTF8*$!" << "\n" | 87 | t << "// !$*UTF8*$!" << "\n" |
88 | << "{" << "\n" | 88 | << "{" << "\n" |
89 | << "\t" << "archiveVersion = 1;" << "\n" | 89 | << "\t" << "archiveVersion = 1;" << "\n" |
90 | << "\t" << "classes = {" << "\n" << "\t" << "};" << "\n" | 90 | << "\t" << "classes = {" << "\n" << "\t" << "};" << "\n" |
91 | << "\t" << "objectVersion = " << pbuilderVersion() << ";" << "\n" | 91 | << "\t" << "objectVersion = " << pbuilderVersion() << ";" << "\n" |
92 | << "\t" << "objects = {" << endl; | 92 | << "\t" << "objects = {" << endl; |
93 | 93 | ||
94 | //MAKE QMAKE equivlant | 94 | //MAKE QMAKE equivlant |
95 | if(!project->isActiveConfig("no_autoqmake") && project->projectFile() != "(stdin)") { | 95 | if(!project->isActiveConfig("no_autoqmake") && project->projectFile() != "(stdin)") { |
96 | QString mkfile = pbx_dir + Option::dir_sep + "qt_makeqmake.mak"; | 96 | QString mkfile = pbx_dir + Option::dir_sep + "qt_makeqmake.mak"; |
97 | QFile mkf(mkfile); | 97 | QFile mkf(mkfile); |
98 | if(mkf.open(IO_WriteOnly | IO_Translate)) { | 98 | if(mkf.open(IO_WriteOnly | IO_Translate)) { |
99 | debug_msg(1, "pbuilder: Creating file: %s", mkfile.latin1()); | 99 | debug_msg(1, "pbuilder: Creating file: %s", mkfile.latin1()); |
100 | QTextStream mkt(&mkf); | 100 | QTextStream mkt(&mkf); |
101 | writeHeader(mkt); | 101 | writeHeader(mkt); |
102 | mkt << "QMAKE = "<< | 102 | mkt << "QMAKE = "<< |
103 | (project->isEmpty("QMAKE_QMAKE") ? QString("$(QTDIR)/bin/qmake") : | 103 | (project->isEmpty("QMAKE_QMAKE") ? QString("$(QTDIR)/bin/qmake") : |
104 | var("QMAKE_QMAKE")) << endl; | 104 | var("QMAKE_QMAKE")) << endl; |
105 | writeMakeQmake(mkt); | 105 | writeMakeQmake(mkt); |
106 | mkf.close(); | 106 | mkf.close(); |
107 | } | 107 | } |
108 | QString phase_key = keyFor("QMAKE_PBX_MAKEQMAKE_BUILDPHASE"); | 108 | QString phase_key = keyFor("QMAKE_PBX_MAKEQMAKE_BUILDPHASE"); |
109 | mkfile = fileFixify(mkfile, QDir::currentDirPath()); | 109 | mkfile = fileFixify(mkfile, QDir::currentDirPath()); |
110 | project->variables()["QMAKE_PBX_BUILDPHASES"].append(phase_key); | 110 | project->variables()["QMAKE_PBX_BUILDPHASES"].append(phase_key); |
111 | t << "\t\t" << phase_key << " = {" << "\n" | 111 | t << "\t\t" << phase_key << " = {" << "\n" |
112 | << "\t\t\t" << "buildActionMask = 2147483647;" << "\n" | 112 | << "\t\t\t" << "buildActionMask = 2147483647;" << "\n" |
113 | << "\t\t\t" << "files = (" << "\n" | 113 | << "\t\t\t" << "files = (" << "\n" |
114 | << "\t\t\t" << ");" << "\n" | 114 | << "\t\t\t" << ");" << "\n" |
115 | << "\t\t\t" << "generatedFileNames = (" << "\n" | 115 | << "\t\t\t" << "generatedFileNames = (" << "\n" |
116 | << "\t\t\t" << ");" << "\n" | 116 | << "\t\t\t" << ");" << "\n" |
117 | << "\t\t\t" << "isa = PBXShellScriptBuildPhase;" << "\n" | 117 | << "\t\t\t" << "isa = PBXShellScriptBuildPhase;" << "\n" |
118 | << "\t\t\t" << "name = \"Qt Qmake\";" << "\n" | 118 | << "\t\t\t" << "name = \"Qt Qmake\";" << "\n" |
119 | << "\t\t\t" << "neededFileNames = (" << "\n" | 119 | << "\t\t\t" << "neededFileNames = (" << "\n" |
120 | << "\t\t\t" << ");" << "\n" | 120 | << "\t\t\t" << ");" << "\n" |
121 | << "\t\t\t" << "shellPath = /bin/sh;" << "\n" | 121 | << "\t\t\t" << "shellPath = /bin/sh;" << "\n" |
122 | << "\t\t\t" << "shellScript = \"make -C " << QDir::currentDirPath() << | 122 | << "\t\t\t" << "shellScript = \"make -C " << QDir::currentDirPath() << |
123 | " -f " << mkfile << "\";" << "\n" | 123 | " -f " << mkfile << "\";" << "\n" |
124 | << "\t\t" << "};" << "\n"; | 124 | << "\t\t" << "};" << "\n"; |
125 | } | 125 | } |
126 | 126 | ||
127 | //DUMP SOURCES | 127 | //DUMP SOURCES |
128 | QMap<QString, QStringList> groups; | 128 | QMap<QString, QStringList> groups; |
129 | QString srcs[] = { "SOURCES", "SRCMOC", "UICIMPLS", QString::null }; | 129 | QString srcs[] = { "SOURCES", "SRCMOC", "UICIMPLS", QString::null }; |
130 | for(i = 0; !srcs[i].isNull(); i++) { | 130 | for(i = 0; !srcs[i].isNull(); i++) { |
131 | tmp = project->variables()[srcs[i]]; | 131 | tmp = project->variables()[srcs[i]]; |
132 | QStringList &src_list = project->variables()["QMAKE_PBX_" + srcs[i]]; | 132 | QStringList &src_list = project->variables()["QMAKE_PBX_" + srcs[i]]; |
133 | for(QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) { | 133 | for(QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) { |
134 | QString file = fileFixify((*it)); | 134 | QString file = fileFixify((*it)); |
135 | if(file.endsWith(Option::moc_ext)) | 135 | if(file.endsWith(Option::moc_ext)) |
136 | continue; | 136 | continue; |
137 | bool in_root = TRUE; | 137 | bool in_root = TRUE; |
138 | QString src_key = keyFor(file); | 138 | QString src_key = keyFor(file); |
139 | if(!project->isActiveConfig("flat")) { | 139 | if(!project->isActiveConfig("flat")) { |
140 | QString flat_file = fileFixify(file, QDir::currentDirPath(), Option::output_dir, TRUE); | 140 | QString flat_file = fileFixify(file, QDir::currentDirPath(), Option::output_dir, TRUE); |
141 | if(QDir::isRelativePath(flat_file) && flat_file.find(Option::dir_sep) != -1) { | 141 | if(QDir::isRelativePath(flat_file) && flat_file.find(Option::dir_sep) != -1) { |
142 | QString last_grp("QMAKE_PBX_" + srcs[i] + "_HEIR_GROUP"); | 142 | QString last_grp("QMAKE_PBX_" + srcs[i] + "_HEIR_GROUP"); |
143 | QStringList dirs = QStringList::split(Option::dir_sep, flat_file); | 143 | QStringList dirs = QStringList::split(Option::dir_sep, flat_file); |
144 | dirs.pop_back(); //remove the file portion as it will be added via src_key | 144 | dirs.pop_back(); //remove the file portion as it will be added via src_key |
145 | for(QStringList::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) { | 145 | for(QStringList::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) { |
146 | QString new_grp(last_grp + Option::dir_sep + (*dir_it)), | 146 | QString new_grp(last_grp + Option::dir_sep + (*dir_it)), |
147 | new_grp_key(keyFor(new_grp)), last_grp_key(keyFor(last_grp)); | 147 | new_grp_key(keyFor(new_grp)), last_grp_key(keyFor(last_grp)); |
148 | if(dir_it == dirs.begin()) { | 148 | if(dir_it == dirs.begin()) { |
149 | if(!groups.contains(new_grp)) | 149 | if(!groups.contains(new_grp)) |
150 | project->variables()["QMAKE_PBX_" + srcs[i]].append(new_grp_key); | 150 | project->variables()["QMAKE_PBX_" + srcs[i]].append(new_grp_key); |
151 | } else { | 151 | } else { |
152 | groups[last_grp] += new_grp_key; | 152 | groups[last_grp] += new_grp_key; |
153 | } | 153 | } |
154 | last_grp = new_grp; | 154 | last_grp = new_grp; |
155 | } | 155 | } |
156 | groups[last_grp] += src_key; | 156 | groups[last_grp] += src_key; |
157 | in_root = FALSE; | 157 | in_root = FALSE; |
158 | } | 158 | } |
159 | } | 159 | } |
160 | if(in_root) | 160 | if(in_root) |
161 | src_list.append(src_key); | 161 | src_list.append(src_key); |
162 | //source reference | 162 | //source reference |
163 | t << "\t\t" << src_key << " = {" << "\n" | 163 | t << "\t\t" << src_key << " = {" << "\n" |
164 | << "\t\t\t" << "isa = PBXFileReference;" << "\n" | 164 | << "\t\t\t" << "isa = PBXFileReference;" << "\n" |
165 | << "\t\t\t" << "path = \"" << file << "\";" << "\n" | 165 | << "\t\t\t" << "path = \"" << file << "\";" << "\n" |
166 | << "\t\t\t" << "refType = " << reftypeForFile(file) << ";" << "\n" | 166 | << "\t\t\t" << "refType = " << reftypeForFile(file) << ";" << "\n" |
167 | << "\t\t" << "};" << "\n"; | 167 | << "\t\t" << "};" << "\n"; |
168 | //build reference | 168 | //build reference |
169 | QString obj_key = file + ".o"; | 169 | QString obj_key = file + ".o"; |
170 | obj_key = keyFor(obj_key); | 170 | obj_key = keyFor(obj_key); |
171 | t << "\t\t" << obj_key << " = {" << "\n" | 171 | t << "\t\t" << obj_key << " = {" << "\n" |
172 | << "\t\t\t" << "fileRef = " << src_key << ";" << "\n" | 172 | << "\t\t\t" << "fileRef = " << src_key << ";" << "\n" |
173 | << "\t\t\t" << "isa = PBXBuildFile;" << "\n" | 173 | << "\t\t\t" << "isa = PBXBuildFile;" << "\n" |
174 | << "\t\t\t" << "settings = {" << "\n" | 174 | << "\t\t\t" << "settings = {" << "\n" |
175 | << "\t\t\t\t" << "ATTRIBUTES = (" << "\n" | 175 | << "\t\t\t\t" << "ATTRIBUTES = (" << "\n" |
176 | << "\t\t\t\t" << ");" << "\n" | 176 | << "\t\t\t\t" << ");" << "\n" |
177 | << "\t\t\t" << "};" << "\n" | 177 | << "\t\t\t" << "};" << "\n" |
178 | << "\t\t" << "};" << "\n"; | 178 | << "\t\t" << "};" << "\n"; |
179 | project->variables()["QMAKE_PBX_OBJ"].append(obj_key); | 179 | project->variables()["QMAKE_PBX_OBJ"].append(obj_key); |
180 | } | 180 | } |
181 | if(!src_list.isEmpty()) { | 181 | if(!src_list.isEmpty()) { |
182 | QString grp; | 182 | QString grp; |
183 | if(srcs[i] == "SOURCES") { | 183 | if(srcs[i] == "SOURCES") { |
184 | if(project->first("TEMPLATE") == "app" && !project->isEmpty("RC_FILE")) { //Icon | 184 | if(project->first("TEMPLATE") == "app" && !project->isEmpty("RC_FILE")) { //Icon |
185 | QString icns_file = keyFor("ICNS_FILE"); | 185 | QString icns_file = keyFor("ICNS_FILE"); |
186 | src_list.append(icns_file); | 186 | src_list.append(icns_file); |
187 | t << "\t\t" << icns_file << " = {" << "\n" | 187 | t << "\t\t" << icns_file << " = {" << "\n" |
188 | << "\t\t\t" << "isa = PBXFileReference;" << "\n" | 188 | << "\t\t\t" << "isa = PBXFileReference;" << "\n" |
189 | << "\t\t\t" << "path = \"" << project->first("RC_FILE") << "\";" << "\n" | 189 | << "\t\t\t" << "path = \"" << project->first("RC_FILE") << "\";" << "\n" |
190 | << "\t\t\t" << "refType = " << reftypeForFile(project->first("RC_FILE")) << ";" << "\n" | 190 | << "\t\t\t" << "refType = " << reftypeForFile(project->first("RC_FILE")) << ";" << "\n" |
191 | << "\t\t" << "};" << "\n"; | 191 | << "\t\t" << "};" << "\n"; |
192 | t << "\t\t" << keyFor("ICNS_FILE_REFERENCE") << " = {" << "\n" | 192 | t << "\t\t" << keyFor("ICNS_FILE_REFERENCE") << " = {" << "\n" |
193 | << "\t\t\t" << "fileRef = " << icns_file << ";" << "\n" | 193 | << "\t\t\t" << "fileRef = " << icns_file << ";" << "\n" |
194 | << "\t\t\t" << "isa = PBXBuildFile;" << "\n" | 194 | << "\t\t\t" << "isa = PBXBuildFile;" << "\n" |
195 | << "\t\t\t" << "settings = {" << "\n" | 195 | << "\t\t\t" << "settings = {" << "\n" |
196 | << "\t\t\t" << "};" << "\n" | 196 | << "\t\t\t" << "};" << "\n" |
197 | << "\t\t" << "};" << "\n"; | 197 | << "\t\t" << "};" << "\n"; |
198 | } | 198 | } |
199 | grp = "Sources"; | 199 | grp = "Sources"; |
200 | } else if(srcs[i] == "SRCMOC") { | 200 | } else if(srcs[i] == "SRCMOC") { |
201 | grp = "Mocables"; | 201 | grp = "Mocables"; |
202 | } else if(srcs[i] == "UICIMPLS") { | 202 | } else if(srcs[i] == "UICIMPLS") { |
203 | grp = "UICables"; | 203 | grp = "UICables"; |
204 | } | 204 | } |
205 | QString grp_key = keyFor(grp); | 205 | QString grp_key = keyFor(grp); |
206 | project->variables()["QMAKE_PBX_GROUPS"].append(grp_key); | 206 | project->variables()["QMAKE_PBX_GROUPS"].append(grp_key); |
207 | t << "\t\t" << grp_key << " = {" << "\n" | 207 | t << "\t\t" << grp_key << " = {" << "\n" |
208 | << "\t\t\t" << "children = (" << "\n" | 208 | << "\t\t\t" << "children = (" << "\n" |
209 | << varGlue("QMAKE_PBX_" + srcs[i], "\t\t\t\t", ",\n\t\t\t\t", "\n") | 209 | << varGlue("QMAKE_PBX_" + srcs[i], "\t\t\t\t", ",\n\t\t\t\t", "\n") |
210 | << "\t\t\t" << ");" << "\n" | 210 | << "\t\t\t" << ");" << "\n" |
211 | << "\t\t\t" << "isa = PBXGroup;" << "\n" | 211 | << "\t\t\t" << "isa = PBXGroup;" << "\n" |
212 | << "\t\t\t" << "name = " << grp << ";" << "\n" | 212 | << "\t\t\t" << "name = " << grp << ";" << "\n" |
213 | << "\t\t\t" << "refType = 4;" << "\n" | 213 | << "\t\t\t" << "refType = 4;" << "\n" |
214 | << "\t\t" << "};" << "\n"; | 214 | << "\t\t" << "};" << "\n"; |
215 | } | 215 | } |
216 | } | 216 | } |
217 | for(QMap<QString, QStringList>::Iterator grp_it = groups.begin(); | 217 | for(QMap<QString, QStringList>::Iterator grp_it = groups.begin(); |
218 | grp_it != groups.end(); ++grp_it) { | 218 | grp_it != groups.end(); ++grp_it) { |
219 | t << "\t\t" << keyFor(grp_it.key()) << " = {" << "\n" | 219 | t << "\t\t" << keyFor(grp_it.key()) << " = {" << "\n" |
220 | << "\t\t\t" << "isa = PBXGroup;" << "\n" | 220 | << "\t\t\t" << "isa = PBXGroup;" << "\n" |
221 | << "\t\t\t" << "children = (" << "\n" | 221 | << "\t\t\t" << "children = (" << "\n" |
222 | << valGlue(grp_it.data(), "\t\t\t\t", ",\n\t\t\t\t", "\n") | 222 | << valGlue(grp_it.data(), "\t\t\t\t", ",\n\t\t\t\t", "\n") |
223 | << "\t\t\t" << ");" << "\n" | 223 | << "\t\t\t" << ");" << "\n" |
224 | << "\t\t\t" << "name = \"" << grp_it.key().section(Option::dir_sep, -1) << "\";" << "\n" | 224 | << "\t\t\t" << "name = \"" << grp_it.key().section(Option::dir_sep, -1) << "\";" << "\n" |
225 | << "\t\t\t" << "refType = 4;" << "\n" | 225 | << "\t\t\t" << "refType = 4;" << "\n" |
226 | << "\t\t" << "};" << "\n"; | 226 | << "\t\t" << "};" << "\n"; |
227 | } | 227 | } |
228 | 228 | ||
229 | //PREPROCESS BUILDPHASE (just a makefile) | 229 | //PREPROCESS BUILDPHASE (just a makefile) |
230 | if(!project->isEmpty("UICIMPLS") || !project->isEmpty("SRCMOC") || | 230 | if(!project->isEmpty("UICIMPLS") || !project->isEmpty("SRCMOC") || |
231 | !project->isEmpty("YACCSOURCES") || !project->isEmpty("LEXSOURCES")) { | 231 | !project->isEmpty("YACCSOURCES") || !project->isEmpty("LEXSOURCES")) { |
232 | QString mkfile = pbx_dir + Option::dir_sep + "qt_preprocess.mak"; | 232 | QString mkfile = pbx_dir + Option::dir_sep + "qt_preprocess.mak"; |
233 | QFile mkf(mkfile); | 233 | QFile mkf(mkfile); |
234 | if(mkf.open(IO_WriteOnly | IO_Translate)) { | 234 | if(mkf.open(IO_WriteOnly | IO_Translate)) { |
235 | did_preprocess = TRUE; | 235 | did_preprocess = TRUE; |
236 | debug_msg(1, "pbuilder: Creating file: %s", mkfile.latin1()); | 236 | debug_msg(1, "pbuilder: Creating file: %s", mkfile.latin1()); |
237 | QTextStream mkt(&mkf); | 237 | QTextStream mkt(&mkf); |
238 | writeHeader(mkt); | 238 | writeHeader(mkt); |
239 | mkt << "MOC = " << var("QMAKE_MOC") << endl; | 239 | mkt << "MOC = " << var("QMAKE_MOC") << endl; |
240 | mkt << "UIC = " << var("QMAKE_UIC") << endl; | 240 | mkt << "UIC = " << var("QMAKE_UIC") << endl; |
241 | mkt << "LEX = " << var("QMAKE_LEX") << endl; | 241 | mkt << "LEX = " << var("QMAKE_LEX") << endl; |
242 | mkt << "LEXFLAGS = " << var("QMAKE_LEXFLAGS") << endl; | 242 | mkt << "LEXFLAGS = " << var("QMAKE_LEXFLAGS") << endl; |
243 | mkt << "YACC = " << var("QMAKE_YACC") << endl; | 243 | mkt << "YACC = " << var("QMAKE_YACC") << endl; |
244 | mkt << "YACCFLAGS = " << var("QMAKE_YACCFLAGS") << endl; | 244 | mkt << "YACCFLAGS = " << var("QMAKE_YACCFLAGS") << endl; |
245 | mkt << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; | 245 | mkt << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; |
246 | mkt << "MOVE = " << var("QMAKE_MOVE") << endl << endl; | 246 | mkt << "MOVE = " << var("QMAKE_MOVE") << endl << endl; |
247 | mkt << "FORMS = " << varList("UICIMPLS") << endl; | 247 | mkt << "FORMS = " << varList("UICIMPLS") << endl; |
248 | mkt << "MOCS = " << varList("SRCMOC") << endl; | 248 | mkt << "MOCS = " << varList("SRCMOC") << endl; |
249 | mkt << "PARSERS ="; | 249 | mkt << "PARSERS ="; |
250 | if(!project->isEmpty("YACCSOURCES")) { | 250 | if(!project->isEmpty("YACCSOURCES")) { |
251 | QStringList &yaccs = project->variables()["YACCSOURCES"]; | 251 | QStringList &yaccs = project->variables()["YACCSOURCES"]; |
252 | for(QStringList::Iterator yit = yaccs.begin(); yit != yaccs.end(); ++yit) { | 252 | for(QStringList::Iterator yit = yaccs.begin(); yit != yaccs.end(); ++yit) { |
253 | QFileInfo fi((*yit)); | 253 | QFileInfo fi((*yit)); |
254 | mkt << " " << fi.dirPath() << Option::dir_sep << fi.baseName(TRUE) | 254 | mkt << " " << fi.dirPath() << Option::dir_sep << fi.baseName(TRUE) |
255 | << Option::yacc_mod << Option::cpp_ext.first(); | 255 | << Option::yacc_mod << Option::cpp_ext.first(); |
256 | } | 256 | } |
257 | } | 257 | } |
258 | if(!project->isEmpty("LEXSOURCES")) { | 258 | if(!project->isEmpty("LEXSOURCES")) { |
259 | QStringList &lexs = project->variables()["LEXSOURCES"]; | 259 | QStringList &lexs = project->variables()["LEXSOURCES"]; |
260 | for(QStringList::Iterator lit = lexs.begin(); lit != lexs.end(); ++lit) { | 260 | for(QStringList::Iterator lit = lexs.begin(); lit != lexs.end(); ++lit) { |
261 | QFileInfo fi((*lit)); | 261 | QFileInfo fi((*lit)); |
262 | mkt << " " << fi.dirPath() << Option::dir_sep << fi.baseName(TRUE) | 262 | mkt << " " << fi.dirPath() << Option::dir_sep << fi.baseName(TRUE) |
263 | << Option::lex_mod << Option::cpp_ext.first(); | 263 | << Option::lex_mod << Option::cpp_ext.first(); |
264 | } | 264 | } |
265 | } | 265 | } |
266 | mkt << "\n"; | 266 | mkt << "\n"; |
267 | mkt << "preprocess: $(FORMS) $(MOCS) $(PARSERS)" << endl; | 267 | mkt << "preprocess: $(FORMS) $(MOCS) $(PARSERS)" << endl; |
268 | mkt << "preprocess_clean: mocclean uiclean parser_clean" << endl << endl; | 268 | mkt << "preprocess_clean: mocclean uiclean parser_clean" << endl << endl; |
269 | mkt << "mocclean:" << "\n"; | 269 | mkt << "mocclean:" << "\n"; |
270 | if(!project->isEmpty("SRCMOC")) | 270 | if(!project->isEmpty("SRCMOC")) |
271 | mkt << "\t-rm -f $(MOCS)" << "\n"; | 271 | mkt << "\t-rm -f $(MOCS)" << "\n"; |
272 | mkt << "uiclean:" << "\n"; | 272 | mkt << "uiclean:" << "\n"; |
273 | if(!project->isEmpty("UICIMPLS")) | 273 | if(!project->isEmpty("UICIMPLS")) |
274 | mkt << "\t-rm -f $(FORMS)" << "\n"; | 274 | mkt << "\t-rm -f $(FORMS)" << "\n"; |
275 | mkt << "parser_clean:" << "\n"; | 275 | mkt << "parser_clean:" << "\n"; |
276 | if(!project->isEmpty("YACCSOURCES") || !project->isEmpty("LEXSOURCES")) | 276 | if(!project->isEmpty("YACCSOURCES") || !project->isEmpty("LEXSOURCES")) |
277 | mkt << "\t-rm -f $(PARSERS)" << "\n"; | 277 | mkt << "\t-rm -f $(PARSERS)" << "\n"; |
278 | writeUicSrc(mkt, "FORMS"); | 278 | writeUicSrc(mkt, "FORMS"); |
279 | writeMocSrc(mkt, "HEADERS"); | 279 | writeMocSrc(mkt, "HEADERS"); |
280 | writeMocSrc(mkt, "SOURCES"); | 280 | writeMocSrc(mkt, "SOURCES"); |
281 | writeMocSrc(mkt, "UICDECLS"); | 281 | writeMocSrc(mkt, "UICDECLS"); |
282 | writeYaccSrc(mkt, "YACCSOURCES"); | 282 | writeYaccSrc(mkt, "YACCSOURCES"); |
283 | writeLexSrc(mkt, "LEXSOURCES"); | 283 | writeLexSrc(mkt, "LEXSOURCES"); |
284 | mkf.close(); | 284 | mkf.close(); |
285 | } | 285 | } |
286 | QString target_key = keyFor("QMAKE_PBX_PREPROCESS_TARGET"); | 286 | QString target_key = keyFor("QMAKE_PBX_PREPROCESS_TARGET"); |
287 | mkfile = fileFixify(mkfile, QDir::currentDirPath()); | 287 | mkfile = fileFixify(mkfile, QDir::currentDirPath()); |
288 | t << "\t\t" << target_key << " = {" << "\n" | 288 | t << "\t\t" << target_key << " = {" << "\n" |
289 | << "\t\t\t" << "buildArgumentsString = \"-f " << mkfile << "\";" << "\n" | 289 | << "\t\t\t" << "buildArgumentsString = \"-f " << mkfile << "\";" << "\n" |
290 | << "\t\t\t" << "buildPhases = (" << "\n" | 290 | << "\t\t\t" << "buildPhases = (" << "\n" |
291 | << "\t\t\t" << ");" << "\n" | 291 | << "\t\t\t" << ");" << "\n" |
292 | << "\t\t\t" << "buildSettings = {" << "\n" | 292 | << "\t\t\t" << "buildSettings = {" << "\n" |
293 | << "\t\t\t" << "};" << "\n" | 293 | << "\t\t\t" << "};" << "\n" |
294 | << "\t\t\t" << "buildToolPath = \"/usr/bin/gnumake\";"<< "\n" | 294 | << "\t\t\t" << "buildToolPath = \"/usr/bin/gnumake\";"<< "\n" |
295 | << "\t\t\t" << "buildWorkingDirectory = \"" << QDir::currentDirPath() << "\";" << "\n" | 295 | << "\t\t\t" << "buildWorkingDirectory = \"" << QDir::currentDirPath() << "\";" << "\n" |
296 | << "\t\t\t" << "dependencies = (" << "\n" | 296 | << "\t\t\t" << "dependencies = (" << "\n" |
297 | << "\t\t\t" << ");" << "\n" | 297 | << "\t\t\t" << ");" << "\n" |
298 | << "\t\t\t" << "isa = PBXLegacyTarget;" << "\n" | 298 | << "\t\t\t" << "isa = PBXLegacyTarget;" << "\n" |
299 | << "\t\t\t" << "name = QtPreprocessors;" << "\n" | 299 | << "\t\t\t" << "name = QtPreprocessors;" << "\n" |
300 | << "\t\t\t" << "productName = QtPreprocessors;" << "\n" | 300 | << "\t\t\t" << "productName = QtPreprocessors;" << "\n" |
301 | << "\t\t\t" << "settingsToExpand = 6;" << "\n" | 301 | << "\t\t\t" << "settingsToExpand = 6;" << "\n" |
302 | << "\t\t\t" << "settingsToPassInEnvironment = 287;" << "\n" | 302 | << "\t\t\t" << "settingsToPassInEnvironment = 287;" << "\n" |
303 | << "\t\t\t" << "settingsToPassOnCommandLine = 280;" << "\n" | 303 | << "\t\t\t" << "settingsToPassOnCommandLine = 280;" << "\n" |
304 | << "\t\t\t" << "shouldsUseHeadermap = 0;" << "\n" | 304 | << "\t\t\t" << "shouldsUseHeadermap = 0;" << "\n" |
305 | << "\t\t" << "};" << "\n"; | 305 | << "\t\t" << "};" << "\n"; |
306 | 306 | ||
307 | QString target_depend_key = keyFor("QMAKE_PBX_PREPROCESS_TARGET_DEPEND"); | 307 | QString target_depend_key = keyFor("QMAKE_PBX_PREPROCESS_TARGET_DEPEND"); |
308 | project->variables()["QMAKE_PBX_TARGETDEPENDS"].append(target_depend_key); | 308 | project->variables()["QMAKE_PBX_TARGETDEPENDS"].append(target_depend_key); |
309 | t << "\t\t" << target_depend_key << " = {" << "\n" | 309 | t << "\t\t" << target_depend_key << " = {" << "\n" |
310 | << "\t\t\t" << "isa = PBXTargetDependency;" << "\n" | 310 | << "\t\t\t" << "isa = PBXTargetDependency;" << "\n" |
311 | << "\t\t\t" << "target = " << target_key << ";" << "\n" | 311 | << "\t\t\t" << "target = " << target_key << ";" << "\n" |
312 | << "\t\t" << "};" << "\n"; | 312 | << "\t\t" << "};" << "\n"; |
313 | } | 313 | } |
314 | //SOURCE BUILDPHASE | 314 | //SOURCE BUILDPHASE |
315 | if(!project->isEmpty("QMAKE_PBX_OBJ")) { | 315 | if(!project->isEmpty("QMAKE_PBX_OBJ")) { |
316 | QString grp = "Build Sources", key = keyFor(grp); | 316 | QString grp = "Build Sources", key = keyFor(grp); |
317 | project->variables()["QMAKE_PBX_BUILDPHASES"].append(key); | 317 | project->variables()["QMAKE_PBX_BUILDPHASES"].append(key); |
318 | t << "\t\t" << key << " = {" << "\n" | 318 | t << "\t\t" << key << " = {" << "\n" |
319 | << "\t\t\t" << "buildActionMask = 2147483647;" << "\n" | 319 | << "\t\t\t" << "buildActionMask = 2147483647;" << "\n" |
320 | << "\t\t\t" << "files = (" << "\n" | 320 | << "\t\t\t" << "files = (" << "\n" |
321 | << varGlue("QMAKE_PBX_OBJ", "\t\t\t\t", ",\n\t\t\t\t", "\n") | 321 | << varGlue("QMAKE_PBX_OBJ", "\t\t\t\t", ",\n\t\t\t\t", "\n") |
322 | << "\t\t\t" << ");" << "\n" | 322 | << "\t\t\t" << ");" << "\n" |
323 | << "\t\t\t" << "isa = PBXSourcesBuildPhase;" << "\n" | 323 | << "\t\t\t" << "isa = PBXSourcesBuildPhase;" << "\n" |
324 | << "\t\t\t" << "name = \"" << grp << "\";" << "\n" | 324 | << "\t\t\t" << "name = \"" << grp << "\";" << "\n" |
325 | << "\t\t" << "};" << "\n"; | 325 | << "\t\t" << "};" << "\n"; |
326 | } | 326 | } |
327 | 327 | ||
328 | if(!project->isActiveConfig("staticlib")) { //DUMP LIBRARIES | 328 | if(!project->isActiveConfig("staticlib")) { //DUMP LIBRARIES |
329 | QStringList &libdirs = project->variables()["QMAKE_PBX_LIBPATHS"]; | 329 | QStringList &libdirs = project->variables()["QMAKE_PBX_LIBPATHS"]; |
330 | QString libs[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_LIBS", QString::null }; | 330 | QString libs[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_LIBS", QString::null }; |
331 | for(i = 0; !libs[i].isNull(); i++) { | 331 | for(i = 0; !libs[i].isNull(); i++) { |
332 | tmp = project->variables()[libs[i]]; | 332 | tmp = project->variables()[libs[i]]; |
333 | for(QStringList::Iterator it = tmp.begin(); it != tmp.end();) { | 333 | for(QStringList::Iterator it = tmp.begin(); it != tmp.end();) { |
334 | bool remove = FALSE; | 334 | bool remove = FALSE; |
335 | QString library, name, opt = (*it).stripWhiteSpace(); | 335 | QString library, name, opt = (*it).stripWhiteSpace(); |
336 | if(opt.startsWith("-L")) { | 336 | if(opt.startsWith("-L")) { |
337 | QString r = opt.right(opt.length() - 2); | 337 | QString r = opt.right(opt.length() - 2); |
338 | fixEnvVariables(r); | 338 | fixEnvVariables(r); |
339 | libdirs.append(r); | 339 | libdirs.append(r); |
340 | } else if(opt.startsWith("-l")) { | 340 | } else if(opt.startsWith("-l")) { |
341 | name = opt.right(opt.length() - 2); | 341 | name = opt.right(opt.length() - 2); |
342 | QString lib("lib" + name); | 342 | QString lib("lib" + name); |
343 | for(QStringList::Iterator lit = libdirs.begin(); lit != libdirs.end(); ++lit) { | 343 | for(QStringList::Iterator lit = libdirs.begin(); lit != libdirs.end(); ++lit) { |
344 | if(project->isActiveConfig("link_prl")) { | 344 | if(project->isActiveConfig("link_prl")) { |
345 | /* This isn't real nice, but it is real usefull. This looks in a prl | 345 | /* This isn't real nice, but it is real useful. This looks in a prl |
346 | for what the library will ultimately be called so we can stick it | 346 | for what the library will ultimately be called so we can stick it |
347 | in the ProjectFile. If the prl format ever changes (not likely) then | 347 | in the ProjectFile. If the prl format ever changes (not likely) then |
348 | this will not really work. However, more concerning is that it will | 348 | this will not really work. However, more concerning is that it will |
349 | encode the version number in the Project file which might be a bad | 349 | encode the version number in the Project file which might be a bad |
350 | things in days to come? --Sam | 350 | things in days to come? --Sam |
351 | */ | 351 | */ |
352 | QString prl_file = (*lit) + Option::dir_sep + lib + Option::prl_ext; | 352 | QString prl_file = (*lit) + Option::dir_sep + lib + Option::prl_ext; |
353 | if(QFile::exists(prl_file)) { | 353 | if(QFile::exists(prl_file)) { |
354 | QMakeProject proj; | 354 | QMakeProject proj; |
355 | if(proj.read(prl_file, QDir::currentDirPath())) { | 355 | if(proj.read(prl_file, QDir::currentDirPath())) { |
356 | if(!proj.isEmpty("QMAKE_PRL_TARGET")) { | 356 | if(!proj.isEmpty("QMAKE_PRL_TARGET")) { |
357 | library = (*lit) + Option::dir_sep + proj.first("QMAKE_PRL_TARGET"); | 357 | library = (*lit) + Option::dir_sep + proj.first("QMAKE_PRL_TARGET"); |
358 | debug_msg(1, "pbuilder: Found library (%s) via PRL %s (%s)", | 358 | debug_msg(1, "pbuilder: Found library (%s) via PRL %s (%s)", |
359 | opt.latin1(), prl_file.latin1(), library.latin1()); | 359 | opt.latin1(), prl_file.latin1(), library.latin1()); |
360 | remove = TRUE; | 360 | remove = TRUE; |
361 | } | 361 | } |
362 | } | 362 | } |
363 | 363 | ||
364 | } | 364 | } |
365 | } | 365 | } |
366 | if(!remove) { | 366 | if(!remove) { |
367 | QString extns[] = { ".dylib", ".so", ".a", QString::null }; | 367 | QString extns[] = { ".dylib", ".so", ".a", QString::null }; |
368 | for(int n = 0; !remove && !extns[n].isNull(); n++) { | 368 | for(int n = 0; !remove && !extns[n].isNull(); n++) { |
369 | QString tmp = (*lit) + Option::dir_sep + lib + extns[n]; | 369 | QString tmp = (*lit) + Option::dir_sep + lib + extns[n]; |
370 | if(QFile::exists(tmp)) { | 370 | if(QFile::exists(tmp)) { |
371 | library = tmp; | 371 | library = tmp; |
372 | debug_msg(1, "pbuilder: Found library (%s) via %s", | 372 | debug_msg(1, "pbuilder: Found library (%s) via %s", |
373 | opt.latin1(), library.latin1()); | 373 | opt.latin1(), library.latin1()); |
374 | remove = TRUE; | 374 | remove = TRUE; |
375 | } | 375 | } |
376 | } | 376 | } |
377 | } | 377 | } |
378 | } | 378 | } |
379 | } else if(opt == "-framework") { | 379 | } else if(opt == "-framework") { |
380 | ++it; | 380 | ++it; |
381 | if(it == tmp.end()) | 381 | if(it == tmp.end()) |
382 | break; | 382 | break; |
383 | QStringList &fdirs = project->variables()["QMAKE_FRAMEWORKDIR"]; | 383 | QStringList &fdirs = project->variables()["QMAKE_FRAMEWORKDIR"]; |
384 | if(fdirs.isEmpty()) | 384 | if(fdirs.isEmpty()) |
385 | fdirs.append("/System/Library/Frameworks/"); | 385 | fdirs.append("/System/Library/Frameworks/"); |
386 | for(QStringList::Iterator fit = fdirs.begin(); fit != fdirs.end(); ++fit) { | 386 | for(QStringList::Iterator fit = fdirs.begin(); fit != fdirs.end(); ++fit) { |
387 | if(QFile::exists((*fit) + QDir::separator() + (*it) + ".framework")) { | 387 | if(QFile::exists((*fit) + QDir::separator() + (*it) + ".framework")) { |
388 | --it; | 388 | --it; |
389 | it = tmp.remove(it); | 389 | it = tmp.remove(it); |
390 | remove = TRUE; | 390 | remove = TRUE; |
391 | library = (*fit) + Option::dir_sep + (*it) + ".framework"; | 391 | library = (*fit) + Option::dir_sep + (*it) + ".framework"; |
392 | break; | 392 | break; |
393 | } | 393 | } |
394 | } | 394 | } |
395 | } else if(opt.left(1) != "-") { | 395 | } else if(opt.left(1) != "-") { |
396 | remove = TRUE; | 396 | remove = TRUE; |
397 | library = opt; | 397 | library = opt; |
398 | } | 398 | } |
399 | if(!library.isEmpty()) { | 399 | if(!library.isEmpty()) { |
400 | if(name.isEmpty()) { | 400 | if(name.isEmpty()) { |
401 | int slsh = library.findRev(Option::dir_sep); | 401 | int slsh = library.findRev(Option::dir_sep); |
402 | if(slsh != -1) | 402 | if(slsh != -1) |
403 | name = library.right(library.length() - slsh - 1); | 403 | name = library.right(library.length() - slsh - 1); |
404 | } | 404 | } |
405 | library = fileFixify(library); | 405 | library = fileFixify(library); |
406 | QString key = keyFor(library); | 406 | QString key = keyFor(library); |
407 | bool is_frmwrk = (library.endsWith(".framework")); | 407 | bool is_frmwrk = (library.endsWith(".framework")); |
408 | t << "\t\t" << key << " = {" << "\n" | 408 | t << "\t\t" << key << " = {" << "\n" |
409 | << "\t\t\t" << "isa = " << (is_frmwrk ? "PBXFrameworkReference" : "PBXFileReference") << ";" << "\n" | 409 | << "\t\t\t" << "isa = " << (is_frmwrk ? "PBXFrameworkReference" : "PBXFileReference") << ";" << "\n" |
410 | << "\t\t\t" << "name = \"" << name << "\";" << "\n" | 410 | << "\t\t\t" << "name = \"" << name << "\";" << "\n" |
411 | << "\t\t\t" << "path = \"" << library << "\";" << "\n" | 411 | << "\t\t\t" << "path = \"" << library << "\";" << "\n" |
412 | << "\t\t\t" << "refType = " << reftypeForFile(library) << ";" << "\n" | 412 | << "\t\t\t" << "refType = " << reftypeForFile(library) << ";" << "\n" |
413 | << "\t\t" << "};" << "\n"; | 413 | << "\t\t" << "};" << "\n"; |
414 | project->variables()["QMAKE_PBX_LIBRARIES"].append(key); | 414 | project->variables()["QMAKE_PBX_LIBRARIES"].append(key); |
415 | QString obj_key = library + ".o"; | 415 | QString obj_key = library + ".o"; |
416 | obj_key = keyFor(obj_key); | 416 | obj_key = keyFor(obj_key); |
417 | t << "\t\t" << obj_key << " = {" << "\n" | 417 | t << "\t\t" << obj_key << " = {" << "\n" |
418 | << "\t\t\t" << "fileRef = " << key << ";" << "\n" | 418 | << "\t\t\t" << "fileRef = " << key << ";" << "\n" |
419 | << "\t\t\t" << "isa = PBXBuildFile;" << "\n" | 419 | << "\t\t\t" << "isa = PBXBuildFile;" << "\n" |
420 | << "\t\t\t" << "settings = {" << "\n" | 420 | << "\t\t\t" << "settings = {" << "\n" |
421 | << "\t\t\t" << "};" << "\n" | 421 | << "\t\t\t" << "};" << "\n" |
422 | << "\t\t" << "};" << "\n"; | 422 | << "\t\t" << "};" << "\n"; |
423 | project->variables()["QMAKE_PBX_BUILD_LIBRARIES"].append(obj_key); | 423 | project->variables()["QMAKE_PBX_BUILD_LIBRARIES"].append(obj_key); |
424 | } | 424 | } |
425 | if(remove) | 425 | if(remove) |
426 | it = tmp.remove(it); | 426 | it = tmp.remove(it); |
427 | else | 427 | else |
428 | ++it; | 428 | ++it; |
429 | } | 429 | } |
430 | project->variables()[libs[i]] = tmp; | 430 | project->variables()[libs[i]] = tmp; |
431 | } | 431 | } |
432 | } | 432 | } |
433 | //SUBLIBS BUILDPHASE (just another makefile) | 433 | //SUBLIBS BUILDPHASE (just another makefile) |
434 | if(!project->isEmpty("SUBLIBS")) { | 434 | if(!project->isEmpty("SUBLIBS")) { |
435 | QString mkfile = pbx_dir + Option::dir_sep + "qt_sublibs.mak"; | 435 | QString mkfile = pbx_dir + Option::dir_sep + "qt_sublibs.mak"; |
436 | QFile mkf(mkfile); | 436 | QFile mkf(mkfile); |
437 | if(mkf.open(IO_WriteOnly | IO_Translate)) { | 437 | if(mkf.open(IO_WriteOnly | IO_Translate)) { |
438 | debug_msg(1, "pbuilder: Creating file: %s", mkfile.latin1()); | 438 | debug_msg(1, "pbuilder: Creating file: %s", mkfile.latin1()); |
439 | QTextStream mkt(&mkf); | 439 | QTextStream mkt(&mkf); |
440 | writeHeader(mkt); | 440 | writeHeader(mkt); |
441 | mkt << "SUBLIBS= "; | 441 | mkt << "SUBLIBS= "; |
442 | tmp = project->variables()["SUBLIBS"]; | 442 | tmp = project->variables()["SUBLIBS"]; |
443 | QStringList::Iterator it; | 443 | QStringList::Iterator it; |
444 | for(it = tmp.begin(); it != tmp.end(); ++it) | 444 | for(it = tmp.begin(); it != tmp.end(); ++it) |
445 | t << "tmp/lib" << (*it) << ".a "; | 445 | t << "tmp/lib" << (*it) << ".a "; |
446 | t << endl << endl; | 446 | t << endl << endl; |
447 | mkt << "sublibs: $(SUBLIBS)" << endl << endl; | 447 | mkt << "sublibs: $(SUBLIBS)" << endl << endl; |
448 | tmp = project->variables()["SUBLIBS"]; | 448 | tmp = project->variables()["SUBLIBS"]; |
449 | for(it = tmp.begin(); it != tmp.end(); ++it) | 449 | for(it = tmp.begin(); it != tmp.end(); ++it) |
450 | t << "tmp/lib" << (*it) << ".a" << ":\n\t" | 450 | t << "tmp/lib" << (*it) << ".a" << ":\n\t" |
451 | << var(QString("MAKELIB") + (*it)) << endl << endl; | 451 | << var(QString("MAKELIB") + (*it)) << endl << endl; |
452 | mkf.close(); | 452 | mkf.close(); |
453 | } | 453 | } |
454 | QString phase_key = keyFor("QMAKE_PBX_SUBLIBS_BUILDPHASE"); | 454 | QString phase_key = keyFor("QMAKE_PBX_SUBLIBS_BUILDPHASE"); |
455 | mkfile = fileFixify(mkfile, QDir::currentDirPath()); | 455 | mkfile = fileFixify(mkfile, QDir::currentDirPath()); |
456 | project->variables()["QMAKE_PBX_BUILDPHASES"].append(phase_key); | 456 | project->variables()["QMAKE_PBX_BUILDPHASES"].append(phase_key); |
457 | t << "\t\t" << phase_key << " = {" << "\n" | 457 | t << "\t\t" << phase_key << " = {" << "\n" |
458 | << "\t\t\t" << "buildActionMask = 2147483647;" << "\n" | 458 | << "\t\t\t" << "buildActionMask = 2147483647;" << "\n" |
459 | << "\t\t\t" << "files = (" << "\n" | 459 | << "\t\t\t" << "files = (" << "\n" |
460 | << "\t\t\t" << ");" << "\n" | 460 | << "\t\t\t" << ");" << "\n" |
461 | << "\t\t\t" << "generatedFileNames = (" << "\n" | 461 | << "\t\t\t" << "generatedFileNames = (" << "\n" |
462 | << "\t\t\t" << ");" << "\n" | 462 | << "\t\t\t" << ");" << "\n" |
463 | << "\t\t\t" << "isa = PBXShellScriptBuildPhase;" << "\n" | 463 | << "\t\t\t" << "isa = PBXShellScriptBuildPhase;" << "\n" |
464 | << "\t\t\t" << "name = \"Qt Sublibs\";" << "\n" | 464 | << "\t\t\t" << "name = \"Qt Sublibs\";" << "\n" |
465 | << "\t\t\t" << "neededFileNames = (" << "\n" | 465 | << "\t\t\t" << "neededFileNames = (" << "\n" |
466 | << "\t\t\t" << ");" << "\n" | 466 | << "\t\t\t" << ");" << "\n" |
467 | << "\t\t\t" << "shellPath = /bin/sh;" << "\n" | 467 | << "\t\t\t" << "shellPath = /bin/sh;" << "\n" |
468 | << "\t\t\t" << "shellScript = \"make -C " << QDir::currentDirPath() << | 468 | << "\t\t\t" << "shellScript = \"make -C " << QDir::currentDirPath() << |
469 | " -f " << mkfile << "\";" << "\n" | 469 | " -f " << mkfile << "\";" << "\n" |
470 | << "\t\t" << "};" << "\n"; | 470 | << "\t\t" << "};" << "\n"; |
471 | } | 471 | } |
472 | //LIBRARY BUILDPHASE | 472 | //LIBRARY BUILDPHASE |
473 | if(!project->isEmpty("QMAKE_PBX_LIBRARIES")) { | 473 | if(!project->isEmpty("QMAKE_PBX_LIBRARIES")) { |
474 | tmp = project->variables()["QMAKE_PBX_LIBRARIES"]; | 474 | tmp = project->variables()["QMAKE_PBX_LIBRARIES"]; |
475 | if(!tmp.isEmpty()) { | 475 | if(!tmp.isEmpty()) { |
476 | QString grp("External Frameworks and Libraries"), key = keyFor(grp); | 476 | QString grp("External Frameworks and Libraries"), key = keyFor(grp); |
477 | project->variables()["QMAKE_PBX_GROUPS"].append(key); | 477 | project->variables()["QMAKE_PBX_GROUPS"].append(key); |
478 | t << "\t\t" << key << " = {" << "\n" | 478 | t << "\t\t" << key << " = {" << "\n" |
479 | << "\t\t\t" << "children = (" << "\n" | 479 | << "\t\t\t" << "children = (" << "\n" |
480 | << varGlue("QMAKE_PBX_LIBRARIES", "\t\t\t\t", ",\n\t\t\t\t", "\n") | 480 | << varGlue("QMAKE_PBX_LIBRARIES", "\t\t\t\t", ",\n\t\t\t\t", "\n") |
481 | << "\t\t\t" << ");" << "\n" | 481 | << "\t\t\t" << ");" << "\n" |
482 | << "\t\t\t" << "isa = PBXGroup;" << "\n" | 482 | << "\t\t\t" << "isa = PBXGroup;" << "\n" |
483 | << "\t\t\t" << "name = \"" << grp << "\"" << ";" << "\n" | 483 | << "\t\t\t" << "name = \"" << grp << "\"" << ";" << "\n" |
484 | << "\t\t\t" << "path = \"\";" << "\n" | 484 | << "\t\t\t" << "path = \"\";" << "\n" |
485 | << "\t\t\t" << "refType = 4;" << "\n" | 485 | << "\t\t\t" << "refType = 4;" << "\n" |
486 | << "\t\t" << "};" << "\n"; | 486 | << "\t\t" << "};" << "\n"; |
487 | } | 487 | } |
488 | } | 488 | } |
489 | { | 489 | { |
490 | QString grp("Frameworks & Libraries"), key = keyFor(grp); | 490 | QString grp("Frameworks & Libraries"), key = keyFor(grp); |
491 | project->variables()["QMAKE_PBX_BUILDPHASES"].append(key); | 491 | project->variables()["QMAKE_PBX_BUILDPHASES"].append(key); |
492 | t << "\t\t" << key << " = {" << "\n" | 492 | t << "\t\t" << key << " = {" << "\n" |
493 | << "\t\t\t" << "buildActionMask = 2147483647;" << "\n" | 493 | << "\t\t\t" << "buildActionMask = 2147483647;" << "\n" |
494 | << "\t\t\t" << "files = (" << "\n" | 494 | << "\t\t\t" << "files = (" << "\n" |
495 | << varGlue("QMAKE_PBX_BUILD_LIBRARIES", "\t\t\t\t", ",\n\t\t\t\t", "\n") | 495 | << varGlue("QMAKE_PBX_BUILD_LIBRARIES", "\t\t\t\t", ",\n\t\t\t\t", "\n") |
496 | << "\t\t\t" << ");" << "\n" | 496 | << "\t\t\t" << ");" << "\n" |
497 | << "\t\t\t" << "isa = PBXFrameworksBuildPhase;" << "\n" | 497 | << "\t\t\t" << "isa = PBXFrameworksBuildPhase;" << "\n" |
498 | << "\t\t\t" << "name = \"" << grp << "\";" << "\n" | 498 | << "\t\t\t" << "name = \"" << grp << "\";" << "\n" |
499 | << "\t\t" << "};" << "\n"; | 499 | << "\t\t" << "};" << "\n"; |
500 | } | 500 | } |
501 | if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console") && | 501 | if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console") && |
502 | project->first("TEMPLATE") == "app") { //BUNDLE RESOURCES | 502 | project->first("TEMPLATE") == "app") { //BUNDLE RESOURCES |
503 | QString grp("Bundle Resources"), key = keyFor(grp); | 503 | QString grp("Bundle Resources"), key = keyFor(grp); |
504 | project->variables()["QMAKE_PBX_BUILDPHASES"].append(key); | 504 | project->variables()["QMAKE_PBX_BUILDPHASES"].append(key); |
505 | t << "\t\t" << key << " = {" << "\n" | 505 | t << "\t\t" << key << " = {" << "\n" |
506 | << "\t\t\t" << "buildActionMask = 2147483647;" << "\n" | 506 | << "\t\t\t" << "buildActionMask = 2147483647;" << "\n" |
507 | << "\t\t\t" << "files = (" << "\n" | 507 | << "\t\t\t" << "files = (" << "\n" |
508 | << (!project->isEmpty("RC_FILE") ? keyFor("ICNS_FILE_REFERENCE") : QString("")) | 508 | << (!project->isEmpty("RC_FILE") ? keyFor("ICNS_FILE_REFERENCE") : QString("")) |
509 | << "\t\t\t" << ");" << "\n" | 509 | << "\t\t\t" << ");" << "\n" |
510 | << "\t\t\t" << "isa = PBXResourcesBuildPhase;" << "\n" | 510 | << "\t\t\t" << "isa = PBXResourcesBuildPhase;" << "\n" |
511 | << "\t\t\t" << "name = \"" << grp << "\";" << "\n" | 511 | << "\t\t\t" << "name = \"" << grp << "\";" << "\n" |
512 | << "\t\t" << "};" << "\n"; | 512 | << "\t\t" << "};" << "\n"; |
513 | } | 513 | } |
514 | 514 | ||
515 | //DUMP EVERYTHING THAT TIES THE ABOVE TOGETHER | 515 | //DUMP EVERYTHING THAT TIES THE ABOVE TOGETHER |
516 | //PRODUCTS | 516 | //PRODUCTS |
517 | { | 517 | { |
518 | QString grp("Products"), key = keyFor(grp); | 518 | QString grp("Products"), key = keyFor(grp); |
519 | project->variables()["QMAKE_PBX_GROUPS"].append(key); | 519 | project->variables()["QMAKE_PBX_GROUPS"].append(key); |
520 | t << "\t\t" << key << " = {" << "\n" | 520 | t << "\t\t" << key << " = {" << "\n" |
521 | << "\t\t\t" << "children = (" << "\n" | 521 | << "\t\t\t" << "children = (" << "\n" |
522 | << "\t\t\t\t" << keyFor("QMAKE_PBX_REFERENCE") << "\n" | 522 | << "\t\t\t\t" << keyFor("QMAKE_PBX_REFERENCE") << "\n" |
523 | << "\t\t\t" << ");" << "\n" | 523 | << "\t\t\t" << ");" << "\n" |
524 | << "\t\t\t" << "isa = PBXGroup;" << "\n" | 524 | << "\t\t\t" << "isa = PBXGroup;" << "\n" |
525 | << "\t\t\t" << "name = Products;" << "\n" | 525 | << "\t\t\t" << "name = Products;" << "\n" |
526 | << "\t\t\t" << "refType = 4;" << "\n" | 526 | << "\t\t\t" << "refType = 4;" << "\n" |
527 | << "\t\t" << "};" << "\n"; | 527 | << "\t\t" << "};" << "\n"; |
528 | } | 528 | } |
529 | { //INSTALL BUILDPHASE (sh script) | 529 | { //INSTALL BUILDPHASE (sh script) |
530 | QString targ = project->first("TARGET"); | 530 | QString targ = project->first("TARGET"); |
531 | if(project->first("TEMPLATE") == "app" || | 531 | if(project->first("TEMPLATE") == "app" || |
532 | (project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") && | 532 | (project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") && |
533 | project->isActiveConfig("frameworklib"))) | 533 | project->isActiveConfig("frameworklib"))) |
534 | targ = project->first("QMAKE_ORIG_TARGET"); | 534 | targ = project->first("QMAKE_ORIG_TARGET"); |
535 | int slsh = targ.findRev(Option::dir_sep); | 535 | int slsh = targ.findRev(Option::dir_sep); |
536 | if(slsh != -1) | 536 | if(slsh != -1) |
537 | targ = targ.right(targ.length() - slsh - 1); | 537 | targ = targ.right(targ.length() - slsh - 1); |
538 | fixEnvVariables(targ); | 538 | fixEnvVariables(targ); |
539 | QStringList links; | 539 | QStringList links; |
540 | if(project->first("TEMPLATE") == "app") { | 540 | if(project->first("TEMPLATE") == "app") { |
541 | if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) | 541 | if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) |
542 | targ += ".app"; | 542 | targ += ".app"; |
543 | } else if(!project->isActiveConfig("staticlib") && | 543 | } else if(!project->isActiveConfig("staticlib") && |
544 | !project->isActiveConfig("frameworklib")) { | 544 | !project->isActiveConfig("frameworklib")) { |
545 | QString li[] = { "TARGET_", "TARGET_x", "TARGET_x.y", QString::null }; | 545 | QString li[] = { "TARGET_", "TARGET_x", "TARGET_x.y", QString::null }; |
546 | for(int n = 0; !li[n].isNull(); n++) { | 546 | for(int n = 0; !li[n].isNull(); n++) { |
547 | QString t = project->first(li[n]); | 547 | QString t = project->first(li[n]); |
548 | slsh = t.findRev(Option::dir_sep); | 548 | slsh = t.findRev(Option::dir_sep); |
549 | if(slsh != -1) | 549 | if(slsh != -1) |
550 | t = t.right(t.length() - slsh); | 550 | t = t.right(t.length() - slsh); |
551 | fixEnvVariables(t); | 551 | fixEnvVariables(t); |
552 | links << t; | 552 | links << t; |
553 | } | 553 | } |
554 | } | 554 | } |
555 | QString script = pbx_dir + Option::dir_sep + "qt_install.sh"; | 555 | QString script = pbx_dir + Option::dir_sep + "qt_install.sh"; |
556 | QFile shf(script); | 556 | QFile shf(script); |
557 | if(shf.open(IO_WriteOnly | IO_Translate)) { | 557 | if(shf.open(IO_WriteOnly | IO_Translate)) { |
558 | debug_msg(1, "pbuilder: Creating file: %s", script.latin1()); | 558 | debug_msg(1, "pbuilder: Creating file: %s", script.latin1()); |
559 | QString targ = project->first("QMAKE_ORIG_TARGET"), cpflags; | 559 | QString targ = project->first("QMAKE_ORIG_TARGET"), cpflags; |
560 | if(project->first("TEMPLATE") == "app") { | 560 | if(project->first("TEMPLATE") == "app") { |
561 | targ = project->first("TARGET"); | 561 | targ = project->first("TARGET"); |
562 | if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) { | 562 | if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) { |
563 | targ += ".app"; | 563 | targ += ".app"; |
564 | cpflags += "-r "; | 564 | cpflags += "-r "; |
565 | } | 565 | } |
566 | } else if(!project->isActiveConfig("frameworklib")) { | 566 | } else if(!project->isActiveConfig("frameworklib")) { |
567 | if(project->isActiveConfig("staticlib")) | 567 | if(project->isActiveConfig("staticlib")) |
568 | targ = project->first("TARGET"); | 568 | targ = project->first("TARGET"); |
569 | else | 569 | else |
570 | targ = project->first("TARGET_"); | 570 | targ = project->first("TARGET_"); |
571 | int slsh = targ.findRev(Option::dir_sep); | 571 | int slsh = targ.findRev(Option::dir_sep); |
572 | if(slsh != -1) | 572 | if(slsh != -1) |
573 | targ = targ.right(targ.length() - slsh - 1); | 573 | targ = targ.right(targ.length() - slsh - 1); |
574 | } | 574 | } |
575 | QTextStream sht(&shf); | 575 | QTextStream sht(&shf); |
576 | QString dstdir = project->first("DESTDIR"); | 576 | QString dstdir = project->first("DESTDIR"); |
577 | fixEnvVariables(dstdir); | 577 | fixEnvVariables(dstdir); |
578 | 578 | ||
579 | sht << "#!/bin/sh" << endl; | 579 | sht << "#!/bin/sh" << endl; |
580 | //copy the actual target | 580 | //copy the actual target |
581 | sht << "OUT_TARG=\"" << targ << "\"\n" | 581 | sht << "OUT_TARG=\"" << targ << "\"\n" |
582 | << "[ -z \"$BUILD_ROOT\" ] || OUT_TARG=\"${BUILD_ROOT}/${OUT_TARG}\"" << endl; | 582 | << "[ -z \"$BUILD_ROOT\" ] || OUT_TARG=\"${BUILD_ROOT}/${OUT_TARG}\"" << endl; |
583 | sht << "[ \"$OUT_TARG\" = \"" | 583 | sht << "[ \"$OUT_TARG\" = \"" |
584 | << (dstdir.isEmpty() ? QDir::currentDirPath() + QDir::separator(): dstdir) << targ << "\" ] || " | 584 | << (dstdir.isEmpty() ? QDir::currentDirPath() + QDir::separator(): dstdir) << targ << "\" ] || " |
585 | << "[ \"$OUT_TARG\" = \"" << targ << "\" ] || " | 585 | << "[ \"$OUT_TARG\" = \"" << targ << "\" ] || " |
586 | << "cp -r \"$OUT_TARG\" " << "\"" << dstdir << targ << "\"" << endl; | 586 | << "cp -r \"$OUT_TARG\" " << "\"" << dstdir << targ << "\"" << endl; |
587 | //rename as a framework | 587 | //rename as a framework |
588 | if(project->first("TEMPLATE") == "lib" && project->isActiveConfig("frameworklib")) | 588 | if(project->first("TEMPLATE") == "lib" && project->isActiveConfig("frameworklib")) |
589 | sht << "ln -sf \"" << targ << "\" " << "\"" << dstdir << targ << "\"" << endl; | 589 | sht << "ln -sf \"" << targ << "\" " << "\"" << dstdir << targ << "\"" << endl; |
590 | //create all the version symlinks (just to be like unixmake) | 590 | //create all the version symlinks (just to be like unixmake) |
591 | for(QStringList::Iterator it = links.begin(); it != links.end(); ++it) { | 591 | for(QStringList::Iterator it = links.begin(); it != links.end(); ++it) { |
592 | if(targ != (*it)) | 592 | if(targ != (*it)) |
593 | sht << "ln -sf \"" << targ << "\" " << "\"" << dstdir << (*it) << "\"" << endl; | 593 | sht << "ln -sf \"" << targ << "\" " << "\"" << dstdir << (*it) << "\"" << endl; |
594 | } | 594 | } |
595 | shf.close(); | 595 | shf.close(); |
596 | #ifdef Q_OS_UNIX | 596 | #ifdef Q_OS_UNIX |
597 | chmod(script.latin1(), S_IRWXU | S_IRWXG); | 597 | chmod(script.latin1(), S_IRWXU | S_IRWXG); |
598 | #endif | 598 | #endif |
599 | QString phase_key = keyFor("QMAKE_PBX_INSTALL_BUILDPHASE"); | 599 | QString phase_key = keyFor("QMAKE_PBX_INSTALL_BUILDPHASE"); |
600 | script = fileFixify(script, QDir::currentDirPath()); | 600 | script = fileFixify(script, QDir::currentDirPath()); |
601 | project->variables()["QMAKE_PBX_BUILDPHASES"].append(phase_key); | 601 | project->variables()["QMAKE_PBX_BUILDPHASES"].append(phase_key); |
602 | t << "\t\t" << phase_key << " = {" << "\n" | 602 | t << "\t\t" << phase_key << " = {" << "\n" |
603 | << "\t\t\t" << "buildActionMask = 8;" << "\n" //only on install! | 603 | << "\t\t\t" << "buildActionMask = 8;" << "\n" //only on install! |
604 | << "\t\t\t" << "files = (" << "\n" | 604 | << "\t\t\t" << "files = (" << "\n" |
605 | << "\t\t\t" << ");" << "\n" | 605 | << "\t\t\t" << ");" << "\n" |
606 | << "\t\t\t" << "generatedFileNames = (" << "\n" | 606 | << "\t\t\t" << "generatedFileNames = (" << "\n" |
607 | << "\t\t\t" << ");" << "\n" | 607 | << "\t\t\t" << ");" << "\n" |
608 | << "\t\t\t" << "isa = PBXShellScriptBuildPhase;" << "\n" | 608 | << "\t\t\t" << "isa = PBXShellScriptBuildPhase;" << "\n" |
609 | << "\t\t\t" << "name = \"Qt Install\";" << "\n" | 609 | << "\t\t\t" << "name = \"Qt Install\";" << "\n" |
610 | << "\t\t\t" << "neededFileNames = (" << "\n" | 610 | << "\t\t\t" << "neededFileNames = (" << "\n" |
611 | << "\t\t\t" << ");" << "\n" | 611 | << "\t\t\t" << ");" << "\n" |
612 | << "\t\t\t" << "shellPath = /bin/sh;" << "\n" | 612 | << "\t\t\t" << "shellPath = /bin/sh;" << "\n" |
613 | << "\t\t\t" << "shellScript = \"" << script << "\";" << "\n" | 613 | << "\t\t\t" << "shellScript = \"" << script << "\";" << "\n" |
614 | << "\t\t" << "};" << "\n"; | 614 | << "\t\t" << "};" << "\n"; |
615 | } | 615 | } |
616 | } | 616 | } |
617 | //ROOT_GROUP | 617 | //ROOT_GROUP |
618 | t << "\t\t" << keyFor("QMAKE_PBX_ROOT_GROUP") << " = {" << "\n" | 618 | t << "\t\t" << keyFor("QMAKE_PBX_ROOT_GROUP") << " = {" << "\n" |
619 | << "\t\t\t" << "children = (" << "\n" | 619 | << "\t\t\t" << "children = (" << "\n" |
620 | << varGlue("QMAKE_PBX_GROUPS", "\t\t\t\t", ",\n\t\t\t\t", "\n") | 620 | << varGlue("QMAKE_PBX_GROUPS", "\t\t\t\t", ",\n\t\t\t\t", "\n") |
621 | << "\t\t\t" << ");" << "\n" | 621 | << "\t\t\t" << ");" << "\n" |
622 | << "\t\t\t" << "isa = PBXGroup;" << "\n" | 622 | << "\t\t\t" << "isa = PBXGroup;" << "\n" |
623 | << "\t\t\t" << "name = " << project->first("QMAKE_ORIG_TARGET") << ";" << "\n" | 623 | << "\t\t\t" << "name = " << project->first("QMAKE_ORIG_TARGET") << ";" << "\n" |
624 | << "\t\t\t" << "path = \"\";" << "\n" | 624 | << "\t\t\t" << "path = \"\";" << "\n" |
625 | << "\t\t\t" << "refType = 4;" << "\n" | 625 | << "\t\t\t" << "refType = 4;" << "\n" |
626 | << "\t\t" << "};" << "\n"; | 626 | << "\t\t" << "};" << "\n"; |
627 | //REFERENCE | 627 | //REFERENCE |
628 | t << "\t\t" << keyFor("QMAKE_PBX_REFERENCE") << " = {" << "\n"; | 628 | t << "\t\t" << keyFor("QMAKE_PBX_REFERENCE") << " = {" << "\n"; |
629 | if(project->first("TEMPLATE") == "app") { | 629 | if(project->first("TEMPLATE") == "app") { |
630 | QString targ = project->first("QMAKE_ORIG_TARGET"); | 630 | QString targ = project->first("QMAKE_ORIG_TARGET"); |
631 | if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) { | 631 | if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) { |
632 | targ += ".app"; | 632 | targ += ".app"; |
633 | t << "\t\t\t" << "isa = PBXApplicationReference;" << "\n"; | 633 | t << "\t\t\t" << "isa = PBXApplicationReference;" << "\n"; |
634 | } else { | 634 | } else { |
635 | t << "\t\t\t" << "isa = PBXExecutableFileReference;" << "\n"; | 635 | t << "\t\t\t" << "isa = PBXExecutableFileReference;" << "\n"; |
636 | } | 636 | } |
637 | QString app = (!project->isEmpty("DESTDIR") ? project->first("DESTDIR") + project->first("QMAKE_ORIG_TARGET") : | 637 | QString app = (!project->isEmpty("DESTDIR") ? project->first("DESTDIR") + project->first("QMAKE_ORIG_TARGET") : |
638 | QDir::currentDirPath()) + Option::dir_sep + targ; | 638 | QDir::currentDirPath()) + Option::dir_sep + targ; |
639 | t << "\t\t\t" << "name = " << targ << ";" << "\n" | 639 | t << "\t\t\t" << "name = " << targ << ";" << "\n" |
640 | << "\t\t\t" << "path = \"" << targ << "\";" << "\n" | 640 | << "\t\t\t" << "path = \"" << targ << "\";" << "\n" |
641 | << "\t\t\t" << "refType = " << reftypeForFile(app) << ";" << "\n"; | 641 | << "\t\t\t" << "refType = " << reftypeForFile(app) << ";" << "\n"; |
642 | } else { | 642 | } else { |
643 | QString lib = project->first("QMAKE_ORIG_TARGET"); | 643 | QString lib = project->first("QMAKE_ORIG_TARGET"); |
644 | if(project->isActiveConfig("staticlib")) { | 644 | if(project->isActiveConfig("staticlib")) { |
645 | lib = project->first("TARGET"); | 645 | lib = project->first("TARGET"); |
646 | } else if(!project->isActiveConfig("frameworklib")) { | 646 | } else if(!project->isActiveConfig("frameworklib")) { |
647 | if(project->isActiveConfig("plugin")) | 647 | if(project->isActiveConfig("plugin")) |
648 | lib = project->first("TARGET"); | 648 | lib = project->first("TARGET"); |
649 | else | 649 | else |
650 | lib = project->first("TARGET_"); | 650 | lib = project->first("TARGET_"); |
651 | } | 651 | } |
652 | int slsh = lib.findRev(Option::dir_sep); | 652 | int slsh = lib.findRev(Option::dir_sep); |
653 | if(slsh != -1) | 653 | if(slsh != -1) |
654 | lib = lib.right(lib.length() - slsh - 1); | 654 | lib = lib.right(lib.length() - slsh - 1); |
655 | t << "\t\t\t" << "isa = PBXLibraryReference;" << "\n" | 655 | t << "\t\t\t" << "isa = PBXLibraryReference;" << "\n" |
656 | << "\t\t\t" << "path = " << lib << ";\n" | 656 | << "\t\t\t" << "path = " << lib << ";\n" |
657 | << "\t\t\t" << "refType = " << reftypeForFile(lib) << ";" << "\n"; | 657 | << "\t\t\t" << "refType = " << reftypeForFile(lib) << ";" << "\n"; |
658 | } | 658 | } |
659 | t << "\t\t" << "};" << "\n"; | 659 | t << "\t\t" << "};" << "\n"; |
660 | //TARGET | 660 | //TARGET |
661 | t << "\t\t" << keyFor("QMAKE_PBX_TARGET") << " = {" << "\n" | 661 | t << "\t\t" << keyFor("QMAKE_PBX_TARGET") << " = {" << "\n" |
662 | << "\t\t\t" << "buildPhases = (" << "\n" | 662 | << "\t\t\t" << "buildPhases = (" << "\n" |
663 | << varGlue("QMAKE_PBX_BUILDPHASES", "\t\t\t\t", ",\n\t\t\t\t", "\n") | 663 | << varGlue("QMAKE_PBX_BUILDPHASES", "\t\t\t\t", ",\n\t\t\t\t", "\n") |
664 | << "\t\t\t" << ");" << "\n" | 664 | << "\t\t\t" << ");" << "\n" |
665 | << "\t\t\t" << "buildSettings = {" << "\n" | 665 | << "\t\t\t" << "buildSettings = {" << "\n" |
666 | << "\t\t\t\t" << "FRAMEWORK_SEARCH_PATHS = \"\";" << "\n" | 666 | << "\t\t\t\t" << "FRAMEWORK_SEARCH_PATHS = \"\";" << "\n" |
667 | << "\t\t\t\t" << "HEADER_SEARCH_PATHS = \"" << fixEnvsList("INCLUDEPATH") << " " << fixEnvs(specdir()) << "\";" << "\n" | 667 | << "\t\t\t\t" << "HEADER_SEARCH_PATHS = \"" << fixEnvsList("INCLUDEPATH") << " " << fixEnvs(specdir()) << "\";" << "\n" |
668 | << "\t\t\t\t" << "LIBRARY_SEARCH_PATHS = \"" << var("QMAKE_PBX_LIBPATHS") << "\";" << "\n" | 668 | << "\t\t\t\t" << "LIBRARY_SEARCH_PATHS = \"" << var("QMAKE_PBX_LIBPATHS") << "\";" << "\n" |
669 | << "\t\t\t\t" << "OPTIMIZATION_CFLAGS = \"\";" << "\n" | 669 | << "\t\t\t\t" << "OPTIMIZATION_CFLAGS = \"\";" << "\n" |
670 | << "\t\t\t\t" << "OTHER_CFLAGS = \"" << | 670 | << "\t\t\t\t" << "OTHER_CFLAGS = \"" << |
671 | fixEnvsList("QMAKE_CFLAGS") << varGlue("PRL_EXPORT_DEFINES"," -D"," -D","") << | 671 | fixEnvsList("QMAKE_CFLAGS") << varGlue("PRL_EXPORT_DEFINES"," -D"," -D","") << |
672 | varGlue("DEFINES"," -D"," -D","") << "\";" << "\n" | 672 | varGlue("DEFINES"," -D"," -D","") << "\";" << "\n" |
673 | << "\t\t\t\t" << "LEXFLAGS = \"" << var("QMAKE_LEXFLAGS") << "\";" << "\n" | 673 | << "\t\t\t\t" << "LEXFLAGS = \"" << var("QMAKE_LEXFLAGS") << "\";" << "\n" |
674 | << "\t\t\t\t" << "YACCFLAGS = \"" << var("QMAKE_YACCFLAGS") << "\";" << "\n" | 674 | << "\t\t\t\t" << "YACCFLAGS = \"" << var("QMAKE_YACCFLAGS") << "\";" << "\n" |
675 | << "\t\t\t\t" << "OTHER_CPLUSPLUSFLAGS = \"" << | 675 | << "\t\t\t\t" << "OTHER_CPLUSPLUSFLAGS = \"" << |
676 | fixEnvsList("QMAKE_CXXFLAGS") << varGlue("PRL_EXPORT_DEFINES"," -D"," -D","") << | 676 | fixEnvsList("QMAKE_CXXFLAGS") << varGlue("PRL_EXPORT_DEFINES"," -D"," -D","") << |
677 | varGlue("DEFINES"," -D"," -D","") << "\";" << "\n" | 677 | varGlue("DEFINES"," -D"," -D","") << "\";" << "\n" |
678 | << "\t\t\t\t" << "OTHER_REZFLAGS = \"\";" << "\n" | 678 | << "\t\t\t\t" << "OTHER_REZFLAGS = \"\";" << "\n" |
679 | << "\t\t\t\t" << "SECTORDER_FLAGS = \"\";" << "\n" | 679 | << "\t\t\t\t" << "SECTORDER_FLAGS = \"\";" << "\n" |
680 | << "\t\t\t\t" << "WARNING_CFLAGS = \"\";" << "\n"; | 680 | << "\t\t\t\t" << "WARNING_CFLAGS = \"\";" << "\n"; |
681 | #if 1 | 681 | #if 1 |
682 | t << "\t\t\t\t" << "BUILD_ROOT = \"" << QDir::currentDirPath() << "\";" << "\n"; | 682 | t << "\t\t\t\t" << "BUILD_ROOT = \"" << QDir::currentDirPath() << "\";" << "\n"; |
683 | #endif | 683 | #endif |
684 | if(!project->isActiveConfig("staticlib")) | 684 | if(!project->isActiveConfig("staticlib")) |
685 | t << "\t\t\t\t" << "OTHER_LDFLAGS = \"" << fixEnvsList("SUBLIBS") << " " << | 685 | t << "\t\t\t\t" << "OTHER_LDFLAGS = \"" << fixEnvsList("SUBLIBS") << " " << |
686 | fixEnvsList("QMAKE_LFLAGS") << " " << fixEnvsList("QMAKE_LIBDIR_FLAGS") << | 686 | fixEnvsList("QMAKE_LFLAGS") << " " << fixEnvsList("QMAKE_LIBDIR_FLAGS") << |
687 | " " << fixEnvsList("QMAKE_LIBS") << "\";" << "\n"; | 687 | " " << fixEnvsList("QMAKE_LIBS") << "\";" << "\n"; |
688 | if(!project->isEmpty("DESTDIR")) | 688 | if(!project->isEmpty("DESTDIR")) |
689 | t << "\t\t\t\t" << "INSTALL_PATH = \"" << project->first("DESTDIR") << "\";" << "\n"; | 689 | t << "\t\t\t\t" << "INSTALL_PATH = \"" << project->first("DESTDIR") << "\";" << "\n"; |
690 | if(!project->isEmpty("VERSION") && project->first("VERSION") != "0.0.0") | 690 | if(!project->isEmpty("VERSION") && project->first("VERSION") != "0.0.0") |
691 | t << "\t\t\t\t" << "DYLIB_CURRENT_VERSION = \"" << project->first("VERSION") << "\";" << "\n"; | 691 | t << "\t\t\t\t" << "DYLIB_CURRENT_VERSION = \"" << project->first("VERSION") << "\";" << "\n"; |
692 | if(!project->isEmpty("OBJECTS_DIR")) | 692 | if(!project->isEmpty("OBJECTS_DIR")) |
693 | t << "\t\t\t\t" << "OBJECT_FILE_DIR = \"" << project->first("OBJECTS_DIR") << "\";" << "\n"; | 693 | t << "\t\t\t\t" << "OBJECT_FILE_DIR = \"" << project->first("OBJECTS_DIR") << "\";" << "\n"; |
694 | if(project->first("TEMPLATE") == "app") { | 694 | if(project->first("TEMPLATE") == "app") { |
695 | if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) | 695 | if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) |
696 | t << "\t\t\t\t" << "WRAPPER_EXTENSION = app;" << "\n"; | 696 | t << "\t\t\t\t" << "WRAPPER_EXTENSION = app;" << "\n"; |
697 | t << "\t\t\t\t" << "PRODUCT_NAME = " << project->first("QMAKE_ORIG_TARGET") << ";" << "\n"; | 697 | t << "\t\t\t\t" << "PRODUCT_NAME = " << project->first("QMAKE_ORIG_TARGET") << ";" << "\n"; |
698 | } else { | 698 | } else { |
699 | QString lib = project->first("QMAKE_ORIG_TARGET"); | 699 | QString lib = project->first("QMAKE_ORIG_TARGET"); |
700 | if(!project->isActiveConfig("plugin") && project->isActiveConfig("staticlib")) { | 700 | if(!project->isActiveConfig("plugin") && project->isActiveConfig("staticlib")) { |
701 | t << "\t\t\t\t" << "LIBRARY_STYLE = STATIC;" << "\n"; | 701 | t << "\t\t\t\t" << "LIBRARY_STYLE = STATIC;" << "\n"; |
702 | lib = project->first("TARGET"); | 702 | lib = project->first("TARGET"); |
703 | } else { | 703 | } else { |
704 | t << "\t\t\t\t" << "LIBRARY_STYLE = DYNAMIC;" << "\n"; | 704 | t << "\t\t\t\t" << "LIBRARY_STYLE = DYNAMIC;" << "\n"; |
705 | if(!project->isActiveConfig("frameworklib")) { | 705 | if(!project->isActiveConfig("frameworklib")) { |
706 | if(project->isActiveConfig("plugin")) | 706 | if(project->isActiveConfig("plugin")) |
707 | lib = project->first("TARGET"); | 707 | lib = project->first("TARGET"); |
708 | else | 708 | else |
709 | lib = project->first("TARGET_"); | 709 | lib = project->first("TARGET_"); |
710 | } | 710 | } |
711 | } | 711 | } |
712 | int slsh = lib.findRev(Option::dir_sep); | 712 | int slsh = lib.findRev(Option::dir_sep); |
713 | if(slsh != -1) | 713 | if(slsh != -1) |
714 | lib = lib.right(lib.length() - slsh - 1); | 714 | lib = lib.right(lib.length() - slsh - 1); |
715 | t << "\t\t\t\t" << "PRODUCT_NAME = " << lib << ";" << "\n"; | 715 | t << "\t\t\t\t" << "PRODUCT_NAME = " << lib << ";" << "\n"; |
716 | } | 716 | } |
717 | tmp = project->variables()["QMAKE_PBX_VARS"]; | 717 | tmp = project->variables()["QMAKE_PBX_VARS"]; |
718 | for(QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) | 718 | for(QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) |
719 | t << "\t\t\t\t" << (*it) << " = \"" << getenv((*it)) << "\";" << "\n"; | 719 | t << "\t\t\t\t" << (*it) << " = \"" << getenv((*it)) << "\";" << "\n"; |
720 | t << "\t\t\t" << "};" << "\n" | 720 | t << "\t\t\t" << "};" << "\n" |
721 | << "\t\t\t" << "conditionalBuildSettings = {" << "\n" | 721 | << "\t\t\t" << "conditionalBuildSettings = {" << "\n" |
722 | << "\t\t\t" << "};" << "\n" | 722 | << "\t\t\t" << "};" << "\n" |
723 | << "\t\t\t" << "dependencies = (" << "\n" | 723 | << "\t\t\t" << "dependencies = (" << "\n" |
724 | << varGlue("QMAKE_PBX_TARGETDEPENDS", "\t\t\t\t", ",\n\t\t\t\t", "\n") | 724 | << varGlue("QMAKE_PBX_TARGETDEPENDS", "\t\t\t\t", ",\n\t\t\t\t", "\n") |
725 | << "\t\t\t" << ");" << "\n" | 725 | << "\t\t\t" << ");" << "\n" |
726 | << "\t\t\t" << "productReference = " << keyFor("QMAKE_PBX_REFERENCE") << ";" << "\n" | 726 | << "\t\t\t" << "productReference = " << keyFor("QMAKE_PBX_REFERENCE") << ";" << "\n" |
727 | << "\t\t\t" << "shouldUseHeadermap = 1;" << "\n"; | 727 | << "\t\t\t" << "shouldUseHeadermap = 1;" << "\n"; |
728 | if(project->first("TEMPLATE") == "app") { | 728 | if(project->first("TEMPLATE") == "app") { |
729 | if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) { | 729 | if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) { |
730 | t << "\t\t\t" << "isa = PBXApplicationTarget;" << "\n" | 730 | t << "\t\t\t" << "isa = PBXApplicationTarget;" << "\n" |
731 | << "\t\t\t" << "productSettingsXML = " << "\"" << "<?xml version=" | 731 | << "\t\t\t" << "productSettingsXML = " << "\"" << "<?xml version=" |
732 | << "\\\"1.0\\\" encoding=" << "\\\"UTF-8\\\"" << "?>" << "\n" | 732 | << "\\\"1.0\\\" encoding=" << "\\\"UTF-8\\\"" << "?>" << "\n" |
733 | << "\t\t\t\t" << "<!DOCTYPE plist SYSTEM \\\"file://localhost/System/" | 733 | << "\t\t\t\t" << "<!DOCTYPE plist SYSTEM \\\"file://localhost/System/" |
734 | << "Library/DTDs/PropertyList.dtd\\\">" << "\n" | 734 | << "Library/DTDs/PropertyList.dtd\\\">" << "\n" |
735 | << "\t\t\t\t" << "<plist version=\\\"0.9\\\">" << "\n" | 735 | << "\t\t\t\t" << "<plist version=\\\"0.9\\\">" << "\n" |
736 | << "\t\t\t\t" << "<dict>" << "\n" | 736 | << "\t\t\t\t" << "<dict>" << "\n" |
737 | << "\t\t\t\t\t" << "<key>CFBundleDevelopmentRegion</key>" << "\n" | 737 | << "\t\t\t\t\t" << "<key>CFBundleDevelopmentRegion</key>" << "\n" |
738 | << "\t\t\t\t\t" << "<string>English</string>" << "\n" | 738 | << "\t\t\t\t\t" << "<string>English</string>" << "\n" |
739 | << "\t\t\t\t\t" << "<key>CFBundleExecutable</key>" << "\n" | 739 | << "\t\t\t\t\t" << "<key>CFBundleExecutable</key>" << "\n" |
740 | << "\t\t\t\t\t" << "<string>" << project->first("QMAKE_ORIG_TARGET") << "</string>" << "\n" | 740 | << "\t\t\t\t\t" << "<string>" << project->first("QMAKE_ORIG_TARGET") << "</string>" << "\n" |
741 | << "\t\t\t\t\t" << "<key>CFBundleIconFile</key>" << "\n" | 741 | << "\t\t\t\t\t" << "<key>CFBundleIconFile</key>" << "\n" |
742 | << "\t\t\t\t\t" << "<string>" << var("RC_FILE").section(Option::dir_sep, -1) << "</string>" << "\n" | 742 | << "\t\t\t\t\t" << "<string>" << var("RC_FILE").section(Option::dir_sep, -1) << "</string>" << "\n" |
743 | << "\t\t\t\t\t" << "<key>CFBundleInfoDictionaryVersion</key>" << "\n" | 743 | << "\t\t\t\t\t" << "<key>CFBundleInfoDictionaryVersion</key>" << "\n" |
744 | << "\t\t\t\t\t" << "<string>6.0</string>" << "\n" | 744 | << "\t\t\t\t\t" << "<string>6.0</string>" << "\n" |
745 | << "\t\t\t\t\t" << "<key>CFBundlePackageType</key>" << "\n" | 745 | << "\t\t\t\t\t" << "<key>CFBundlePackageType</key>" << "\n" |
746 | << "\t\t\t\t\t" << "<string>APPL</string>" << "\n" | 746 | << "\t\t\t\t\t" << "<string>APPL</string>" << "\n" |
747 | << "\t\t\t\t\t" << "<key>CFBundleSignature</key>" << "\n" | 747 | << "\t\t\t\t\t" << "<key>CFBundleSignature</key>" << "\n" |
748 | << "\t\t\t\t\t" << "<string>????</string>" << "\n" | 748 | << "\t\t\t\t\t" << "<string>????</string>" << "\n" |
749 | << "\t\t\t\t\t" << "<key>CFBundleVersion</key>" << "\n" | 749 | << "\t\t\t\t\t" << "<key>CFBundleVersion</key>" << "\n" |
750 | << "\t\t\t\t\t" << "<string>0.1</string>" << "\n" | 750 | << "\t\t\t\t\t" << "<string>0.1</string>" << "\n" |
751 | << "\t\t\t\t\t" << "<key>CSResourcesFileMapped</key>" << "\n" | 751 | << "\t\t\t\t\t" << "<key>CSResourcesFileMapped</key>" << "\n" |
752 | << "\t\t\t\t\t" << "<true/>" << "\n" | 752 | << "\t\t\t\t\t" << "<true/>" << "\n" |
753 | << "\t\t\t\t" << "</dict>" << "\n" | 753 | << "\t\t\t\t" << "</dict>" << "\n" |
754 | << "\t\t\t\t" << "</plist>" << "\";" << "\n"; | 754 | << "\t\t\t\t" << "</plist>" << "\";" << "\n"; |
755 | } else { | 755 | } else { |
756 | t << "\t\t\t" << "isa = PBXToolTarget;" << "\n"; | 756 | t << "\t\t\t" << "isa = PBXToolTarget;" << "\n"; |
757 | } | 757 | } |
758 | t << "\t\t\t" << "name = \"" << project->first("QMAKE_ORIG_TARGET") << "\";" << "\n" | 758 | t << "\t\t\t" << "name = \"" << project->first("QMAKE_ORIG_TARGET") << "\";" << "\n" |
759 | << "\t\t\t" << "productName = " << project->first("QMAKE_ORIG_TARGET") << ";" << "\n"; | 759 | << "\t\t\t" << "productName = " << project->first("QMAKE_ORIG_TARGET") << ";" << "\n"; |
760 | } else { | 760 | } else { |
761 | QString lib = project->first("QMAKE_ORIG_TARGET"); | 761 | QString lib = project->first("QMAKE_ORIG_TARGET"); |
762 | if(!project->isActiveConfig("frameworklib")) | 762 | if(!project->isActiveConfig("frameworklib")) |
763 | lib.prepend("lib"); | 763 | lib.prepend("lib"); |
764 | t << "\t\t\t" << "isa = PBXLibraryTarget;" << "\n" | 764 | t << "\t\t\t" << "isa = PBXLibraryTarget;" << "\n" |
765 | << "\t\t\t" << "name = \"" << lib << "\";" << "\n" | 765 | << "\t\t\t" << "name = \"" << lib << "\";" << "\n" |
766 | << "\t\t\t" << "productName = " << lib << ";" << "\n"; | 766 | << "\t\t\t" << "productName = " << lib << ";" << "\n"; |
767 | } | 767 | } |
768 | if(!project->isEmpty("DESTDIR")) | 768 | if(!project->isEmpty("DESTDIR")) |
769 | t << "\t\t\t" << "productInstallPath = \"" << project->first("DESTDIR") << "\";" << "\n"; | 769 | t << "\t\t\t" << "productInstallPath = \"" << project->first("DESTDIR") << "\";" << "\n"; |
770 | t << "\t\t" << "};" << "\n"; | 770 | t << "\t\t" << "};" << "\n"; |
771 | //DEBUG/RELEASE | 771 | //DEBUG/RELEASE |
772 | for(i = 0; i < 2; i++) { | 772 | for(i = 0; i < 2; i++) { |
773 | bool as_release = !i; | 773 | bool as_release = !i; |
774 | if(project->isActiveConfig("debug")) | 774 | if(project->isActiveConfig("debug")) |
775 | as_release = i; | 775 | as_release = i; |
776 | QString key = "QMAKE_PBX_" + QString(as_release ? "RELEASE" : "DEBUG"); | 776 | QString key = "QMAKE_PBX_" + QString(as_release ? "RELEASE" : "DEBUG"); |
777 | key = keyFor(key); | 777 | key = keyFor(key); |
778 | project->variables()["QMAKE_PBX_BUILDSTYLES"].append(key); | 778 | project->variables()["QMAKE_PBX_BUILDSTYLES"].append(key); |
779 | t << "\t\t" << key << " = {" << "\n" | 779 | t << "\t\t" << key << " = {" << "\n" |
780 | << "\t\t\t" << "buildRules = (" << "\n" | 780 | << "\t\t\t" << "buildRules = (" << "\n" |
781 | << "\t\t\t" << ");" << "\n" | 781 | << "\t\t\t" << ");" << "\n" |
782 | << "\t\t\t" << "buildSettings = {" << "\n" | 782 | << "\t\t\t" << "buildSettings = {" << "\n" |
783 | << "\t\t\t\t" << "COPY_PHASE_STRIP = " << (as_release ? "YES" : "NO") << ";" << "\n"; | 783 | << "\t\t\t\t" << "COPY_PHASE_STRIP = " << (as_release ? "YES" : "NO") << ";" << "\n"; |
784 | if(as_release) | 784 | if(as_release) |
785 | t << "\t\t\t\t" << "DEBUGGING_SYMBOLS = NO;" << "\n"; | 785 | t << "\t\t\t\t" << "DEBUGGING_SYMBOLS = NO;" << "\n"; |
786 | t << "\t\t\t" << "};" << "\n" | 786 | t << "\t\t\t" << "};" << "\n" |
787 | << "\t\t\t" << "isa = PBXBuildStyle;" << "\n" | 787 | << "\t\t\t" << "isa = PBXBuildStyle;" << "\n" |
788 | << "\t\t\t" << "name = " << (as_release ? "Deployment" : "Development") << ";" << "\n" | 788 | << "\t\t\t" << "name = " << (as_release ? "Deployment" : "Development") << ";" << "\n" |
789 | << "\t\t" << "};" << "\n"; | 789 | << "\t\t" << "};" << "\n"; |
790 | } | 790 | } |
791 | //ROOT | 791 | //ROOT |
792 | t << "\t\t" << keyFor("QMAKE_PBX_ROOT") << " = {" << "\n" | 792 | t << "\t\t" << keyFor("QMAKE_PBX_ROOT") << " = {" << "\n" |
793 | << "\t\t\t" << "buildStyles = (" << "\n" | 793 | << "\t\t\t" << "buildStyles = (" << "\n" |
794 | << varGlue("QMAKE_PBX_BUILDSTYLES", "\t\t\t\t", ",\n\t\t\t\t", "\n") | 794 | << varGlue("QMAKE_PBX_BUILDSTYLES", "\t\t\t\t", ",\n\t\t\t\t", "\n") |
795 | << "\t\t\t" << ");" << "\n" | 795 | << "\t\t\t" << ");" << "\n" |
796 | << "\t\t\t" << "isa = PBXProject;" << "\n" | 796 | << "\t\t\t" << "isa = PBXProject;" << "\n" |
797 | << "\t\t\t" << "mainGroup = " << keyFor("QMAKE_PBX_ROOT_GROUP") << ";" << "\n" | 797 | << "\t\t\t" << "mainGroup = " << keyFor("QMAKE_PBX_ROOT_GROUP") << ";" << "\n" |
798 | << "\t\t\t" << "targets = (" << "\n" | 798 | << "\t\t\t" << "targets = (" << "\n" |
799 | << "\t\t\t\t" << keyFor("QMAKE_PBX_TARGET") << "\n" | 799 | << "\t\t\t\t" << keyFor("QMAKE_PBX_TARGET") << "\n" |
800 | << "\t\t\t" << ");" << "\n" | 800 | << "\t\t\t" << ");" << "\n" |
801 | << "\t\t" << "};" << "\n"; | 801 | << "\t\t" << "};" << "\n"; |
802 | 802 | ||
803 | //FOOTER | 803 | //FOOTER |
804 | t << "\t" << "};" << "\n" | 804 | t << "\t" << "};" << "\n" |
805 | << "\t" << "rootObject = " << keyFor("QMAKE_PBX_ROOT") << ";" << "\n" | 805 | << "\t" << "rootObject = " << keyFor("QMAKE_PBX_ROOT") << ";" << "\n" |
806 | << "}" << endl; | 806 | << "}" << endl; |
807 | 807 | ||
808 | QString mkwrap = fileFixify(pbx_dir + Option::dir_sep + ".." + Option::dir_sep + project->first("MAKEFILE"), | 808 | QString mkwrap = fileFixify(pbx_dir + Option::dir_sep + ".." + Option::dir_sep + project->first("MAKEFILE"), |
809 | QDir::currentDirPath()); | 809 | QDir::currentDirPath()); |
810 | QFile mkwrapf(mkwrap); | 810 | QFile mkwrapf(mkwrap); |
811 | if(mkwrapf.open(IO_WriteOnly | IO_Translate)) { | 811 | if(mkwrapf.open(IO_WriteOnly | IO_Translate)) { |
812 | debug_msg(1, "pbuilder: Creating file: %s", mkwrap.latin1()); | 812 | debug_msg(1, "pbuilder: Creating file: %s", mkwrap.latin1()); |
813 | QTextStream mkwrapt(&mkwrapf); | 813 | QTextStream mkwrapt(&mkwrapf); |
814 | writeHeader(mkwrapt); | 814 | writeHeader(mkwrapt); |
815 | const char *cleans = "uiclean mocclean preprocess_clean "; | 815 | const char *cleans = "uiclean mocclean preprocess_clean "; |
816 | mkwrapt << "#This is a makefile wrapper for PROJECT BUILDER\n" | 816 | mkwrapt << "#This is a makefile wrapper for PROJECT BUILDER\n" |
817 | << "all:" << "\n\t" | 817 | << "all:" << "\n\t" |
818 | << "cd " << (project->first("QMAKE_ORIG_TARGET") + ".pbproj/ && pbxbuild") << "\n" | 818 | << "cd " << (project->first("QMAKE_ORIG_TARGET") + ".pbproj/ && pbxbuild") << "\n" |
819 | << "install: all" << "\n\t" | 819 | << "install: all" << "\n\t" |
820 | << "cd " << (project->first("QMAKE_ORIG_TARGET") + ".pbproj/ && pbxbuild install") << "\n" | 820 | << "cd " << (project->first("QMAKE_ORIG_TARGET") + ".pbproj/ && pbxbuild install") << "\n" |
821 | << "distclean clean: preprocess_clean" << "\n\t" | 821 | << "distclean clean: preprocess_clean" << "\n\t" |
822 | << "cd " << (project->first("QMAKE_ORIG_TARGET") + ".pbproj/ && pbxbuild clean") << "\n" | 822 | << "cd " << (project->first("QMAKE_ORIG_TARGET") + ".pbproj/ && pbxbuild clean") << "\n" |
823 | << (!did_preprocess ? cleans : "") << ":" << "\n"; | 823 | << (!did_preprocess ? cleans : "") << ":" << "\n"; |
824 | if(did_preprocess) | 824 | if(did_preprocess) |
825 | mkwrapt << cleans << ":" << "\n\t" | 825 | mkwrapt << cleans << ":" << "\n\t" |
826 | << "make -f " | 826 | << "make -f " |
827 | << pbx_dir << Option::dir_sep << "qt_preprocess.mak $@" << endl; | 827 | << pbx_dir << Option::dir_sep << "qt_preprocess.mak $@" << endl; |
828 | } | 828 | } |
829 | return TRUE; | 829 | return TRUE; |
830 | } | 830 | } |
831 | 831 | ||
832 | QString | 832 | QString |
833 | ProjectBuilderMakefileGenerator::fixEnvs(QString file) | 833 | ProjectBuilderMakefileGenerator::fixEnvs(QString file) |
834 | { | 834 | { |
835 | QRegExp reg_var("\\$\\((.*)\\)"); | 835 | QRegExp reg_var("\\$\\((.*)\\)"); |
836 | for(int rep = 0; (rep = reg_var.search(file, rep)) != -1; ) { | 836 | for(int rep = 0; (rep = reg_var.search(file, rep)) != -1; ) { |
837 | if(project->variables()["QMAKE_PBX_VARS"].findIndex(reg_var.cap(1)) == -1) | 837 | if(project->variables()["QMAKE_PBX_VARS"].findIndex(reg_var.cap(1)) == -1) |
838 | project->variables()["QMAKE_PBX_VARS"].append(reg_var.cap(1)); | 838 | project->variables()["QMAKE_PBX_VARS"].append(reg_var.cap(1)); |
839 | rep += reg_var.matchedLength(); | 839 | rep += reg_var.matchedLength(); |
840 | } | 840 | } |
841 | return file; | 841 | return file; |
842 | } | 842 | } |
843 | 843 | ||
844 | QString | 844 | QString |
845 | ProjectBuilderMakefileGenerator::fixEnvsList(QString where) | 845 | ProjectBuilderMakefileGenerator::fixEnvsList(QString where) |
846 | { | 846 | { |
847 | QString ret; | 847 | QString ret; |
848 | const QStringList &l = project->variables()[where]; | 848 | const QStringList &l = project->variables()[where]; |
849 | for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { | 849 | for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { |
850 | fixEnvs((*it)); | 850 | fixEnvs((*it)); |
851 | if(!ret.isEmpty()) | 851 | if(!ret.isEmpty()) |
852 | ret += " "; | 852 | ret += " "; |
853 | ret += (*it); | 853 | ret += (*it); |
854 | } | 854 | } |
855 | return ret; | 855 | return ret; |
856 | } | 856 | } |
857 | 857 | ||
858 | QString | 858 | QString |
859 | ProjectBuilderMakefileGenerator::keyFor(QString block) | 859 | ProjectBuilderMakefileGenerator::keyFor(QString block) |
860 | { | 860 | { |
861 | #if 0 //This make this code much easier to debug.. | 861 | #if 0 //This make this code much easier to debug.. |
862 | return block; | 862 | return block; |
863 | #endif | 863 | #endif |
864 | 864 | ||
865 | QString ret; | 865 | QString ret; |
866 | if(!keys.contains(block)) { | 866 | if(!keys.contains(block)) { |
867 | #if 0 | 867 | #if 0 |
868 | static unsigned int r = 0; | 868 | static unsigned int r = 0; |
869 | ret.sprintf("%024x", ++r); | 869 | ret.sprintf("%024x", ++r); |
870 | #else //not really necesary, but makes it look more interesting.. | 870 | #else //not really necesary, but makes it look more interesting.. |
871 | static struct { unsigned int a1, a2, a3; } r = { 0, 0, 0 }; | 871 | static struct { unsigned int a1, a2, a3; } r = { 0, 0, 0 }; |
872 | if(!r.a1 && !r.a2 && !r.a3) { | 872 | if(!r.a1 && !r.a2 && !r.a3) { |
873 | r.a1 = rand(); | 873 | r.a1 = rand(); |
874 | r.a2 = rand(); | 874 | r.a2 = rand(); |
875 | r.a3 = rand(); | 875 | r.a3 = rand(); |
876 | } | 876 | } |
877 | switch(rand() % 3) { | 877 | switch(rand() % 3) { |
878 | case 0: ++r.a1; break; | 878 | case 0: ++r.a1; break; |
879 | case 1: ++r.a2; break; | 879 | case 1: ++r.a2; break; |
880 | case 2: ++r.a3; break; | 880 | case 2: ++r.a3; break; |
881 | } | 881 | } |
882 | ret.sprintf("%08x%08x%08x", r.a1, r.a2, r.a3); | 882 | ret.sprintf("%08x%08x%08x", r.a1, r.a2, r.a3); |
883 | #endif | 883 | #endif |
884 | ret = ret.upper(); | 884 | ret = ret.upper(); |
885 | keys.insert(block, ret); | 885 | keys.insert(block, ret); |
886 | } else { | 886 | } else { |
887 | ret = keys[block]; | 887 | ret = keys[block]; |
888 | } | 888 | } |
889 | return ret; | 889 | return ret; |
890 | } | 890 | } |
891 | 891 | ||
892 | bool | 892 | bool |
893 | ProjectBuilderMakefileGenerator::openOutput(QFile &file) const | 893 | ProjectBuilderMakefileGenerator::openOutput(QFile &file) const |
894 | { | 894 | { |
895 | if(project->first("TEMPLATE") != "subdirs") { | 895 | if(project->first("TEMPLATE") != "subdirs") { |
896 | QFileInfo fi(file); | 896 | QFileInfo fi(file); |
897 | if(fi.extension() != "pbxproj" || file.name().isEmpty()) { | 897 | if(fi.extension() != "pbxproj" || file.name().isEmpty()) { |
898 | QString output = file.name(); | 898 | QString output = file.name(); |
899 | if(fi.isDir()) | 899 | if(fi.isDir()) |
900 | output += QDir::separator(); | 900 | output += QDir::separator(); |
901 | if(fi.extension() != "pbproj") { | 901 | if(fi.extension() != "pbproj") { |
902 | if(file.name().isEmpty() || fi.isDir()) | 902 | if(file.name().isEmpty() || fi.isDir()) |
903 | output += project->first("TARGET"); | 903 | output += project->first("TARGET"); |
904 | output += QString(".pbproj") + QDir::separator(); | 904 | output += QString(".pbproj") + QDir::separator(); |
905 | } else if(output[(int)output.length() - 1] != QDir::separator()) { | 905 | } else if(output[(int)output.length() - 1] != QDir::separator()) { |
906 | output += QDir::separator(); | 906 | output += QDir::separator(); |
907 | } | 907 | } |
908 | output += QString("project.pbxproj"); | 908 | output += QString("project.pbxproj"); |
909 | file.setName(output); | 909 | file.setName(output); |
910 | } | 910 | } |
911 | bool ret = UnixMakefileGenerator::openOutput(file); | 911 | bool ret = UnixMakefileGenerator::openOutput(file); |
912 | ((ProjectBuilderMakefileGenerator*)this)->pbx_dir = Option::output_dir.section(Option::dir_sep, 0, -1); | 912 | ((ProjectBuilderMakefileGenerator*)this)->pbx_dir = Option::output_dir.section(Option::dir_sep, 0, -1); |
913 | Option::output_dir = pbx_dir.section(Option::dir_sep, 0, -2); | 913 | Option::output_dir = pbx_dir.section(Option::dir_sep, 0, -2); |
914 | return ret; | 914 | return ret; |
915 | } | 915 | } |
916 | return UnixMakefileGenerator::openOutput(file); | 916 | return UnixMakefileGenerator::openOutput(file); |
917 | } | 917 | } |
918 | 918 | ||
919 | /* This function is such a hack it is almost pointless, but it | 919 | /* This function is such a hack it is almost pointless, but it |
920 | eliminates the warning message from ProjectBuilder that the project | 920 | eliminates the warning message from ProjectBuilder that the project |
921 | file is for an older version. I guess this could be used someday if | 921 | file is for an older version. I guess this could be used someday if |
922 | the format of the output is dependant upon the version of | 922 | the format of the output is dependant upon the version of |
923 | ProjectBuilder as well. | 923 | ProjectBuilder as well. |
924 | */ | 924 | */ |
925 | int | 925 | int |
926 | ProjectBuilderMakefileGenerator::pbuilderVersion() const | 926 | ProjectBuilderMakefileGenerator::pbuilderVersion() const |
927 | { | 927 | { |
928 | QString ret; | 928 | QString ret; |
929 | if(project->isEmpty("QMAKE_PBUILDER_VERSION")) { | 929 | if(project->isEmpty("QMAKE_PBUILDER_VERSION")) { |
930 | QString version, version_plist = project->first("QMAKE_PBUILDER_VERSION_PLIST"); | 930 | QString version, version_plist = project->first("QMAKE_PBUILDER_VERSION_PLIST"); |
931 | if(version_plist.isEmpty()) | 931 | if(version_plist.isEmpty()) |
932 | version_plist = "/Developer/Applications/Project Builder.app/Contents/version.plist"; | 932 | version_plist = "/Developer/Applications/Project Builder.app/Contents/version.plist"; |
933 | else | 933 | else |
934 | version_plist = version_plist.replace(QRegExp("\""), ""); | 934 | version_plist = version_plist.replace(QRegExp("\""), ""); |
935 | QFile version_file(version_plist); | 935 | QFile version_file(version_plist); |
936 | if(version_file.open(IO_ReadOnly)) { | 936 | if(version_file.open(IO_ReadOnly)) { |
937 | debug_msg(1, "pbuilder: version.plist: Reading file: %s", version_plist.latin1()); | 937 | debug_msg(1, "pbuilder: version.plist: Reading file: %s", version_plist.latin1()); |
938 | QTextStream plist(&version_file); | 938 | QTextStream plist(&version_file); |
939 | 939 | ||
940 | bool in_dict = FALSE; | 940 | bool in_dict = FALSE; |
941 | QString current_key; | 941 | QString current_key; |
942 | QRegExp keyreg("^<key>(.*)</key>$"), stringreg("^<string>(.*)</string>$"); | 942 | QRegExp keyreg("^<key>(.*)</key>$"), stringreg("^<string>(.*)</string>$"); |
943 | while(!plist.eof()) { | 943 | while(!plist.eof()) { |
944 | QString line = plist.readLine().stripWhiteSpace(); | 944 | QString line = plist.readLine().stripWhiteSpace(); |
945 | if(line == "<dict>") | 945 | if(line == "<dict>") |
946 | in_dict = TRUE; | 946 | in_dict = TRUE; |
947 | else if(line == "</dict>") | 947 | else if(line == "</dict>") |
948 | in_dict = FALSE; | 948 | in_dict = FALSE; |
949 | else if(in_dict) { | 949 | else if(in_dict) { |
950 | if(keyreg.exactMatch(line)) | 950 | if(keyreg.exactMatch(line)) |
951 | current_key = keyreg.cap(1); | 951 | current_key = keyreg.cap(1); |
952 | else if(current_key == "CFBundleShortVersionString" && stringreg.exactMatch(line)) | 952 | else if(current_key == "CFBundleShortVersionString" && stringreg.exactMatch(line)) |
953 | version = stringreg.cap(1); | 953 | version = stringreg.cap(1); |
954 | } | 954 | } |
955 | } | 955 | } |
956 | version_file.close(); | 956 | version_file.close(); |
957 | } else debug_msg(1, "pbuilder: version.plist: Failure to open %s", version_plist.latin1()); | 957 | } else debug_msg(1, "pbuilder: version.plist: Failure to open %s", version_plist.latin1()); |
958 | if(version.startsWith("2.0")) | 958 | if(version.startsWith("2.0")) |
959 | ret = "38"; | 959 | ret = "38"; |
960 | else if(version == "1.1") | 960 | else if(version == "1.1") |
961 | ret = "34"; | 961 | ret = "34"; |
962 | } else { | 962 | } else { |
963 | ret = project->first("QMAKE_PBUILDER_VERSION"); | 963 | ret = project->first("QMAKE_PBUILDER_VERSION"); |
964 | } | 964 | } |
965 | if(!ret.isEmpty()) { | 965 | if(!ret.isEmpty()) { |
966 | bool ok; | 966 | bool ok; |
967 | int int_ret = ret.toInt(&ok); | 967 | int int_ret = ret.toInt(&ok); |
968 | if(ok) { | 968 | if(ok) { |
969 | debug_msg(1, "pbuilder: version.plist: Got version: %d", int_ret); | 969 | debug_msg(1, "pbuilder: version.plist: Got version: %d", int_ret); |
970 | return int_ret; | 970 | return int_ret; |
971 | } | 971 | } |
972 | } | 972 | } |
973 | debug_msg(1, "pbuilder: version.plist: Fallback to default version"); | 973 | debug_msg(1, "pbuilder: version.plist: Fallback to default version"); |
974 | return 34; //my fallback | 974 | return 34; //my fallback |
975 | } | 975 | } |
976 | 976 | ||
977 | QString | 977 | QString |
978 | ProjectBuilderMakefileGenerator::reftypeForFile(QString where) | 978 | ProjectBuilderMakefileGenerator::reftypeForFile(QString where) |
979 | { | 979 | { |
980 | if(QDir::isRelativePath(where)) | 980 | if(QDir::isRelativePath(where)) |
981 | return "4"; //relative | 981 | return "4"; //relative |
982 | return "0"; //absolute | 982 | return "0"; //absolute |
983 | } | 983 | } |
diff --git a/x11/ipc/server/ocopserver.cpp b/x11/ipc/server/ocopserver.cpp index 992cb8c..3ee38e9 100644 --- a/x11/ipc/server/ocopserver.cpp +++ b/x11/ipc/server/ocopserver.cpp | |||
@@ -1,413 +1,413 @@ | |||
1 | #include <errno.h> | 1 | #include <errno.h> |
2 | #include <signal.h> | 2 | #include <signal.h> |
3 | #include <stdio.h> | 3 | #include <stdio.h> |
4 | #include <stdlib.h> | 4 | #include <stdlib.h> |
5 | #include <unistd.h> | 5 | #include <unistd.h> |
6 | #include <sys/socket.h> | 6 | #include <sys/socket.h> |
7 | #include <sys/un.h> | 7 | #include <sys/un.h> |
8 | 8 | ||
9 | #include <qcstring.h> | 9 | #include <qcstring.h> |
10 | #include <qtimer.h> | 10 | #include <qtimer.h> |
11 | 11 | ||
12 | #include "ocopserver.h" | 12 | #include "ocopserver.h" |
13 | 13 | ||
14 | OCopServer::OCopServer() | 14 | OCopServer::OCopServer() |
15 | : QObject() | 15 | : QObject() |
16 | { | 16 | { |
17 | setName( "ocopserver"); | 17 | setName( "ocopserver"); |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * init the server | 20 | * init the server |
21 | */ | 21 | */ |
22 | init(); | 22 | init(); |
23 | initSocket(); | 23 | initSocket(); |
24 | } | 24 | } |
25 | OCopServer::~OCopServer() { | 25 | OCopServer::~OCopServer() { |
26 | // socket notifiers should be deleted | 26 | // socket notifiers should be deleted |
27 | close(m_serverfd ); | 27 | close(m_serverfd ); |
28 | } | 28 | } |
29 | void OCopServer::init() { | 29 | void OCopServer::init() { |
30 | /* | 30 | /* |
31 | * we set SIGPIPE to SIG_IGN | 31 | * we set SIGPIPE to SIG_IGN |
32 | * to get EPIPE on reads ;) | 32 | * to get EPIPE on reads ;) |
33 | */ | 33 | */ |
34 | // qWarning("SIGPIPE to be ignored"); | 34 | // qWarning("SIGPIPE to be ignored"); |
35 | signal(SIGPIPE, SIG_IGN ); | 35 | signal(SIGPIPE, SIG_IGN ); |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * initialize some variables | 38 | * initialize some variables |
39 | */ | 39 | */ |
40 | m_server = 0l; | 40 | m_server = 0l; |
41 | m_serverError = 0l; | 41 | m_serverError = 0l; |
42 | } | 42 | } |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * here we will init our server | 45 | * here we will init our server |
46 | * socket and bind and do the listen | 46 | * socket and bind and do the listen |
47 | */ | 47 | */ |
48 | void OCopServer::initSocket() { | 48 | void OCopServer::initSocket() { |
49 | /* get the home dir */ | 49 | /* get the home dir */ |
50 | QCString home( getenv("HOME") ); | 50 | QCString home( getenv("HOME") ); |
51 | QCString path( home + "/.opie.cop"); | 51 | QCString path( home + "/.opie.cop"); |
52 | 52 | ||
53 | if ( ( m_serverfd = socket( PF_UNIX, SOCK_STREAM, 0 ) ) == -1 ) { | 53 | if ( ( m_serverfd = socket( PF_UNIX, SOCK_STREAM, 0 ) ) == -1 ) { |
54 | qWarning("failed to create server socket"); | 54 | qWarning("failed to create server socket"); |
55 | /* try again later */ | 55 | /* try again later */ |
56 | QTimer::singleShot( 400, this, SLOT(initSocket() ) ); | 56 | QTimer::singleShot( 400, this, SLOT(initSocket() ) ); |
57 | return; | 57 | return; |
58 | } | 58 | } |
59 | qWarning( "unlinking file %s", path.data() ); | 59 | qWarning( "unlinking file %s", path.data() ); |
60 | 60 | ||
61 | /* unlink previous sockets */ | 61 | /* unlink previous sockets */ |
62 | unlink( path.data() ); | 62 | unlink( path.data() ); |
63 | 63 | ||
64 | struct sockaddr_un m_address; | 64 | struct sockaddr_un m_address; |
65 | memset(&m_address, 0, sizeof(m_address ) ); | 65 | memset(&m_address, 0, sizeof(m_address ) ); |
66 | m_address.sun_family = AF_UNIX; /* unix domain socket */ | 66 | m_address.sun_family = AF_UNIX; /* unix domain socket */ |
67 | strcpy(m_address.sun_path, path.data() ); | 67 | strcpy(m_address.sun_path, path.data() ); |
68 | m_adrlaenge = sizeof(m_address.sun_family) + strlen(m_address.sun_path ); | 68 | m_adrlaenge = sizeof(m_address.sun_family) + strlen(m_address.sun_path ); |
69 | 69 | ||
70 | /* cast to make it a (sockadr*) */ | 70 | /* cast to make it a (sockadr*) */ |
71 | if (bind(m_serverfd, (struct sockaddr*)&m_address, m_adrlaenge ) == -1 ) { | 71 | if (bind(m_serverfd, (struct sockaddr*)&m_address, m_adrlaenge ) == -1 ) { |
72 | qWarning("Server could not bind try again"); | 72 | qWarning("Server could not bind try again"); |
73 | close(m_serverfd); | 73 | close(m_serverfd); |
74 | QTimer::singleShot(400, this, SLOT(initSocket() ) ); | 74 | QTimer::singleShot(400, this, SLOT(initSocket() ) ); |
75 | return; | 75 | return; |
76 | } | 76 | } |
77 | 77 | ||
78 | /* tell the kernel that we're listening and accepting | 78 | /* tell the kernel that we're listening and accepting |
79 | * 5 pending connections */ | 79 | * 5 pending connections */ |
80 | if (listen(m_serverfd, 5) == -1 ) { | 80 | if (listen(m_serverfd, 5) == -1 ) { |
81 | qWarning("could not listen"); | 81 | qWarning("could not listen"); |
82 | close(m_serverfd ); | 82 | close(m_serverfd ); |
83 | QTimer::singleShot(400, this, SLOT(initSocket() ) ); | 83 | QTimer::singleShot(400, this, SLOT(initSocket() ) ); |
84 | return; | 84 | return; |
85 | } | 85 | } |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * now we will create two QSocketNotifier | 88 | * now we will create two QSocketNotifier |
89 | * which will us notify on reads | 89 | * which will us notify on reads |
90 | * and errors | 90 | * and errors |
91 | * we do this because they integrate | 91 | * we do this because they integrate |
92 | * nicely into the QApplication eventloop | 92 | * nicely into the QApplication eventloop |
93 | */ | 93 | */ |
94 | m_server = new QSocketNotifier(m_serverfd, QSocketNotifier::Read, this ); | 94 | m_server = new QSocketNotifier(m_serverfd, QSocketNotifier::Read, this ); |
95 | connect( m_server, SIGNAL(activated(int) ), | 95 | connect( m_server, SIGNAL(activated(int) ), |
96 | this, SLOT(newOnServer() ) ); | 96 | this, SLOT(newOnServer() ) ); |
97 | 97 | ||
98 | m_serverError = new QSocketNotifier( m_serverfd, QSocketNotifier::Exception, this); | 98 | m_serverError = new QSocketNotifier( m_serverfd, QSocketNotifier::Exception, this); |
99 | connect(m_serverError, SIGNAL(activated(int) ), | 99 | connect(m_serverError, SIGNAL(activated(int) ), |
100 | this, SLOT(errorOnServer() ) ); | 100 | this, SLOT(errorOnServer() ) ); |
101 | 101 | ||
102 | qWarning("done with registering"); | 102 | qWarning("done with registering"); |
103 | } | 103 | } |
104 | /** | 104 | /** |
105 | * we got the possibility to read | 105 | * we got the possibility to read |
106 | * on the server | 106 | * on the server |
107 | * this is mostly due a connect | 107 | * this is mostly due a connect |
108 | * on a client side | 108 | * on a client side |
109 | * we will accept it | 109 | * we will accept it |
110 | * add it to our list | 110 | * add it to our list |
111 | */ | 111 | */ |
112 | void OCopServer::newOnServer() { | 112 | void OCopServer::newOnServer() { |
113 | int fd = accept(); | 113 | int fd = accept(); |
114 | if ( fd < 0 ) | 114 | if ( fd < 0 ) |
115 | return; | 115 | return; |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * we got a successfull new connection | 118 | * we got a successful new connection |
119 | * be happy | 119 | * be happy |
120 | * set SocketNotifier | 120 | * set SocketNotifier |
121 | * connect it | 121 | * connect it |
122 | * and a OCOPClient | 122 | * and a OCOPClient |
123 | */ | 123 | */ |
124 | // qWarning("Heureka new connection %d", fd ); | 124 | // qWarning("Heureka new connection %d", fd ); |
125 | 125 | ||
126 | 126 | ||
127 | registerClient( fd ); | 127 | registerClient( fd ); |
128 | } | 128 | } |
129 | int OCopServer::accept() { | 129 | int OCopServer::accept() { |
130 | /* | 130 | /* |
131 | * accept it | 131 | * accept it |
132 | * the socket is currently blocking IIRC | 132 | * the socket is currently blocking IIRC |
133 | */ | 133 | */ |
134 | return ::accept( m_serverfd, (struct sockaddr*)&m_address, &m_adrlaenge ); | 134 | return ::accept( m_serverfd, (struct sockaddr*)&m_address, &m_adrlaenge ); |
135 | } | 135 | } |
136 | void OCopServer::newOnClient( int fd ) { | 136 | void OCopServer::newOnClient( int fd ) { |
137 | errno = 0; | 137 | errno = 0; |
138 | OCOPHead head; | 138 | OCOPHead head; |
139 | memset(&head, 0, sizeof(head) ); | 139 | memset(&head, 0, sizeof(head) ); |
140 | int rea = ::read(fd, &head, sizeof(head) ); | 140 | int rea = ::read(fd, &head, sizeof(head) ); |
141 | //qWarning("read %d %d", rea, errno); | 141 | //qWarning("read %d %d", rea, errno); |
142 | /* | 142 | /* |
143 | * I should get EPIPE but nothing like this happens | 143 | * I should get EPIPE but nothing like this happens |
144 | * so if rea == 0 and we were signaled by the notifier | 144 | * so if rea == 0 and we were signaled by the notifier |
145 | * we close it and drop the clients... | 145 | * we close it and drop the clients... |
146 | */ | 146 | */ |
147 | if ( rea <= 0 ) { | 147 | if ( rea <= 0 ) { |
148 | deregisterClient( fd ); | 148 | deregisterClient( fd ); |
149 | return; | 149 | return; |
150 | } | 150 | } |
151 | /* | 151 | /* |
152 | * OCOPHead | 152 | * OCOPHead |
153 | */ | 153 | */ |
154 | //qWarning("data %s %d", &bug, rea ); | 154 | //qWarning("data %s %d", &bug, rea ); |
155 | 155 | ||
156 | /* | 156 | /* |
157 | * Check the magic | 157 | * Check the magic |
158 | * if chcked read till EOF if magic does not match | 158 | * if chcked read till EOF if magic does not match |
159 | * otherwise do read | 159 | * otherwise do read |
160 | * channel | 160 | * channel |
161 | * func | 161 | * func |
162 | * data into mem | 162 | * data into mem |
163 | * and then send the OCOPPacket | 163 | * and then send the OCOPPacket |
164 | * | 164 | * |
165 | */ | 165 | */ |
166 | if (head.magic == 47 ) { | 166 | if (head.magic == 47 ) { |
167 | // qWarning("magic match"); | 167 | // qWarning("magic match"); |
168 | QCString channel( head.chlen+1 ); | 168 | QCString channel( head.chlen+1 ); |
169 | QCString func( head.funclen+1 ); | 169 | QCString func( head.funclen+1 ); |
170 | QByteArray data ( head.datalen+1 ); | 170 | QByteArray data ( head.datalen+1 ); |
171 | 171 | ||
172 | /* | 172 | /* |
173 | * we do not check for errors | 173 | * we do not check for errors |
174 | */ | 174 | */ |
175 | // qWarning("read "); | 175 | // qWarning("read "); |
176 | int s = read(fd, channel.data(), head.chlen ); | 176 | int s = read(fd, channel.data(), head.chlen ); |
177 | s = read(fd, func.data(), head.funclen ); | 177 | s = read(fd, func.data(), head.funclen ); |
178 | s = read(fd, data.data(), head.datalen ); | 178 | s = read(fd, data.data(), head.datalen ); |
179 | // qWarning("read"); | 179 | // qWarning("read"); |
180 | 180 | ||
181 | /* debug output */ | 181 | /* debug output */ |
182 | // qWarning("channel %s %d", channel.data(), head.chlen ); | 182 | // qWarning("channel %s %d", channel.data(), head.chlen ); |
183 | // qWarning("func %s %d", func.data(), head.funclen ); | 183 | // qWarning("func %s %d", func.data(), head.funclen ); |
184 | /* debug end */ | 184 | /* debug end */ |
185 | 185 | ||
186 | /* | 186 | /* |
187 | * now that we got the complete body | 187 | * now that we got the complete body |
188 | * we need to make a package | 188 | * we need to make a package |
189 | * and then we need to send it to clients | 189 | * and then we need to send it to clients |
190 | * making a package is done here | 190 | * making a package is done here |
191 | * dispatching it not | 191 | * dispatching it not |
192 | */ | 192 | */ |
193 | OCOPPacket packet( head.type, channel, func, data ); | 193 | OCOPPacket packet( head.type, channel, func, data ); |
194 | dispatch( packet, fd ); | 194 | dispatch( packet, fd ); |
195 | 195 | ||
196 | }else{ | 196 | }else{ |
197 | // qWarning("magic does not match"); | 197 | // qWarning("magic does not match"); |
198 | // qWarning("magic %d", head.magic ); | 198 | // qWarning("magic %d", head.magic ); |
199 | } | 199 | } |
200 | } | 200 | } |
201 | void OCopServer::registerClient( int fd ) { | 201 | void OCopServer::registerClient( int fd ) { |
202 | if (m_clients.contains(fd) ) | 202 | if (m_clients.contains(fd) ) |
203 | return; | 203 | return; |
204 | 204 | ||
205 | QSocketNotifier* notify = new QSocketNotifier(fd, QSocketNotifier::Read, this ); | 205 | QSocketNotifier* notify = new QSocketNotifier(fd, QSocketNotifier::Read, this ); |
206 | connect(notify, SIGNAL(activated(int) ), | 206 | connect(notify, SIGNAL(activated(int) ), |
207 | this, SLOT(newOnClient(int) ) ); | 207 | this, SLOT(newOnClient(int) ) ); |
208 | OCOPClient client; | 208 | OCOPClient client; |
209 | client.fd = fd; | 209 | client.fd = fd; |
210 | client.notify = notify; | 210 | client.notify = notify; |
211 | m_clients.insert( client.fd, client ); | 211 | m_clients.insert( client.fd, client ); |
212 | // qWarning("clients are up to %d", m_clients.count() ); | 212 | // qWarning("clients are up to %d", m_clients.count() ); |
213 | }; | 213 | }; |
214 | void OCopServer::deregisterClient(int fd ) { | 214 | void OCopServer::deregisterClient(int fd ) { |
215 | QMap<int, OCOPClient>::Iterator it = m_clients.find( fd ); | 215 | QMap<int, OCOPClient>::Iterator it = m_clients.find( fd ); |
216 | if (it != m_clients.end() ) { | 216 | if (it != m_clients.end() ) { |
217 | /* | 217 | /* |
218 | * TIME_ME | 218 | * TIME_ME |
219 | * | 219 | * |
220 | * now delete from all channels | 220 | * now delete from all channels |
221 | * go through all channels | 221 | * go through all channels |
222 | * remove the fd from the list | 222 | * remove the fd from the list |
223 | * if count becomes 0 remove the channel | 223 | * if count becomes 0 remove the channel |
224 | * otherwise replace QArray<int> | 224 | * otherwise replace QArray<int> |
225 | */ | 225 | */ |
226 | QMap<QCString, QValueList<int> >::Iterator it2; | 226 | QMap<QCString, QValueList<int> >::Iterator it2; |
227 | repeatIt: | 227 | repeatIt: |
228 | for ( it2 = m_channels.begin(); it2 != m_channels.end(); ++it2 ) { | 228 | for ( it2 = m_channels.begin(); it2 != m_channels.end(); ++it2 ) { |
229 | /* | 229 | /* |
230 | * The channel contains this fd | 230 | * The channel contains this fd |
231 | */ | 231 | */ |
232 | // qWarning("Channel %s %d", it2.key().data(), it2.data().count() ); | 232 | // qWarning("Channel %s %d", it2.key().data(), it2.data().count() ); |
233 | if ( it2.data().contains( fd ) ) { | 233 | if ( it2.data().contains( fd ) ) { |
234 | qWarning("contains"); | 234 | qWarning("contains"); |
235 | QValueList<int> array = it2.data(); | 235 | QValueList<int> array = it2.data(); |
236 | 236 | ||
237 | /* | 237 | /* |
238 | * remove channel or just replace | 238 | * remove channel or just replace |
239 | */ | 239 | */ |
240 | if ( array.count() == 1 || array.count() == 0) { | 240 | if ( array.count() == 1 || array.count() == 0) { |
241 | // qWarning("Invalidate!"); | 241 | // qWarning("Invalidate!"); |
242 | /* is the list now invalidatet? */ | 242 | /* is the list now invalidatet? */ |
243 | m_channels.remove( it2 ); | 243 | m_channels.remove( it2 ); |
244 | /* That is the first go to of my life | 244 | /* That is the first go to of my life |
245 | * but Iterator remove( Iterator ) | 245 | * but Iterator remove( Iterator ) |
246 | * does not exist | 246 | * does not exist |
247 | * it2 = --it2; | 247 | * it2 = --it2; |
248 | * does not work reliable too | 248 | * does not work reliable too |
249 | * so the only way is to reiterate :( | 249 | * so the only way is to reiterate :( |
250 | */ | 250 | */ |
251 | goto repeatIt; | 251 | goto repeatIt; |
252 | }else{ | 252 | }else{ |
253 | // qWarning("removing count %d %d",fd, array.count() ); | 253 | // qWarning("removing count %d %d",fd, array.count() ); |
254 | QValueList<int>::Iterator it3 = array.find( fd ); | 254 | QValueList<int>::Iterator it3 = array.find( fd ); |
255 | it3 = array.remove( it3 ); | 255 | it3 = array.remove( it3 ); |
256 | QCString key = it2.key().copy(); | 256 | QCString key = it2.key().copy(); |
257 | it2 = m_channels.replace( key, array ); | 257 | it2 = m_channels.replace( key, array ); |
258 | } | 258 | } |
259 | } | 259 | } |
260 | } // off all channels | 260 | } // off all channels |
261 | OCOPClient client = it.data(); | 261 | OCOPClient client = it.data(); |
262 | delete client.notify; | 262 | delete client.notify; |
263 | m_clients.remove(fd ); | 263 | m_clients.remove(fd ); |
264 | close(fd ); | 264 | close(fd ); |
265 | } | 265 | } |
266 | // qWarning("clients are now at %d", m_clients.count() ); | 266 | // qWarning("clients are now at %d", m_clients.count() ); |
267 | } | 267 | } |
268 | /** | 268 | /** |
269 | * this function will evaluate | 269 | * this function will evaluate |
270 | * the package and then do the appropriate thins | 270 | * the package and then do the appropriate thins |
271 | */ | 271 | */ |
272 | void OCopServer::dispatch( const OCOPPacket& packet, int sourceFD ) { | 272 | void OCopServer::dispatch( const OCOPPacket& packet, int sourceFD ) { |
273 | // qWarning("packet.type() == %d", packet.type() ); | 273 | // qWarning("packet.type() == %d", packet.type() ); |
274 | switch( packet.type() ) { | 274 | switch( packet.type() ) { |
275 | case OCOPPacket::Register: | 275 | case OCOPPacket::Register: |
276 | registerClient(sourceFD ); | 276 | registerClient(sourceFD ); |
277 | break; | 277 | break; |
278 | case OCOPPacket::Unregister: | 278 | case OCOPPacket::Unregister: |
279 | deregisterClient(sourceFD ); | 279 | deregisterClient(sourceFD ); |
280 | break; | 280 | break; |
281 | case OCOPPacket::Call: | 281 | case OCOPPacket::Call: |
282 | call( packet, sourceFD ); | 282 | call( packet, sourceFD ); |
283 | break; | 283 | break; |
284 | /* not implemented */ | 284 | /* not implemented */ |
285 | case OCOPPacket::Method: | 285 | case OCOPPacket::Method: |
286 | break; | 286 | break; |
287 | /* nit implemented */ | 287 | /* nit implemented */ |
288 | case OCOPPacket::Reply: | 288 | case OCOPPacket::Reply: |
289 | break; | 289 | break; |
290 | case OCOPPacket::RegisterChannel: | 290 | case OCOPPacket::RegisterChannel: |
291 | addChannel( packet.channel() , sourceFD ); | 291 | addChannel( packet.channel() , sourceFD ); |
292 | break; | 292 | break; |
293 | case OCOPPacket::UnregisterChannel: | 293 | case OCOPPacket::UnregisterChannel: |
294 | delChannel( packet.channel(), sourceFD ); | 294 | delChannel( packet.channel(), sourceFD ); |
295 | break; | 295 | break; |
296 | /* not implemented */ | 296 | /* not implemented */ |
297 | case OCOPPacket::Return: | 297 | case OCOPPacket::Return: |
298 | break; | 298 | break; |
299 | /* not implemented :( */ | 299 | /* not implemented :( */ |
300 | case OCOPPacket::Signal: | 300 | case OCOPPacket::Signal: |
301 | break; | 301 | break; |
302 | case OCOPPacket::IsRegistered: | 302 | case OCOPPacket::IsRegistered: |
303 | // qWarning("Server:IsRegistered %s", packet.channel().data() ); | 303 | // qWarning("Server:IsRegistered %s", packet.channel().data() ); |
304 | isRegistered( packet.channel(), sourceFD ); | 304 | isRegistered( packet.channel(), sourceFD ); |
305 | break; | 305 | break; |
306 | }; | 306 | }; |
307 | } | 307 | } |
308 | void OCopServer::errorOnServer() { | 308 | void OCopServer::errorOnServer() { |
309 | /* | 309 | /* |
310 | * something is wrong on the server socket? | 310 | * something is wrong on the server socket? |
311 | * what should we do? | 311 | * what should we do? |
312 | * FIXME | 312 | * FIXME |
313 | */ | 313 | */ |
314 | } | 314 | } |
315 | QStringList OCopServer::channels() { | 315 | QStringList OCopServer::channels() { |
316 | QStringList list; | 316 | QStringList list; |
317 | { | 317 | { |
318 | QMap<QCString, QValueList<int> >::Iterator it; | 318 | QMap<QCString, QValueList<int> >::Iterator it; |
319 | for (it = m_channels.begin(); it != m_channels.end(); ++it ) { | 319 | for (it = m_channels.begin(); it != m_channels.end(); ++it ) { |
320 | list << it.key(); | 320 | list << it.key(); |
321 | }; | 321 | }; |
322 | } | 322 | } |
323 | return list; | 323 | return list; |
324 | } | 324 | } |
325 | bool OCopServer::isChannelRegistered( const QCString& chan ) const{ | 325 | bool OCopServer::isChannelRegistered( const QCString& chan ) const{ |
326 | return m_channels.contains( chan ); | 326 | return m_channels.contains( chan ); |
327 | } | 327 | } |
328 | void OCopServer::addChannel( const QCString& channel, | 328 | void OCopServer::addChannel( const QCString& channel, |
329 | int fd ) { | 329 | int fd ) { |
330 | QMap<QCString, QValueList<int> >::Iterator it; | 330 | QMap<QCString, QValueList<int> >::Iterator it; |
331 | it = m_channels.find( channel ); | 331 | it = m_channels.find( channel ); |
332 | if ( it != m_channels.end() ) { | 332 | if ( it != m_channels.end() ) { |
333 | /* could be empty */ | 333 | /* could be empty */ |
334 | QValueList<int> list = it.data(); | 334 | QValueList<int> list = it.data(); |
335 | list.append( fd ); | 335 | list.append( fd ); |
336 | qWarning("Server:count is now in addChannel %d %s", list.count(), channel.data() ); | 336 | qWarning("Server:count is now in addChannel %d %s", list.count(), channel.data() ); |
337 | it = m_channels.replace( channel, list ); | 337 | it = m_channels.replace( channel, list ); |
338 | }else { | 338 | }else { |
339 | QValueList<int> ints; | 339 | QValueList<int> ints; |
340 | ints.append( fd ); | 340 | ints.append( fd ); |
341 | m_channels.insert( channel, ints ); | 341 | m_channels.insert( channel, ints ); |
342 | } | 342 | } |
343 | }; | 343 | }; |
344 | void OCopServer::delChannel( const QCString& channel, | 344 | void OCopServer::delChannel( const QCString& channel, |
345 | int fd ) { | 345 | int fd ) { |
346 | // qWarning("remove %s, %d", channel.data(), fd ); | 346 | // qWarning("remove %s, %d", channel.data(), fd ); |
347 | if (!m_channels.contains( channel ) ) | 347 | if (!m_channels.contains( channel ) ) |
348 | return; | 348 | return; |
349 | 349 | ||
350 | QMap<QCString, QValueList<int> >::Iterator it; | 350 | QMap<QCString, QValueList<int> >::Iterator it; |
351 | it = m_channels.find( channel ); | 351 | it = m_channels.find( channel ); |
352 | 352 | ||
353 | if ( it.data().contains(fd) ) { | 353 | if ( it.data().contains(fd) ) { |
354 | QValueList<int> ints = it.data(); | 354 | QValueList<int> ints = it.data(); |
355 | if ( ints.count() == 1 ) | 355 | if ( ints.count() == 1 ) |
356 | m_channels.remove( channel ); | 356 | m_channels.remove( channel ); |
357 | else{ | 357 | else{ |
358 | QValueList<int> ints = it.data(); | 358 | QValueList<int> ints = it.data(); |
359 | QValueList<int>::Iterator rem = ints.find( fd ); | 359 | QValueList<int>::Iterator rem = ints.find( fd ); |
360 | rem = ints.remove( rem ); | 360 | rem = ints.remove( rem ); |
361 | QCString str = it.key().copy(); | 361 | QCString str = it.key().copy(); |
362 | m_channels.replace( str, ints ); | 362 | m_channels.replace( str, ints ); |
363 | } | 363 | } |
364 | // qWarning(" channel count is now %d", ints.count() ); | 364 | // qWarning(" channel count is now %d", ints.count() ); |
365 | } | 365 | } |
366 | } | 366 | } |
367 | void OCopServer::isRegistered( const QCString& channel, int fd) { | 367 | void OCopServer::isRegistered( const QCString& channel, int fd) { |
368 | // qWarning("Server:isRegistered %s", channel.data() ); | 368 | // qWarning("Server:isRegistered %s", channel.data() ); |
369 | OCOPHead head; | 369 | OCOPHead head; |
370 | QCString func(2); | 370 | QCString func(2); |
371 | 371 | ||
372 | memset(&head, 0, sizeof(head ) ); | 372 | memset(&head, 0, sizeof(head ) ); |
373 | head.magic = 47; | 373 | head.magic = 47; |
374 | head.type = OCOPPacket::IsRegistered; | 374 | head.type = OCOPPacket::IsRegistered; |
375 | head.chlen = channel.size(); | 375 | head.chlen = channel.size(); |
376 | head.funclen = func.size(); | 376 | head.funclen = func.size(); |
377 | head.datalen = 0; | 377 | head.datalen = 0; |
378 | 378 | ||
379 | if ( isChannelRegistered( channel ) ) { | 379 | if ( isChannelRegistered( channel ) ) { |
380 | //is registered | 380 | //is registered |
381 | func[0] = 1; | 381 | func[0] = 1; |
382 | //qWarning("Server:Channel is Registered %d", head.chlen); | 382 | //qWarning("Server:Channel is Registered %d", head.chlen); |
383 | }else{ | 383 | }else{ |
384 | func[0] = 0; | 384 | func[0] = 0; |
385 | //qWarning("Server:Channel is NotRegistered"); | 385 | //qWarning("Server:Channel is NotRegistered"); |
386 | } | 386 | } |
387 | 387 | ||
388 | /** | 388 | /** |
389 | * write the head | 389 | * write the head |
390 | * and then channel | 390 | * and then channel |
391 | * success/failure inside func | 391 | * success/failure inside func |
392 | */ | 392 | */ |
393 | write(fd, &head, sizeof(head) ); | 393 | write(fd, &head, sizeof(head) ); |
394 | write(fd, channel.data(), channel.size() ); | 394 | write(fd, channel.data(), channel.size() ); |
395 | write(fd, func.data(), func.size() ); | 395 | write(fd, func.data(), func.size() ); |
396 | } | 396 | } |
397 | QValueList<int> OCopServer::clients( const QCString& channel ) { | 397 | QValueList<int> OCopServer::clients( const QCString& channel ) { |
398 | return m_channels[channel]; | 398 | return m_channels[channel]; |
399 | } | 399 | } |
400 | void OCopServer::call( const OCOPPacket& p, int ) { | 400 | void OCopServer::call( const OCOPPacket& p, int ) { |
401 | QValueList<int> cli = clients( p.channel() ); | 401 | QValueList<int> cli = clients( p.channel() ); |
402 | QValueList<int>::Iterator it; | 402 | QValueList<int>::Iterator it; |
403 | 403 | ||
404 | OCOPHead head = p.head(); | 404 | OCOPHead head = p.head(); |
405 | for (it = cli.begin(); it != cli.end(); ++it ) { | 405 | for (it = cli.begin(); it != cli.end(); ++it ) { |
406 | // qWarning("Server:calling %d %s %s", (*it), p.channel().data(), p.header().data() ); | 406 | // qWarning("Server:calling %d %s %s", (*it), p.channel().data(), p.header().data() ); |
407 | write( (*it), &head, sizeof(head ) ); | 407 | write( (*it), &head, sizeof(head ) ); |
408 | /* expl. shared! */ | 408 | /* expl. shared! */ |
409 | write( (*it), p.channel().data(), p.channel().size() ); | 409 | write( (*it), p.channel().data(), p.channel().size() ); |
410 | write( (*it), p.header().data(), p.header().size() ); | 410 | write( (*it), p.header().data(), p.header().size() ); |
411 | write( (*it), p.content().data(), p.content().size() ); | 411 | write( (*it), p.content().data(), p.content().size() ); |
412 | }; | 412 | }; |
413 | } | 413 | } |