added icon for rscollection file type

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4665 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2011-11-09 14:02:15 +00:00
parent 50d5c1159d
commit f77bb8136f
6 changed files with 13 additions and 3 deletions

View File

@ -303,6 +303,8 @@ QVariant RetroshareDirModel::decorationRole(const DirDetails& details,int coln)
return QIcon(":/images/FileTypeDocument.png");
else if (ext == "html" || ext == "htm" || ext == "php")
return QIcon(":/images/FileTypeDocument.png");
else if (ext == "rscollection")
return QIcon(":/images/mimetypes/rscollection-16.png");
else
return QIcon(":/images/FileTypeAny.png");
}
@ -914,7 +916,7 @@ void RetroshareDirModel::createCollectionFile(const QModelIndexList &list)
return ;
}
QString filename = QFileDialog::getSaveFileName(NULL,tr("Create selection file"),".",tr("Collection files")+" (*.rsCollection)") ;
QString filename = QFileDialog::getSaveFileName(NULL,tr("Create selection file"),".",tr("Collection files")+" (*.rscollection)") ;
if(filename.isNull())
return ;

View File

@ -1282,6 +1282,11 @@ void SearchDialog::setIconAndType(QTreeWidgetItem *item, QString ext)
item->setIcon(SR_NAME_COL, QIcon(":/images/FileTypeDocument.png"));
item->setText(SR_TYPE_COL, QString::fromUtf8("Document"));
}
else if (ext == "rscollection")
{
item->setIcon(SR_NAME_COL, QIcon(":/images/library.png"));
item->setText(SR_TYPE_COL, QString::fromUtf8("RetroShare collection file"));
}
else if (ext == "sub" || ext == "srt")
{
item->setIcon(SR_NAME_COL, QIcon(":/images/FileTypeAny.png"));

View File

@ -655,6 +655,8 @@ QIcon TransfersDialog::getIconFromExtension(QString ext)
return QIcon(QString::fromUtf8(":/images/FileTypeDocument.png")) ;
else if (ext == "html" || ext == "htm" || ext == "php")
return QIcon(QString::fromUtf8(":/images/FileTypeDocument.png")) ;
else if (ext == "rscollection")
return QIcon(QString::fromUtf8(":/images/mimetypes/rscollection-16.png")) ;
else
return QIcon(QString::fromUtf8(":/images/FileTypeAny.png")) ;
}

View File

@ -22,11 +22,11 @@
#include <QTimer>
#include <QMessageBox>
#include <QFileDialog>
#include <QDesktopServices>
#include <QUrl>
#include "SubFileItem.h"
#include <gui/common/RsUrlHandler.h>
#include <retroshare/rsfiles.h>
#include "util/misc.h"
@ -571,7 +571,7 @@ void SubFileItem::play()
QFileInfo qinfo;
qinfo.setFile(info.path.c_str());
if (qinfo.exists()) {
if (!QDesktopServices::openUrl(QUrl::fromLocalFile(qinfo.absoluteFilePath()))) {
if (!RsUrlHandler::openUrl(QUrl::fromLocalFile(qinfo.absoluteFilePath()))) {
std::cerr << "openTransfer(): can't open file " << info.path << std::endl;
}
}else{

View File

@ -398,6 +398,7 @@
<file>images/loader/32-loader.gif</file>
<file>images/loader/progress.gif</file>
<file>images/mimetypes/pdf.png</file>
<file>images/mimetypes/rscollection-16.png</file>
<file>images/view-certificate-copy-32.png</file>
<file>images/view-certificate-export-32.png</file>
<file>images/textedit/textbold.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB