merged upstream/master

This commit is contained in:
csoler 2020-10-03 21:55:14 +02:00
commit 0e3739b9d7
145 changed files with 723 additions and 809 deletions

View file

@ -30,6 +30,7 @@
#include <retroshare/rsidentity.h> #include <retroshare/rsidentity.h>
#include "gui/common/AvatarDefs.h" #include "gui/common/AvatarDefs.h"
#include "gui/common/FilesDefs.h"
#include "util/qtthreadsutils.h" #include "util/qtthreadsutils.h"
#include "gui/Circles/CreateCircleDialog.h" #include "gui/Circles/CreateCircleDialog.h"
#include "gui/gxs/GxsIdDetails.h" #include "gui/gxs/GxsIdDetails.h"
@ -53,7 +54,7 @@ CreateCircleDialog::CreateCircleDialog()
ui.setupUi(this); ui.setupUi(this);
/* Setup Queue */ /* Setup Queue */
ui.headerFrame->setHeaderImage(QPixmap(":/icons/png/circles.png")); ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/circles.png"));
// connect up the buttons. // connect up the buttons.
connect(ui.addButton, SIGNAL(clicked()), this, SLOT(addMember())); connect(ui.addButton, SIGNAL(clicked()), this, SLOT(addMember()));

View file

@ -23,11 +23,12 @@
#include <math.h> #include <math.h>
#include <QStylePainter> #include <QStylePainter>
#include <QDebug> #include <QDebug>
#include <retroshare/rsfiles.h> #include "retroshare/rsfiles.h"
#include <retroshare/rstypes.h> #include "retroshare/rstypes.h"
#include "util/misc.h" #include "util/misc.h"
#include "FileTransferInfoWidget.h" #include "FileTransferInfoWidget.h"
#include <gui/RetroShareLink.h> #include "gui/RetroShareLink.h"
#include "gui/common/FilesDefs.h"
// Variables to decide of display behaviour. All variables are expressed as a factor of font height // Variables to decide of display behaviour. All variables are expressed as a factor of font height
// //
@ -49,10 +50,10 @@ FileTransferInfoWidget::FileTransferInfoWidget(QWidget * /*parent*/, Qt::WindowF
int S = 0.9*QFontMetricsF(font()).height(); int S = 0.9*QFontMetricsF(font()).height();
downloadedPixmap = QPixmap(":/icons/tile_downloaded_48.png").scaledToHeight(S,Qt::SmoothTransformation); downloadedPixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/tile_downloaded_48.png").scaledToHeight(S,Qt::SmoothTransformation);
downloadingPixmap = QPixmap(":/icons/tile_downloading_48.png").scaledToHeight(S,Qt::SmoothTransformation); downloadingPixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/tile_downloading_48.png").scaledToHeight(S,Qt::SmoothTransformation);
notDownloadPixmap = QPixmap(":/icons/tile_inactive_48.png").scaledToHeight(S,Qt::SmoothTransformation); notDownloadPixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/tile_inactive_48.png").scaledToHeight(S,Qt::SmoothTransformation);
checkingPixmap = QPixmap(":/icons/tile_checking_48.png").scaledToHeight(S,Qt::SmoothTransformation); checkingPixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/tile_checking_48.png").scaledToHeight(S,Qt::SmoothTransformation);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
} }

View file

@ -43,7 +43,8 @@
#include <retroshare/rsexpr.h> #include <retroshare/rsexpr.h>
/* Images for context menu icons */ /* Images for context menu icons */
#define IMAGE_START ":/images/download.png" #define IMAGE_START ":/icons/png/download.png"
#define IMAGE_SEARCHAGAIN ":/images/update.png"
#define IMAGE_REMOVE ":/images/delete.png" #define IMAGE_REMOVE ":/images/delete.png"
#define IMAGE_REMOVEALL ":/images/deleteall.png" #define IMAGE_REMOVEALL ":/images/deleteall.png"
#define IMAGE_DIRECTORY ":/images/folder16.png" #define IMAGE_DIRECTORY ":/images/folder16.png"
@ -670,14 +671,14 @@ void SearchDialog::searchSummaryWidgetCustomPopupMenu( QPoint /*point*/ )
QMenu contextMnu(this); QMenu contextMnu(this);
QTreeWidgetItem* ci = ui.searchSummaryWidget->currentItem(); QTreeWidgetItem* ci = ui.searchSummaryWidget->currentItem();
QAction* action = contextMnu.addAction(tr("Search again"), this, SLOT(searchAgain())); QAction* action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_SEARCHAGAIN),tr("Search again"), this, SLOT(searchAgain()));
if (!ci || ci->data(SS_DATA_COL, ROLE_KEYWORDS).toString().isEmpty()) { if (!ci || ci->data(SS_DATA_COL, ROLE_KEYWORDS).toString().isEmpty()) {
action->setDisabled(true); action->setDisabled(true);
} }
contextMnu.addAction(QIcon(IMAGE_REMOVE), tr("Remove"), this, SLOT(searchRemove())); contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_REMOVE), tr("Remove"), this, SLOT(searchRemove()));
contextMnu.addAction(QIcon(IMAGE_REMOVE), tr("Remove All"), this, SLOT(searchRemoveAll())); contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_REMOVEALL), tr("Remove All"), this, SLOT(searchRemoveAll()));
contextMnu.addSeparator(); contextMnu.addSeparator();
action = contextMnu.addAction(QIcon(IMAGE_COPYLINK), tr("Copy RetroShare Link"), this, SLOT(copySearchLink())); action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COPYLINK), tr("Copy RetroShare Link"), this, SLOT(copySearchLink()));
if (!ci || ci->data(SS_DATA_COL, ROLE_KEYWORDS).toString().isEmpty()) { if (!ci || ci->data(SS_DATA_COL, ROLE_KEYWORDS).toString().isEmpty()) {
action->setDisabled(true); action->setDisabled(true);
} }

View file

@ -37,6 +37,7 @@
#include "util/RsAction.h" #include "util/RsAction.h"
#include "util/misc.h" #include "util/misc.h"
#include "util/rstime.h" #include "util/rstime.h"
#include "util/rsdir.h"
#include <retroshare/rsexpr.h> #include <retroshare/rsexpr.h>
#include <retroshare/rsfiles.h> #include <retroshare/rsfiles.h>
@ -55,7 +56,7 @@
#include <set> #include <set>
/* Images for context menu icons */ /* Images for context menu icons */
#define IMAGE_DOWNLOAD ":/images/download16.png" #define IMAGE_DOWNLOAD ":/icons/png/download.png"
#define IMAGE_PLAY ":/images/start.png" #define IMAGE_PLAY ":/images/start.png"
#define IMAGE_HASH_BUSY ":/images/settings.png" #define IMAGE_HASH_BUSY ":/images/settings.png"
#define IMAGE_HASH_DONE ":/images/accepted16.png" #define IMAGE_HASH_DONE ":/images/accepted16.png"
@ -72,8 +73,9 @@
#define IMAGE_COLLMODIF ":/icons/png/pencil-edit-button.png" #define IMAGE_COLLMODIF ":/icons/png/pencil-edit-button.png"
#define IMAGE_COLLVIEW ":/images/find.png" #define IMAGE_COLLVIEW ":/images/find.png"
#define IMAGE_COLLOPEN ":/icons/collections.png" #define IMAGE_COLLOPEN ":/icons/collections.png"
#define IMAGE_EDITSHARE ":/images/edit_16.png" #define IMAGE_EDITSHARE ":/icons/png/pencil-edit-button.png"
#define IMAGE_MYFILES ":/icons/svg/folders1.svg" #define IMAGE_MYFILES ":/icons/svg/folders1.svg"
#define IMAGE_UNSHAREEXTRA ":/images/button_cancel.png"
/*define viewType_CB value */ /*define viewType_CB value */
#define VIEW_TYPE_TREE 0 #define VIEW_TYPE_TREE 0
@ -232,7 +234,7 @@ SharedFilesDialog::SharedFilesDialog(bool remote_mode, QWidget *parent)
sendlinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Links" ), this ); sendlinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Send retroshare Links" ), this );
connect( sendlinkAct , SIGNAL( triggered() ), this, SLOT( sendLinkTo( ) ) ); connect( sendlinkAct , SIGNAL( triggered() ), this, SLOT( sendLinkTo( ) ) );
removeExtraFileAct = new QAction(QIcon(), tr( "Stop sharing this file" ), this ); removeExtraFileAct = new QAction(QIcon(IMAGE_UNSHAREEXTRA), tr( "Stop sharing this file" ), this );
connect( removeExtraFileAct , SIGNAL( triggered() ), this, SLOT( removeExtraFile() ) ); connect( removeExtraFileAct , SIGNAL( triggered() ), this, SLOT( removeExtraFile() ) );
collCreateAct= new QAction(QIcon(IMAGE_COLLCREATE), tr("Create Collection..."), this) ; collCreateAct= new QAction(QIcon(IMAGE_COLLCREATE), tr("Create Collection..."), this) ;
@ -266,7 +268,7 @@ LocalSharedFilesDialog::LocalSharedFilesDialog(QWidget *parent)
openfolderAct = new QAction(QIcon(IMAGE_OPENFOLDER), tr("Open Folder"), this) ; openfolderAct = new QAction(QIcon(IMAGE_OPENFOLDER), tr("Open Folder"), this) ;
connect(openfolderAct, SIGNAL(triggered()), this, SLOT(openfolder())) ; connect(openfolderAct, SIGNAL(triggered()), this, SLOT(openfolder())) ;
ui.titleBarPixmap->setPixmap(QPixmap(IMAGE_MYFILES)) ; ui.titleBarPixmap->setPixmap(FilesDefs::getPixmapFromQtResourcePath(IMAGE_MYFILES)) ;
ui.dirTreeView->setItemDelegateForColumn(COLUMN_FRIEND_ACCESS,new ShareFlagsItemDelegate()) ; ui.dirTreeView->setItemDelegateForColumn(COLUMN_FRIEND_ACCESS,new ShareFlagsItemDelegate()) ;
} }
@ -498,7 +500,7 @@ void LocalSharedFilesDialog::checkUpdate()
else else
{ {
ui.checkButton->setText(tr("Check files")); ui.checkButton->setText(tr("Check files"));
ui.hashLabel->setPixmap(QPixmap(IMAGE_HASH_DONE)); ui.hashLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(IMAGE_HASH_DONE));
ui.hashLabel->setToolTip("") ; ui.hashLabel->setToolTip("") ;
} }
@ -644,7 +646,16 @@ void SharedFilesDialog::copyLinks(const QModelIndexList& lst, bool remote,QList<
has_unhashed_files = true; has_unhashed_files = true;
continue; continue;
} }
RetroShareLink link = RetroShareLink::createFile(QString::fromUtf8(details.name.c_str()), details.count, details.hash.toStdString().c_str()); QString name;
if(details.type == DIR_TYPE_EXTRA_FILE)
{
std::string dir,file;
RsDirUtil::splitDirFromFile(details.name,dir,file) ;
name = QString::fromStdString(file);
}
else
name = QString::fromUtf8(details.name.c_str());
RetroShareLink link = RetroShareLink::createFile(name, details.count, details.hash.toStdString().c_str());
if (link.valid()) { if (link.valid()) {
urls.push_back(link) ; urls.push_back(link) ;
} }
@ -876,7 +887,7 @@ void LocalSharedFilesDialog::openfolder()
std::cerr << "SharedFilesDialog::openfolder" << std::endl; std::cerr << "SharedFilesDialog::openfolder" << std::endl;
QModelIndexList qmil = getSelected(); QModelIndexList qmil = getSelected();
model->openSelected(qmil); model->openSelected(qmil, true);
} }
void SharedFilesDialog::preModDirectories(bool local) void SharedFilesDialog::preModDirectories(bool local)
@ -1144,6 +1155,7 @@ void LocalSharedFilesDialog::spawnCustomPopupMenu( QPoint point )
case DIR_TYPE_EXTRA_FILE: case DIR_TYPE_EXTRA_FILE:
contextMnu.addAction(openfileAct) ; contextMnu.addAction(openfileAct) ;
contextMnu.addAction(openfolderAct) ;
contextMnu.addSeparator() ;//------------------------------------ contextMnu.addSeparator() ;//------------------------------------
contextMnu.addAction(copylinkAct) ; contextMnu.addAction(copylinkAct) ;
contextMnu.addAction(sendlinkAct) ; contextMnu.addAction(sendlinkAct) ;

View file

@ -88,10 +88,6 @@
<property name="text"> <property name="text">
<string>Configure shared directories</string> <string>Configure shared directories</string>
</property> </property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset>
</property>
</widget> </widget>
</item> </item>
<item> <item>

View file

@ -35,6 +35,7 @@
#include "gui/settings/rsharesettings.h" #include "gui/settings/rsharesettings.h"
#include "TorControl/TorManager.h" #include "TorControl/TorManager.h"
#include "util/misc.h" #include "util/misc.h"
#include "gui/common/FilesDefs.h"
#include <retroshare/rsidentity.h> #include <retroshare/rsidentity.h>
#include <retroshare/rsinit.h> #include <retroshare/rsinit.h>
@ -132,7 +133,7 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);
//ui.headerFrame->setHeaderImage(QPixmap(":/icons/svg/profile.svg")); //ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/svg/profile.svg"));
//ui.headerFrame->setHeaderText(tr("Create a new profile")); //ui.headerFrame->setHeaderText(tr("Create a new profile"));
connect(ui.reuse_existing_node_CB, SIGNAL(triggered()), this, SLOT(switchReuseExistingNode())); connect(ui.reuse_existing_node_CB, SIGNAL(triggered()), this, SLOT(switchReuseExistingNode()));
@ -432,9 +433,9 @@ void GenCertDialog::updateCheckLabels()
} }
if(mEntropyOk) if(mEntropyOk)
ui.randomness_check_LB->setPixmap(QPixmap(IMAGE_GOOD)) ; ui.randomness_check_LB->setPixmap(FilesDefs::getPixmapFromQtResourcePath(IMAGE_GOOD)) ;
else else
ui.randomness_check_LB->setPixmap(QPixmap(IMAGE_BAD)) ; ui.randomness_check_LB->setPixmap(FilesDefs::getPixmapFromQtResourcePath(IMAGE_BAD)) ;
setupState(); setupState();
} }

View file

@ -25,6 +25,7 @@
#include "util/qtthreadsutils.h" #include "util/qtthreadsutils.h"
#include "gui/settings/rsharesettings.h" #include "gui/settings/rsharesettings.h"
#include "gui/common/UIStateHelper.h" #include "gui/common/UIStateHelper.h"
#include "gui/common/FilesDefs.h"
#include "gui/msgs/MessageComposer.h" #include "gui/msgs/MessageComposer.h"
#include "gui/RetroShareLink.h" #include "gui/RetroShareLink.h"
@ -82,7 +83,7 @@ IdDetailsDialog::IdDetailsDialog(const RsGxsGroupId& id, QWidget *parent) :
Settings->loadWidgetInformation(this); Settings->loadWidgetInformation(this);
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/person.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/person.png"));
ui->headerFrame->setHeaderText(tr("Person Details")); ui->headerFrame->setHeaderText(tr("Person Details"));
//connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(changeGroup())); //connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(changeGroup()));

View file

