mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
50d5c1159d
commit
f77bb8136f
@ -303,6 +303,8 @@ QVariant RetroshareDirModel::decorationRole(const DirDetails& details,int coln)
|
|||||||
return QIcon(":/images/FileTypeDocument.png");
|
return QIcon(":/images/FileTypeDocument.png");
|
||||||
else if (ext == "html" || ext == "htm" || ext == "php")
|
else if (ext == "html" || ext == "htm" || ext == "php")
|
||||||
return QIcon(":/images/FileTypeDocument.png");
|
return QIcon(":/images/FileTypeDocument.png");
|
||||||
|
else if (ext == "rscollection")
|
||||||
|
return QIcon(":/images/mimetypes/rscollection-16.png");
|
||||||
else
|
else
|
||||||
return QIcon(":/images/FileTypeAny.png");
|
return QIcon(":/images/FileTypeAny.png");
|
||||||
}
|
}
|
||||||
@ -914,7 +916,7 @@ void RetroshareDirModel::createCollectionFile(const QModelIndexList &list)
|
|||||||
return ;
|
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())
|
if(filename.isNull())
|
||||||
return ;
|
return ;
|
||||||
|
@ -1282,6 +1282,11 @@ void SearchDialog::setIconAndType(QTreeWidgetItem *item, QString ext)
|
|||||||
item->setIcon(SR_NAME_COL, QIcon(":/images/FileTypeDocument.png"));
|
item->setIcon(SR_NAME_COL, QIcon(":/images/FileTypeDocument.png"));
|
||||||
item->setText(SR_TYPE_COL, QString::fromUtf8("Document"));
|
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")
|
else if (ext == "sub" || ext == "srt")
|
||||||
{
|
{
|
||||||
item->setIcon(SR_NAME_COL, QIcon(":/images/FileTypeAny.png"));
|
item->setIcon(SR_NAME_COL, QIcon(":/images/FileTypeAny.png"));
|
||||||
|
@ -655,6 +655,8 @@ QIcon TransfersDialog::getIconFromExtension(QString ext)
|
|||||||
return QIcon(QString::fromUtf8(":/images/FileTypeDocument.png")) ;
|
return QIcon(QString::fromUtf8(":/images/FileTypeDocument.png")) ;
|
||||||
else if (ext == "html" || ext == "htm" || ext == "php")
|
else if (ext == "html" || ext == "htm" || ext == "php")
|
||||||
return QIcon(QString::fromUtf8(":/images/FileTypeDocument.png")) ;
|
return QIcon(QString::fromUtf8(":/images/FileTypeDocument.png")) ;
|
||||||
|
else if (ext == "rscollection")
|
||||||
|
return QIcon(QString::fromUtf8(":/images/mimetypes/rscollection-16.png")) ;
|
||||||
else
|
else
|
||||||
return QIcon(QString::fromUtf8(":/images/FileTypeAny.png")) ;
|
return QIcon(QString::fromUtf8(":/images/FileTypeAny.png")) ;
|
||||||
}
|
}
|
||||||
|
@ -22,11 +22,11 @@
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QDesktopServices>
|
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#include "SubFileItem.h"
|
#include "SubFileItem.h"
|
||||||
|
|
||||||
|
#include <gui/common/RsUrlHandler.h>
|
||||||
#include <retroshare/rsfiles.h>
|
#include <retroshare/rsfiles.h>
|
||||||
#include "util/misc.h"
|
#include "util/misc.h"
|
||||||
|
|
||||||
@ -571,7 +571,7 @@ void SubFileItem::play()
|
|||||||
QFileInfo qinfo;
|
QFileInfo qinfo;
|
||||||
qinfo.setFile(info.path.c_str());
|
qinfo.setFile(info.path.c_str());
|
||||||
if (qinfo.exists()) {
|
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;
|
std::cerr << "openTransfer(): can't open file " << info.path << std::endl;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
@ -398,6 +398,7 @@
|
|||||||
<file>images/loader/32-loader.gif</file>
|
<file>images/loader/32-loader.gif</file>
|
||||||
<file>images/loader/progress.gif</file>
|
<file>images/loader/progress.gif</file>
|
||||||
<file>images/mimetypes/pdf.png</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-copy-32.png</file>
|
||||||
<file>images/view-certificate-export-32.png</file>
|
<file>images/view-certificate-export-32.png</file>
|
||||||
<file>images/textedit/textbold.png</file>
|
<file>images/textedit/textbold.png</file>
|
||||||
|
BIN
retroshare-gui/src/gui/images/mimetypes/rscollection-16.png
Normal file
BIN
retroshare-gui/src/gui/images/mimetypes/rscollection-16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Loading…
Reference in New Issue
Block a user