author | llornkcor <llornkcor> | 2004-09-25 06:21:43 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-09-25 06:21:43 (UTC) |
commit | 448e2835ff7b84162022b62f8570935739a167bb (patch) (unidiff) | |
tree | 57cbbc4e2a6a87119df7240a346b256314e99910 | |
parent | c47a2d0e8ec283737f7c43474be4cf8070cde046 (diff) | |
download | opie-448e2835ff7b84162022b62f8570935739a167bb.zip opie-448e2835ff7b84162022b62f8570935739a167bb.tar.gz opie-448e2835ff7b84162022b62f8570935739a167bb.tar.bz2 |
change message
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 6f017b4..ec7a08a 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -248,101 +248,102 @@ void AdvancedFm::ListClicked(QListViewItem *selectedItem) { | |||
248 | isDirectory = true; | 248 | isDirectory = true; |
249 | } | 249 | } |
250 | 250 | ||
251 | if( isDirectory ) { | 251 | if( isDirectory ) { |
252 | CurrentDir()->cd( strItem, TRUE); | 252 | CurrentDir()->cd( strItem, TRUE); |
253 | populateView(); | 253 | populateView(); |
254 | CurrentView()->ensureItemVisible( CurrentView()->firstChild()); | 254 | CurrentView()->ensureItemVisible( CurrentView()->firstChild()); |
255 | } | 255 | } |
256 | chdir( strItem.latin1()); | 256 | chdir( strItem.latin1()); |
257 | } | 257 | } |
258 | } | 258 | } |
259 | 259 | ||
260 | void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , int ) { | 260 | void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , int ) { |
261 | Q_UNUSED(item); | 261 | Q_UNUSED(item); |
262 | switch (mouse) { | 262 | switch (mouse) { |
263 | case 1: | 263 | case 1: |
264 | { | 264 | { |
265 | if(renameBox != 0 ) { | 265 | if(renameBox != 0 ) { |
266 | cancelRename(); | 266 | cancelRename(); |
267 | } | 267 | } |
268 | } | 268 | } |
269 | break; | 269 | break; |
270 | // case 2: | 270 | // case 2: |
271 | // menuTimer.start( 50, TRUE ); | 271 | // menuTimer.start( 50, TRUE ); |
272 | // break; | 272 | // break; |
273 | }; | 273 | }; |
274 | } | 274 | } |
275 | 275 | ||
276 | 276 | ||
277 | void AdvancedFm::refreshCurrentTab() { | 277 | void AdvancedFm::refreshCurrentTab() { |
278 | populateView(); | 278 | populateView(); |
279 | // if ( TabWidget->currentWidget() == tab) { | 279 | // if ( TabWidget->currentWidget() == tab) { |
280 | 280 | ||
281 | } | 281 | } |
282 | 282 | ||
283 | void AdvancedFm::switchToLocalTab() { | 283 | void AdvancedFm::switchToLocalTab() { |
284 | TabWidget->setCurrentWidget(0); | 284 | TabWidget->setCurrentWidget(0); |
285 | // Local_View->setFocus(); | 285 | // Local_View->setFocus(); |
286 | whichTab = 1; | 286 | whichTab = 1; |
287 | } | 287 | } |
288 | 288 | ||
289 | void AdvancedFm::switchToRemoteTab() { | 289 | void AdvancedFm::switchToRemoteTab() { |
290 | TabWidget->setCurrentWidget(1); | 290 | TabWidget->setCurrentWidget(1); |
291 | // Remote_View->setFocus(); | 291 | // Remote_View->setFocus(); |
292 | whichTab = 2; | 292 | whichTab = 2; |
293 | } | 293 | } |
294 | 294 | ||
295 | void AdvancedFm::currentPathComboChanged() { | 295 | void AdvancedFm::currentPathComboChanged() { |
296 | if(QDir( currentPathCombo->lineEdit()->text()).exists()) { | 296 | QString pDir = currentPathCombo->lineEdit()->text(); |
297 | CurrentDir()->setPath( currentPathCombo->lineEdit()->text() ); | 297 | if(QDir(pDir).exists()) { |
298 | CurrentDir()->setPath(pDir ); | ||
298 | populateView(); | 299 | populateView(); |
299 | } else { | 300 | } else { |
300 | QMessageBox::message(tr("Note"),tr("<p>That directory does not exist</p>")); | 301 | QMessageBox::message(tr("Note"),tr("<p>%1 does not exist</p>").arg(pDir)); |
301 | } | 302 | } |
302 | } | 303 | } |
303 | 304 | ||
304 | void AdvancedFm::fillCombo(const QString ¤tPath) { | 305 | void AdvancedFm::fillCombo(const QString ¤tPath) { |
305 | 306 | ||
306 | if ( TabWidget->currentWidget() == tab) { | 307 | if ( TabWidget->currentWidget() == tab) { |
307 | // if ( whichTab == 1) { | 308 | // if ( whichTab == 1) { |
308 | currentPathCombo->lineEdit()->setText( currentPath); | 309 | currentPathCombo->lineEdit()->setText( currentPath); |
309 | if( localDirPathStringList.grep( currentPath,TRUE).isEmpty() ) { | 310 | if( localDirPathStringList.grep( currentPath,TRUE).isEmpty() ) { |
310 | currentPathCombo->clear(); | 311 | currentPathCombo->clear(); |
311 | localDirPathStringList.prepend( currentPath ); | 312 | localDirPathStringList.prepend( currentPath ); |
312 | currentPathCombo->insertStringList( localDirPathStringList,-1); | 313 | currentPathCombo->insertStringList( localDirPathStringList,-1); |
313 | } | 314 | } |
314 | } else { | 315 | } else { |
315 | currentPathCombo->lineEdit()->setText( currentPath); | 316 | currentPathCombo->lineEdit()->setText( currentPath); |
316 | if( remoteDirPathStringList.grep( currentPath,TRUE).isEmpty() ) { | 317 | if( remoteDirPathStringList.grep( currentPath,TRUE).isEmpty() ) { |
317 | currentPathCombo->clear(); | 318 | currentPathCombo->clear(); |
318 | remoteDirPathStringList.prepend( currentPath ); | 319 | remoteDirPathStringList.prepend( currentPath ); |
319 | currentPathCombo->insertStringList( remoteDirPathStringList,-1); | 320 | currentPathCombo->insertStringList( remoteDirPathStringList,-1); |
320 | } | 321 | } |
321 | } | 322 | } |
322 | } | 323 | } |
323 | 324 | ||
324 | QStringList AdvancedFm::getPath() { | 325 | QStringList AdvancedFm::getPath() { |
325 | QStringList strList; | 326 | QStringList strList; |
326 | QListView *thisView=CurrentView(); | 327 | QListView *thisView=CurrentView(); |
327 | QList<QListViewItem> * getSelectedItems( QListView * thisView ); | 328 | QList<QListViewItem> * getSelectedItems( QListView * thisView ); |
328 | QListViewItemIterator it( thisView ); | 329 | QListViewItemIterator it( thisView ); |
329 | for ( ; it.current(); ++it ) { | 330 | for ( ; it.current(); ++it ) { |
330 | if ( it.current()->isSelected() ) { | 331 | if ( it.current()->isSelected() ) { |
331 | strList << it.current()->text(0); | 332 | strList << it.current()->text(0); |
332 | // odebug << it.current()->text(0) << oendl; | 333 | // odebug << it.current()->text(0) << oendl; |
333 | } | 334 | } |
334 | } | 335 | } |
335 | return strList; | 336 | return strList; |
336 | } | 337 | } |
337 | 338 | ||
338 | void AdvancedFm::changeTo(const QString dir) { | 339 | void AdvancedFm::changeTo(const QString dir) { |
339 | chdir( dir.latin1()); | 340 | chdir( dir.latin1()); |
340 | CurrentDir()->cd(dir, TRUE); | 341 | CurrentDir()->cd(dir, TRUE); |
341 | populateView(); | 342 | populateView(); |
342 | update(); | 343 | update(); |
343 | } | 344 | } |
344 | 345 | ||
345 | void AdvancedFm::homeButtonPushed() { | 346 | void AdvancedFm::homeButtonPushed() { |
346 | changeTo(QDir::homeDirPath()); | 347 | changeTo(QDir::homeDirPath()); |
347 | } | 348 | } |
348 | 349 | ||