@ -110,7 +110,7 @@
#define RSID_FILTER_BANNED 0x0020 #define RSID_FILTER_BANNED 0x0020
#define RSID_FILTER_ALL 0xffff #define RSID_FILTER_ALL 0xffff
#define IMAGE_EDIT ":/images/edit_16.png" #define IMAGE_EDIT ":/icons/png/pencil-edit-button.png"
#define IMAGE_CREATE ":/icons/circle_new_128.png" #define IMAGE_CREATE ":/icons/circle_new_128.png"
#define IMAGE_INVITED ":/icons/bullet_yellow_128.png" #define IMAGE_INVITED ":/icons/bullet_yellow_128.png"
#define IMAGE_MEMBER ":/icons/bullet_green_128.png" #define IMAGE_MEMBER ":/icons/bullet_green_128.png"
@ -255,7 +255,7 @@ IdDialog::IdDialog(QWidget *parent) : MainPage(parent), ui(new Ui::IdDialog)
this, &IdDialog::chatIdentityItem ); this, &IdDialog::chatIdentityItem );
ui->avlabel_Circles->setPixmap(QPixmap(":/icons/png/circles.png")); ui->avlabel_Circles->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/circles.png"));
ui->headerTextLabel_Circles->setText(tr("Circles")); ui->headerTextLabel_Circles->setText(tr("Circles"));
@ -459,7 +459,7 @@ void IdDialog::clearPerson()
{ {
QFontMetricsF f(ui->avLabel_Person->font()) ; QFontMetricsF f(ui->avLabel_Person->font()) ;
ui->avLabel_Person->setPixmap(QPixmap(":/icons/png/people.png").scaled(f.height()*4,f.height()*4,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)); ui->avLabel_Person->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/people.png").scaled(f.height()*4,f.height()*4,Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
ui->headerTextLabel_Person->setText(tr("People")); ui->headerTextLabel_Person->setText(tr("People"));
ui->inviteFrame->hide(); ui->inviteFrame->hide();
@ -2174,7 +2174,7 @@ void IdDialog::IdListCustomPopupMenu( QPoint )
hbox->setSpacing(6); hbox->setSpacing(6);
QLabel *iconLabel = new QLabel(widget); QLabel *iconLabel = new QLabel(widget);
QPixmap pix = QPixmap(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5); QPixmap pix = FilesDefs::getPixmapFromQtResourcePath(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
iconLabel->setPixmap(pix); iconLabel->setPixmap(pix);
iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width()); iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width());
hbox->addWidget(iconLabel); hbox->addWidget(iconLabel);

View file

@ -32,6 +32,7 @@
#include <retroshare/rsidentity.h> #include <retroshare/rsidentity.h>
#include <retroshare/rspeers.h> #include <retroshare/rspeers.h>
#include "gui/common/FilesDefs.h"
#include <iostream> #include <iostream>
@ -47,7 +48,7 @@ IdEditDialog::IdEditDialog(QWidget *parent) :
ui->setupUi(this); ui->setupUi(this);
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/person.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/person.png"));
ui->headerFrame->setHeaderText(tr("Create New Identity")); ui->headerFrame->setHeaderText(tr("Create New Identity"));
/* Setup UI helper */ /* Setup UI helper */
@ -199,7 +200,7 @@ void IdEditDialog::setAvatar(const QPixmap &avatar)
void IdEditDialog::setupExistingId(const RsGxsGroupId& keyId) void IdEditDialog::setupExistingId(const RsGxsGroupId& keyId)
{ {
setWindowTitle(tr("Edit identity")); setWindowTitle(tr("Edit identity"));
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/person.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/person.png"));
ui->headerFrame->setHeaderText(tr("Edit identity")); ui->headerFrame->setHeaderText(tr("Edit identity"));
mStateHelper->setLoading(IDEDITDIALOG_LOADID, true); mStateHelper->setLoading(IDEDITDIALOG_LOADID, true);

View file

@ -20,8 +20,9 @@
#include "LogoBar.h" #include "LogoBar.h"
#include <util/RetroStyleLabel.h> #include "util/RetroStyleLabel.h"
#include <util/MouseEventFilter.h> #include "util/MouseEventFilter.h"
#include "gui/common/FilesDefs.h"
#include <QGridLayout> #include <QGridLayout>
@ -42,11 +43,11 @@ void LogoBar::init() {
//LogoButton //LogoButton
_logoButton = new RetroStyleLabel(this); _logoButton = new RetroStyleLabel(this);
_logoButton->setPixmaps( _logoButton->setPixmaps(
QPixmap(":/images/logobar/rslogo2.png"), //Start FilesDefs::getPixmapFromQtResourcePath(":/images/logobar/rslogo2.png"), //Start
QPixmap(), //End QPixmap(), //End
QPixmap(), //Fill QPixmap(), //Fill
QPixmap(":/images/logobar/rslogo2.png"), //Start FilesDefs::getPixmapFromQtResourcePath(":/images/logobar/rslogo2.png"), //Start
QPixmap(), //End QPixmap(), //End
QPixmap() //Fill QPixmap() //Fill
); );
@ -59,11 +60,11 @@ void LogoBar::init() {
FillLabel1->setPixmaps( FillLabel1->setPixmaps(
QPixmap(), //Start QPixmap(), //Start
QPixmap(), //End QPixmap(), //End
QPixmap(":/images/logobar/logo_bar_fill.png"), //Fill FilesDefs::getPixmapFromQtResourcePath(":/images/logobar/logo_bar_fill.png"), //Fill
QPixmap(), //Start QPixmap(), //Start
QPixmap(), //End QPixmap(), //End
QPixmap(":/images/logobar/logo_bar_fill.png") //Fill FilesDefs::getPixmapFromQtResourcePath(":/images/logobar/logo_bar_fill.png") //Fill
); );
//FillLabel2 //FillLabel2
@ -71,11 +72,11 @@ void LogoBar::init() {
FillLabel2->setPixmaps( FillLabel2->setPixmaps(
QPixmap(), //Start QPixmap(), //Start
QPixmap(), //End QPixmap(), //End
QPixmap(":/images/logobar/logo_bar_fill.png"), //Fill FilesDefs::getPixmapFromQtResourcePath(":/images/logobar/logo_bar_fill.png"), //Fill
QPixmap(), //Start QPixmap(), //Start
QPixmap(), //End QPixmap(), //End
QPixmap(":/images/logobar/logo_bar_fill.png") //Fill FilesDefs::getPixmapFromQtResourcePath(":/images/logobar/logo_bar_fill.png") //Fill
); );
QGridLayout * layout = new QGridLayout(this); QGridLayout * layout = new QGridLayout(this);

View file

@ -146,8 +146,8 @@
#define IMAGE_ADDSHARE ":/images/directoryadd_24x24_shadow.png" #define IMAGE_ADDSHARE ":/images/directoryadd_24x24_shadow.png"
#define IMAGE_OPTIONS ":/images/settings.png" #define IMAGE_OPTIONS ":/images/settings.png"
#define IMAGE_UNFINISHED ":/images/underconstruction.png" #define IMAGE_UNFINISHED ":/images/underconstruction.png"
#define IMAGE_MINIMIZE ":/images/window_nofullscreen.png" #define IMAGE_MINIMIZE ":/icons/fullscreen.png"
#define IMAGE_MAXIMIZE ":/images/window_fullscreen.png" #define IMAGE_MAXIMIZE ":/icons/fullscreen-exit.png"
#define IMAGE_PLUGINS ":/images/extension_32.png" #define IMAGE_PLUGINS ":/images/extension_32.png"

View file

@ -29,6 +29,7 @@
#include "gui/Identity/IdDetailsDialog.h" #include "gui/Identity/IdDetailsDialog.h"
#include "gui/Identity/IdDialog.h" #include "gui/Identity/IdDialog.h"
#include "gui/MainWindow.h" #include "gui/MainWindow.h"
#include "gui/common/FilesDefs.h"
#include "retroshare/rspeers.h" #include "retroshare/rspeers.h"
#include "retroshare/rsidentity.h" #include "retroshare/rsidentity.h"
@ -440,7 +441,7 @@ void PeopleDialog::iw_AddButtonClickedExt()
{ {
QMenu contextMnu( this ); QMenu contextMnu( this );
QMenu *mnu = contextMnu.addMenu(QIcon(":/icons/png/circles.png"),tr("Invite to Circle")) ; QMenu *mnu = contextMnu.addMenu(FilesDefs::getIconFromQtResourcePath(":/icons/png/circles.png"),tr("Invite to Circle")) ;
std::map<RsGxsGroupId, CircleWidget*>::iterator itCurs; std::map<RsGxsGroupId, CircleWidget*>::iterator itCurs;
for( itCurs =_ext_circles_widgets.begin(); itCurs != _ext_circles_widgets.end(); ++itCurs) for( itCurs =_ext_circles_widgets.begin(); itCurs != _ext_circles_widgets.end(); ++itCurs)
@ -459,7 +460,7 @@ void PeopleDialog::iw_AddButtonClickedExt()
if(own_identities.size() <= 1) if(own_identities.size() <= 1)
{ {
QAction *action = contextMnu.addAction(QIcon(":/images/chat_24.png"), tr("Chat with this person"), this, SLOT(chatIdentity())); QAction *action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/chats.png"), tr("Chat with this person"), this, SLOT(chatIdentity()));
if(own_identities.empty()) if(own_identities.empty())
action->setEnabled(false) ; action->setEnabled(false) ;
@ -468,7 +469,7 @@ void PeopleDialog::iw_AddButtonClickedExt()
} }
else else
{ {
QMenu *mnu = contextMnu.addMenu(QIcon(":/icons/png/chats.png"),tr("Chat with this person as...")) ; QMenu *mnu = contextMnu.addMenu(FilesDefs::getIconFromQtResourcePath(":/icons/png/chats.png"),tr("Chat with this person as...")) ;
for(std::list<RsGxsId>::const_iterator it=own_identities.begin();it!=own_identities.end();++it) for(std::list<RsGxsId>::const_iterator it=own_identities.begin();it!=own_identities.end();++it)
{ {
@ -485,20 +486,20 @@ void PeopleDialog::iw_AddButtonClickedExt()
} }
} }
QAction *actionsendmsg = contextMnu.addAction(QIcon(":/icons/mail/write-mail.png"), tr("Send message"), this, SLOT(sendMessage())); QAction *actionsendmsg = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/icons/mail/write-mail.png"), tr("Send message"), this, SLOT(sendMessage()));
actionsendmsg->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString())); actionsendmsg->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString()));
QAction *actionsendinvite = contextMnu.addAction(QIcon(":/icons/mail/write-mail.png"), tr("Send invite"), this, SLOT(sendInvite())); QAction *actionsendinvite = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/icons/mail/write-mail.png"), tr("Send invite"), this, SLOT(sendInvite()));
actionsendinvite->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString())); actionsendinvite->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString()));
contextMnu.addSeparator(); contextMnu.addSeparator();
QAction *actionaddcontact = contextMnu.addAction(QIcon(""), tr("Add to Contacts"), this, SLOT(addtoContacts())); QAction *actionaddcontact = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(""), tr("Add to Contacts"), this, SLOT(addtoContacts()));
actionaddcontact->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString())); actionaddcontact->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString()));
contextMnu.addSeparator(); contextMnu.addSeparator();
QAction *actionDetails = contextMnu.addAction(QIcon(":/images/info16.png"), tr("Person details"), this, SLOT(personDetails())); QAction *actionDetails = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/info16.png"), tr("Person details"), this, SLOT(personDetails()));
actionDetails->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString())); actionDetails->setData( QString::fromStdString(dest->groupInfo().mMeta.mGroupId.toStdString()));
contextMnu.exec(QCursor::pos()); contextMnu.exec(QCursor::pos());

View file

@ -31,7 +31,7 @@ AlbumDialog::AlbumDialog(const RsPhotoAlbum& album, TokenQueue* photoQueue, RsPh
{ {
ui->setupUi(this); ui->setupUi(this);
ui->headerFrame->setHeaderImage(QPixmap(":/images/kview_64.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/kview_64.png"));
ui->headerFrame->setHeaderText(tr("Album")); ui->headerFrame->setHeaderText(tr("Album"));
connect(ui->pushButton_PublishPhotos, SIGNAL(clicked()), this, SLOT(updateAlbumPhotos())); connect(ui->pushButton_PublishPhotos, SIGNAL(clicked()), this, SLOT(updateAlbumPhotos()));
@ -69,7 +69,7 @@ void AlbumDialog::setUp()
else else
{ {
// display a default Album icon when album has no Thumbnail // display a default Album icon when album has no Thumbnail
ui->label_thumbNail->setPixmap(QPixmap(":/images/album_default_128.png")); ui->label_thumbNail->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/album_default_128.png"));
} }
} }

View file

@ -99,7 +99,7 @@ void AlbumGroupDialog::initUi()
QPixmap AlbumGroupDialog::serviceImage() QPixmap AlbumGroupDialog::serviceImage()
{ {
return QPixmap(":/images/album_create_64.png"); return FilesDefs::getPixmapFromQtResourcePath(":/images/album_create_64.png");
} }
void AlbumGroupDialog::prepareAlbumGroup(RsPhotoAlbum &group, const RsGroupMetaData &meta) void AlbumGroupDialog::prepareAlbumGroup(RsPhotoAlbum &group, const RsGroupMetaData &meta)
@ -175,7 +175,7 @@ bool AlbumGroupDialog::service_loadGroup(const RsGxsGenericGroupData *data, Mode
setLogo(pixmap); setLogo(pixmap);
} }
} else { } else {
setLogo(QPixmap(":/images/album_create_64.png")); setLogo(FilesDefs::getPixmapFromQtResourcePath(":/images/album_create_64.png"));
} }
// Load additional data.... // Load additional data....

View file

@ -51,7 +51,7 @@ void AlbumItem::setUp()
else else
{ {
// display a default Album icon when album has no Thumbnail // display a default Album icon when album has no Thumbnail
ui->label_Thumbnail->setPixmap(QPixmap(":/images/album_default_128.png")); ui->label_Thumbnail->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/album_default_128.png"));
} }
} }

View file

@ -59,7 +59,7 @@ PhotoItem::PhotoItem(PhotoShareItemHolder *holder, const QString& path, uint32_t
mPhotoDetails.mOrder = order; mPhotoDetails.mOrder = order;
QPixmap qtn = QPixmap(path); QPixmap qtn = FilesDefs::getPixmapFromQtResourcePath(path);
mLowResImage = qtn.scaled(512,512, Qt::KeepAspectRatio, Qt::SmoothTransformation); mLowResImage = qtn.scaled(512,512, Qt::KeepAspectRatio, Qt::SmoothTransformation);
ui->label_Thumbnail->setPixmap(qtn.scaled(128, 128, Qt::KeepAspectRatio, Qt::SmoothTransformation)); ui->label_Thumbnail->setPixmap(qtn.scaled(128, 128, Qt::KeepAspectRatio, Qt::SmoothTransformation));

View file

@ -38,6 +38,7 @@
#include <iostream> #include <iostream>
#include <gui/RetroShareLink.h> #include <gui/RetroShareLink.h>
#include <util/imageutil.h> #include <util/imageutil.h>
#include "gui/common/FilesDefs.h"
/* View Page */ /* View Page */
#define VIEW_POST 1 #define VIEW_POST 1
@ -56,7 +57,7 @@ PostedCreatePostDialog::PostedCreatePostDialog(RsPosted *posted, const RsGxsGrou
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(close())); connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect(ui->addPicButton, SIGNAL(clicked() ), this , SLOT(addPicture())); connect(ui->addPicButton, SIGNAL(clicked() ), this , SLOT(addPicture()));
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/postedlinks.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/postedlinks.png"));
ui->headerFrame->setHeaderText(tr("Create a new Post")); ui->headerFrame->setHeaderText(tr("Create a new Post"));
setAttribute ( Qt::WA_DeleteOnClose, true ); setAttribute ( Qt::WA_DeleteOnClose, true );

View file

@ -21,6 +21,7 @@
#include "PostedGroupDialog.h" #include "PostedGroupDialog.h"
#include "gui/gxs/GxsIdDetails.h" #include "gui/gxs/GxsIdDetails.h"
#include "gui/common/FilesDefs.h"
#include <retroshare/rswiki.h> #include <retroshare/rswiki.h>
#include <iostream> #include <iostream>
@ -89,7 +90,7 @@ void PostedGroupDialog::initUi()
QPixmap PostedGroupDialog::serviceImage() QPixmap PostedGroupDialog::serviceImage()
{ {
return QPixmap(":/icons/png/posted.png"); return FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png");
} }
void PostedGroupDialog::preparePostedGroup(RsPostedGroup &group, const RsGroupMetaData &meta) void PostedGroupDialog::preparePostedGroup(RsPostedGroup &group, const RsGroupMetaData &meta)
@ -159,7 +160,7 @@ bool PostedGroupDialog::service_loadGroup(const RsGxsGenericGroupData *data, Mod
} }
else else
setLogo(QPixmap(":/icons/png/posted.png")); setLogo(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png"));
return true; return true;
} }

View file

