author | drw <drw> | 2005-05-16 20:38:10 (UTC) |
---|---|---|
committer | drw <drw> | 2005-05-16 20:38:10 (UTC) |
commit | 28503944437feb62c0f2c0a8314385bbca3e9eaf (patch) (unidiff) | |
tree | 2b613d2b1bde21bf3e002bb4dc8c474c4d781fe1 /noncore/apps/advancedfm/advancedfm.cpp | |
parent | 348314c7411500e23ca467289ed92e446be9121b (diff) | |
download | opie-28503944437feb62c0f2c0a8314385bbca3e9eaf.zip opie-28503944437feb62c0f2c0a8314385bbca3e9eaf.tar.gz opie-28503944437feb62c0f2c0a8314385bbca3e9eaf.tar.bz2 |
Resource -> OResource
Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 979549d..828f5a1 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -13,14 +13,13 @@ | |||
13 | #include "advancedfm.h" | 13 | #include "advancedfm.h" |
14 | 14 | ||
15 | #include <opie2/odebug.h> | 15 | #include <opie2/odebug.h> |
16 | 16 | #include <opie2/oresource.h> | |
17 | #include <opie2/ostorageinfo.h> | 17 | #include <opie2/ostorageinfo.h> |
18 | 18 | ||
19 | #include <qpe/qpeapplication.h> | 19 | #include <qpe/qpeapplication.h> |
20 | #include <qpe/config.h> | 20 | #include <qpe/config.h> |
21 | #include <qpe/mimetype.h> | 21 | #include <qpe/mimetype.h> |
22 | #include <qpe/applnk.h> | 22 | #include <qpe/applnk.h> |
23 | #include <qpe/resource.h> | ||
24 | #include <qpe/menubutton.h> | 23 | #include <qpe/menubutton.h> |
25 | 24 | ||
26 | #include <qcombobox.h> | 25 | #include <qcombobox.h> |
@@ -44,7 +43,7 @@ AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) | |||
44 | init(); | 43 | init(); |
45 | renameBox = 0; | 44 | renameBox = 0; |
46 | whichTab = 1; | 45 | whichTab = 1; |
47 | unknownXpm = Resource::loadImage("UnknownDocument").smoothScale(AppLnk::smallIconSize(),AppLnk::smallIconSize() ); | 46 | unknownXpm = Opie::Core::OResource::loadImage("UnknownDocument", Opie::Core::OResource::SmallIcon); |
48 | 47 | ||
49 | initConnections(); | 48 | initConnections(); |
50 | rePopulate(); | 49 | rePopulate(); |
@@ -136,20 +135,20 @@ void AdvancedFm::populateView() { | |||
136 | if(isDir || fileL.find("/",0,TRUE) != -1) { | 135 | if(isDir || fileL.find("/",0,TRUE) != -1) { |
137 | 136 | ||
138 | if( !QDir( fi->filePath() ).isReadable()) //is directory | 137 | if( !QDir( fi->filePath() ).isReadable()) //is directory |
139 | pm.convertFromImage( Resource::loadImage( "lockedfolder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 138 | pm = Opie::Core::OResource::loadPixmap( "lockedfolder", Opie::Core::OResource::SmallIcon ); |
140 | else | 139 | else |
141 | pm.convertFromImage( Resource::loadImage( "folder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 140 | pm = Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ); |
142 | } | 141 | } |
143 | else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) { | 142 | else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) { |
144 | pm.convertFromImage( Resource::loadImage( "exec" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 143 | pm = Opie::Core::OResource::loadPixmap( "exec", Opie::Core::OResource::SmallIcon ); |
145 | } | 144 | } |
146 | else if( (fileInfo.permission( QFileInfo::ExeUser) | 145 | else if( (fileInfo.permission( QFileInfo::ExeUser) |
147 | | fileInfo.permission( QFileInfo::ExeGroup) | 146 | | fileInfo.permission( QFileInfo::ExeGroup) |
148 | | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) { | 147 | | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) { |
149 | pm.convertFromImage( Resource::loadImage( "exec" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 148 | pm = Opie::Core::OResource::loadPixmap( "exec", Opie::Core::OResource::SmallIcon ); |
150 | } | 149 | } |
151 | else if( !fi->isReadable() ) { | 150 | else if( !fi->isReadable() ) { |
152 | pm.convertFromImage( Resource::loadImage( "locked" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 151 | pm = Opie::Core::OResource::loadPixmap( "locked", Opie::Core::OResource::SmallIcon ); |
153 | } | 152 | } |
154 | else { //everything else goes by mimetype | 153 | else { //everything else goes by mimetype |
155 | MimeType mt(fi->filePath()); | 154 | MimeType mt(fi->filePath()); |
@@ -160,12 +159,7 @@ void AdvancedFm::populateView() { | |||
160 | } | 159 | } |
161 | if( fi->isSymLink() || fileL.find("->",0,TRUE) != -1) { | 160 | if( fi->isSymLink() || fileL.find("->",0,TRUE) != -1) { |
162 | // odebug << " overlay link image" << oendl; | 161 | // odebug << " overlay link image" << oendl; |
163 | pm.convertFromImage( Resource::loadImage( "advancedfm/symlink" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 162 | pm = Opie::Core::OResource::loadPixmap( "advancedfm/symlink", Opie::Core::OResource::SmallIcon ); |
164 | // pm= Resource::loadPixmap( "folder" ); | ||
165 | // QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); | ||
166 | // QPainter painter( &pm ); | ||
167 | // painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); | ||
168 | // pm.setMask( pm.createHeuristicMask( FALSE ) ); | ||
169 | } | 163 | } |
170 | item->setPixmap( 0, pm ); | 164 | item->setPixmap( 0, pm ); |
171 | 165 | ||
@@ -460,7 +454,8 @@ void AdvancedFm::showFileMenu() { | |||
460 | m->insertItem(app->pixmap(),tr("Open in " + app->name()),this,SLOT(runThis())); | 454 | m->insertItem(app->pixmap(),tr("Open in " + app->name()),this,SLOT(runThis())); |
461 | else if(QFileInfo(fi).isExecutable() ) //damn opie doesnt like this | 455 | else if(QFileInfo(fi).isExecutable() ) //damn opie doesnt like this |
462 | m->insertItem(tr("Execute"),this,SLOT(runThis())); | 456 | m->insertItem(tr("Execute"),this,SLOT(runThis())); |
463 | m->insertItem(Resource::loadPixmap("txt"),tr("Open as text"),this,SLOT(runText())); | 457 | m->insertItem( Opie::Core::OResource::loadPixmap( "txt", Opie::Core::OResource::SmallIcon ), |
458 | tr("Open as text"),this,SLOT(runText())); | ||
464 | } | 459 | } |
465 | 460 | ||
466 | m->insertItem(tr("Actions"),n); | 461 | m->insertItem(tr("Actions"),n); |