summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-06-05 00:54:49 (UTC)
committer llornkcor <llornkcor>2002-06-05 00:54:49 (UTC)
commit74b847188b101e34f9e36aa1323c77fa917f580a (patch) (side-by-side diff)
tree35deac521ad103a4a256e098030333a736c924a5
parentae8f8f544ddb0bf598cd709176f533e5a1a913c5 (diff)
downloadopie-74b847188b101e34f9e36aa1323c77fa917f580a.zip
opie-74b847188b101e34f9e36aa1323c77fa917f580a.tar.gz
opie-74b847188b101e34f9e36aa1323c77fa917f580a.tar.bz2
fixed bug with keyboard cmmds interfere with typing into the combo box, use new OPIEDIR icon, fixed bug with ftp tab not showing ;)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp137
-rw-r--r--noncore/apps/advancedfm/advancedfm.pro2
2 files changed, 84 insertions, 55 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index a000e9b..ebd7fc3 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -19,2 +19,6 @@
+#include <opie/ofileselector.h>
+#include <opie/ofiledialog.h>
+
+
#include <qpe/lnkproperties.h>
@@ -91,3 +95,3 @@ AdvancedFm::AdvancedFm( )
- qpeDirButton= new QPushButton(Resource::loadIconSet("go"),"",this,"QPEButton");
+ qpeDirButton= new QPushButton(Resource::loadIconSet("launcher/opielogo16x16"),"",this,"QPEButton");
qpeDirButton ->setFixedSize( QSize( 20, 20 ) );
@@ -193,2 +197,3 @@ AdvancedFm::AdvancedFm( )
this,SLOT( localListPressed(int, QListViewItem *, const QPoint&, int)) );
+
connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) );
@@ -218,3 +223,3 @@ AdvancedFm::AdvancedFm( )
this,SLOT( remoteListPressed(int, QListViewItem *, const QPoint&, int)) );
- connect( Remote_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) );
+// connect( Remote_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) );
@@ -227,13 +232,26 @@ AdvancedFm::AdvancedFm( )
-// tab_3 = new QWidget( TabWidget, "tab_3" );
-// tabLayout_3 = new QGridLayout( tab_3 );
-// tabLayout_3->setSpacing( 2);
-// tabLayout_3->setMargin( 2);
+ tab_3 = new QWidget( TabWidget, "tab_3" );
+ tabLayout_3 = new QGridLayout( tab_3 );
+ tabLayout_3->setSpacing( 2);
+ tabLayout_3->setMargin( 2);
+
+
+// OFileDialog fileDialog;
+// fileDialog;
+// fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy
+// fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow");
+// OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/");
-// OFileSelector *fileSelector;
-// fileSelector = new OFileSelector(tab_3,0,0,"/","","*");
-// tabLayout_3->addMultiCellWidget( fileSelector, 0, 0, 0, 3 );
+QListView *fileTree;
+ fileTree = new QListView( tab_3, "tree" );
-// TabWidget->insertTab( tab_3, tr( "Files" ) );
+
+ tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 );
+ TabWidget->insertTab( tab_3, tr( "Remote" ) );
+///////////////
+
+////////////////////
+
+
currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
@@ -253,2 +271,3 @@ AdvancedFm::AdvancedFm( )
populateRemoteView();
+ currentPathCombo->setFocus();
}
@@ -549,5 +568,5 @@ void AdvancedFm::localListClicked(QListViewItem *selectedItem)
if( QFile::exists(strItem ) ) {
- qDebug("clicked item "+strItem);
- DocLnk doc( strItem, FALSE );
- doc.execute();
+// qDebug("clicked item "+strItem);
+// DocLnk doc( strItem, FALSE );
+// doc.execute();
// Local_View->clearSelection();
@@ -590,5 +609,5 @@ void AdvancedFm::remoteListClicked(QListViewItem *selectedItem)
if( QFile::exists(strItem ) ) {
- qDebug("clicked item "+strItem);
- DocLnk doc( strItem, FALSE );
- doc.execute();
+// qDebug("clicked item "+strItem);
+// DocLnk doc( strItem, FALSE );
+// doc.execute();
// Remote_View->clearSelection();
@@ -650,3 +669,4 @@ void AdvancedFm::localListPressed( int mouse, QListViewItem *item, const QPoint
{
- switch (mouse) {
+qDebug("list pressed");
+ switch (mouse) {
case 1:
@@ -654,3 +674,4 @@ void AdvancedFm::localListPressed( int mouse, QListViewItem *item, const QPoint
case 2:
- menuTimer.start( 500, TRUE );
+ menuTimer.start( 750, TRUE );
+ qDebug("Start menu timer\n");
break;
@@ -662,3 +683,3 @@ void AdvancedFm::remoteListPressed( int mouse, QListViewItem *item, const QPoint
- switch (mouse) {
+ switch (mouse) {
case 1:
@@ -666,3 +687,4 @@ void AdvancedFm::remoteListPressed( int mouse, QListViewItem *item, const QPoint
case 2:
- menuTimer.start( 500, TRUE );
+ menuTimer.start( 750, TRUE );
+ qDebug("Start menu timer");
break;
@@ -1463,2 +1485,3 @@ void AdvancedFm::keyReleaseEvent( QKeyEvent *e)
{
+ if( TabWidget->hasFocus())
switch ( e->key() ) {
@@ -1670,2 +1693,3 @@ void AdvancedFm::fileBeamFinished( Ir *ir) {
void AdvancedFm::showFileMenu() {
+
QString curApp;
@@ -1683,7 +1707,9 @@ void AdvancedFm::showFileMenu() {
- QPopupMenu m;
- m.insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
- m.insertSeparator();
+// QPopupMenu m;
+ QPopupMenu *m = new QPopupMenu(0);
+
+ m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
+ m->insertSeparator();
if ( QFileInfo(fi).isDir() ) {
- m.insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() ));
+ m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() ));
} else {
@@ -1691,9 +1717,9 @@ void AdvancedFm::showFileMenu() {
if ( app )
- m.insertItem( app->pixmap(), tr( "Open in " + app->name() ), this, SLOT( runThis() ) );
+ m->insertItem( app->pixmap(), tr( "Open in " + app->name() ), this, SLOT( runThis() ) );
else if( QFileInfo(fi).isExecutable() )
- m.insertItem( tr( "Execute" ), this, SLOT( runThis() ) );
+ m->insertItem( tr( "Execute" ), this, SLOT( runThis() ) );
- m.insertItem( /*Resource::loadPixmap( "txt" ),*/ tr( "Open as text" ),this, SLOT( runText() ) );
+ m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) );
}
- m.insertSeparator();
+ m->insertSeparator();
@@ -1701,45 +1727,47 @@ void AdvancedFm::showFileMenu() {
if(isLocalView)
- m.insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
+ m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
else
- m.insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() ));
+ m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() ));
- m.insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() ));
- m.insertSeparator();
+ m->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() ));
+ m->insertSeparator();
if(isLocalView)
- m.insertItem( tr( "Rename" ), this, SLOT( localRename() ));
+ m->insertItem( tr( "Rename" ), this, SLOT( localRename() ));
else
- m.insertItem( tr( "Rename" ), this, SLOT( remoteRename() ));
+ m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() ));
- m.insertItem( tr( "Copy" ), this, SLOT( copy() ));
- m.insertItem( tr( "Copy As" ), this, SLOT( copyAs() ));
- m.insertItem( tr( "Move" ), this, SLOT( move() ));
- m.insertSeparator();
+ m->insertItem( tr( "Copy" ), this, SLOT( copy() ));
+ m->insertItem( tr( "Copy As" ), this, SLOT( copyAs() ));
+ m->insertItem( tr( "Move" ), this, SLOT( move() ));
+ m->insertSeparator();
if(isLocalView)
- m.insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() ));
+ m->insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() ));
else
- m.insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() ));
+ m->insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() ));
- m.insertItem( tr( "Run Command" ), this, SLOT( runCommand() ));
- m.insertItem( tr( "File Info" ), this, SLOT( fileStatus() ));
- m.insertSeparator();
+ m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() ));
+ m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() ));
+ m->insertSeparator();
if(isLocalView)
- m.insertItem( tr( "Delete" ), this, SLOT( localDelete() ));
+ m->insertItem( tr( "Delete" ), this, SLOT( localDelete() ));
else
- m.insertItem( tr( "Delete" ), this, SLOT( remoteDelete() ));
+ m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() ));
- m.insertSeparator();
- m.insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() ));
+ m->insertSeparator();
+ m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() ));
if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings
- m.insertItem( tr( "Properties" ), this, SLOT( doProperties() ));
- m.setCheckable(TRUE);
+ m->insertItem( tr( "Properties" ), this, SLOT( doProperties() ));
+ m->setCheckable(TRUE);
if (!b)
- m.setItemChecked(m.idAt(0),TRUE);
+ m->setItemChecked(m->idAt(0),TRUE);
else
- m.setItemChecked(m.idAt(0),FALSE);
+ m->setItemChecked(m->idAt(0),FALSE);
if(Ir::supported())
- m.insertItem( tr( "Beam File" ), this, SLOT( doBeam() ));
- m.exec( QCursor::pos() );
+ m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() ));
+ m->setFocus();
+ m->exec( QCursor::pos() );
+ if(m) delete m;
}
@@ -1749,3 +1777,4 @@ void AdvancedFm::cancelMenuTimer()
{
-qDebug("cancel menu timer");
+
+ qDebug("selectionChanged: cancel menu timer");
if( menuTimer.isActive() )
diff --git a/noncore/apps/advancedfm/advancedfm.pro b/noncore/apps/advancedfm/advancedfm.pro
index 25fb782..299f870 100644
--- a/noncore/apps/advancedfm/advancedfm.pro
+++ b/noncore/apps/advancedfm/advancedfm.pro
@@ -9,3 +9,3 @@ DEPENDPATH += $(OPIEDIR)/include
DESTDIR = $(OPIEDIR)/bin
-LIBS += -lqpe
+LIBS += -lqpe -lopie