summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-09-25 06:51:24 (UTC)
committer llornkcor <llornkcor>2004-09-25 06:51:24 (UTC)
commit3d4aef2df9828aedccf5d576ecbc8aad6621362e (patch) (side-by-side diff)
tree435f8e3b658ef45d8e95d29a305d20c62e01c24e
parent448e2835ff7b84162022b62f8570935739a167bb (diff)
downloadopie-3d4aef2df9828aedccf5d576ecbc8aad6621362e.zip
opie-3d4aef2df9828aedccf5d576ecbc8aad6621362e.tar.gz
opie-3d4aef2df9828aedccf5d576ecbc8aad6621362e.tar.bz2
not hardcoded path
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp41
-rw-r--r--noncore/apps/advancedfm/advancedfm.h1
-rw-r--r--noncore/apps/advancedfm/advancedfmData.cpp2
3 files changed, 7 insertions, 37 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index ec7a08a..f1be471 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -8,16 +8,19 @@
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#define DEVELOPERS_VERSION
#include "advancedfm.h"
#include <opie2/odebug.h>
+
+#include <opie2/ostorageinfo.h>
+
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include <qpe/mimetype.h>
#include <qpe/applnk.h>
#include <qpe/resource.h>
#include <qpe/menubutton.h>
#include <qcombobox.h>
@@ -205,34 +208,19 @@ void AdvancedFm::populateView() {
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;
@@ -272,17 +260,16 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , in
// break;
};
}
void AdvancedFm::refreshCurrentTab() {
populateView();
// if ( TabWidget->currentWidget() == tab) {
-
}
void AdvancedFm::switchToLocalTab() {
TabWidget->setCurrentWidget(0);
// Local_View->setFocus();
whichTab = 1;
}
@@ -347,24 +334,23 @@ void AdvancedFm::homeButtonPushed() {
changeTo(QDir::homeDirPath());
}
void AdvancedFm::docButtonPushed() {
changeTo(QPEApplication::documentDir());
}
void AdvancedFm::SDButtonPushed() {
- changeTo("/mnt/card");// this can change so fix
+ Opie::Core::OStorageInfo info;
+ changeTo(info.sdPath());
}
void AdvancedFm::CFButtonPushed() {
- if(zaurusDevice)
- changeTo("/mnt/cf"); //zaurus
- else
- changeTo("/mnt/hda"); //ipaq
+ Opie::Core::OStorageInfo info;
+ changeTo(info.cfPath());
}
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>"));
@@ -765,32 +751,19 @@ void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) {
QString file;
stream >> file;
changeTo( (const QString &) file);
}
}
void AdvancedFm::setDocument(const QString &file) {
changeTo( file);
-
}
-void AdvancedFm::findFile(const QString &fileName) {
- QFileInfo fi(fileName);
- QListView *thisView = CurrentView();
- QListViewItemIterator it( thisView );
- for ( ; it.current(); ++it ) {
- if(it.current()->text(0) == fi.fileName()) {
- it.current()->setSelected(true);
- thisView->ensureItemVisible(it.current());
- }
- }
-}
-
void AdvancedFm::slotSwitchMenu(int item) {
Q_UNUSED(item);
// qDebug( "Switch %d",item);
// viewMenu->setItemChecked(item, true);
}
void AdvancedFm::navigateToSelected() {
if( !CurrentView()->currentItem()) return;
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index 6f7eb96..42f3bc6 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -172,17 +172,16 @@ private:
bool eventFilter( QObject * , QEvent * );
void cancelRename();
void doRename(QListView *);
void okRename();
void customDirsToMenu();
void addCustomDir();
void removeCustomDir();
void navigateToSelected();
- void findFile(const QString &);
private slots:
void processEnded(Opie::Core::OProcess *);
void oprocessStderr(Opie::Core::OProcess *, char *, int);
void gotoCustomDir(const QString &);
void qcopReceive(const QCString&, const QByteArray&);
void setDocument(const QString &);
// void doMenu(int
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp
index 1047c5a..9be0ceb 100644
--- a/noncore/apps/advancedfm/advancedfmData.cpp
+++ b/noncore/apps/advancedfm/advancedfmData.cpp
@@ -51,18 +51,16 @@ void AdvancedFm::init() {
menuBar->insertItem( tr( "File" ), fileMenu);
menuBar->insertItem( tr( "View" ), viewMenu);
cdUpButton = new QToolButton( 0,"cdUpButton");
cdUpButton->setPixmap(Resource::loadPixmap("up"));
cdUpButton->setAutoRaise( true );
menuBar->insertItem( cdUpButton );
-
-
qpeDirButton= new QToolButton( 0,"QPEButton");
qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton");
qpeDirButton->setAutoRaise( true );
menuBar->insertItem( qpeDirButton );
cfButton = new QToolButton( 0, "CFButton");
cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia"));
cfButton->setAutoRaise( true );