author | mickeyl <mickeyl> | 2004-04-28 10:29:22 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-28 10:29:22 (UTC) |
commit | 7784d05b07dc65eab1754497e71fbf56d714b048 (patch) (unidiff) | |
tree | d9b4dbde4b1e4efa3e2c3ba7ae9c37fda9780c26 | |
parent | 1343398e0df890b2e8bd5f1d9a0867b291d42691 (diff) | |
download | opie-7784d05b07dc65eab1754497e71fbf56d714b048.zip opie-7784d05b07dc65eab1754497e71fbf56d714b048.tar.gz opie-7784d05b07dc65eab1754497e71fbf56d714b048.tar.bz2 |
CLEANUP: remove relative includes over the source tree
-rw-r--r-- | Rules.make | 1 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/NetworkDialog.cpp | 4 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 2 |
3 files changed, 4 insertions, 3 deletions
@@ -111,128 +111,129 @@ $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR) | |||
111 | @cat $(TOPDIR)/packages | grep -v '^#' | \ | 111 | @cat $(TOPDIR)/packages | grep -v '^#' | \ |
112 | awk '{print \ | 112 | awk '{print \ |
113 | ".PHONY : " $$2 "\n" \ | 113 | ".PHONY : " $$2 "\n" \ |
114 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ | 114 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ |
115 | print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends | 115 | print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends |
116 | cat $(TOPDIR)/packages | grep -v '^#' | \ | 116 | cat $(TOPDIR)/packages | grep -v '^#' | \ |
117 | perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE) \$$(OPIEDIR)/gen.pro \$$(OPIEDIR)/.config\n\t\$$(call makefilegen,\$$@)\n\n"; }' \ | 117 | perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE) \$$(OPIEDIR)/gen.pro \$$(OPIEDIR)/.config\n\t\$$(call makefilegen,\$$@)\n\n"; }' \ |
118 | >> $(TOPDIR)/.depends | 118 | >> $(TOPDIR)/.depends |
119 | # interpackage dependency generation | 119 | # interpackage dependency generation |
120 | @cat $(TOPDIR)/packages | \ | 120 | @cat $(TOPDIR)/packages | \ |
121 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends | 121 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends |
122 | 122 | ||
123 | $(TOPDIR)/.depends.cfgs: | 123 | $(TOPDIR)/.depends.cfgs: |
124 | # config.in interdependencies | 124 | # config.in interdependencies |
125 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs | 125 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs |
126 | @cat dirs | ( for i in `cat`; do if [ "`cat dirs|grep $$i 2>/dev/null|wc -l`" -ne "1" ]; then deps=`cat dirs|grep $$i| grep -v "^$$i$$"|for i in \`cat|sed -e's,^$(TOPDIR)/,$$(TOPDIR)/,g'\`; do echo $$i/config.in; done`; echo `echo $$i/config.in|sed -e 's,^$(TOPDIR)/,$$(TOPDIR)/,'` : $$deps; fi; done ) >> $@ | 126 | @cat dirs | ( for i in `cat`; do if [ "`cat dirs|grep $$i 2>/dev/null|wc -l`" -ne "1" ]; then deps=`cat dirs|grep $$i| grep -v "^$$i$$"|for i in \`cat|sed -e's,^$(TOPDIR)/,$$(TOPDIR)/,g'\`; do echo $$i/config.in; done`; echo `echo $$i/config.in|sed -e 's,^$(TOPDIR)/,$$(TOPDIR)/,'` : $$deps; fi; done ) >> $@ |
127 | @-rm -f dirs | 127 | @-rm -f dirs |
128 | 128 | ||
129 | $(QTDIR)/stamp-headers : | 129 | $(QTDIR)/stamp-headers : |
130 | @-rm -f $(QTDIR)/stamp-headers* | 130 | @-rm -f $(QTDIR)/stamp-headers* |
131 | ( cd $(QTDIR)/include; \ | 131 | ( cd $(QTDIR)/include; \ |
132 | $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ | 132 | $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ |
133 | qcopchannel_qws.h qwindowsystem_qws.h \ | 133 | qcopchannel_qws.h qwindowsystem_qws.h \ |
134 | qfontmanager_qws.h qwsdefaultdecoration_qws.h)) | 134 | qfontmanager_qws.h qwsdefaultdecoration_qws.h)) |
135 | touch $@ | 135 | touch $@ |
136 | 136 | ||
137 | $(QTDIR)/stamp-headers-x11 : | 137 | $(QTDIR)/stamp-headers-x11 : |
138 | @-rm -f $(QTDIR)/stamp-headers* | 138 | @-rm -f $(QTDIR)/stamp-headers* |
139 | cd $(QTDIR)/include; $(patsubst %,ln -sf $(OPIEDIR)/x11/libqpe-x11/qt/%;,qgfx_qws.h qwsmouse_qws.h qcopchannel_qws.h qwindowsystem_qws.h qfontmanager_qws.h qwsdefaultdecoration_qws.h) | 139 | cd $(QTDIR)/include; $(patsubst %,ln -sf $(OPIEDIR)/x11/libqpe-x11/qt/%;,qgfx_qws.h qwsmouse_qws.h qcopchannel_qws.h qwindowsystem_qws.h qfontmanager_qws.h qwsdefaultdecoration_qws.h) |
140 | touch $@ | 140 | touch $@ |
141 | 141 | ||
142 | $(OPIEDIR)/stamp-headers : | 142 | $(OPIEDIR)/stamp-headers : |
143 | @-rm -f $(OPIEDIR)/stamp-headers* | 143 | @-rm -f $(OPIEDIR)/stamp-headers* |
144 | mkdir -p $(TOPDIR)/include/qpe \ | 144 | mkdir -p $(TOPDIR)/include/qpe \ |
145 | $(TOPDIR)/include/qtopia \ | 145 | $(TOPDIR)/include/qtopia \ |
146 | $(TOPDIR)/include/opie \ | 146 | $(TOPDIR)/include/opie \ |
147 | $(TOPDIR)/include/opie2 \ | 147 | $(TOPDIR)/include/opie2 \ |
148 | $(TOPDIR)/include/qtopia/private \ | 148 | $(TOPDIR)/include/qtopia/private \ |
149 | $(TOPDIR)/include/sl | 149 | $(TOPDIR)/include/sl |
150 | ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) | 150 | ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) |
151 | ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) | 151 | ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) |
152 | ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) | 152 | ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) |
153 | ifeq ($(CONFIG_LIBOPIE),y) | 153 | ifeq ($(CONFIG_LIBOPIE),y) |
154 | # libopie1 | 154 | # libopie1 |
155 | ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) | 155 | ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) |
156 | ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) | 156 | ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) |
157 | ( cd include/opie && ln -sf ../../libopie/big-screen/*.h .; ) | 157 | ( cd include/opie && ln -sf ../../libopie/big-screen/*.h .; ) |
158 | endif | 158 | endif |
159 | # libopie2 | 159 | # libopie2 |
160 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/*.h .; ) | 160 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/*.h .; ) |
161 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/device/*.h .; ) | 161 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/device/*.h .; ) |
162 | ( cd include/opie2 && ln -sf ../../libopie2/opiemm/*.h .; ) | 162 | ( cd include/opie2 && ln -sf ../../libopie2/opiemm/*.h .; ) |
163 | ( cd include/opie2 && ln -sf ../../libopie2/opiedb/*.h .; ) | 163 | ( cd include/opie2 && ln -sf ../../libopie2/opiedb/*.h .; ) |
164 | ( cd include/opie2 && ln -sf ../../libopie2/opienet/*.h .; ) | 164 | ( cd include/opie2 && ln -sf ../../libopie2/opienet/*.h .; ) |
165 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/*.h .; ) | 165 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/*.h .; ) |
166 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/*.h .; ) | 166 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/*.h .; ) |
167 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/backends/*.h .; ) | 167 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/backends/*.h .; ) |
168 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/ui/*.h .; ) | 168 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/ui/*.h .; ) |
169 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/*.h .; ) | 169 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/*.h .; ) |
170 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/fileselector/*.h .; ) | 170 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/fileselector/*.h .; ) |
171 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/big-screen/*.h .; ) | 171 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/big-screen/*.h .; ) |
172 | # auxilliary libraries | 172 | # auxilliary libraries |
173 | ( cd include/opie2 && ln -sf ../../libqtaux/*.h .; ) | 173 | ( cd include/opie2 && ln -sf ../../libqtaux/*.h .; ) |
174 | ( cd include/sl && ln -sf ../../libslcompat/*.h .; ) | 174 | ( cd include/sl && ln -sf ../../libslcompat/*.h .; ) |
175 | ( cd include/ && ln -sf ../noncore/net/ftplib/*.h .; ) | ||
175 | # all | 176 | # all |
176 | ifeq ($(CONFIG_LIBOPIE),y) | 177 | ifeq ($(CONFIG_LIBOPIE),y) |
177 | ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ | 178 | ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
178 | ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) | 179 | ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) |
179 | endif | 180 | endif |
180 | ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opieui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ | 181 | ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opieui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
181 | ln -sf ../../libopie2/opieui/$$generatedHeader $$generatedHeader; done ) | 182 | ln -sf ../../libopie2/opieui/$$generatedHeader $$generatedHeader; done ) |
182 | ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opiepim/ui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ | 183 | ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opiepim/ui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
183 | ln -sf ../../libopie2/opiepim/ui/$$generatedHeader $$generatedHeader; done ) | 184 | ln -sf ../../libopie2/opiepim/ui/$$generatedHeader $$generatedHeader; done ) |
184 | ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h | 185 | ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h |
185 | touch $@ | 186 | touch $@ |
186 | 187 | ||
187 | $(OPIEDIR)/stamp-headers-x11 : | 188 | $(OPIEDIR)/stamp-headers-x11 : |
188 | @-rm -f $(OPIEDIR)/stamp-headers* | 189 | @-rm -f $(OPIEDIR)/stamp-headers* |
189 | mkdir -p $(TOPDIR)/include/qpe $(TOPDIR)/include/qtopia \ | 190 | mkdir -p $(TOPDIR)/include/qpe $(TOPDIR)/include/qtopia \ |
190 | $(TOPDIR)/include/opie $(TOPDIR)/include/qtopia/private | 191 | $(TOPDIR)/include/opie $(TOPDIR)/include/qtopia/private |
191 | ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) | 192 | ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) |
192 | ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) | 193 | ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) |
193 | ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) | 194 | ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) |
194 | ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) | 195 | ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) |
195 | ( cd include/opie && ln -sf ../../libsql/*.h .; ) | 196 | ( cd include/opie && ln -sf ../../libsql/*.h .; ) |
196 | ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) | 197 | ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) |
197 | ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ | 198 | ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
198 | ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) | 199 | ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) |
199 | ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h | 200 | ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h |
200 | ( cd include/qpe; ln -sf ../../x11/libqpe-x11/qpe/*.h .; ) | 201 | ( cd include/qpe; ln -sf ../../x11/libqpe-x11/qpe/*.h .; ) |
201 | touch $@ | 202 | touch $@ |
202 | 203 | ||
203 | $(TOPDIR)/library/custom.h : $(TOPDIR)/.config | 204 | $(TOPDIR)/library/custom.h : $(TOPDIR)/.config |
204 | @-rm -f $@ | 205 | @-rm -f $@ |
205 | @$(if $(patsubst "%",%,$(CONFIG_CUSTOMFILE)),\ | 206 | @$(if $(patsubst "%",%,$(CONFIG_CUSTOMFILE)),\ |
206 | ln -sf $(patsubst "%",%,$(CONFIG_CUSTOMFILE)) $@) | 207 | ln -sf $(patsubst "%",%,$(CONFIG_CUSTOMFILE)) $@) |
207 | @touch $@ | 208 | @touch $@ |
208 | 209 | ||
209 | $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf $(TOPDIR)/scripts/kconfig/conf $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/qmake/qmake: | 210 | $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf $(TOPDIR)/scripts/kconfig/conf $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/qmake/qmake: |
210 | @$(call descend,$(shell dirname $@),$(shell basename $@)) | 211 | @$(call descend,$(shell dirname $@),$(shell basename $@)) |
211 | 212 | ||
212 | menuconfig: $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf ./config.in | 213 | menuconfig: $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf ./config.in |
213 | $(TOPDIR)/scripts/kconfig/mconf ./config.in | 214 | $(TOPDIR)/scripts/kconfig/mconf ./config.in |
214 | @touch ./.config.stamp | 215 | @touch ./.config.stamp |
215 | 216 | ||
216 | xconfig: $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in | 217 | xconfig: $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in |
217 | $(TOPDIR)/scripts/kconfig/qconf ./config.in | 218 | $(TOPDIR)/scripts/kconfig/qconf ./config.in |
218 | @touch .config.stamp | 219 | @touch .config.stamp |
219 | 220 | ||
220 | gconfig: $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in | 221 | gconfig: $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in |
221 | $(TOPDIR)/scripts/kconfig/gconf ./config.in | 222 | $(TOPDIR)/scripts/kconfig/gconf ./config.in |
222 | @touch .config.stamp | 223 | @touch .config.stamp |
223 | 224 | ||
224 | config: $(TOPDIR)/scripts/kconfig/conf ./config.in | 225 | config: $(TOPDIR)/scripts/kconfig/conf ./config.in |
225 | $(TOPDIR)/scripts/kconfig/conf ./config.in | 226 | $(TOPDIR)/scripts/kconfig/conf ./config.in |
226 | @touch .config.stamp | 227 | @touch .config.stamp |
227 | 228 | ||
228 | oldconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in | 229 | oldconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
229 | $(TOPDIR)/scripts/kconfig/conf -o ./config.in | 230 | $(TOPDIR)/scripts/kconfig/conf -o ./config.in |
230 | @touch .config.stamp | 231 | @touch .config.stamp |
231 | 232 | ||
232 | randconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in | 233 | randconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
233 | $(TOPDIR)/scripts/kconfig/conf -r ./config.in | 234 | $(TOPDIR)/scripts/kconfig/conf -r ./config.in |
234 | @touch .config.stamp | 235 | @touch .config.stamp |
235 | 236 | ||
236 | allyesconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in | 237 | allyesconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
237 | $(TOPDIR)/scripts/kconfig/conf -y ./config.in | 238 | $(TOPDIR)/scripts/kconfig/conf -y ./config.in |
238 | @touch .config.stamp | 239 | @touch .config.stamp |
diff --git a/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp b/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp index e8ade87..aed53c6 100644 --- a/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp | |||
@@ -1,82 +1,82 @@ | |||
1 | // /*************************************************************************** | 1 | // /*************************************************************************** |
2 | // NetworkDialog.cpp - description | 2 | // NetworkDialog.cpp - description |
3 | // begin : Sun Aug 27 2000 | 3 | // begin : Sun Aug 27 2000 |
4 | // copyright : (C) 2000 - 2004 by L.J. Potter | 4 | // copyright : (C) 2000 - 2004 by L.J. Potter |
5 | // email : ljp@llornkcor.com | 5 | // email : ljp@llornkcor.com |
6 | // * This program is free software; you can redistribute it and/or modify * | 6 | // * This program is free software; you can redistribute it and/or modify * |
7 | // * it under the terms of the GNU General Public License as published by * | 7 | // * it under the terms of the GNU General Public License as published by * |
8 | // * the Free Software Foundation; either version 2 of the License, or * | 8 | // * the Free Software Foundation; either version 2 of the License, or * |
9 | // * (at your option) any later version. * | 9 | // * (at your option) any later version. * |
10 | // ***************************************************************************/ | 10 | // ***************************************************************************/ |
11 | // // half-assed attempt at providing a network dialog. | 11 | // // half-assed attempt at providing a network dialog. |
12 | // /* Created: Sun Aug 27 15:24:52 2000*/ | 12 | // /* Created: Sun Aug 27 15:24:52 2000*/ |
13 | #include <unistd.h> | 13 | #include <unistd.h> |
14 | |||
14 | extern "C" { | 15 | extern "C" { |
15 | #include "../../net/ftplib/ftplib.h" | 16 | #include <ftplib.h> |
16 | } | 17 | } |
17 | 18 | ||
18 | |||
19 | #include "NetworkDialog.h" | 19 | #include "NetworkDialog.h" |
20 | #include "gutenbrowser.h" | 20 | #include "gutenbrowser.h" |
21 | 21 | ||
22 | #include <qprogressbar.h> | 22 | #include <qprogressbar.h> |
23 | #include <qstringlist.h> | 23 | #include <qstringlist.h> |
24 | #include <qpe/config.h> | 24 | #include <qpe/config.h> |
25 | #include <qvaluelist.h> | 25 | #include <qvaluelist.h> |
26 | #include <qapplication.h> | 26 | #include <qapplication.h> |
27 | #include <qfile.h> | 27 | #include <qfile.h> |
28 | #include <qstringlist.h> | 28 | #include <qstringlist.h> |
29 | #include <qlabel.h> | 29 | #include <qlabel.h> |
30 | #include <qpushbutton.h> | 30 | #include <qpushbutton.h> |
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | 32 | ||
33 | QProgressBar* ProgressBar1; | 33 | QProgressBar* ProgressBar1; |
34 | QPushButton* buttonCancel; | 34 | QPushButton* buttonCancel; |
35 | static netbuf *conn = NULL; | 35 | static netbuf *conn = NULL; |
36 | 36 | ||
37 | static int log_progress(netbuf *ctl, int xfered, void *arg) { | 37 | static int log_progress(netbuf *ctl, int xfered, void *arg) { |
38 | int fsz = *(int *)arg; | 38 | int fsz = *(int *)arg; |
39 | int pct = (xfered * 100) / fsz; | 39 | int pct = (xfered * 100) / fsz; |
40 | printf("%3d%%\r", pct); | 40 | printf("%3d%%\r", pct); |
41 | fflush(stdout); | 41 | fflush(stdout); |
42 | ProgressBar1->setProgress(xfered); | 42 | ProgressBar1->setProgress(xfered); |
43 | qApp->processEvents(); | 43 | qApp->processEvents(); |
44 | 44 | ||
45 | return 1; | 45 | return 1; |
46 | } | 46 | } |
47 | 47 | ||
48 | NetworkDialog::NetworkDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QStringList netL) | 48 | NetworkDialog::NetworkDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QStringList netL) |
49 | : QDialog( parent, name, modal, fl ) | 49 | : QDialog( parent, name, modal, fl ) |
50 | { | 50 | { |
51 | 51 | ||
52 | ftp_host = netL[0]; | 52 | ftp_host = netL[0]; |
53 | networkUrl = strUrl = netL[0]; | 53 | networkUrl = strUrl = netL[0]; |
54 | 54 | ||
55 | dir = ftp_base_dir = netL[1]; | 55 | dir = ftp_base_dir = netL[1]; |
56 | localFileName = netL[2]; | 56 | localFileName = netL[2]; |
57 | s_partialFileName = netL[3]; | 57 | s_partialFileName = netL[3]; |
58 | 58 | ||
59 | resize(240,110); | 59 | resize(240,110); |
60 | 60 | ||
61 | local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/"; | 61 | local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/"; |
62 | // autoOk = autoDownload; | 62 | // autoOk = autoDownload; |
63 | // if( networkUrl.find("ftp",0,false)== -1 ) { | 63 | // if( networkUrl.find("ftp",0,false)== -1 ) { |
64 | // if ( !name ) | 64 | // if ( !name ) |
65 | // setName( "HTTP NetworkDialog" ); | 65 | // setName( "HTTP NetworkDialog" ); |
66 | // setCaption( tr( "HTTP Download ) ); | 66 | // setCaption( tr( "HTTP Download ) ); |
67 | // qInitNetworkProtocols(); // registers ftp protocol // for now | 67 | // qInitNetworkProtocols(); // registers ftp protocol // for now |
68 | // QNetworkProtocol::registerNetworkProtocol( "http", new QNetworkProtocolFactory<Http> ); | 68 | // QNetworkProtocol::registerNetworkProtocol( "http", new QNetworkProtocolFactory<Http> ); |
69 | // } else { | 69 | // } else { |
70 | if ( !name ) | 70 | if ( !name ) |
71 | setName( "FTP NetworkDialog" ); | 71 | setName( "FTP NetworkDialog" ); |
72 | setCaption(tr("FTP Download")); | 72 | setCaption(tr("FTP Download")); |
73 | // } | 73 | // } |
74 | initDialog(); //opens file to be written | 74 | initDialog(); //opens file to be written |
75 | } | 75 | } |
76 | 76 | ||
77 | NetworkDialog::~NetworkDialog() { | 77 | NetworkDialog::~NetworkDialog() { |
78 | } | 78 | } |
79 | 79 | ||
80 | void NetworkDialog::initDialog() { | 80 | void NetworkDialog::initDialog() { |
81 | 81 | ||
82 | totalBytesDownloaded=0; | 82 | totalBytesDownloaded=0; |
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index fe96103..aa4314a 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -1,81 +1,81 @@ | |||
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.h> |
18 | } | 18 | } |
19 | 19 | ||
20 | #include "inputDialog.h" | 20 | #include "inputDialog.h" |
21 | 21 | ||
22 | /* OPIE */ | 22 | /* OPIE */ |
23 | #include <opie2/odebug.h> | 23 | #include <opie2/odebug.h> |
24 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
25 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
26 | #include <qpe/config.h> | 26 | #include <qpe/config.h> |
27 | #include <qpe/mimetype.h> | 27 | #include <qpe/mimetype.h> |
28 | using namespace Opie::Core; | 28 | using namespace Opie::Core; |
29 | 29 | ||
30 | #include <qtextstream.h> | 30 | #include <qtextstream.h> |
31 | #include <qpushbutton.h> | 31 | #include <qpushbutton.h> |
32 | #include <qtoolbutton.h> | 32 | #include <qtoolbutton.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qlistview.h> | 34 | #include <qlistview.h> |
35 | #include <qlabel.h> | 35 | #include <qlabel.h> |
36 | #include <qprogressbar.h> | 36 | #include <qprogressbar.h> |
37 | #include <qspinbox.h> | 37 | #include <qspinbox.h> |
38 | #include <qtabwidget.h> | 38 | #include <qtabwidget.h> |
39 | #include <qlayout.h> | 39 | #include <qlayout.h> |
40 | #include <qmessagebox.h> | 40 | #include <qmessagebox.h> |
41 | #include <qmenubar.h> | 41 | #include <qmenubar.h> |
42 | #include <qlineedit.h> | 42 | #include <qlineedit.h> |
43 | #include <qlistbox.h> | 43 | #include <qlistbox.h> |
44 | #include <qvbox.h> | 44 | #include <qvbox.h> |
45 | 45 | ||
46 | /* STD */ | 46 | /* STD */ |
47 | #include <unistd.h> | 47 | #include <unistd.h> |
48 | #include <stdlib.h> | 48 | #include <stdlib.h> |
49 | 49 | ||
50 | QProgressBar *ProgressBar; | 50 | QProgressBar *ProgressBar; |
51 | static netbuf *conn=NULL; | 51 | static netbuf *conn=NULL; |
52 | 52 | ||
53 | static int log_progress(netbuf *, int xfered, void *) | 53 | static int log_progress(netbuf *, int xfered, void *) |
54 | { | 54 | { |
55 | // int fsz = *(int *)arg; | 55 | // int fsz = *(int *)arg; |
56 | // int pct = (xfered * 100) / fsz; | 56 | // int pct = (xfered * 100) / fsz; |
57 | // printf("%3d%%\r", pct); | 57 | // printf("%3d%%\r", pct); |
58 | // fflush(stdout); | 58 | // fflush(stdout); |
59 | ProgressBar->setProgress(xfered); | 59 | ProgressBar->setProgress(xfered); |
60 | qApp->processEvents(); | 60 | qApp->processEvents(); |
61 | return 1; | 61 | return 1; |
62 | } | 62 | } |
63 | 63 | ||
64 | OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) | 64 | OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) |
65 | : QMainWindow( parent, name, fl ) | 65 | : QMainWindow( parent, name, fl ) |
66 | { | 66 | { |
67 | odebug << "OpieFtp constructor" << oendl; | 67 | odebug << "OpieFtp constructor" << oendl; |
68 | setCaption( tr( "OpieFtp" ) ); | 68 | setCaption( tr( "OpieFtp" ) ); |
69 | fuckeduphack=FALSE; | 69 | fuckeduphack=FALSE; |
70 | 70 | ||
71 | QVBox* wrapperBox = new QVBox( this ); | 71 | QVBox* wrapperBox = new QVBox( this ); |
72 | setCentralWidget( wrapperBox ); | 72 | setCentralWidget( wrapperBox ); |
73 | 73 | ||
74 | QWidget *view = new QWidget( wrapperBox ); | 74 | QWidget *view = new QWidget( wrapperBox ); |
75 | 75 | ||
76 | QGridLayout *layout = new QGridLayout( view ); | 76 | QGridLayout *layout = new QGridLayout( view ); |
77 | layout->setSpacing( 2); | 77 | layout->setSpacing( 2); |
78 | layout->setMargin( 2); | 78 | layout->setMargin( 2); |
79 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 79 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
80 | 80 | ||
81 | QMenuBar *menuBar = new QMenuBar(this); | 81 | QMenuBar *menuBar = new QMenuBar(this); |