@ -490,7 +490,7 @@ void PostedItem::fill()
ui->voteUpButton->setDisabled(true); ui->voteUpButton->setDisabled(true);
ui->voteDownButton->setDisabled(true); ui->voteDownButton->setDisabled(true);
ui->thumbnailLabel->setPixmap( QPixmap(":/images/thumb-default.png")); ui->thumbnailLabel->setPixmap( FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default.png"));
ui->fromLabel->setId(mPost.mMeta.mAuthorId); ui->fromLabel->setId(mPost.mMeta.mAuthorId);
ui->titleLabel->setText(tr( "<p><font color=\"#ff0000\"><b>The author of this message (with ID %1) is banned.</b>").arg(QString::fromStdString(mPost.mMeta.mAuthorId.toStdString()))) ; ui->titleLabel->setText(tr( "<p><font color=\"#ff0000\"><b>The author of this message (with ID %1) is banned.</b>").arg(QString::fromStdString(mPost.mMeta.mAuthorId.toStdString()))) ;
QDateTime qtime; QDateTime qtime;

View file

@ -30,6 +30,7 @@
#include "gui/settings/rsharesettings.h" #include "gui/settings/rsharesettings.h"
#include "PostedItem.h" #include "PostedItem.h"
#include "PostedCardView.h" #include "PostedCardView.h"
#include "gui/common/FilesDefs.h"
#include "gui/common/UIStateHelper.h" #include "gui/common/UIStateHelper.h"
#include "gui/RetroShareLink.h" #include "gui/RetroShareLink.h"
#include "util/HandleRichText.h" #include "util/HandleRichText.h"
@ -406,7 +407,7 @@ void PostedListWidget::insertPostedDetails(const RsPostedGroup &group)
if (group.mGroupImage.mData != NULL) { if (group.mGroupImage.mData != NULL) {
GxsIdDetails::loadPixmapFromData(group.mGroupImage.mData, group.mGroupImage.mSize, boardImage,GxsIdDetails::ORIGINAL); GxsIdDetails::loadPixmapFromData(group.mGroupImage.mData, group.mGroupImage.mSize, boardImage,GxsIdDetails::ORIGINAL);
} else { } else {
boardImage = QPixmap(BOARD_DEFAULT_IMAGE); boardImage = FilesDefs::getPixmapFromQtResourcePath(BOARD_DEFAULT_IMAGE);
} }
ui->logoLabel->setPixmap(boardImage); ui->logoLabel->setPixmap(boardImage);
ui->namelabel->setText(QString::fromUtf8(group.mMeta.mGroupName.c_str())); ui->namelabel->setText(QString::fromUtf8(group.mMeta.mGroupName.c_str()));

View file

@ -33,13 +33,14 @@
#include <retroshare/rstypes.h> #include <retroshare/rstypes.h>
#include "settings/rsharesettings.h" #include "settings/rsharesettings.h"
#include "util/QtVersion.h" #include "util/QtVersion.h"
#include "gui/common/FilesDefs.h"
QuickStartWizard::QuickStartWizard(QWidget *parent) : QuickStartWizard::QuickStartWizard(QWidget *parent) :
QDialog(parent) QDialog(parent)
{ {
ui.setupUi(this); ui.setupUi(this);
ui.headerFrame->setHeaderImage(QPixmap(":/images/rs_wizard.png")); ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/rs_wizard.png"));
ui.headerFrame->setHeaderText("RetroShare"); ui.headerFrame->setHeaderText("RetroShare");
ui.pagesWizard->setCurrentIndex(0); ui.pagesWizard->setCurrentIndex(0);

View file

@ -521,7 +521,19 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const
case COLUMN_SIZE: case COLUMN_SIZE:
return misc::friendlyUnit(details.count); return misc::friendlyUnit(details.count);
case COLUMN_AGE: case COLUMN_AGE:
return (details.type == DIR_TYPE_FILE)?(misc::timeRelativeToNow(details.max_mtime)):QString(); {
if(details.type == DIR_TYPE_FILE)
return misc::timeRelativeToNow(details.max_mtime);
else if(details.type == DIR_TYPE_EXTRA_FILE)
{
FileInfo fi;
if (rsFiles->FileDetails(details.hash, RS_FILE_HINTS_EXTRA , fi))
return misc::timeRelativeToNow((rstime_t)fi.age-(30 * 3600 * 24)); // AFI_DEFAULT_PERIOD
return QString();
}
else
return QString();
}
case COLUMN_FRIEND_ACCESS: case COLUMN_FRIEND_ACCESS:
return QVariant(); return QVariant();
case COLUMN_WN_VISU_DIR: case COLUMN_WN_VISU_DIR:
@ -1370,7 +1382,7 @@ void RetroshareDirModel::getFileInfoFromIndexList(const QModelIndexList& list, s
* OLD RECOMMEND SYSTEM - DISABLED * OLD RECOMMEND SYSTEM - DISABLED
******/ ******/
void RetroshareDirModel::openSelected(const QModelIndexList &qmil) void RetroshareDirModel::openSelected(const QModelIndexList &qmil, bool openDir)
{ {
#ifdef RDM_DEBUG #ifdef RDM_DEBUG
std::cerr << "RetroshareDirModel::openSelected()" << std::endl; std::cerr << "RetroshareDirModel::openSelected()" << std::endl;
@ -1393,12 +1405,15 @@ void RetroshareDirModel::openSelected(const QModelIndexList &qmil)
QDir dir(QString::fromUtf8((*it).path.c_str())); QDir dir(QString::fromUtf8((*it).path.c_str()));
QString dest; QString dest;
if ((*it).type & DIR_TYPE_FILE || (*it).type & DIR_TYPE_EXTRA_FILE) { if ((*it).type & DIR_TYPE_FILE || (!openDir && (*it).type & DIR_TYPE_EXTRA_FILE)) {
dest = dir.absoluteFilePath(QString::fromUtf8(it->name.c_str())); dest = dir.absoluteFilePath(QString::fromUtf8(it->name.c_str()));
} else if ((*it).type & DIR_TYPE_DIR) { } else if ((*it).type & DIR_TYPE_DIR) {
dest = dir.absolutePath(); dest = dir.absolutePath();
} else if (openDir) // extra
{
QDir d = QFileInfo(it->name.c_str()).absoluteDir();
dest = d.absolutePath();
} }
std::cerr << "Opening this file: " << dest.toStdString() << std::endl ; std::cerr << "Opening this file: " << dest.toStdString() << std::endl ;
RsUrlHandler::openUrl(QUrl::fromLocalFile(dest)); RsUrlHandler::openUrl(QUrl::fromLocalFile(dest));

View file

@ -82,7 +82,7 @@ class RetroshareDirModel : public QAbstractItemModel
int getType ( const QModelIndex & index ) const ; int getType ( const QModelIndex & index ) const ;
void getFileInfoFromIndexList(const QModelIndexList& list, std::list<DirDetails>& files_info) ; void getFileInfoFromIndexList(const QModelIndexList& list, std::list<DirDetails>& files_info) ;
void openSelected(const QModelIndexList &list); void openSelected(const QModelIndexList &list, bool openDir = false);
void getFilePaths(const QModelIndexList &list, std::list<std::string> &fullpaths); void getFilePaths(const QModelIndexList &list, std::list<std::string> &fullpaths);
void getFilePath(const QModelIndex& index, std::string& fullpath); void getFilePath(const QModelIndex& index, std::string& fullpath);
void changeAgeIndicator(uint32_t indicator) { ageIndicator = indicator; } void changeAgeIndicator(uint32_t indicator) { ageIndicator = indicator; }

View file

@ -23,6 +23,7 @@
#include "ServicePermissionDialog.h" #include "ServicePermissionDialog.h"
#include "ui_ServicePermissionDialog.h" #include "ui_ServicePermissionDialog.h"
#include "settings/rsharesettings.h" #include "settings/rsharesettings.h"
#include "gui/common/FilesDefs.h"
static ServicePermissionDialog *servicePermissionDialog = NULL; static ServicePermissionDialog *servicePermissionDialog = NULL;
@ -36,7 +37,7 @@ ServicePermissionDialog::ServicePermissionDialog() :
Settings->loadWidgetInformation(this); Settings->loadWidgetInformation(this);
ui->headerFrame->setHeaderImage(QPixmap(":/images/user/servicepermissions64.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/servicepermissions64.png"));
ui->headerFrame->setHeaderText(tr("Service Permissions")); ui->headerFrame->setHeaderText(tr("Service Permissions"));
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(setPermissions())); connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(setPermissions()));

View file

@ -38,10 +38,11 @@
#include "gui/notifyqt.h" #include "gui/notifyqt.h"
#include "util/QtVersion.h" #include "util/QtVersion.h"
#include "util/misc.h" #include "util/misc.h"
#include "gui/common/FilesDefs.h"
/* Images for context menu icons */ /* Images for context menu icons */
#define IMAGE_CANCEL ":/images/delete.png" #define IMAGE_CANCEL ":/images/delete.png"
#define IMAGE_EDIT ":/images/edit_16.png" #define IMAGE_EDIT ":/icons/png/pencil-edit-button.png"
#define COLUMN_PATH 0 #define COLUMN_PATH 0
#define COLUMN_VIRTUALNAME 1 #define COLUMN_VIRTUALNAME 1
@ -57,7 +58,7 @@ ShareManager::ShareManager()
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);
ui.headerFrame->setHeaderImage(QPixmap(":/images/fileshare64.png")); ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/fileshare64.png"));
ui.headerFrame->setHeaderText(tr("Share Manager")); ui.headerFrame->setHeaderText(tr("Share Manager"));
isLoading = false; isLoading = false;

View file

@ -409,7 +409,7 @@ void PulseAddDialog::addImage(const QString &path)
std::cerr << "PulseAddDialog::addImage() loading image from: " << path.toStdString(); std::cerr << "PulseAddDialog::addImage() loading image from: " << path.toStdString();
std::cerr << std::endl; std::cerr << std::endl;
QPixmap qtn = QPixmap(path); QPixmap qtn = FilesDefs::getPixmapFromQtResourcePath(path);
if (qtn.isNull()) { if (qtn.isNull()) {
std::cerr << "PulseAddDialog::addImage() Invalid Image"; std::cerr << "PulseAddDialog::addImage() Invalid Image";
std::cerr << std::endl; std::cerr << std::endl;

View file

@ -126,9 +126,9 @@ void PulseTopLevel::setReferenceString(QString ref)
// set ref icon // set ref icon
if (mPulse->mPulseType & WIRE_PULSE_TYPE_REPUBLISH) { if (mPulse->mPulseType & WIRE_PULSE_TYPE_REPUBLISH) {
label_reficon->setPixmap(QPixmap(":/images/retweet.png")); label_reficon->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/retweet.png"));
} else { } else {
label_reficon->setPixmap(QPixmap(":/images/reply.png")); label_reficon->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/reply.png"));
} }
} }

View file

@ -67,7 +67,7 @@ void PulseViewGroup::setup()
else else
{ {
// default. // default.
QPixmap pixmap = QPixmap(":/icons/png/posted.png").scaled(50,50); QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png").scaled(50,50);
label_headshot->setPixmap(pixmap); label_headshot->setPixmap(pixmap);
} }

View file

@ -281,7 +281,7 @@ void PulseDataItem::showPulse()
if (!headshotOkay) if (!headshotOkay)
{ {
// default. // default.
QPixmap pixmap = QPixmap(":/icons/png/posted.png").scaled(50,50); QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png").scaled(50,50);
setHeadshot(pixmap); setHeadshot(pixmap);
} }
@ -346,7 +346,7 @@ void PulseDataItem::showPulse()
if (!headshotOkay) if (!headshotOkay)
{ {
// default. // default.
QPixmap pixmap = QPixmap(":/icons/png/posted.png").scaled(50,50); QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png").scaled(50,50);
setHeadshot(pixmap); // QPixmap(":/icons/png/posted.png")); setHeadshot(pixmap); // QPixmap(":/icons/png/posted.png"));
} }

View file

@ -94,7 +94,7 @@ void WireGroupDialog::initUi()
QPixmap WireGroupDialog::serviceImage() QPixmap WireGroupDialog::serviceImage()
{ {
return QPixmap(":/icons/wire-circle.png"); return FilesDefs::getPixmapFromQtResourcePath(":/icons/wire-circle.png");
} }
void WireGroupDialog::prepareWireGroup(RsWireGroup &group, const RsGroupMetaData &meta) void WireGroupDialog::prepareWireGroup(RsWireGroup &group, const RsGroupMetaData &meta)
@ -178,7 +178,7 @@ bool WireGroupDialog::service_loadGroup(const RsGxsGenericGroupData *data, Mode
setLogo(pixmap); setLogo(pixmap);
} }
} else { } else {
setLogo(QPixmap(":/images/album_create_64.png")); setLogo(FilesDefs::getPixmapFromQtResourcePath(":/images/album_create_64.png"));
} }
#endif #endif

View file

@ -66,7 +66,7 @@ void WireGroupItem::setup()
else else
{ {
// default. // default.
QPixmap pixmap = QPixmap(":/icons/wire.png").scaled(32,32); QPixmap pixmap = FilesDefs::getPixmapFromQtResourcePath(":/icons/wire.png").scaled(32,32);
label_headshot->setPixmap(pixmap); label_headshot->setPixmap(pixmap);
} }

View file

@ -74,7 +74,7 @@
#define IMAGE_FORUMAUTHD ":/images/konv_message2.png" #define IMAGE_FORUMAUTHD ":/images/konv_message2.png"
#define IMAGE_COPYLINK ":/images/copyrslink.png" #define IMAGE_COPYLINK ":/images/copyrslink.png"
#define IMAGE_WIKI ":/icons/png/wiki.png" #define IMAGE_WIKI ":/icons/png/wiki.png"
#define IMAGE_EDIT ":/images/edit_16.png" #define IMAGE_EDIT ":/icons/png/pencil-edit-button.png"
/** Constructor */ /** Constructor */

View file

@ -414,7 +414,7 @@ void WikiEditDialog::setNewPage()
ui.groupBox_History->hide(); ui.groupBox_History->hide();
ui.pushButton_History->setText(tr("Show Edit History")); ui.pushButton_History->setText(tr("Show Edit History"));
ui.headerFrame->setHeaderImage(QPixmap(":/images/addpage.png")); ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/addpage.png"));
ui.headerFrame->setHeaderText(tr("Create New Wiki Page")); ui.headerFrame->setHeaderText(tr("Create New Wiki Page"));
setWindowTitle(tr("Create New Wiki Page")); setWindowTitle(tr("Create New Wiki Page"));
@ -569,7 +569,7 @@ void WikiEditDialog::setupData(const RsGxsGroupId &groupId, const RsGxsMessageId
requestPage(msgId); requestPage(msgId);
} }
ui.headerFrame->setHeaderImage(QPixmap(":/images/editpage.png")); ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/editpage.png"));
ui.headerFrame->setHeaderText(tr("Edit Wiki Page")); ui.headerFrame->setHeaderText(tr("Edit Wiki Page"));
setWindowTitle(tr("Edit Wiki Page")); setWindowTitle(tr("Edit Wiki Page"));

View file

@ -154,7 +154,7 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
{ {
QIcon icon ; QIcon icon ;
icon.addPixmap(QPixmap(":/icons/png/invite.png")) ; icon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/invite.png")) ;
inviteFriendsButton->setIcon(icon) ; inviteFriendsButton->setIcon(icon) ;
inviteFriendsButton->setIconSize(icon_size); inviteFriendsButton->setIconSize(icon_size);
} }
@ -196,7 +196,7 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
{ {
QIcon icon ; QIcon icon ;
icon.addPixmap(QPixmap(":/icons/png/leave.png")) ; icon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/leave.png")) ;
unsubscribeButton->setIcon(icon) ; unsubscribeButton->setIcon(icon) ;
unsubscribeButton->setIconSize(icon_size); unsubscribeButton->setIconSize(icon_size);
} }
@ -994,7 +994,7 @@ void ChatLobbyDialog::setWindowed(bool windowed)
mPCWindow->addDialog(this); mPCWindow->addDialog(this);
undockButton->setToolTip(tr("Redock to Main window")); undockButton->setToolTip(tr("Redock to Main window"));
icon.addPixmap(QPixmap(":/icons/png/dock.png")) ; icon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/dock.png")) ;
undockButton->setIcon(icon) ; undockButton->setIcon(icon) ;
undockButton->setIconSize(icon_size); undockButton->setIconSize(icon_size);
} }
@ -1009,7 +1009,7 @@ void ChatLobbyDialog::setWindowed(bool windowed)
chatLobbyPage->addChatPage(this); chatLobbyPage->addChatPage(this);
undockButton->setToolTip(tr("Undock to a new window")); undockButton->setToolTip(tr("Undock to a new window"));
icon.addPixmap(QPixmap(":/icons/png/undock.png")) ; icon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/undock.png")) ;
undockButton->setIcon(icon) ; undockButton->setIcon(icon) ;
undockButton->setIconSize(icon_size); undockButton->setIconSize(icon_size);
} }

View file

