summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-03-26 02:29:46 (UTC)
committer llornkcor <llornkcor>2003-03-26 02:29:46 (UTC)
commit114dc0018c29cb899f10bbbe4eb84db1482f9598 (patch) (side-by-side diff)
tree5f090b026bcb6cafe39b4650530fe0a5cac16bdc
parent445c957aeddcea7ee0b83657e00987103a6d35b0 (diff)
downloadopie-114dc0018c29cb899f10bbbe4eb84db1482f9598.zip
opie-114dc0018c29cb899f10bbbe4eb84db1482f9598.tar.gz
opie-114dc0018c29cb899f10bbbe4eb84db1482f9598.tar.bz2
change to UnknownDocument icon
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp10
-rw-r--r--noncore/net/opieftp/opieftp.h2
2 files changed, 9 insertions, 3 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index 7c83223..db365ca 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -77,24 +77,29 @@ OpieFtp::OpieFtp( )
setCaption( tr( "OpieFtp" ) );
fuckeduphack=FALSE;
QGridLayout *layout = new QGridLayout( this );
layout->setSpacing( 2);
layout->setMargin( 2);
connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
QPEMenuBar *menuBar = new QPEMenuBar(this);
// QPEToolBar *menuBar = new QPEToolBar(this);
// menuBar->setHorizontalStretchable( TRUE );
+ QWMatrix matrix;
+ QPixmap pix(Resource::loadPixmap( "UnknownDocument" ));
+ matrix.scale( .4, .4);
+ unknownXpm = pix.xForm(matrix);
+
connectionMenu = new QPopupMenu( this );
localMenu = new QPopupMenu( this );
remoteMenu = new QPopupMenu( this );
tabMenu = new QPopupMenu( this );
layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 );
menuBar->insertItem( tr( "Connection" ), connectionMenu);
menuBar->insertItem( tr( "Local" ), localMenu);
menuBar->insertItem( tr( "Remote" ), remoteMenu);
menuBar->insertItem( tr( "View" ), tabMenu);
@@ -679,37 +684,36 @@ void OpieFtp::populateLocalView()
if( !QDir( fi->filePath() ).isReadable())
pm = Resource::loadPixmap( "lockedfolder" );
else
pm= Resource::loadPixmap( "folder" );
item->setPixmap( 0,pm );
} else {
if( !fi->isReadable() )
pm = Resource::loadPixmap( "locked" );
else {
MimeType mt(fi->filePath());
pm=mt.pixmap(); //sets the correct pixmap for mimetype
if(pm.isNull())
- pm = Resource::loadPixmap( "UnknownDocument-14" );
- item->setPixmap( 0,pm);
+ pm = unknownXpm;
}
}
if( 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;
}
Local_View->setSorting( 3,FALSE);
currentPathCombo->lineEdit()->setText( currentDir.canonicalPath() );
fillCombo( (const QString &)currentDir);
}
bool OpieFtp::populateRemoteView( )
{
// qDebug("populate remoteview");
diff --git a/noncore/net/opieftp/opieftp.h b/noncore/net/opieftp/opieftp.h
index 109b5f8..9d5d211 100644
--- a/noncore/net/opieftp/opieftp.h
+++ b/noncore/net/opieftp/opieftp.h
@@ -9,24 +9,25 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef OPIEFTP_H
#define OPIEFTP_H
#include <qvariant.h>
#include <qdialog.h>
#include <qmainwindow.h>
#include <qdir.h>
#include <qstring.h>
#include <qpoint.h>
+#include <qpixmap.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QComboBox;
class QListView;
class QListViewItem;
class QLabel;
class QProgressBar;
class QSpinBox;
class QTabWidget;
class QWidget;
@@ -118,23 +119,24 @@ protected slots:
void fillCombos();
void clearCombos();
void fillRemoteCombo(const QString&);
void fillCombo(const QString &);
void serverComboSelected(int);
void deleteServer();
void connectorBtnToggled(bool);
void NewServer();
void serverListClicked( const QString &);
protected:
+ QPixmap unknownXpm;
bool fuckeduphack;
QStringList remoteDirPathStringList, localDirPathStringList;
QString newServerName;
void nullifyCallBack();
QGridLayout* tabLayout;
QGridLayout* tabLayout_2;
QGridLayout* tabLayout_3;
};
#endif // OPIEFTP_H