summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-03-21 01:21:14 (UTC)
committer llornkcor <llornkcor>2002-03-21 01:21:14 (UTC)
commit74b4a41d2671bd85a47041f107624d0c61edc346 (patch) (unidiff)
tree12acd8eab279096c9f16b1136a24cf82d8144b70
parent8bfe366ce8667addc539f11fc560250c306340ae (diff)
downloadopie-74b4a41d2671bd85a47041f107624d0c61edc346.zip
opie-74b4a41d2671bd85a47041f107624d0c61edc346.tar.gz
opie-74b4a41d2671bd85a47041f107624d0c61edc346.tar.bz2
changed default values
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index 6e9dc67..82776d0 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -78,236 +78,236 @@ OpieFtp::OpieFtp( )
78 tabMenu = new QPopupMenu( this ); 78 tabMenu = new QPopupMenu( this );
79 79
80 layout->addMultiCellWidget( menuBar, 0, 0, 0, 3 ); 80 layout->addMultiCellWidget( menuBar, 0, 0, 0, 3 );
81 81
82 menuBar->insertItem( tr( "Connection" ), connectionMenu); 82 menuBar->insertItem( tr( "Connection" ), connectionMenu);
83 menuBar->insertItem( tr( "Local" ), localMenu); 83 menuBar->insertItem( tr( "Local" ), localMenu);
84 menuBar->insertItem( tr( "Remote" ), remoteMenu); 84 menuBar->insertItem( tr( "Remote" ), remoteMenu);
85 menuBar->insertItem( tr( "View" ), tabMenu); 85 menuBar->insertItem( tr( "View" ), tabMenu);
86 86
87 connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); 87 connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() ));
88 connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); 88 connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() ));
89 connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() )); 89 connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() ));
90 90
91 localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); 91 localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
92 localMenu->insertSeparator(); 92 localMenu->insertSeparator();
93 localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); 93 localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() ));
94 localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); 94 localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
95 localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() )); 95 localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() ));
96 localMenu->insertSeparator(); 96 localMenu->insertSeparator();
97 localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); 97 localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() ));
98 localMenu->setCheckable(TRUE); 98 localMenu->setCheckable(TRUE);
99 99
100 remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); 100 remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() ));
101 remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); 101 remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() ));
102 remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); 102 remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() ));
103 remoteMenu->insertSeparator(); 103 remoteMenu->insertSeparator();
104 remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); 104 remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() ));
105 105
106 tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); 106 tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() ));
107 tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); 107 tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() ));
108 tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); 108 tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() ));
109 tabMenu->setCheckable(TRUE); 109 tabMenu->setCheckable(TRUE);
110 110
111 TabWidget = new QTabWidget( this, "TabWidget" ); 111 TabWidget = new QTabWidget( this, "TabWidget" );
112 layout->addMultiCellWidget( TabWidget, 1, 1, 0, 3 ); 112 layout->addMultiCellWidget( TabWidget, 1, 1, 0, 3 );
113 113
114 TabWidget->setTabShape(QTabWidget::Triangular); 114 TabWidget->setTabShape(QTabWidget::Triangular);
115 115
116 tab = new QWidget( TabWidget, "tab" ); 116 tab = new QWidget( TabWidget, "tab" );
117 tabLayout = new QGridLayout( tab ); 117 tabLayout = new QGridLayout( tab );
118 tabLayout->setSpacing( 2); 118 tabLayout->setSpacing( 2);
119 tabLayout->setMargin( 2); 119 tabLayout->setMargin( 2);
120 120
121 Local_View = new QListView( tab, "Local_View" ); 121 Local_View = new QListView( tab, "Local_View" );
122// Local_View->setResizePolicy( QListView::AutoOneFit ); 122// Local_View->setResizePolicy( QListView::AutoOneFit );
123 Local_View->addColumn( tr("File"),120); 123 Local_View->addColumn( tr("File"),120);
124 Local_View->addColumn( tr("Size"),-1); 124 Local_View->addColumn( tr("Size"),-1);
125 Local_View->setColumnAlignment(1,QListView::AlignRight); 125 Local_View->setColumnAlignment(1,QListView::AlignRight);
126 Local_View->addColumn( tr("Date"),-1); 126 Local_View->addColumn( tr("Date"),-1);
127 Local_View->setColumnAlignment(2,QListView::AlignRight); 127 Local_View->setColumnAlignment(2,QListView::AlignRight);
128 Local_View->setAllColumnsShowFocus(TRUE); 128 Local_View->setAllColumnsShowFocus(TRUE);
129 QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); 129 QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold);
130 130
131 tabLayout->addWidget( Local_View, 0, 0 ); 131 tabLayout->addWidget( Local_View, 0, 0 );
132 132
133 connect( Local_View, SIGNAL( doubleClicked( QListViewItem*)), 133 connect( Local_View, SIGNAL( doubleClicked( QListViewItem*)),
134 this,SLOT( localListClicked(QListViewItem *)) ); 134 this,SLOT( localListClicked(QListViewItem *)) );
135 connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), 135 connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
136 this,SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) ); 136 this,SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) );
137 137
138 TabWidget->insertTab( tab, tr( "Local" ) ); 138 TabWidget->insertTab( tab, tr( "Local" ) );
139 139
140 tab_2 = new QWidget( TabWidget, "tab_2" ); 140 tab_2 = new QWidget( TabWidget, "tab_2" );
141 tabLayout_2 = new QGridLayout( tab_2 ); 141 tabLayout_2 = new QGridLayout( tab_2 );
142 tabLayout_2->setSpacing( 2); 142 tabLayout_2->setSpacing( 2);
143 tabLayout_2->setMargin( 2); 143 tabLayout_2->setMargin( 2);
144 144
145 Remote_View = new QListView( tab_2, "Remote_View" ); 145 Remote_View = new QListView( tab_2, "Remote_View" );
146 Remote_View->addColumn( tr("File"),120); 146 Remote_View->addColumn( tr("File"),120);
147 Remote_View->addColumn( tr("Size"),-1); 147 Remote_View->addColumn( tr("Size"),-1);
148 Remote_View->setColumnAlignment(1,QListView::AlignRight); 148 Remote_View->setColumnAlignment(1,QListView::AlignRight);
149 Remote_View->addColumn( tr("Date"),-1); 149 Remote_View->addColumn( tr("Date"),-1);
150 Remote_View->setColumnAlignment(2,QListView::AlignRight); 150 Remote_View->setColumnAlignment(2,QListView::AlignRight);
151 Remote_View->setAllColumnsShowFocus(TRUE); 151 Remote_View->setAllColumnsShowFocus(TRUE);
152 QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); 152 QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold);
153 153
154 connect( Remote_View, SIGNAL( doubleClicked( QListViewItem*)), 154 connect( Remote_View, SIGNAL( doubleClicked( QListViewItem*)),
155 this,SLOT( remoteListClicked(QListViewItem *)) ); 155 this,SLOT( remoteListClicked(QListViewItem *)) );
156 connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), 156 connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
157 this,SLOT( RemoteListPressed(int, QListViewItem *, const QPoint&, int)) ); 157 this,SLOT( RemoteListPressed(int, QListViewItem *, const QPoint&, int)) );
158 158
159 tabLayout_2->addWidget( Remote_View, 0, 0 ); 159 tabLayout_2->addWidget( Remote_View, 0, 0 );
160 160
161 TabWidget->insertTab( tab_2, tr( "Remote" ) ); 161 TabWidget->insertTab( tab_2, tr( "Remote" ) );
162 162
163 tab_3 = new QWidget( TabWidget, "tab_3" ); 163 tab_3 = new QWidget( TabWidget, "tab_3" );
164 tabLayout_3 = new QGridLayout( tab_3 ); 164 tabLayout_3 = new QGridLayout( tab_3 );
165 tabLayout_3->setSpacing( 2); 165 tabLayout_3->setSpacing( 2);
166 tabLayout_3->setMargin( 2); 166 tabLayout_3->setMargin( 2);
167 167
168 TextLabel1 = new QLabel( tab_3, "TextLabel1" ); 168 TextLabel1 = new QLabel( tab_3, "TextLabel1" );
169 TextLabel1->setText( tr( "Username" ) ); 169 TextLabel1->setText( tr( "Username" ) );
170 tabLayout_3->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 ); 170 tabLayout_3->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 );
171 171
172 UsernameComboBox = new QComboBox( FALSE, tab_3, "UsernameComboBox" ); 172 UsernameComboBox = new QComboBox( FALSE, tab_3, "UsernameComboBox" );
173 UsernameComboBox->setEditable(TRUE); 173 UsernameComboBox->setEditable(TRUE);
174// UsernameComboBox->lineEdit()->setText("anonymous"); 174 UsernameComboBox->lineEdit()->setText("anonymous");
175 UsernameComboBox->lineEdit()->setText("root"); 175// UsernameComboBox->lineEdit()->setText("root");
176// UsernameComboBox->lineEdit()->setText("llornkcor"); 176// UsernameComboBox->lineEdit()->setText("llornkcor");
177 tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 ); 177 tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 );
178 178
179 TextLabel2 = new QLabel( tab_3, "TextLabel2" ); 179 TextLabel2 = new QLabel( tab_3, "TextLabel2" );
180 TextLabel2->setText( tr( "Password" ) ); 180 TextLabel2->setText( tr( "Password" ) );
181 tabLayout_3->addMultiCellWidget( TextLabel2, 0, 0, 2, 3 ); 181 tabLayout_3->addMultiCellWidget( TextLabel2, 0, 0, 2, 3 );
182 182
183 PasswordEdit = new QLineEdit( "", tab_3, "PasswordComboBox" ); 183 PasswordEdit = new QLineEdit( "", tab_3, "PasswordComboBox" );
184 PasswordEdit->setEchoMode(QLineEdit::Password); 184 PasswordEdit->setEchoMode(QLineEdit::Password);
185// PasswordEdit->setText( tr( "me@opieftp.org" ) ); 185 PasswordEdit->setText( tr( "me@opieftp.org" ) );
186// PasswordEdit->setText( tr( "" ) ); 186// PasswordEdit->setText( tr( "" ) );
187 tabLayout_3->addMultiCellWidget( PasswordEdit, 1, 1, 2, 3 ); 187 tabLayout_3->addMultiCellWidget( PasswordEdit, 1, 1, 2, 3 );
188 188
189 TextLabel3 = new QLabel( tab_3, "TextLabel3" ); 189 TextLabel3 = new QLabel( tab_3, "TextLabel3" );
190 TextLabel3->setText( tr( "Remote server" ) ); 190 TextLabel3->setText( tr( "Remote server" ) );
191 tabLayout_3->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 ); 191 tabLayout_3->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 );
192 192
193 ServerComboBox = new QComboBox( FALSE, tab_3, "ServerComboBox" ); 193 ServerComboBox = new QComboBox( FALSE, tab_3, "ServerComboBox" );
194 ServerComboBox->setEditable(TRUE); 194 ServerComboBox->setEditable(TRUE);
195 ServerComboBox->lineEdit()->setText( tr( "" ) ); 195 ServerComboBox->lineEdit()->setText( tr( "" ) );
196 tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 ); 196 tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 );
197// ServerComboBox->lineEdit()->setText( tr( "llornkcor.com" ) ); 197// ServerComboBox->lineEdit()->setText( tr( "llornkcor.com" ) );
198 ServerComboBox->lineEdit()->setText( tr( "192.168.129.201" ) ); 198// ServerComboBox->lineEdit()->setText( tr( "192.168.129.201" ) );
199 199
200 QLabel *TextLabel5 = new QLabel( tab_3, "TextLabel5" ); 200 QLabel *TextLabel5 = new QLabel( tab_3, "TextLabel5" );
201 TextLabel5->setText( tr( "Remote path" ) ); 201 TextLabel5->setText( tr( "Remote path" ) );
202 tabLayout_3->addMultiCellWidget( TextLabel5, 2, 2, 2, 3 ); 202 tabLayout_3->addMultiCellWidget( TextLabel5, 2, 2, 2, 3 );
203 203
204 remotePath = new QLineEdit( "/", tab_3, "remotePath" ); 204 remotePath = new QLineEdit( "/", tab_3, "remotePath" );
205 remotePath->setText( currentRemoteDir = "/"); 205 remotePath->setText( currentRemoteDir = "/");
206// remotePath->setText( currentRemoteDir = "/home/llornkcor/"); 206// remotePath->setText( currentRemoteDir = "/home/llornkcor/");
207 tabLayout_3->addMultiCellWidget( remotePath, 3, 3, 2, 3 ); 207 tabLayout_3->addMultiCellWidget( remotePath, 3, 3, 2, 3 );
208 208
209 TextLabel4 = new QLabel( tab_3, "TextLabel4" ); 209 TextLabel4 = new QLabel( tab_3, "TextLabel4" );
210 TextLabel4->setText( tr( "Port" ) ); 210 TextLabel4->setText( tr( "Port" ) );
211 tabLayout_3->addMultiCellWidget( TextLabel4, 4, 4, 0, 1 ); 211 tabLayout_3->addMultiCellWidget( TextLabel4, 4, 4, 0, 1 );
212 212
213 PortSpinBox = new QSpinBox( tab_3, "PortSpinBox" ); 213 PortSpinBox = new QSpinBox( tab_3, "PortSpinBox" );
214 PortSpinBox->setButtonSymbols( QSpinBox::UpDownArrows ); 214 PortSpinBox->setButtonSymbols( QSpinBox::UpDownArrows );
215 PortSpinBox->setMaxValue(32786); 215 PortSpinBox->setMaxValue(32786);
216 PortSpinBox->setValue( 4242); 216// PortSpinBox->setValue( 4242);
217// PortSpinBox->setValue( 21); 217 PortSpinBox->setValue( 21);
218 tabLayout_3->addMultiCellWidget( PortSpinBox, 4, 4, 1, 1); 218 tabLayout_3->addMultiCellWidget( PortSpinBox, 4, 4, 1, 1);
219 219
220 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); 220 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
221 tabLayout_3->addItem( spacer, 5, 0 ); 221 tabLayout_3->addItem( spacer, 5, 0 );
222 222
223 TabWidget->insertTab( tab_3, tr( "Config" ) ); 223 TabWidget->insertTab( tab_3, tr( "Config" ) );
224 224
225 connect(TabWidget,SIGNAL(currentChanged(QWidget *)), 225 connect(TabWidget,SIGNAL(currentChanged(QWidget *)),
226 this,SLOT(tabChanged(QWidget*))); 226 this,SLOT(tabChanged(QWidget*)));
227 227
228 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 228 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
229 currentDir.setPath( QDir::currentDirPath()); 229 currentDir.setPath( QDir::currentDirPath());
230// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); 230// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst);
231 currentPathEdit = new QLineEdit( "/", this, "currentPathEdit" ); 231 currentPathEdit = new QLineEdit( "/", this, "currentPathEdit" );
232 layout->addMultiCellWidget( currentPathEdit, 3, 3, 0, 3 ); 232 layout->addMultiCellWidget( currentPathEdit, 3, 3, 0, 3 );
233 233
234 currentPathEdit->setText( currentDir.canonicalPath()); 234 currentPathEdit->setText( currentDir.canonicalPath());
235 connect( currentPathEdit,SIGNAL(returnPressed()),this,SLOT(currentPathEditChanged())); 235 connect( currentPathEdit,SIGNAL(returnPressed()),this,SLOT(currentPathEditChanged()));
236 236
237 ProgressBar = new QProgressBar( this, "ProgressBar" ); 237 ProgressBar = new QProgressBar( this, "ProgressBar" );
238 layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 3 ); 238 layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 3 );
239 239
240 filterStr="*"; 240 filterStr="*";
241 b=FALSE; 241 b=FALSE;
242 populateLocalView(); 242 populateLocalView();
243} 243}
244 244
245OpieFtp::~OpieFtp() 245OpieFtp::~OpieFtp()
246{ 246{
247} 247}
248 248
249void OpieFtp::cleanUp() 249void OpieFtp::cleanUp()
250{ 250{
251 if(conn) 251 if(conn)
252 FtpQuit(conn); 252 FtpQuit(conn);
253 QString sfile=QDir::homeDirPath(); 253 QString sfile=QDir::homeDirPath();
254 if(sfile.right(1) != "/") 254 if(sfile.right(1) != "/")
255 sfile+="/._temp"; 255 sfile+="/._temp";
256 else 256 else
257 sfile+="._temp"; 257 sfile+="._temp";
258 QFile file( sfile); 258 QFile file( sfile);
259 if(file.exists()) 259 if(file.exists())
260 file.remove(); 260 file.remove();
261} 261}
262 262
263void OpieFtp::tabChanged(QWidget *w) 263void OpieFtp::tabChanged(QWidget *w)
264{ 264{
265 if (TabWidget->currentPageIndex() == 0) { 265 if (TabWidget->currentPageIndex() == 0) {
266 currentPathEdit->setText( currentDir.canonicalPath()); 266 currentPathEdit->setText( currentDir.canonicalPath());
267 tabMenu->setItemChecked(tabMenu->idAt(0),TRUE); 267 tabMenu->setItemChecked(tabMenu->idAt(0),TRUE);
268 tabMenu->setItemChecked(tabMenu->idAt(1),FALSE); 268 tabMenu->setItemChecked(tabMenu->idAt(1),FALSE);
269 tabMenu->setItemChecked(tabMenu->idAt(2),FALSE); 269 tabMenu->setItemChecked(tabMenu->idAt(2),FALSE);
270 } 270 }
271 if (TabWidget->currentPageIndex() == 1) { 271 if (TabWidget->currentPageIndex() == 1) {
272 currentPathEdit->setText( currentRemoteDir ); 272 currentPathEdit->setText( currentRemoteDir );
273 tabMenu->setItemChecked(tabMenu->idAt(1),TRUE); 273 tabMenu->setItemChecked(tabMenu->idAt(1),TRUE);
274 tabMenu->setItemChecked(tabMenu->idAt(0),FALSE); 274 tabMenu->setItemChecked(tabMenu->idAt(0),FALSE);
275 tabMenu->setItemChecked(tabMenu->idAt(2),FALSE); 275 tabMenu->setItemChecked(tabMenu->idAt(2),FALSE);
276 } 276 }
277 if (TabWidget->currentPageIndex() == 2) { 277 if (TabWidget->currentPageIndex() == 2) {
278 tabMenu->setItemChecked(tabMenu->idAt(2),TRUE); 278 tabMenu->setItemChecked(tabMenu->idAt(2),TRUE);
279 tabMenu->setItemChecked(tabMenu->idAt(0),FALSE); 279 tabMenu->setItemChecked(tabMenu->idAt(0),FALSE);
280 tabMenu->setItemChecked(tabMenu->idAt(1),FALSE); 280 tabMenu->setItemChecked(tabMenu->idAt(1),FALSE);
281 } 281 }
282} 282}
283 283
284void OpieFtp::localUpload() 284void OpieFtp::localUpload()
285{ 285{
286 int fsz; 286 int fsz;
287 QCopEnvelope ( "QPE/System", "busy()" ); 287 QCopEnvelope ( "QPE/System", "busy()" );
288 qApp->processEvents(); 288 qApp->processEvents();
289 QString strItem = Local_View->currentItem()->text(0); 289 QString strItem = Local_View->currentItem()->text(0);
290 QString localFile = currentDir.canonicalPath()+"/"+strItem; 290 QString localFile = currentDir.canonicalPath()+"/"+strItem;
291 QString remoteFile= currentRemoteDir+strItem; 291 QString remoteFile= currentRemoteDir+strItem;
292 QFileInfo fi(localFile); 292 QFileInfo fi(localFile);
293 if( !fi.isDir()) { 293 if( !fi.isDir()) {
294 fsz=fi.size(); 294 fsz=fi.size();
295 ProgressBar->setTotalSteps(fsz); 295 ProgressBar->setTotalSteps(fsz);
296 296
297 FtpOptions(FTPLIB_CALLBACK, (long) log_progress, conn); 297 FtpOptions(FTPLIB_CALLBACK, (long) log_progress, conn);
298 FtpOptions(FTPLIB_IDLETIME, (long) 1000, conn); 298 FtpOptions(FTPLIB_IDLETIME, (long) 1000, conn);
299 FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn); 299 FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn);
300 FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn); 300 FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn);
301 qDebug("Put: %s, %s",localFile.latin1(),remoteFile.latin1()); 301 qDebug("Put: %s, %s",localFile.latin1(),remoteFile.latin1());
302 302
303 if( !FtpPut( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) { 303 if( !FtpPut( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) {
304 QString msg; 304 QString msg;
305 msg.sprintf(tr("Unable to upload\n")+"%s",FtpLastResponse(conn)); 305 msg.sprintf(tr("Unable to upload\n")+"%s",FtpLastResponse(conn));
306 msg.replace(QRegExp(":"),"\n"); 306 msg.replace(QRegExp(":"),"\n");
307 QMessageBox::message(tr("Note"),msg); 307 QMessageBox::message(tr("Note"),msg);
308// FtpQuit(conn); 308// FtpQuit(conn);
309 } 309 }
310 ProgressBar->reset(); 310 ProgressBar->reset();
311 nullifyCallBack(); 311 nullifyCallBack();
312 } else { 312 } else {
313 QMessageBox::message(tr("Note"),tr("Cannot upload directories")); 313 QMessageBox::message(tr("Note"),tr("Cannot upload directories"));