@ -1863,7 +1863,7 @@ void ChatWidget::updatePeersCustomStateString(const QString& /*peer_id*/, const
void ChatWidget::updateStatusString(const QString &statusMask, const QString &statusString, bool permanent) void ChatWidget::updateStatusString(const QString &statusMask, const QString &statusString, bool permanent)
{ {
ui->typingLabel->setText(QString(statusMask).arg(trUtf8(statusString.toUtf8()))); // displays info for 5 secs. ui->typingLabel->setText(QString(statusMask).arg(trUtf8(statusString.toUtf8()))); // displays info for 5 secs.
ui->typingPixmapLabel->setPixmap(QPixmap(":icons/png/typing.png") ); ui->typingPixmapLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":icons/png/typing.png") );
if (statusString == "is typing...") { if (statusString == "is typing...") {
typing = true; typing = true;

View file

@ -33,6 +33,7 @@
#include "gui/common/PeerDefs.h" #include "gui/common/PeerDefs.h"
#include "ChatDialog.h" #include "ChatDialog.h"
#include "gui/ChatLobbyWidget.h" #include "gui/ChatLobbyWidget.h"
#include "gui/common/FilesDefs.h"
CreateLobbyDialog::CreateLobbyDialog(const std::set<RsPeerId>& peer_list, int privacyLevel, QWidget *parent) : CreateLobbyDialog::CreateLobbyDialog(const std::set<RsPeerId>& peer_list, int privacyLevel, QWidget *parent) :
QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint) QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
@ -40,7 +41,7 @@ CreateLobbyDialog::CreateLobbyDialog(const std::set<RsPeerId>& peer_list, int pr
ui = new Ui::CreateLobbyDialog() ; ui = new Ui::CreateLobbyDialog() ;
ui->setupUi(this); ui->setupUi(this);
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/chat-lobbies.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/chat-lobbies.png"));
ui->headerFrame->setHeaderText(tr("Create Chat Room")); ui->headerFrame->setHeaderText(tr("Create Chat Room"));
RsGxsId default_identity ; RsGxsId default_identity ;

View file

@ -26,6 +26,7 @@
#include <gui/gxs/GxsIdDetails.h> #include <gui/gxs/GxsIdDetails.h>
#include "AvatarDefs.h" #include "AvatarDefs.h"
#include "gui/common/FilesDefs.h"
void AvatarDefs::getOwnAvatar(QPixmap &avatar, const QString& defaultImage) void AvatarDefs::getOwnAvatar(QPixmap &avatar, const QString& defaultImage)
{ {
@ -36,7 +37,7 @@ void AvatarDefs::getOwnAvatar(QPixmap &avatar, const QString& defaultImage)
rsMsgs->getOwnAvatarData(data, size); rsMsgs->getOwnAvatarData(data, size);
if (size == 0) { if (size == 0) {
avatar = QPixmap(defaultImage); avatar = FilesDefs::getPixmapFromQtResourcePath(defaultImage);
return; return;
} }
@ -53,7 +54,7 @@ bool AvatarDefs::getAvatarFromSslId(const RsPeerId& sslId, QPixmap &avatar, cons
/* get avatar */ /* get avatar */
rsMsgs->getAvatarData(RsPeerId(sslId), data, size); rsMsgs->getAvatarData(RsPeerId(sslId), data, size);
if (size == 0) { if (size == 0) {
avatar = QPixmap(defaultImage); avatar = FilesDefs::getPixmapFromQtResourcePath(defaultImage);
return false; return false;
} }
@ -72,7 +73,7 @@ bool AvatarDefs::getAvatarFromGxsId(const RsGxsId& gxsId, QPixmap &avatar, const
if(!rsIdentity->getIdDetails(gxsId, details)) if(!rsIdentity->getIdDetails(gxsId, details))
{ {
avatar = QPixmap(defaultImage); avatar = FilesDefs::getPixmapFromQtResourcePath(defaultImage);
return false; return false;
} }
@ -107,7 +108,7 @@ bool AvatarDefs::getAvatarFromGpgId(const RsPgpId& gpgId, QPixmap &avatar, const
} }
if (size == 0) { if (size == 0) {
avatar = QPixmap(defaultImage); avatar = FilesDefs::getPixmapFromQtResourcePath(defaultImage);
return false; return false;
} }

View file

@ -24,6 +24,7 @@
#include "ui_AvatarDialog.h" #include "ui_AvatarDialog.h"
#include "AvatarDefs.h" #include "AvatarDefs.h"
#include "util/misc.h" #include "util/misc.h"
#include "gui/common/FilesDefs.h"
/** Constructor */ /** Constructor */
AvatarDialog::AvatarDialog(QWidget *parent) : AvatarDialog::AvatarDialog(QWidget *parent) :
@ -33,7 +34,7 @@ AvatarDialog::AvatarDialog(QWidget *parent) :
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui->setupUi(this); ui->setupUi(this);
ui->headerFrame->setHeaderImage(QPixmap(":/images/no_avatar_70.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/no_avatar_70.png"));
ui->headerFrame->setHeaderText(tr("Set your Avatar picture")); ui->headerFrame->setHeaderText(tr("Set your Avatar picture"));
connect(ui->avatarButton, SIGNAL(clicked(bool)), this, SLOT(changeAvatar())); connect(ui->avatarButton, SIGNAL(clicked(bool)), this, SLOT(changeAvatar()));

View file

@ -238,7 +238,7 @@ void Emoticons::showSmileyWidget(QWidget *parent, QWidget *button, const char *s
QPushButton *button = new QPushButton("", tabGrpWidget); QPushButton *button = new QPushButton("", tabGrpWidget);
button->setIconSize(QSize(buttonWidth, buttonHeight)); button->setIconSize(QSize(buttonWidth, buttonHeight));
button->setFixedSize(QSize(buttonWidth, buttonHeight)); button->setFixedSize(QSize(buttonWidth, buttonHeight));
button->setIcon(QPixmap(group.value(key))); button->setIcon(FilesDefs::getIconFromQtResourcePath(group.value(key)));
button->setToolTip(key); button->setToolTip(key);
button->setStyleSheet("QPushButton:hover {border: 3px solid #0099cc; border-radius: 3px;}"); button->setStyleSheet("QPushButton:hover {border: 3px solid #0099cc; border-radius: 3px;}");
button->setFlat(true); button->setFlat(true);
@ -402,7 +402,7 @@ void Emoticons::showStickerWidget(QWidget *parent, QWidget *button, const char *
button->setFixedSize(QSize(buttonWidth, buttonHeight)); button->setFixedSize(QSize(buttonWidth, buttonHeight));
if(!iconcache.contains(fi.absoluteFilePath())) if(!iconcache.contains(fi.absoluteFilePath()))
{ {
iconcache.insert(fi.absoluteFilePath(), QPixmap(fi.absoluteFilePath()).scaled(buttonWidth, buttonHeight, Qt::KeepAspectRatio)); iconcache.insert(fi.absoluteFilePath(), FilesDefs::getPixmapFromQtResourcePath(fi.absoluteFilePath()).scaled(buttonWidth, buttonHeight, Qt::KeepAspectRatio));
} }
button->setIcon(iconcache[fi.absoluteFilePath()]); button->setIcon(iconcache[fi.absoluteFilePath()]);
button->setToolTip(fi.fileName()); button->setToolTip(fi.fileName());

View file

@ -70,7 +70,7 @@
#define IMAGE_CONNECT ":/images/connect_friend.png" #define IMAGE_CONNECT ":/images/connect_friend.png"
#define IMAGE_COPYLINK ":/images/copyrslink.png" #define IMAGE_COPYLINK ":/images/copyrslink.png"
#define IMAGE_GROUP16 ":/images/user/group16.png" #define IMAGE_GROUP16 ":/images/user/group16.png"
#define IMAGE_EDIT ":/images/edit_16.png" #define IMAGE_EDIT ":/icons/png/pencil-edit-button.png"
#define IMAGE_REMOVE ":/images/delete.png" #define IMAGE_REMOVE ":/images/delete.png"
#define IMAGE_EXPAND ":/images/edit_add24.png" #define IMAGE_EXPAND ":/images/edit_add24.png"
#define IMAGE_COLLAPSE ":/images/edit_remove24.png" #define IMAGE_COLLAPSE ":/images/edit_remove24.png"
@ -306,7 +306,7 @@ void FriendList::peerTreeWidgetCustomPopupMenu()
hbox->setSpacing(6); hbox->setSpacing(6);
QLabel *iconLabel = new QLabel(widget); QLabel *iconLabel = new QLabel(widget);
QPixmap pix = QPixmap(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5); QPixmap pix = FilesDefs::getPixmapFromQtResourcePath(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
iconLabel->setPixmap(pix); iconLabel->setPixmap(pix);
iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width()); iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width());
hbox->addWidget(iconLabel); hbox->addWidget(iconLabel);
@ -1006,7 +1006,7 @@ void FriendList::insertPeers()
sslItem->setHidden(false); sslItem->setHidden(false);
gpg_connected = true; gpg_connected = true;
sslOverlayIcon = QPixmap(StatusDefs::imageStatus(bestRSState)); sslOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(StatusDefs::imageStatus(bestRSState));
connectStateString = StatusDefs::name(rsState); connectStateString = StatusDefs::name(rsState);
@ -1024,9 +1024,9 @@ void FriendList::insertPeers()
peerState = PEER_STATE_AVAILABLE; peerState = PEER_STATE_AVAILABLE;
if (sslDetail.connectState) { if (sslDetail.connectState) {
sslOverlayIcon = QPixmap(":/images/connect_creating.png"); sslOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(":/images/connect_creating.png");
} else { } else {
sslOverlayIcon = QPixmap(StatusDefs::imageStatus(RS_STATUS_ONLINE)); sslOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(StatusDefs::imageStatus(RS_STATUS_ONLINE));
} }
connectStateString = StatusDefs::name(RS_STATUS_ONLINE); connectStateString = StatusDefs::name(RS_STATUS_ONLINE);
@ -1037,9 +1037,9 @@ void FriendList::insertPeers()
peerState = PEER_STATE_OFFLINE; peerState = PEER_STATE_OFFLINE;
sslItem->setHidden(mHideUnconnected); sslItem->setHidden(mHideUnconnected);
if (sslDetail.connectState) { if (sslDetail.connectState) {
sslOverlayIcon = QPixmap(":/images/connect_creating.png"); sslOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(":/images/connect_creating.png");
} else { } else {
sslOverlayIcon = QPixmap(StatusDefs::imageStatus(RS_STATUS_OFFLINE)); sslOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(StatusDefs::imageStatus(RS_STATUS_OFFLINE));
} }
connectStateString = StatusDefs::connectStateWithoutTransportTypeString(sslDetail); connectStateString = StatusDefs::connectStateWithoutTransportTypeString(sslDetail);
@ -1099,7 +1099,7 @@ void FriendList::insertPeers()
if (std::find(privateChatIds.begin(), privateChatIds.end(), sslDetail.id) != privateChatIds.end()) { if (std::find(privateChatIds.begin(), privateChatIds.end(), sslDetail.id) != privateChatIds.end()) {
// private chat is available // private chat is available
sslOverlayIcon = QPixmap(":/images/chat.png"); sslOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(":/images/chat.png");
gpg_hasPrivateChat = true; gpg_hasPrivateChat = true;
} }
sslItem->setIcon(COLUMN_NAME, createAvatar(sslAvatar, sslOverlayIcon)); sslItem->setIcon(COLUMN_NAME, createAvatar(sslAvatar, sslOverlayIcon));
@ -1138,7 +1138,7 @@ void FriendList::insertPeers()
gpgFont = StatusDefs::font(bestRSState); gpgFont = StatusDefs::font(bestRSState);
if (showInfoAtGpgItem) { if (showInfoAtGpgItem) {
gpgOverlayIcon = QPixmap(StatusDefs::imageStatus(bestRSState)); gpgOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(StatusDefs::imageStatus(bestRSState));
if (mShowState) { if (mShowState) {
gpgText = StatusDefs::name(bestRSState); gpgText = StatusDefs::name(bestRSState);
@ -1164,7 +1164,7 @@ void FriendList::insertPeers()
gpgText += tr("Available"); gpgText += tr("Available");
} }
gpgOverlayIcon = QPixmap(IMAGE_AVAILABLE); gpgOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(IMAGE_AVAILABLE);
} }
} else { } else {
bestPeerState = PEER_STATE_OFFLINE; bestPeerState = PEER_STATE_OFFLINE;
@ -1178,15 +1178,15 @@ void FriendList::insertPeers()
gpgText += StatusDefs::name(RS_STATUS_OFFLINE); gpgText += StatusDefs::name(RS_STATUS_OFFLINE);
} }
gpgOverlayIcon = QPixmap(StatusDefs::imageStatus(RS_STATUS_OFFLINE)); gpgOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(StatusDefs::imageStatus(RS_STATUS_OFFLINE));
} }
} }
if (gpg_hasPrivateChat) { if (gpg_hasPrivateChat) {
gpgOverlayIcon = QPixmap(":/images/chat.png"); gpgOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(":/images/chat.png");
} }
gpgItem->setIcon(COLUMN_NAME, createAvatar(bestAvatar.isNull() ? QPixmap(AVATAR_DEFAULT_IMAGE) : bestAvatar, gpgOverlayIcon)); gpgItem->setIcon(COLUMN_NAME, createAvatar(bestAvatar.isNull() ? FilesDefs::getPixmapFromQtResourcePath(AVATAR_DEFAULT_IMAGE) : bestAvatar, gpgOverlayIcon));
/* Create or get gpg label */ /* Create or get gpg label */
ElidedLabel *gpgNameLabel = NULL; ElidedLabel *gpgNameLabel = NULL;

View file

@ -65,8 +65,8 @@
<string>Display</string> <string>Display</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../images.qrc"> <iconset resource="../icons.qrc">
<normaloff>:/images/looknfeel.png</normaloff>:/images/looknfeel.png</iconset> <normaloff>:/icons/svg/design.svg</normaloff>:/icons/svg/design.svg</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
@ -147,6 +147,7 @@
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>
<include location="../icons.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View file

@ -69,7 +69,7 @@
#define IMAGE_CONNECT ":/images/connect_friend.png" #define IMAGE_CONNECT ":/images/connect_friend.png"
#define IMAGE_COPYLINK ":/images/copyrslink.png" #define IMAGE_COPYLINK ":/images/copyrslink.png"
#define IMAGE_GROUP16 ":/images/user/group16.png" #define IMAGE_GROUP16 ":/images/user/group16.png"
#define IMAGE_EDIT ":/images/edit_16.png" #define IMAGE_EDIT ":/icons/png/pencil-edit-button.png"
#define IMAGE_REMOVE ":/images/delete.png" #define IMAGE_REMOVE ":/images/delete.png"
#define IMAGE_EXPAND ":/images/edit_add24.png" #define IMAGE_EXPAND ":/images/edit_add24.png"
#define IMAGE_COLLAPSE ":/images/edit_remove24.png" #define IMAGE_COLLAPSE ":/images/edit_remove24.png"
@ -307,7 +307,7 @@ void NewFriendList::headerContextMenuRequested(QPoint p)
hbox->setSpacing(6); hbox->setSpacing(6);
QLabel *iconLabel = new QLabel(widget); QLabel *iconLabel = new QLabel(widget);
QPixmap pix = QPixmap(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5); QPixmap pix = FilesDefs::getPixmapFromQtResourcePath(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
iconLabel->setPixmap(pix); iconLabel->setPixmap(pix);
iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width()); iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width());
hbox->addWidget(iconLabel); hbox->addWidget(iconLabel);
@ -534,7 +534,7 @@ void NewFriendList::peerTreeWidgetCustomPopupMenu()
hbox->setSpacing(6); hbox->setSpacing(6);
QLabel *iconLabel = new QLabel(widget); QLabel *iconLabel = new QLabel(widget);
QPixmap pix = QPixmap(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5); QPixmap pix = FilesDefs::getPixmapFromQtResourcePath(":/images/user/friends24.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
iconLabel->setPixmap(pix); iconLabel->setPixmap(pix);
iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width()); iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width());
hbox->addWidget(iconLabel); hbox->addWidget(iconLabel);

View file

@ -27,6 +27,7 @@
#include "RSTextBrowser.h" #include "RSTextBrowser.h"
#include "RSImageBlockWidget.h" #include "RSImageBlockWidget.h"
#include "gui/common/FilesDefs.h"
#include <retroshare/rsinit.h> //To get RsAccounts #include <retroshare/rsinit.h> //To get RsAccounts
@ -149,7 +150,7 @@ QVariant RSTextBrowser::loadResource(int type, const QUrl &name)
QPixmap RSTextBrowser::getBlockedImage() QPixmap RSTextBrowser::getBlockedImage()
{ {
return QPixmap(":/images/imageblocked_24.png"); return FilesDefs::getPixmapFromQtResourcePath(":/images/imageblocked_24.png");
} }
void RSTextBrowser::setImageBlockWidget(RSImageBlockWidget *widget) void RSTextBrowser::setImageBlockWidget(RSImageBlockWidget *widget)

View file

@ -30,7 +30,10 @@ RSTreeView::RSTreeView(QWidget *parent) : QTreeView(parent)
void RSTreeView::wheelEvent(QWheelEvent *e) void RSTreeView::wheelEvent(QWheelEvent *e)
{ {
if(e->modifiers() == Qt::ControlModifier) if(e->modifiers() == Qt::ControlModifier)
{
emit zoomRequested(e->delta() > 0); emit zoomRequested(e->delta() > 0);
return;
}
else else
QTreeView::wheelEvent(e); QTreeView::wheelEvent(e);
} }

View file

