mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-23 22:49:37 -05:00
* Fixed icons in Files Dialog to add only icons to column 0
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@817 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
939815a62b
commit
c2e85b3f17
@ -234,20 +234,30 @@ RemoteDirModel::RemoteDirModel(bool mode, QObject *parent)
|
||||
|
||||
if (details.type == DIR_TYPE_PERSON)
|
||||
{
|
||||
//setData(QIcon(":/images/user/identity16.png"));
|
||||
QIcon icon1(":/images/user/identity16.png");
|
||||
return icon1;
|
||||
switch(coln)
|
||||
{
|
||||
case 0:
|
||||
QIcon icon(":/images/user/identity16.png");
|
||||
return icon;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (details.type == DIR_TYPE_DIR)
|
||||
{
|
||||
//setData(QIcon(":/images/folder_green16.png"));
|
||||
QIcon icon(":/images/folder16.png");
|
||||
return icon;
|
||||
switch(coln)
|
||||
{
|
||||
case 0:
|
||||
return(QIcon(":/images/folder16.png"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (details.type == DIR_TYPE_FILE) /* File */
|
||||
{
|
||||
// extensions predefined
|
||||
//QString name;
|
||||
switch(coln)
|
||||
{
|
||||
case 0:
|
||||
QString ext = QFileInfo(QString::fromStdString(details.name)).suffix();
|
||||
if (ext == "jpg" || ext == "jpeg" || ext == "png" || ext == "gif"
|
||||
|| ext == "bmp" || ext == "ico" || ext == "svg")
|
||||
@ -287,7 +297,7 @@ RemoteDirModel::RemoteDirModel(bool mode, QObject *parent)
|
||||
|| ext == "sxc" || ext == "odt" || ext == "ods")
|
||||
{
|
||||
//setIcon(0, QIcon(":/images/docfile.png"));
|
||||
QIcon icon(":/images/FileTypeDocument.png");
|
||||
QIcon icon(":/images/FileTypeDocument.png");
|
||||
return icon;
|
||||
}
|
||||
else if (ext == "html" || ext == "htm" || ext == "php")
|
||||
@ -302,6 +312,8 @@ RemoteDirModel::RemoteDirModel(bool mode, QObject *parent)
|
||||
QIcon icon(":/images/FileTypeAny.png");
|
||||
return icon;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -368,8 +380,10 @@ RemoteDirModel::RemoteDirModel(bool mode, QObject *parent)
|
||||
case 3:
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << details.age;
|
||||
return QString::fromStdString(out.str());
|
||||
QDateTime datum = QDateTime::fromTime_t(details.age);
|
||||
QString stime = datum.toString(Qt::LocalDate);
|
||||
//out << details.age;
|
||||
return QString(stime);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user