summaryrefslogtreecommitdiff
path: root/noncore/apps
authorllornkcor <llornkcor>2004-09-25 06:51:24 (UTC)
committer llornkcor <llornkcor>2004-09-25 06:51:24 (UTC)
commit3d4aef2df9828aedccf5d576ecbc8aad6621362e (patch) (unidiff)
tree435f8e3b658ef45d8e95d29a305d20c62e01c24e /noncore/apps
parent448e2835ff7b84162022b62f8570935739a167bb (diff)
downloadopie-3d4aef2df9828aedccf5d576ecbc8aad6621362e.zip
opie-3d4aef2df9828aedccf5d576ecbc8aad6621362e.tar.gz
opie-3d4aef2df9828aedccf5d576ecbc8aad6621362e.tar.bz2
not hardcoded path
Diffstat (limited to 'noncore/apps') (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
@@ -10,12 +10,15 @@
10 * (at your option) any later version. * 10 * (at your option) any later version. *
11 ***************************************************************************/ 11 ***************************************************************************/
12#define DEVELOPERS_VERSION 12#define DEVELOPERS_VERSION
13#include "advancedfm.h" 13#include "advancedfm.h"
14 14
15#include <opie2/odebug.h> 15#include <opie2/odebug.h>
16
17#include <opie2/ostorageinfo.h>
18
16#include <qpe/qpeapplication.h> 19#include <qpe/qpeapplication.h>
17#include <qpe/config.h> 20#include <qpe/config.h>
18#include <qpe/mimetype.h> 21#include <qpe/mimetype.h>
19#include <qpe/applnk.h> 22#include <qpe/applnk.h>
20#include <qpe/resource.h> 23#include <qpe/resource.h>
21#include <qpe/menubutton.h> 24#include <qpe/menubutton.h>
@@ -207,30 +210,15 @@ void AdvancedFm::populateView() {
207 210
208void AdvancedFm::rePopulate() { 211void AdvancedFm::rePopulate() {
209 // qDebug("repopulate views"); 212 // qDebug("repopulate views");
210 populateView(); 213 populateView();
211 setOtherTabCurrent(); 214 setOtherTabCurrent();
212 populateView(); 215 populateView();
213
214// int tmpTab = whichTab;
215// // odebug << "" << tmpTab << "" << oendl;
216
217// for(int i =1; i < 3; i++) {
218// TabWidget->setCurrentWidget(i - 1);
219// populateView();
220// }
221// TabWidget->setCurrentWidget( tmpTab - 1);
222} 216}
223 217
224void AdvancedFm::ListClicked(QListViewItem *selectedItem) { 218void AdvancedFm::ListClicked(QListViewItem *selectedItem) {
225 // if ( TabWidget->currentWidget() == tab)
226 // qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked local");
227 // else
228 // qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked remote");
229
230
231 if(selectedItem) { 219 if(selectedItem) {
232 QString strItem=selectedItem->text(0); 220 QString strItem=selectedItem->text(0);
233// owarn << strItem << oendl; 221// owarn << strItem << oendl;
234 QString strSize=selectedItem->text(1); 222 QString strSize=selectedItem->text(1);
235 strSize=strSize.stripWhiteSpace(); 223 strSize=strSize.stripWhiteSpace();
236 bool isDirectory = false; 224 bool isDirectory = false;
@@ -274,13 +262,12 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , in
274} 262}
275 263
276 264
277void AdvancedFm::refreshCurrentTab() { 265void AdvancedFm::refreshCurrentTab() {
278 populateView(); 266 populateView();
279 // if ( TabWidget->currentWidget() == tab) { 267 // if ( TabWidget->currentWidget() == tab) {
280
281} 268}
282 269
283void AdvancedFm::switchToLocalTab() { 270void AdvancedFm::switchToLocalTab() {
284 TabWidget->setCurrentWidget(0); 271 TabWidget->setCurrentWidget(0);
285 // Local_View->setFocus(); 272 // Local_View->setFocus();
286 whichTab = 1; 273 whichTab = 1;
@@ -349,20 +336,19 @@ void AdvancedFm::homeButtonPushed() {
349 336
350void AdvancedFm::docButtonPushed() { 337void AdvancedFm::docButtonPushed() {
351 changeTo(QPEApplication::documentDir()); 338 changeTo(QPEApplication::documentDir());
352} 339}
353 340
354void AdvancedFm::SDButtonPushed() { 341void AdvancedFm::SDButtonPushed() {
355 changeTo("/mnt/card");// this can change so fix 342 Opie::Core::OStorageInfo info;
343 changeTo(info.sdPath());
356} 344}
357 345
358void AdvancedFm::CFButtonPushed() { 346void AdvancedFm::CFButtonPushed() {
359 if(zaurusDevice) 347 Opie::Core::OStorageInfo info;
360 changeTo("/mnt/cf"); //zaurus 348 changeTo(info.cfPath());
361 else
362 changeTo("/mnt/hda"); //ipaq
363} 349}
364 350
365void AdvancedFm::QPEButtonPushed() { 351void AdvancedFm::QPEButtonPushed() {
366 changeTo(QPEApplication::qpeDir()); 352 changeTo(QPEApplication::qpeDir());
367} 353}
368 354
@@ -767,28 +753,15 @@ void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) {
767 changeTo( (const QString &) file); 753 changeTo( (const QString &) file);
768 } 754 }
769} 755}
770 756
771void AdvancedFm::setDocument(const QString &file) { 757void AdvancedFm::setDocument(const QString &file) {
772 changeTo( file); 758 changeTo( file);
773
774} 759}
775 760
776 761
777void AdvancedFm::findFile(const QString &fileName) {
778 QFileInfo fi(fileName);
779 QListView *thisView = CurrentView();
780 QListViewItemIterator it( thisView );
781 for ( ; it.current(); ++it ) {
782 if(it.current()->text(0) == fi.fileName()) {
783 it.current()->setSelected(true);
784 thisView->ensureItemVisible(it.current());
785 }
786 }
787}
788
789void AdvancedFm::slotSwitchMenu(int item) { 762void AdvancedFm::slotSwitchMenu(int item) {
790 Q_UNUSED(item); 763 Q_UNUSED(item);
791 // qDebug( "Switch %d",item); 764 // qDebug( "Switch %d",item);
792 // viewMenu->setItemChecked(item, true); 765 // viewMenu->setItemChecked(item, true);
793} 766}
794 767
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
@@ -174,13 +174,12 @@ private:
174 void doRename(QListView *); 174 void doRename(QListView *);
175 void okRename(); 175 void okRename();
176 void customDirsToMenu(); 176 void customDirsToMenu();
177 void addCustomDir(); 177 void addCustomDir();
178 void removeCustomDir(); 178 void removeCustomDir();
179 void navigateToSelected(); 179 void navigateToSelected();
180 void findFile(const QString &);
181 180
182private slots: 181private slots:
183 void processEnded(Opie::Core::OProcess *); 182 void processEnded(Opie::Core::OProcess *);
184 void oprocessStderr(Opie::Core::OProcess *, char *, int); 183 void oprocessStderr(Opie::Core::OProcess *, char *, int);
185 void gotoCustomDir(const QString &); 184 void gotoCustomDir(const QString &);
186 void qcopReceive(const QCString&, const QByteArray&); 185 void qcopReceive(const QCString&, const QByteArray&);
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
@@ -53,14 +53,12 @@ void AdvancedFm::init() {
53 53
54 cdUpButton = new QToolButton( 0,"cdUpButton"); 54 cdUpButton = new QToolButton( 0,"cdUpButton");
55 cdUpButton->setPixmap(Resource::loadPixmap("up")); 55 cdUpButton->setPixmap(Resource::loadPixmap("up"));
56 cdUpButton->setAutoRaise( true ); 56 cdUpButton->setAutoRaise( true );
57 menuBar->insertItem( cdUpButton ); 57 menuBar->insertItem( cdUpButton );
58 58
59
60
61 qpeDirButton= new QToolButton( 0,"QPEButton"); 59 qpeDirButton= new QToolButton( 0,"QPEButton");
62 qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton"); 60 qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton");
63 qpeDirButton->setAutoRaise( true ); 61 qpeDirButton->setAutoRaise( true );
64 menuBar->insertItem( qpeDirButton ); 62 menuBar->insertItem( qpeDirButton );
65 63
66 cfButton = new QToolButton( 0, "CFButton"); 64 cfButton = new QToolButton( 0, "CFButton");