summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-06-05 00:54:49 (UTC)
committer llornkcor <llornkcor>2002-06-05 00:54:49 (UTC)
commit74b847188b101e34f9e36aa1323c77fa917f580a (patch) (unidiff)
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 @@
19 19
20#include <opie/ofileselector.h>
21#include <opie/ofiledialog.h>
22
23
20#include <qpe/lnkproperties.h> 24#include <qpe/lnkproperties.h>
@@ -91,3 +95,3 @@ AdvancedFm::AdvancedFm( )
91 95
92 qpeDirButton= new QPushButton(Resource::loadIconSet("go"),"",this,"QPEButton"); 96 qpeDirButton= new QPushButton(Resource::loadIconSet("launcher/opielogo16x16"),"",this,"QPEButton");
93 qpeDirButton ->setFixedSize( QSize( 20, 20 ) ); 97 qpeDirButton ->setFixedSize( QSize( 20, 20 ) );
@@ -193,2 +197,3 @@ AdvancedFm::AdvancedFm( )
193 this,SLOT( localListPressed(int, QListViewItem *, const QPoint&, int)) ); 197 this,SLOT( localListPressed(int, QListViewItem *, const QPoint&, int)) );
198
194 connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); 199 connect( Local_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) );
@@ -218,3 +223,3 @@ AdvancedFm::AdvancedFm( )
218 this,SLOT( remoteListPressed(int, QListViewItem *, const QPoint&, int)) ); 223 this,SLOT( remoteListPressed(int, QListViewItem *, const QPoint&, int)) );
219 connect( Remote_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); 224// connect( Remote_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) );
220 225
@@ -227,13 +232,26 @@ AdvancedFm::AdvancedFm( )
227 232
228// tab_3 = new QWidget( TabWidget, "tab_3" ); 233 tab_3 = new QWidget( TabWidget, "tab_3" );
229// tabLayout_3 = new QGridLayout( tab_3 ); 234 tabLayout_3 = new QGridLayout( tab_3 );
230// tabLayout_3->setSpacing( 2); 235 tabLayout_3->setSpacing( 2);
231// tabLayout_3->setMargin( 2); 236 tabLayout_3->setMargin( 2);
237
238
239// OFileDialog fileDialog;
240// fileDialog;
241// fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy
242// fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow");
243// OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/");
232 244
233// OFileSelector *fileSelector; 245QListView *fileTree;
234// fileSelector = new OFileSelector(tab_3,0,0,"/","","*"); 246 fileTree = new QListView( tab_3, "tree" );
235// tabLayout_3->addMultiCellWidget( fileSelector, 0, 0, 0, 3 );
236 247
237// TabWidget->insertTab( tab_3, tr( "Files" ) ); 248
249 tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 );
238 250
251 TabWidget->insertTab( tab_3, tr( "Remote" ) );
252///////////////
253
254////////////////////
255
256
239 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 257 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
@@ -253,2 +271,3 @@ AdvancedFm::AdvancedFm( )
253 populateRemoteView(); 271 populateRemoteView();
272 currentPathCombo->setFocus();
254} 273}
@@ -549,5 +568,5 @@ void AdvancedFm::localListClicked(QListViewItem *selectedItem)
549 if( QFile::exists(strItem ) ) { 568 if( QFile::exists(strItem ) ) {
550 qDebug("clicked item "+strItem); 569// qDebug("clicked item "+strItem);
551 DocLnk doc( strItem, FALSE ); 570// DocLnk doc( strItem, FALSE );
552 doc.execute(); 571// doc.execute();
553 // Local_View->clearSelection(); 572 // Local_View->clearSelection();
@@ -590,5 +609,5 @@ void AdvancedFm::remoteListClicked(QListViewItem *selectedItem)
590 if( QFile::exists(strItem ) ) { 609 if( QFile::exists(strItem ) ) {
591 qDebug("clicked item "+strItem); 610// qDebug("clicked item "+strItem);
592 DocLnk doc( strItem, FALSE ); 611// DocLnk doc( strItem, FALSE );
593 doc.execute(); 612// doc.execute();
594 // Remote_View->clearSelection(); 613 // Remote_View->clearSelection();
@@ -650,3 +669,4 @@ void AdvancedFm::localListPressed( int mouse, QListViewItem *item, const QPoint
650{ 669{
651 switch (mouse) { 670qDebug("list pressed");
671 switch (mouse) {
652 case 1: 672 case 1:
@@ -654,3 +674,4 @@ void AdvancedFm::localListPressed( int mouse, QListViewItem *item, const QPoint
654 case 2: 674 case 2:
655 menuTimer.start( 500, TRUE ); 675 menuTimer.start( 750, TRUE );
676 qDebug("Start menu timer\n");
656 break; 677 break;
@@ -662,3 +683,3 @@ void AdvancedFm::remoteListPressed( int mouse, QListViewItem *item, const QPoint
662 683
663 switch (mouse) { 684 switch (mouse) {
664 case 1: 685 case 1:
@@ -666,3 +687,4 @@ void AdvancedFm::remoteListPressed( int mouse, QListViewItem *item, const QPoint
666 case 2: 687 case 2:
667 menuTimer.start( 500, TRUE ); 688 menuTimer.start( 750, TRUE );
689 qDebug("Start menu timer");
668 break; 690 break;
@@ -1463,2 +1485,3 @@ void AdvancedFm::keyReleaseEvent( QKeyEvent *e)
1463{ 1485{
1486 if( TabWidget->hasFocus())
1464 switch ( e->key() ) { 1487 switch ( e->key() ) {
@@ -1670,2 +1693,3 @@ void AdvancedFm::fileBeamFinished( Ir *ir) {
1670void AdvancedFm::showFileMenu() { 1693void AdvancedFm::showFileMenu() {
1694
1671 QString curApp; 1695 QString curApp;
@@ -1683,7 +1707,9 @@ void AdvancedFm::showFileMenu() {
1683 1707
1684 QPopupMenu m; 1708// QPopupMenu m;
1685 m.insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); 1709 QPopupMenu *m = new QPopupMenu(0);
1686 m.insertSeparator(); 1710
1711 m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
1712 m->insertSeparator();
1687 if ( QFileInfo(fi).isDir() ) { 1713 if ( QFileInfo(fi).isDir() ) {
1688 m.insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); 1714 m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() ));
1689 } else { 1715 } else {
@@ -1691,9 +1717,9 @@ void AdvancedFm::showFileMenu() {
1691 if ( app ) 1717 if ( app )
1692 m.insertItem( app->pixmap(), tr( "Open in " + app->name() ), this, SLOT( runThis() ) ); 1718 m->insertItem( app->pixmap(), tr( "Open in " + app->name() ), this, SLOT( runThis() ) );
1693 else if( QFileInfo(fi).isExecutable() ) 1719 else if( QFileInfo(fi).isExecutable() )
1694 m.insertItem( tr( "Execute" ), this, SLOT( runThis() ) ); 1720 m->insertItem( tr( "Execute" ), this, SLOT( runThis() ) );
1695 1721
1696 m.insertItem( /*Resource::loadPixmap( "txt" ),*/ tr( "Open as text" ),this, SLOT( runText() ) ); 1722 m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) );
1697 } 1723 }
1698 m.insertSeparator(); 1724 m->insertSeparator();
1699 1725
@@ -1701,45 +1727,47 @@ void AdvancedFm::showFileMenu() {
1701 if(isLocalView) 1727 if(isLocalView)
1702 m.insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); 1728 m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
1703 else 1729 else
1704 m.insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); 1730 m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() ));
1705 1731
1706 m.insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); 1732 m->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() ));
1707 m.insertSeparator(); 1733 m->insertSeparator();
1708 1734
1709 if(isLocalView) 1735 if(isLocalView)
1710 m.insertItem( tr( "Rename" ), this, SLOT( localRename() )); 1736 m->insertItem( tr( "Rename" ), this, SLOT( localRename() ));
1711 else 1737 else
1712 m.insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); 1738 m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() ));
1713 1739
1714 m.insertItem( tr( "Copy" ), this, SLOT( copy() )); 1740 m->insertItem( tr( "Copy" ), this, SLOT( copy() ));
1715 m.insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); 1741 m->insertItem( tr( "Copy As" ), this, SLOT( copyAs() ));
1716 m.insertItem( tr( "Move" ), this, SLOT( move() )); 1742 m->insertItem( tr( "Move" ), this, SLOT( move() ));
1717 m.insertSeparator(); 1743 m->insertSeparator();
1718 1744
1719 if(isLocalView) 1745 if(isLocalView)
1720 m.insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() )); 1746 m->insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() ));
1721 else 1747 else
1722 m.insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() )); 1748 m->insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() ));
1723 1749
1724 m.insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); 1750 m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() ));
1725 m.insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); 1751 m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() ));
1726 m.insertSeparator(); 1752 m->insertSeparator();
1727 1753
1728 if(isLocalView) 1754 if(isLocalView)
1729 m.insertItem( tr( "Delete" ), this, SLOT( localDelete() )); 1755 m->insertItem( tr( "Delete" ), this, SLOT( localDelete() ));
1730 else 1756 else
1731 m.insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); 1757 m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() ));
1732 1758
1733 m.insertSeparator(); 1759 m->insertSeparator();
1734 m.insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); 1760 m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() ));
1735 if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings 1761 if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings
1736 m.insertItem( tr( "Properties" ), this, SLOT( doProperties() )); 1762 m->insertItem( tr( "Properties" ), this, SLOT( doProperties() ));
1737 m.setCheckable(TRUE); 1763 m->setCheckable(TRUE);
1738 if (!b) 1764 if (!b)
1739 m.setItemChecked(m.idAt(0),TRUE); 1765 m->setItemChecked(m->idAt(0),TRUE);
1740 else 1766 else
1741 m.setItemChecked(m.idAt(0),FALSE); 1767 m->setItemChecked(m->idAt(0),FALSE);
1742 if(Ir::supported()) 1768 if(Ir::supported())
1743 m.insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); 1769 m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() ));
1744 m.exec( QCursor::pos() ); 1770 m->setFocus();
1771 m->exec( QCursor::pos() );
1772 if(m) delete m;
1745} 1773}
@@ -1749,3 +1777,4 @@ void AdvancedFm::cancelMenuTimer()
1749{ 1777{
1750qDebug("cancel menu timer"); 1778
1779 qDebug("selectionChanged: cancel menu timer");
1751 if( menuTimer.isActive() ) 1780 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
9DESTDIR = $(OPIEDIR)/bin 9DESTDIR = $(OPIEDIR)/bin
10LIBS += -lqpe 10LIBS += -lqpe -lopie
11 11