summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-03-26 02:07:38 (UTC)
committer llornkcor <llornkcor>2003-03-26 02:07:38 (UTC)
commit445c957aeddcea7ee0b83657e00987103a6d35b0 (patch) (side-by-side diff)
tree4efbff1b8896295e532d1c10dd33e4ab177f014c
parenta76176911328349414203edda3785ac8925c0648 (diff)
downloadopie-445c957aeddcea7ee0b83657e00987103a6d35b0.zip
opie-445c957aeddcea7ee0b83657e00987103a6d35b0.tar.gz
opie-445c957aeddcea7ee0b83657e00987103a6d35b0.tar.bz2
change to UnknownDocument icon and scale
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp17
-rw-r--r--noncore/apps/advancedfm/advancedfm.h2
2 files changed, 14 insertions, 5 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index bb7f346..1a5e131 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -18,32 +18,33 @@
#include <qpe/config.h>
#include <qpe/filemanager.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpemenubar.h>
#include <qpe/qpetoolbar.h>
#include <qpe/qpeapplication.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/config.h>
#include <qpe/mimetype.h>
#include <qpe/applnk.h>
#include <qpe/ir.h>
#include <qpe/resource.h>
#include <qpe/menubutton.h>
+#include <qwmatrix.h>
#include <qregexp.h>
#include <qtabwidget.h>
#include <qtextstream.h>
#include <qpushbutton.h>
#include <qdatetime.h>
#include <qdir.h>
#include <qfile.h>
#include <qstring.h>
#include <qcombobox.h>
#include <qpopupmenu.h>
#include <qlistview.h>
#include <qmainwindow.h>
#include <qlabel.h>
#include <qprogressbar.h>
#include <qspinbox.h>
#include <qwidget.h>
@@ -60,32 +61,37 @@
#include <dirent.h>
#include <stdio.h>
#include <time.h>
#include <fcntl.h>
#include <mntent.h>
#include <string.h>
#include <errno.h>
#include <sys/vfs.h>
#include <mntent.h>
#include <sys/utsname.h>
AdvancedFm::AdvancedFm( )
: QMainWindow( ) {
init();
renameBox = 0;
+ QWMatrix matrix;
+ QPixmap pix(Resource::loadPixmap( "UnknownDocument" ));
+ matrix.scale( .4, .4);
+ unknownXpm = pix.xForm(matrix);
+
initConnections();
whichTab=1;
rePopulate();
currentPathCombo->setFocus();
}
AdvancedFm::~AdvancedFm() {
}
void AdvancedFm::cleanUp()
{
QString sfile=QDir::homeDirPath();
if(sfile.right(1) != "/")
sfile+="/._temp";
else
@@ -177,71 +183,72 @@ void AdvancedFm::populateView()
{
pm = Resource::loadPixmap( "exec");
}
else if( (fileInfo.permission( QFileInfo::ExeUser)
| fileInfo.permission( QFileInfo::ExeGroup)
| fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" )
{
pm = Resource::loadPixmap( "exec");
}
else if( !fi->isReadable() )
{
pm = Resource::loadPixmap( "locked" );
}
else { //everything else goes by mimetype
MimeType mt(fi->filePath());
pm=mt.pixmap(); //sets the correct pixmap for mimetype
- if(pm.isNull())
- pm = Resource::loadPixmap( "UnknownDocument-14" );
+ if(pm.isNull()) {
+ pm = unknownXpm;
+ }
}
- item->setPixmap( 0,pm);
if( fi->isSymLink() && fileL.find("->",0,TRUE) != -1)
{
// overlay link image
pm= Resource::loadPixmap( "folder" );
QPixmap lnk = Resource::loadPixmap( "opie/symlink" );
QPainter painter( &pm );
painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk );
pm.setMask( pm.createHeuristicMask( FALSE ) );
- item->setPixmap( 0, pm);
}
+ item->setPixmap( 0,pm);
+
}
isDir=FALSE;
++it;
}
if( path.find("dev",0,TRUE) != -1)
{
struct stat buf;
dev_t devT;
DIR *dir;
struct dirent *mydirent;
if((dir = opendir( path.latin1())) != NULL)
while ((mydirent = readdir(dir)) != NULL)
{
lstat( mydirent->d_name, &buf);
// qDebug(mydirent->d_name);
fileL.sprintf("%s", mydirent->d_name);
devT = buf.st_dev;
fileS.sprintf("%d, %d", (int) ( devT >>8) &0xFF, (int)devT &0xFF);
fileDate.sprintf("%s", ctime( &buf.st_mtime));
if( fileL.find(".") == -1 )
{
item= new QListViewItem( thisView, fileL, fileS, fileDate);
- pm = Resource::loadPixmap( "UnknownDocument-14" );
+ pm = unknownXpm;
item->setPixmap( 0,pm);
}
}
closedir(dir);
}
thisView->setSorting( 3,FALSE);
fillCombo( (const QString &) path );
}
void AdvancedFm::rePopulate()
{
int tmpTab = whichTab;
qDebug("%d", tmpTab);
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index f31956c..c30d8e0 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -13,32 +13,33 @@
#define ADVANCEDFM_H
#define QTOPIA_INTERNAL_FSLP // to get access to fileproperties
#define QT_QWS_OPIE
//#include <opie/otabwidget.h>
#include <opie/oprocess.h>
#include <qpe/ir.h>
#include <qvariant.h>
#include <qdialog.h>
#include <qmainwindow.h>
#include <qstringlist.h>
#include <qdir.h>
#include <qstring.h>
#include <qpoint.h>
#include <qtimer.h>
+#include <qpixmap.h>
class OTabWidget;
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QComboBox;
class QListView;
class QListviewItem;
class QLabel;
class QProgressBar;
class QSpinBox;
class QTabWidget;
class QWidget;
class QPEToolBar;
class QPEMenuBar;
class QPopupMenu;
@@ -78,32 +79,33 @@ protected slots:
void cleanUp();
void renameIt();
void runThis();
void runText();
void filePerms();
void doProperties();
void runCommand();
void runCommandStd();
QStringList getPath();
void mkSym();
void switchToLocalTab();
void switchToRemoteTab();
protected:
OTabWidget *TabWidget;
+ QPixmap unknownXpm;
int whichTab;
// QTabWidget *TabWidget;
QWidget *tab, *tab_2, *tab_3;
QListView *Local_View, *Remote_View;
QLineEdit *currentPathEdit;
QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu /*, *customDirMenu*/;
QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton;
// QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton;
QDir currentDir, currentRemoteDir;
QComboBox *currentPathCombo;
QString filterStr, s_addBookmark, s_removeBookmark;
QListViewItem * item;
bool b;
QStringList fileSystemTypeList, fsList;
int currentServerConfig;