author | drw <drw> | 2004-02-23 18:27:31 (UTC) |
---|---|---|
committer | drw <drw> | 2004-02-23 18:27:31 (UTC) |
commit | bce2a9995fa423f9fc796b46c548e47a45c9d247 (patch) (unidiff) | |
tree | d6af972e78fa2ca9721172a14ce2d83bae35c2bd | |
parent | 398c7d54acfc203ec90644d6c63e5b200391e906 (diff) | |
download | opie-bce2a9995fa423f9fc796b46c548e47a45c9d247.zip opie-bce2a9995fa423f9fc796b46c548e47a45c9d247.tar.gz opie-bce2a9995fa423f9fc796b46c548e47a45c9d247.tar.bz2 |
AdvancedFM: libopie->libopie2
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 206 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 12 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.pro | 10 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 10 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 161 | ||||
-rw-r--r-- | noncore/apps/advancedfm/config.in | 2 | ||||
-rw-r--r-- | noncore/apps/advancedfm/main.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/advancedfm/opie-advancedfm.control | 2 | ||||
-rw-r--r-- | noncore/apps/advancedfm/output.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/advancedfm/output.h | 18 |
10 files changed, 209 insertions, 222 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 9c13e53..5148172 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -14,8 +14,2 @@ | |||
14 | 14 | ||
15 | |||
16 | // #include <opie/ofileselector.h> | ||
17 | // #include <opie/ofiledialog.h> | ||
18 | |||
19 | #include <opie/osplitter.h> | ||
20 | |||
21 | #include <qpe/filemanager.h> | 15 | #include <qpe/filemanager.h> |
@@ -110,71 +104,71 @@ void AdvancedFm::populateView() { | |||
110 | // qWarning("PopulateView"); | 104 | // qWarning("PopulateView"); |
111 | QPixmap pm; | 105 | QPixmap pm; |
112 | QListView *thisView = CurrentView(); | 106 | QListView *thisView = CurrentView(); |
113 | QDir *thisDir = CurrentDir(); | 107 | QDir *thisDir = CurrentDir(); |
114 | QString path = thisDir->canonicalPath(); | 108 | QString path = thisDir->canonicalPath(); |
115 | 109 | ||
116 | //qWarning("path is "+path); | 110 | //qWarning("path is "+path); |
117 | thisView->clear(); | 111 | thisView->clear(); |
118 | thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); | 112 | thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); |
119 | thisDir->setMatchAllDirs(TRUE); | 113 | thisDir->setMatchAllDirs(TRUE); |
120 | thisDir->setNameFilter(filterStr); | 114 | thisDir->setNameFilter(filterStr); |
121 | QString fileL, fileS, fileDate; | 115 | QString fileL, fileS, fileDate; |
122 | QString fs= getFileSystemType((const QString &) path); | 116 | QString fs= getFileSystemType((const QString &) path); |
123 | setCaption(tr("AdvancedFm :: ")+fs+" :: " | 117 | setCaption(tr("AdvancedFm :: ")+fs+" :: " |
124 | +checkDiskSpace((const QString &) path)+ tr(" kB free") ); | 118 | +checkDiskSpace((const QString &) path)+ tr(" kB free") ); |
125 | bool isDir=FALSE; | 119 | bool isDir=FALSE; |
126 | const QFileInfoList *list = thisDir->entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/); | 120 | const QFileInfoList *list = thisDir->entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/); |
127 | QFileInfoListIterator it(*list); | 121 | QFileInfoListIterator it(*list); |
128 | QFileInfo *fi; | 122 | QFileInfo *fi; |
129 | while ( (fi=it.current()) ) { | 123 | while ( (fi=it.current()) ) { |
130 | if (fi->isSymLink() ) { | 124 | if (fi->isSymLink() ) { |
131 | QString symLink=fi->readLink(); | 125 | QString symLink=fi->readLink(); |
132 | QFileInfo sym( symLink); | 126 | QFileInfo sym( symLink); |
133 | fileS.sprintf( "%10i", sym.size() ); | 127 | fileS.sprintf( "%10i", sym.size() ); |
134 | fileL = fi->fileName() +" -> " + sym.filePath().data(); | 128 | fileL = fi->fileName() +" -> " + sym.filePath().data(); |
135 | fileDate = sym.lastModified().toString(); | 129 | fileDate = sym.lastModified().toString(); |
136 | } else { | 130 | } else { |
137 | fileS.sprintf( "%10i", fi->size() ); | 131 | fileS.sprintf( "%10i", fi->size() ); |
138 | fileL = fi->fileName(); | 132 | fileL = fi->fileName(); |
139 | fileDate= fi->lastModified().toString(); | 133 | fileDate= fi->lastModified().toString(); |
140 | if( QDir(QDir::cleanDirPath( path +"/"+fileL)).exists() ) { | 134 | if( QDir(QDir::cleanDirPath( path +"/"+fileL)).exists() ) { |
141 | // if(fileL == "..") | 135 | // if(fileL == "..") |
142 | fileL += "/"; | 136 | fileL += "/"; |
143 | isDir=TRUE; | 137 | isDir=TRUE; |
144 | } | 138 | } |
145 | } | 139 | } |
146 | QFileInfo fileInfo( path + "/" + fileL); | 140 | QFileInfo fileInfo( path + "/" + fileL); |
147 | 141 | ||
148 | if(fileL !="./" && fi->exists()) { | 142 | if(fileL !="./" && fi->exists()) { |
149 | item = new QListViewItem( thisView, fileL, fileS , fileDate); | 143 | item = new QListViewItem( thisView, fileL, fileS , fileDate); |
150 | 144 | ||
151 | if(isDir || fileL.find("/",0,TRUE) != -1) { | 145 | if(isDir || fileL.find("/",0,TRUE) != -1) { |
152 | 146 | ||
153 | if( !QDir( fi->filePath() ).isReadable()) //is directory | 147 | if( !QDir( fi->filePath() ).isReadable()) //is directory |
154 | pm = Resource::loadPixmap( "lockedfolder" ); | 148 | pm = Resource::loadPixmap( "lockedfolder" ); |
155 | else | 149 | else |
156 | pm= Resource::loadPixmap( "folder" ); | 150 | pm= Resource::loadPixmap( "folder" ); |
157 | } | 151 | } |
158 | else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) { | 152 | else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) { |
159 | pm = Resource::loadPixmap( "exec"); | 153 | pm = Resource::loadPixmap( "exec"); |
160 | } | 154 | } |
161 | else if( (fileInfo.permission( QFileInfo::ExeUser) | 155 | else if( (fileInfo.permission( QFileInfo::ExeUser) |
162 | | fileInfo.permission( QFileInfo::ExeGroup) | 156 | | fileInfo.permission( QFileInfo::ExeGroup) |
163 | | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) { | 157 | | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) { |
164 | pm = Resource::loadPixmap( "exec"); | 158 | pm = Resource::loadPixmap( "exec"); |
165 | } | 159 | } |
166 | else if( !fi->isReadable() ) { | 160 | else if( !fi->isReadable() ) { |
167 | pm = Resource::loadPixmap( "locked" ); | 161 | pm = Resource::loadPixmap( "locked" ); |
168 | } | 162 | } |
169 | else { //everything else goes by mimetype | 163 | else { //everything else goes by mimetype |
170 | MimeType mt(fi->filePath()); | 164 | MimeType mt(fi->filePath()); |
171 | pm=mt.pixmap(); //sets the correct pixmap for mimetype | 165 | pm=mt.pixmap(); //sets the correct pixmap for mimetype |
172 | if(pm.isNull()) { | 166 | if(pm.isNull()) { |
173 | pm = unknownXpm; | 167 | pm = unknownXpm; |
174 | } | 168 | } |
175 | } | 169 | } |
176 | if( fi->isSymLink() || fileL.find("->",0,TRUE) != -1) { | 170 | if( fi->isSymLink() || fileL.find("->",0,TRUE) != -1) { |
177 | // qDebug(" overlay link image"); | 171 | // qDebug(" overlay link image"); |
178 | pm= Resource::loadPixmap( "advancedfm/symlink" ); | 172 | pm= Resource::loadPixmap( "advancedfm/symlink" ); |
179 | // pm= Resource::loadPixmap( "folder" ); | 173 | // pm= Resource::loadPixmap( "folder" ); |
180 | // QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); | 174 | // QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); |
@@ -183,36 +177,36 @@ void AdvancedFm::populateView() { | |||
183 | // pm.setMask( pm.createHeuristicMask( FALSE ) ); | 177 | // pm.setMask( pm.createHeuristicMask( FALSE ) ); |
184 | } | 178 | } |
185 | item->setPixmap( 0,pm); | 179 | item->setPixmap( 0,pm); |
186 | 180 | ||
187 | } | 181 | } |
188 | isDir=FALSE; | 182 | isDir=FALSE; |
189 | ++it; | 183 | ++it; |
190 | } | 184 | } |
191 | 185 | ||
192 | if( path.find("dev",0,TRUE) != -1) { | 186 | if( path.find("dev",0,TRUE) != -1) { |
193 | struct stat buf; | 187 | struct stat buf; |
194 | dev_t devT; | 188 | dev_t devT; |
195 | DIR *dir; | 189 | DIR *dir; |
196 | struct dirent *mydirent; | 190 | struct dirent *mydirent; |
197 | 191 | ||
198 | if((dir = opendir( path.latin1())) != NULL) | 192 | if((dir = opendir( path.latin1())) != NULL) |
199 | while ((mydirent = readdir(dir)) != NULL) { | 193 | while ((mydirent = readdir(dir)) != NULL) { |
200 | lstat( mydirent->d_name, &buf); | 194 | lstat( mydirent->d_name, &buf); |
201 | // qDebug(mydirent->d_name); | 195 | // qDebug(mydirent->d_name); |
202 | fileL.sprintf("%s", mydirent->d_name); | 196 | fileL.sprintf("%s", mydirent->d_name); |
203 | devT = buf.st_dev; | 197 | devT = buf.st_dev; |
204 | fileS.sprintf("%d, %d", (int) ( devT >>8) &0xFF, (int)devT &0xFF); | 198 | fileS.sprintf("%d, %d", (int) ( devT >>8) &0xFF, (int)devT &0xFF); |
205 | fileDate.sprintf("%s", ctime( &buf.st_mtime)); | 199 | fileDate.sprintf("%s", ctime( &buf.st_mtime)); |
206 | if( fileL.find(".") == -1 ) { | 200 | if( fileL.find(".") == -1 ) { |
207 | item= new QListViewItem( thisView, fileL, fileS, fileDate); | 201 | item= new QListViewItem( thisView, fileL, fileS, fileDate); |
208 | pm = unknownXpm; | 202 | pm = unknownXpm; |
209 | item->setPixmap( 0,pm); | 203 | item->setPixmap( 0,pm); |
210 | } | 204 | } |
211 | } | 205 | } |
212 | 206 | ||
213 | closedir(dir); | 207 | closedir(dir); |
214 | } | 208 | } |
215 | 209 | ||
216 | thisView->setSorting( 3,FALSE); | 210 | thisView->setSorting( 3,FALSE); |
217 | fillCombo( (const QString &) path ); | 211 | fillCombo( (const QString &) path ); |
218 | } | 212 | } |
@@ -785,3 +779,3 @@ void AdvancedFm::gotoCustomDir(const QString &dir) { | |||
785 | QDir *AdvancedFm::CurrentDir() { | 779 | QDir *AdvancedFm::CurrentDir() { |
786 | 780 | ||
787 | if ( whichTab == 1) { | 781 | if ( whichTab == 1) { |
@@ -826,3 +820,3 @@ void AdvancedFm::setOtherTabCurrent() { | |||
826 | OtherView()->setFocus(); | 820 | OtherView()->setFocus(); |
827 | OtherView()->setSelected( CurrentView()->firstChild(), true); | 821 | OtherView()->setSelected( CurrentView()->firstChild(), true); |
828 | } | 822 | } |
@@ -866,3 +860,3 @@ void AdvancedFm::gotoDirectory(const QString &file) { | |||
866 | } | 860 | } |
867 | 861 | ||
868 | } | 862 | } |
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index bfefa77..547fa7c 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h | |||
@@ -16,4 +16,4 @@ | |||
16 | 16 | ||
17 | //#include <opie/otabwidget.h> | 17 | #include <opie2/oprocess.h> |
18 | #include <opie/oprocess.h> | 18 | #include <opie2/osplitter.h> |
19 | 19 | ||
@@ -32,3 +32,4 @@ | |||
32 | 32 | ||
33 | class OSplitter; | 33 | using Opie::OSplitter; |
34 | |||
34 | class QVBoxLayout; | 35 | class QVBoxLayout; |
@@ -42,3 +43,2 @@ class QProgressBar; | |||
42 | class QSpinBox; | 43 | class QSpinBox; |
43 | class QTabWidget; | ||
44 | class QWidget; | 44 | class QWidget; |
@@ -163,3 +163,3 @@ protected slots: | |||
163 | // void navigateToSelected(); | 163 | // void navigateToSelected(); |
164 | bool moveDirectory( const QString & , const QString & ); | 164 | bool moveDirectory( const QString & , const QString & ); |
165 | // void slotSwitchtoLocal(int); | 165 | // void slotSwitchtoLocal(int); |
@@ -188,3 +188,3 @@ private slots: | |||
188 | void setDocument(const QString &); | 188 | void setDocument(const QString &); |
189 | 189 | ||
190 | }; | 190 | }; |
diff --git a/noncore/apps/advancedfm/advancedfm.pro b/noncore/apps/advancedfm/advancedfm.pro index 70db018..ca9856b 100644 --- a/noncore/apps/advancedfm/advancedfm.pro +++ b/noncore/apps/advancedfm/advancedfm.pro | |||
@@ -8,8 +8,8 @@ INCLUDEPATH += $(OPIEDIR)/include | |||
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe -lopie | 9 | LIBS += -lqpe -lopiecore2 -lopieui2 |
10 | 10 | ||
11 | TRANSLATIONS = ../../../i18n/de/advancedfm.ts \ | 11 | TRANSLATIONS = ../../../i18n/de/advancedfm.ts \ |
12 | ../../../i18n/nl/advancedfm.ts \ | 12 | ../../../i18n/nl/advancedfm.ts \ |
13 | ../../../i18n/da/advancedfm.ts \ | 13 | ../../../i18n/da/advancedfm.ts \ |
14 | ../../../i18n/xx/advancedfm.ts \ | 14 | ../../../i18n/xx/advancedfm.ts \ |
15 | ../../../i18n/en/advancedfm.ts \ | 15 | ../../../i18n/en/advancedfm.ts \ |
@@ -29,3 +29,3 @@ TRANSLATIONS = ../../../i18n/de/advancedfm.ts \ | |||
29 | 29 | ||
30 | !contains(CONFIG,quick-app) { | 30 | !contains(CONFIG,quick-app) { |
31 | DESTDIR = $(OPIEDIR)/bin | 31 | DESTDIR = $(OPIEDIR)/bin |
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index ddaa39a..763ae34 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -13,5 +13,3 @@ | |||
13 | 13 | ||
14 | #include <opie/osplitter.h> | ||
15 | #include <qpe/storage.h> | 14 | #include <qpe/storage.h> |
16 | |||
17 | #include <qpe/qpeapplication.h> | 15 | #include <qpe/qpeapplication.h> |
@@ -131,3 +129,3 @@ void AdvancedFm::init() { | |||
131 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 129 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
132 | currentPathCombo->setFocusPolicy(NoFocus); | 130 | currentPathCombo->setFocusPolicy(NoFocus); |
133 | layout->addWidget( lineBox ); | 131 | layout->addWidget( lineBox ); |
@@ -155,3 +153,3 @@ void AdvancedFm::init() { | |||
155 | Local_View->installEventFilter( this ); | 153 | Local_View->installEventFilter( this ); |
156 | 154 | ||
157 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); | 155 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); |
@@ -179,3 +177,3 @@ void AdvancedFm::init() { | |||
179 | Remote_View->installEventFilter( this ); | 177 | Remote_View->installEventFilter( this ); |
180 | 178 | ||
181 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); | 179 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); |
@@ -213,3 +211,3 @@ void AdvancedFm::init() { | |||
213 | zaurusDevice=TRUE; | 211 | zaurusDevice=TRUE; |
214 | else | 212 | else |
215 | zaurusDevice=FALSE; | 213 | zaurusDevice=FALSE; |
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 78f9da2..18bbd43 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp | |||
@@ -15,5 +15,2 @@ | |||
15 | 15 | ||
16 | #include <opie/otabwidget.h> | ||
17 | #include <opie/oprocess.h> | ||
18 | |||
19 | #include <qpe/lnkproperties.h> | 16 | #include <qpe/lnkproperties.h> |
@@ -71,3 +68,3 @@ void AdvancedFm::showMenuHidden() { | |||
71 | b = !b; | 68 | b = !b; |
72 | populateView(); | 69 | populateView(); |
73 | } | 70 | } |
@@ -82,3 +79,3 @@ void AdvancedFm::showHidden() { | |||
82 | } | 79 | } |
83 | populateView(); | 80 | populateView(); |
84 | } | 81 | } |
@@ -148,3 +145,3 @@ void AdvancedFm::makeDir() { | |||
148 | } | 145 | } |
149 | populateView(); | 146 | populateView(); |
150 | } | 147 | } |
@@ -185,3 +182,3 @@ void AdvancedFm::doDelete() { | |||
185 | 182 | ||
186 | switch ( QMessageBox::warning( this, tr("Delete Directory?"), | 183 | switch ( QMessageBox::warning( this, tr("Delete Directory?"), |
187 | tr("Really delete %1\nand all it's contents ?" ).arg( f ) , | 184 | tr("Really delete %1\nand all it's contents ?" ).arg( f ) , |
@@ -193,3 +190,3 @@ void AdvancedFm::doDelete() { | |||
193 | startProcess( (const QString)cmd.latin1() ); | 190 | startProcess( (const QString)cmd.latin1() ); |
194 | populateView(); | 191 | populateView(); |
195 | } | 192 | } |
@@ -211,3 +208,3 @@ void AdvancedFm::doDelete() { | |||
211 | } | 208 | } |
212 | 209 | ||
213 | QString cmd="rm "+f; | 210 | QString cmd="rm "+f; |
@@ -217,3 +214,3 @@ void AdvancedFm::doDelete() { | |||
217 | // qDebug("remove link files "+myFile); | 214 | // qDebug("remove link files "+myFile); |
218 | 215 | ||
219 | // DocLnk lnk(f); | 216 | // DocLnk lnk(f); |
@@ -230,3 +227,3 @@ void AdvancedFm::doDelete() { | |||
230 | } | 227 | } |
231 | populateView(); | 228 | populateView(); |
232 | } | 229 | } |
@@ -246,3 +243,3 @@ void AdvancedFm::filePerms() { | |||
246 | } | 243 | } |
247 | populateView(); | 244 | populateView(); |
248 | } | 245 | } |
@@ -278,3 +275,3 @@ void AdvancedFm::upDir() { | |||
278 | 275 | ||
279 | populateView(); | 276 | populateView(); |
280 | update(); | 277 | update(); |
@@ -339,4 +336,4 @@ void AdvancedFm::copy() { | |||
339 | } | 336 | } |
340 | setOtherTabCurrent(); | 337 | setOtherTabCurrent(); |
341 | rePopulate(); | 338 | rePopulate(); |
342 | } | 339 | } |
@@ -389,4 +386,4 @@ void AdvancedFm::copyAs() { | |||
389 | } | 386 | } |
390 | rePopulate(); | 387 | rePopulate(); |
391 | setOtherTabCurrent(); | 388 | setOtherTabCurrent(); |
392 | } | 389 | } |
@@ -438,3 +435,3 @@ void AdvancedFm::copySameDir() { | |||
438 | } | 435 | } |
439 | rePopulate(); | 436 | rePopulate(); |
440 | } | 437 | } |
@@ -461,3 +458,3 @@ void AdvancedFm::move() { | |||
461 | if(curFile.right(1).find("/",0,TRUE) == -1) | 458 | if(curFile.right(1).find("/",0,TRUE) == -1) |
462 | curFile +="/"; | 459 | curFile +="/"; |
463 | curFile+= item; | 460 | curFile+= item; |
@@ -466,20 +463,20 @@ void AdvancedFm::move() { | |||
466 | if(QFileInfo(curFile).isDir()) { | 463 | if(QFileInfo(curFile).isDir()) { |
467 | moveDirectory( curFile, destFile ); | 464 | moveDirectory( curFile, destFile ); |
468 | rePopulate(); | 465 | rePopulate(); |
469 | return; | 466 | return; |
470 | } | 467 | } |
471 | 468 | ||
472 | QFile f( curFile); | 469 | QFile f( curFile); |
473 | if( f.exists()) { | 470 | if( f.exists()) { |
474 | if( !copyFile( curFile, destFile) ) { | 471 | if( !copyFile( curFile, destFile) ) { |
475 | QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile); | 472 | QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile); |
476 | return; | 473 | return; |
477 | } else | 474 | } else |
478 | QFile::remove(curFile); | 475 | QFile::remove(curFile); |
479 | } | 476 | } |
480 | } | 477 | } |
481 | 478 | ||
482 | } | 479 | } |
483 | rePopulate(); | 480 | rePopulate(); |
484 | setOtherTabCurrent(); | 481 | setOtherTabCurrent(); |
485 | } | 482 | } |
@@ -487,13 +484,13 @@ void AdvancedFm::move() { | |||
487 | bool AdvancedFm::moveDirectory( const QString & src, const QString & dest ) { | 484 | bool AdvancedFm::moveDirectory( const QString & src, const QString & dest ) { |
488 | int err = 0; | 485 | int err = 0; |
489 | if( copyDirectory( src, dest ) ) { QString cmd = "rm -rf " + src; | 486 | if( copyDirectory( src, dest ) ) { QString cmd = "rm -rf " + src; |
490 | err = system((const char*)cmd); | 487 | err = system((const char*)cmd); |
491 | } else | 488 | } else |
492 | err = -1; | 489 | err = -1; |
493 | 490 | ||
494 | if(err!=0) { | 491 | if(err!=0) { |
495 | QMessageBox::message(tr("Note"),tr("Could not move\n") + src); | 492 | QMessageBox::message(tr("Note"),tr("Could not move\n") + src); |
496 | return false; | 493 | return false; |
497 | } | 494 | } |
498 | return true; | 495 | return true; |
499 | } | 496 | } |
@@ -502,14 +499,14 @@ bool AdvancedFm::copyDirectory( const QString & src, const QString & dest ) { | |||
502 | 499 | ||
503 | QStringcmd = "/bin/cp -fpR " + src + " " + dest; | 500 | QString cmd = "/bin/cp -fpR " + src + " " + dest; |
504 | qWarning(cmd); | 501 | qWarning(cmd); |
505 | interr = system( (const char *) cmd ); | 502 | int err = system( (const char *) cmd ); |
506 | if ( err != 0 ) { | 503 | if ( err != 0 ) { |
507 | QMessageBox::message("AdvancedFm", | 504 | QMessageBox::message("AdvancedFm", |
508 | tr( "Could not copy \n%1 \nto \n%2").arg( src ).arg( dest ) ); | 505 | tr( "Could not copy \n%1 \nto \n%2").arg( src ).arg( dest ) ); |
509 | return false; | 506 | return false; |
510 | } | 507 | } |
511 | 508 | ||
512 | return true; | 509 | return true; |
513 | } | 510 | } |
514 | 511 | ||
515 | 512 | ||
@@ -517,20 +514,20 @@ bool AdvancedFm::copyFile( const QString & src, const QString & dest ) { | |||
517 | 514 | ||
518 | 515 | ||
519 | if(QFileInfo(src).isDir()) { | 516 | if(QFileInfo(src).isDir()) { |
520 | if( copyDirectory( src, dest )) { | 517 | if( copyDirectory( src, dest )) { |
521 | setOtherTabCurrent(); | 518 | setOtherTabCurrent(); |
522 | populateView(); | 519 | populateView(); |
523 | return true; | 520 | return true; |
524 | } | 521 | } |
525 | else | 522 | else |
526 | return false; | 523 | return false; |
527 | } | 524 | } |
528 | 525 | ||
529 | 526 | ||
530 | bool success = true; | 527 | bool success = true; |
531 | struct stat status; | 528 | struct stat status; |
532 | QFile srcFile(src); | 529 | QFile srcFile(src); |
533 | QFile destFile(dest); | 530 | QFile destFile(dest); |
534 | int err=0; | 531 | int err=0; |
535 | int read_fd=0; | 532 | int read_fd=0; |
536 | int write_fd=0; | 533 | int write_fd=0; |
@@ -549,3 +546,3 @@ bool AdvancedFm::copyFile( const QString & src, const QString & dest ) { | |||
549 | } | 546 | } |
550 | write_fd = destFile.handle(); | 547 | write_fd = destFile.handle(); |
551 | if(write_fd != -1) { | 548 | if(write_fd != -1) { |
@@ -679,5 +676,5 @@ void AdvancedFm::mkSym() { | |||
679 | } | 676 | } |
680 | rePopulate(); | 677 | rePopulate(); |
681 | setOtherTabCurrent(); | 678 | setOtherTabCurrent(); |
682 | } | 679 | } |
683 | } | 680 | } |
@@ -733,3 +730,3 @@ void AdvancedFm::startProcess(const QString & cmd) { | |||
733 | void AdvancedFm::processEnded(OProcess *) { | 730 | void AdvancedFm::processEnded(OProcess *) { |
734 | rePopulate(); | 731 | rePopulate(); |
735 | } | 732 | } |
@@ -799,3 +796,3 @@ void AdvancedFm::doRename(QListView * view) { | |||
799 | 796 | ||
800 | if ( r.width() > view->visibleWidth() ) | 797 | if ( r.width() > view->visibleWidth() ) |
801 | r.setWidth( view->visibleWidth() ); | 798 | r.setWidth( view->visibleWidth() ); |
@@ -812,7 +809,7 @@ void AdvancedFm::doRename(QListView * view) { | |||
812 | 809 | ||
813 | renameBox->resize( r.size() ); | 810 | renameBox->resize( r.size() ); |
814 | 811 | ||
815 | view->viewport()->setFocusProxy( renameBox ); | 812 | view->viewport()->setFocusProxy( renameBox ); |
816 | 813 | ||
817 | renameBox->setFocus(); | 814 | renameBox->setFocus(); |
818 | renameBox->show(); | 815 | renameBox->show(); |
@@ -822,5 +819,5 @@ void AdvancedFm::doRename(QListView * view) { | |||
822 | void AdvancedFm::renameIt() { | 819 | void AdvancedFm::renameIt() { |
823 | if( !CurrentView()->currentItem()) return; | 820 | if( !CurrentView()->currentItem()) return; |
824 | 821 | ||
825 | QListView *thisView = CurrentView(); | 822 | QListView *thisView = CurrentView(); |
826 | oldName = thisView->currentItem()->text(0); | 823 | oldName = thisView->currentItem()->text(0); |
@@ -833,4 +830,4 @@ void AdvancedFm::okRename() { | |||
833 | QString newName = renameBox->text(); | 830 | QString newName = renameBox->text(); |
834 | cancelRename(); | 831 | cancelRename(); |
835 | QListView * view = CurrentView(); | 832 | QListView * view = CurrentView(); |
836 | QString path = CurrentDir()->canonicalPath() + "/"; | 833 | QString path = CurrentDir()->canonicalPath() + "/"; |
@@ -844,3 +841,3 @@ void AdvancedFm::okRename() { | |||
844 | delete view->currentItem(); | 841 | delete view->currentItem(); |
845 | rePopulate(); | 842 | rePopulate(); |
846 | } | 843 | } |
diff --git a/noncore/apps/advancedfm/config.in b/noncore/apps/advancedfm/config.in index 72a1f1b..0ba1487 100644 --- a/noncore/apps/advancedfm/config.in +++ b/noncore/apps/advancedfm/config.in | |||
@@ -3,2 +3,2 @@ | |||
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI |
diff --git a/noncore/apps/advancedfm/main.cpp b/noncore/apps/advancedfm/main.cpp index 51e38dc..3c1a164 100644 --- a/noncore/apps/advancedfm/main.cpp +++ b/noncore/apps/advancedfm/main.cpp | |||
@@ -12,5 +12,2 @@ | |||
12 | ***************************************************************************/ | 12 | ***************************************************************************/ |
13 | #include <qpe/qpeapplication.h> | ||
14 | |||
15 | |||
16 | 13 | ||
@@ -19,2 +16,5 @@ | |||
19 | #ifdef NOQUICKLAUNCH | 16 | #ifdef NOQUICKLAUNCH |
17 | |||
18 | #include <qpe/qpeapplication.h> | ||
19 | |||
20 | int main(int argc, char *argv[]) | 20 | int main(int argc, char *argv[]) |
@@ -28,3 +28,3 @@ int main(int argc, char *argv[]) | |||
28 | #else | 28 | #else |
29 | #include <opie/oapplicationfactory.h> | 29 | #include <opie2/oapplicationfactory.h> |
30 | 30 | ||
diff --git a/noncore/apps/advancedfm/opie-advancedfm.control b/noncore/apps/advancedfm/opie-advancedfm.control index 5bab6ab..bb311c1 100644 --- a/noncore/apps/advancedfm/opie-advancedfm.control +++ b/noncore/apps/advancedfm/opie-advancedfm.control | |||
@@ -6,3 +6,3 @@ Maintainer: L.J. Potter <lpotter@trolltech.com> | |||
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: task-opie-minimal | 7 | Depends: task-opie-minimal, libopiecore2, libopieui2 |
8 | Description: Advanced File Manager | 8 | Description: Advanced File Manager |
diff --git a/noncore/apps/advancedfm/output.cpp b/noncore/apps/advancedfm/output.cpp index 33abdfc..7dc2416 100644 --- a/noncore/apps/advancedfm/output.cpp +++ b/noncore/apps/advancedfm/output.cpp | |||
@@ -7,4 +7,2 @@ | |||
7 | 7 | ||
8 | #include <opie/oprocess.h> | ||
9 | |||
10 | #include <qpe/qpeapplication.h> | 8 | #include <qpe/qpeapplication.h> |
diff --git a/noncore/apps/advancedfm/output.h b/noncore/apps/advancedfm/output.h index 199a684..26c0fa0 100644 --- a/noncore/apps/advancedfm/output.h +++ b/noncore/apps/advancedfm/output.h | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | #include <opie/oprocess.h> | 19 | #include <opie2/oprocess.h> |
20 | 20 | ||
21 | class QVBoxLayout; | 21 | class QVBoxLayout; |
22 | class QHBoxLayout; | 22 | class QHBoxLayout; |
23 | class QGridLayout; | 23 | class QGridLayout; |
24 | class QMultiLineEdit; | 24 | class QMultiLineEdit; |
@@ -26,3 +26,3 @@ class QMultiLineEdit; | |||
26 | class Output : public QDialog | 26 | class Output : public QDialog |
27 | { | 27 | { |
28 | Q_OBJECT | 28 | Q_OBJECT |
@@ -46,3 +46,3 @@ protected slots: | |||
46 | QString cmmd; | 46 | QString cmmd; |
47 | 47 | ||
48 | }; | 48 | }; |
@@ -50,3 +50,3 @@ protected slots: | |||
50 | class InputDialog : public QDialog | 50 | class InputDialog : public QDialog |
51 | { | 51 | { |
52 | Q_OBJECT | 52 | Q_OBJECT |
@@ -58,6 +58,6 @@ public: | |||
58 | QLineEdit* LineEdit1; | 58 | QLineEdit* LineEdit1; |
59 | void setInputText(const QString &); | 59 | void setInputText(const QString &); |
60 | private slots: | 60 | private slots: |
61 | void returned(); | 61 | void returned(); |
62 | 62 | ||
63 | }; | 63 | }; |