summaryrefslogtreecommitdiff
path: root/noncore
authorllornkcor <llornkcor>2004-09-25 06:21:43 (UTC)
committer llornkcor <llornkcor>2004-09-25 06:21:43 (UTC)
commit448e2835ff7b84162022b62f8570935739a167bb (patch) (side-by-side diff)
tree57cbbc4e2a6a87119df7240a346b256314e99910 /noncore
parentc47a2d0e8ec283737f7c43474be4cf8070cde046 (diff)
downloadopie-448e2835ff7b84162022b62f8570935739a167bb.zip
opie-448e2835ff7b84162022b62f8570935739a167bb.tar.gz
opie-448e2835ff7b84162022b62f8570935739a167bb.tar.bz2
change message
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 6f017b4..ec7a08a 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -200,197 +200,198 @@ void AdvancedFm::populateView() {
closedir(dir);
}
thisView->setSorting( 3,FALSE);
fillCombo( (const QString &) path );
}
void AdvancedFm::rePopulate() {
// qDebug("repopulate views");
populateView();
setOtherTabCurrent();
populateView();
// int tmpTab = whichTab;
// // odebug << "" << tmpTab << "" << oendl;
// for(int i =1; i < 3; i++) {
// TabWidget->setCurrentWidget(i - 1);
// populateView();
// }
// TabWidget->setCurrentWidget( tmpTab - 1);
}
void AdvancedFm::ListClicked(QListViewItem *selectedItem) {
// if ( TabWidget->currentWidget() == tab)
// qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked local");
// else
// qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked remote");
if(selectedItem) {
QString strItem=selectedItem->text(0);
// owarn << strItem << oendl;
QString strSize=selectedItem->text(1);
strSize=strSize.stripWhiteSpace();
bool isDirectory = false;
QString strItem2;
if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) {//if symlink
strItem2 = dealWithSymName((const QString&)strItem);
if(QDir(strItem2).exists() )
strItem = strItem2;
}
if( strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) {
if(QDir(strItem).exists())
isDirectory = true;
}
if( isDirectory ) {
CurrentDir()->cd( strItem, TRUE);
populateView();
CurrentView()->ensureItemVisible( CurrentView()->firstChild());
}
chdir( strItem.latin1());
}
}
void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , int ) {
Q_UNUSED(item);
switch (mouse) {
case 1:
{
if(renameBox != 0 ) {
cancelRename();
}
}
break;
// case 2:
// menuTimer.start( 50, TRUE );
// break;
};
}
void AdvancedFm::refreshCurrentTab() {
populateView();
// if ( TabWidget->currentWidget() == tab) {
}
void AdvancedFm::switchToLocalTab() {
TabWidget->setCurrentWidget(0);
// Local_View->setFocus();
whichTab = 1;
}
void AdvancedFm::switchToRemoteTab() {
TabWidget->setCurrentWidget(1);
// Remote_View->setFocus();
whichTab = 2;
}
void AdvancedFm::currentPathComboChanged() {
- if(QDir( currentPathCombo->lineEdit()->text()).exists()) {
- CurrentDir()->setPath( currentPathCombo->lineEdit()->text() );
+ QString pDir = currentPathCombo->lineEdit()->text();
+ if(QDir(pDir).exists()) {
+ CurrentDir()->setPath(pDir );
populateView();
} else {
- QMessageBox::message(tr("Note"),tr("<p>That directory does not exist</p>"));
+ QMessageBox::message(tr("Note"),tr("<p>%1 does not exist</p>").arg(pDir));
}
}
void AdvancedFm::fillCombo(const QString &currentPath) {
if ( TabWidget->currentWidget() == tab) {
// if ( whichTab == 1) {
currentPathCombo->lineEdit()->setText( currentPath);
if( localDirPathStringList.grep( currentPath,TRUE).isEmpty() ) {
currentPathCombo->clear();
localDirPathStringList.prepend( currentPath );
currentPathCombo->insertStringList( localDirPathStringList,-1);
}
} else {
currentPathCombo->lineEdit()->setText( currentPath);
if( remoteDirPathStringList.grep( currentPath,TRUE).isEmpty() ) {
currentPathCombo->clear();
remoteDirPathStringList.prepend( currentPath );
currentPathCombo->insertStringList( remoteDirPathStringList,-1);
}
}
}
QStringList AdvancedFm::getPath() {
QStringList strList;
QListView *thisView=CurrentView();
QList<QListViewItem> * getSelectedItems( QListView * thisView );
QListViewItemIterator it( thisView );
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() ) {
strList << it.current()->text(0);
// odebug << it.current()->text(0) << oendl;
}
}
return strList;
}
void AdvancedFm::changeTo(const QString dir) {
chdir( dir.latin1());
CurrentDir()->cd(dir, TRUE);
populateView();
update();
}
void AdvancedFm::homeButtonPushed() {
changeTo(QDir::homeDirPath());
}
void AdvancedFm::docButtonPushed() {
changeTo(QPEApplication::documentDir());
}
void AdvancedFm::SDButtonPushed() {
changeTo("/mnt/card");// this can change so fix
}
void AdvancedFm::CFButtonPushed() {
if(zaurusDevice)
changeTo("/mnt/cf"); //zaurus
else
changeTo("/mnt/hda"); //ipaq
}
void AdvancedFm::QPEButtonPushed() {
changeTo(QPEApplication::qpeDir());
}
void AdvancedFm::doAbout() {
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) {
Q_UNUSED(e);
}
void AdvancedFm::keyReleaseEvent( QKeyEvent *e) {
// if( CurrentView()->hasFocus() )
// e->ignore();
if( currentPathCombo->lineEdit()->hasFocus()) {
// qDebug("shout!");
}
else if( e->key() == Key_Left )
upDir();
else if( e->key() == Key_Return || e->key() == Key_Enter)
navigateToSelected();
else if( e->key() == Key_Tab)
setOtherTabCurrent();
else if( e->key() == Key_Delete )
del();
else if( e->key() == Key_A)
copyAs();
else if( e->key() == Key_C)
copy();
else if( e->key() == Key_E)
runThis();