@ -29,6 +29,7 @@
#include <QWidgetAction> #include <QWidgetAction>
#include "gui/settings/rsharesettings.h" #include "gui/settings/rsharesettings.h"
#include "gui/common/FilesDefs.h"
RSTreeWidget::RSTreeWidget(QWidget *parent) : QTreeWidget(parent) RSTreeWidget::RSTreeWidget(QWidget *parent) : QTreeWidget(parent)
{ {
@ -259,7 +260,7 @@ QMenu *RSTreeWidget::createStandardContextMenu(QMenu *contextMenu)
hbox->setSpacing(6); hbox->setSpacing(6);
QLabel *iconLabel = new QLabel(widget); QLabel *iconLabel = new QLabel(widget);
QPixmap pix = QPixmap(":/images/settings.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5); QPixmap pix = FilesDefs::getPixmapFromQtResourcePath(":/images/settings.png").scaledToHeight(QFontMetricsF(iconLabel->font()).height()*1.5);
iconLabel->setPixmap(pix); iconLabel->setPixmap(pix);
iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width()); iconLabel->setMaximumSize(iconLabel->frameSize().height() + pix.height(), pix.width());
hbox->addWidget(iconLabel); hbox->addWidget(iconLabel);

View file

@ -143,7 +143,7 @@ RsCollectionDialog::RsCollectionDialog(const QString& collectionFileName
setWindowTitle(QString("%1 - %2").arg(windowTitle()).arg(QFileInfo(_fileName).completeBaseName())); setWindowTitle(QString("%1 - %2").arg(windowTitle()).arg(QFileInfo(_fileName).completeBaseName()));
ui.headerFrame->setHeaderImage(QPixmap(":/icons/collections.png")); ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/collections.png"));
if(creation) if(creation)
{ {

View file

@ -40,6 +40,7 @@
#include "gui/RetroShareLink.h" #include "gui/RetroShareLink.h"
#include "gui/notifyqt.h" #include "gui/notifyqt.h"
#include "gui/common/AvatarDefs.h" #include "gui/common/AvatarDefs.h"
#include "gui/common/FilesDefs.h"
#include "gui/MainWindow.h" #include "gui/MainWindow.h"
#include "util/DateTime.h" #include "util/DateTime.h"
#include "util/misc.h" #include "util/misc.h"
@ -84,7 +85,7 @@ ConfCertDialog::ConfCertDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidge
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);
Settings->loadWidgetInformation(this); Settings->loadWidgetInformation(this);
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/identityinfo64.png")); ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/identityinfo64.png"));
//ui.headerFrame->setHeaderText(tr("Friend node details")); //ui.headerFrame->setHeaderText(tr("Friend node details"));
//ui._chat_CB->hide() ; //ui._chat_CB->hide() ;

View file

@ -95,10 +95,10 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
// setOption(HaveHelpButton, true); // setOption(HaveHelpButton, true);
// connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp())); // connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));
setPixmap(QWizard::LogoPixmap, QPixmap(":/icons/invite64.png")); setPixmap(QWizard::LogoPixmap, FilesDefs::getPixmapFromQtResourcePath(":/icons/invite64.png"));
// we have no good pictures for watermarks // we have no good pictures for watermarks
// setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/connectFriendWatermark.png")); // setPixmap(QWizard::WatermarkPixmap, FilesDefs::getPixmapFromQtResourcePath(":/images/connectFriendWatermark.png"));
/* register global fields */ /* register global fields */
ui->ErrorMessagePage->registerField("errorMessage", ui->messageLabel, "text"); ui->ErrorMessagePage->registerField("errorMessage", ui->messageLabel, "text");
@ -563,7 +563,7 @@ void ConnectFriendWizard::initializePage(int id)
ui->_addIPToWhiteList_ComboBox_2->addItem("(Hidden node)") ; ui->_addIPToWhiteList_ComboBox_2->addItem("(Hidden node)") ;
int S = QFontMetricsF(ui->ipEdit->font()).height() ; int S = QFontMetricsF(ui->ipEdit->font()).height() ;
ui->ipEdit->setToolTip("This is a Hidden node - you need tor/i2p proxy to connect"); ui->ipEdit->setToolTip("This is a Hidden node - you need tor/i2p proxy to connect");
ui->ipLabel->setPixmap(QPixmap(":/images/anonymous_128_blue.png").scaledToHeight(S*2,Qt::SmoothTransformation)); ui->ipLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/anonymous_128_blue.png").scaledToHeight(S*2,Qt::SmoothTransformation));
ui->ipLabel->setToolTip("This is a Hidden node - you need tor/i2p proxy to connect"); ui->ipLabel->setToolTip("This is a Hidden node - you need tor/i2p proxy to connect");
} }
if(mIsShortInvite) if(mIsShortInvite)
@ -813,7 +813,7 @@ void ConnectFriendWizard::cleanFriendCert()
std::string cert = ui->friendCertEdit->toPlainText().toUtf8().constData(); std::string cert = ui->friendCertEdit->toPlainText().toUtf8().constData();
if (cert.empty()) { if (cert.empty()) {
ui->friendCertCleanLabel->setPixmap(QPixmap(":/images/delete.png")); ui->friendCertCleanLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/delete.png"));
ui->friendCertCleanLabel->setToolTip(""); ui->friendCertCleanLabel->setToolTip("");
ui->friendCertCleanLabel->setStyleSheet(""); ui->friendCertCleanLabel->setStyleSheet("");
errorMsg = tr(""); errorMsg = tr("");
@ -837,7 +837,7 @@ void ConnectFriendWizard::cleanFriendCert()
} }
errorMsg = tr("Valid certificate") + (mIsShortInvite?" (Short format)":" (plain format with profile key)"); errorMsg = tr("Valid certificate") + (mIsShortInvite?" (Short format)":" (plain format with profile key)");
ui->friendCertCleanLabel->setPixmap(QPixmap(":/images/accepted16.png")); ui->friendCertCleanLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/accepted16.png"));
} else { } else {
if (error_code > 0) { if (error_code > 0) {
switch (error_code) { switch (error_code) {
@ -856,11 +856,11 @@ void ConnectFriendWizard::cleanFriendCert()
ui->friendCertCleanLabel->setStyleSheet("QLabel#friendCertCleanLabel {border: 2px solid red; border-radius: 6px;}"); ui->friendCertCleanLabel->setStyleSheet("QLabel#friendCertCleanLabel {border: 2px solid red; border-radius: 6px;}");
} }
} }
ui->friendCertCleanLabel->setPixmap(QPixmap(":/images/delete.png")); ui->friendCertCleanLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/delete.png"));
} }
} }
ui->friendCertCleanLabel->setPixmap(certValid ? QPixmap(":/images/accepted16.png") : QPixmap(":/images/delete.png")); ui->friendCertCleanLabel->setPixmap(certValid ? FilesDefs::getPixmapFromQtResourcePath(":/images/accepted16.png") : FilesDefs::getPixmapFromQtResourcePath(":/images/delete.png"));
ui->friendCertCleanLabel->setToolTip(errorMsg); ui->friendCertCleanLabel->setToolTip(errorMsg);
ui->friendCertCleanLabel->setText(errorMsg); ui->friendCertCleanLabel->setText(errorMsg);

View file

@ -29,6 +29,7 @@
#include <retroshare/rsdht.h> #include <retroshare/rsdht.h>
#include "gui/common/StatusDefs.h" #include "gui/common/StatusDefs.h"
#include "gui/common/FilesDefs.h"
/* maintain one static dialog per SSL ID */ /* maintain one static dialog per SSL ID */
@ -56,7 +57,7 @@ ConnectProgressDialog::ConnectProgressDialog(const RsPeerId& id, QWidget *parent
ui->setupUi(this); ui->setupUi(this);
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
ui->headerFrame->setHeaderImage(QPixmap(":/images/user/identityinfo64.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/identityinfo64.png"));
ui->headerFrame->setHeaderText(tr("Connection Assistant")); ui->headerFrame->setHeaderText(tr("Connection Assistant"));
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(stopAndClose())); connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(stopAndClose()));

View file

@ -75,7 +75,7 @@ PGPKeyDialog::PGPKeyDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidget *p
// ui._useOldFormat_CB->setEnabled(false) ; // ui._useOldFormat_CB->setEnabled(false) ;
// } // }
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/identityinfo64.png")); ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/identityinfo64.png"));
ui.headerFrame->setHeaderText(tr("Retroshare profile")); ui.headerFrame->setHeaderText(tr("Retroshare profile"));
//ui._chat_CB->hide() ; //ui._chat_CB->hide() ;

View file

@ -148,7 +148,7 @@ void GxsChannelGroupItem::fill()
if (mGroup.mImage.mData != NULL) { if (mGroup.mImage.mData != NULL) {
QPixmap chanImage; QPixmap chanImage;
GxsIdDetails::loadPixmapFromData(mGroup.mImage.mData, mGroup.mImage.mSize, chanImage,GxsIdDetails::ORIGINAL); GxsIdDetails::loadPixmapFromData(mGroup.mImage.mData, mGroup.mImage.mSize, chanImage,GxsIdDetails::ORIGINAL);
ui->logoLabel->setPixmap(QPixmap(chanImage)); ui->logoLabel->setPixmap(chanImage);
} }
if (IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags)) { if (IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags)) {

View file

@ -156,7 +156,7 @@ void GxsChannelPostItem::setup()
// memory. // memory.
ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default-video.png")); ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default-video.png"));
ui->warn_image_label->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/status_unknown.png")); //ui->warn_image_label->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/status_unknown.png"));
ui->readButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-unread.png")); ui->readButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-unread.png"));
ui->voteUpButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_up.png")); ui->voteUpButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_up.png"));
ui->voteDownButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_down.png")); ui->voteDownButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/vote_down.png"));
@ -211,12 +211,12 @@ void GxsChannelPostItem::setup()
ui->downloadButton->hide(); ui->downloadButton->hide();
ui->playButton->hide(); ui->playButton->hide();
ui->warn_image_label->hide(); //ui->warn_image_label->hide();
ui->warning_label->hide(); //ui->warning_label->hide();
ui->titleLabel->setMinimumWidth(100); ui->titleLabel->setMinimumWidth(100);
//ui->subjectLabel->setMinimumWidth(100); //ui->subjectLabel->setMinimumWidth(100);
ui->warning_label->setMinimumWidth(100); //ui->warning_label->setMinimumWidth(100);
ui->mainFrame->setProperty("new", false); ui->mainFrame->setProperty("new", false);
ui->mainFrame->style()->unpolish(ui->mainFrame); ui->mainFrame->style()->unpolish(ui->mainFrame);
@ -466,7 +466,7 @@ void GxsChannelPostItem::fill()
ui->titleLabel->setText(title); ui->titleLabel->setText(title);
RetroShareLink msgLink = RetroShareLink::createGxsMessageLink(RetroShareLink::TYPE_CHANNEL, mPost.mMeta.mGroupId, mPost.mMeta.mMsgId, messageName()); RetroShareLink msgLink = RetroShareLink::createGxsMessageLink(RetroShareLink::TYPE_CHANNEL, mPost.mMeta.mGroupId, mPost.mMeta.mMsgId, messageName());
//ui->subjectLabel->setText(msgLink.toHtml()); ui->subjectLabel->setText(msgLink.toHtml());
if (IS_GROUP_SUBSCRIBED(mGroupMeta.mSubscribeFlags) || IS_GROUP_ADMIN(mGroupMeta.mSubscribeFlags)) if (IS_GROUP_SUBSCRIBED(mGroupMeta.mSubscribeFlags) || IS_GROUP_ADMIN(mGroupMeta.mSubscribeFlags))
{ {
@ -489,12 +489,12 @@ void GxsChannelPostItem::fill()
/* subject */ /* subject */
ui->titleLabel->setText(QString::fromUtf8(mPost.mMeta.mMsgName.c_str())); ui->titleLabel->setText(QString::fromUtf8(mPost.mMeta.mMsgName.c_str()));
//uint32_t autorized_lines = (int)floor((ui->logoLabel->height() - ui->titleLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height()); uint32_t autorized_lines = (int)floor((ui->logoLabel->height() - ui->titleLabel->height() - ui->buttonHLayout->sizeHint().height())/QFontMetricsF(ui->subjectLabel->font()).height());
// fill first 4 lines of message. (csoler) Disabled the replacement of smileys and links, because the cost is too crazy // fill first 4 lines of message. (csoler) Disabled the replacement of smileys and links, because the cost is too crazy
//ui->subjectLabel->setText(RsHtml().formatText(NULL, RsStringUtil::CopyLines(QString::fromUtf8(mPost.mMsg.c_str()), autorized_lines), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS)); //ui->subjectLabel->setText(RsHtml().formatText(NULL, RsStringUtil::CopyLines(QString::fromUtf8(mPost.mMsg.c_str()), autorized_lines), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
//ui->subjectLabel->setText(RsStringUtil::CopyLines(QString::fromUtf8(mPost.mMsg.c_str()), 2)) ; ui->subjectLabel->setText(RsStringUtil::CopyLines(QString::fromUtf8(mPost.mMsg.c_str()), 2)) ;
//QString score = QString::number(post.mTopScore); //QString score = QString::number(post.mTopScore);
// scoreLabel->setText(score); // scoreLabel->setText(score);
@ -654,21 +654,21 @@ void GxsChannelPostItem::setReadStatus(bool isNew, bool isUnread)
ui->mainFrame->style()->polish( ui->mainFrame); ui->mainFrame->style()->polish( ui->mainFrame);
} }
void GxsChannelPostItem::setFileCleanUpWarning(uint32_t time_left) // void GxsChannelPostItem::setFileCleanUpWarning(uint32_t time_left)
{ // {
int hours = (int)time_left/3600; // int hours = (int)time_left/3600;
int minutes = (time_left - hours*3600)%60; // int minutes = (time_left - hours*3600)%60;
//
ui->warning_label->setText(tr("Warning! You have less than %1 hours and %2 minute before this file is deleted Consider saving it.").arg( // ui->warning_label->setText(tr("Warning! You have less than %1 hours and %2 minute before this file is deleted Consider saving it.").arg(
QString::number(hours)).arg(QString::number(minutes))); // QString::number(hours)).arg(QString::number(minutes)));
//
QFont warnFont = ui->warning_label->font(); // QFont warnFont = ui->warning_label->font();
warnFont.setBold(true); // warnFont.setBold(true);
ui->warning_label->setFont(warnFont); // ui->warning_label->setFont(warnFont);
//
ui->warn_image_label->setVisible(true); // ui->warn_image_label->setVisible(true);
ui->warning_label->setVisible(true); // ui->warning_label->setVisible(true);
} // }
void GxsChannelPostItem::updateItem() void GxsChannelPostItem::updateItem()
{ {

View file

@ -56,7 +56,7 @@ public:
bool setGroup(const RsGxsChannelGroup& group, bool doFill = true); bool setGroup(const RsGxsChannelGroup& group, bool doFill = true);
bool setPost(const RsGxsChannelPost& post, bool doFill = true); bool setPost(const RsGxsChannelPost& post, bool doFill = true);
void setFileCleanUpWarning(uint32_t time_left); //void setFileCleanUpWarning(uint32_t time_left);
QString getTitleLabel(); QString getTitleLabel();
QString getMsgLabel(); QString getMsgLabel();

View file

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>922</width> <width>1092</width>
<height>187</height> <height>231</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gxsChannelPostItem_GLayout"> <layout class="QGridLayout" name="gxsChannelPostItem_GLayout">
@ -124,6 +124,16 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QLabel" name="subjectLabel">
<property name="text">
<string notr="true">TextLabel</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item> <item>
<spacer name="verticalSpacer_2"> <spacer name="verticalSpacer_2">
<property name="orientation"> <property name="orientation">
@ -137,33 +147,6 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<layout class="QHBoxLayout" name="subjectHLayout"/>
</item>
<item>
<layout class="QHBoxLayout" name="warningHLayout">
<item>
<widget class="QLabel" name="warn_image_label">
<property name="maximumSize">
<size>
<width>24</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="warning_label">
<property name="text">
<string notr="true">TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<layout class="QHBoxLayout" name="newCommHLayout"> <layout class="QHBoxLayout" name="newCommHLayout">
<property name="topMargin"> <property name="topMargin">
@ -486,21 +469,18 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>StyledElidedLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledElidedLabel.h</header>
</customwidget>
<customwidget> <customwidget>
<class>ElidedLabel</class> <class>ElidedLabel</class>
<extends>QLabel</extends> <extends>QLabel</extends>
<header location="global">gui/common/ElidedLabel.h</header> <header location="global">gui/common/ElidedLabel.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>StyledElidedLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledElidedLabel.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources/>
<include location="../icons.qrc"/>
<include location="../images.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View file

@ -159,9 +159,9 @@ void GxsForumGroupItem::fill()
ui->descLabel->setText(QString::fromUtf8(mGroup.mDescription.c_str())); ui->descLabel->setText(QString::fromUtf8(mGroup.mDescription.c_str()));
if (IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) { if (IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) {
ui->forumlogo_label->setPixmap(QPixmap(":/icons/png/forums.png")); ui->forumlogo_label->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/forums.png"));
} else { } else {
ui->forumlogo_label->setPixmap(QPixmap(":/icons/png/forums-default.png")); ui->forumlogo_label->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/forums-default.png"));
} }
if (IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags)) { if (IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags)) {

View file

@ -335,9 +335,9 @@ void GxsForumMsgItem::fill()
} }
if (IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) { if (IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) {
ui->iconLabel->setPixmap(QPixmap(":/icons/png/forums.png")); ui->iconLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/forums.png"));
} else { } else {
ui->iconLabel->setPixmap(QPixmap(":/icons/png/forums-default.png")); ui->iconLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/forums-default.png"));
} }
if (!mIsHome) { if (!mIsHome) {

View file

@ -157,15 +157,15 @@ void PostedGroupItem::fill()
GxsIdDetails::loadPixmapFromData(mGroup.mGroupImage.mData, mGroup.mGroupImage.mSize, postedImage,GxsIdDetails::ORIGINAL); GxsIdDetails::loadPixmapFromData(mGroup.mGroupImage.mData, mGroup.mGroupImage.mSize, postedImage,GxsIdDetails::ORIGINAL);
ui->logoLabel->setPixmap(QPixmap(postedImage)); ui->logoLabel->setPixmap(QPixmap(postedImage));
} else { } else {
ui->logoLabel->setPixmap(QPixmap(":/icons/png/posted.png")); ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png"));
} }
//TODO - nice icon for subscribed group //TODO - nice icon for subscribed group
// if (IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) { // if (IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) {
// ui->logoLabel->setPixmap(QPixmap(":/icons/png/posted.png")); // ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png"));
// } else { // } else {
// ui->logoLabel->setPixmap(QPixmap(":/icons/png/posted.png")); // ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png"));
// } // }
if (IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags)) { if (IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags)) {

View file

@ -26,6 +26,7 @@
#include "gui/common/GroupDefs.h" #include "gui/common/GroupDefs.h"
#include "gui/settings/rsharesettings.h" #include "gui/settings/rsharesettings.h"
#include "util/misc.h" #include "util/misc.h"
#include "gui/common/FilesDefs.h"
#include <algorithm> #include <algorithm>
@ -40,7 +41,7 @@ CreateGroup::CreateGroup(const RsNodeGroupId &groupId, QWidget *parent)
mIsStandard = false; mIsStandard = false;
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/add_group256.png")); ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/add_group256.png"));
mGroupId = groupId; mGroupId = groupId;
@ -68,7 +69,7 @@ CreateGroup::CreateGroup(const RsNodeGroupId &groupId, QWidget *parent)
} }
setWindowTitle(tr("Edit Group")); setWindowTitle(tr("Edit Group"));
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/edit_group64.png")); ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/edit_group64.png"));
ui.headerFrame->setHeaderText(tr("Edit Group")); ui.headerFrame->setHeaderText(tr("Edit Group"));
ui.groupName->setDisabled(mIsStandard); ui.groupName->setDisabled(mIsStandard);

View file

