summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 4289fcf..5f47b9b 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -163,98 +163,98 @@ AdvancedFm::AdvancedFm( )
163 163
164 TabWidget->insertTab( tab, tr("1")); 164 TabWidget->insertTab( tab, tr("1"));
165 165
166 tab_2 = new QWidget( TabWidget, "tab_2" ); 166 tab_2 = new QWidget( TabWidget, "tab_2" );
167 tabLayout_2 = new QGridLayout( tab_2 ); 167 tabLayout_2 = new QGridLayout( tab_2 );
168 tabLayout_2->setSpacing( 2); 168 tabLayout_2->setSpacing( 2);
169 tabLayout_2->setMargin( 2); 169 tabLayout_2->setMargin( 2);
170 170
171 Remote_View = new QListView( tab_2, "Remote_View" ); 171 Remote_View = new QListView( tab_2, "Remote_View" );
172 Remote_View->addColumn( tr("File"),130); 172 Remote_View->addColumn( tr("File"),130);
173 Remote_View->addColumn( tr("Size"),-1); 173 Remote_View->addColumn( tr("Size"),-1);
174 Remote_View->setColumnAlignment(1,QListView::AlignRight); 174 Remote_View->setColumnAlignment(1,QListView::AlignRight);
175 Remote_View->addColumn( tr("Date"),-1); 175 Remote_View->addColumn( tr("Date"),-1);
176 Remote_View->setColumnAlignment(2,QListView::AlignRight); 176 Remote_View->setColumnAlignment(2,QListView::AlignRight);
177 Remote_View->setAllColumnsShowFocus(TRUE); 177 Remote_View->setAllColumnsShowFocus(TRUE);
178// Remote_View->setMultiSelection( TRUE ); 178// Remote_View->setMultiSelection( TRUE );
179// Remote_View->setSelectionMode(QListView::Extended); 179// Remote_View->setSelectionMode(QListView::Extended);
180 QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); 180 QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold);
181 181
182 connect( Remote_View, SIGNAL( clicked( QListViewItem*)), 182 connect( Remote_View, SIGNAL( clicked( QListViewItem*)),
183 this,SLOT( remoteListClicked(QListViewItem *)) ); 183 this,SLOT( remoteListClicked(QListViewItem *)) );
184 connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), 184 connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
185 this,SLOT( remoteListPressed(int, QListViewItem *, const QPoint&, int)) ); 185 this,SLOT( remoteListPressed(int, QListViewItem *, const QPoint&, int)) );
186 186
187 tabLayout_2->addWidget( Remote_View, 0, 0 ); 187 tabLayout_2->addWidget( Remote_View, 0, 0 );
188 188
189 TabWidget->insertTab( tab_2, tr( "2")); 189 TabWidget->insertTab( tab_2, tr( "2"));
190 190
191 connect(TabWidget,SIGNAL(currentChanged(QWidget *)), 191 connect(TabWidget,SIGNAL(currentChanged(QWidget *)),
192 this,SLOT(tabChanged(QWidget*))); 192 this,SLOT(tabChanged(QWidget*)));
193 193
194// tab_3 = new QWidget( TabWidget, "tab_3" ); 194// tab_3 = new QWidget( TabWidget, "tab_3" );
195// tabLayout_3 = new QGridLayout( tab_3 ); 195// tabLayout_3 = new QGridLayout( tab_3 );
196// tabLayout_3->setSpacing( 2); 196// tabLayout_3->setSpacing( 2);
197// tabLayout_3->setMargin( 2); 197// tabLayout_3->setMargin( 2);
198 198
199// OFileSelector *fileSelector; 199// OFileSelector *fileSelector;
200// fileSelector = new OFileSelector(tab_3,0,0,"/","","*"); 200// fileSelector = new OFileSelector(tab_3,0,0,"/","","*");
201// tabLayout_3->addMultiCellWidget( fileSelector, 0, 0, 0, 3 ); 201// tabLayout_3->addMultiCellWidget( fileSelector, 0, 0, 0, 3 );
202 202
203// TabWidget->insertTab( tab_3, tr( "Files" ) ); 203// TabWidget->insertTab( tab_3, tr( "Files" ) );
204 204
205 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 205 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
206 currentDir.setPath( QDir::currentDirPath()); 206 currentDir.setPath( QDir::currentDirPath());
207 207
208 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 208 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
209 currentRemoteDir.setPath( QDir::currentDirPath()); 209 currentRemoteDir.setPath( QDir::currentDirPath());
210 210
211b = TRUE; 211 b = TRUE;
212 currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); 212 currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" );
213 currentPathCombo->setEditable(TRUE); 213 currentPathCombo->setEditable(TRUE);
214 layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 6); 214 layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 6);
215 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); 215 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
216 216
217 connect( currentPathCombo, SIGNAL( activated( const QString & ) ), 217 connect( currentPathCombo, SIGNAL( activated( const QString & ) ),
218 this, SLOT( currentPathComboActivated( const QString & ) ) ); 218 this, SLOT( currentPathComboActivated( const QString & ) ) );
219 219
220 connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), 220 connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()),
221 this,SLOT(currentPathComboChanged())); 221 this,SLOT(currentPathComboChanged()));
222 222
223 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); 223 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
224 224
225 layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 6); 225 layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 6);
226 226
227 filterStr="*"; 227 filterStr="*";
228 b=FALSE; 228 b=FALSE;
229 populateLocalView(); 229 populateLocalView();
230 populateRemoteView(); 230 populateRemoteView();
231} 231}
232 232
233AdvancedFm::~AdvancedFm() 233AdvancedFm::~AdvancedFm()
234{ 234{
235} 235}
236 236
237void AdvancedFm::cleanUp() 237void AdvancedFm::cleanUp()
238{ 238{
239 QString sfile=QDir::homeDirPath(); 239 QString sfile=QDir::homeDirPath();
240 if(sfile.right(1) != "/") 240 if(sfile.right(1) != "/")
241 sfile+="/._temp"; 241 sfile+="/._temp";
242 else 242 else
243 sfile+="._temp"; 243 sfile+="._temp";
244 QFile file( sfile); 244 QFile file( sfile);
245 if(file.exists()) 245 if(file.exists())
246 file.remove(); 246 file.remove();
247} 247}
248 248
249void AdvancedFm::tabChanged(QWidget *w) 249void AdvancedFm::tabChanged(QWidget *w)
250{ 250{
251 if (TabWidget->currentPageIndex() == 0) { 251 if (TabWidget->currentPageIndex() == 0) {
252 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); 252 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
253 viewMenu->setItemChecked(viewMenu->idAt(0),TRUE); 253 viewMenu->setItemChecked(viewMenu->idAt(0),TRUE);
254 viewMenu->setItemChecked(viewMenu->idAt(1),FALSE); 254 viewMenu->setItemChecked(viewMenu->idAt(1),FALSE);
255 } 255 }
256 if (TabWidget->currentPageIndex() == 1) { 256 if (TabWidget->currentPageIndex() == 1) {
257 currentPathCombo->lineEdit()->setText( currentRemoteDir.canonicalPath()); 257 currentPathCombo->lineEdit()->setText( currentRemoteDir.canonicalPath());
258 viewMenu->setItemChecked(viewMenu->idAt(1),TRUE); 258 viewMenu->setItemChecked(viewMenu->idAt(1),TRUE);
259 viewMenu->setItemChecked(viewMenu->idAt(0),FALSE); 259 viewMenu->setItemChecked(viewMenu->idAt(0),FALSE);
260 } 260 }
@@ -517,211 +517,211 @@ void AdvancedFm::remoteListClicked(QListViewItem *selectedItem)
517 if(selectedItem) { 517 if(selectedItem) {
518 QString strItem=selectedItem->text(0); 518 QString strItem=selectedItem->text(0);
519 QString strSize=selectedItem->text(1); 519 QString strSize=selectedItem->text(1);
520 strSize=strSize.stripWhiteSpace(); 520 strSize=strSize.stripWhiteSpace();
521 if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink 521 if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink
522 // is symlink 522 // is symlink
523 QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); 523 QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4);
524 if(QDir(strItem2).exists() ) { 524 if(QDir(strItem2).exists() ) {
525 currentRemoteDir.cd(strItem2, TRUE); 525 currentRemoteDir.cd(strItem2, TRUE);
526 populateRemoteView(); 526 populateRemoteView();
527 } 527 }
528 } else { // not a symlink 528 } else { // not a symlink
529 if(strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) { 529 if(strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) {
530 if(QDir(QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+strItem)).exists() ) { 530 if(QDir(QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+strItem)).exists() ) {
531 strItem=QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+strItem); 531 strItem=QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+strItem);
532 currentRemoteDir.cd(strItem,FALSE); 532 currentRemoteDir.cd(strItem,FALSE);
533 populateRemoteView(); 533 populateRemoteView();
534 } else { 534 } else {
535 currentRemoteDir.cdUp(); 535 currentRemoteDir.cdUp();
536 populateRemoteView(); 536 populateRemoteView();
537 } 537 }
538 if(QDir(strItem).exists()){ 538 if(QDir(strItem).exists()){
539 currentRemoteDir.cd(strItem, TRUE); 539 currentRemoteDir.cd(strItem, TRUE);
540 populateRemoteView(); 540 populateRemoteView();
541 } 541 }
542 } else { 542 } else {
543 strItem=QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+strItem); 543 strItem=QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+strItem);
544 if( QFile::exists(strItem ) ) { 544 if( QFile::exists(strItem ) ) {
545// qDebug("upload "+strItem); 545// qDebug("upload "+strItem);
546 } 546 }
547 } //end not symlink 547 } //end not symlink
548 chdir(strItem.latin1()); 548 chdir(strItem.latin1());
549 } 549 }
550 } 550 }
551} 551}
552 552
553void AdvancedFm::doLocalCd() 553void AdvancedFm::doLocalCd()
554{ 554{
555 localListClicked( Local_View->currentItem()); 555 localListClicked( Local_View->currentItem());
556} 556}
557 557
558void AdvancedFm::doRemoteCd() 558void AdvancedFm::doRemoteCd()
559{ 559{
560 localListClicked( Remote_View->currentItem()); 560 localListClicked( Remote_View->currentItem());
561} 561}
562 562
563void AdvancedFm::showHidden() 563void AdvancedFm::showHidden()
564{ 564{
565 if (!b) { 565 if (b) {
566 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 566 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
567// localMenu->setItemChecked(localMenu->idAt(0),TRUE); 567// localMenu->setItemChecked(localMenu->idAt(0),TRUE);
568// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); 568// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst);
569 b=TRUE; 569 b=TRUE;
570 570
571 } else { 571 } else {
572 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 572 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
573// localMenu->setItemChecked(localMenu->idAt(0),FALSE); 573// localMenu->setItemChecked(localMenu->idAt(0),FALSE);
574// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); 574// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst);
575 b=FALSE; 575 b=FALSE;
576 } 576 }
577 populateLocalView(); 577 populateLocalView();
578} 578}
579 579
580void AdvancedFm::showRemoteHidden() 580void AdvancedFm::showRemoteHidden()
581{ 581{
582 if (!b) { 582 if (b) {
583 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 583 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
584// viewMenu->setItemChecked(localMenu->idAt(0),TRUE); 584// viewMenu->setItemChecked(localMenu->idAt(0),TRUE);
585// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); 585// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst);
586 b=TRUE; 586 b=TRUE;
587 587
588 } else { 588 } else {
589 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 589 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
590// localMenu->setItemChecked(localMenu->idAt(0),FALSE); 590// localMenu->setItemChecked(localMenu->idAt(0),FALSE);
591// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); 591// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst);
592 b=FALSE; 592 b=FALSE;
593 } 593 }
594 populateRemoteView(); 594 populateRemoteView();
595} 595}
596 596
597void AdvancedFm::localListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) 597void AdvancedFm::localListPressed( int mouse, QListViewItem *item, const QPoint &point, int i)
598{ 598{
599 switch (mouse) { 599 switch (mouse) {
600 case 1: 600 case 1:
601 break; 601 break;
602 case 2: 602 case 2:
603 showLocalMenu(item); 603 showLocalMenu(item);
604 Local_View->clearSelection(); 604 Local_View->clearSelection();
605 break; 605 break;
606 }; 606 };
607} 607}
608 608
609void AdvancedFm::remoteListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) 609void AdvancedFm::remoteListPressed( int mouse, QListViewItem *item, const QPoint &point, int i)
610{ 610{
611 switch (mouse) { 611 switch (mouse) {
612 case 1: 612 case 1:
613 break; 613 break;
614 case 2: 614 case 2:
615 showRemoteMenu(item); 615 showRemoteMenu(item);
616 Remote_View->clearSelection(); 616 Remote_View->clearSelection();
617 break; 617 break;
618 }; 618 };
619} 619}
620 620
621void AdvancedFm::showLocalMenu(QListViewItem * item) 621void AdvancedFm::showLocalMenu(QListViewItem * item)
622{ 622{
623 if(item) { 623 if(item) {
624 QPopupMenu m; 624 QPopupMenu m;
625 m.insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); 625 m.insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
626 m.insertSeparator(); 626 m.insertSeparator();
627 if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) !=-1) 627 if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) !=-1)
628 m.insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); 628 m.insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() ));
629 else 629 else
630 m.insertItem( tr( "Open" ), this, SLOT( runThis() )); 630 m.insertItem( tr( "Open" ), this, SLOT( runThis() ));
631 m.insertItem( tr( "Open as Text" ), this, SLOT( runText() )); 631 m.insertItem( tr( "Open as Text" ), this, SLOT( runText() ));
632 m.insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); 632 m.insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
633 m.insertItem( tr( "Rename" ), this, SLOT( localRename() )); 633 m.insertItem( tr( "Rename" ), this, SLOT( localRename() ));
634 m.insertItem( tr( "Copy" ), this, SLOT( copy() )); 634 m.insertItem( tr( "Copy" ), this, SLOT( copy() ));
635 m.insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); 635 m.insertItem( tr( "Copy As" ), this, SLOT( copyAs() ));
636 m.insertItem( tr( "Move" ), this, SLOT( move() )); 636 m.insertItem( tr( "Move" ), this, SLOT( move() ));
637 m.insertSeparator(); 637 m.insertSeparator();
638 m.insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); 638 m.insertItem( tr( "Run Command" ), this, SLOT( runCommand() ));
639 m.insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); 639 m.insertItem( tr( "File Info" ), this, SLOT( fileStatus() ));
640 m.insertSeparator(); 640 m.insertSeparator();
641 m.insertItem( tr( "Delete" ), this, SLOT( localDelete() )); 641 m.insertItem( tr( "Delete" ), this, SLOT( localDelete() ));
642 m.insertSeparator(); 642 m.insertSeparator();
643 m.insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); 643 m.insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() ));
644 m.insertItem( tr( "Properties" ), this, SLOT( doProperties() )); 644 m.insertItem( tr( "Properties" ), this, SLOT( doProperties() ));
645 m.setCheckable(TRUE); 645 m.setCheckable(TRUE);
646 if (b) 646 if (!b)
647 m.setItemChecked(m.idAt(0),TRUE); 647 m.setItemChecked(m.idAt(0),TRUE);
648 else 648 else
649 m.setItemChecked(m.idAt(0),FALSE); 649 m.setItemChecked(m.idAt(0),FALSE);
650 m.exec( QCursor::pos() ); 650 m.exec( QCursor::pos() );
651 } 651 }
652} 652}
653 653
654void AdvancedFm::showRemoteMenu(QListViewItem * item) 654void AdvancedFm::showRemoteMenu(QListViewItem * item)
655{ 655{
656 if(item) { 656 if(item) {
657 QPopupMenu m; 657 QPopupMenu m;
658 m.insertItem( tr( "Show Hidden Files" ), this, SLOT( showRemoteHidden() )); 658 m.insertItem( tr( "Show Hidden Files" ), this, SLOT( showRemoteHidden() ));
659 m.insertSeparator(); 659 m.insertSeparator();
660 if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) !=-1) 660 if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) !=-1)
661 m.insertItem( tr( "Change Directory" ), this, SLOT( doRemoteCd() )); 661 m.insertItem( tr( "Change Directory" ), this, SLOT( doRemoteCd() ));
662 else 662 else
663 m.insertItem( tr( "Open" ), this, SLOT( runThis() )); 663 m.insertItem( tr( "Open" ), this, SLOT( runThis() ));
664 m.insertItem( tr( "Open as Text" ), this, SLOT( runText() )); 664 m.insertItem( tr( "Open as Text" ), this, SLOT( runText() ));
665 m.insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); 665 m.insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() ));
666 m.insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); 666 m.insertItem( tr( "Rename" ), this, SLOT( remoteRename() ));
667 m.insertItem( tr( "Copy" ), this, SLOT( copy() )); 667 m.insertItem( tr( "Copy" ), this, SLOT( copy() ));
668 m.insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); 668 m.insertItem( tr( "Copy As" ), this, SLOT( copyAs() ));
669 m.insertItem( tr( "Move" ), this, SLOT( move() )); 669 m.insertItem( tr( "Move" ), this, SLOT( move() ));
670 m.insertSeparator(); 670 m.insertSeparator();
671 m.insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); 671 m.insertItem( tr( "Run Command" ), this, SLOT( runCommand() ));
672 m.insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); 672 m.insertItem( tr( "File Info" ), this, SLOT( fileStatus() ));
673 m.insertSeparator(); 673 m.insertSeparator();
674 m.insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); 674 m.insertItem( tr( "Delete" ), this, SLOT( remoteDelete() ));
675 m.insertSeparator(); 675 m.insertSeparator();
676 m.insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); 676 m.insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() ));
677 m.insertItem( tr( "Properties" ), this, SLOT( doProperties() )); 677 m.insertItem( tr( "Properties" ), this, SLOT( doProperties() ));
678 m.setCheckable(TRUE); 678 m.setCheckable(TRUE);
679 if (b) 679 if (!b)
680 m.setItemChecked(m.idAt(0),TRUE); 680 m.setItemChecked(m.idAt(0),TRUE);
681 else 681 else
682 m.setItemChecked(m.idAt(0),FALSE); 682 m.setItemChecked(m.idAt(0),FALSE);
683 m.exec( QCursor::pos() ); 683 m.exec( QCursor::pos() );
684 } 684 }
685} 685}
686 686
687void AdvancedFm::runThis() { 687void AdvancedFm::runThis() {
688// QFileInfo *fi; 688// QFileInfo *fi;
689 if (TabWidget->currentPageIndex() == 0) { 689 if (TabWidget->currentPageIndex() == 0) {
690 QString curFile = Local_View->currentItem()->text(0); 690 QString curFile = Local_View->currentItem()->text(0);
691 curFile = currentDir.canonicalPath()+"/"+curFile; 691 curFile = currentDir.canonicalPath()+"/"+curFile;
692 DocLnk nf(curFile); 692 DocLnk nf(curFile);
693 QString execStr = nf.exec(); 693 QString execStr = nf.exec();
694 qDebug( execStr); 694 qDebug( execStr);
695 if( execStr.isEmpty() ) { 695 if( execStr.isEmpty() ) {
696 } else { 696 } else {
697 nf.execute(); 697 nf.execute();
698 } 698 }
699// MimeType mt( curFile); 699// MimeType mt( curFile);
700 } else { 700 } else {
701 QString curFile = Remote_View->currentItem()->text(0); 701 QString curFile = Remote_View->currentItem()->text(0);
702 curFile = currentRemoteDir.canonicalPath()+"/"+curFile; 702 curFile = currentRemoteDir.canonicalPath()+"/"+curFile;
703 DocLnk nf(curFile); 703 DocLnk nf(curFile);
704 QString execStr = nf.exec(); 704 QString execStr = nf.exec();
705 qDebug(execStr); 705 qDebug(execStr);
706 if( execStr.isEmpty() ) { 706 if( execStr.isEmpty() ) {
707 } else { 707 } else {
708 nf.execute(); 708 nf.execute();
709 } 709 }
710// MimeType mt( curFile); 710// MimeType mt( curFile);
711 } 711 }
712} 712}
713 713
714void AdvancedFm::runText() { 714void AdvancedFm::runText() {
715 if (TabWidget->currentPageIndex() == 0) { 715 if (TabWidget->currentPageIndex() == 0) {
716 QString curFile = Local_View->currentItem()->text(0); 716 QString curFile = Local_View->currentItem()->text(0);
717 curFile = currentDir.canonicalPath()+"/"+curFile; 717 curFile = currentDir.canonicalPath()+"/"+curFile;
718 QCopEnvelope e("QPE/Application/textedit", "setDocument(QString)" ); 718 QCopEnvelope e("QPE/Application/textedit", "setDocument(QString)" );
719 e << curFile; 719 e << curFile;
720 } else { 720 } else {
721 QString curFile = Remote_View->currentItem()->text(0); 721 QString curFile = Remote_View->currentItem()->text(0);
722 curFile = currentRemoteDir.canonicalPath()+"/"+curFile; 722 curFile = currentRemoteDir.canonicalPath()+"/"+curFile;
723 DocLnk nf(curFile); 723 DocLnk nf(curFile);
724 QCopEnvelope e("QPE/Application/textedit", "setDocument(QString)" ); 724 QCopEnvelope e("QPE/Application/textedit", "setDocument(QString)" );
725 e << curFile; 725 e << curFile;
726 } 726 }
727} 727}