summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm/advancedfmMenu.cpp
Unidiff
Diffstat (limited to 'noncore/apps/advancedfm/advancedfmMenu.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 9e740d0..a694b70 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -23,24 +23,26 @@
23#include <qpopupmenu.h> 23#include <qpopupmenu.h>
24#include <qlistview.h> 24#include <qlistview.h>
25 25
26#include <errno.h> 26#include <errno.h>
27#include <stdlib.h> 27#include <stdlib.h>
28#include <unistd.h> 28#include <unistd.h>
29#include <sys/stat.h> 29#include <sys/stat.h>
30#include <dirent.h> 30#include <dirent.h>
31#include <sys/sendfile.h> 31#include <sys/sendfile.h>
32#include <fcntl.h> 32#include <fcntl.h>
33 33
34 34
35using namespace Opie::Core;
36using namespace Opie::Core;
35void AdvancedFm::doDirChange() { 37void AdvancedFm::doDirChange() {
36 QString pathItem = CurrentView()->currentItem()->text(0); 38 QString pathItem = CurrentView()->currentItem()->text(0);
37 if( pathItem == "../") { 39 if( pathItem == "../") {
38 ListClicked( CurrentView()->currentItem()); 40 ListClicked( CurrentView()->currentItem());
39 } else { 41 } else {
40 if( pathItem.find(" -> ",0,TRUE) != -1) 42 if( pathItem.find(" -> ",0,TRUE) != -1)
41 pathItem = dealWithSymName((const QString&)pathItem)+"/"; 43 pathItem = dealWithSymName((const QString&)pathItem)+"/";
42// qWarning(pathItem); 44// qWarning(pathItem);
43 gotoDirectory( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) ); 45 gotoDirectory( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) );
44 } 46 }
45} 47}
46 48
@@ -693,28 +695,28 @@ void AdvancedFm::fileBeamFinished( Ir *) {
693} 695}
694 696
695void AdvancedFm::selectAll() { 697void AdvancedFm::selectAll() {
696 QListView *thisView = CurrentView(); 698 QListView *thisView = CurrentView();
697 thisView->selectAll(true); 699 thisView->selectAll(true);
698 thisView->setSelected( thisView->firstChild(),false); 700 thisView->setSelected( thisView->firstChild(),false);
699} 701}
700 702
701void AdvancedFm::startProcess(const QString & cmd) { 703void AdvancedFm::startProcess(const QString & cmd) {
702 QStringList command; 704 QStringList command;
703 OProcess *process; 705 OProcess *process;
704 process = new OProcess(); 706 process = new OProcess();
705 connect(process, SIGNAL(processExited(OProcess*)), 707 connect(process, SIGNAL(processExited(Opie::Core::OProcess*)),
706 this, SLOT( processEnded(OProcess*))); 708 this, SLOT( processEnded(OProcess*)));
707 709
708 connect(process, SIGNAL( receivedStderr(OProcess*,char*,int)), 710 connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)),
709 this, SLOT( oprocessStderr(OProcess*,char*,int))); 711 this, SLOT( oprocessStderr(OProcess*,char*,int)));
710 712
711 command << "/bin/sh"; 713 command << "/bin/sh";
712 command << "-c"; 714 command << "-c";
713 command << cmd.latin1(); 715 command << cmd.latin1();
714 *process << command; 716 *process << command;
715 if(!process->start(OProcess::NotifyOnExit, OProcess::All) ) 717 if(!process->start(OProcess::NotifyOnExit, OProcess::All) )
716 qDebug("could not start process"); 718 qDebug("could not start process");
717} 719}
718 720
719void AdvancedFm::processEnded(OProcess *) { 721void AdvancedFm::processEnded(OProcess *) {
720 rePopulate(); 722 rePopulate();