@ -46,7 +46,7 @@
#define IMAGE_INFO ":/images/info16.png" #define IMAGE_INFO ":/images/info16.png"
//#define IMAGE_GROUPAUTHD ":/images/konv_message2.png" //#define IMAGE_GROUPAUTHD ":/images/konv_message2.png"
#define IMAGE_COPYLINK ":/images/copyrslink.png" #define IMAGE_COPYLINK ":/images/copyrslink.png"
#define IMAGE_EDIT ":/images/edit_16.png" #define IMAGE_EDIT ":/icons/png/pencil-edit-button.png"
#define IMAGE_SHARE ":/images/share-icon-16.png" #define IMAGE_SHARE ":/images/share-icon-16.png"
#define IMAGE_TABNEW ":/images/tab-new.png" #define IMAGE_TABNEW ":/images/tab-new.png"
#define IMAGE_DELETE ":/images/delete.png" #define IMAGE_DELETE ":/images/delete.png"
@ -146,7 +146,7 @@ void GxsGroupFrameDialog::initUi()
{ {
registerHelpButton(ui->helpButton, getHelpString(),pageName()) ; registerHelpButton(ui->helpButton, getHelpString(),pageName()) ;
ui->titleBarPixmap->setPixmap(QPixmap(icon(ICON_NAME))); ui->titleBarPixmap->setPixmap(FilesDefs::getPixmapFromQtResourcePath(icon(ICON_NAME)));
ui->titleBarLabel->setText(text(TEXT_NAME)); ui->titleBarLabel->setText(text(TEXT_NAME));
/* Initialize group tree */ /* Initialize group tree */

View file

@ -29,6 +29,7 @@
#include <retroshare/rsposted.h> #include <retroshare/rsposted.h>
#include "gui/common/PeerDefs.h" #include "gui/common/PeerDefs.h"
#include "gui/common/FilesDefs.h"
GroupShareKey::GroupShareKey(QWidget *parent, const RsGxsGroupId &grpId, int grpType) : GroupShareKey::GroupShareKey(QWidget *parent, const RsGxsGroupId &grpId, int grpType) :
QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint), mGrpId(grpId), mGrpType(grpType) QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint), mGrpId(grpId), mGrpType(grpType)
@ -36,7 +37,7 @@ GroupShareKey::GroupShareKey(QWidget *parent, const RsGxsGroupId &grpId, int grp
ui = new Ui::ShareKey(); ui = new Ui::ShareKey();
ui->setupUi(this); ui->setupUi(this);
ui->headerFrame->setHeaderImage(QPixmap(":/images/user/agt_forum64.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/agt_forum64.png"));
ui->headerFrame->setHeaderText(tr("Share")); ui->headerFrame->setHeaderText(tr("Share"));
connect( ui->buttonBox, SIGNAL(accepted()), this, SLOT(shareKey())); connect( ui->buttonBox, SIGNAL(accepted()), this, SLOT(shareKey()));
@ -76,14 +77,14 @@ void GroupShareKey::setTyp()
if (!rsGxsChannels) if (!rsGxsChannels)
return; return;
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/channels.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/channels.png"));
ui->headerFrame->setHeaderText(tr("Share channel publish permissions")); ui->headerFrame->setHeaderText(tr("Share channel publish permissions"));
ui->sharekeyinfo_label->setText(tr("You can allow your friends to publish in your channel, or send the publish permissions to another Retroshare instance of yours. Select the friends which you want to be allowed to publish in this channel. Note: it is currently not possible to revoke channel publish permissions.")); ui->sharekeyinfo_label->setText(tr("You can allow your friends to publish in your channel, or send the publish permissions to another Retroshare instance of yours. Select the friends which you want to be allowed to publish in this channel. Note: it is currently not possible to revoke channel publish permissions."));
} }
else if(mGrpType == FORUM_KEY_SHARE) else if(mGrpType == FORUM_KEY_SHARE)
{ {
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/forums.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/forums.png"));
ui->headerFrame->setHeaderText(tr("Share forum admin permissions")); ui->headerFrame->setHeaderText(tr("Share forum admin permissions"));
ui->sharekeyinfo_label->setText(tr("You can let your friends know about your forum by sharing it with them. Select the friends with which you want to share your forum.")); ui->sharekeyinfo_label->setText(tr("You can let your friends know about your forum by sharing it with them. Select the friends with which you want to share your forum."));
@ -93,7 +94,7 @@ void GroupShareKey::setTyp()
if (!rsPosted) if (!rsPosted)
return; return;
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/posted.png")); ui->headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png"));
ui->headerFrame->setHeaderText(tr("Share board admin permissions")); ui->headerFrame->setHeaderText(tr("Share board admin permissions"));
ui->sharekeyinfo_label->setText(tr("You can allow your friends to edit the board. Select them in the list below. Note: it is not possible to revoke Board admin permissions.")); ui->sharekeyinfo_label->setText(tr("You can allow your friends to edit the board. Select them in the list below. Note: it is not possible to revoke Board admin permissions."));

View file

@ -161,7 +161,7 @@ QVariant GxsIdRSTreeWidgetItem::data(int column, int role) const
if(mId.isNull()) if(mId.isNull())
return RSTreeWidgetItem::data(column, role); return RSTreeWidgetItem::data(column, role);
else if( rsReputations->overallReputationLevel(mId) == RsReputationLevel::LOCALLY_NEGATIVE ) else if( rsReputations->overallReputationLevel(mId) == RsReputationLevel::LOCALLY_NEGATIVE )
pix = QPixmap(BANNED_IMAGE); pix = FilesDefs::getPixmapFromQtResourcePath(BANNED_IMAGE);
else if ( mAvatar.mSize == 0 || !GxsIdDetails::loadPixmapFromData(mAvatar.mData, mAvatar.mSize, pix,GxsIdDetails::LARGE) ) else if ( mAvatar.mSize == 0 || !GxsIdDetails::loadPixmapFromData(mAvatar.mData, mAvatar.mSize, pix,GxsIdDetails::LARGE) )
pix = GxsIdDetails::makeDefaultIcon(mId,GxsIdDetails::LARGE); pix = GxsIdDetails::makeDefaultIcon(mId,GxsIdDetails::LARGE);

View file

@ -87,7 +87,7 @@ void WikiGroupDialog::initUi()
QPixmap WikiGroupDialog::serviceImage() QPixmap WikiGroupDialog::serviceImage()
{ {
return QPixmap(":/icons/png/wiki.png"); return FilesDefs::getPixmapFromQtResourcePath(":/icons/png/wiki.png");
} }

View file

@ -56,7 +56,7 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
setupUi(this); setupUi(this);
Settings->loadWidgetInformation(this); Settings->loadWidgetInformation(this);
headerFrame->setHeaderImage(QPixmap(":/icons/png/channel.png")); headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/channel.png"));
if(!existing_post.isNull()) if(!existing_post.isNull())
headerFrame->setHeaderText(tr("Edit Channel Post")); headerFrame->setHeaderText(tr("Edit Channel Post"));
@ -80,6 +80,11 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
connect(generateCheckBox, SIGNAL(toggled(bool)), generateSpinBox, SLOT(setEnabled(bool))); connect(generateCheckBox, SIGNAL(toggled(bool)), generateSpinBox, SLOT(setEnabled(bool)));
connect(aspectRatio_CB,SIGNAL(currentIndexChanged(int)),this,SLOT(changeAspectRatio(int))); connect(aspectRatio_CB,SIGNAL(currentIndexChanged(int)),this,SLOT(changeAspectRatio(int)));
channelpostButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/comment.png"));
attachmentsButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/attachements.png"));
addThumbnailButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/add-image.png"));
addfilepushButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/add-file.png"));
aspectRatio_CB->setItemIcon(0,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-auto.svg")); aspectRatio_CB->setItemIcon(0,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-auto.svg"));
aspectRatio_CB->setItemIcon(1,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-1-1.svg")); aspectRatio_CB->setItemIcon(1,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-1-1.svg"));
aspectRatio_CB->setItemIcon(2,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-3-4.svg")); aspectRatio_CB->setItemIcon(2,FilesDefs::getIconFromQtResourcePath(":/icons/svg/ratio-3-4.svg"));
@ -106,6 +111,9 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
generateCheckBox->hide(); generateCheckBox->hide();
generateSpinBox->hide(); generateSpinBox->hide();
#endif #endif
/* load settings */
processSettings(true);
} }
CreateGxsChannelMsg::~CreateGxsChannelMsg() CreateGxsChannelMsg::~CreateGxsChannelMsg()
@ -114,6 +122,29 @@ CreateGxsChannelMsg::~CreateGxsChannelMsg()
#ifdef CHANNELS_FRAME_CATCHER #ifdef CHANNELS_FRAME_CATCHER
delete fCatcher; delete fCatcher;
#endif #endif
// save settings
processSettings(false);
}
void CreateGxsChannelMsg::processSettings(bool load)
{
Settings->beginGroup(QString("CreateGxsChannelMsg"));
if (load) {
// load settings
// state of Ratio combobox
int index = Settings->value("aspectRatio_CB", 0).toInt();
aspectRatio_CB->setCurrentIndex(index);
} else {
// save settings
// state of Ratio combobox
Settings->setValue("aspectRatio_CB", aspectRatio_CB->currentIndex());
}
Settings->endGroup();
} }
void CreateGxsChannelMsg::changeAspectRatio(int s) void CreateGxsChannelMsg::changeAspectRatio(int s)

View file

@ -72,6 +72,7 @@ private slots:
void on_channelpostButton_clicked(); void on_channelpostButton_clicked();
void on_attachmentsButton_clicked(); void on_attachmentsButton_clicked();
private: private:
void processSettings(bool load);
void loadChannelInfo(); void loadChannelInfo();
void loadOriginalChannelPostInfo(); void loadOriginalChannelPostInfo();
void saveChannelInfo(const RsGroupMetaData &group); void saveChannelInfo(const RsGroupMetaData &group);

View file

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>881</width> <width>881</width>
<height>383</height> <height>328</height>
</rect> </rect>
</property> </property>
<property name="acceptDrops"> <property name="acceptDrops">
@ -39,13 +39,6 @@
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0">
<widget class="HeaderFrame" name="headerFrame">
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
</widget>
</item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QFrame" name="mainFrame"> <widget class="QFrame" name="mainFrame">
<property name="frameShape"> <property name="frameShape">
@ -64,6 +57,19 @@
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="1">
<widget class="QPushButton" name="attachmentsButton">
<property name="text">
<string>Attachments</string>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3"> <item row="1" column="0" colspan="3">
<widget class="QStackedWidget" name="stackedWidget"> <widget class="QStackedWidget" name="stackedWidget">
<property name="mouseTracking"> <property name="mouseTracking">
@ -79,10 +85,14 @@
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="stackedWidgetPage1"> <widget class="QWidget" name="stackedWidgetPage1">
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QGridLayout" name="gridLayout_2">
<item> <property name="leftMargin">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <number>0</number>
<item> </property>
<property name="rightMargin">
<number>0</number>
</property>
<item row="0" column="0" rowspan="4">
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<widget class="ChannelPostThumbnailView" name="preview_W" native="true"> <widget class="ChannelPostThumbnailView" name="preview_W" native="true">
@ -102,19 +112,14 @@
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>40</height> <height>1</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" name="channelNameHLayout"> <layout class="QHBoxLayout" name="channelNameHLayout">
<property name="topMargin"> <property name="topMargin">
<number>6</number> <number>6</number>
@ -150,7 +155,7 @@
</item> </item>
</layout> </layout>
</item> </item>
<item> <item row="1" column="1">
<widget class="QLabel" name="channelAttachLabel"> <widget class="QLabel" name="channelAttachLabel">
<property name="text"> <property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -163,17 +168,13 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QPushButton" name="addThumbnailButton"> <widget class="QPushButton" name="addThumbnailButton">
<property name="text"> <property name="text">
<string>Add Channel Thumbnail</string> <string>Add Channel Thumbnail</string>
</property> </property>
<property name="icon">
<iconset>
<normaloff>:/icons/png/add-image.png</normaloff>:/icons/png/add-image.png</iconset>
</property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
<width>24</width> <width>24</width>
@ -217,10 +218,6 @@ p, li { white-space: pre-wrap; }
<property name="text"> <property name="text">
<string>Add File to Attach</string> <string>Add File to Attach</string>
</property> </property>
<property name="icon">
<iconset>
<normaloff>:/icons/png/add-file.png</normaloff>:/icons/png/add-file.png</iconset>
</property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
<width>24</width> <width>24</width>
@ -247,7 +244,7 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</item> </item>
<item> <item row="3" column="1">
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<property name="topMargin"> <property name="topMargin">
<number>9</number> <number>9</number>
@ -261,25 +258,15 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</item> </item>
<item> <item row="4" column="0" colspan="2">
<spacer name="verticalSpacer"> <widget class="RichTextEdit" name="RichTextEditWidget" native="true">
<property name="orientation"> <property name="sizePolicy">
<enum>Qt::Vertical</enum> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="sizeHint" stdset="0"> </widget>
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="RichTextEdit" name="RichTextEditWidget" native="true"/>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -342,7 +329,7 @@ p, li { white-space: pre-wrap; }
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>84</width> <width>842</width>
<height>24</height> <height>24</height>
</rect> </rect>
</property> </property>
@ -416,23 +403,6 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</widget> </widget>
</item> </item>
<item row="0" column="0">
<widget class="QPushButton" name="channelpostButton">
<property name="text">
<string>Channel Post</string>
</property>
<property name="icon">
<iconset>
<normaloff>:/icons/png/comment.png</normaloff>:/icons/png/comment.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="0" column="2"> <item row="0" column="2">
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
@ -446,14 +416,10 @@ p, li { white-space: pre-wrap; }
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="1"> <item row="0" column="0">
<widget class="QPushButton" name="attachmentsButton"> <widget class="QPushButton" name="channelpostButton">
<property name="text"> <property name="text">
<string>Attachments</string> <string>Channel Post</string>
</property>
<property name="icon">
<iconset>
<normaloff>:/icons/png/attachements.png</normaloff>:/icons/png/attachements.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
@ -500,6 +466,13 @@ p, li { white-space: pre-wrap; }
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="0" column="0">
<widget class="HeaderFrame" name="headerFrame">
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>

View file

@ -21,6 +21,7 @@
#include <QBuffer> #include <QBuffer>
#include "gui/gxs/GxsIdDetails.h" #include "gui/gxs/GxsIdDetails.h"
#include "gui/common/FilesDefs.h"
#include "GxsChannelGroupDialog.h" #include "GxsChannelGroupDialog.h"
#include <retroshare/rsgxschannels.h> #include <retroshare/rsgxschannels.h>
@ -99,11 +100,9 @@ QPixmap GxsChannelGroupDialog::serviceImage()
switch (mode()) switch (mode())
{ {
case MODE_CREATE: case MODE_CREATE:
return QPixmap(":/icons/png/channel.png");
case MODE_SHOW: case MODE_SHOW:
return QPixmap(":/icons/png/channel.png");
case MODE_EDIT: case MODE_EDIT:
return QPixmap(":/icons/png/channel.png"); return FilesDefs::getPixmapFromQtResourcePath(":/icons/png/channel.png");
} }
return QPixmap(); return QPixmap();

View file

