summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm/advancedfm.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index fc6c3bf..d56e746 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -265,49 +265,48 @@ void AdvancedFm::ListClicked(QListViewItem *selectedItem)
{
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 *, const QPoint& , int ) {
switch (mouse) {
case 1:
{
if(renameBox != 0 )
{
cancelRename();
}
-
}
break;
case 2:
menuTimer.start( 500, TRUE );
break;
};
}
void AdvancedFm::switchToLocalTab()
{
TabWidget->setCurrentTab(0);
Local_View->setFocus();
}
void AdvancedFm::switchToRemoteTab()
{
TabWidget->setCurrentTab(1);
Remote_View->setFocus();
}
void AdvancedFm::readConfig()
{
Config cfg("AdvancedFm");
}
@@ -372,71 +371,69 @@ QStringList AdvancedFm::getPath()
for ( ; it.current(); ++it )
{
if ( it.current()->isSelected() )
{
strList << it.current()->text(0);
// qDebug(it.current()->text(0));
}
}
return strList;
}
void AdvancedFm::homeButtonPushed()
{
QString current = QDir::homeDirPath();
chdir( current.latin1() );
CurrentDir()->cd( current, TRUE);
populateView();
update();
}
void AdvancedFm::docButtonPushed()
{
QString current = QPEApplication::documentDir();
chdir( current.latin1() );
-
CurrentDir()->cd( current, TRUE);
populateView();
update();
}
void AdvancedFm::SDButtonPushed()
{
QString current = "/mnt/card";// this can change so fix
chdir( current.latin1() );
CurrentDir()->cd( current, TRUE);
populateView();
update();
}
void AdvancedFm::CFButtonPushed()
{
QString current;
if(zaurusDevice)
current= "/mnt/cf"; //zaurus
else
current = "/mnt/hda"; //ipaq
-
chdir( current.latin1() );
CurrentDir()->cd( current, TRUE);
populateView();
update();
}
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"));
}
void AdvancedFm::keyPressEvent( QKeyEvent *e)
{
// e->accept();
if( CurrentView()->hasFocus() )
{
switch ( e->key() ) {
case Key_Delete:
del();
break;
@@ -766,49 +763,50 @@ void AdvancedFm::addCustomDir()
{
menuButton->insertItem(dir);
// customDirMenu->insertItem(dir);
list << dir;
}
cfg.writeEntry("CustomDir", list, ',');
cfg.write();
}
void AdvancedFm::removeCustomDir()
{
// qDebug("remove custom dir");
Config cfg("AdvancedFm");
cfg.setGroup("Menu");
QString dir;
QStringList list = cfg.readListEntry( (const QString &)"CustomDir", (const QChar)',');
QStringList list2;
dir = CurrentDir()->canonicalPath();
int ramble=2;
// int ramble=-24;
//first remove list
if(list.grep(dir,true).isEmpty())
{
- QMessageBox::message("AdvancedFm",tr("Cannot remove current directory\nfrom bookmarks.\nIt is not bookmarked!!"));
+ QMessageBox::message("AdvancedFm",
+ tr("Cannot remove current directory\nfrom bookmarks.\nIt is not bookmarked!!"));
}
else
{
for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
if((*it) != dir)//current item is not our current dir, so add it to temp list
{
list2 <<(*it);
}
else
{
// customDirMenu->removeItem( ramble);
menuButton->remove( ramble);
}
ramble++;
// ramble--;
}
cfg.writeEntry("CustomDir", list2, ',');
cfg.write();
}
// customDirsToMenu();