summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-09-25 05:38:23 (UTC)
committer llornkcor <llornkcor>2004-09-25 05:38:23 (UTC)
commit244945237bc55945ba41f86d5f175204e00592ea (patch) (unidiff)
tree2acd2b87562e887d555913e80a04074092a2215e
parent43ade399621278b78d658f660bde7f0e39457f53 (diff)
downloadopie-244945237bc55945ba41f86d5f175204e00592ea.zip
opie-244945237bc55945ba41f86d5f175204e00592ea.tar.gz
opie-244945237bc55945ba41f86d5f175204e00592ea.tar.bz2
uptodate
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 2e6b0da..b5a05d3 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -696,97 +696,96 @@ void AdvancedFm::doBeam() {
696 } 696 }
697 Ir *file = new Ir(this, "IR"); 697 Ir *file = new Ir(this, "IR");
698 connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished(Ir*))); 698 connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished(Ir*)));
699 file->send( curFilePath, curFile ); 699 file->send( curFilePath, curFile );
700 } 700 }
701 } 701 }
702 } 702 }
703} 703}
704 704
705void AdvancedFm::fileBeamFinished( Ir *) { 705void AdvancedFm::fileBeamFinished( Ir *) {
706 QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") ); 706 QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") );
707} 707}
708 708
709void AdvancedFm::selectAll() { 709void AdvancedFm::selectAll() {
710 QListView *thisView = CurrentView(); 710 QListView *thisView = CurrentView();
711 thisView->selectAll(true); 711 thisView->selectAll(true);
712 thisView->setSelected( thisView->firstChild(),false); 712 thisView->setSelected( thisView->firstChild(),false);
713} 713}
714 714
715void AdvancedFm::startProcess(const QString & cmd) { 715void AdvancedFm::startProcess(const QString & cmd) {
716 QStringList command; 716 QStringList command;
717 OProcess *process; 717 OProcess *process;
718 process = new OProcess(); 718 process = new OProcess();
719 connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT( processEnded(Opie::Core::OProcess*))); 719 connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT( processEnded(Opie::Core::OProcess*)));
720 720
721 connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int))); 721 connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int)));
722 722
723 command << "/bin/sh"; 723 command << "/bin/sh";
724 command << "-c"; 724 command << "-c";
725 command << cmd.latin1(); 725 command << cmd.latin1();
726 *process << command; 726 *process << command;
727 if(!process->start(OProcess::NotifyOnExit, OProcess::All) ) 727 if(!process->start(OProcess::NotifyOnExit, OProcess::All) )
728 odebug << "could not start process" << oendl; 728 odebug << "could not start process" << oendl;
729} 729}
730 730
731void AdvancedFm::processEnded(OProcess *) { 731void AdvancedFm::processEnded(OProcess *) {
732 rePopulate(); 732 rePopulate();
733} 733}
734 734
735void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) { 735void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) {
736// owarn << "received stderrt " << buflen << " bytes" << oendl; 736// owarn << "received stderrt " << buflen << " bytes" << oendl;
737 737
738 QString lineStr = buffer; 738 QString lineStr = buffer;
739 QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") ); 739 QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") );
740} 740}
741 741
742bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { 742bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
743 if ( o->inherits( "QLineEdit" ) ) { 743 if ( o->inherits( "QLineEdit" ) ) {
744 qDebug("QLineEdit event");
745 if ( e->type() == QEvent::KeyPress ) { 744 if ( e->type() == QEvent::KeyPress ) {
746 QKeyEvent *ke = (QKeyEvent*)e; 745 QKeyEvent *ke = (QKeyEvent*)e;
747 if ( ke->key() == Key_Return || 746 if ( ke->key() == Key_Return ||
748 ke->key() == Key_Enter ) { 747 ke->key() == Key_Enter ) {
749 okRename(); 748 okRename();
750 return true; 749 return true;
751 } 750 }
752 else if ( ke->key() == Key_Escape ) { 751 else if ( ke->key() == Key_Escape ) {
753 cancelRename(); 752 cancelRename();
754 return true; 753 return true;
755 } 754 }
756 } 755 }
757 else if ( e->type() == QEvent::FocusOut ) { 756 else if ( e->type() == QEvent::FocusOut ) {
758 cancelRename(); 757 cancelRename();
759 return true; 758 return true;
760 } 759 }
761 } 760 }
762/* if ( o->inherits( "QListView" ) ) { 761/* if ( o->inherits( "QListView" ) ) {
763 if ( e->type() == QEvent::FocusIn ) { 762 if ( e->type() == QEvent::FocusIn ) {
764// if( o == Local_View) { //keep track of which view 763// if( o == Local_View) { //keep track of which view
765 // qDebug("local view"); 764 // qDebug("local view");
766// whichTab = 1; 765// whichTab = 1;
767// } else { 766// } else {
768// whichTab = 2; 767// whichTab = 2;
769 // qDebug("remote view"); 768 // qDebug("remote view");
770// } 769// }
771 } 770 }
772 OtherView()->setSelected( OtherView()->currentItem(), FALSE );//make sure there's correct selection 771 OtherView()->setSelected( OtherView()->currentItem(), FALSE );//make sure there's correct selection
773 } 772 }
774*/ 773*/
775 return QWidget::eventFilter( o, e ); 774 return QWidget::eventFilter( o, e );
776} 775}
777 776
778 777
779void AdvancedFm::cancelRename() { 778void AdvancedFm::cancelRename() {
780// odebug << "cancel rename" << oendl; 779// odebug << "cancel rename" << oendl;
781 QListView * view; 780 QListView * view;
782 view = CurrentView(); 781 view = CurrentView();
783 782
784 bool resetFocus = view->viewport()->focusProxy() == renameBox; 783 bool resetFocus = view->viewport()->focusProxy() == renameBox;
785 delete renameBox; 784 delete renameBox;
786 renameBox = 0; 785 renameBox = 0;
787 if ( resetFocus ) { 786 if ( resetFocus ) {
788 view->viewport()->setFocusProxy( view); 787 view->viewport()->setFocusProxy( view);
789 view->setFocus(); 788 view->setFocus();
790 } 789 }
791} 790}
792 791