@ -75,9 +75,10 @@ QColor SelectedColor = QRgb(0xff308dc7);
#define COLUMN_SIZE_FONT_FACTOR_H 10 #define COLUMN_SIZE_FONT_FACTOR_H 10
#define STAR_OVERLAY_IMAGE ":icons/star_overlay_128.png" #define STAR_OVERLAY_IMAGE ":icons/star_overlay_128.png"
#define IMAGE_COPYLINK ":/images/copyrslink.png" #define IMAGE_COPYLINK ":icons/png/copy.png"
#define IMAGE_GRID_VIEW ":icons/png/menu.png" #define IMAGE_GRID_VIEW ":icons/png/menu.png"
#define IMAGE_DOWNLOAD ":icons/png/download.png" #define IMAGE_DOWNLOAD ":icons/png/download.png"
#define IMAGE_UNREAD ":icons/png/message.png"
Q_DECLARE_METATYPE(ChannelPostFileInfo) Q_DECLARE_METATYPE(ChannelPostFileInfo)
@ -120,7 +121,11 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
RsGxsChannelPost post = index.data(Qt::UserRole).value<RsGxsChannelPost>() ; RsGxsChannelPost post = index.data(Qt::UserRole).value<RsGxsChannelPost>() ;
painter->fillRect( option.rect, option.backgroundBrush); // if(index.row() & 0x01)
// painter->fillRect( option.rect, option.palette.alternateBase().color());
// else
painter->fillRect( option.rect, option.palette.base().color());
painter->restore(); painter->restore();
if(mUseGrid || index.column()==0) if(mUseGrid || index.column()==0)
@ -129,6 +134,7 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
uint32_t flags = (mUseGrid)?(ChannelPostThumbnailView::FLAG_SHOW_TEXT | ChannelPostThumbnailView::FLAG_SCALE_FONT):0; uint32_t flags = (mUseGrid)?(ChannelPostThumbnailView::FLAG_SHOW_TEXT | ChannelPostThumbnailView::FLAG_SCALE_FONT):0;
ChannelPostThumbnailView w(post,flags); ChannelPostThumbnailView w(post,flags);
w.setBackgroundRole(QPalette::AlternateBase);
w.setAspectRatio(mAspectRatio); w.setAspectRatio(mAspectRatio);
w.updateGeometry(); w.updateGeometry();
w.adjustSize(); w.adjustSize();
@ -138,7 +144,14 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
if((option.state & QStyle::State_Selected) && post.mMeta.mPublishTs > 0) // check if post is selected and is not empty (end of last row) if((option.state & QStyle::State_Selected) && post.mMeta.mPublishTs > 0) // check if post is selected and is not empty (end of last row)
pixmap.fill(SelectedColor); // I dont know how to grab the backgroud color for selected objects automatically. pixmap.fill(SelectedColor); // I dont know how to grab the backgroud color for selected objects automatically.
else else
pixmap.fill(QRgb(0x00ffffff)); // choose a fully transparent background {
// we need to do the alternate color manually
//if(index.row() & 0x01)
// pixmap.fill(option.palette.alternateBase().color());
//else
pixmap.fill(option.palette.base().color());
}
w.render(&pixmap,QPoint(),QRegion(),QWidget::DrawChildren );// draw the widgets, not the background w.render(&pixmap,QPoint(),QRegion(),QWidget::DrawChildren );// draw the widgets, not the background
@ -197,8 +210,11 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
painter->drawText(QPoint(p.x()+0.5*font_height,y),QDateTime::fromSecsSinceEpoch(post.mMeta.mPublishTs).toString(Qt::DefaultLocaleShortDate)); painter->drawText(QPoint(p.x()+0.5*font_height,y),QDateTime::fromSecsSinceEpoch(post.mMeta.mPublishTs).toString(Qt::DefaultLocaleShortDate));
y += font_height; y += font_height;
if(post.mCount > 0)
{
painter->drawText(QPoint(p.x()+0.5*font_height,y),QString::number(post.mCount)+ " " +((post.mCount>1)?tr("files"):tr("file")) + " (" + QString::number(post.mSize) + " " + tr("bytes") + ")" ); painter->drawText(QPoint(p.x()+0.5*font_height,y),QString::number(post.mCount)+ " " +((post.mCount>1)?tr("files"):tr("file")) + " (" + QString::number(post.mSize) + " " + tr("bytes") + ")" );
y += font_height; y += font_height;
}
painter->restore(); painter->restore();
} }
@ -284,7 +300,13 @@ void ChannelPostFilesDelegate::paint(QPainter * painter, const QStyleOptionViewI
w.setFixedHeight(option.rect.height()); w.setFixedHeight(option.rect.height());
QPixmap pixmap(w.size()); QPixmap pixmap(w.size());
pixmap.fill(QRgb(0x00ffffff)); // choose a fully transparent background
// apparently we need to do the alternate colors manually
//if(index.row() & 0x01)
// pixmap.fill(option.palette.alternateBase().color());
//else
pixmap.fill(option.palette.base().color());
w.render(&pixmap,QPoint(),QRegion(),QWidget::DrawChildren );// draw the widgets, not the background w.render(&pixmap,QPoint(),QRegion(),QWidget::DrawChildren );// draw the widgets, not the background
painter->drawPixmap(option.rect.topLeft(),pixmap); painter->drawPixmap(option.rect.topLeft(),pixmap);
@ -334,6 +356,7 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
ui->showUnread_TB->setToolTip(tr("Show unread posts only")); ui->showUnread_TB->setToolTip(tr("Show unread posts only"));
connect(ui->showUnread_TB,SIGNAL(toggled(bool)),this,SLOT(switchOnlyUnread(bool))); connect(ui->showUnread_TB,SIGNAL(toggled(bool)),this,SLOT(switchOnlyUnread(bool)));
ui->postsTree->setAlternatingRowColors(false);
ui->postsTree->setModel(mChannelPostsModel = new RsGxsChannelPostsModel()); ui->postsTree->setModel(mChannelPostsModel = new RsGxsChannelPostsModel());
ui->postsTree->setItemDelegate(mChannelPostsDelegate = new ChannelPostDelegate()); ui->postsTree->setItemDelegate(mChannelPostsDelegate = new ChannelPostDelegate());
ui->postsTree->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); // prevents bug on w10, since row size depends on widget width ui->postsTree->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); // prevents bug on w10, since row size depends on widget width
@ -350,6 +373,7 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
ui->channelPostFiles_TV->setPlaceholderText(tr("No files in this post, or no post selected")); ui->channelPostFiles_TV->setPlaceholderText(tr("No files in this post, or no post selected"));
ui->channelPostFiles_TV->setSortingEnabled(true); ui->channelPostFiles_TV->setSortingEnabled(true);
ui->channelPostFiles_TV->sortByColumn(0, Qt::AscendingOrder); ui->channelPostFiles_TV->sortByColumn(0, Qt::AscendingOrder);
ui->channelPostFiles_TV->setAlternatingRowColors(false);
ui->channelFiles_TV->setModel(mChannelFilesModel = new RsGxsChannelPostFilesModel()); ui->channelFiles_TV->setModel(mChannelFilesModel = new RsGxsChannelPostFilesModel());
ui->channelFiles_TV->setItemDelegate(mFilesDelegate = new ChannelPostFilesDelegate()); ui->channelFiles_TV->setItemDelegate(mFilesDelegate = new ChannelPostFilesDelegate());
@ -417,8 +441,8 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
/* Initialize subscribe button */ /* Initialize subscribe button */
QIcon icon; QIcon icon;
icon.addPixmap(QPixmap(":/images/redled.png"), QIcon::Normal, QIcon::On); icon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/redled.png"), QIcon::Normal, QIcon::On);
icon.addPixmap(QPixmap(":/images/start.png"), QIcon::Normal, QIcon::Off); icon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/start.png"), QIcon::Normal, QIcon::Off);
mAutoDownloadAction = new QAction(icon, "", this); mAutoDownloadAction = new QAction(icon, "", this);
mAutoDownloadAction->setCheckable(true); mAutoDownloadAction->setCheckable(true);
connect(mAutoDownloadAction, SIGNAL(triggered()), this, SLOT(toggleAutoDownload())); connect(mAutoDownloadAction, SIGNAL(triggered()), this, SLOT(toggleAutoDownload()));
@ -492,12 +516,12 @@ void GxsChannelPostsWidgetWithModel::postContextMenu(const QPoint&)
menu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_DOWNLOAD), tr("Download files"), this, SLOT(download())); menu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_DOWNLOAD), tr("Download files"), this, SLOT(download()));
if(!IS_MSG_UNREAD(post.mMeta.mMsgStatus) && !IS_MSG_NEW(post.mMeta.mMsgStatus)) if(!IS_MSG_UNREAD(post.mMeta.mMsgStatus) && !IS_MSG_NEW(post.mMeta.mMsgStatus))
menu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COPYLINK), tr("Mark as unread"), this, SLOT(markMessageUnread())); menu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_UNREAD), tr("Mark as unread"), this, SLOT(markMessageUnread()));
} }
menu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COPYLINK), tr("Copy RetroShare Link"), this, SLOT(copyMessageLink())); menu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COPYLINK), tr("Copy RetroShare Link"), this, SLOT(copyMessageLink()));
if(IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) if(IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags))
menu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/edit_16.png"), tr("Edit"), this, SLOT(editPost())); menu.addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/pencil-edit-button.png"), tr("Edit"), this, SLOT(editPost()));
menu.exec(QCursor::pos()); menu.exec(QCursor::pos());
} }
@ -893,15 +917,7 @@ void GxsChannelPostsWidgetWithModel::processSettings(bool load)
Settings->beginGroup(QString("ChannelPostsWidget")); Settings->beginGroup(QString("ChannelPostsWidget"));
if (load) { if (load) {
#ifdef TO_REMOVE
// load settings
/* Filter */
//ui->filterLineEdit->setCurrentFilter(Settings->value("filter", FILTER_TITLE).toInt());
/* View mode */
//setViewMode(Settings->value("viewMode", VIEW_MODE_FEEDS).toInt());
#endif
// state of files tree // state of files tree
channelpostfilesheader->restoreState(Settings->value("PostFilesTree").toByteArray()); channelpostfilesheader->restoreState(Settings->value("PostFilesTree").toByteArray());
channelfilesheader->restoreState(Settings->value("FilesTree").toByteArray()); channelfilesheader->restoreState(Settings->value("FilesTree").toByteArray());
@ -909,15 +925,6 @@ void GxsChannelPostsWidgetWithModel::processSettings(bool load)
// state of splitter // state of splitter
ui->splitter->restoreState(Settings->value("SplitterChannelPosts").toByteArray()); ui->splitter->restoreState(Settings->value("SplitterChannelPosts").toByteArray());
} else { } else {
#ifdef TO_REMOVE
// save settings
/* Filter */
//Settings->setValue("filter", ui->filterLineEdit->currentFilter());
/* View mode */
//Settings->setValue("viewMode", viewMode());
#endif
// state of files tree // state of files tree
Settings->setValue("PostFilesTree", channelpostfilesheader->saveState()); Settings->setValue("PostFilesTree", channelpostfilesheader->saveState());
Settings->setValue("FilesTree", channelfilesheader->saveState()); Settings->setValue("FilesTree", channelfilesheader->saveState());
@ -945,7 +952,7 @@ void GxsChannelPostsWidgetWithModel::groupNameChanged(const QString &name)
{ {
// if (groupId().isNull()) { // if (groupId().isNull()) {
// ui->nameLabel->setText(tr("No Channel Selected")); // ui->nameLabel->setText(tr("No Channel Selected"));
// ui->logoLabel->setPixmap(QPixmap(":/icons/png/channels.png")); // ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/channels.png"));
// } else { // } else {
// ui->nameLabel->setText(name); // ui->nameLabel->setText(name);
// } // }
@ -999,7 +1006,7 @@ void GxsChannelPostsWidgetWithModel::insertChannelDetails(const RsGxsChannelGrou
if (group.mImage.mData != NULL) { if (group.mImage.mData != NULL) {
GxsIdDetails::loadPixmapFromData(group.mImage.mData, group.mImage.mSize, chanImage,GxsIdDetails::ORIGINAL); GxsIdDetails::loadPixmapFromData(group.mImage.mData, group.mImage.mSize, chanImage,GxsIdDetails::ORIGINAL);
} else { } else {
chanImage = QPixmap(ChannelPostThumbnailView::CHAN_DEFAULT_IMAGE); chanImage = FilesDefs::getPixmapFromQtResourcePath(ChannelPostThumbnailView::CHAN_DEFAULT_IMAGE);
} }
if(group.mMeta.mGroupName.empty()) if(group.mMeta.mGroupName.empty())
ui->channelName_LB->setText(tr("[No name]")); ui->channelName_LB->setText(tr("[No name]"));
@ -1105,47 +1112,6 @@ void GxsChannelPostsWidgetWithModel::insertChannelDetails(const RsGxsChannelGrou
showPostDetails(); showPostDetails();
} }
#ifdef TODO
int GxsChannelPostsWidgetWithModel::viewMode()
{
if (ui->feedToolButton->isChecked()) {
return VIEW_MODE_FEEDS;
} else if (ui->fileToolButton->isChecked()) {
return VIEW_MODE_FILES;
}
/* Default */
return VIEW_MODE_FEEDS;
}
#endif
void GxsChannelPostsWidgetWithModel::setViewMode(int viewMode)
{
#ifdef TODO
switch (viewMode) {
case VIEW_MODE_FEEDS:
ui->feedWidget->show();
ui->fileWidget->hide();
ui->feedToolButton->setChecked(true);
ui->fileToolButton->setChecked(false);
break;
case VIEW_MODE_FILES:
ui->feedWidget->hide();
ui->fileWidget->show();
ui->feedToolButton->setChecked(false);
ui->fileToolButton->setChecked(true);
break;
default:
setViewMode(VIEW_MODE_FEEDS);
return;
}
#endif
}
void GxsChannelPostsWidgetWithModel::switchOnlyUnread(bool) void GxsChannelPostsWidgetWithModel::switchOnlyUnread(bool)
{ {
filterChanged(ui->filterLineEdit->text()); filterChanged(ui->filterLineEdit->text());
@ -1159,150 +1125,6 @@ void GxsChannelPostsWidgetWithModel::filterChanged(QString s)
mChannelFilesModel->setFilter(ql,count); mChannelFilesModel->setFilter(ql,count);
} }
#ifdef TODO
/*static*/ bool GxsChannelPostsWidgetWithModel::filterItem(FeedItem *feedItem, const QString &text, int filter)
{
GxsChannelPostItem *item = dynamic_cast<GxsChannelPostItem*>(feedItem);
if (!item) {
return true;
}
bool bVisible = text.isEmpty();
if (!bVisible)
{
switch(filter)
{
case FILTER_TITLE:
bVisible = item->getTitleLabel().contains(text,Qt::CaseInsensitive);
break;
case FILTER_MSG:
bVisible = item->getMsgLabel().contains(text,Qt::CaseInsensitive);
break;
case FILTER_FILE_NAME:
{
std::list<SubFileItem *> fileItems = item->getFileItems();
std::list<SubFileItem *>::iterator lit;
for(lit = fileItems.begin(); lit != fileItems.end(); ++lit)
{
SubFileItem *fi = *lit;
QString fileName = QString::fromUtf8(fi->FileName().c_str());
bVisible = (bVisible || fileName.contains(text,Qt::CaseInsensitive));
}
break;
}
default:
bVisible = true;
break;
}
}
return bVisible;
}
void GxsChannelPostsWidget::createPostItemFromMetaData(const RsGxsMsgMetaData& meta,bool related)
{
GxsChannelPostItem *item = NULL;
RsGxsChannelPost post;
if(!meta.mOrigMsgId.isNull())
{
FeedItem *feedItem = ui->feedWidget->findFeedItem(GxsChannelPostItem::computeIdentifier(meta.mOrigMsgId)) ;
item = dynamic_cast<GxsChannelPostItem*>(feedItem);
if(item)
{
post = feedItem->post();
ui->feedWidget->removeFeedItem(item) ;
post.mOlderVersions.insert(post.mMeta.mMsgId);
GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, post, true, false,post.mOlderVersions);
ui->feedWidget->addFeedItem(item, ROLE_PUBLISH, QDateTime::fromTime_t(post.mMeta.mPublishTs));
return ;
}
}
if (related)
{
FeedItem *feedItem = ui->feedWidget->findFeedItem(GxsChannelPostItem::computeIdentifier(meta.mMsgId)) ;
item = dynamic_cast<GxsChannelPostItem*>(feedItem);
}
if (item)
{
item->setPost(post);
ui->feedWidget->setSort(item, ROLE_PUBLISH, QDateTime::fromTime_t(meta.mPublishTs));
}
else
{
GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, meta.mGroupId,meta.mMsgId, true, true);
ui->feedWidget->addFeedItem(item, ROLE_PUBLISH, QDateTime::fromTime_t(post.mMeta.mPublishTs));
}
#ifdef TODO
ui->fileWidget->addFiles(post, related);
#endif
}
void GxsChannelPostsWidget::createPostItem(const RsGxsChannelPost& post, bool related)
{
GxsChannelPostItem *item = NULL;
const RsMsgMetaData& meta(post.mMeta);
if(!meta.mOrigMsgId.isNull())
{
FeedItem *feedItem = ui->feedWidget->findFeedItem(GxsChannelPostItem::computeIdentifier(meta.mOrigMsgId)) ;
item = dynamic_cast<GxsChannelPostItem*>(feedItem);
if(item)
{
std::set<RsGxsMessageId> older_versions(item->olderVersions()); // we make a copy because the item will be deleted
ui->feedWidget->removeFeedItem(item) ;
older_versions.insert(meta.mMsgId);
GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, mGroup.mMeta,meta.mMsgId, true, false,older_versions);
ui->feedWidget->addFeedItem(item, ROLE_PUBLISH, QDateTime::fromTime_t(meta.mPublishTs));
return ;
}
}
if (related)
{
FeedItem *feedItem = ui->feedWidget->findFeedItem(GxsChannelPostItem::computeIdentifier(meta.mMsgId)) ;
item = dynamic_cast<GxsChannelPostItem*>(feedItem);
}
if (item)
{
item->setPost(post);
ui->feedWidget->setSort(item, ROLE_PUBLISH, QDateTime::fromTime_t(meta.mPublishTs));
}
else
{
GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, mGroup.mMeta,meta.mMsgId, true, true);
ui->feedWidget->addFeedItem(item, ROLE_PUBLISH, QDateTime::fromTime_t(meta.mPublishTs));
}
ui->fileWidget->addFiles(post, related);
}
void GxsChannelPostsWidget::fillThreadCreatePost(const QVariant &post, bool related, int current, int count)
{
/* show fill progress */
if (count) {
ui->progressBar->setValue(current * ui->progressBar->maximum() / count);
}
if (!post.canConvert<RsGxsChannelPost>()) {
return;
}
createPostItem(post.value<RsGxsChannelPost>(), related);
}
#endif
void GxsChannelPostsWidgetWithModel::blank() void GxsChannelPostsWidgetWithModel::blank()
{ {
ui->postButton->setEnabled(false); ui->postButton->setEnabled(false);

View file

@ -147,7 +147,6 @@ private slots:
void toggleAutoDownload(); void toggleAutoDownload();
void subscribeGroup(bool subscribe); void subscribeGroup(bool subscribe);
void filterChanged(QString); void filterChanged(QString);
void setViewMode(int viewMode);
void settingsChanged(); void settingsChanged();
void handlePostsTreeSizeChange(QSize s, bool force=false); void handlePostsTreeSizeChange(QSize s, bool force=false);
void postChannelPostLoad(); void postChannelPostLoad();
@ -172,8 +171,6 @@ private:
void setAutoDownload(bool autoDl); void setAutoDownload(bool autoDl);
static bool filterItem(FeedItem *feedItem, const QString &text, int filter); static bool filterItem(FeedItem *feedItem, const QString &text, int filter);
int viewMode();
void insertChannelDetails(const RsGxsChannelGroup &group); void insertChannelDetails(const RsGxsChannelGroup &group);
void handleEvent_main_thread(std::shared_ptr<const RsEvent> event); void handleEvent_main_thread(std::shared_ptr<const RsEvent> event);

View file

@ -393,6 +393,9 @@ p, li { white-space: pre-wrap; }
<property name="contextMenuPolicy"> <property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum> <enum>Qt::CustomContextMenu</enum>
</property> </property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click to view post. &lt;/p&gt;&lt;p&gt;Use Ctrl+mouse wheel &lt;/p&gt;&lt;p&gt;to zoom/unzoom.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="sizeAdjustPolicy"> <property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum> <enum>QAbstractScrollArea::AdjustToContents</enum>
</property> </property>
@ -428,7 +431,7 @@ p, li { white-space: pre-wrap; }
</font> </font>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>2</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="tab"> <widget class="QWidget" name="tab">
<attribute name="title"> <attribute name="title">

View file

@ -35,6 +35,7 @@
#include "gui/common/Emoticons.h" #include "gui/common/Emoticons.h"
#include "gui/common/UIStateHelper.h" #include "gui/common/UIStateHelper.h"
#include "gui/Identity/IdEditDialog.h" #include "gui/Identity/IdEditDialog.h"
#include "gui/common/FilesDefs.h"
#include "util/HandleRichText.h" #include "util/HandleRichText.h"
#include "util/misc.h" #include "util/misc.h"
@ -89,7 +90,7 @@ CreateGxsForumMsg::CreateGxsForumMsg(const RsGxsGroupId &fId, const RsGxsMessage
ui.forumMessage->setPlaceholderText(tr ("Text")); ui.forumMessage->setPlaceholderText(tr ("Text"));
ui.headerFrame->setHeaderImage(QPixmap(":/icons/png/forums.png")); ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/forums.png"));
ui.headerFrame->setHeaderText(text); ui.headerFrame->setHeaderText(text);
ui.generateSpinBox->setEnabled(false); ui.generateSpinBox->setEnabled(false);

View file

@ -19,6 +19,7 @@
*******************************************************************************/ *******************************************************************************/
#include "GxsForumGroupDialog.h" #include "GxsForumGroupDialog.h"
#include "gui/common/FilesDefs.h"
#include <retroshare/rsgxsforums.h> #include <retroshare/rsgxsforums.h>
#include <iostream> #include <iostream>
@ -96,7 +97,7 @@ void GxsForumGroupDialog::initUi()
QPixmap GxsForumGroupDialog::serviceImage() QPixmap GxsForumGroupDialog::serviceImage()
{ {
return QPixmap(":/icons/png/forums.png"); return FilesDefs::getPixmapFromQtResourcePath(":/icons/png/forums.png");
} }
bool GxsForumGroupDialog::service_createGroup(RsGroupMetaData& meta) bool GxsForumGroupDialog::service_createGroup(RsGroupMetaData& meta)

View file

@ -62,7 +62,7 @@
#define IMAGE_MESSAGE ":/icons/mail/compose.png" #define IMAGE_MESSAGE ":/icons/mail/compose.png"
#define IMAGE_REPLY ":/icons/mail/reply.png" #define IMAGE_REPLY ":/icons/mail/reply.png"
#define IMAGE_MESSAGEREPLY ":/icons/mail/write-mail.png" #define IMAGE_MESSAGEREPLY ":/icons/mail/write-mail.png"
#define IMAGE_MESSAGEEDIT ":/images/edit_16.png" #define IMAGE_MESSAGEEDIT ":/icons/png/pencil-edit-button.png"
#define IMAGE_MESSAGEREMOVE ":/images/mail_delete.png" #define IMAGE_MESSAGEREMOVE ":/images/mail_delete.png"
#define IMAGE_DOWNLOAD ":/images/start.png" #define IMAGE_DOWNLOAD ":/images/start.png"
#define IMAGE_DOWNLOADALL ":/images/startall.png" #define IMAGE_DOWNLOADALL ":/images/startall.png"

View file

@ -1,6 +1,7 @@
<RCC> <RCC>
<qresource prefix="/"> <qresource prefix="/">
<file>icons/onion.png</file> <file>icons/onion.png</file>
<file>icons/svg/design.svg</file>
<file>icons/svg/hidden.svg</file> <file>icons/svg/hidden.svg</file>
<file>icons/svg/ratio-auto.svg</file> <file>icons/svg/ratio-auto.svg</file>
<file>icons/svg/ratio-1-1.svg</file> <file>icons/svg/ratio-1-1.svg</file>

View file

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<path style="fill:#8B8992;" d="M299.493,502h-90v-86h90V502z M239.493,482h30v-36h-30L239.493,482L239.493,482z"/>
<polygon style="fill:#57555C;" points="255.993,446 269.493,446 269.493,482 255.993,482 255.993,502 299.493,502 299.493,416
255.993,416 "/>
<path style="fill:#9BC9FF;" d="M480.493,376h-449V136h449V376z"/>
<rect x="255.99" y="136" style="fill:#009AE5;" width="224.5" height="240"/>
<rect x="179.49" y="482" style="fill:#005ECE;" width="150" height="30"/>
<path style="fill:#B87FD9;" d="M239.493,376h-90V171h90V376z"/>
<path style="fill:#8034AD;" d="M239.493,376h-45V171h45V376z"/>
<path style="fill:#8B8992;" d="M289.686,131H98.301L59.39,0h57.243c20.439,0,44.228,7.314,62.86,20.502V0h149.103L289.686,131z"/>
<polygon style="fill:#57555C;" points="328.596,0 193.993,0 193.993,131 289.686,131 "/>
<path style="fill:#E3CEF0;" d="M248.493,201h-108c-24.813,0-45-20.187-45-45v-55h198v55C293.493,180.813,273.306,201,248.493,201z"
/>
<path style="fill:#D5B4E8;" d="M194.493,101v100h54c24.813,0,45-20.187,45-45v-55H194.493z"/>
<path style="fill:#E0E0E2;" d="M427.705,118.346c-9.131,0-18.141-2.394-26.261-7.082c-12.189-7.038-20.909-18.401-24.551-31.997
c-3.643-13.595-1.774-27.795,5.264-39.984s18.401-20.908,31.997-24.551l50.898-13.638l13.637,50.898
c3.643,13.595,1.774,27.795-5.264,39.984s-18.4,20.909-31.996,24.551C436.89,117.744,432.281,118.346,427.705,118.346z"/>
<path style="fill:#ACABB1;" d="M478.688,51.992L465.051,1.094h-0.001l-63.606,110.169l0,0c8.12,4.688,17.13,7.083,26.261,7.082
c4.577,0,9.185-0.602,13.724-1.818c13.595-3.643,24.958-12.362,31.996-24.551C480.462,79.787,482.331,65.587,478.688,51.992z"/>
<path style="fill:#FFE477;" d="M280.915,410.025l-77.942-45l125-216.506l77.942,45L280.915,410.025z"/>
<rect x="301.424" y="165.518" transform="matrix(-0.866 -0.5 0.5 -0.866 459.1859 704.0723)" style="fill:#FFA733;" width="44.999" height="249.995"/>
<path style="fill:#FF9A00;" d="M402.462,226.167l-101.036-58.333l87.069-98.688l55.898,32.273L402.462,226.167z"/>
<polygon style="fill:#E67500;" points="444.393,101.419 416.444,85.283 351.944,197 402.462,226.167 "/>
<path style="fill:#005ECE;" d="M480.493,446h-449V346h449V446z"/>
<g>
<rect x="255.99" y="346" style="fill:#003F8A;" width="224.5" height="100"/>
<rect x="254.49" y="482" style="fill:#003F8A;" width="75" height="30"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -32,6 +32,7 @@
#include "IMHistoryItemDelegate.h" #include "IMHistoryItemDelegate.h"
#include "IMHistoryItemPainter.h" #include "IMHistoryItemPainter.h"
#include "util/HandleRichText.h" #include "util/HandleRichText.h"
#include "gui/common/FilesDefs.h"
#include "rshare.h" #include "rshare.h"
#include <retroshare/rshistory.h> #include <retroshare/rshistory.h>
@ -96,7 +97,7 @@ ImHistoryBrowser::ImHistoryBrowser(const ChatId &chatId, QTextEdit *edit, QWidge
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/agt_forum64.png")); ui.headerFrame->setHeaderImage(FilesDefs::getPixmapFromQtResourcePath(":/images/user/agt_forum64.png"));
ui.headerFrame->setHeaderText(tr("Message History")); ui.headerFrame->setHeaderText(tr("Message History"));
m_chatId = chatId; m_chatId = chatId;

View file

@ -17,7 +17,6 @@
<file>images/inbox_22.png</file> <file>images/inbox_22.png</file>
<file>images/blue_lock.png</file> <file>images/blue_lock.png</file>
<file>images/blue_lock_open.png</file> <file>images/blue_lock_open.png</file>
<file>images/edit_24.png</file>
<file>images/streaming.png</file> <file>images/streaming.png</file>
<file>images/white-bubble-64.png</file> <file>images/white-bubble-64.png</file>
<file>images/orange-bubble-64.png</file> <file>images/orange-bubble-64.png</file>
@ -49,7 +48,6 @@
<file>images/dht16.png</file> <file>images/dht16.png</file>
<file>images/dht32.png</file> <file>images/dht32.png</file>
<file>images/edit-clear-history.png</file> <file>images/edit-clear-history.png</file>
<file>images/edit_16.png</file>
<file>images/feedback_arrow.png</file> <file>images/feedback_arrow.png</file>
<file>images/feedback_arrow_hover.png</file> <file>images/feedback_arrow_hover.png</file>
<file>images/firewall_24.png</file> <file>images/firewall_24.png</file>
@ -79,11 +77,7 @@
<file>images/avatarstatus-bg-away-70.png</file> <file>images/avatarstatus-bg-away-70.png</file>
<file>images/avatarstatus-bg-busy-70.png</file> <file>images/avatarstatus-bg-busy-70.png</file>
<file>images/avatarstatus-bg-offline-70.png</file> <file>images/avatarstatus-bg-offline-70.png</file>
<file>images/configure.png</file>
<file>images/copyrslink.png</file> <file>images/copyrslink.png</file>
<file>images/contacts24.png</file>
<file>images/contactsclosed24.png</file>
<file>images/connection.png</file>
<file>images/Client0.png</file> <file>images/Client0.png</file>
<file>images/Client1.png</file> <file>images/Client1.png</file>
<file>images/Client2.png</file> <file>images/Client2.png</file>
@ -102,7 +96,6 @@
<file>images/FileTypePicture.png</file> <file>images/FileTypePicture.png</file>
<file>images/FileTypeProgram.png</file> <file>images/FileTypeProgram.png</file>
<file>images/FileTypeVideo.png</file> <file>images/FileTypeVideo.png</file>
<file>images/fonts.png</file>
<file>images/foldermail.png</file> <file>images/foldermail.png</file>
<file>images/folderopen.png</file> <file>images/folderopen.png</file>
<file>images/fileopen.png</file> <file>images/fileopen.png</file>
@ -111,14 +104,11 @@
<file>images/graph-notdownload.png</file> <file>images/graph-notdownload.png</file>
<file>images/graph-checking.png</file> <file>images/graph-checking.png</file>
<file>images/graph-blue.png</file> <file>images/graph-blue.png</file>
<file>images/add-share24.png</file>
<file>images/avatar_background.png</file> <file>images/avatar_background.png</file>
<file>images/button_cancel.png</file> <file>images/button_cancel.png</file>
<file>images/chat.png</file> <file>images/chat.png</file>
<file>images/chat_24.png</file>
<file>images/cancel.png</file> <file>images/cancel.png</file>
<file>images/close-down.png</file> <file>images/close-down.png</file>
<file>images/close_normal.png</file>
<file>images/copy.png</file> <file>images/copy.png</file>
<file>images/delete.png</file> <file>images/delete.png</file>
<file>images/deleteall.png</file> <file>images/deleteall.png</file>
@ -128,13 +118,8 @@
<file>images/diskSave.png</file> <file>images/diskSave.png</file>
<file>images/document_save.png</file> <file>images/document_save.png</file>
<file>images/down.png</file> <file>images/down.png</file>
<file>images/down_24x24.png</file>
<file>images/download.png</file> <file>images/download.png</file>
<file>images/download16.png</file>
<file>images/edit_add24.png</file> <file>images/edit_add24.png</file>
<file>images/edit-bold.png</file>
<file>images/edit-italic.png</file>
<file>images/edit-underline.png</file>
<file>images/edit_remove24.png</file> <file>images/edit_remove24.png</file>
<file>images/disabled_plugin_48.png</file> <file>images/disabled_plugin_48.png</file>
<file>images/expand_frame.png</file> <file>images/expand_frame.png</file>
@ -224,7 +209,6 @@
<file>images/ledoff1.png</file> <file>images/ledoff1.png</file>
<file>images/ledon1.png</file> <file>images/ledon1.png</file>
<file>images/locale.png</file> <file>images/locale.png</file>
<file>images/looknfeel.png</file>
<file>images/logo/logo_16.png</file> <file>images/logo/logo_16.png</file>
<file>images/logo/logo_24.png</file> <file>images/logo/logo_24.png</file>
<file>images/logo/logo_24_0.png</file> <file>images/logo/logo_24_0.png</file>
@ -260,7 +244,6 @@
<file>images/mute-off-16.png</file> <file>images/mute-off-16.png</file>
<file>images/mute-on-16.png</file> <file>images/mute-on-16.png</file>
<file>images/new-mail-alert.png</file> <file>images/new-mail-alert.png</file>
<file>images/newmsg.png</file>
<file>images/no_avatar_70.png</file> <file>images/no_avatar_70.png</file>
<file>images/no_avatar_background.png</file> <file>images/no_avatar_background.png</file>
<file>images/openimage.png</file> <file>images/openimage.png</file>
@ -269,7 +252,6 @@
<file>images/pasterslink.png</file> <file>images/pasterslink.png</file>
<file>images/package_games1.png</file> <file>images/package_games1.png</file>
<file>images/pin32.png</file> <file>images/pin32.png</file>
<file>images/print24.png</file>
<file>images/priorityauto.png</file> <file>images/priorityauto.png</file>
<file>images/priorityhigh.png</file> <file>images/priorityhigh.png</file>
<file>images/prioritylow.png</file> <file>images/prioritylow.png</file>
@ -278,17 +260,10 @@
<file>images/preview.png</file> <file>images/preview.png</file>
<file>images/player_play.png</file> <file>images/player_play.png</file>
<file>images/quick_restart24.png</file> <file>images/quick_restart24.png</file>
<file>images/quote_24.png</file>
<file>images/redled.png</file> <file>images/redled.png</file>
<file>images/greenled.png</file> <file>images/greenled.png</file>
<file>images/grayled.png</file> <file>images/grayled.png</file>
<file>images/yellowled.png</file> <file>images/yellowled.png</file>
<file>images/rate-1.png</file>
<file>images/rate-2.png</file>
<file>images/rate-3.png</file>
<file>images/rate-4.png</file>
<file>images/rate-5.png</file>
<file>images/rating.png</file>
<file>images/records.png</file> <file>images/records.png</file>
<file>images/replymail-pressed.png</file> <file>images/replymail-pressed.png</file>
<file>images/replymail24.png</file> <file>images/replymail24.png</file>
@ -320,7 +295,6 @@
<file>images/tab-dock.png</file> <file>images/tab-dock.png</file>
<file>images/tab-undock.png</file> <file>images/tab-undock.png</file>
<file>images/tab-new.png</file> <file>images/tab-new.png</file>
<file>images/tag24.png</file>
<file>images/transferupdown.png</file> <file>images/transferupdown.png</file>
<file>images/tools_wizard.png</file> <file>images/tools_wizard.png</file>
<file>images/uploads.png</file> <file>images/uploads.png</file>
@ -384,8 +358,6 @@
<file>images/view_calendar_month.png</file> <file>images/view_calendar_month.png</file>
<file>images/view_calendar_list.png</file> <file>images/view_calendar_list.png</file>
<file>images/view_split_top_bottom.png</file> <file>images/view_split_top_bottom.png</file>
<file>images/window_fullscreen.png</file>
<file>images/window_nofullscreen.png</file>
<file>qss/chat/standard/private/info.xml</file> <file>qss/chat/standard/private/info.xml</file>
<file>qss/chat/standard/private/incoming.htm</file> <file>qss/chat/standard/private/incoming.htm</file>
<file>qss/chat/standard/private/outgoing.htm</file> <file>qss/chat/standard/private/outgoing.htm</file>
@ -454,8 +426,6 @@
<file>images/share-icon-16.png</file> <file>images/share-icon-16.png</file>
<file>images/toasterEnable.png</file> <file>images/toasterEnable.png</file>
<file>images/toasterDisable.png</file> <file>images/toasterDisable.png</file>
<file>images/view-feeds.png</file>
<file>images/view-files.png</file>
<file>images/emblem-web.png</file> <file>images/emblem-web.png</file>
<file>images/rsmessenger48.png</file> <file>images/rsmessenger48.png</file>
<file>images/SmileyText.png</file> <file>images/SmileyText.png</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 876 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 823 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Some files were not shown because too many files have changed in this diff Show more