summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp79
-rw-r--r--noncore/apps/advancedfm/advancedfm.h77
-rw-r--r--noncore/apps/advancedfm/advancedfm.pro2
-rw-r--r--noncore/apps/advancedfm/advancedfmData.cpp60
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp73
5 files changed, 138 insertions, 153 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 4de7d38..02898de 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -49,10 +49,9 @@ AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags )
populateView();
// rePopulate();
// currentPathCombo->setFocus();
channel = new QCopChannel( "QPE/Application/advancedfm", this );
- connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
- this, SLOT( qcopReceive(const QCString&,const QByteArray&)) );
+ connect(channel,SIGNAL(received(const QCString&,const QByteArray&)),this,SLOT(qcopReceive(const QCString&,const QByteArray&)));
// if( CurrentView() == Local_View)
// qDebug("LOCAL VIEW");
// else
@@ -75,18 +74,21 @@ void AdvancedFm::cleanUp() {
file.remove();
}
void AdvancedFm::tabChanged(QWidget *wd) {
- if(wd == tab)
- odebug << "LOCAL VIEW SHOWN"<< oendl;
- else if(wd == tab_2)
- odebug<< "REMOTE VIEW SHOWN"<< oendl;
-
+// qDebug("tabChanged");
+ if(wd == tab) {
+ whichTab = 1;
+// qDebug("tabchanged: LOCAL VIEW SHOWN");
+ }
+ else if(wd == tab_2) {
+ whichTab = 2;
+// qDebug("tabchanged: REMOTE VIEW SHOWN");
+ }
+ qApp->processEvents();
QString path = CurrentDir()->canonicalPath();
- currentPathCombo->lineEdit()->setText( path );
-
+// qDebug(path);
if ( TabWidget->currentWidget() == tab) {
-// if(whichTab == 1) {
viewMenu->setItemChecked(viewMenu->idAt(0), true);
viewMenu->setItemChecked(viewMenu->idAt(1), false);
} else {
viewMenu->setItemChecked(viewMenu->idAt(0), false);
@@ -97,14 +99,9 @@ void AdvancedFm::tabChanged(QWidget *wd) {
setCaption(tr("AdvancedFm :: ")+fs+" :: "
+checkDiskSpace( (const QString &) path )+ tr(" kB free") );
chdir( path.latin1());
- if( wd == Local_View) {
- Remote_View->clearFocus();
- } else {
- Local_View->clearFocus();
- }
-
+ currentPathCombo->lineEdit()->setText(path);
}
void AdvancedFm::populateView() {
@@ -217,8 +214,9 @@ void AdvancedFm::populateView() {
fillCombo( (const QString &) path );
}
void AdvancedFm::rePopulate() {
+// qDebug("repopulate views");
populateView();
setOtherTabCurrent();
populateView();
@@ -232,12 +230,12 @@ void AdvancedFm::rePopulate() {
// TabWidget->setCurrentWidget( tmpTab - 1);
}
void AdvancedFm::ListClicked(QListViewItem *selectedItem) {
- if ( TabWidget->currentWidget() == tab)
- qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked local");
- else
- qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked remote");
+// if ( TabWidget->currentWidget() == tab)
+// qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked local");
+// else
+// qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked remote");
if(selectedItem) {
QString strItem=selectedItem->text(0);
@@ -291,16 +289,20 @@ void AdvancedFm::refreshCurrentTab() {
}
void AdvancedFm::switchToLocalTab() {
+ qDebug("switchToLocal ");
TabWidget->setCurrentWidget(0);
Local_View->setFocus();
+ whichTab = 1;
}
void AdvancedFm::switchToRemoteTab() {
+ qDebug("switchToRemoteTab() ");
TabWidget->setCurrentWidget(1);
Remote_View->setFocus();
+ whichTab = 2;
}
void AdvancedFm::readConfig() {
Config cfg("AdvancedFm");
@@ -397,12 +399,9 @@ void AdvancedFm::CFButtonPushed() {
}
void AdvancedFm::doAbout() {
- QMessageBox::message("AdvancedFm",tr("Advanced FileManager\n"
- "is copyright 2002-2003 by\n"
- "L.J.Potter<llornkcor@handhelds.org>\n"
- "and is licensed by the GPL"));
+ QMessageBox::message("AdvancedFm",tr("<P>Advanced FileManager is copyright 2002-2003 by L.J.Potter<llornkcor@handhelds.org> and is licensed by the GPL</P>"));
}
void AdvancedFm::keyPressEvent( QKeyEvent *e) {
// owarn << "key " << e->key() << "" << oendl;
@@ -581,10 +580,9 @@ void AdvancedFm::showFileMenu() {
m->insertItem( tr( "Change Directory" ), this, SLOT( doDirChange() ));
} else {
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() ) //damn opie doesnt like this
m->insertItem( tr( "Execute" ), this, SLOT( runThis() ) );
m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) );
}
@@ -596,12 +594,12 @@ void AdvancedFm::showFileMenu() {
n->insertSeparator();
n->insertItem( tr( "Rename" ), this, SLOT( renameIt() ));
- n->insertItem( tr( "Copy" ), this, SLOT( copy() ));
- n->insertItem( tr( "Copy As" ), this, SLOT( copyAs() ));
- n->insertItem( tr( "Copy Same Dir" ), this, SLOT( copySameDir() ));
- n->insertItem( tr( "Move" ), this, SLOT( move() ));
+ n->insertItem(tr("Copy"),this,SLOT(copyTimer()));
+ n->insertItem(tr("Copy As"),this,SLOT(copyAsTimer()));
+ n->insertItem(tr("Copy Same Dir"),this,SLOT(copySameDirTimer()));
+ n->insertItem(tr("Move"),this,SLOT(moveTimer()));
n->insertSeparator();
n->insertItem( tr( "Delete" ), this, SLOT( doDelete() ));
m->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() ));
@@ -787,17 +785,13 @@ void AdvancedFm::gotoCustomDir(const QString &dir) {
}
}
QDir *AdvancedFm::CurrentDir() {
-
- if ( TabWidget->currentWidget() == tab)
- qDebug("CurrentTab is Local");
- else
- qDebug("CurrentTab is Remote");
-
if ( whichTab == 1) {
+// qDebug("CurrentTab is Local");
return &currentDir;
} else {
+// qDebug("CurrentTab is Remote");
return &currentRemoteDir;
}
}
@@ -810,16 +804,15 @@ QDir *AdvancedFm::OtherDir() {
}
}
QListView * AdvancedFm::CurrentView() {
- if ( TabWidget->currentWidget() == tab)
- odebug << "CurrentView local" << oendl;
-
// if ( TabWidget->currentWidget() == tab) {
if ( whichTab == 1) {
+// qDebug("CurrentView: local");
return Local_View;
} else {
// owarn << "CurrentView Tab 2" << oendl;
+// qDebug("CurrentView: remote");
return Remote_View;
}
}
@@ -830,9 +823,9 @@ QListView * AdvancedFm::OtherView() {
return Local_View;
}
void AdvancedFm::setOtherTabCurrent() {
- qDebug("setOtherTabCurrent() %d",whichTab);
+// qDebug("setOtherTabCurrent() %d",whichTab);
if ( whichTab == 1) {
TabWidget->setCurrentWidget(1);
} else {
TabWidget->setCurrentWidget(0);
@@ -857,9 +850,9 @@ void AdvancedFm::setDocument(const QString &file) {
}
void AdvancedFm::gotoDirectory(const QString &file) {
- qDebug("goto dir "+file);
+// qDebug("goto dir "+file);
QString curDir = file;
QDir *thisDir = CurrentDir();
if(QDir( curDir).exists() ) {
thisDir->setPath( curDir );
@@ -892,10 +885,10 @@ void AdvancedFm::findFile(const QString &fileName) {
}
}
}
-void AdvancedFm::slotSwitchMenu(int ) {
-// odebug << "Switch " << item << "" << oendl;
+void AdvancedFm::slotSwitchMenu(int item) {
+// qDebug( "Switch %d",item);
// viewMenu->setItemChecked(item, true);
}
void AdvancedFm::navigateToSelected() {
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index def6fe2..2234b3c 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -56,40 +56,8 @@ class AdvancedFm : public QMainWindow
public:
static QString appName() { return QString::fromLatin1("advancedfm"); }
AdvancedFm(QWidget *p = 0, const char* name = 0, WFlags fl = 0);
~AdvancedFm();
-protected slots:
- void slotSwitchMenu(int);
- void selectAll();
- void addToDocs();
- void doDirChange();
- void mkDir();
- void del();
- void rn();
- void populateView();
- void rePopulate();
- void showHidden();
- void showMenuHidden();
- void writeConfig();
- void readConfig();
- void ListClicked(QListViewItem *);
- void ListPressed( int, QListViewItem *, const QPoint&, int);
- void makeDir();
- void doDelete();
- void tabChanged(QWidget*);
- void cleanUp();
- void renameIt();
- void runThis();
- void runText();
- void filePerms();
- void doProperties();
- void runCommand();
- void runCommandStd();
- QStringList getPath();
- void mkSym();
- void switchToLocalTab();
- void switchToRemoteTab();
- void refreshCurrentTab();
protected:
Opie::Ui::OSplitter *TabWidget;
QCopChannel * channel;
@@ -129,9 +97,43 @@ protected:
QListView *CurrentView();
QListView *OtherView();
void setOtherTabCurrent();
+//protected signals:
+// void newPath(QString);
+
protected slots:
+ void slotSwitchMenu(int);
+ void selectAll();
+ void addToDocs();
+ void doDirChange();
+ void mkDir();
+ void del();
+ void rn();
+ void populateView();
+ void rePopulate();
+ void showHidden();
+ void showMenuHidden();
+ void writeConfig();
+ void readConfig();
+ void ListClicked(QListViewItem *);
+ void ListPressed( int, QListViewItem *, const QPoint&, int);
+ void makeDir();
+ void doDelete();
+ void tabChanged(QWidget*);
+ void cleanUp();
+ void renameIt();
+ void runThis();
+ void runText();
+ void filePerms();
+ void doProperties();
+ void runCommand();
+ void runCommandStd();
+ QStringList getPath();
+ void mkSym();
+ void switchToLocalTab();
+ void switchToRemoteTab();
+ void refreshCurrentTab();
void openSearch();
void dirMenuSelected(int);
void showFileMenu();
@@ -141,15 +143,21 @@ protected slots:
void CFButtonPushed();
void QPEButtonPushed();
void upDir();
void currentPathComboChanged();
+
void copy();
+ void copyTimer();
void copyAs();
+ void copyAsTimer();
void copySameDir();
+ void copySameDirTimer();
+ void move();
+ void moveTimer();
+
void currentPathComboActivated(const QString &);
void fillCombo(const QString &);
bool copyFile( const QString & , const QString & );
- void move();
void fileStatus();
void doAbout();
void doBeam();
void fileBeamFinished( Ir *);
@@ -160,9 +168,9 @@ protected slots:
// void slotSwitchtoLocal(int);
private:
MenuButton *menuButton;
- QString oldName;
+ QString oldName, localViewDir, remoteViewDir;
void startProcess(const QString &);
bool eventFilter( QObject * , QEvent * );
void cancelRename();
void doRename(QListView *);
@@ -179,8 +187,9 @@ private slots:
void oprocessStderr(Opie::Core::OProcess *, char *, int);
void gotoCustomDir(const QString &);
void qcopReceive(const QCString&, const QByteArray&);
void setDocument(const QString &);
+// void doMenu(int
};
#endif // ADVANCEDFM_H
diff --git a/noncore/apps/advancedfm/advancedfm.pro b/noncore/apps/advancedfm/advancedfm.pro
index 0644edb..713f61c 100644
--- a/noncore/apps/advancedfm/advancedfm.pro
+++ b/noncore/apps/advancedfm/advancedfm.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
-CONFIG += qt warn_on quick-app
+CONFIG += qte warn_on quick-app
HEADERS = advancedfm.h filePermissions.h output.h
SOURCES = advancedfm.cpp advancedfmData.cpp advancedfmMenu.cpp filePermissions.cpp output.cpp main.cpp
TARGET = advancedfm
INCLUDEPATH += $(OPIEDIR)/include
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp
index 1802571..d2e1d8e 100644
--- a/noncore/apps/advancedfm/advancedfmData.cpp
+++ b/noncore/apps/advancedfm/advancedfmData.cpp
@@ -247,46 +247,30 @@ void AdvancedFm::init() {
void AdvancedFm::initConnections()
{
- connect( qApp,SIGNAL( aboutToQuit()),
- this, SLOT( cleanUp()) );
- connect( qpeDirButton ,SIGNAL(released()),
- this,SLOT( QPEButtonPushed()) );
- connect( cfButton ,SIGNAL(released()),
- this,SLOT( CFButtonPushed()) );
- connect( sdButton ,SIGNAL(released()),
- this,SLOT( SDButtonPushed()) );
- connect( cdUpButton ,SIGNAL(released()),
- this,SLOT( upDir()) );
- connect( docButton,SIGNAL(released()),
- this,SLOT( docButtonPushed()) );
- connect( homeButton,SIGNAL(released()),
- this,SLOT( homeButtonPushed()) );
- connect( currentPathCombo, SIGNAL( activated(const QString&) ),
- this, SLOT( currentPathComboActivated(const QString&) ) );
-
- connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()),
- this,SLOT(currentPathComboChanged()));
-
- connect( Local_View, SIGNAL( clicked(QListViewItem*)),
- this,SLOT( ListClicked(QListViewItem*)) );
-
- connect( Local_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),
- this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) );
-
- connect( Remote_View, SIGNAL( clicked(QListViewItem*)),
- this,SLOT( ListClicked(QListViewItem*)) );
- connect( Remote_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),
- this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) );
-
- connect( TabWidget,SIGNAL(currentChanged(QWidget*)),
- this,SLOT(tabChanged(QWidget*)));
-
- connect( Remote_View, SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&, int)),
- this, SLOT(showFileMenu()));
- connect( Local_View, SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&,int)),
- this, SLOT(showFileMenu()));
+ connect(qApp,SIGNAL(aboutToQuit()),this,SLOT(cleanUp()));
+ connect( qpeDirButton ,SIGNAL(released()),this,SLOT( QPEButtonPushed()) );
+ connect( cfButton ,SIGNAL(released()), this,SLOT( CFButtonPushed()) );
+ connect( sdButton ,SIGNAL(released()), this,SLOT( SDButtonPushed()) );
+ connect( cdUpButton ,SIGNAL(released()), this,SLOT( upDir()) );
+ connect( docButton,SIGNAL(released()), this,SLOT( docButtonPushed()) );
+ connect( homeButton,SIGNAL(released()), this,SLOT( homeButtonPushed()) );
+ connect( currentPathCombo, SIGNAL( activated(const QString&) ), this, SLOT( currentPathComboActivated(const QString&) ) );
+
+ connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), this,SLOT(currentPathComboChanged()));
+
+ connect( Local_View, SIGNAL( clicked(QListViewItem*)), this,SLOT( ListClicked(QListViewItem*)) );
+
+ connect( Local_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) );
+
+ connect( Remote_View, SIGNAL( clicked(QListViewItem*)), this,SLOT( ListClicked(QListViewItem*)) );
+ connect( Remote_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) );
+
+ connect( TabWidget,SIGNAL(currentChanged(QWidget*)), this,SLOT(tabChanged(QWidget*)));
+
+ connect( Remote_View, SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&, int)), this, SLOT(showFileMenu()));
+ connect( Local_View, SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&,int)), this, SLOT(showFileMenu()));
connect( menuButton, SIGNAL( selected(const QString&)), SLOT(gotoCustomDir(const QString&)));
// connect( menuButton, SIGNAL( selected(int)), SLOT( dirMenuSelected(int)));
connect( viewMenu, SIGNAL( activated(int)), this, SLOT(slotSwitchMenu(int)));
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 8d04c68..5a46579 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -270,10 +270,13 @@ void AdvancedFm::upDir() {
populateView();
update();
}
+void AdvancedFm::copyTimer() {
+ QTimer::singleShot(125,this,SLOT(copy()));
+}
+
void AdvancedFm::copy() {
- qApp->processEvents();
QStringList curFileList = getPath();
QDir *thisDir = CurrentDir();
QDir *thatDir = OtherDir();
@@ -311,9 +314,9 @@ void AdvancedFm::copy() {
QFile f(destFile);
if( f.exists()) {
if(doMsg) {
switch ( QMessageBox::warning(this,tr("File Exists!"),
- tr("%1 exists. Ok to overwrite?").arg( item ),
+ tr("<p>%1 already exists. Ok to overwrite?</P>").arg(item),
tr("Yes"),tr("No"),0,0,1) ) {
case 1:
return;
break;
@@ -323,17 +326,20 @@ void AdvancedFm::copy() {
}
if( !copyFile( curFile, destFile) ) {
QMessageBox::message("AdvancedFm",
- tr( "Could not copy %1 to %2").arg( curFile ).arg( destFile ) );
+ tr( "<P>Could not copy %1 to %2</P>").arg(curFile).arg(destFile));
return;
}
}
- setOtherTabCurrent();
rePopulate();
}
}
+void AdvancedFm::copyAsTimer() {
+ QTimer::singleShot(125,this,SLOT(copyAs()));
+}
+
void AdvancedFm::copyAs() {
QStringList curFileList = getPath();
QString curFile, item;
@@ -345,9 +351,9 @@ void AdvancedFm::copyAs() {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
QString destFile;
item=(*it);
curFile = thisDir->canonicalPath()+"/"+(*it);
- fileDlg = new InputDialog( this, tr("Copy "+curFile+" As"), TRUE, 0);
+ fileDlg = new InputDialog( this, tr("Copy %1 As").arg(curFile), TRUE, 0);
fileDlg->setInputText((const QString &) destFile );
fileDlg->exec();
@@ -357,9 +363,9 @@ void AdvancedFm::copyAs() {
QFile f( destFile);
if( f.exists()) {
switch (QMessageBox::warning(this,tr("File Exists!"),
- item+tr("\nexists. Ok to overwrite?"),
+ tr("<P> %1 already exists. Ok to overwrite?</p>").arg(item),
tr("Yes"),tr("No"),0,0,1) ) {
case 0:
f.remove();
break;
@@ -368,22 +374,25 @@ void AdvancedFm::copyAs() {
break;
};
}
if( !copyFile( curFile, destFile) ) {
- QMessageBox::message("AdvancedFm",tr("Could not copy\n")
- +curFile +tr("to\n")+destFile);
+ QMessageBox::message("AdvancedFm",tr("<p>Could not copy %1 to %2</P>").arg(curFile).arg(destFile));
return;
}
}
delete fileDlg;
}
rePopulate();
- setOtherTabCurrent();
+// setOtherTabCurrent();
qApp->processEvents();
}
+void AdvancedFm::copySameDirTimer() {
+ QTimer::singleShot(125,this,SLOT(copySameDir()));
+}
+
void AdvancedFm::copySameDir() {
qApp->processEvents();
QStringList curFileList = getPath();
QString curFile, item, destFile;
@@ -406,9 +415,9 @@ void AdvancedFm::copySameDir() {
QFile f(destFile);
if( f.exists()) {
switch (QMessageBox::warning(this,tr("Delete"),
- destFile+tr(" already exists.\nDo you really want to delete it?"),
+ tr("<p> %1 already exists. Do you really want to delete it?</P>").arg(destFile),
tr("Yes"),tr("No"),0,0,1) ) {
case 0:
f.remove();
@@ -418,10 +427,9 @@ void AdvancedFm::copySameDir() {
break;
};
}
if(!copyFile( curFile,destFile) ) {
- QMessageBox::message("AdvancedFm",tr("Could not copy\n")
- +curFile +tr("to\n")+destFile);
+ QMessageBox::message("AdvancedFm",tr("<P>Could not copy %1 to %2</P>").arg(curFile).arg(destFile));
return;
}
// odebug << "copy "+curFile+" as "+destFile << oendl;
@@ -430,10 +438,13 @@ void AdvancedFm::copySameDir() {
}
rePopulate();
}
+void AdvancedFm::moveTimer() {
+ QTimer::singleShot(125,this,SLOT(move()));
+}
+
void AdvancedFm::move() {
- qApp->processEvents();
QStringList curFileList = getPath();
if( curFileList.count() > 0) {
QString curFile, destFile, item;
@@ -459,9 +470,8 @@ void AdvancedFm::move() {
moveDirectory( curFile, destFile );
rePopulate();
return;
}
-
QFile f( curFile);
if( f.exists()) {
if( !copyFile( curFile, destFile) ) {
QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile);
@@ -472,9 +482,9 @@ void AdvancedFm::move() {
}
}
rePopulate();
- setOtherTabCurrent();
+// setOtherTabCurrent();
}
bool AdvancedFm::moveDirectory( const QString & src, const QString & dest ) {
int err = 0;
@@ -505,14 +515,12 @@ bool AdvancedFm::copyDirectory( const QString & src, const QString & dest ) {
}
bool AdvancedFm::copyFile( const QString & src, const QString & dest ) {
-
-
if(QFileInfo(src).isDir()) {
if( copyDirectory( src, dest )) {
- setOtherTabCurrent();
- populateView();
+// setOtherTabCurrent();
+ rePopulate();
return true;
}
else
return false;
@@ -707,13 +715,11 @@ void AdvancedFm::selectAll() {
void AdvancedFm::startProcess(const QString & cmd) {
QStringList command;
OProcess *process;
process = new OProcess();
- connect(process, SIGNAL(processExited(Opie::Core::OProcess*)),
- this, SLOT( processEnded(Opie::Core::OProcess*)));
+ connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT( processEnded(Opie::Core::OProcess*)));
- connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)),
- this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int)));
+ connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int)));
command << "/bin/sh";
command << "-c";
command << cmd.latin1();
@@ -753,15 +759,15 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
}
}
if ( o->inherits( "QListView" ) ) {
if ( e->type() == QEvent::FocusIn ) {
- if( o == Local_View) { //keep track of which view
- qDebug("local view");
- whichTab = 1;
- } else {
- whichTab = 2;
- qDebug("remote view");
- }
+// if( o == Local_View) { //keep track of which view
+// qDebug("local view");
+// whichTab = 1;
+// } else {
+// whichTab = 2;
+// qDebug("remote view");
+// }
}
OtherView()->setSelected( OtherView()->currentItem(), FALSE );//make sure there's correct selection
}
@@ -788,26 +794,19 @@ void AdvancedFm::doRename(QListView * view) {
QRect r = view->itemRect( view->currentItem( ));
r = QRect( view->viewportToContents( r.topLeft() ), r.size() );
r.setX( view->contentsX() );
-
if ( r.width() > view->visibleWidth() )
r.setWidth( view->visibleWidth() );
renameBox = new QLineEdit( view->viewport(), "qt_renamebox" );
renameBox->setFrame(true);
-
renameBox->setText( view->currentItem()->text(0) );
-
renameBox->selectAll();
renameBox->installEventFilter( this );
-
view->addChild( renameBox, r.x(), r.y() );
-
renameBox->resize( r.size() );
-
view->viewport()->setFocusProxy( renameBox );
-
renameBox->setFocus();
renameBox->show();
}