author | llornkcor <llornkcor> | 2003-07-17 19:51:45 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-07-17 19:51:45 (UTC) |
commit | cf3921fe77f87e94ff821df65bb80b02487a9f9b (patch) (unidiff) | |
tree | f7109c1df836035b73226ac64837c76e467f19a3 /noncore/apps | |
parent | 6140e0d6a131ac127ebfc583990cb6ceefdd30ad (diff) | |
download | opie-cf3921fe77f87e94ff821df65bb80b02487a9f9b.zip opie-cf3921fe77f87e94ff821df65bb80b02487a9f9b.tar.gz opie-cf3921fe77f87e94ff821df65bb80b02487a9f9b.tar.bz2 |
show no hidden default. fix for nonfresh after move, via patch. thanks
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 3 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 9 |
2 files changed, 6 insertions, 6 deletions
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index a120f35..45dc0c4 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -206,52 +206,53 @@ void AdvancedFm::init() { | |||
206 | struct utsname name; /* check for embedix kernel running on the zaurus*/ | 206 | struct utsname name; /* check for embedix kernel running on the zaurus*/ |
207 | if (uname(&name) != -1) { | 207 | if (uname(&name) != -1) { |
208 | QString release=name.release; | 208 | QString release=name.release; |
209 | if(release.find("embedix",0,TRUE) !=-1) { | 209 | if(release.find("embedix",0,TRUE) !=-1) { |
210 | zaurusDevice=TRUE; | 210 | zaurusDevice=TRUE; |
211 | } else { | 211 | } else { |
212 | zaurusDevice=FALSE; | 212 | zaurusDevice=FALSE; |
213 | } | 213 | } |
214 | } | 214 | } |
215 | 215 | ||
216 | if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) { | 216 | if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) { |
217 | qDebug("not have sd"); | 217 | qDebug("not have sd"); |
218 | sdButton->hide(); | 218 | sdButton->hide(); |
219 | } | 219 | } |
220 | if( !StorageInfo::hasCf() ) { | 220 | if( !StorageInfo::hasCf() ) { |
221 | qDebug("not have cf"); | 221 | qDebug("not have cf"); |
222 | cfButton->hide(); | 222 | cfButton->hide(); |
223 | } | 223 | } |
224 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 224 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
225 | currentDir.setPath( QDir::currentDirPath()); | 225 | currentDir.setPath( QDir::currentDirPath()); |
226 | 226 | ||
227 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 227 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
228 | currentRemoteDir.setPath( QDir::currentDirPath()); | 228 | currentRemoteDir.setPath( QDir::currentDirPath()); |
229 | 229 | ||
230 | b = TRUE; | 230 | // b = TRUE; |
231 | 231 | ||
232 | filterStr="*"; | 232 | filterStr="*"; |
233 | b=FALSE; | 233 | b=FALSE; |
234 | showMenuHidden(); | ||
234 | TabWidget->setCurrentTab(0); | 235 | TabWidget->setCurrentTab(0); |
235 | 236 | ||
236 | } | 237 | } |
237 | 238 | ||
238 | void AdvancedFm::initConnections() | 239 | void AdvancedFm::initConnections() |
239 | { | 240 | { |
240 | 241 | ||
241 | connect( qApp,SIGNAL( aboutToQuit()), | 242 | connect( qApp,SIGNAL( aboutToQuit()), |
242 | this, SLOT( cleanUp()) ); | 243 | this, SLOT( cleanUp()) ); |
243 | connect( qpeDirButton ,SIGNAL(released()), | 244 | connect( qpeDirButton ,SIGNAL(released()), |
244 | this,SLOT( QPEButtonPushed()) ); | 245 | this,SLOT( QPEButtonPushed()) ); |
245 | connect( cfButton ,SIGNAL(released()), | 246 | connect( cfButton ,SIGNAL(released()), |
246 | this,SLOT( CFButtonPushed()) ); | 247 | this,SLOT( CFButtonPushed()) ); |
247 | connect( sdButton ,SIGNAL(released()), | 248 | connect( sdButton ,SIGNAL(released()), |
248 | this,SLOT( SDButtonPushed()) ); | 249 | this,SLOT( SDButtonPushed()) ); |
249 | connect( cdUpButton ,SIGNAL(released()), | 250 | connect( cdUpButton ,SIGNAL(released()), |
250 | this,SLOT( upDir()) ); | 251 | this,SLOT( upDir()) ); |
251 | connect( docButton,SIGNAL(released()), | 252 | connect( docButton,SIGNAL(released()), |
252 | this,SLOT( docButtonPushed()) ); | 253 | this,SLOT( docButtonPushed()) ); |
253 | connect( homeButton,SIGNAL(released()), | 254 | connect( homeButton,SIGNAL(released()), |
254 | this,SLOT( homeButtonPushed()) ); | 255 | this,SLOT( homeButtonPushed()) ); |
255 | connect( currentPathCombo, SIGNAL( activated( const QString & ) ), | 256 | connect( currentPathCombo, SIGNAL( activated( const QString & ) ), |
256 | this, SLOT( currentPathComboActivated( const QString & ) ) ); | 257 | this, SLOT( currentPathComboActivated( const QString & ) ) ); |
257 | 258 | ||
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 00d0e07..544350c 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp | |||
@@ -13,86 +13,85 @@ | |||
13 | #include "output.h" | 13 | #include "output.h" |
14 | #include "filePermissions.h" | 14 | #include "filePermissions.h" |
15 | 15 | ||
16 | #include <opie/otabwidget.h> | 16 | #include <opie/otabwidget.h> |
17 | #include <opie/oprocess.h> | 17 | #include <opie/oprocess.h> |
18 | 18 | ||
19 | #include <qpe/lnkproperties.h> | 19 | #include <qpe/lnkproperties.h> |
20 | #include <qpe/qpeapplication.h> | 20 | #include <qpe/qpeapplication.h> |
21 | #include <qpe/resource.h> | 21 | #include <qpe/resource.h> |
22 | #include <qpe/qcopenvelope_qws.h> | 22 | #include <qpe/qcopenvelope_qws.h> |
23 | #include <qpe/applnk.h> | 23 | #include <qpe/applnk.h> |
24 | #include <qpe/ir.h> | 24 | #include <qpe/ir.h> |
25 | 25 | ||
26 | #include <qmessagebox.h> | 26 | #include <qmessagebox.h> |
27 | #include <qmultilineedit.h> | 27 | #include <qmultilineedit.h> |
28 | 28 | ||
29 | #include <qstring.h> | 29 | #include <qstring.h> |
30 | 30 | ||
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qpixmap.h> | 32 | #include <qpixmap.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qpopupmenu.h> | 34 | #include <qpopupmenu.h> |
35 | #include <qtabwidget.h> | 35 | #include <qtabwidget.h> |
36 | #include <qtoolbutton.h> | 36 | #include <qtoolbutton.h> |
37 | #include <qtabwidget.h> | ||
38 | #include <qlineedit.h> | 37 | #include <qlineedit.h> |
39 | #include <qlistview.h> | 38 | #include <qlistview.h> |
40 | 39 | ||
41 | #include <errno.h> | 40 | #include <errno.h> |
42 | #include <stdlib.h> | 41 | #include <stdlib.h> |
43 | #include <unistd.h> | 42 | #include <unistd.h> |
44 | #include <sys/stat.h> | 43 | #include <sys/stat.h> |
45 | #include <dirent.h> | 44 | #include <dirent.h> |
46 | #include <sys/sendfile.h> | 45 | #include <sys/sendfile.h> |
47 | #include <fcntl.h> | 46 | #include <fcntl.h> |
48 | 47 | ||
49 | 48 | ||
50 | void AdvancedFm::doDirChange() | 49 | void AdvancedFm::doDirChange() |
51 | { | 50 | { |
52 | ListClicked( CurrentView()->currentItem()); | 51 | ListClicked( CurrentView()->currentItem()); |
53 | } | 52 | } |
54 | 53 | ||
55 | void AdvancedFm::showMenuHidden() | 54 | void AdvancedFm::showMenuHidden() |
56 | { | 55 | { |
57 | if (b) | 56 | if (b) |
58 | { | 57 | { |
59 | CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 58 | CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
60 | OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 59 | OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
61 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); | 60 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); |
62 | // b=FALSE; | 61 | // b=FALSE; |
63 | 62 | ||
64 | } | 63 | } |
65 | else | 64 | else |
66 | { | 65 | { |
67 | CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); | 66 | CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); |
68 | OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); | 67 | OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); |
69 | fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); | 68 | fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); |
70 | // b=TRUE; | 69 | // b=TRUE; |
71 | } | 70 | } |
72 | rePopulate(); | 71 | rePopulate(); |
73 | // if(b) qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<< true"); | 72 | // if(b) qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<< true"); |
74 | if(b) b = false; else b = true; | 73 | b = !b; |
75 | } | 74 | } |
76 | 75 | ||
77 | void AdvancedFm::showHidden() | 76 | void AdvancedFm::showHidden() |
78 | { | 77 | { |
79 | if (b) | 78 | if (b) |
80 | { | 79 | { |
81 | CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 80 | CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
82 | OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 81 | OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
83 | // fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); | 82 | // fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); |
84 | // b=FALSE; | 83 | // b=FALSE; |
85 | 84 | ||
86 | } | 85 | } |
87 | else | 86 | else |
88 | { | 87 | { |
89 | CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); | 88 | CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); |
90 | OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); | 89 | OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); |
91 | // fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); | 90 | // fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); |
92 | // b=TRUE; | 91 | // b=TRUE; |
93 | } | 92 | } |
94 | rePopulate(); | 93 | rePopulate(); |
95 | } | 94 | } |
96 | 95 | ||
97 | QString AdvancedFm::dealWithSymName(const QString &fileName) | 96 | QString AdvancedFm::dealWithSymName(const QString &fileName) |
98 | { | 97 | { |
@@ -499,51 +498,51 @@ void AdvancedFm::move() | |||
499 | QString destFile = thatDir->canonicalPath(); | 498 | QString destFile = thatDir->canonicalPath(); |
500 | 499 | ||
501 | if(destFile.right(1).find("/",0,TRUE) == -1) | 500 | if(destFile.right(1).find("/",0,TRUE) == -1) |
502 | destFile+="/"; | 501 | destFile+="/"; |
503 | destFile += item; | 502 | destFile += item; |
504 | qDebug("Destination file is "+destFile); | 503 | qDebug("Destination file is "+destFile); |
505 | 504 | ||
506 | curFile = thisDir->canonicalPath(); | 505 | curFile = thisDir->canonicalPath(); |
507 | if(curFile.right(1).find("/",0,TRUE) == -1) | 506 | if(curFile.right(1).find("/",0,TRUE) == -1) |
508 | curFile +="/"; | 507 | curFile +="/"; |
509 | curFile+= item; | 508 | curFile+= item; |
510 | qDebug("CurrentFile file is " + curFile); | 509 | qDebug("CurrentFile file is " + curFile); |
511 | 510 | ||
512 | QFile f( curFile); | 511 | QFile f( curFile); |
513 | if( f.exists()) { | 512 | if( f.exists()) { |
514 | if( !copyFile( curFile, destFile) ) { | 513 | if( !copyFile( curFile, destFile) ) { |
515 | QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile); | 514 | QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile); |
516 | return; | 515 | return; |
517 | } else | 516 | } else |
518 | QFile::remove(curFile); | 517 | QFile::remove(curFile); |
519 | } | 518 | } |
520 | } | 519 | } |
521 | 520 | ||
522 | } | 521 | } |
523 | setOtherTabCurrent(); | 522 | populateView(); |
524 | populateView(); | 523 | setOtherTabCurrent(); |
525 | // populateLocalView(); | 524 | populateView(); |
526 | } | 525 | } |
527 | 526 | ||
528 | bool AdvancedFm::copyFile( const QString & src, const QString & dest ) | 527 | bool AdvancedFm::copyFile( const QString & src, const QString & dest ) |
529 | { | 528 | { |
530 | bool success = true; | 529 | bool success = true; |
531 | struct stat status; | 530 | struct stat status; |
532 | QFile srcFile(src); | 531 | QFile srcFile(src); |
533 | QFile destFile(dest); | 532 | QFile destFile(dest); |
534 | int err=0; | 533 | int err=0; |
535 | int read_fd=0; | 534 | int read_fd=0; |
536 | int write_fd=0; | 535 | int write_fd=0; |
537 | struct stat stat_buf; | 536 | struct stat stat_buf; |
538 | off_t offset = 0; | 537 | off_t offset = 0; |
539 | if(!srcFile.open( IO_ReadOnly|IO_Raw)) { | 538 | if(!srcFile.open( IO_ReadOnly|IO_Raw)) { |
540 | qWarning("open failed"); | 539 | qWarning("open failed"); |
541 | return success = false; | 540 | return success = false; |
542 | } | 541 | } |
543 | read_fd = srcFile.handle(); | 542 | read_fd = srcFile.handle(); |
544 | if(read_fd != -1) { | 543 | if(read_fd != -1) { |
545 | fstat (read_fd, &stat_buf); | 544 | fstat (read_fd, &stat_buf); |
546 | if( !destFile.open( IO_WriteOnly|IO_Raw ) ) { | 545 | if( !destFile.open( IO_WriteOnly|IO_Raw ) ) { |
547 | qWarning("destfile open failed"); | 546 | qWarning("destfile open failed"); |
548 | return success = false; | 547 | return success = false; |
549 | } | 548 | } |