summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp5
-rw-r--r--noncore/apps/advancedfm/advancedfm.h1
-rw-r--r--noncore/apps/advancedfm/advancedfmData.cpp6
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp10
4 files changed, 15 insertions, 7 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 7fba0af..d7bad51 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -1,37 +1,36 @@
1/*************************************************************************** 1/***************************************************************************
2 AdvancedFm.cpp 2 AdvancedFm.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
14#include "advancedfm.h" 13#include "advancedfm.h"
15 14
16// #include <opie/ofileselector.h> 15// #include <opie/ofileselector.h>
17// #include <opie/ofiledialog.h> 16// #include <opie/ofiledialog.h>
18 17
19#include <qpe/filemanager.h> 18#include <qpe/filemanager.h>
20#include <qpe/qcopenvelope_qws.h> 19#include <qpe/qcopenvelope_qws.h>
21#include <qpe/qpemenubar.h> 20#include <qpe/qpemenubar.h>
22#include <qpe/qpetoolbar.h> 21#include <qpe/qpetoolbar.h>
23#include <qpe/qpeapplication.h> 22#include <qpe/qpeapplication.h>
24#include <qpe/qcopenvelope_qws.h> 23#include <qpe/qcopenvelope_qws.h>
25#include <qpe/config.h> 24#include <qpe/config.h>
26#include <qpe/mimetype.h> 25#include <qpe/mimetype.h>
27#include <qpe/applnk.h> 26#include <qpe/applnk.h>
28#include <qpe/ir.h> 27#include <qpe/ir.h>
29#include <qpe/resource.h> 28#include <qpe/resource.h>
30 29
31#include <qtabwidget.h> 30#include <qtabwidget.h>
32#include <qtextstream.h> 31#include <qtextstream.h>
33#include <qpushbutton.h> 32#include <qpushbutton.h>
34#include <qdatetime.h> 33#include <qdatetime.h>
35#include <qdir.h> 34#include <qdir.h>
36#include <qfile.h> 35#include <qfile.h>
37#include <qstring.h> 36#include <qstring.h>
@@ -374,61 +373,61 @@ void AdvancedFm::remoteListClicked(QListViewItem *selectedItem) {
374 populateRemoteView(); 373 populateRemoteView();
375 Remote_View->ensureItemVisible(Remote_View->firstChild()); 374 Remote_View->ensureItemVisible(Remote_View->firstChild());
376 } 375 }
377 } else { 376 } else {
378 strItem=QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+strItem); 377 strItem=QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+strItem);
379 if( QFile::exists(strItem ) ) { 378 if( QFile::exists(strItem ) ) {
380 // qDebug("clicked item "+strItem); 379 // qDebug("clicked item "+strItem);
381 // DocLnk doc( strItem, FALSE ); 380 // DocLnk doc( strItem, FALSE );
382 // doc.execute(); 381 // doc.execute();
383 // Remote_View->clearSelection(); 382 // Remote_View->clearSelection();
384 } 383 }
385 } //end not symlink 384 } //end not symlink
386 chdir(strItem.latin1()); 385 chdir(strItem.latin1());
387 } 386 }
388 } 387 }
389} 388}
390 389
391 390
392void AdvancedFm::localListPressed( int mouse, QListViewItem *, const QPoint& , int ) { 391void AdvancedFm::localListPressed( int mouse, QListViewItem *, const QPoint& , int ) {
393// qDebug("list pressed"); 392// qDebug("list pressed");
394 switch (mouse) { 393 switch (mouse) {
395 case 1: 394 case 1:
396 break; 395 break;
397 case 2: 396 case 2:
398 menuTimer.start( 750, TRUE ); 397 menuTimer.start( 500, TRUE );
399 qDebug("Start menu timer\n"); 398 qDebug("Start menu timer\n");
400 break; 399 break;
401 }; 400 };
402} 401}
403 402
404void AdvancedFm::remoteListPressed( int mouse, QListViewItem*, const QPoint&, int ) { 403void AdvancedFm::remoteListPressed( int mouse, QListViewItem*, const QPoint&, int ) {
405 404
406 switch (mouse) { 405 switch (mouse) {
407 case 1: 406 case 1:
408 break; 407 break;
409 case 2: 408 case 2:
410 menuTimer.start( 750, TRUE ); 409 menuTimer.start( 500, TRUE );
411 qDebug("Start menu timer"); 410 qDebug("Start menu timer");
412 break; 411 break;
413 }; 412 };
414} 413}
415 414
416 415
417void AdvancedFm::switchToLocalTab() { 416void AdvancedFm::switchToLocalTab() {
418 TabWidget->setCurrentPage(0); 417 TabWidget->setCurrentPage(0);
419 Local_View->setFocus(); 418 Local_View->setFocus();
420} 419}
421 420
422void AdvancedFm::switchToRemoteTab() { 421void AdvancedFm::switchToRemoteTab() {
423 TabWidget->setCurrentPage(1); 422 TabWidget->setCurrentPage(1);
424 Remote_View->setFocus(); 423 Remote_View->setFocus();
425} 424}
426 425
427void AdvancedFm::readConfig() { 426void AdvancedFm::readConfig() {
428 Config cfg("AdvancedFm"); 427 Config cfg("AdvancedFm");
429} 428}
430 429
431void AdvancedFm::writeConfig() { 430void AdvancedFm::writeConfig() {
432 Config cfg("AdvancedFm"); 431 Config cfg("AdvancedFm");
433} 432}
434 433
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index 12ad474..f846c66 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -1,38 +1,39 @@
1/*************************************************************************** 1/***************************************************************************
2 advancedfm.h 2 advancedfm.h
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#ifndef ADVANCEDFM_H 12#ifndef ADVANCEDFM_H
13#define ADVANCEDFM_H 13#define ADVANCEDFM_H
14#define QTOPIA_INTERNAL_FSLP // to get access to fileproperties 14#define QTOPIA_INTERNAL_FSLP // to get access to fileproperties
15#define QT_QWS_OPIE
15 16
16#include <qpe/ir.h> 17#include <qpe/ir.h>
17 18
18#include <qvariant.h> 19#include <qvariant.h>
19#include <qdialog.h> 20#include <qdialog.h>
20#include <qmainwindow.h> 21#include <qmainwindow.h>
21#include <qstringlist.h> 22#include <qstringlist.h>
22#include <qdir.h> 23#include <qdir.h>
23#include <qstring.h> 24#include <qstring.h>
24#include <qpoint.h> 25#include <qpoint.h>
25#include <qtimer.h> 26#include <qtimer.h>
26 27
27class QVBoxLayout; 28class QVBoxLayout;
28class QHBoxLayout; 29class QHBoxLayout;
29class QGridLayout; 30class QGridLayout;
30class QComboBox; 31class QComboBox;
31class QListView; 32class QListView;
32class QListviewItem; 33class QListviewItem;
33class QLabel; 34class QLabel;
34class QProgressBar; 35class QProgressBar;
35class QSpinBox; 36class QSpinBox;
36class QTabWidget; 37class QTabWidget;
37class QWidget; 38class QWidget;
38class QPEToolBar; 39class QPEToolBar;
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp
index 4c24e83..619a7a9 100644
--- a/noncore/apps/advancedfm/advancedfmData.cpp
+++ b/noncore/apps/advancedfm/advancedfmData.cpp
@@ -9,50 +9,52 @@
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#include "advancedfm.h" 12#include "advancedfm.h"
13 13
14#include <qpe/qpeapplication.h> 14#include <qpe/qpeapplication.h>
15#include <qpe/qpemenubar.h> 15#include <qpe/qpemenubar.h>
16#include <qpe/qpetoolbar.h> 16#include <qpe/qpetoolbar.h>
17#include <qpe/resource.h> 17#include <qpe/resource.h>
18 18
19#include <qlayout.h> 19#include <qlayout.h>
20#include <qpixmap.h> 20#include <qpixmap.h>
21#include <qcombobox.h> 21#include <qcombobox.h>
22#include <qpopupmenu.h> 22#include <qpopupmenu.h>
23#include <qtabwidget.h> 23#include <qtabwidget.h>
24#include <qtoolbutton.h> 24#include <qtoolbutton.h>
25#include <qtabwidget.h> 25#include <qtabwidget.h>
26#include <qlineedit.h> 26#include <qlineedit.h>
27#include <qlistview.h> 27#include <qlistview.h>
28 28
29#include <sys/utsname.h> 29#include <sys/utsname.h>
30 30
31 31
32void AdvancedFm::init() { 32void AdvancedFm::init() {
33 33#if defined(QT_QWS_OPIE)
34 setCaption( tr( "AdvancedFm" ) ); 34 qDebug("<<<<<<<<<<<<<<<<<<<<<<<< OPIE!!!");
35#endif
36 setCaption( tr( "AdvancedFm" ) );
35 37
36 QGridLayout *layout = new QGridLayout( this ); 38 QGridLayout *layout = new QGridLayout( this );
37 layout->setSpacing( 2); 39 layout->setSpacing( 2);
38 layout->setMargin( 2); 40 layout->setMargin( 2);
39 41
40 42
41 QPEMenuBar *menuBar = new QPEMenuBar(this); 43 QPEMenuBar *menuBar = new QPEMenuBar(this);
42 fileMenu = new QPopupMenu( this ); 44 fileMenu = new QPopupMenu( this );
43 viewMenu = new QPopupMenu( this ); 45 viewMenu = new QPopupMenu( this );
44 46
45 layout->addMultiCellWidget( menuBar, 0, 0, 0, 1 ); 47 layout->addMultiCellWidget( menuBar, 0, 0, 0, 1 );
46 48
47 menuBar->insertItem( tr( "File" ), fileMenu); 49 menuBar->insertItem( tr( "File" ), fileMenu);
48 menuBar->insertItem( tr( "View" ), viewMenu); 50 menuBar->insertItem( tr( "View" ), viewMenu);
49 51
50 qpeDirButton= new QToolButton(this,"QPEButton"); 52 qpeDirButton= new QToolButton(this,"QPEButton");
51 qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton"); 53 qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton");
52 qpeDirButton ->setFixedSize( QSize( 20, 20 ) ); 54 qpeDirButton ->setFixedSize( QSize( 20, 20 ) );
53 layout->addMultiCellWidget( qpeDirButton , 0, 0, 2, 2); 55 layout->addMultiCellWidget( qpeDirButton , 0, 0, 2, 2);
54 56
55 cfButton = new QToolButton( this,"CFButton"); 57 cfButton = new QToolButton( this,"CFButton");
56 cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia")); 58 cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia"));
57 cfButton ->setFixedSize( QSize( 20, 20 ) ); 59 cfButton ->setFixedSize( QSize( 20, 20 ) );
58 layout->addMultiCellWidget( cfButton , 0, 0, 3, 3); 60 layout->addMultiCellWidget( cfButton , 0, 0, 3, 3);
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 7ee5065..6d37904 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -322,63 +322,69 @@ void AdvancedFm::filePerms() {
322 QString filePath; 322 QString filePath;
323 323
324 if (TabWidget->currentPageIndex() == 0) { 324 if (TabWidget->currentPageIndex() == 0) {
325 filePath = currentDir.canonicalPath()+"/"; 325 filePath = currentDir.canonicalPath()+"/";
326 } else { 326 } else {
327 filePath= currentRemoteDir.canonicalPath()+"/"; 327 filePath= currentRemoteDir.canonicalPath()+"/";
328 } 328 }
329 329
330 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 330 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
331 filePermissions *filePerm; 331 filePermissions *filePerm;
332 filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)(filePath+*it)); 332 filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)(filePath+*it));
333 filePerm->showMaximized(); 333 filePerm->showMaximized();
334 filePerm->exec(); 334 filePerm->exec();
335 if( filePerm) 335 if( filePerm)
336 delete filePerm; 336 delete filePerm;
337 } 337 }
338 if (TabWidget->currentPageIndex() == 0) { 338 if (TabWidget->currentPageIndex() == 0) {
339 populateLocalView(); 339 populateLocalView();
340 } else { 340 } else {
341 populateRemoteView(); 341 populateRemoteView();
342 } 342 }
343} 343}
344 344
345void AdvancedFm::doProperties() { 345void AdvancedFm::doProperties() {
346#if defined(QT_QWS_OPIE)
347
346 QStringList curFileList = getPath(); 348 QStringList curFileList = getPath();
349
347 QString filePath; 350 QString filePath;
348 if (TabWidget->currentPageIndex() == 0) { 351 if (TabWidget->currentPageIndex() == 0) {
349 filePath = currentDir.canonicalPath()+"/"; 352 filePath = currentDir.canonicalPath()+"/";
350 } else { 353 } else {
351 filePath= currentRemoteDir.canonicalPath()+"/"; 354 filePath= currentRemoteDir.canonicalPath()+"/";
352 } 355 }
353 // qDebug("%d",curFileList.count()); 356 qDebug("%d",curFileList.count());
354 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 357
358 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
355 qDebug((filePath+*it)); 359 qDebug((filePath+*it));
356 DocLnk lnk( (filePath+*it)); 360 DocLnk lnk( (filePath+*it));
357 LnkProperties prop( &lnk ); 361 LnkProperties prop( &lnk );
358 prop.showMaximized(); 362 prop.showMaximized();
359 prop.exec(); 363 prop.exec();
360 } 364 }
365#endif
366
361} 367}
362 368
363void AdvancedFm::upDir() { 369void AdvancedFm::upDir() {
364 if (TabWidget->currentPageIndex() == 0) { 370 if (TabWidget->currentPageIndex() == 0) {
365 QString current = currentDir.canonicalPath(); 371 QString current = currentDir.canonicalPath();
366 QDir dir(current); 372 QDir dir(current);
367 dir.cdUp(); 373 dir.cdUp();
368 current = dir.canonicalPath(); 374 current = dir.canonicalPath();
369 chdir( current.latin1() ); 375 chdir( current.latin1() );
370 currentDir.cd( current, TRUE); 376 currentDir.cd( current, TRUE);
371 populateLocalView(); 377 populateLocalView();
372 update(); 378 update();
373 } else { 379 } else {
374 QString current = currentRemoteDir.canonicalPath(); 380 QString current = currentRemoteDir.canonicalPath();
375 QDir dir(current); 381 QDir dir(current);
376 dir.cdUp(); 382 dir.cdUp();
377 current = dir.canonicalPath(); 383 current = dir.canonicalPath();
378 chdir( current.latin1() ); 384 chdir( current.latin1() );
379 currentRemoteDir.cd( current, TRUE); 385 currentRemoteDir.cd( current, TRUE);
380 populateRemoteView(); 386 populateRemoteView();
381 update(); 387 update();
382 } 388 }
383} 389}
384 390