summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Rules.make1
-rw-r--r--noncore/apps/opie-gutenbrowser/NetworkDialog.cpp4
-rw-r--r--noncore/net/opieftp/opieftp.cpp2
3 files changed, 4 insertions, 3 deletions
diff --git a/Rules.make b/Rules.make
index e86f662..f0e463b 100644
--- a/Rules.make
+++ b/Rules.make
@@ -1,299 +1,300 @@
1.phony: force 1.phony: force
2force: 2force:
3 3
4$(configs) : 4$(configs) :
5 $(call makecfg,$@) 5 $(call makecfg,$@)
6 6
7$(TOPDIR)/gen.pro : $(TOPDIR)/.config 7$(TOPDIR)/gen.pro : $(TOPDIR)/.config
8 echo > $@ 8 echo > $@
9# added for threaded version 9# added for threaded version
10ifneq ($(CONFIG_THREADED),) 10ifneq ($(CONFIG_THREADED),)
11 echo CONFIG += thread >> $@ 11 echo CONFIG += thread >> $@
12else 12else
13 echo CONFIG -= thread >> $@ 13 echo CONFIG -= thread >> $@
14endif 14endif
15ifneq ($(CONFIG_DEBUG),) 15ifneq ($(CONFIG_DEBUG),)
16 echo CONFIG += debug >> $@ 16 echo CONFIG += debug >> $@
17 echo CONFIG -= release >> $@ 17 echo CONFIG -= release >> $@
18 echo DEFINES += "QT_COMPONENT_DEBUG=2" >> $@ 18 echo DEFINES += "QT_COMPONENT_DEBUG=2" >> $@
19 echo DEFINES += QT_DEBUG >> $@ 19 echo DEFINES += QT_DEBUG >> $@
20else 20else
21 echo CONFIG -= debug >> $@ 21 echo CONFIG -= debug >> $@
22 echo CONFIG += release >> $@ 22 echo CONFIG += release >> $@
23 echo DEFINES += "OPIE_NO_DEBUG" >> $@ 23 echo DEFINES += "OPIE_NO_DEBUG" >> $@
24endif 24endif
25 25
26ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3 26ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3
27 echo CONFIG -= qt3 >> $@ 27 echo CONFIG -= qt3 >> $@
28else 28else
29 echo CONFIG += qt3 >> $@ 29 echo CONFIG += qt3 >> $@
30endif 30endif
31ifneq ($(CONFIG_QUICK_LAUNCH),) 31ifneq ($(CONFIG_QUICK_LAUNCH),)
32 echo contains\( CONFIG, quick-app \) \{ >> $@ 32 echo contains\( CONFIG, quick-app \) \{ >> $@
33 echo CONFIG -= quick-app >> $@ 33 echo CONFIG -= quick-app >> $@
34 echo CONFIG += quick-app-lib >> $@ 34 echo CONFIG += quick-app-lib >> $@
35 echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@ 35 echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@
36 echo \} >> $@ 36 echo \} >> $@
37else 37else
38 echo contains\( CONFIG, quick-app \) \{ >> $@ 38 echo contains\( CONFIG, quick-app \) \{ >> $@
39 echo CONFIG -= quick-app >> $@ 39 echo CONFIG -= quick-app >> $@
40 echo CONFIG += quick-app-bin >> $@ 40 echo CONFIG += quick-app-bin >> $@
41 echo \} >> $@ 41 echo \} >> $@
42endif 42endif
43ifeq ($(CONFIG_SQL_PIM_BACKEND),y) 43ifeq ($(CONFIG_SQL_PIM_BACKEND),y)
44 echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ 44 echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@
45else 45else
46 echo ENABLE_SQL_PIM_BACKEND=n >> $@ 46 echo ENABLE_SQL_PIM_BACKEND=n >> $@
47endif 47endif
48ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y) 48ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y)
49 echo CONFIG += no-override >> $@ 49 echo CONFIG += no-override >> $@
50endif 50endif
51ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) 51ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y)
52 echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ 52 echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@
53endif 53endif
54ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) 54ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y)
55 echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ 55 echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@
56endif 56endif
57ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) 57ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y)
58 echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ 58 echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@
59endif 59endif
60ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y) 60ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y)
61 echo DEFINES += USE_FILE_NOTIFICATION >> $@ 61 echo DEFINES += USE_FILE_NOTIFICATION >> $@
62endif 62endif
63ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) 63ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y)
64 echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ 64 echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@
65endif 65endif
66ifeq ($(CONFIG_OPIE_HIGH_RES_SMALL_PHY),y) 66ifeq ($(CONFIG_OPIE_HIGH_RES_SMALL_PHY),y)
67 echo DEFINES += OPIE_HIGH_RES_SMALL_PHY >> $@ 67 echo DEFINES += OPIE_HIGH_RES_SMALL_PHY >> $@
68endif 68endif
69ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) 69ifeq ($(CONFIG_OPIE_NEW_ALLOC),y)
70 echo DEFINES += OPIE_NEW_MALLOC >> $@ 70 echo DEFINES += OPIE_NEW_MALLOC >> $@
71endif 71endif
72ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) 72ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y)
73 echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ 73 echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@
74endif 74endif
75 echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ 75 echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@
76ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) 76ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y)
77 echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ 77 echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@
78endif 78endif
79# Write LIB dirs and INC dirs... 79# Write LIB dirs and INC dirs...
80ifeq ($(CONFIG_LIBETPAN_DEP),y) 80ifeq ($(CONFIG_LIBETPAN_DEP),y)
81 echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@ 81 echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@
82 echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@ 82 echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@
83endif 83endif
84ifeq ($(CONFIG_LIBPCAP_DEP),y) 84ifeq ($(CONFIG_LIBPCAP_DEP),y)
85 echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@ 85 echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@
86 echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@ 86 echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@
87endif 87endif
88ifeq ($(CONFIG_LIBSQLITE_DEP),y) 88ifeq ($(CONFIG_LIBSQLITE_DEP),y)
89 echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@ 89 echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@
90 echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@ 90 echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@
91endif 91endif
92ifeq ($(CONFIG_LIBXINE_DEP),y) 92ifeq ($(CONFIG_LIBXINE_DEP),y)
93 echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@ 93 echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@
94 echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@ 94 echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@
95endif 95endif
96ifeq ($(CONFIG_LIBIPK_DEP),y) 96ifeq ($(CONFIG_LIBIPK_DEP),y)
97 echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ 97 echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@
98 echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ 98 echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@
99endif 99endif
100ifeq ($(CONFIG_LIBSDK_DEP),y) 100ifeq ($(CONFIG_LIBSDK_DEP),y)
101 echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ 101 echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@
102 echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ 102 echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@
103endif 103endif
104ifeq ($(CONFIG_LIBSWORD_DEP),y) 104ifeq ($(CONFIG_LIBSWORD_DEP),y)
105 echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@ 105 echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@
106 echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@ 106 echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@
107endif 107endif
108$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages 108$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages
109 @echo Generating dependency information... 109 @echo Generating dependency information...
110# add to subdir-y, and add descend rules 110# add to subdir-y, and add descend rules
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 .; )
153ifeq ($(CONFIG_LIBOPIE),y) 153ifeq ($(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 .; )
158endif 158endif
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
176ifeq ($(CONFIG_LIBOPIE),y) 177ifeq ($(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 )
179endif 180endif
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
212menuconfig: $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf ./config.in 213menuconfig: $(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
216xconfig: $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in 217xconfig: $(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
220gconfig: $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in 221gconfig: $(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
224config: $(TOPDIR)/scripts/kconfig/conf ./config.in 225config: $(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
228oldconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 229oldconfig: $(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
232randconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 233randconfig: $(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
236allyesconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 237allyesconfig: $(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
239 240
240allnoconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 241allnoconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in
241 $(TOPDIR)/scripts/kconfig/conf -n ./config.in 242 $(TOPDIR)/scripts/kconfig/conf -n ./config.in
242 @touch .config.stamp 243 @touch .config.stamp
243 244
244defconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 245defconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in
245 $(TOPDIR)/scripts/kconfig/conf -d ./config.in 246 $(TOPDIR)/scripts/kconfig/conf -d ./config.in
246 @touch .config.stamp 247 @touch .config.stamp
247 248
248$(TOPDIR)/qmake/qmake : $(TOPDIR)/mkspecs/default 249$(TOPDIR)/qmake/qmake : $(TOPDIR)/mkspecs/default
249 250
250$(TOPDIR)/mkspecs/default : 251$(TOPDIR)/mkspecs/default :
251 ln -sf linux-g++ $@ 252 ln -sf linux-g++ $@
252 253
253$(TOPDIR)/scripts/subst : force 254$(TOPDIR)/scripts/subst : force
254 @( \ 255 @( \
255 echo 's,\$$QPE_VERSION,$(QPE_VERSION),g'; \ 256 echo 's,\$$QPE_VERSION,$(QPE_VERSION),g'; \
256 echo 's,\$$OPIE_VERSION,$(OPIE_VERSION),g'; \ 257 echo 's,\$$OPIE_VERSION,$(OPIE_VERSION),g'; \
257 echo 's,\$$QTE_VERSION,$(QTE_VERSION),g'; \ 258 echo 's,\$$QTE_VERSION,$(QTE_VERSION),g'; \
258 echo 's,\$$QTE_REVISION,$(QTE_REVISION),g'; \ 259 echo 's,\$$QTE_REVISION,$(QTE_REVISION),g'; \
259 echo 's,\$$SUB_VERSION,$(SUB_VERSION),g'; \ 260 echo 's,\$$SUB_VERSION,$(SUB_VERSION),g'; \
260 echo 's,\$$EXTRAVERSION,$(EXTRAVERSION),g'; \ 261 echo 's,\$$EXTRAVERSION,$(EXTRAVERSION),g'; \
261 echo 's,\$$QTE_BASEVERSION,$(QTE_BASEVERSION),g'; \ 262 echo 's,\$$QTE_BASEVERSION,$(QTE_BASEVERSION),g'; \
262 ) > $@ || ( rm -f $@; exit 1 ) 263 ) > $@ || ( rm -f $@; exit 1 )
263 264
264$(TOPDIR)/scripts/filesubst : force 265$(TOPDIR)/scripts/filesubst : force
265 @( \ 266 @( \
266 echo 's,\$$OPIEDIR/root/,/,g'; \ 267 echo 's,\$$OPIEDIR/root/,/,g'; \
267 echo 's,$(OPIEDIR)/root/,/,g'; \ 268 echo 's,$(OPIEDIR)/root/,/,g'; \
268 echo 's,\$$OPIEDIR,$(prefix),g'; \ 269 echo 's,\$$OPIEDIR,$(prefix),g'; \
269 echo 's,$(OPIEDIR),$(prefix),g'; \ 270 echo 's,$(OPIEDIR),$(prefix),g'; \
270 echo 's,\$$QTDIR,$(prefix),g'; \ 271 echo 's,\$$QTDIR,$(prefix),g'; \
271 echo 's,$(QTDIR),$(prefix),g'; \ 272 echo 's,$(QTDIR),$(prefix),g'; \
272 echo 's,^\(\./\)*root/,/,g'; \ 273 echo 's,^\(\./\)*root/,/,g'; \
273 echo 's,^\(\./\)*etc/,$(prefix)/etc/,g'; \ 274 echo 's,^\(\./\)*etc/,$(prefix)/etc/,g'; \
274 echo 's,^\(\./\)*lib/,$(prefix)/lib/,g'; \ 275 echo 's,^\(\./\)*lib/,$(prefix)/lib/,g'; \
275 echo 's,^\(\./\)*bin/,$(prefix)/bin/,g'; \ 276 echo 's,^\(\./\)*bin/,$(prefix)/bin/,g'; \
276 echo 's,^\(\./\)*pics/,$(prefix)/pics/,g'; \ 277 echo 's,^\(\./\)*pics/,$(prefix)/pics/,g'; \
277 echo 's,^\(\./\)*sounds/,$(prefix)/sounds/,g'; \ 278 echo 's,^\(\./\)*sounds/,$(prefix)/sounds/,g'; \
278 echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \ 279 echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \
279 echo 's,^\(\./\)*plugins/,$(prefix)/plugins/,g'; \ 280 echo 's,^\(\./\)*plugins/,$(prefix)/plugins/,g'; \
280 echo 's,^\(\./\)*apps/,$(prefix)/apps/,g'; \ 281 echo 's,^\(\./\)*apps/,$(prefix)/apps/,g'; \
281 echo 's,^\(\./\)*share/,$(prefix)/share/,g'; \ 282 echo 's,^\(\./\)*share/,$(prefix)/share/,g'; \
282 echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \ 283 echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \
283 echo 's,^\(\./\)*help/,$(prefix)/help/,g'; \ 284 echo 's,^\(\./\)*help/,$(prefix)/help/,g'; \
284 ) > $@ || ( rm -f $@; exit 1 ) 285 ) > $@ || ( rm -f $@; exit 1 )
285 286
286## general rules ## 287## general rules ##
287 288
288define descend 289define descend
289 $(MAKE) $(if $(QMAKE),QMAKE=$(QMAKE)) -C $(1) $(2) 290 $(MAKE) $(if $(QMAKE),QMAKE=$(QMAKE)) -C $(1) $(2)
290endef 291endef
291 292
292define makefilegen 293define makefilegen
293 cd $(if $(1),$(shell dirname $(1))); $(TOPDIR)/qmake/qmake $(3) -o $(if $(1),$(shell basename $(1))) `cat $(OPIEDIR)/packages | grep " \`echo $(1)|sed -e 's,/Makefile$$,,'\`" | \ 294 cd $(if $(1),$(shell dirname $(1))); $(TOPDIR)/qmake/qmake $(3) -o $(if $(1),$(shell basename $(1))) `cat $(OPIEDIR)/packages | grep " \`echo $(1)|sed -e 's,/Makefile$$,,'\`" | \
294 head -1 | awk '{print $$3}'` 295 head -1 | awk '{print $$3}'`
295endef 296endef
296 297
297define makecfg 298define makecfg
298 $(TOPDIR)/scripts/makecfg.pl $1 $(OPIEDIR) 299 $(TOPDIR)/scripts/makecfg.pl $1 $(OPIEDIR)
299endef 300endef
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,329 +1,329 @@
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
14extern "C" { 15extern "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
33QProgressBar* ProgressBar1; 33QProgressBar* ProgressBar1;
34QPushButton* buttonCancel; 34QPushButton* buttonCancel;
35static netbuf *conn = NULL; 35static netbuf *conn = NULL;
36 36
37static int log_progress(netbuf *ctl, int xfered, void *arg) { 37static 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
48NetworkDialog::NetworkDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QStringList netL) 48NetworkDialog::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
77NetworkDialog::~NetworkDialog() { 77NetworkDialog::~NetworkDialog() {
78} 78}
79 79
80void NetworkDialog::initDialog() { 80void NetworkDialog::initDialog() {
81 81
82 totalBytesDownloaded=0; 82 totalBytesDownloaded=0;
83 warnLabel = new QLabel( this, "TextLabel" ); 83 warnLabel = new QLabel( this, "TextLabel" );
84 warnLabel ->setText( tr( "Push Ok to download file...." ) ); 84 warnLabel ->setText( tr( "Push Ok to download file...." ) );
85 TextLabel3 = new QLabel( this, "TextLabel3" ); 85 TextLabel3 = new QLabel( this, "TextLabel3" );
86 TextLabel3->setText( ""); 86 TextLabel3->setText( "");
87 QWidget* Layout1 = new QWidget( this, "Layout1" ); 87 QWidget* Layout1 = new QWidget( this, "Layout1" );
88 88
89 hbox = new QHBoxLayout(Layout1); 89 hbox = new QHBoxLayout(Layout1);
90 hbox->setMargin(4); 90 hbox->setMargin(4);
91 91
92 ProgressBar1 = new QProgressBar( Layout1, "ProgressBar1" ); 92 ProgressBar1 = new QProgressBar( Layout1, "ProgressBar1" );
93 ProgressBar1->setProgress(0); 93 ProgressBar1->setProgress(0);
94 hbox->addWidget(ProgressBar1,10,AlignCenter); 94 hbox->addWidget(ProgressBar1,10,AlignCenter);
95 95
96 hbox->addStretch(1); 96 hbox->addStretch(1);
97 buttonOk = new QPushButton( Layout1, "buttonOk" ); 97 buttonOk = new QPushButton( Layout1, "buttonOk" );
98 buttonOk->setText( tr( "&OK" ) ); 98 buttonOk->setText( tr( "&OK" ) );
99 hbox->addWidget(buttonOk,0,AlignRight); 99 hbox->addWidget(buttonOk,0,AlignRight);
100 hbox->addSpacing(5); 100 hbox->addSpacing(5);
101 buttonCancel = new QPushButton( Layout1, "buttonCancel" ); 101 buttonCancel = new QPushButton( Layout1, "buttonCancel" );
102 buttonCancel->setText( tr( "&Cancel" ) ); 102 buttonCancel->setText( tr( "&Cancel" ) );
103 buttonCancel->setAutoDefault( TRUE ); 103 buttonCancel->setAutoDefault( TRUE );
104 buttonCancel->setDefault( TRUE ); 104 buttonCancel->setDefault( TRUE );
105 hbox->addWidget(buttonCancel,0,AlignRight); 105 hbox->addWidget(buttonCancel,0,AlignRight);
106 106
107 ProgressBar1->setFixedSize(140,22); 107 ProgressBar1->setFixedSize(140,22);
108 buttonOk->setFixedSize(35,22); 108 buttonOk->setFixedSize(35,22);
109 buttonCancel->setFixedSize(35,22); 109 buttonCancel->setFixedSize(35,22);
110 warnLabel ->setGeometry( QRect( 5,1,230,25)); 110 warnLabel ->setGeometry( QRect( 5,1,230,25));
111 TextLabel3->setGeometry( QRect( 5,20,230,25)); 111 TextLabel3->setGeometry( QRect( 5,20,230,25));
112 Layout1->setGeometry( QRect(1,60,235,50)); //TODO check these!! 112 Layout1->setGeometry( QRect(1,60,235,50)); //TODO check these!!
113 113
114// timer= new QTimer(this,"vu timer"); 114// timer= new QTimer(this,"vu timer");
115// connectionTimer=new QTimer(this,"connectionTimeout"); 115// connectionTimer=new QTimer(this,"connectionTimeout");
116 116
117 connect(buttonOk,SIGNAL(clicked()),this,SLOT(doOk())); 117 connect(buttonOk,SIGNAL(clicked()),this,SLOT(doOk()));
118 connect(buttonCancel,SIGNAL(clicked()),this,SLOT(reject())); 118 connect(buttonCancel,SIGNAL(clicked()),this,SLOT(reject()));
119// connect( timer, SIGNAL(timeout()), this , SLOT(timeSlot())); 119// connect( timer, SIGNAL(timeout()), this , SLOT(timeSlot()));
120// connect( connectionTimer,SIGNAL( timeout()),this,SLOT( connectionTimeSlot())); 120// connect( connectionTimer,SIGNAL( timeout()),this,SLOT( connectionTimeSlot()));
121 if(autoOk) { 121 if(autoOk) {
122 qWarning("XXXXXXXXXXXXXXXXXXXXXXXX"); 122 qWarning("XXXXXXXXXXXXXXXXXXXXXXXX");
123 buttonOk->setDown(true); 123 buttonOk->setDown(true);
124 doOk(); 124 doOk();
125 } 125 }
126} 126}
127 127
128void NetworkDialog::timeSlot() { 128void NetworkDialog::timeSlot() {
129 129
130// if(timerProgess < 19 && posTimer) { 130// if(timerProgess < 19 && posTimer) {
131// ProgressBar1->setProgress(timerProgess); 131// ProgressBar1->setProgress(timerProgess);
132// timerProgess++; 132// timerProgess++;
133// } else if(timerProgess > 19 && posTimer) { 133// } else if(timerProgess > 19 && posTimer) {
134// ProgressBar1->setProgress(timerProgess); 134// ProgressBar1->setProgress(timerProgess);
135// timerProgess++; 135// timerProgess++;
136// posTimer=FALSE; 136// posTimer=FALSE;
137// } 137// }
138// if(timerProgess > 1 &&!posTimer) { 138// if(timerProgess > 1 &&!posTimer) {
139// ProgressBar1->setProgress(timerProgess); 139// ProgressBar1->setProgress(timerProgess);
140// timerProgess--; 140// timerProgess--;
141// } else if(timerProgess > 1 &&!posTimer){ 141// } else if(timerProgess > 1 &&!posTimer){
142// ProgressBar1->setProgress(timerProgess); 142// ProgressBar1->setProgress(timerProgess);
143// timerProgess--; 143// timerProgess--;
144// posTimer=TRUE; 144// posTimer=TRUE;
145// } 145// }
146// // qDebug("timer event"); 146// // qDebug("timer event");
147// qApp->processEvents(); 147// qApp->processEvents();
148// repaint(); 148// repaint();
149} 149}
150 150
151void NetworkDialog::connectionTimeSlot() { 151void NetworkDialog::connectionTimeSlot() {
152// qDebug("Connections timed out"); 152// qDebug("Connections timed out");
153// ftpQuit(); 153// ftpQuit();
154// qApp->processEvents(); 154// qApp->processEvents();
155// repaint(); 155// repaint();
156// reject(); 156// reject();
157} 157}
158 158
159 159
160/* 160/*
161downloads the file networkUrl */ 161downloads the file networkUrl */
162bool NetworkDialog::downloadFile( QString networkUrl ) 162bool NetworkDialog::downloadFile( QString networkUrl )
163{ 163{
164 int fsz; 164 int fsz;
165// timer->start( 250 , FALSE); 165// timer->start( 250 , FALSE);
166// posTimer=TRUE; 166// posTimer=TRUE;
167// connectionTimer->start( 600 , FALSE); 167// connectionTimer->start( 600 , FALSE);
168 warnLabel ->setText( ""); 168 warnLabel ->setText( "");
169 qApp->processEvents(); 169 qApp->processEvents();
170 qDebug("Downloading: %s",networkUrl.latin1()); 170 qDebug("Downloading: %s",networkUrl.latin1());
171 qDebug("Into: %s",localFileName.latin1()); 171 qDebug("Into: %s",localFileName.latin1());
172 if( networkUrl.length() > 5) { 172 if( networkUrl.length() > 5) {
173 QString ftp_user = "anonymous"; 173 QString ftp_user = "anonymous";
174 QString ftp_pass = "zaurus@gutenbrowser.com"; 174 QString ftp_pass = "zaurus@gutenbrowser.com";
175// ftp_host= networkUrl.mid(networkUrl.find("ftp://",0, TRUE), 175// ftp_host= networkUrl.mid(networkUrl.find("ftp://",0, TRUE),
176 if(ftp_host.length() < 2) { 176 if(ftp_host.length() < 2) {
177 qDebug("Please select an ftp host" ); 177 qDebug("Please select an ftp host" );
178 successDownload=false; 178 successDownload=false;
179 QMessageBox::message("Note","You need to select an ftp host"); 179 QMessageBox::message("Note","You need to select an ftp host");
180 return false; 180 return false;
181 } 181 }
182 QString msg; 182 QString msg;
183 qDebug(ftp_host); 183 qDebug(ftp_host);
184 qDebug("Opening ftp connection."); 184 qDebug("Opening ftp connection.");
185 warnLabel->setText("connecting to: "+ftp_host ); 185 warnLabel->setText("connecting to: "+ftp_host );
186 qApp->processEvents(); 186 qApp->processEvents();
187 /////////// Open FTP connection 187 /////////// Open FTP connection
188 if (!FtpConnect( ftp_host.latin1(), &conn)) { 188 if (!FtpConnect( ftp_host.latin1(), &conn)) {
189 i=0; 189 i=0;
190 successDownload=false; 190 successDownload=false;
191 QMessageBox::message("Note","Unable to connect to\n"+ftp_host); 191 QMessageBox::message("Note","Unable to connect to\n"+ftp_host);
192 return false; 192 return false;
193 } 193 }
194 TextLabel3->setText("Opening ftp connection."); 194 TextLabel3->setText("Opening ftp connection.");
195 qApp->processEvents(); 195 qApp->processEvents();
196 if (!FtpLogin( ftp_user.latin1(), ftp_pass.latin1(),conn )) { 196 if (!FtpLogin( ftp_user.latin1(), ftp_pass.latin1(),conn )) {
197 FtpQuit(conn); 197 FtpQuit(conn);
198 successDownload=false; 198 successDownload=false;
199 msg.sprintf("Unable to log in\n%s",FtpLastResponse(conn)); 199 msg.sprintf("Unable to log in\n%s",FtpLastResponse(conn));
200 QMessageBox::message("Note",msg); 200 QMessageBox::message("Note",msg);
201 return false; 201 return false;
202 } 202 }
203 qDebug("Changing directories."); 203 qDebug("Changing directories.");
204 TextLabel3->setText("Changing directories."); 204 TextLabel3->setText("Changing directories.");
205 qApp->processEvents(); 205 qApp->processEvents();
206 if (!FtpChdir( dir.latin1(), conn )) { 206 if (!FtpChdir( dir.latin1(), conn )) {
207 successDownload=false; 207 successDownload=false;
208 msg.sprintf("Unable to change directories "+dir+"\n%s",FtpLastResponse(conn)); 208 msg.sprintf("Unable to change directories "+dir+"\n%s",FtpLastResponse(conn));
209 QMessageBox::message("Note",msg); 209 QMessageBox::message("Note",msg);
210 FtpQuit(conn); 210 FtpQuit(conn);
211 return false; 211 return false;
212 } 212 }
213// if (!FtpNlst( "./.guten_temp", dir, conn)) { 213// if (!FtpNlst( "./.guten_temp", dir, conn)) {
214// successDownload=false; 214// successDownload=false;
215// msg.sprintf("Unable to change directories "+dir+"\n%s",FtpLastResponse(conn)); 215// msg.sprintf("Unable to change directories "+dir+"\n%s",FtpLastResponse(conn));
216// QMessageBox::message("Note",msg); 216// QMessageBox::message("Note",msg);
217// FtpQuit(conn); 217// FtpQuit(conn);
218// return false; 218// return false;
219// } 219// }
220 qDebug("Requesting directory list."); 220 qDebug("Requesting directory list.");
221 TextLabel3->setText("Getting directory list."); 221 TextLabel3->setText("Getting directory list.");
222 qApp->processEvents(); 222 qApp->processEvents();
223 if (!FtpDir( "./.guten_temp", dir.latin1(), conn) ) { 223 if (!FtpDir( "./.guten_temp", dir.latin1(), conn) ) {
224 msg.sprintf("Unable to list the directory\n"+dir+"\n%s",FtpLastResponse(conn)); 224 msg.sprintf("Unable to list the directory\n"+dir+"\n%s",FtpLastResponse(conn));
225 QMessageBox::message("Note",msg); 225 QMessageBox::message("Note",msg);
226 successDownload=false; 226 successDownload=false;
227 FtpQuit(conn); 227 FtpQuit(conn);
228 return false; 228 return false;
229 } 229 }
230 QFile tmp("./.guten_temp"); 230 QFile tmp("./.guten_temp");
231 QString s, File_Name; 231 QString s, File_Name;
232 232
233 if (tmp.open(IO_ReadOnly)) { 233 if (tmp.open(IO_ReadOnly)) {
234 QTextStream t( &tmp ); // use a text stream 234 QTextStream t( &tmp ); // use a text stream
235 qDebug("Finding partial filename "+s_partialFileName); 235 qDebug("Finding partial filename "+s_partialFileName);
236 while ( !t.eof()) { 236 while ( !t.eof()) {
237 s = t.readLine(); 237 s = t.readLine();
238 238
239 if (s.contains(s_partialFileName, FALSE)) { 239 if (s.contains(s_partialFileName, FALSE)) {
240 QString str = s.right( (s.length()) - (s.find(s_partialFileName, FALSE)) ); 240 QString str = s.right( (s.length()) - (s.find(s_partialFileName, FALSE)) );
241 241
242 if (str.contains(".txt")) { 242 if (str.contains(".txt")) {
243 File_Name = str; 243 File_Name = str;
244 qDebug("Found file_name "+ File_Name); 244 qDebug("Found file_name "+ File_Name);
245 break; 245 break;
246 } 246 }
247// if (str.contains(".zip")) { 247// if (str.contains(".zip")) {
248// File_Name = str; 248// File_Name = str;
249// qDebug("Found file_name "+ File_Name); 249// qDebug("Found file_name "+ File_Name);
250// break; 250// break;
251// } 251// }
252 252
253 } 253 }
254 } //end of while loop 254 } //end of while loop
255 tmp.close(); 255 tmp.close();
256// tmp.remove(); ///TODO this is for release version Zaurus 256// tmp.remove(); ///TODO this is for release version Zaurus
257 } 257 }
258 else 258 else
259 qDebug("Error opening temp file."); 259 qDebug("Error opening temp file.");
260 260
261 Config cfg("Gutenbrowser"); 261 Config cfg("Gutenbrowser");
262 cfg.setGroup("General"); 262 cfg.setGroup("General");
263 QString temp=cfg.readEntry("DownloadDirectory",local_library); 263 QString temp=cfg.readEntry("DownloadDirectory",local_library);
264 264
265 localFileName = temp+File_Name; 265 localFileName = temp+File_Name;
266 qDebug("Requesting file "+ File_Name); 266 qDebug("Requesting file "+ File_Name);
267 qDebug( "Saving as "+localFileName); 267 qDebug( "Saving as "+localFileName);
268 msg="Requesting file "+ File_Name; 268 msg="Requesting file "+ File_Name;
269 TextLabel3->setText(msg); 269 TextLabel3->setText(msg);
270 qApp->processEvents(); 270 qApp->processEvents();
271 if( File_Name.length()>3) { 271 if( File_Name.length()>3) {
272 if (!FtpSize( File_Name.latin1(), &fsz, FTPLIB_ASCII, conn)) 272 if (!FtpSize( File_Name.latin1(), &fsz, FTPLIB_ASCII, conn))
273 fsz = 0; 273 fsz = 0;
274 QString temp; 274 QString temp;
275 temp.sprintf( File_Name+" "+" %dkb", fsz); 275 temp.sprintf( File_Name+" "+" %dkb", fsz);
276 TextLabel3->setText(temp); 276 TextLabel3->setText(temp);
277 277
278 ProgressBar1->setTotalSteps(fsz); 278 ProgressBar1->setTotalSteps(fsz);
279 FtpOptions(FTPLIB_CALLBACK, (long) log_progress, conn); 279 FtpOptions(FTPLIB_CALLBACK, (long) log_progress, conn);
280 FtpOptions(FTPLIB_IDLETIME, (long) 1000, conn); 280 FtpOptions(FTPLIB_IDLETIME, (long) 1000, conn);
281 FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn); 281 FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn);
282 FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn); 282 FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn);
283 283
284 if (!FtpGet( localFileName.latin1(), File_Name.latin1(), FTPLIB_ASCII, conn)) { 284 if (!FtpGet( localFileName.latin1(), File_Name.latin1(), FTPLIB_ASCII, conn)) {
285 msg.sprintf("Could not download "+ File_Name+"\n%s",FtpLastResponse(conn)); 285 msg.sprintf("Could not download "+ File_Name+"\n%s",FtpLastResponse(conn));
286 successDownload=false; 286 successDownload=false;
287 QMessageBox::message("Note",msg); 287 QMessageBox::message("Note",msg);
288 update(); 288 update();
289 } 289 }
290 } else { 290 } else {
291 QMessageBox::message("Note","Could not download file "+ File_Name); 291 QMessageBox::message("Note","Could not download file "+ File_Name);
292 successDownload=false; 292 successDownload=false;
293 FtpQuit(conn); 293 FtpQuit(conn);
294 return false; 294 return false;
295 } 295 }
296 qDebug("Ftp session successful"); 296 qDebug("Ftp session successful");
297 successDownload=TRUE; 297 successDownload=TRUE;
298 FtpQuit(conn); 298 FtpQuit(conn);
299 return true; 299 return true;
300 } //no network url 300 } //no network url
301 return false; 301 return false;
302} 302}
303 303
304void NetworkDialog::doOk() { 304void NetworkDialog::doOk() {
305 qWarning("Do OK"); 305 qWarning("Do OK");
306 QString loginStr; 306 QString loginStr;
307 loginStr = "gutenbrowser"; 307 loginStr = "gutenbrowser";
308 if ( !ftp_host.isEmpty() ) { 308 if ( !ftp_host.isEmpty() ) {
309 if( ftp_host.find( "/", ftp_host.length() - 1,TRUE) != -1 && ftp_host.find("ftp://",0, TRUE) != -1) { 309 if( ftp_host.find( "/", ftp_host.length() - 1,TRUE) != -1 && ftp_host.find("ftp://",0, TRUE) != -1) {
310 TextLabel3->setText( tr( "List remote dir:\n" + ftp_host) ); 310 TextLabel3->setText( tr( "List remote dir:\n" + ftp_host) );
311// TextLabel2->setText( tr( "local file to download into: " +localFileName ) ); 311// TextLabel2->setText( tr( "local file to download into: " +localFileName ) );
312 312
313 if( downloadFile(ftp_host)) 313 if( downloadFile(ftp_host))
314 successDownload = true; 314 successDownload = true;
315 else { 315 else {
316 successDownload = false; 316 successDownload = false;
317 reject(); 317 reject();
318 } 318 }
319 } else { 319 } else {
320 if(downloadFile(ftp_host)) 320 if(downloadFile(ftp_host))
321 successDownload = true; 321 successDownload = true;
322 else { 322 else {
323 successDownload = false; 323 successDownload = false;
324 reject(); 324 reject();
325 } 325 }
326 } 326 }
327 } 327 }
328 accept(); 328 accept();
329} 329}
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,401 +1,401 @@
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
16extern "C" { 16extern "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>
28using namespace Opie::Core; 28using 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
50QProgressBar *ProgressBar; 50QProgressBar *ProgressBar;
51static netbuf *conn=NULL; 51static netbuf *conn=NULL;
52 52
53static int log_progress(netbuf *, int xfered, void *) 53static 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
64OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) 64OpieFtp::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);
82// QToolBar *menuBar = new QToolBar(this); 82// QToolBar *menuBar = new QToolBar(this);
83// menuBar->setHorizontalStretchable( TRUE ); 83// menuBar->setHorizontalStretchable( TRUE );
84 84
85 QWMatrix matrix; 85 QWMatrix matrix;
86 QPixmap pix(Resource::loadPixmap( "UnknownDocument" )); 86 QPixmap pix(Resource::loadPixmap( "UnknownDocument" ));
87 matrix.scale( .4, .4); 87 matrix.scale( .4, .4);
88 unknownXpm = pix.xForm(matrix); 88 unknownXpm = pix.xForm(matrix);
89 89
90 connectionMenu = new QPopupMenu( this ); 90 connectionMenu = new QPopupMenu( this );
91 localMenu = new QPopupMenu( this ); 91 localMenu = new QPopupMenu( this );
92 remoteMenu = new QPopupMenu( this ); 92 remoteMenu = new QPopupMenu( this );
93 tabMenu = new QPopupMenu( this ); 93 tabMenu = new QPopupMenu( this );
94 94
95//#if 0 95//#if 0
96 layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); 96 layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 );
97//#endif 97//#endif
98 98
99 menuBar->insertItem( tr( "Connection" ), connectionMenu); 99 menuBar->insertItem( tr( "Connection" ), connectionMenu);
100// menuBar->insertItem( tr( "Local" ), localMenu); 100// menuBar->insertItem( tr( "Local" ), localMenu);
101// menuBar->insertItem( tr( "Remote" ), remoteMenu); 101// menuBar->insertItem( tr( "Remote" ), remoteMenu);
102 menuBar->insertItem( tr( "View" ), tabMenu); 102 menuBar->insertItem( tr( "View" ), tabMenu);
103 103
104 tabMenu->insertItem( tr( "Local" ), localMenu); 104 tabMenu->insertItem( tr( "Local" ), localMenu);
105 tabMenu->insertItem( tr( "Remote" ), remoteMenu); 105 tabMenu->insertItem( tr( "Remote" ), remoteMenu);
106 106
107 connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); 107 connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() ));
108 connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); 108 connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() ));
109 connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() )); 109 connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() ));
110 110
111 localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); 111 localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
112 localMenu->insertSeparator(); 112 localMenu->insertSeparator();
113 localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); 113 localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() ));
114 localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); 114 localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
115 localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() )); 115 localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() ));
116 localMenu->insertSeparator(); 116 localMenu->insertSeparator();
117 localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); 117 localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() ));
118 localMenu->setCheckable(TRUE); 118 localMenu->setCheckable(TRUE);
119 119
120 remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); 120 remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() ));
121 remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); 121 remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() ));
122 remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); 122 remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() ));
123 remoteMenu->insertSeparator(); 123 remoteMenu->insertSeparator();
124 remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); 124 remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() ));
125 125
126 tabMenu->insertSeparator(); 126 tabMenu->insertSeparator();
127 tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); 127 tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() ));
128 tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); 128 tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() ));
129 tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); 129 tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() ));
130 tabMenu->insertSeparator(); 130 tabMenu->insertSeparator();
131// tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); 131// tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() ));
132 tabMenu->setCheckable(TRUE); 132 tabMenu->setCheckable(TRUE);
133 133
134 134
135 cdUpButton = new QToolButton( view,"cdUpButton"); 135 cdUpButton = new QToolButton( view,"cdUpButton");
136 cdUpButton->setPixmap(Resource::loadPixmap("up")); 136 cdUpButton->setPixmap(Resource::loadPixmap("up"));
137 cdUpButton ->setFixedSize( QSize( 20, 20 ) ); 137 cdUpButton ->setFixedSize( QSize( 20, 20 ) );
138 connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); 138 connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) );
139 layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 ); 139 layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 );
140 cdUpButton->hide(); 140 cdUpButton->hide();
141 141
142// docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",view,"docsButton"); 142// docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",view,"docsButton");
143// docButton->setFixedSize( QSize( 20, 20 ) ); 143// docButton->setFixedSize( QSize( 20, 20 ) );
144// connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); 144// connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) );
145// docButton->setFlat(TRUE); 145// docButton->setFlat(TRUE);
146// layout->addMultiCellWidget( docButton, 0, 0, 6, 6 ); 146// layout->addMultiCellWidget( docButton, 0, 0, 6, 6 );
147 147
148 homeButton = new QToolButton(view,"homeButton"); 148 homeButton = new QToolButton(view,"homeButton");
149 homeButton->setPixmap( Resource::loadPixmap("home")); 149 homeButton->setPixmap( Resource::loadPixmap("home"));
150 homeButton->setFixedSize( QSize( 20, 20 ) ); 150 homeButton->setFixedSize( QSize( 20, 20 ) );
151 connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); 151 connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) );
152 layout->addMultiCellWidget( homeButton, 0, 0, 4, 4); 152 layout->addMultiCellWidget( homeButton, 0, 0, 4, 4);
153 homeButton->hide(); 153 homeButton->hide();
154 154
155 TabWidget = new QTabWidget( view, "TabWidget" ); 155 TabWidget = new QTabWidget( view, "TabWidget" );
156 layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 ); 156 layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 );
157 157
158// TabWidget->setTabShape(QTabWidget::Triangular); 158// TabWidget->setTabShape(QTabWidget::Triangular);
159 159
160 tab = new QWidget( TabWidget, "tab" ); 160 tab = new QWidget( TabWidget, "tab" );
161 tabLayout = new QGridLayout( tab ); 161 tabLayout = new QGridLayout( tab );
162 tabLayout->setSpacing( 2); 162 tabLayout->setSpacing( 2);
163 tabLayout->setMargin( 2); 163 tabLayout->setMargin( 2);
164 164
165 Local_View = new QListView( tab, "Local_View" ); 165 Local_View = new QListView( tab, "Local_View" );
166// Local_View->setResizePolicy( QListView::AutoOneFit ); 166// Local_View->setResizePolicy( QListView::AutoOneFit );
167 Local_View->addColumn( tr("File"),150); 167 Local_View->addColumn( tr("File"),150);
168 Local_View->addColumn( tr("Date"),-1); 168 Local_View->addColumn( tr("Date"),-1);
169 Local_View->setColumnAlignment(1,QListView::AlignRight); 169 Local_View->setColumnAlignment(1,QListView::AlignRight);
170 Local_View->addColumn( tr("Size"),-1); 170 Local_View->addColumn( tr("Size"),-1);
171 Local_View->setColumnAlignment(2,QListView::AlignRight); 171 Local_View->setColumnAlignment(2,QListView::AlignRight);
172 Local_View->setAllColumnsShowFocus(TRUE); 172 Local_View->setAllColumnsShowFocus(TRUE);
173 173
174 Local_View->setMultiSelection( TRUE); 174 Local_View->setMultiSelection( TRUE);
175 Local_View->setSelectionMode(QListView::Extended); 175 Local_View->setSelectionMode(QListView::Extended);
176 Local_View->setFocusPolicy(QWidget::ClickFocus); 176 Local_View->setFocusPolicy(QWidget::ClickFocus);
177 177
178 QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); 178 QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold);
179 179
180 tabLayout->addWidget( Local_View, 0, 0 ); 180 tabLayout->addWidget( Local_View, 0, 0 );
181 181
182 connect( Local_View, SIGNAL( clicked(QListViewItem*)), 182 connect( Local_View, SIGNAL( clicked(QListViewItem*)),
183 this,SLOT( localListClicked(QListViewItem*)) ); 183 this,SLOT( localListClicked(QListViewItem*)) );
184// connect( Local_View, SIGNAL( doubleClicked(QListViewItem*)), 184// connect( Local_View, SIGNAL( doubleClicked(QListViewItem*)),
185// this,SLOT( localListClicked(QListViewItem*)) ); 185// this,SLOT( localListClicked(QListViewItem*)) );
186 connect( Local_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), 186 connect( Local_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),
187 this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); 187 this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) );
188 188
189 TabWidget->insertTab( tab, tr( "Local" ) ); 189 TabWidget->insertTab( tab, tr( "Local" ) );
190 190
191 tab_2 = new QWidget( TabWidget, "tab_2" ); 191 tab_2 = new QWidget( TabWidget, "tab_2" );
192 tabLayout_2 = new QGridLayout( tab_2 ); 192 tabLayout_2 = new QGridLayout( tab_2 );
193 tabLayout_2->setSpacing( 2); 193 tabLayout_2->setSpacing( 2);
194 tabLayout_2->setMargin( 2); 194 tabLayout_2->setMargin( 2);
195 195
196 Remote_View = new QListView( tab_2, "Remote_View" ); 196 Remote_View = new QListView( tab_2, "Remote_View" );
197 Remote_View->addColumn( tr("File"),150); 197 Remote_View->addColumn( tr("File"),150);
198 Remote_View->addColumn( tr("Date"),-1); 198 Remote_View->addColumn( tr("Date"),-1);
199// Remote_View->setColumnAlignment(1,QListView::AlignRight); 199// Remote_View->setColumnAlignment(1,QListView::AlignRight);
200 Remote_View->addColumn( tr("Size"),-1); 200 Remote_View->addColumn( tr("Size"),-1);
201 Remote_View->setColumnAlignment(2,QListView::AlignRight); 201 Remote_View->setColumnAlignment(2,QListView::AlignRight);
202 Remote_View->setColumnAlignment(3,QListView::AlignCenter); 202 Remote_View->setColumnAlignment(3,QListView::AlignCenter);
203 Remote_View->addColumn( tr("Dir"),-1); 203 Remote_View->addColumn( tr("Dir"),-1);
204 Remote_View->setColumnAlignment(4,QListView::AlignRight); 204 Remote_View->setColumnAlignment(4,QListView::AlignRight);
205 Remote_View->setAllColumnsShowFocus(TRUE); 205 Remote_View->setAllColumnsShowFocus(TRUE);
206 206
207 Remote_View->setMultiSelection( FALSE); 207 Remote_View->setMultiSelection( FALSE);
208 Remote_View->setSelectionMode(QListView::Extended); 208 Remote_View->setSelectionMode(QListView::Extended);
209 Remote_View->setFocusPolicy(QWidget::ClickFocus); 209 Remote_View->setFocusPolicy(QWidget::ClickFocus);
210 210
211 QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); 211 QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold);
212 212
213 connect( Remote_View, SIGNAL( clicked(QListViewItem*)), 213 connect( Remote_View, SIGNAL( clicked(QListViewItem*)),
214 this,SLOT( remoteListClicked(QListViewItem*)) ); 214 this,SLOT( remoteListClicked(QListViewItem*)) );
215 connect( Remote_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), 215 connect( Remote_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),
216 this,SLOT( RemoteListPressed(int,QListViewItem*,const QPoint&,int)) ); 216 this,SLOT( RemoteListPressed(int,QListViewItem*,const QPoint&,int)) );
217 217
218 tabLayout_2->addWidget( Remote_View, 0, 0 ); 218 tabLayout_2->addWidget( Remote_View, 0, 0 );
219 219
220 TabWidget->insertTab( tab_2, tr( "Remote" ) ); 220 TabWidget->insertTab( tab_2, tr( "Remote" ) );
221 221
222 tab_3 = new QWidget( TabWidget, "tab_3" ); 222 tab_3 = new QWidget( TabWidget, "tab_3" );
223 tabLayout_3 = new QGridLayout( tab_3 ); 223 tabLayout_3 = new QGridLayout( tab_3 );
224 tabLayout_3->setSpacing( 2); 224 tabLayout_3->setSpacing( 2);
225 tabLayout_3->setMargin( 2); 225 tabLayout_3->setMargin( 2);
226 226
227 TextLabel1 = new QLabel( tab_3, "TextLabel1" ); 227 TextLabel1 = new QLabel( tab_3, "TextLabel1" );
228 TextLabel1->setText( tr( "Username" ) ); 228 TextLabel1->setText( tr( "Username" ) );
229 tabLayout_3->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 ); 229 tabLayout_3->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 );
230 230
231 UsernameComboBox = new QComboBox( FALSE, tab_3, "UsernameComboBox" ); 231 UsernameComboBox = new QComboBox( FALSE, tab_3, "UsernameComboBox" );
232 UsernameComboBox->setEditable(TRUE); 232 UsernameComboBox->setEditable(TRUE);
233 tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 ); 233 tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 );
234 234
235 connect( UsernameComboBox,SIGNAL(textChanged(const QString&)),this, 235 connect( UsernameComboBox,SIGNAL(textChanged(const QString&)),this,
236 SLOT( UsernameComboBoxEdited(const QString&) )); 236 SLOT( UsernameComboBoxEdited(const QString&) ));
237 237
238 TextLabel2 = new QLabel( tab_3, "TextLabel2" ); 238 TextLabel2 = new QLabel( tab_3, "TextLabel2" );
239 TextLabel2->setText( tr( "Password" ) ); 239 TextLabel2->setText( tr( "Password" ) );
240 tabLayout_3->addMultiCellWidget( TextLabel2, 0, 0, 2, 3 ); 240 tabLayout_3->addMultiCellWidget( TextLabel2, 0, 0, 2, 3 );
241 241
242 PasswordEdit = new QLineEdit( "", tab_3, "PasswordComboBox" ); 242 PasswordEdit = new QLineEdit( "", tab_3, "PasswordComboBox" );
243 PasswordEdit->setEchoMode(QLineEdit::Password); 243 PasswordEdit->setEchoMode(QLineEdit::Password);
244 tabLayout_3->addMultiCellWidget( PasswordEdit, 1, 1, 2, 3 ); 244 tabLayout_3->addMultiCellWidget( PasswordEdit, 1, 1, 2, 3 );
245 245
246 connect( PasswordEdit,SIGNAL(textChanged(const QString&)),this, 246 connect( PasswordEdit,SIGNAL(textChanged(const QString&)),this,
247 SLOT( PasswordEditEdited(const QString&) )); 247 SLOT( PasswordEditEdited(const QString&) ));
248 248
249//PasswordEdit->setFixedWidth(85); 249//PasswordEdit->setFixedWidth(85);
250 TextLabel3 = new QLabel( tab_3, "TextLabel3" ); 250 TextLabel3 = new QLabel( tab_3, "TextLabel3" );
251 TextLabel3->setText( tr( "Remote server" ) ); 251 TextLabel3->setText( tr( "Remote server" ) );
252 tabLayout_3->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 ); 252 tabLayout_3->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 );
253 253
254 ServerComboBox = new QComboBox( FALSE, tab_3, "ServerComboBox" ); 254 ServerComboBox = new QComboBox( FALSE, tab_3, "ServerComboBox" );
255 ServerComboBox->setEditable(TRUE); 255 ServerComboBox->setEditable(TRUE);
256 tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 ); 256 tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 );
257 257
258 connect(ServerComboBox,SIGNAL(activated(int)),this,SLOT(serverComboSelected(int) )); 258 connect(ServerComboBox,SIGNAL(activated(int)),this,SLOT(serverComboSelected(int) ));
259 connect(ServerComboBox,SIGNAL(textChanged(const QString&)),this, 259 connect(ServerComboBox,SIGNAL(textChanged(const QString&)),this,
260 SLOT(serverComboEdited(const QString&) )); 260 SLOT(serverComboEdited(const QString&) ));
261 261
262 QLabel *TextLabel5 = new QLabel( tab_3, "TextLabel5" ); 262 QLabel *TextLabel5 = new QLabel( tab_3, "TextLabel5" );
263 TextLabel5->setText( tr( "Remote path" ) ); 263 TextLabel5->setText( tr( "Remote path" ) );
264 tabLayout_3->addMultiCellWidget( TextLabel5, 2, 2, 2, 3 ); 264 tabLayout_3->addMultiCellWidget( TextLabel5, 2, 2, 2, 3 );
265 265
266 266
267 remotePath = new QLineEdit( "/", tab_3, "remotePath" ); 267 remotePath = new QLineEdit( "/", tab_3, "remotePath" );
268 tabLayout_3->addMultiCellWidget( remotePath, 3, 3, 2, 3 ); 268 tabLayout_3->addMultiCellWidget( remotePath, 3, 3, 2, 3 );
269 TextLabel4 = new QLabel( tab_3, "TextLabel4" ); 269 TextLabel4 = new QLabel( tab_3, "TextLabel4" );
270 TextLabel4->setText( tr( "Port" ) ); 270 TextLabel4->setText( tr( "Port" ) );
271 tabLayout_3->addMultiCellWidget( TextLabel4, 4, 4, 0, 1 ); 271 tabLayout_3->addMultiCellWidget( TextLabel4, 4, 4, 0, 1 );
272 272
273 PortSpinBox = new QSpinBox( tab_3, "PortSpinBox" ); 273 PortSpinBox = new QSpinBox( tab_3, "PortSpinBox" );
274 PortSpinBox->setButtonSymbols( QSpinBox::UpDownArrows ); 274 PortSpinBox->setButtonSymbols( QSpinBox::UpDownArrows );
275 PortSpinBox->setMaxValue(32786); 275 PortSpinBox->setMaxValue(32786);
276 tabLayout_3->addMultiCellWidget( PortSpinBox, 4, 4, 1, 1); 276 tabLayout_3->addMultiCellWidget( PortSpinBox, 4, 4, 1, 1);
277 277
278 serverListView = new QListBox( tab_3, "ServerListView" ); 278 serverListView = new QListBox( tab_3, "ServerListView" );
279 tabLayout_3->addMultiCellWidget( serverListView , 5, 5, 0, 5); 279 tabLayout_3->addMultiCellWidget( serverListView , 5, 5, 0, 5);
280 280
281 connect( serverListView, SIGNAL( highlighted(const QString&)), 281 connect( serverListView, SIGNAL( highlighted(const QString&)),
282 this,SLOT( serverListClicked(const QString&) ) ); 282 this,SLOT( serverListClicked(const QString&) ) );
283 283
284 connectServerBtn = new QPushButton( tr("Connect"), tab_3 , "ConnectButton" ); 284 connectServerBtn = new QPushButton( tr("Connect"), tab_3 , "ConnectButton" );
285 tabLayout_3->addMultiCellWidget( connectServerBtn, 6, 6, 0, 1); 285 tabLayout_3->addMultiCellWidget( connectServerBtn, 6, 6, 0, 1);
286 connectServerBtn->setToggleButton(TRUE); 286 connectServerBtn->setToggleButton(TRUE);
287 connect(connectServerBtn,SIGNAL( toggled(bool)),SLOT( connectorBtnToggled(bool) )); 287 connect(connectServerBtn,SIGNAL( toggled(bool)),SLOT( connectorBtnToggled(bool) ));
288 288
289 newServerButton= new QPushButton( tr("Add"), tab_3 , "NewServerButton" ); 289 newServerButton= new QPushButton( tr("Add"), tab_3 , "NewServerButton" );
290 tabLayout_3->addMultiCellWidget( newServerButton, 6, 6, 2, 2); 290 tabLayout_3->addMultiCellWidget( newServerButton, 6, 6, 2, 2);
291 connect( newServerButton,SIGNAL( clicked()),SLOT( NewServer() )); 291 connect( newServerButton,SIGNAL( clicked()),SLOT( NewServer() ));
292 292
293 QPushButton *deleteServerBtn; 293 QPushButton *deleteServerBtn;
294 deleteServerBtn = new QPushButton( tr("Delete"), tab_3 , "OpenButton" ); 294 deleteServerBtn = new QPushButton( tr("Delete"), tab_3 , "OpenButton" );
295 tabLayout_3->addMultiCellWidget( deleteServerBtn, 6, 6, 3, 3); 295 tabLayout_3->addMultiCellWidget( deleteServerBtn, 6, 6, 3, 3);
296 296
297 connect(deleteServerBtn,SIGNAL(clicked()),SLOT(deleteServer())); 297 connect(deleteServerBtn,SIGNAL(clicked()),SLOT(deleteServer()));
298 298
299 299
300 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); 300 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
301 tabLayout_3->addItem( spacer, 5, 0 ); 301 tabLayout_3->addItem( spacer, 5, 0 );
302 302
303 TabWidget->insertTab( tab_3, tr( "Config" ) ); 303 TabWidget->insertTab( tab_3, tr( "Config" ) );
304 304
305#if 0 305#if 0
306 connect(TabWidget,SIGNAL(currentChanged(QWidget*)), 306 connect(TabWidget,SIGNAL(currentChanged(QWidget*)),
307 this,SLOT(tabChanged(QWidget*))); 307 this,SLOT(tabChanged(QWidget*)));
308#endif 308#endif
309 309
310 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 310 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
311 currentDir.setPath( QDir::currentDirPath()); 311 currentDir.setPath( QDir::currentDirPath());
312// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); 312// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst);
313 313
314 currentPathCombo = new QComboBox( FALSE, view, "currentPathCombo" ); 314 currentPathCombo = new QComboBox( FALSE, view, "currentPathCombo" );
315 layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 4); 315 layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 4);
316 currentPathCombo ->setFixedWidth(220); 316 currentPathCombo ->setFixedWidth(220);
317 currentPathCombo->setEditable(TRUE); 317 currentPathCombo->setEditable(TRUE);
318 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); 318 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
319 319
320#if 0 320#if 0
321 connect( currentPathCombo, SIGNAL( activated(const QString&) ), 321 connect( currentPathCombo, SIGNAL( activated(const QString&) ),
322 this, SLOT( currentPathComboActivated(const QString&) ) ); 322 this, SLOT( currentPathComboActivated(const QString&) ) );
323 323
324 connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), 324 connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()),
325 this,SLOT(currentPathComboChanged())); 325 this,SLOT(currentPathComboChanged()));
326#endif 326#endif
327 ProgressBar = new QProgressBar( view, "ProgressBar" ); 327 ProgressBar = new QProgressBar( view, "ProgressBar" );
328 layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4); 328 layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4);
329 ProgressBar->setMaximumHeight(10); 329 ProgressBar->setMaximumHeight(10);
330 filterStr="*"; 330 filterStr="*";
331 b=FALSE; 331 b=FALSE;
332#if 0 332#if 0
333 populateLocalView(); 333 populateLocalView();
334#endif 334#endif
335 readConfig(); 335 readConfig();
336 336
337// ServerComboBox->setCurrentItem(currentServerConfig); 337// ServerComboBox->setCurrentItem(currentServerConfig);
338 338
339 TabWidget->setCurrentPage(2); 339 TabWidget->setCurrentPage(2);
340 odebug << "Constructor done" << oendl; 340 odebug << "Constructor done" << oendl;
341} 341}
342 342
343OpieFtp::~OpieFtp() 343OpieFtp::~OpieFtp()
344{ 344{
345} 345}
346 346
347void OpieFtp::cleanUp() 347void OpieFtp::cleanUp()
348{ 348{
349 if(conn) 349 if(conn)
350 FtpQuit(conn); 350 FtpQuit(conn);
351 QString sfile=QDir::homeDirPath(); 351 QString sfile=QDir::homeDirPath();
352 if(sfile.right(1) != "/") 352 if(sfile.right(1) != "/")
353 sfile+="/._temp"; 353 sfile+="/._temp";
354 else 354 else
355 sfile+="._temp"; 355 sfile+="._temp";
356 QFile file( sfile); 356 QFile file( sfile);
357 if(file.exists()) 357 if(file.exists())
358 file.remove(); 358 file.remove();
359 Config cfg("opieftp"); 359 Config cfg("opieftp");
360 cfg.setGroup("Server"); 360 cfg.setGroup("Server");
361 cfg.writeEntry("currentServer", currentServerConfig); 361 cfg.writeEntry("currentServer", currentServerConfig);
362 362
363 exit(0); 363 exit(0);
364} 364}
365 365
366void OpieFtp::tabChanged(QWidget *) 366void OpieFtp::tabChanged(QWidget *)
367{ 367{
368 if (TabWidget->currentPageIndex() == 0) { 368 if (TabWidget->currentPageIndex() == 0) {
369 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); 369 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
370 tabMenu->setItemChecked(tabMenu->idAt(0),TRUE); 370 tabMenu->setItemChecked(tabMenu->idAt(0),TRUE);
371 tabMenu->setItemChecked(tabMenu->idAt(1),FALSE); 371 tabMenu->setItemChecked(tabMenu->idAt(1),FALSE);
372 tabMenu->setItemChecked(tabMenu->idAt(2),FALSE); 372 tabMenu->setItemChecked(tabMenu->idAt(2),FALSE);
373 if(cdUpButton->isHidden()) 373 if(cdUpButton->isHidden())
374 cdUpButton->show(); 374 cdUpButton->show();
375 if(homeButton->isHidden()) 375 if(homeButton->isHidden())
376 homeButton->show(); 376 homeButton->show();
377 377
378 } 378 }
379 if (TabWidget->currentPageIndex() == 1) { 379 if (TabWidget->currentPageIndex() == 1) {
380 currentPathCombo->lineEdit()->setText( currentRemoteDir ); 380 currentPathCombo->lineEdit()->setText( currentRemoteDir );
381 tabMenu->setItemChecked(tabMenu->idAt(1),TRUE); 381 tabMenu->setItemChecked(tabMenu->idAt(1),TRUE);
382 tabMenu->setItemChecked(tabMenu->idAt(0),FALSE); 382 tabMenu->setItemChecked(tabMenu->idAt(0),FALSE);
383 tabMenu->setItemChecked(tabMenu->idAt(2),FALSE); 383 tabMenu->setItemChecked(tabMenu->idAt(2),FALSE);
384 if(cdUpButton->isHidden()) 384 if(cdUpButton->isHidden())
385 cdUpButton->show(); 385 cdUpButton->show();
386 homeButton->hide(); 386 homeButton->hide();
387 387
388 } 388 }
389 if (TabWidget->currentPageIndex() == 2) { 389 if (TabWidget->currentPageIndex() == 2) {
390 tabMenu->setItemChecked(tabMenu->idAt(2),TRUE); 390 tabMenu->setItemChecked(tabMenu->idAt(2),TRUE);
391 tabMenu->setItemChecked(tabMenu->idAt(0),FALSE); 391 tabMenu->setItemChecked(tabMenu->idAt(0),FALSE);
392 tabMenu->setItemChecked(tabMenu->idAt(1),FALSE); 392 tabMenu->setItemChecked(tabMenu->idAt(1),FALSE);
393 cdUpButton->hide(); 393 cdUpButton->hide();
394 homeButton->hide(); 394 homeButton->hide();
395 } 395 }
396} 396}
397 397
398void OpieFtp::newConnection() 398void OpieFtp::newConnection()
399{ 399{
400 UsernameComboBox->lineEdit()->setText(""); 400 UsernameComboBox->lineEdit()->setText("");
401 PasswordEdit->setText( "" ); 401 PasswordEdit->setText( "" );