mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge branch 'master' into extra1
This commit is contained in:
commit
22337c050a
@ -39,6 +39,14 @@ template<class ID, class MetaDataClass> class t_MetaDataCache
|
||||
{
|
||||
public:
|
||||
t_MetaDataCache() : mCache_ContainsAllMetas(false) {}
|
||||
virtual ~t_MetaDataCache()
|
||||
{
|
||||
for(auto it: mMetas)
|
||||
delete it.second;
|
||||
|
||||
for(auto it: mOldCachedItems)
|
||||
delete it.second;
|
||||
}
|
||||
|
||||
bool isCacheUpToDate() const { return mCache_ContainsAllMetas ; }
|
||||
void setCacheUpToDate(bool b) { mCache_ContainsAllMetas = b; }
|
||||
|
@ -282,7 +282,7 @@ bool RsGenExchange::messagePublicationTest(const RsGxsMsgMetaData& meta)
|
||||
|
||||
rstime_t storageTimeLimit = meta.mPublishTs + st;
|
||||
|
||||
return meta.mMsgStatus & GXS_SERV::GXS_MSG_STATUS_KEEP || st == 0 || storageTimeLimit >= time(NULL);
|
||||
return meta.mMsgStatus & GXS_SERV::GXS_MSG_STATUS_KEEP_FOREVER || st == 0 || storageTimeLimit >= time(NULL);
|
||||
}
|
||||
|
||||
bool RsGenExchange::acknowledgeTokenMsg(const uint32_t& token,
|
||||
|
@ -196,7 +196,6 @@ bool RsGxsGrpMetaData::deserialise(void *data, uint32_t &pktsize)
|
||||
|
||||
return ok;
|
||||
}
|
||||
int RsGxsMsgMetaData::refcount = 0;
|
||||
|
||||
RsGxsMsgMetaData::RsGxsMsgMetaData(){
|
||||
clear();
|
||||
|
@ -99,8 +99,6 @@ public:
|
||||
void clear();
|
||||
void operator =(const RsMsgMetaData& rMeta);
|
||||
|
||||
static int refcount;
|
||||
|
||||
//Sort data in same order than serialiser and deserializer
|
||||
RsGxsGroupId mGroupId;
|
||||
RsGxsMessageId mMsgId;
|
||||
|
@ -107,7 +107,7 @@ bool RsGxsMessageCleanUp::clean()
|
||||
bool remove = store_period > 0 && ((meta->mPublishTs + store_period) < now) && !have_kids;
|
||||
|
||||
// check client does not want the message kept regardless of age
|
||||
remove &= !(meta->mMsgStatus & GXS_SERV::GXS_MSG_STATUS_KEEP);
|
||||
remove &= !(meta->mMsgStatus & GXS_SERV::GXS_MSG_STATUS_KEEP_FOREVER);
|
||||
|
||||
// if not subscribed remove messages (can optimise this really)
|
||||
remove = remove || (grpMeta->mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED);
|
||||
|
@ -111,27 +111,6 @@ typedef t_RsGxsGenericDataTemporaryMapVector<RsNxsMsg> RsNxsMsgDa
|
||||
typedef t_RsGxsGenericDataTemporaryList<RsNxsGrp> RsNxsGrpDataTemporaryList ;
|
||||
typedef t_RsGxsGenericDataTemporaryList<RsNxsMsg> RsNxsMsgDataTemporaryList ;
|
||||
|
||||
#ifdef UNUSED
|
||||
template<class T>
|
||||
class RsGxsMetaDataTemporaryMapVector: public std::vector<T*>
|
||||
{
|
||||
public:
|
||||
virtual ~RsGxsMetaDataTemporaryMapVector()
|
||||
{
|
||||
clear() ;
|
||||
}
|
||||
|
||||
virtual void clear()
|
||||
{
|
||||
for(typename RsGxsMetaDataTemporaryMapVector<T>::iterator it = this->begin();it!=this->end();++it)
|
||||
if(it->second != NULL)
|
||||
delete it->second ;
|
||||
std::vector<T*>::clear() ;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
inline RsGxsGrpMsgIdPair getMsgIdPair(RsNxsMsg& msg)
|
||||
{
|
||||
return RsGxsGrpMsgIdPair(std::make_pair(msg.grpId, msg.msgId));
|
||||
@ -146,7 +125,7 @@ inline RsGxsGrpMsgIdPair getMsgIdPair(RsGxsMsgItem& msg)
|
||||
* Does message clean up based on individual group expirations first
|
||||
* if avialable. If not then deletion s
|
||||
*/
|
||||
class RsGxsMessageCleanUp //: public RsThread
|
||||
class RsGxsMessageCleanUp
|
||||
{
|
||||
public:
|
||||
|
||||
@ -166,11 +145,6 @@ public:
|
||||
*/
|
||||
bool clean();
|
||||
|
||||
/*!
|
||||
* TODO: Rather than manual progressions consider running through a thread
|
||||
*/
|
||||
//virtual void data_tick(){}
|
||||
|
||||
private:
|
||||
|
||||
RsGeneralDataService* const mDs;
|
||||
|
@ -195,8 +195,6 @@ public:
|
||||
/**
|
||||
* @brief Post event to the event queue.
|
||||
* @param[in] event
|
||||
* @param[out] errorMessage Optional storage for error messsage, meaningful
|
||||
* only on failure.
|
||||
* @return Success or error details.
|
||||
*/
|
||||
virtual std::error_condition postEvent(
|
||||
@ -206,8 +204,6 @@ public:
|
||||
* @brief Send event directly to handlers. Blocking API
|
||||
* The handlers get exectuded on the caller thread.
|
||||
* @param[in] event
|
||||
* @param[out] errorMessage Optional storage for error messsage, meaningful
|
||||
* only on failure.
|
||||
* @return Success or error details.
|
||||
*/
|
||||
virtual std::error_condition sendEvent(
|
||||
|
@ -107,7 +107,8 @@ namespace GXS_SERV {
|
||||
static const uint32_t GXS_MSG_STATUS_UNPROCESSED = 0x00000001; // Flags to store the read/process status of group messages.
|
||||
static const uint32_t GXS_MSG_STATUS_GUI_UNREAD = 0x00000002; // The actual meaning may depend on the type of service.
|
||||
static const uint32_t GXS_MSG_STATUS_GUI_NEW = 0x00000004; //
|
||||
static const uint32_t GXS_MSG_STATUS_KEEP = 0x00000008; //
|
||||
/** Do not delete message even if older then group maximum storage time */
|
||||
static const uint32_t GXS_MSG_STATUS_KEEP_FOREVER = 0x00000008;
|
||||
static const uint32_t GXS_MSG_STATUS_DELETE = 0x00000020; //
|
||||
|
||||
/** END GXS Msg status flags **/
|
||||
|
@ -363,12 +363,25 @@ public:
|
||||
* @param[in] parentId id of the post of which child posts (aka replies)
|
||||
* are requested.
|
||||
* @param[out] childPosts storage for the child posts
|
||||
* @return false if something failed, true otherwhise
|
||||
* @return Success or error details
|
||||
*/
|
||||
virtual std::error_condition getChildPosts(
|
||||
const RsGxsGroupId& forumId, const RsGxsMessageId& parentId,
|
||||
std::vector<RsGxsForumMsg>& childPosts ) = 0;
|
||||
|
||||
/**
|
||||
* @brief Set keep forever flag on a post so it is not deleted even if older
|
||||
* then group maximum storage time
|
||||
* @jsonapi{development}
|
||||
* @param[in] forumId id of the forum of which the post pertain
|
||||
* @param[in] postId id of the post on which to set the flag
|
||||
* @param[in] keepForever true to set the flag, false to unset it
|
||||
* @return Success or error details
|
||||
*/
|
||||
virtual std::error_condition setPostKeepForever(
|
||||
const RsGxsGroupId& forumId, const RsGxsMessageId& postId,
|
||||
bool keepForever ) = 0;
|
||||
|
||||
/**
|
||||
* @brief Create forum. Blocking API.
|
||||
* @jsonapi{development}
|
||||
|
@ -919,6 +919,9 @@ void p3GxsForums::setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair&
|
||||
|
||||
setMsgStatusFlags(token, msgId, status, mask);
|
||||
|
||||
/* WARNING: The event may be received before the operation is completed!
|
||||
* TODO: move notification to blocking method markRead(...) which wait the
|
||||
* operation to complete */
|
||||
if (rsEvents)
|
||||
{
|
||||
auto ev = std::make_shared<RsGxsForumEvent>();
|
||||
@ -933,6 +936,37 @@ void p3GxsForums::setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair&
|
||||
/********************************************************************************************/
|
||||
/********************************************************************************************/
|
||||
|
||||
std::error_condition p3GxsForums::setPostKeepForever(
|
||||
const RsGxsGroupId& forumId, const RsGxsMessageId& postId,
|
||||
bool keepForever )
|
||||
{
|
||||
if(forumId.isNull() || postId.isNull()) return std::errc::invalid_argument;
|
||||
|
||||
uint32_t mask = GXS_SERV::GXS_MSG_STATUS_KEEP_FOREVER;
|
||||
uint32_t status = keepForever ? GXS_SERV::GXS_MSG_STATUS_KEEP_FOREVER : 0;
|
||||
|
||||
uint32_t token;
|
||||
setMsgStatusFlags(token, RsGxsGrpMsgIdPair(forumId, postId), status, mask);
|
||||
|
||||
switch(waitToken(token))
|
||||
{
|
||||
case RsTokenService::PENDING: // [[fallthrough]];
|
||||
case RsTokenService::PARTIAL: return std::errc::timed_out;
|
||||
case RsTokenService::COMPLETE: // [[fallthrough]];
|
||||
case RsTokenService::DONE:
|
||||
{
|
||||
auto ev = std::make_shared<RsGxsForumEvent>();
|
||||
ev->mForumGroupId = forumId;
|
||||
ev->mForumMsgId = postId;
|
||||
ev->mForumEventCode = RsForumEventCode::UPDATED_MESSAGE;
|
||||
rsEvents->postEvent(ev);
|
||||
return std::error_condition();
|
||||
}
|
||||
case RsTokenService::CANCELLED: return std::errc::operation_canceled;
|
||||
default: return std::errc::bad_message;
|
||||
}
|
||||
}
|
||||
|
||||
/* so we need the same tick idea as wiki for generating dummy forums
|
||||
*/
|
||||
|
||||
|
@ -137,6 +137,11 @@ public:
|
||||
const RsGxsGroupId& forumId, const RsGxsMessageId& parentId,
|
||||
std::vector<RsGxsForumMsg>& childPosts ) override;
|
||||
|
||||
/// @see RsGxsForums
|
||||
std::error_condition setPostKeepForever(
|
||||
const RsGxsGroupId& forumId, const RsGxsMessageId& postId,
|
||||
bool keepForever );
|
||||
|
||||
/// implementation of rsGxsGorums
|
||||
///
|
||||
bool getGroupData(const uint32_t &token, std::vector<RsGxsForumGroup> &groups) override;
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "util/HandleRichText.h"
|
||||
#include "util/QtVersion.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
@ -281,7 +282,7 @@ void ChatLobbyWidget::lobbyTreeWidgetCustomPopupMenu(QPoint)
|
||||
QMenu contextMnu(this);
|
||||
|
||||
if (item && item->type() == TYPE_FOLDER) {
|
||||
QAction *action = contextMnu.addAction(QIcon(IMAGE_CREATE), tr("Create chat room"), this, SLOT(createChatLobby()));
|
||||
QAction *action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_CREATE), tr("Create chat room"), this, SLOT(createChatLobby()));
|
||||
action->setData(item->data(COLUMN_DATA, ROLE_PRIVACYLEVEL).toInt());
|
||||
}
|
||||
|
||||
@ -291,7 +292,7 @@ void ChatLobbyWidget::lobbyTreeWidgetCustomPopupMenu(QPoint)
|
||||
rsIdentity->getOwnIds(own_identities) ;
|
||||
|
||||
if (item->data(COLUMN_DATA, ROLE_SUBSCRIBED).toBool())
|
||||
contextMnu.addAction(QIcon(IMAGE_UNSUBSCRIBE), tr("Leave this room"), this, SLOT(unsubscribeItem()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_UNSUBSCRIBE), tr("Leave this room"), this, SLOT(unsubscribeItem()));
|
||||
else
|
||||
{
|
||||
QTreeWidgetItem *item = ui.lobbyTreeWidget->currentItem();
|
||||
@ -306,18 +307,18 @@ void ChatLobbyWidget::lobbyTreeWidgetCustomPopupMenu(QPoint)
|
||||
if(own_identities.empty())
|
||||
{
|
||||
if(removed)
|
||||
contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Create a non anonymous identity and enter this room"), this, SLOT(createIdentityAndSubscribe()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_SUBSCRIBE), tr("Create a non anonymous identity and enter this room"), this, SLOT(createIdentityAndSubscribe()));
|
||||
else
|
||||
contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Create an identity and enter this chat room"), this, SLOT(createIdentityAndSubscribe()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_SUBSCRIBE), tr("Create an identity and enter this chat room"), this, SLOT(createIdentityAndSubscribe()));
|
||||
}
|
||||
else if(own_identities.size() == 1)
|
||||
{
|
||||
QAction *action = contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Enter this chat room"), this, SLOT(subscribeChatLobbyAs()));
|
||||
QAction *action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_SUBSCRIBE), tr("Enter this chat room"), this, SLOT(subscribeChatLobbyAs()));
|
||||
action->setData(QString::fromStdString((own_identities.front()).toStdString())) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
QMenu *mnu = contextMnu.addMenu(QIcon(IMAGE_SUBSCRIBE),tr("Enter this chat room as...")) ;
|
||||
QMenu *mnu = contextMnu.addMenu(FilesDefs::getIconFromQtResourcePath(IMAGE_SUBSCRIBE),tr("Enter this chat room as...")) ;
|
||||
|
||||
for(std::list<RsGxsId>::const_iterator it=own_identities.begin();it!=own_identities.end();++it)
|
||||
{
|
||||
@ -344,7 +345,7 @@ void ChatLobbyWidget::lobbyTreeWidgetCustomPopupMenu(QPoint)
|
||||
contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Add Auto Subscribe"), this, SLOT(autoSubscribeItem()));
|
||||
#endif
|
||||
|
||||
contextMnu.addAction(QIcon(IMAGE_COPYRSLINK), tr("Copy RetroShare Link"), this, SLOT(copyItemLink()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COPYRSLINK), tr("Copy RetroShare Link"), this, SLOT(copyItemLink()));
|
||||
}
|
||||
|
||||
contextMnu.addSeparator();//-------------------------------------------------------------------
|
||||
@ -435,7 +436,7 @@ void ChatLobbyWidget::addChatPage(ChatLobbyDialog *d)
|
||||
|
||||
ChatLobbyInfo linfo ;
|
||||
if(rsMsgs->getChatLobbyInfo(id,linfo))
|
||||
_lobby_infos[id].default_icon = (linfo.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? QIcon(IMAGE_PUBLIC):QIcon(IMAGE_PRIVATE) ;
|
||||
_lobby_infos[id].default_icon = (linfo.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? FilesDefs::getIconFromQtResourcePath(IMAGE_PUBLIC):FilesDefs::getIconFromQtResourcePath(IMAGE_PRIVATE) ;
|
||||
else
|
||||
std::cerr << "(EE) cannot find info for room " << std::hex << id << std::dec << std::endl;
|
||||
}
|
||||
@ -615,7 +616,7 @@ void ChatLobbyWidget::updateDisplay()
|
||||
if (item == NULL)
|
||||
{
|
||||
item = new RSTreeWidgetItem(compareRole, TYPE_LOBBY);
|
||||
icon = (lobby.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? QIcon(IMAGE_PUBLIC) : QIcon(IMAGE_PRIVATE);
|
||||
icon = (lobby.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? FilesDefs::getIconFromQtResourcePath(IMAGE_PUBLIC) : FilesDefs::getIconFromQtResourcePath(IMAGE_PRIVATE);
|
||||
lobby_item->addChild(item);
|
||||
|
||||
}
|
||||
@ -623,7 +624,7 @@ void ChatLobbyWidget::updateDisplay()
|
||||
{
|
||||
if (item->data(COLUMN_DATA, ROLE_SUBSCRIBED).toBool() != subscribed) {
|
||||
// Replace icon
|
||||
icon = (lobby.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? QIcon(IMAGE_PUBLIC) : QIcon(IMAGE_PRIVATE);
|
||||
icon = (lobby.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? FilesDefs::getIconFromQtResourcePath(IMAGE_PUBLIC) : FilesDefs::getIconFromQtResourcePath(IMAGE_PRIVATE);
|
||||
}
|
||||
}
|
||||
if (!icon.isNull()) {
|
||||
@ -683,12 +684,12 @@ void ChatLobbyWidget::updateDisplay()
|
||||
if (item == NULL)
|
||||
{
|
||||
item = new RSTreeWidgetItem(compareRole, TYPE_LOBBY);
|
||||
icon = (lobby.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? QIcon(IMAGE_PUBLIC) : QIcon(IMAGE_PRIVATE);
|
||||
icon = (lobby.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? FilesDefs::getIconFromQtResourcePath(IMAGE_PUBLIC) : FilesDefs::getIconFromQtResourcePath(IMAGE_PRIVATE);
|
||||
itemParent->addChild(item);
|
||||
} else {
|
||||
if (!item->data(COLUMN_DATA, ROLE_SUBSCRIBED).toBool()) {
|
||||
// Replace icon
|
||||
icon = (lobby.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? QIcon(IMAGE_PUBLIC) : QIcon(IMAGE_PRIVATE);
|
||||
icon = (lobby.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? FilesDefs::getIconFromQtResourcePath(IMAGE_PUBLIC) : FilesDefs::getIconFromQtResourcePath(IMAGE_PRIVATE);
|
||||
}
|
||||
}
|
||||
if (!icon.isNull()) {
|
||||
@ -996,7 +997,7 @@ void ChatLobbyWidget::updateTypingStatus(ChatLobbyId id)
|
||||
|
||||
if(item != NULL)
|
||||
{
|
||||
item->setIcon(COLUMN_NAME,QIcon(IMAGE_TYPING)) ;
|
||||
item->setIcon(COLUMN_NAME,FilesDefs::getIconFromQtResourcePath(IMAGE_TYPING)) ;
|
||||
_lobby_infos[id].last_typing_event = time(NULL) ;
|
||||
|
||||
QTimer::singleShot(5000,this,SLOT(resetLobbyTreeIcons())) ;
|
||||
@ -1008,7 +1009,7 @@ void ChatLobbyWidget::updatePeerLeaving(ChatLobbyId id)
|
||||
|
||||
if(item != NULL)
|
||||
{
|
||||
item->setIcon(COLUMN_NAME,QIcon(IMAGE_PEER_LEAVING)) ;
|
||||
item->setIcon(COLUMN_NAME,FilesDefs::getIconFromQtResourcePath(IMAGE_PEER_LEAVING)) ;
|
||||
_lobby_infos[id].last_typing_event = time(NULL) ;
|
||||
|
||||
QTimer::singleShot(5000,this,SLOT(resetLobbyTreeIcons())) ;
|
||||
@ -1020,7 +1021,7 @@ void ChatLobbyWidget::updatePeerEntering(ChatLobbyId id)
|
||||
|
||||
if(item != NULL)
|
||||
{
|
||||
item->setIcon(COLUMN_NAME,QIcon(IMAGE_PEER_ENTERING)) ;
|
||||
item->setIcon(COLUMN_NAME,FilesDefs::getIconFromQtResourcePath(IMAGE_PEER_ENTERING)) ;
|
||||
_lobby_infos[id].last_typing_event = time(NULL) ;
|
||||
|
||||
QTimer::singleShot(5000,this,SLOT(resetLobbyTreeIcons())) ;
|
||||
@ -1105,7 +1106,7 @@ void ChatLobbyWidget::updateCurrentLobby()
|
||||
|
||||
if(_lobby_infos.find(id) != _lobby_infos.end()) {
|
||||
int iPrivacyLevel= item->parent()->data(COLUMN_DATA, ROLE_PRIVACYLEVEL).toInt();
|
||||
QIcon icon = (iPrivacyLevel==CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC) ? QIcon(IMAGE_PUBLIC) : QIcon(IMAGE_PRIVATE);
|
||||
QIcon icon = (iPrivacyLevel==CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC) ? FilesDefs::getIconFromQtResourcePath(IMAGE_PUBLIC) : FilesDefs::getIconFromQtResourcePath(IMAGE_PRIVATE);
|
||||
_lobby_infos[id].default_icon = icon ;
|
||||
item->setIcon(COLUMN_NAME, icon) ;
|
||||
}
|
||||
@ -1129,7 +1130,7 @@ void ChatLobbyWidget::updateMessageChanged(bool incoming, ChatLobbyId id, QDateT
|
||||
if(bIsCurrentItem)
|
||||
return ;
|
||||
|
||||
_lobby_infos[id].default_icon = QIcon(IMAGE_MESSAGE) ;
|
||||
_lobby_infos[id].default_icon = FilesDefs::getIconFromQtResourcePath(IMAGE_MESSAGE) ;
|
||||
|
||||
QTreeWidgetItem *item = getTreeWidgetItem(id) ;
|
||||
|
||||
|
@ -19,9 +19,10 @@
|
||||
*******************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
|
||||
#include "ui_ChatLobbyWidget.h"
|
||||
|
||||
#include "RsAutoUpdatePage.h"
|
||||
#include "chat/ChatLobbyUserNotify.h"
|
||||
#include "gui/gxs/GxsIdChooser.h"
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RsAutoUpdatePage.h"
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
#include "ui_BannedFilesDialog.h"
|
||||
|
||||
class BannedFilesDialog: public QDialog
|
||||
|
@ -24,7 +24,8 @@
|
||||
#include <QWidget>
|
||||
#include <QPainter>
|
||||
#include <QBitmap>
|
||||
#include "RsAutoUpdatePage.h"
|
||||
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
#include <retroshare/rstypes.h>
|
||||
|
||||
struct FileChunksInfo ;
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include <retroshare/rstypes.h>
|
||||
#include "ui_SearchDialog.h"
|
||||
#include "mainpage.h"
|
||||
#include <retroshare-gui/mainpage.h>
|
||||
|
||||
class AdvancedSearchDialog;
|
||||
class RSTreeWidgetItemCompareRole;
|
||||
|
@ -148,8 +148,14 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
SharedFilesDialog::~SharedFilesDialog()
|
||||
{
|
||||
delete tree_model;
|
||||
delete flat_model;
|
||||
delete tree_proxyModel;
|
||||
}
|
||||
/** Constructor */
|
||||
SharedFilesDialog::SharedFilesDialog(RetroshareDirModel *_tree_model,RetroshareDirModel *_flat_model,QWidget *parent)
|
||||
SharedFilesDialog::SharedFilesDialog(bool remote_mode, QWidget *parent)
|
||||
: RsAutoUpdatePage(1000,parent), model(NULL)
|
||||
{
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
@ -160,13 +166,12 @@ SharedFilesDialog::SharedFilesDialog(RetroshareDirModel *_tree_model,RetroshareD
|
||||
connect(notify, SIGNAL(filesPostModChanged(bool)), this, SLOT(postModDirectories(bool)));
|
||||
|
||||
connect(ui.viewType_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(changeCurrentViewModel(int)));
|
||||
|
||||
connect(ui.dirTreeView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT( spawnCustomPopupMenu( QPoint ) ) );
|
||||
|
||||
connect(ui.indicatorCBox, SIGNAL(currentIndexChanged(int)), this, SLOT(indicatorChanged(int)));
|
||||
|
||||
tree_model = _tree_model ;
|
||||
flat_model = _flat_model ;
|
||||
tree_model = new TreeStyle_RDM(remote_mode);
|
||||
flat_model = new FlatStyle_RDM(remote_mode);
|
||||
|
||||
connect(flat_model, SIGNAL(layoutChanged()), this, SLOT(updateDirTreeView()) );
|
||||
|
||||
// For filtering items we use a trick: the underlying model will use this FilterRole role to highlight selected items
|
||||
@ -243,7 +248,7 @@ SharedFilesDialog::SharedFilesDialog(RetroshareDirModel *_tree_model,RetroshareD
|
||||
}
|
||||
|
||||
LocalSharedFilesDialog::LocalSharedFilesDialog(QWidget *parent)
|
||||
: SharedFilesDialog(new TreeStyle_RDM(false),new FlatStyle_RDM(false),parent)
|
||||
: SharedFilesDialog(false,parent)
|
||||
{
|
||||
// Hide columns after loading the settings
|
||||
ui.dirTreeView->setColumnHidden(COLUMN_WN_VISU_DIR, false) ;
|
||||
@ -269,7 +274,7 @@ LocalSharedFilesDialog::LocalSharedFilesDialog(QWidget *parent)
|
||||
}
|
||||
|
||||
RemoteSharedFilesDialog::RemoteSharedFilesDialog(QWidget *parent)
|
||||
: SharedFilesDialog(new TreeStyle_RDM(true),new FlatStyle_RDM(true),parent)
|
||||
: SharedFilesDialog(true,parent)
|
||||
{
|
||||
ui.dirTreeView->setColumnHidden(COLUMN_FRIEND_ACCESS, false) ;
|
||||
ui.dirTreeView->setColumnHidden(COLUMN_WN_VISU_DIR, true) ;
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "ui_SharedFilesDialog.h"
|
||||
|
||||
#include "RsAutoUpdatePage.h"
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
#include "gui/RetroShareLink.h"
|
||||
#include "util/RsProtectedTimer.h"
|
||||
|
||||
@ -38,10 +38,10 @@ class SharedFilesDialog : public RsAutoUpdatePage
|
||||
|
||||
public:
|
||||
/** Default Constructor */
|
||||
SharedFilesDialog(RetroshareDirModel *tree_model,RetroshareDirModel *flat_model,QWidget *parent = 0);
|
||||
SharedFilesDialog(bool remote_mode,QWidget *parent = 0);
|
||||
|
||||
/** Default Destructor */
|
||||
~SharedFilesDialog() {}
|
||||
~SharedFilesDialog() ;
|
||||
|
||||
virtual void hideEvent(QHideEvent *) ;
|
||||
virtual void showEvent(QShowEvent *) ;
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include <retroshare/rstypes.h>
|
||||
#include <retroshare/rsevents.h>
|
||||
#include "RsAutoUpdatePage.h"
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
|
||||
#include "ui_TransfersDialog.h"
|
||||
|
||||
|
@ -21,9 +21,9 @@
|
||||
#ifndef _GETTING_STARTED_DIALOG_H
|
||||
#define _GETTING_STARTED_DIALOG_H
|
||||
|
||||
//#include <retroshare/rstypes.h>
|
||||
#include <retroshare-gui/mainpage.h>
|
||||
|
||||
#include "ui_GetStartedDialog.h"
|
||||
#include "mainpage.h"
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
|
@ -321,10 +321,10 @@ IdDialog::IdDialog(QWidget *parent) : MainPage(parent), ui(new Ui::IdDialog)
|
||||
connect(idTWHAction, SIGNAL(toggled(bool)), this, SLOT(filterToggled(bool)));
|
||||
idTWHMenu->addAction(idTWHAction);
|
||||
|
||||
QAction *CreateIDAction = new QAction(QIcon(":/icons/png/person.png"),tr("Create new Identity"), this);
|
||||
QAction *CreateIDAction = new QAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/person.png"),tr("Create new Identity"), this);
|
||||
connect(CreateIDAction, SIGNAL(triggered()), this, SLOT(addIdentity()));
|
||||
|
||||
QAction *CreateCircleAction = new QAction(QIcon(":/icons/png/circles.png"),tr("Create new circle"), this);
|
||||
QAction *CreateCircleAction = new QAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/circles.png"),tr("Create new circle"), this);
|
||||
connect(CreateCircleAction, SIGNAL(triggered()), this, SLOT(createExternalCircle()));
|
||||
|
||||
QMenu *menu = new QMenu();
|
||||
@ -1017,11 +1017,11 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
||||
#endif
|
||||
if(group_flags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN)
|
||||
{
|
||||
contextMnu.addAction(QIcon(IMAGE_EDIT), tr("Edit Circle"), this, SLOT(showEditExistingCircle()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_EDIT), tr("Edit Circle"), this, SLOT(showEditExistingCircle()));
|
||||
am_I_circle_admin = true ;
|
||||
}
|
||||
else
|
||||
contextMnu.addAction(QIcon(IMAGE_INFO), tr("See details"), this, SLOT(showEditExistingCircle()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_INFO), tr("See details"), this, SLOT(showEditExistingCircle()));
|
||||
#ifdef CIRCLE_MEMBERSHIP_CATEGORIES
|
||||
}
|
||||
#endif
|
||||
@ -1109,9 +1109,9 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
||||
QAction *action ;
|
||||
|
||||
if(is_circle)
|
||||
action = new QAction(QIcon(image_names[i]), menu_titles[i] + " " + id_name,this) ;
|
||||
action = new QAction(FilesDefs::getIconFromQtResourcePath(image_names[i]), menu_titles[i] + " " + id_name,this) ;
|
||||
else
|
||||
action = new QAction(QIcon(image_names[i]), menu_titles[i],this) ;
|
||||
action = new QAction(FilesDefs::getIconFromQtResourcePath(image_names[i]), menu_titles[i],this) ;
|
||||
|
||||
if(i <2)
|
||||
QObject::connect(action,SIGNAL(triggered()), this, SLOT(acceptCircleSubscription()));
|
||||
@ -1134,7 +1134,7 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
||||
else
|
||||
id_name = tr("for identity ")+QString::fromStdString(ids[i][j].toStdString()) ;
|
||||
|
||||
QAction *action = new QAction(QIcon(image_names[i]), id_name,this) ;
|
||||
QAction *action = new QAction(FilesDefs::getIconFromQtResourcePath(image_names[i]), id_name,this) ;
|
||||
|
||||
if(i <2)
|
||||
QObject::connect(action,SIGNAL(triggered()), this, SLOT(acceptCircleSubscription()));
|
||||
@ -2195,7 +2195,7 @@ void IdDialog::IdListCustomPopupMenu( QPoint )
|
||||
{
|
||||
if(own_identities.size() <= 1)
|
||||
{
|
||||
QAction *action = contextMenu->addAction(QIcon(":/icons/png/chats.png"), tr("Chat with this person"), this, SLOT(chatIdentity()));
|
||||
QAction *action = contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/chats.png"), tr("Chat with this person"), this, SLOT(chatIdentity()));
|
||||
|
||||
if(own_identities.empty())
|
||||
action->setEnabled(false) ;
|
||||
@ -2204,7 +2204,7 @@ void IdDialog::IdListCustomPopupMenu( QPoint )
|
||||
}
|
||||
else
|
||||
{
|
||||
QMenu *mnu = contextMenu->addMenu(QIcon(":/icons/png/chats.png"),tr("Chat with this person as...")) ;
|
||||
QMenu *mnu = contextMenu->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)
|
||||
{
|
||||
@ -2222,7 +2222,7 @@ void IdDialog::IdListCustomPopupMenu( QPoint )
|
||||
}
|
||||
}
|
||||
// always allow to send messages
|
||||
contextMenu->addAction(QIcon(":/icons/mail/write-mail.png"), tr("Send message"), this, SLOT(sendMsg()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/mail/write-mail.png"), tr("Send message"), this, SLOT(sendMsg()));
|
||||
|
||||
contextMenu->addSeparator();
|
||||
|
||||
@ -2233,18 +2233,18 @@ void IdDialog::IdListCustomPopupMenu( QPoint )
|
||||
contextMenu->addAction(QIcon(""),tr("Copy identity to clipboard"),this,SLOT(copyRetroshareLink())) ;
|
||||
|
||||
if(n_is_not_a_contact == 0)
|
||||
contextMenu->addAction(QIcon(":/images/cancel.png"), tr("Remove from Contacts"), this, SLOT(removefromContacts()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/images/cancel.png"), tr("Remove from Contacts"), this, SLOT(removefromContacts()));
|
||||
|
||||
contextMenu->addSeparator();
|
||||
|
||||
if(n_positive_reputations == 0) // only unban when all items are banned
|
||||
contextMenu->addAction(QIcon(":/icons/png/thumbs-up.png"), tr("Set positive opinion"), this, SLOT(positivePerson()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/thumbs-up.png"), tr("Set positive opinion"), this, SLOT(positivePerson()));
|
||||
|
||||
if(n_neutral_reputations == 0) // only unban when all items are banned
|
||||
contextMenu->addAction(QIcon(":/icons/png/thumbs-neutral.png"), tr("Set neutral opinion"), this, SLOT(neutralPerson()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/thumbs-neutral.png"), tr("Set neutral opinion"), this, SLOT(neutralPerson()));
|
||||
|
||||
if(n_negative_reputations == 0)
|
||||
contextMenu->addAction(QIcon(":/icons/png/thumbs-down.png"), tr("Set negative opinion"), this, SLOT(negativePerson()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/thumbs-down.png"), tr("Set negative opinion"), this, SLOT(negativePerson()));
|
||||
}
|
||||
|
||||
if(one_item_owned_by_you && n_selected_items==1)
|
||||
|
@ -21,8 +21,10 @@
|
||||
#ifndef _CONNECTIONSDIALOG_H
|
||||
#define _CONNECTIONSDIALOG_H
|
||||
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
|
||||
#include "ui_NetworkDialog.h"
|
||||
#include "RsAutoUpdatePage.h"
|
||||
|
||||
#include "gui/NetworkDialog/pgpid_item_model.h"
|
||||
#include "gui/NetworkDialog/pgpid_item_proxy.h"
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include <retroshare/rstypes.h>
|
||||
|
||||
#include "RsAutoUpdatePage.h"
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
#include "ui_NetworkView.h"
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#ifndef _NEWS_FEED_DIALOG_H
|
||||
#define _NEWS_FEED_DIALOG_H
|
||||
|
||||
#include "mainpage.h"
|
||||
#include <retroshare-gui/mainpage.h>
|
||||
|
||||
#include "gui/feeds/FeedHolder.h"
|
||||
#include "util/TokenQueue.h"
|
||||
|
@ -21,7 +21,7 @@
|
||||
#ifndef _PLUGINS_PAGE_H_
|
||||
#define _PLUGINS_PAGE_H_
|
||||
|
||||
#include "mainpage.h"
|
||||
#include <retroshare-gui/mainpage.h>
|
||||
|
||||
#include <QGroupBox>
|
||||
#include <QString>
|
||||
|
@ -255,7 +255,7 @@ void PostedDialog::groupInfoToGroupItemInfo(const RsGxsGenericGroupData *groupDa
|
||||
groupItemInfo.icon = image;
|
||||
}
|
||||
else
|
||||
groupItemInfo.icon = QIcon(":icons/png/postedlinks.png");
|
||||
groupItemInfo.icon = FilesDefs::getIconFromQtResourcePath(":icons/png/postedlinks.png");
|
||||
|
||||
groupItemInfo.description = QString::fromUtf8(postedGroupData->mDescription.c_str());
|
||||
}
|
||||
|
@ -20,7 +20,8 @@
|
||||
|
||||
#include "RemoteDirModel.h"
|
||||
|
||||
#include "RsAutoUpdatePage.h"
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "gui/common/GroupDefs.h"
|
||||
#include "gui/common/RsCollection.h"
|
||||
@ -1115,15 +1116,9 @@ Qt::ItemFlags RetroshareDirModel::flags( const QModelIndex & index ) const
|
||||
/* Callback from Core*/
|
||||
void RetroshareDirModel::preMods()
|
||||
{
|
||||
emit layoutAboutToBeChanged();
|
||||
mUpdating = true ;
|
||||
#if QT_VERSION < 0x050000
|
||||
reset();
|
||||
#else
|
||||
beginResetModel();
|
||||
endResetModel();
|
||||
#endif
|
||||
|
||||
beginResetModel();
|
||||
#ifdef RDM_DEBUG
|
||||
std::cerr << "RetroshareDirModel::preMods()" << std::endl;
|
||||
#endif
|
||||
@ -1132,20 +1127,14 @@ void RetroshareDirModel::preMods()
|
||||
/* Callback from Core*/
|
||||
void RetroshareDirModel::postMods()
|
||||
{
|
||||
// emit layoutAboutToBeChanged();
|
||||
mUpdating = false ;
|
||||
#if QT_VERSION >= 0x040600
|
||||
beginResetModel();
|
||||
#endif
|
||||
|
||||
#ifdef RDM_DEBUG
|
||||
std::cerr << "RetroshareDirModel::postMods()" << std::endl;
|
||||
#endif
|
||||
|
||||
#if QT_VERSION >= 0x040600
|
||||
endResetModel();
|
||||
#endif
|
||||
emit layoutChanged();
|
||||
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(rowCount()-1,COLUMN_COUNT-1,(void*)NULL));
|
||||
}
|
||||
|
||||
void FlatStyle_RDM::postMods()
|
||||
|
@ -19,7 +19,8 @@
|
||||
*******************************************************************************/
|
||||
|
||||
#include <QTimer>
|
||||
#include "RsAutoUpdatePage.h"
|
||||
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
|
||||
bool RsAutoUpdatePage::_locked = false ;
|
||||
|
||||
|
@ -40,10 +40,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame{border: 2px solid #CCCCCC;
|
||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 #EEEEEE, stop: 1 #CCCCCC);
|
||||
border-radius: 10px}</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
|
@ -40,10 +40,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame{border: 2px solid #CCCCCC;
|
||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 #EEEEEE, stop: 1 #CCCCCC);
|
||||
border-radius: 10px}</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
|
@ -40,10 +40,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame{border: 2px solid #CCCCCC;
|
||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 #EEEEEE, stop: 1 #CCCCCC);
|
||||
border-radius: 10px}</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
|
@ -92,11 +92,11 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_NAME, QHeaderView::Stretch);
|
||||
|
||||
muteAct = new QAction(QIcon(), tr("Mute participant"), this);
|
||||
voteNegativeAct = new QAction(QIcon(":/icons/png/thumbs-down.png"), tr("Ban this person (Sets negative opinion)"), this);
|
||||
voteNeutralAct = new QAction(QIcon(":/icons/png/thumbs-neutral.png"), tr("Give neutral opinion"), this);
|
||||
votePositiveAct = new QAction(QIcon(":/icons/png/thumbs-up.png"), tr("Give positive opinion"), this);
|
||||
distantChatAct = new QAction(QIcon(":/icons/png/chats.png"), tr("Start private chat"), this);
|
||||
sendMessageAct = new QAction(QIcon(":/icons/mail/write-mail.png"), tr("Send Message"), this);
|
||||
voteNegativeAct = new QAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/thumbs-down.png"), tr("Ban this person (Sets negative opinion)"), this);
|
||||
voteNeutralAct = new QAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/thumbs-neutral.png"), tr("Give neutral opinion"), this);
|
||||
votePositiveAct = new QAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/thumbs-up.png"), tr("Give positive opinion"), this);
|
||||
distantChatAct = new QAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/chats.png"), tr("Start private chat"), this);
|
||||
sendMessageAct = new QAction(FilesDefs::getIconFromQtResourcePath(":/icons/mail/write-mail.png"), tr("Send Message"), this);
|
||||
showInPeopleAct = new QAction(QIcon(), tr("Show author in people tab"), this);
|
||||
|
||||
QActionGroup *sortgrp = new QActionGroup(this);
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <QTime>
|
||||
#include <QMenu>
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "ChatLobbyUserNotify.h"
|
||||
|
||||
#include "gui/ChatLobbyWidget.h"
|
||||
@ -104,12 +105,12 @@ void ChatLobbyUserNotify::setTextCaseSensitive(bool value)
|
||||
|
||||
QIcon ChatLobbyUserNotify::getIcon()
|
||||
{
|
||||
return QIcon(":/icons/png/chat-lobbies.png");
|
||||
return FilesDefs::getIconFromQtResourcePath(":/icons/png/chat-lobbies.png");
|
||||
}
|
||||
|
||||
QIcon ChatLobbyUserNotify::getMainIcon(bool hasNew)
|
||||
{
|
||||
return hasNew ? QIcon(":/icons/png/chat-lobbies-notify.png") : QIcon(":/icons/png/chat-lobbies.png");
|
||||
return hasNew ? FilesDefs::getIconFromQtResourcePath(":/icons/png/chat-lobbies-notify.png") : FilesDefs::getIconFromQtResourcePath(":/icons/png/chat-lobbies.png");
|
||||
}
|
||||
|
||||
unsigned int ChatLobbyUserNotify::getNewCount()
|
||||
@ -164,7 +165,7 @@ void ChatLobbyUserNotify::iconClicked()
|
||||
ChatLobbyInfo clInfo;
|
||||
if (rsMsgs->getChatLobbyInfo(clId,clInfo))
|
||||
strLobbyName=QString::fromUtf8(clInfo.lobby_name.c_str()) ;
|
||||
icoLobby=(clInfo.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? QIcon(":/images/chat_red24.png") : QIcon(":/images/chat_x24.png");
|
||||
icoLobby=(clInfo.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? FilesDefs::getIconFromQtResourcePath(":/images/chat_red24.png") : FilesDefs::getIconFromQtResourcePath(":/images/chat_x24.png");
|
||||
bFound=true;
|
||||
break;
|
||||
}
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <QTabBar>
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "ChatTabWidget.h"
|
||||
#include "ui_ChatTabWidget.h"
|
||||
#include "ChatDialog.h"
|
||||
@ -102,9 +103,9 @@ void ChatTabWidget::tabInfoChanged(ChatDialog *dialog)
|
||||
if (tab >= 0) {
|
||||
if (dialog->isTyping()) {
|
||||
setBlinking(tab, false);
|
||||
setTabIcon(tab, QIcon(IMAGE_TYPING));
|
||||
setTabIcon(tab, FilesDefs::getIconFromQtResourcePath(IMAGE_TYPING));
|
||||
} else if (dialog->hasNewMessages()) {
|
||||
setTabIcon(tab, QIcon(IMAGE_CHAT));
|
||||
setTabIcon(tab, FilesDefs::getIconFromQtResourcePath(IMAGE_CHAT));
|
||||
if (dialog->notifyBlink()) {
|
||||
setBlinking(tab, true);
|
||||
} else {
|
||||
@ -148,9 +149,9 @@ void ChatTabWidget::getInfo(bool &isTyping, bool &hasNewMessage, QIcon *icon)
|
||||
|
||||
if (icon) {
|
||||
if (isTyping) {
|
||||
*icon = QIcon(IMAGE_TYPING);
|
||||
*icon = FilesDefs::getIconFromQtResourcePath(IMAGE_TYPING);
|
||||
} else if (hasNewMessage) {
|
||||
*icon = QIcon(IMAGE_CHAT);
|
||||
*icon = FilesDefs::getIconFromQtResourcePath(IMAGE_CHAT);
|
||||
} else {
|
||||
cd = dynamic_cast<ChatDialog*>(currentWidget());
|
||||
if (cd && cd->hasPeerStatus()) {
|
||||
|
@ -20,6 +20,7 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "ChatUserNotify.h"
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/MainWindow.h"
|
||||
@ -75,12 +76,12 @@ bool ChatUserNotify::hasSetting(QString *name, QString *group)
|
||||
|
||||
QIcon ChatUserNotify::getIcon()
|
||||
{
|
||||
return QIcon(":/images/chat.png");
|
||||
return FilesDefs::getIconFromQtResourcePath(":/images/chat.png");
|
||||
}
|
||||
|
||||
QIcon ChatUserNotify::getMainIcon(bool hasNew)
|
||||
{
|
||||
return hasNew ? QIcon(":/icons/png/network-notify.png") : QIcon(":/icons/png/network.png");
|
||||
return hasNew ? FilesDefs::getIconFromQtResourcePath(":/icons/png/network-notify.png") : FilesDefs::getIconFromQtResourcePath(":/icons/png/network.png");
|
||||
}
|
||||
|
||||
unsigned int ChatUserNotify::getNewCount()
|
||||
|
@ -245,7 +245,7 @@ ChatWidget::ChatWidget(QWidget *parent)
|
||||
|
||||
//#ifdef ENABLE_DISTANT_CHAT_AND_MSGS
|
||||
// contextMnu->addSeparator();
|
||||
// QAction *action = new QAction(QIcon(":/images/pasterslink.png"), tr("Paste/Create private chat or Message link..."), this);
|
||||
// QAction *action = new QAction(FilesDefs::getIconFromQtResourcePath(":/images/pasterslink.png"), tr("Paste/Create private chat or Message link..."), this);
|
||||
// connect(action, SIGNAL(triggered()), this, SLOT(pasteCreateMsgLink()));
|
||||
// ui->chatTextEdit->addContextMenuAction(action);
|
||||
//#endif
|
||||
@ -1067,7 +1067,7 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const RsGxsId gx
|
||||
rsIdentity->getIdDetails(gxsId, details);
|
||||
bool isUnsigned = !(details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED);
|
||||
if(isUnsigned && ui->textBrowser->getShowImages()) {
|
||||
QIcon icon = QIcon(":/icons/anonymous_blue_128.png");
|
||||
QIcon icon = FilesDefs::getIconFromQtResourcePath(":/icons/anonymous_blue_128.png");
|
||||
int height = ui->textBrowser->fontMetrics().height()*0.8;
|
||||
QImage image(icon.pixmap(height,height).toImage());
|
||||
QByteArray byteArray;
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "PopupChatDialog.h"
|
||||
#include "PopupChatWindow.h"
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "gui/settings/RsharePeerSettings.h"
|
||||
#include "gui/notifyqt.h"
|
||||
@ -149,10 +150,10 @@ void PopupChatDialog::showAvatarFrame(bool show)
|
||||
|
||||
if (show) {
|
||||
ui.avatarFrameButton->setToolTip(tr("Hide Avatar"));
|
||||
ui.avatarFrameButton->setIcon(QIcon(":images/hide_toolbox_frame.png"));
|
||||
ui.avatarFrameButton->setIcon(FilesDefs::getIconFromQtResourcePath(":images/hide_toolbox_frame.png"));
|
||||
} else {
|
||||
ui.avatarFrameButton->setToolTip(tr("Show Avatar"));
|
||||
ui.avatarFrameButton->setIcon(QIcon(":images/show_toolbox_frame.png"));
|
||||
ui.avatarFrameButton->setIcon(FilesDefs::getIconFromQtResourcePath(":images/show_toolbox_frame.png"));
|
||||
}
|
||||
|
||||
PeerSettings->setShowAvatarFrame(mChatId, show);
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <QCloseEvent>
|
||||
#include <QMenu>
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "PopupChatWindow.h"
|
||||
#include "ChatDialog.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
@ -113,14 +114,14 @@ PopupChatWindow::PopupChatWindow(bool tabbed, QWidget *parent, Qt::WindowFlags f
|
||||
void PopupChatWindow::showContextMenu(QPoint)
|
||||
{
|
||||
QMenu contextMnu(this);
|
||||
contextMnu.addAction(QIcon(":/images/highlight.png"),tr("Choose window color..."),this,SLOT(setStyle()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/highlight.png"),tr("Choose window color..."),this,SLOT(setStyle()));
|
||||
|
||||
if (Settings->getChatFlags() & RS_CHAT_TABBED_WINDOW)
|
||||
{
|
||||
if(tabbedWindow)
|
||||
contextMnu.addAction(QIcon(":/images/tab-dock.png"),tr("Dock window"),this,SLOT(docTab()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/tab-dock.png"),tr("Dock window"),this,SLOT(docTab()));
|
||||
|
||||
contextMnu.addAction(QIcon(":/images/tab-undock.png"),tr("Dock window"),this,SLOT(undockTab()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/tab-undock.png"),tr("Dock window"),this,SLOT(undockTab()));
|
||||
}
|
||||
contextMnu.exec(QCursor::pos());
|
||||
}
|
||||
@ -295,9 +296,9 @@ void PopupChatWindow::calculateTitle(ChatDialog *dialog)
|
||||
QIcon icon;
|
||||
if (isTyping) {
|
||||
mBlinkIcon = QIcon();
|
||||
icon = QIcon(IMAGE_TYPING);
|
||||
icon = FilesDefs::getIconFromQtResourcePath(IMAGE_TYPING);
|
||||
} else if (hasNewMessages) {
|
||||
icon = QIcon(IMAGE_CHAT);
|
||||
icon = FilesDefs::getIconFromQtResourcePath(IMAGE_CHAT);
|
||||
if (Settings->getChatFlags() & RS_CHAT_BLINK) {
|
||||
mBlinkIcon = icon;
|
||||
} else {
|
||||
|
@ -26,11 +26,13 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include <retroshare/rsstatus.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsidentity.h>
|
||||
|
||||
#include "RsAutoUpdatePage.h"
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
|
||||
#include "PopupDistantChatDialog.h"
|
||||
|
||||
#define IMAGE_RED_LED ":/icons/bullet_red_128.png"
|
||||
@ -112,7 +114,7 @@ void PopupDistantChatDialog::updateDisplay()
|
||||
{
|
||||
case RS_DISTANT_CHAT_STATUS_UNKNOWN:
|
||||
|
||||
_status_label->setIcon(QIcon(IMAGE_GRY_LED));
|
||||
_status_label->setIcon(FilesDefs::getIconFromQtResourcePath(IMAGE_GRY_LED));
|
||||
msg = tr("Remote status unknown.");
|
||||
_status_label->setToolTip(msg);
|
||||
getChatWidget()->updateStatusString("%1", msg, true);
|
||||
@ -123,7 +125,7 @@ void PopupDistantChatDialog::updateDisplay()
|
||||
break ;
|
||||
case RS_DISTANT_CHAT_STATUS_REMOTELY_CLOSED:
|
||||
std::cerr << "Chat remotely closed. " << std::endl;
|
||||
_status_label->setIcon(QIcon(IMAGE_RED_LED));
|
||||
_status_label->setIcon(FilesDefs::getIconFromQtResourcePath(IMAGE_RED_LED));
|
||||
_status_label->setToolTip( QObject::tr("Distant peer has closed the chat") );
|
||||
|
||||
getChatWidget()->updateStatusString("%1", tr( "Your partner closed the conversation." ), true );
|
||||
@ -134,7 +136,7 @@ void PopupDistantChatDialog::updateDisplay()
|
||||
|
||||
case RS_DISTANT_CHAT_STATUS_TUNNEL_DN:
|
||||
|
||||
_status_label->setIcon(QIcon(IMAGE_YEL_LED));
|
||||
_status_label->setIcon(FilesDefs::getIconFromQtResourcePath(IMAGE_YEL_LED));
|
||||
msg = QObject::tr( "Tunnel is pending");
|
||||
|
||||
if(tinfo.pending_items > 0)
|
||||
@ -147,7 +149,7 @@ void PopupDistantChatDialog::updateDisplay()
|
||||
break;
|
||||
case RS_DISTANT_CHAT_STATUS_CAN_TALK:
|
||||
|
||||
_status_label->setIcon(QIcon(IMAGE_GRN_LED));
|
||||
_status_label->setIcon(FilesDefs::getIconFromQtResourcePath(IMAGE_GRN_LED));
|
||||
msg = QObject::tr( "End-to-end encrypted conversation established");
|
||||
_status_label->setToolTip(msg);
|
||||
getChatWidget()->unblockSending();
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "Emoticons.h"
|
||||
#include "util/HandleRichText.h"
|
||||
#include "retroshare/rsinit.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#define ICONNAME "groupicon.png"
|
||||
|
||||
@ -210,7 +211,7 @@ void Emoticons::showSmileyWidget(QWidget *parent, QWidget *button, const char *s
|
||||
smTab->setStyleSheet("QTabBar::tab { height: 44px; width: 44px; }");
|
||||
|
||||
if (groupName.right(4).toLower() == ".png")
|
||||
smTab->addTab( tabGrpWidget, QIcon(groupName), "");
|
||||
smTab->addTab( tabGrpWidget, FilesDefs::getIconFromQtResourcePath(groupName), "");
|
||||
else
|
||||
smTab->addTab( tabGrpWidget, groupName);
|
||||
} else {
|
||||
@ -371,9 +372,9 @@ void Emoticons::showStickerWidget(QWidget *parent, QWidget *button, const char *
|
||||
|
||||
int index;
|
||||
if (groupDir.exists(ICONNAME)) //use groupicon.png if exists, else the first png as a group icon
|
||||
index = smTab->addTab( tabGrpWidget, QIcon(groupDir.absoluteFilePath(ICONNAME)), "");
|
||||
index = smTab->addTab( tabGrpWidget, FilesDefs::getIconFromQtResourcePath(groupDir.absoluteFilePath(ICONNAME)), "");
|
||||
else
|
||||
index = smTab->addTab( tabGrpWidget, QIcon(groupDir.entryInfoList(QDir::Files)[0].canonicalFilePath()), "");
|
||||
index = smTab->addTab( tabGrpWidget, FilesDefs::getIconFromQtResourcePath(groupDir.entryInfoList(QDir::Files)[0].canonicalFilePath()), "");
|
||||
smTab->setTabToolTip(index, groupName);
|
||||
} else {
|
||||
tabGrpWidget = smWidget;
|
||||
|
@ -352,25 +352,25 @@ void FriendList::peerTreeWidgetCustomPopupMenu()
|
||||
{
|
||||
bool standard = c->data(COLUMN_DATA, ROLE_STANDARD).toBool();
|
||||
#ifdef RS_DIRECT_CHAT
|
||||
contextMenu->addAction(QIcon(IMAGE_MSG), tr("Send message to whole group"), this, SLOT(msgfriend()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MSG), tr("Send message to whole group"), this, SLOT(msgfriend()));
|
||||
contextMenu->addSeparator();
|
||||
#endif // RS_DIRECT_CHAT
|
||||
contextMenu->addAction(QIcon(IMAGE_EDIT), tr("Edit Group"), this, SLOT(editGroup()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_EDIT), tr("Edit Group"), this, SLOT(editGroup()));
|
||||
|
||||
QAction *action = contextMenu->addAction(QIcon(IMAGE_REMOVE), tr("Remove Group"), this, SLOT(removeGroup()));
|
||||
QAction *action = contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_REMOVE), tr("Remove Group"), this, SLOT(removeGroup()));
|
||||
action->setDisabled(standard);
|
||||
}
|
||||
break;
|
||||
case TYPE_GPG:
|
||||
{
|
||||
#ifdef RS_DIRECT_CHAT
|
||||
contextMenu->addAction(QIcon(IMAGE_CHAT), tr("Chat"), this, SLOT(chatfriendproxy()));
|
||||
contextMenu->addAction(QIcon(IMAGE_MSG), tr("Send message"), this, SLOT(msgfriend()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_CHAT), tr("Chat"), this, SLOT(chatfriendproxy()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MSG), tr("Send message"), this, SLOT(msgfriend()));
|
||||
contextMenu->addSeparator();
|
||||
#endif // RS_DIRECT_CHAT
|
||||
|
||||
contextMenu->addAction(QIcon(IMAGE_FRIENDINFO), tr("Profile details"), this, SLOT(configurefriend()));
|
||||
contextMenu->addAction(QIcon(IMAGE_DENYFRIEND), tr("Deny connections"), this, SLOT(removefriend()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_FRIENDINFO), tr("Profile details"), this, SLOT(configurefriend()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_DENYFRIEND), tr("Deny connections"), this, SLOT(removefriend()));
|
||||
|
||||
if(mShowGroups)
|
||||
{
|
||||
@ -412,8 +412,8 @@ void FriendList::peerTreeWidgetCustomPopupMenu()
|
||||
}
|
||||
}
|
||||
|
||||
QMenu *groupsMenu = contextMenu->addMenu(QIcon(IMAGE_GROUP16), tr("Groups"));
|
||||
groupsMenu->addAction(QIcon(IMAGE_EXPAND), tr("Create new group"), this, SLOT(createNewGroup()));
|
||||
QMenu *groupsMenu = contextMenu->addMenu(FilesDefs::getIconFromQtResourcePath(IMAGE_GROUP16), tr("Groups"));
|
||||
groupsMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_EXPAND), tr("Create new group"), this, SLOT(createNewGroup()));
|
||||
|
||||
if (addToGroupMenu || moveToGroupMenu || foundGroup) {
|
||||
if (addToGroupMenu) {
|
||||
@ -445,24 +445,24 @@ void FriendList::peerTreeWidgetCustomPopupMenu()
|
||||
case TYPE_SSL:
|
||||
{
|
||||
#ifdef RS_DIRECT_CHAT
|
||||
contextMenu->addAction(QIcon(IMAGE_CHAT), tr("Chat"), this, SLOT(chatfriendproxy()));
|
||||
contextMenu->addAction(QIcon(IMAGE_MSG), tr("Send message to this node"), this, SLOT(msgfriend()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_CHAT), tr("Chat"), this, SLOT(chatfriendproxy()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MSG), tr("Send message to this node"), this, SLOT(msgfriend()));
|
||||
contextMenu->addSeparator();
|
||||
#endif // RS_DIRECT_CHAT
|
||||
|
||||
contextMenu->addAction(QIcon(IMAGE_FRIENDINFO), tr("Node details"), this, SLOT(configurefriend()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_FRIENDINFO), tr("Node details"), this, SLOT(configurefriend()));
|
||||
|
||||
if (type == TYPE_GPG || type == TYPE_SSL) {
|
||||
contextMenu->addAction(QIcon(IMAGE_EXPORTFRIEND), tr("Recommend this node to..."), this, SLOT(recommendfriend()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_EXPORTFRIEND), tr("Recommend this node to..."), this, SLOT(recommendfriend()));
|
||||
}
|
||||
|
||||
if(!rsPeers->isHiddenNode(rsPeers->getOwnId()) || rsPeers->isHiddenNode( RsPeerId(getRsId(c)) ))
|
||||
contextMenu->addAction(QIcon(IMAGE_CONNECT), tr("Attempt to connect"), this, SLOT(connectfriend()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_CONNECT), tr("Attempt to connect"), this, SLOT(connectfriend()));
|
||||
|
||||
contextMenu->addAction(QIcon(IMAGE_COPYLINK), tr("Copy certificate link"), this, SLOT(copyFullCertificate()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COPYLINK), tr("Copy certificate link"), this, SLOT(copyFullCertificate()));
|
||||
|
||||
//this is a SSL key
|
||||
contextMenu->addAction(QIcon(IMAGE_REMOVEFRIEND), tr("Remove Friend Node"), this, SLOT(removefriend()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_REMOVEFRIEND), tr("Remove Friend Node"), this, SLOT(removefriend()));
|
||||
|
||||
}
|
||||
}
|
||||
@ -471,12 +471,12 @@ void FriendList::peerTreeWidgetCustomPopupMenu()
|
||||
|
||||
contextMenu->addSeparator();
|
||||
|
||||
QAction *action = contextMenu->addAction(QIcon(IMAGE_PASTELINK), tr("Paste certificate link"), this, SLOT(pastePerson()));
|
||||
QAction *action = contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_PASTELINK), tr("Paste certificate link"), this, SLOT(pastePerson()));
|
||||
if (RSLinkClipboard::empty(RetroShareLink::TYPE_CERTIFICATE))
|
||||
action->setDisabled(true);
|
||||
|
||||
contextMenu->addAction(QIcon(IMAGE_EXPAND), tr("Expand all"), ui->peerTreeWidget, SLOT(expandAll()));
|
||||
contextMenu->addAction(QIcon(IMAGE_COLLAPSE), tr("Collapse all"), ui->peerTreeWidget, SLOT(collapseAll()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_EXPAND), tr("Expand all"), ui->peerTreeWidget, SLOT(expandAll()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COLLAPSE), tr("Collapse all"), ui->peerTreeWidget, SLOT(collapseAll()));
|
||||
|
||||
contextMenu = ui->peerTreeWidget->createStandardContextMenu(contextMenu);
|
||||
|
||||
@ -716,7 +716,7 @@ void FriendList::insertPeers()
|
||||
|
||||
groupItem->setChildIndicatorPolicy(QTreeWidgetItem::DontShowIndicatorWhenChildless);
|
||||
groupItem->setTextAlignment(COLUMN_NAME, Qt::AlignLeft | Qt::AlignVCenter);
|
||||
groupItem->setIcon(COLUMN_NAME, QIcon(IMAGE_GROUP24));
|
||||
groupItem->setIcon(COLUMN_NAME, FilesDefs::getIconFromQtResourcePath(IMAGE_GROUP24));
|
||||
groupItem->setData(COLUMN_NAME, Qt::ForegroundRole, textColorGroup());
|
||||
|
||||
/* used to find back the item */
|
||||
|
@ -152,15 +152,13 @@ void RsFriendListModel::setDisplayGroups(bool b)
|
||||
}
|
||||
void RsFriendListModel::preMods()
|
||||
{
|
||||
emit layoutAboutToBeChanged();
|
||||
|
||||
beginResetModel();
|
||||
}
|
||||
void RsFriendListModel::postMods()
|
||||
{
|
||||
endResetModel();
|
||||
emit layoutChanged();
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mTopLevel.size()-1,COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL));
|
||||
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(rowCount()-1,columnCount()-1,(void*)NULL));
|
||||
}
|
||||
|
||||
int RsFriendListModel::rowCount(const QModelIndex& parent) const
|
||||
@ -1060,14 +1058,16 @@ void RsFriendListModel::updateInternalData()
|
||||
preMods();
|
||||
|
||||
beginRemoveRows(QModelIndex(),0,mTopLevel.size()-1);
|
||||
endRemoveRows();
|
||||
|
||||
mGroups.clear();
|
||||
mProfiles.clear();
|
||||
mLocations.clear();
|
||||
|
||||
mTopLevel.clear();
|
||||
|
||||
endRemoveRows();
|
||||
|
||||
auto TL = mTopLevel ; // This allows to fill TL without touching mTopLevel outside of [begin/end]InsertRows().
|
||||
|
||||
// create a map of profiles and groups
|
||||
std::map<RsPgpId,uint32_t> pgp_indices;
|
||||
|
||||
@ -1155,7 +1155,6 @@ void RsFriendListModel::updateInternalData()
|
||||
RsDbg() << "Creating top level list" << std::endl;
|
||||
#endif
|
||||
|
||||
mTopLevel.clear();
|
||||
std::set<RsPgpId> already_in_a_group;
|
||||
|
||||
if(mDisplayGroups) // in this case, we list all groups at the top level followed by the profiles without parent group
|
||||
@ -1170,7 +1169,7 @@ void RsFriendListModel::updateInternalData()
|
||||
e.type = ENTRY_TYPE_GROUP;
|
||||
e.group_index = i;
|
||||
|
||||
mTopLevel.push_back(e);
|
||||
TL.push_back(e);
|
||||
|
||||
for(uint32_t j=0;j<mGroups[i].child_profile_indices.size();++j)
|
||||
already_in_a_group.insert(mProfiles[mGroups[i].child_profile_indices[j]].profile_info.gpg_id);
|
||||
@ -1189,12 +1188,15 @@ void RsFriendListModel::updateInternalData()
|
||||
e.profile_index = i;
|
||||
e.group_index = UNDEFINED_GROUP_INDEX_VALUE;
|
||||
|
||||
mTopLevel.push_back(e);
|
||||
TL.push_back(e);
|
||||
}
|
||||
|
||||
// finally, tell the model client that layout has changed.
|
||||
|
||||
beginInsertRows(QModelIndex(),0,mTopLevel.size()-1);
|
||||
beginInsertRows(QModelIndex(),0,TL.size()-1);
|
||||
|
||||
mTopLevel = TL;
|
||||
|
||||
endInsertRows();
|
||||
|
||||
postMods();
|
||||
@ -1234,7 +1236,7 @@ void RsFriendListModel::collapseItem(const QModelIndex& index)
|
||||
mExpandedProfiles.erase(s);
|
||||
|
||||
// apparently we cannot be subtle here.
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mTopLevel.size()-1,COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL));
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mTopLevel.size()-1,columnCount()-1,(void*)NULL));
|
||||
}
|
||||
|
||||
void RsFriendListModel::expandItem(const QModelIndex& index)
|
||||
@ -1259,7 +1261,7 @@ void RsFriendListModel::expandItem(const QModelIndex& index)
|
||||
mExpandedProfiles.insert(s);
|
||||
|
||||
// apparently we cannot be subtle here.
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mTopLevel.size()-1,COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL));
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mTopLevel.size()-1,columnCount()-1,(void*)NULL));
|
||||
}
|
||||
|
||||
bool RsFriendListModel::isProfileExpanded(const EntryIndex& e) const
|
||||
|
@ -39,8 +39,16 @@ public:
|
||||
explicit RsFriendListModel(QObject *parent = NULL);
|
||||
~RsFriendListModel(){}
|
||||
|
||||
class RsNodeDetails: public RsPeerDetails {};// in the near future, there will be a specific class for Profile/Node details in replacement of RsPeerDetails
|
||||
class RsProfileDetails: public RsPeerDetails {};
|
||||
class RsNodeDetails: public RsPeerDetails
|
||||
{
|
||||
public:
|
||||
virtual ~RsNodeDetails() {}
|
||||
};// in the near future, there will be a specific class for Profile/Node details in replacement of RsPeerDetails
|
||||
class RsProfileDetails: public RsPeerDetails
|
||||
{
|
||||
public:
|
||||
virtual ~RsProfileDetails() {}
|
||||
};
|
||||
|
||||
struct HierarchicalGroupInformation
|
||||
{
|
||||
@ -55,6 +63,7 @@ public:
|
||||
struct HierarchicalNodeInformation
|
||||
{
|
||||
HierarchicalNodeInformation() : last_update_ts(0) {}
|
||||
virtual ~HierarchicalNodeInformation() {}
|
||||
|
||||
rstime_t last_update_ts;
|
||||
RsNodeDetails node_info;
|
||||
|
@ -18,6 +18,7 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include <QDialogButtonBox>
|
||||
#include <QMenu>
|
||||
#include "FriendSelectionWidget.h"
|
||||
@ -219,7 +220,7 @@ static void initSslItem(QTreeWidgetItem *item, const RsPeerDetails &detail, cons
|
||||
item->setData(COLUMN_NAME, Qt::ForegroundRole, textColorOnline);
|
||||
}
|
||||
|
||||
item->setIcon(COLUMN_NAME, QIcon(StatusDefs::imageUser(state)));
|
||||
item->setIcon(COLUMN_NAME, FilesDefs::getIconFromQtResourcePath(StatusDefs::imageUser(state)));
|
||||
item->setData(COLUMN_DATA, ROLE_ID, QString::fromStdString(detail.id.toStdString()));
|
||||
|
||||
item->setData(COLUMN_NAME, ROLE_SORT_GROUP, 1);
|
||||
@ -381,7 +382,7 @@ void FriendSelectionWidget::secured_fillList()
|
||||
groupItem->setFlags(Qt::ItemIsUserCheckable | groupItem->flags());
|
||||
groupItem->setChildIndicatorPolicy(QTreeWidgetItem::DontShowIndicatorWhenChildless);
|
||||
groupItem->setTextAlignment(COLUMN_NAME, Qt::AlignLeft | Qt::AlignVCenter);
|
||||
groupItem->setIcon(COLUMN_NAME, QIcon(IMAGE_GROUP16));
|
||||
groupItem->setIcon(COLUMN_NAME, FilesDefs::getIconFromQtResourcePath(IMAGE_GROUP16));
|
||||
|
||||
groupItem->setData(COLUMN_DATA, ROLE_ID, QString::fromStdString(groupInfo->id.toStdString()));
|
||||
|
||||
@ -454,7 +455,7 @@ void FriendSelectionWidget::secured_fillList()
|
||||
}
|
||||
|
||||
gpgItem->setFlags(Qt::ItemIsUserCheckable | gpgItem->flags());
|
||||
gpgItem->setIcon(COLUMN_NAME, QIcon(StatusDefs::imageUser(state)));
|
||||
gpgItem->setIcon(COLUMN_NAME, FilesDefs::getIconFromQtResourcePath(StatusDefs::imageUser(state)));
|
||||
gpgItem->setData(COLUMN_DATA, ROLE_ID, QString::fromStdString(detail.gpg_id.toStdString()));
|
||||
|
||||
gpgItem->setData(COLUMN_NAME, ROLE_SORT_GROUP, 1);
|
||||
@ -773,7 +774,7 @@ void FriendSelectionWidget::peerStatusChanged(const QString& peerId, int status)
|
||||
item->setData(COLUMN_NAME, Qt::ForegroundRole, QVariant());
|
||||
}
|
||||
|
||||
item->setIcon(COLUMN_NAME, QIcon(StatusDefs::imageUser(gpgStatus)));
|
||||
item->setIcon(COLUMN_NAME, FilesDefs::getIconFromQtResourcePath(StatusDefs::imageUser(gpgStatus)));
|
||||
|
||||
item->setData(COLUMN_NAME, ROLE_SORT_STATE, gpgStatus);
|
||||
|
||||
@ -790,7 +791,7 @@ void FriendSelectionWidget::peerStatusChanged(const QString& peerId, int status)
|
||||
item->setData(COLUMN_NAME, Qt::ForegroundRole, QVariant());
|
||||
}
|
||||
|
||||
item->setIcon(COLUMN_NAME, QIcon(StatusDefs::imageUser(status)));
|
||||
item->setIcon(COLUMN_NAME, FilesDefs::getIconFromQtResourcePath(StatusDefs::imageUser(status)));
|
||||
|
||||
item->setData(COLUMN_NAME, ROLE_SORT_STATE, status);
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include <QHBoxLayout>
|
||||
#include <QSizePolicy>
|
||||
#include "GroupFlagsWidget.h"
|
||||
@ -54,12 +55,12 @@ GroupFlagsWidget::GroupFlagsWidget(QWidget *parent,FileStorageFlags flags)
|
||||
setMaximumSize(128 * QFontMetricsF(font()).height()/14.0,32 * QFontMetricsF(font()).height()/14.0) ;
|
||||
setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||||
|
||||
_icons[2*INDEX_BROWSABLE+0] = new QIcon(FLAGS_BROWSABLE_OFF) ;
|
||||
_icons[2*INDEX_BROWSABLE+1] = new QIcon(FLAGS_BROWSABLE_ON) ;
|
||||
_icons[2*INDEX_ANON_SEARCH+0] = new QIcon(FLAGS_ANONYMOUS_SEARCH_OFF) ;
|
||||
_icons[2*INDEX_ANON_SEARCH+1] = new QIcon(FLAGS_ANONYMOUS_SEARCH_ON) ;
|
||||
_icons[2*INDEX_ANON_DL+0] = new QIcon(FLAGS_ANONYMOUS_DL_OFF) ;
|
||||
_icons[2*INDEX_ANON_DL+1] = new QIcon(FLAGS_ANONYMOUS_DL_ON) ;
|
||||
_icons[2*INDEX_BROWSABLE+0] = FilesDefs::getIconFromQtResourcePath(FLAGS_BROWSABLE_OFF) ;
|
||||
_icons[2*INDEX_BROWSABLE+1] = FilesDefs::getIconFromQtResourcePath(FLAGS_BROWSABLE_ON) ;
|
||||
_icons[2*INDEX_ANON_SEARCH+0] = FilesDefs::getIconFromQtResourcePath(FLAGS_ANONYMOUS_SEARCH_OFF) ;
|
||||
_icons[2*INDEX_ANON_SEARCH+1] = FilesDefs::getIconFromQtResourcePath(FLAGS_ANONYMOUS_SEARCH_ON) ;
|
||||
_icons[2*INDEX_ANON_DL+0] = FilesDefs::getIconFromQtResourcePath(FLAGS_ANONYMOUS_DL_OFF) ;
|
||||
_icons[2*INDEX_ANON_DL+1] = FilesDefs::getIconFromQtResourcePath(FLAGS_ANONYMOUS_DL_ON) ;
|
||||
|
||||
setLayout(_layout) ;
|
||||
|
||||
@ -136,7 +137,7 @@ void GroupFlagsWidget::update_button_state(bool b,int button_id)
|
||||
tip_on = "";
|
||||
tip_off = "";
|
||||
}
|
||||
_buttons[button_id]->setIcon(*_icons[2*button_id+(int)b]) ;
|
||||
_buttons[button_id]->setIcon(_icons[2*button_id+(int)b]) ;
|
||||
_buttons[button_id]->setToolTip(b?tip_on:tip_off) ;
|
||||
}
|
||||
|
||||
@ -183,10 +184,6 @@ void GroupFlagsWidget::update_BR_button(bool b) { update_button_state(b,INDEX_BR
|
||||
GroupFlagsWidget::~GroupFlagsWidget()
|
||||
{
|
||||
for(int i=0;i<3;++i)
|
||||
{
|
||||
delete _buttons[i] ;
|
||||
delete _icons[2*i+0] ;
|
||||
delete _icons[2*i+1] ;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ class GroupFlagsWidget: public QWidget
|
||||
QPushButton *_buttons[4] ;
|
||||
|
||||
QLayout *_layout ;
|
||||
QIcon *_icons[6] ;
|
||||
QIcon _icons[6] ;
|
||||
FileStorageFlags _flags[4] ;
|
||||
|
||||
static QString _tooltips_on[4] ;
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "GroupTreeWidget.h"
|
||||
#include "ui_GroupTreeWidget.h"
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "retroshare/rsgxsflags.h"
|
||||
|
||||
#include "PopularityDefs.h"
|
||||
@ -250,11 +251,11 @@ void GroupTreeWidget::initDisplayMenu(QToolButton *toolButton)
|
||||
displayMenu = new QMenu();
|
||||
QActionGroup *actionGroupAsc = new QActionGroup(displayMenu);
|
||||
|
||||
actionSortDescending = displayMenu->addAction(QIcon(":/images/sort_decrease.png"), tr("Sort Descending Order"), this, SLOT(sort()));
|
||||
actionSortDescending = displayMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/images/sort_decrease.png"), tr("Sort Descending Order"), this, SLOT(sort()));
|
||||
actionSortDescending->setCheckable(true);
|
||||
actionSortDescending->setActionGroup(actionGroupAsc);
|
||||
|
||||
actionSortAscending = displayMenu->addAction(QIcon(":/images/sort_incr.png"), tr("Sort Ascending Order"), this, SLOT(sort()));
|
||||
actionSortAscending = displayMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/images/sort_incr.png"), tr("Sort Ascending Order"), this, SLOT(sort()));
|
||||
actionSortAscending->setCheckable(true);
|
||||
actionSortAscending->setActionGroup(actionGroupAsc);
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "LineEditClear.h"
|
||||
|
||||
#include <QToolButton>
|
||||
@ -124,9 +125,8 @@ void LineEditClear::showFilterIcon()
|
||||
|
||||
mFilterButton = new QToolButton(this);
|
||||
mFilterButton->setFixedSize(16, 16);
|
||||
QPixmap filterPixmap(IMAGE_FILTER);
|
||||
mFilterButton->setIcon(QIcon(filterPixmap));
|
||||
mFilterButton->setIconSize(filterPixmap.size());
|
||||
mFilterButton->setIcon(FilesDefs::getIconFromQtResourcePath(IMAGE_FILTER));
|
||||
//mFilterButton->setIconSize(filterPixmap.size());
|
||||
mFilterButton->setCursor(Qt::ArrowCursor);
|
||||
mFilterButton->setStyleSheet("QToolButton { border: none; padding: 0px; }"
|
||||
"QToolButton[popupMode=\"2\"] { padding-right: 10px; }"
|
||||
@ -224,7 +224,7 @@ void LineEditClear::activateAction(QAction *action)
|
||||
|
||||
QIcon icon = action->icon();
|
||||
if (icon.isNull()) {
|
||||
icon = QIcon(IMAGE_FILTER);
|
||||
icon = FilesDefs::getIconFromQtResourcePath(IMAGE_FILTER);
|
||||
}
|
||||
|
||||
mFilterButton->setIcon(icon);
|
||||
|
@ -18,6 +18,7 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QMimeData>
|
||||
@ -250,8 +251,8 @@ void MimeTextEdit::contextMenuEvent(QContextMenuEvent *e)
|
||||
QAction *spoilerAction = contextMenu->addAction(tr("Spoiler"), this, SLOT(spoiler()));
|
||||
spoilerAction->setToolTip(tr("Select text to hide, then push this button"));
|
||||
contextMenu->addSeparator();
|
||||
QAction *pasteLinkAction = contextMenu->addAction(QIcon(":/images/pasterslink.png"), tr("Paste RetroShare Link"), this, SLOT(pasteLink()));
|
||||
contextMenu->addAction(QIcon(":/images/pasterslink.png"), tr("Paste my certificate link"), this, SLOT(pasteOwnCertificateLink()));
|
||||
QAction *pasteLinkAction = contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/images/pasterslink.png"), tr("Paste RetroShare Link"), this, SLOT(pasteLink()));
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/images/pasterslink.png"), tr("Paste my certificate link"), this, SLOT(pasteOwnCertificateLink()));
|
||||
|
||||
if (RSLinkClipboard::empty()) {
|
||||
pasteLinkAction->setDisabled(true);
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "GroupDefs.h"
|
||||
#include "gui/chat/ChatDialog.h"
|
||||
#include "gui/common/AvatarDefs.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include "gui/connect/ConfCertDialog.h"
|
||||
#include "gui/connect/PGPKeyDialog.h"
|
||||
@ -453,6 +454,7 @@ void NewFriendList::processSettings(bool load)
|
||||
|
||||
if (load) // load settings
|
||||
{
|
||||
std::cerr <<"Re-loading settings..." << std::endl;
|
||||
// states
|
||||
setShowUnconnected(!Settings->value("hideUnconnected", !mProxyModel->showOfflineNodes()).toBool());
|
||||
setShowState(Settings->value("showState", mModel->getDisplayStatusString()).toBool());
|
||||
@ -577,20 +579,20 @@ void NewFriendList::peerTreeWidgetCustomPopupMenu()
|
||||
|
||||
bool standard = group_info.flag & RS_GROUP_FLAG_STANDARD;
|
||||
#ifdef RS_DIRECT_CHAT
|
||||
contextMenu.addAction(QIcon(IMAGE_MSG), tr("Send message to whole group"), this, SLOT(msgGroup()));
|
||||
contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MSG), tr("Send message to whole group"), this, SLOT(msgGroup()));
|
||||
contextMenu.addSeparator();
|
||||
#endif // RS_DIRECT_CHAT
|
||||
contextMenu.addAction(QIcon(IMAGE_EDIT), tr("Edit Group"), this, SLOT(editGroup()));
|
||||
contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_EDIT), tr("Edit Group"), this, SLOT(editGroup()));
|
||||
|
||||
QAction *action = contextMenu.addAction(QIcon(IMAGE_REMOVE), tr("Remove Group"), this, SLOT(removeGroup()));
|
||||
QAction *action = contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_REMOVE), tr("Remove Group"), this, SLOT(removeGroup()));
|
||||
action->setDisabled(standard);
|
||||
}
|
||||
break;
|
||||
|
||||
case RsFriendListModel::ENTRY_TYPE_PROFILE:
|
||||
{
|
||||
contextMenu.addAction(QIcon(IMAGE_FRIENDINFO), tr("Profile details"), this, SLOT(configureProfile()));
|
||||
contextMenu.addAction(QIcon(IMAGE_DENYFRIEND), tr("Deny connections"), this, SLOT(removeProfile()));
|
||||
contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_FRIENDINFO), tr("Profile details"), this, SLOT(configureProfile()));
|
||||
contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_DENYFRIEND), tr("Deny connections"), this, SLOT(removeProfile()));
|
||||
|
||||
RsFriendListModel::RsProfileDetails details;
|
||||
mModel->getProfileData(index,details);
|
||||
@ -636,8 +638,8 @@ void NewFriendList::peerTreeWidgetCustomPopupMenu()
|
||||
}
|
||||
}
|
||||
|
||||
QMenu *groupsMenu = contextMenu.addMenu(QIcon(IMAGE_GROUP16), tr("Groups"));
|
||||
groupsMenu->addAction(QIcon(IMAGE_EXPAND), tr("Create new group"), this, SLOT(createNewGroup()));
|
||||
QMenu *groupsMenu = contextMenu.addMenu(FilesDefs::getIconFromQtResourcePath(IMAGE_GROUP16), tr("Groups"));
|
||||
groupsMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_EXPAND), tr("Create new group"), this, SLOT(createNewGroup()));
|
||||
|
||||
if (addToGroupMenu || moveToGroupMenu || foundGroup) {
|
||||
if (addToGroupMenu) {
|
||||
@ -674,26 +676,26 @@ void NewFriendList::peerTreeWidgetCustomPopupMenu()
|
||||
case RsFriendListModel::ENTRY_TYPE_NODE:
|
||||
{
|
||||
#ifdef RS_DIRECT_CHAT
|
||||
contextMenu.addAction(QIcon(IMAGE_CHAT), tr("Chat"), this, SLOT(chatNode()));
|
||||
contextMenu.addAction(QIcon(IMAGE_MSG), tr("Send message to this node"), this, SLOT(msgNode()));
|
||||
contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_CHAT), tr("Chat"), this, SLOT(chatNode()));
|
||||
contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MSG), tr("Send message to this node"), this, SLOT(msgNode()));
|
||||
contextMenu.addSeparator();
|
||||
#endif // RS_DIRECT_CHAT
|
||||
|
||||
contextMenu.addAction(QIcon(IMAGE_FRIENDINFO), tr("Node details"), this, SLOT(configureNode()));
|
||||
contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_FRIENDINFO), tr("Node details"), this, SLOT(configureNode()));
|
||||
|
||||
if (type == RsFriendListModel::ENTRY_TYPE_PROFILE || type == RsFriendListModel::ENTRY_TYPE_NODE)
|
||||
contextMenu.addAction(QIcon(IMAGE_EXPORTFRIEND), tr("Recommend this node to..."), this, SLOT(recommendNode()));
|
||||
contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_EXPORTFRIEND), tr("Recommend this node to..."), this, SLOT(recommendNode()));
|
||||
|
||||
RsFriendListModel::RsNodeDetails details;
|
||||
mModel->getNodeData(index,details);
|
||||
|
||||
if(!rsPeers->isHiddenNode(rsPeers->getOwnId()) || rsPeers->isHiddenNode( details.id ))
|
||||
contextMenu.addAction(QIcon(IMAGE_CONNECT), tr("Attempt to connect"), this, SLOT(connectNode()));
|
||||
contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_CONNECT), tr("Attempt to connect"), this, SLOT(connectNode()));
|
||||
|
||||
contextMenu.addAction(QIcon(IMAGE_COPYLINK), tr("Copy certificate link"), this, SLOT(copyFullCertificate()));
|
||||
contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COPYLINK), tr("Copy certificate link"), this, SLOT(copyFullCertificate()));
|
||||
|
||||
//this is a SSL key
|
||||
contextMenu.addAction(QIcon(IMAGE_REMOVEFRIEND), tr("Remove Friend Node"), this, SLOT(removeNode()));
|
||||
contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_REMOVEFRIEND), tr("Remove Friend Node"), this, SLOT(removeNode()));
|
||||
|
||||
}
|
||||
}
|
||||
@ -702,12 +704,12 @@ void NewFriendList::peerTreeWidgetCustomPopupMenu()
|
||||
|
||||
contextMenu.addSeparator();
|
||||
|
||||
QAction *action = contextMenu.addAction(QIcon(IMAGE_PASTELINK), tr("Paste certificate link"), this, SLOT(pastePerson()));
|
||||
QAction *action = contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_PASTELINK), tr("Paste certificate link"), this, SLOT(pastePerson()));
|
||||
if (RSLinkClipboard::empty(RetroShareLink::TYPE_CERTIFICATE))
|
||||
action->setDisabled(true);
|
||||
|
||||
contextMenu.addAction(QIcon(IMAGE_EXPAND), tr("Expand all"), ui->peerTreeWidget, SLOT(expandAll()));
|
||||
contextMenu.addAction(QIcon(IMAGE_COLLAPSE), tr("Collapse all"), ui->peerTreeWidget, SLOT(collapseAll()));
|
||||
contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_EXPAND), tr("Expand all"), ui->peerTreeWidget, SLOT(expandAll()));
|
||||
contextMenu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COLLAPSE), tr("Collapse all"), ui->peerTreeWidget, SLOT(collapseAll()));
|
||||
|
||||
contextMenu.addSeparator();
|
||||
|
||||
@ -1087,16 +1089,46 @@ void NewFriendList::removeGroup()
|
||||
checkInternalData(true);
|
||||
}
|
||||
|
||||
void NewFriendList::checkInternalData(bool force)
|
||||
void NewFriendList::applyWhileKeepingTree(std::function<void()> predicate)
|
||||
{
|
||||
std::set<QString> expanded_indexes;
|
||||
std::set<QString> selected_indexes;
|
||||
|
||||
saveExpandedPathsAndSelection(expanded_indexes, selected_indexes);
|
||||
|
||||
mModel->checkInternalData(force);
|
||||
// This is a hack to avoid crashes on windows while calling endInsertRows(). I'm not sure wether these crashes are
|
||||
// due to a Qt bug, or a misuse of the proxy model on my side. Anyway, this solves them for good.
|
||||
// As a side effect we need to save/restore hidden columns because setSourceModel() resets this setting.
|
||||
|
||||
// save hidden columns and sizes
|
||||
std::vector<bool> col_visible(RsFriendListModel::COLUMN_THREAD_NB_COLUMNS);
|
||||
std::vector<int> col_sizes(RsFriendListModel::COLUMN_THREAD_NB_COLUMNS);
|
||||
|
||||
for(int i=0;i<RsFriendListModel::COLUMN_THREAD_NB_COLUMNS;++i)
|
||||
{
|
||||
col_visible[i] = !ui->peerTreeWidget->isColumnHidden(i);
|
||||
col_sizes[i] = ui->peerTreeWidget->columnWidth(i);
|
||||
}
|
||||
|
||||
|
||||
mProxyModel->setSourceModel(nullptr);
|
||||
|
||||
predicate();
|
||||
|
||||
mProxyModel->setSourceModel(mModel);
|
||||
restoreExpandedPathsAndSelection(expanded_indexes, selected_indexes);
|
||||
|
||||
// restore hidden columns
|
||||
for(uint32_t i=0;i<RsFriendListModel::COLUMN_THREAD_NB_COLUMNS;++i)
|
||||
{
|
||||
ui->peerTreeWidget->setColumnHidden(i,!col_visible[i]);
|
||||
ui->peerTreeWidget->setColumnWidth(i,col_sizes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void NewFriendList::checkInternalData(bool force)
|
||||
{
|
||||
applyWhileKeepingTree([force,this]() { mModel->checkInternalData(force) ; });
|
||||
}
|
||||
|
||||
void NewFriendList::exportFriendlistClicked()
|
||||
@ -1484,6 +1516,7 @@ bool NewFriendList::isColumnVisible(int col) const
|
||||
}
|
||||
void NewFriendList::setColumnVisible(int col,bool visible)
|
||||
{
|
||||
std::cerr << "Setting column " << col << " to be visible: " << visible << std::endl;
|
||||
ui->peerTreeWidget->setColumnHidden(col, !visible);
|
||||
}
|
||||
void NewFriendList::toggleColumnVisible()
|
||||
@ -1501,12 +1534,12 @@ void NewFriendList::toggleColumnVisible()
|
||||
|
||||
void NewFriendList::setShowState(bool show)
|
||||
{
|
||||
mModel->setDisplayStatusString(show);
|
||||
applyWhileKeepingTree([show,this]() { mModel->setDisplayStatusString(show) ; });
|
||||
}
|
||||
|
||||
void NewFriendList::setShowGroups(bool show)
|
||||
{
|
||||
mModel->setDisplayGroups(show);
|
||||
applyWhileKeepingTree([show,this]() { mModel->setDisplayGroups(show) ; });
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,8 +25,9 @@
|
||||
#include <QWidget>
|
||||
#include <QTreeView>
|
||||
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
|
||||
#include "FriendListModel.h"
|
||||
#include "RsAutoUpdatePage.h"
|
||||
#include "retroshare/rsstatus.h"
|
||||
|
||||
namespace Ui {
|
||||
@ -102,6 +103,8 @@ private:
|
||||
RsFriendListModel *mModel;
|
||||
QAction *mActionSortByState;
|
||||
|
||||
void applyWhileKeepingTree(std::function<void()> predicate);
|
||||
|
||||
void expandGroup(const RsNodeGroupId& gid);
|
||||
void recursRestoreExpandedItems(const QModelIndex& index, const QString& parent_path, const std::set<QString>& exp, const std::set<QString> &sel);
|
||||
void recursSaveExpandedItems(const QModelIndex& index,const QString& parent_path,std::set<QString>& exp, std::set<QString>& sel);
|
||||
|
@ -20,22 +20,23 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "FilesDefs.h"
|
||||
#include "PopularityDefs.h"
|
||||
|
||||
QIcon PopularityDefs::icon(int popularity)
|
||||
{
|
||||
if (popularity <= 1)
|
||||
return QIcon(":/images/hot_0.png");
|
||||
return FilesDefs::getIconFromQtResourcePath(":/images/hot_0.png");
|
||||
else if (popularity <= 2) /* 1-1 */
|
||||
return QIcon(":/images/hot_1.png");
|
||||
return FilesDefs::getIconFromQtResourcePath(":/images/hot_1.png");
|
||||
else if (popularity <= 5) /* 2-2 */
|
||||
return QIcon(":/images/hot_2.png");
|
||||
return FilesDefs::getIconFromQtResourcePath(":/images/hot_2.png");
|
||||
else if (popularity <= 10) /* 3-5 */
|
||||
return QIcon(":/images/hot_3.png");
|
||||
return FilesDefs::getIconFromQtResourcePath(":/images/hot_3.png");
|
||||
else if (popularity <= 20) /* 6-10 */
|
||||
return QIcon(":/images/hot_4.png");
|
||||
return FilesDefs::getIconFromQtResourcePath(":/images/hot_4.png");
|
||||
else /* >10 */
|
||||
return QIcon(":/images/hot_5.png");
|
||||
return FilesDefs::getIconFromQtResourcePath(":/images/hot_5.png");
|
||||
}
|
||||
|
||||
QString PopularityDefs::tooltip(int popularity)
|
||||
|
@ -18,6 +18,7 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "RsCollectionDialog.h"
|
||||
|
||||
#include "RsCollection.h"
|
||||
@ -254,7 +255,7 @@ void RsCollectionDialog::openDestinationDirectoryMenu()
|
||||
contextMnu.addAction(QString::fromUtf8((*it).filename.c_str()), this, SLOT(setDestinationDirectory()))->setData(QString::fromUtf8( (*it).filename.c_str() ) ) ;
|
||||
}
|
||||
|
||||
contextMnu.addAction( QIcon(IMAGE_SEARCH),tr("Specify..."),this,SLOT(chooseDestinationDirectory()));
|
||||
contextMnu.addAction( FilesDefs::getIconFromQtResourcePath(IMAGE_SEARCH),tr("Specify..."),this,SLOT(chooseDestinationDirectory()));
|
||||
|
||||
contextMnu.exec(QCursor::pos()) ;
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include <QMenu>
|
||||
|
||||
#include "SubscribeToolButton.h"
|
||||
@ -64,14 +65,14 @@ void SubscribeToolButton::updateUi()
|
||||
#else
|
||||
setPopupMode(QToolButton::InstantPopup);
|
||||
#endif
|
||||
//setIcon(QIcon(":/images/accepted16.png"));
|
||||
//setIcon(FilesDefs::getIconFromQtResourcePath(":/images/accepted16.png"));
|
||||
setText(tr("Subscribed"));
|
||||
|
||||
if(mMenu != NULL) // that's because setMenu does not give away memory ownership
|
||||
delete mMenu ;
|
||||
|
||||
mMenu = new QMenu;
|
||||
mMenu->addAction(QIcon(":/images/cancel.png"), tr("Unsubscribe"), this, SLOT(unsubscribePrivate()));
|
||||
mMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/images/cancel.png"), tr("Unsubscribe"), this, SLOT(unsubscribePrivate()));
|
||||
|
||||
if (!mSubscribedActions.empty()) {
|
||||
mMenu->addSeparator();
|
||||
@ -86,7 +87,7 @@ void SubscribeToolButton::updateUi()
|
||||
} else {
|
||||
setPopupMode(QToolButton::DelayedPopup);
|
||||
setMenu(NULL);
|
||||
//setIcon(QIcon(":/images/RSS_004_32.png"));
|
||||
//setIcon(FilesDefs::getIconFromQtResourcePath(":/images/RSS_004_32.png"));
|
||||
setText(tr("Subscribe"));
|
||||
|
||||
#ifndef USE_MENUBUTTONPOPUP
|
||||
|
@ -32,6 +32,8 @@
|
||||
#include <retroshare/rsdisc.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
|
||||
#include <retroshare-gui/mainpage.h>
|
||||
|
||||
#include "gui/help/browser/helpbrowser.h"
|
||||
#include "gui/common/PeerDefs.h"
|
||||
#include "gui/common/StatusDefs.h"
|
||||
@ -39,7 +41,6 @@
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/common/AvatarDefs.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "mainpage.h"
|
||||
#include "util/DateTime.h"
|
||||
#include "util/misc.h"
|
||||
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <QUrlQuery>
|
||||
#endif
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "util/misc.h"
|
||||
#include "ConnectFriendWizard.h"
|
||||
@ -145,11 +146,11 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
|
||||
switch (rsFiles->filePermDirectDL())
|
||||
{
|
||||
case RS_FILE_PERM_DIRECT_DL_YES:
|
||||
ui->_direct_transfer_CB_2->setIcon(QIcon(":/icons/warning_yellow_128.png"));
|
||||
ui->_direct_transfer_CB_2->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/warning_yellow_128.png"));
|
||||
ui->_direct_transfer_CB_2->setToolTip(ui->_direct_transfer_CB_2->toolTip().append(tr("\nWarning: In your File-Transfer option, you select allow direct download to Yes.")));
|
||||
break ;
|
||||
case RS_FILE_PERM_DIRECT_DL_NO:
|
||||
ui->_direct_transfer_CB_2->setIcon(QIcon(":/icons/warning_yellow_128.png"));
|
||||
ui->_direct_transfer_CB_2->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/warning_yellow_128.png"));
|
||||
ui->_direct_transfer_CB_2->setToolTip(ui->_direct_transfer_CB_2->toolTip().append(tr("\nWarning: In your File-Transfer option, you select allow direct download to No.")));
|
||||
break ;
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "PGPKeyDialog.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
@ -32,6 +33,8 @@
|
||||
#include <retroshare/rsdisc.h>
|
||||
#include <retroshare/rsmsgs.h>
|
||||
|
||||
#include <retroshare-gui/mainpage.h>
|
||||
|
||||
#include "gui/help/browser/helpbrowser.h"
|
||||
#include "gui/common/PeerDefs.h"
|
||||
#include "gui/common/StatusDefs.h"
|
||||
@ -39,7 +42,6 @@
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/common/AvatarDefs.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "mainpage.h"
|
||||
#include "util/DateTime.h"
|
||||
#include "util/misc.h"
|
||||
|
||||
@ -156,11 +158,11 @@ void PGPKeyDialog::load()
|
||||
switch (rsFiles->filePermDirectDL())
|
||||
{
|
||||
case RS_FILE_PERM_DIRECT_DL_YES:
|
||||
ui._direct_transfer_CB->setIcon(QIcon(":/icons/warning_yellow_128.png"));
|
||||
ui._direct_transfer_CB->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/warning_yellow_128.png"));
|
||||
ui._direct_transfer_CB->setToolTip(ui._direct_transfer_CB->toolTip().append(tr("\nWarning: In your File-Transfer option, you select allow direct download to Yes.")));
|
||||
break ;
|
||||
case RS_FILE_PERM_DIRECT_DL_NO:
|
||||
ui._direct_transfer_CB->setIcon(QIcon(":/icons/warning_yellow_128.png"));
|
||||
ui._direct_transfer_CB->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/warning_yellow_128.png"));
|
||||
ui._direct_transfer_CB->setToolTip(ui._direct_transfer_CB->toolTip().append(tr("\nWarning: In your File-Transfer option, you select allow direct download to No.")));
|
||||
break ;
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
// This code is inspired from http://doc.qt.io/qt-5/qtwidgets-graphicsview-elasticnodes-node-cpp.html
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include <math.h>
|
||||
|
||||
#include <QApplication>
|
||||
@ -366,11 +367,11 @@ void Node::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
||||
QMenu contextMnu ;
|
||||
|
||||
if(_type == GraphWidget::ELASTIC_NODE_TYPE_FRIEND)
|
||||
contextMnu.addAction(QIcon(IMAGE_DENIED), QObject::tr( "Deny friend" ), this, SLOT(denyFriend()) );
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_DENIED), QObject::tr( "Deny friend" ), this, SLOT(denyFriend()) );
|
||||
else if(_type != GraphWidget::ELASTIC_NODE_TYPE_OWN)
|
||||
contextMnu.addAction(QIcon(IMAGE_MAKEFRIEND), QObject::tr( "Make friend" ), this, SLOT(makeFriend()) );
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MAKEFRIEND), QObject::tr( "Make friend" ), this, SLOT(makeFriend()) );
|
||||
|
||||
contextMnu.addAction(QIcon(IMAGE_MAKEFRIEND), QObject::tr( "Peer details" ), this, SLOT(peerDetails()) );
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MAKEFRIEND), QObject::tr( "Peer details" ), this, SLOT(peerDetails()) );
|
||||
|
||||
contextMnu.exec(event->screenPos());
|
||||
}
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include "FeedHolder.h"
|
||||
#include "util/qtthreadsutils.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "gui/NewsFeed.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
|
||||
@ -187,13 +188,13 @@ void GxsChannelGroupItem::doExpand(bool open)
|
||||
if (open)
|
||||
{
|
||||
ui->expandFrame->show();
|
||||
ui->expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png")));
|
||||
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
|
||||
ui->expandButton->setToolTip(tr("Hide"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->expandFrame->hide();
|
||||
ui->expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png")));
|
||||
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/down-arrow.png")));
|
||||
ui->expandButton->setToolTip(tr("Expand"));
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "ui_GxsForumGroupItem.h"
|
||||
#include "gui/NewsFeed.h"
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "FeedHolder.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
#include "util/qtthreadsutils.h"
|
||||
@ -251,13 +252,13 @@ void GxsForumGroupItem::doExpand(bool open)
|
||||
if (open)
|
||||
{
|
||||
ui->expandFrame->show();
|
||||
ui->expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png")));
|
||||
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
|
||||
ui->expandButton->setToolTip(tr("Hide"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->expandFrame->hide();
|
||||
ui->expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png")));
|
||||
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/down-arrow.png")));
|
||||
ui->expandButton->setToolTip(tr("Expand"));
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
#include "FeedHolder.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "gui/gxs/GxsIdDetails.h"
|
||||
#include "util/HandleRichText.h"
|
||||
#include "util/qtthreadsutils.h"
|
||||
@ -421,7 +422,7 @@ void GxsForumMsgItem::doExpand(bool open)
|
||||
if (open)
|
||||
{
|
||||
ui->expandFrame->show();
|
||||
ui->expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png")));
|
||||
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
|
||||
ui->expandButton->setToolTip(tr("Hide"));
|
||||
|
||||
if (!mParentMessage.mMeta.mMsgId.isNull()) {
|
||||
@ -434,7 +435,7 @@ void GxsForumMsgItem::doExpand(bool open)
|
||||
{
|
||||
ui->expandFrame->hide();
|
||||
ui->parentFrame->hide();
|
||||
ui->expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png")));
|
||||
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/down-arrow.png")));
|
||||
ui->expandButton->setToolTip(tr("Expand"));
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "util/HandleRichText.h"
|
||||
#include "util/DateTime.h"
|
||||
#include "gui/common/AvatarDefs.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "gui/notifyqt.h"
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
@ -231,7 +232,7 @@ void MsgItem::doExpand(bool open)
|
||||
if (open)
|
||||
{
|
||||
expandFrame->show();
|
||||
expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png")));
|
||||
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
|
||||
expandButton->setToolTip(tr("Hide"));
|
||||
|
||||
mCloseOnRead = false;
|
||||
@ -241,7 +242,7 @@ void MsgItem::doExpand(bool open)
|
||||
else
|
||||
{
|
||||
expandFrame->hide();
|
||||
expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png")));
|
||||
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/down-arrow.png")));
|
||||
expandButton->setToolTip(tr("Expand"));
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "NewsFeedUserNotify.h"
|
||||
#include "gui/NewsFeed.h"
|
||||
|
||||
@ -37,7 +38,7 @@ void NewsFeedUserNotify::newsFeedChanged(int count)
|
||||
|
||||
QIcon NewsFeedUserNotify::getMainIcon(bool hasNew)
|
||||
{
|
||||
return hasNew ? QIcon(":/icons/png/newsfeed-notify.png") : QIcon(":/icons/png/newsfeed.png");
|
||||
return hasNew ? FilesDefs::getIconFromQtResourcePath(":/icons/png/newsfeed-notify.png") : FilesDefs::getIconFromQtResourcePath(":/icons/png/newsfeed.png");
|
||||
}
|
||||
|
||||
unsigned int NewsFeedUserNotify::getNewCount()
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "retroshare-gui/RsAutoUpdatePage.h"
|
||||
#include "gui/msgs/MessageComposer.h"
|
||||
#include "gui/common/StatusDefs.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "gui/common/AvatarDefs.h"
|
||||
#include "util/DateTime.h"
|
||||
|
||||
@ -243,13 +244,13 @@ void PeerItem::doExpand(bool open)
|
||||
if (open)
|
||||
{
|
||||
expandFrame->show();
|
||||
expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png")));
|
||||
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
|
||||
expandButton->setToolTip(tr("Hide"));
|
||||
}
|
||||
else
|
||||
{
|
||||
expandFrame->hide();
|
||||
expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png")));
|
||||
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/down-arrow.png")));
|
||||
expandButton->setToolTip(tr("Expand"));
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "util/qtthreadsutils.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
#include "gui/gxs/GxsIdDetails.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
/****
|
||||
* #define DEBUG_ITEM 1
|
||||
@ -204,13 +205,13 @@ void PostedGroupItem::doExpand(bool open)
|
||||
if (open)
|
||||
{
|
||||
ui->expandFrame->show();
|
||||
ui->expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png")));
|
||||
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
|
||||
ui->expandButton->setToolTip(tr("Hide"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->expandFrame->hide();
|
||||
ui->expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png")));
|
||||
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/down-arrow.png")));
|
||||
ui->expandButton->setToolTip(tr("Expand"));
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "util/DateTime.h"
|
||||
#include "gui/common/PeerDefs.h"
|
||||
#include "gui/common/RsBanListDefs.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsbanlist.h>
|
||||
@ -199,13 +200,13 @@ void SecurityIpItem::doExpand(bool open)
|
||||
if (open)
|
||||
{
|
||||
ui->expandFrame->show();
|
||||
ui->expandButton->setIcon(QIcon(":/icons/png/up-arrow.png"));
|
||||
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/up-arrow.png"));
|
||||
ui->expandButton->setToolTip(tr("Hide"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->expandFrame->hide();
|
||||
ui->expandButton->setIcon(QIcon(":/icons/png/down-arrow.png"));
|
||||
ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/png/down-arrow.png"));
|
||||
ui->expandButton->setToolTip(tr("Expand"));
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "gui/common/StatusDefs.h"
|
||||
#include "gui/connect/ConfCertDialog.h"
|
||||
#include "gui/connect/PGPKeyDialog.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "gui/connect/ConnectFriendWizard.h"
|
||||
#include "gui/common/AvatarDefs.h"
|
||||
#include "util/DateTime.h"
|
||||
@ -295,13 +296,13 @@ void SecurityItem::doExpand(bool open)
|
||||
if (open)
|
||||
{
|
||||
expandFrame->show();
|
||||
expandButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png")));
|
||||
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
|
||||
expandButton->setToolTip(tr("Hide"));
|
||||
}
|
||||
else
|
||||
{
|
||||
expandFrame->hide();
|
||||
expandButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png")));
|
||||
expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/down-arrow.png")));
|
||||
expandButton->setToolTip(tr("Expand"));
|
||||
}
|
||||
|
||||
|
@ -211,14 +211,14 @@ void GxsCommentTreeWidget::customPopUpMenu(const QPoint& /*point*/)
|
||||
contextMnu.addSeparator();
|
||||
QMenu *rep_menu = contextMnu.addMenu(tr("Reputation"));
|
||||
|
||||
action = rep_menu->addAction(QIcon(IMAGE_MESSAGE), tr("Show Reputation"), this, SLOT(showReputation()));
|
||||
action = rep_menu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MESSAGE), tr("Show Reputation"), this, SLOT(showReputation()));
|
||||
contextMnu.addSeparator();
|
||||
|
||||
action = rep_menu->addAction(QIcon(IMAGE_MESSAGE), tr("Interesting User"), this, SLOT(markInteresting()));
|
||||
action = rep_menu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MESSAGE), tr("Interesting User"), this, SLOT(markInteresting()));
|
||||
contextMnu.addSeparator();
|
||||
|
||||
action = rep_menu->addAction(QIcon(IMAGE_MESSAGE), tr("Mark Spammy"), this, SLOT(markSpammer()));
|
||||
action = rep_menu->addAction(QIcon(IMAGE_MESSAGE), tr("Ban User"), this, SLOT(banUser()));
|
||||
action = rep_menu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MESSAGE), tr("Mark Spammy"), this, SLOT(markSpammer()));
|
||||
action = rep_menu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MESSAGE), tr("Ban User"), this, SLOT(banUser()));
|
||||
*/
|
||||
}
|
||||
|
||||
|
@ -112,6 +112,12 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
|
@ -151,16 +151,16 @@ void GxsGroupFrameDialog::initUi()
|
||||
|
||||
/* Initialize group tree */
|
||||
QToolButton *newGroupButton = new QToolButton(this);
|
||||
newGroupButton->setIcon(QIcon(icon(ICON_NEW)));
|
||||
newGroupButton->setIcon(FilesDefs::getIconFromQtResourcePath(icon(ICON_NEW)));
|
||||
newGroupButton->setToolTip(text(TEXT_NEW));
|
||||
connect(newGroupButton, SIGNAL(clicked()), this, SLOT(newGroup()));
|
||||
ui->groupTreeWidget->addToolButton(newGroupButton);
|
||||
|
||||
/* Create group tree */
|
||||
mYourGroups = ui->groupTreeWidget->addCategoryItem(text(TEXT_YOUR_GROUP), QIcon(icon(ICON_YOUR_GROUP)), true);
|
||||
mSubscribedGroups = ui->groupTreeWidget->addCategoryItem(text(TEXT_SUBSCRIBED_GROUP), QIcon(icon(ICON_SUBSCRIBED_GROUP)), true);
|
||||
mPopularGroups = ui->groupTreeWidget->addCategoryItem(text(TEXT_POPULAR_GROUP), QIcon(icon(ICON_POPULAR_GROUP)), false);
|
||||
mOtherGroups = ui->groupTreeWidget->addCategoryItem(text(TEXT_OTHER_GROUP), QIcon(icon(ICON_OTHER_GROUP)), false);
|
||||
mYourGroups = ui->groupTreeWidget->addCategoryItem(text(TEXT_YOUR_GROUP), FilesDefs::getIconFromQtResourcePath(icon(ICON_YOUR_GROUP)), true);
|
||||
mSubscribedGroups = ui->groupTreeWidget->addCategoryItem(text(TEXT_SUBSCRIBED_GROUP), FilesDefs::getIconFromQtResourcePath(icon(ICON_SUBSCRIBED_GROUP)), true);
|
||||
mPopularGroups = ui->groupTreeWidget->addCategoryItem(text(TEXT_POPULAR_GROUP), FilesDefs::getIconFromQtResourcePath(icon(ICON_POPULAR_GROUP)), false);
|
||||
mOtherGroups = ui->groupTreeWidget->addCategoryItem(text(TEXT_OTHER_GROUP), FilesDefs::getIconFromQtResourcePath(icon(ICON_OTHER_GROUP)), false);
|
||||
|
||||
if (text(TEXT_TODO).isEmpty()) {
|
||||
ui->todoPushButton->hide();
|
||||
@ -410,8 +410,8 @@ void GxsGroupFrameDialog::groupTreeCustomPopupMenu(QPoint point)
|
||||
{
|
||||
QMenu contextMnu(this);
|
||||
|
||||
contextMnu.addAction(QIcon(IMAGE_DELETE), tr("Remove this search"), this, SLOT(removeCurrentSearch()))->setData(search_request_id);
|
||||
contextMnu.addAction(QIcon(IMAGE_DELETE), tr("Remove all searches"), this, SLOT(removeAllSearches()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_DELETE), tr("Remove this search"), this, SLOT(removeCurrentSearch()))->setData(search_request_id);
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_DELETE), tr("Remove all searches"), this, SLOT(removeAllSearches()));
|
||||
contextMnu.exec(QCursor::pos());
|
||||
return ;
|
||||
}
|
||||
@ -424,7 +424,7 @@ void GxsGroupFrameDialog::groupTreeCustomPopupMenu(QPoint point)
|
||||
{
|
||||
QMenu contextMnu(this);
|
||||
|
||||
contextMnu.addAction(QIcon(IMAGE_RETRIEVE), tr("Request data"), this, SLOT(distantRequestGroupData()))->setData(group_id_s);
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_RETRIEVE), tr("Request data"), this, SLOT(distantRequestGroupData()))->setData(group_id_s);
|
||||
contextMnu.exec(QCursor::pos());
|
||||
return ;
|
||||
}
|
||||
@ -442,27 +442,27 @@ void GxsGroupFrameDialog::groupTreeCustomPopupMenu(QPoint point)
|
||||
QMenu contextMnu(this);
|
||||
QAction *action;
|
||||
|
||||
action = contextMnu.addAction(QIcon(IMAGE_TABNEW), tr("Open in new tab"), this, SLOT(openInNewTab()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_TABNEW), tr("Open in new tab"), this, SLOT(openInNewTab()));
|
||||
|
||||
if(mGroupId.isNull()) // dont enable the open in tab if a tab is already here
|
||||
action->setEnabled(false);
|
||||
|
||||
if (isSubscribed) {
|
||||
action = contextMnu.addAction(QIcon(IMAGE_UNSUBSCRIBE), tr("Unsubscribe"), this, SLOT(unsubscribeGroup()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_UNSUBSCRIBE), tr("Unsubscribe"), this, SLOT(unsubscribeGroup()));
|
||||
action->setEnabled (!mGroupId.isNull() && IS_GROUP_SUBSCRIBED(subscribeFlags));
|
||||
} else {
|
||||
action = contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Subscribe"), this, SLOT(subscribeGroup()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_SUBSCRIBE), tr("Subscribe"), this, SLOT(subscribeGroup()));
|
||||
action->setDisabled (mGroupId.isNull() || IS_GROUP_SUBSCRIBED(subscribeFlags));
|
||||
}
|
||||
|
||||
contextMnu.addSeparator();
|
||||
|
||||
contextMnu.addAction(QIcon(icon(ICON_NEW)), text(TEXT_NEW), this, SLOT(newGroup()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(icon(ICON_NEW)), text(TEXT_NEW), this, SLOT(newGroup()));
|
||||
|
||||
action = contextMnu.addAction(QIcon(IMAGE_INFO), tr("Show Details"), this, SLOT(showGroupDetails()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_INFO), tr("Show Details"), this, SLOT(showGroupDetails()));
|
||||
action->setEnabled (!mGroupId.isNull());
|
||||
|
||||
action = contextMnu.addAction(QIcon(IMAGE_EDIT), tr("Edit Details"), this, SLOT(editGroupDetails()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_EDIT), tr("Edit Details"), this, SLOT(editGroupDetails()));
|
||||
action->setEnabled (!mGroupId.isNull() && isAdmin);
|
||||
|
||||
uint32_t current_store_time = checkDelay(mInterface->getStoragePeriod(mGroupId))/86400 ;
|
||||
@ -472,39 +472,39 @@ void GxsGroupFrameDialog::groupTreeCustomPopupMenu(QPoint point)
|
||||
QAction *actnn = NULL;
|
||||
|
||||
QMenu *ctxMenu2 = contextMnu.addMenu(tr("Synchronise posts of last...")) ;
|
||||
actnn = ctxMenu2->addAction(tr(" 5 days" ),this,SLOT(setSyncPostsDelay())) ; actnn->setData(QVariant( 5)) ; if(current_sync_time == 5) { actnn->setEnabled(false);actnn->setIcon(QIcon(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 2 weeks" ),this,SLOT(setSyncPostsDelay())) ; actnn->setData(QVariant( 15)) ; if(current_sync_time == 15) { actnn->setEnabled(false);actnn->setIcon(QIcon(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 1 month" ),this,SLOT(setSyncPostsDelay())) ; actnn->setData(QVariant( 30)) ; if(current_sync_time == 30) { actnn->setEnabled(false);actnn->setIcon(QIcon(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 3 months" ),this,SLOT(setSyncPostsDelay())) ; actnn->setData(QVariant( 90)) ; if(current_sync_time == 90) { actnn->setEnabled(false);actnn->setIcon(QIcon(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 6 months" ),this,SLOT(setSyncPostsDelay())) ; actnn->setData(QVariant(180)) ; if(current_sync_time ==180) { actnn->setEnabled(false);actnn->setIcon(QIcon(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 1 year " ),this,SLOT(setSyncPostsDelay())) ; actnn->setData(QVariant(365)) ; if(current_sync_time ==365) { actnn->setEnabled(false);actnn->setIcon(QIcon(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" Indefinitly"),this,SLOT(setSyncPostsDelay())) ; actnn->setData(QVariant( 0)) ; if(current_sync_time == 0) { actnn->setEnabled(false);actnn->setIcon(QIcon(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 5 days" ),this,SLOT(setSyncPostsDelay())) ; actnn->setData(QVariant( 5)) ; if(current_sync_time == 5) { actnn->setEnabled(false);actnn->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 2 weeks" ),this,SLOT(setSyncPostsDelay())) ; actnn->setData(QVariant( 15)) ; if(current_sync_time == 15) { actnn->setEnabled(false);actnn->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 1 month" ),this,SLOT(setSyncPostsDelay())) ; actnn->setData(QVariant( 30)) ; if(current_sync_time == 30) { actnn->setEnabled(false);actnn->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 3 months" ),this,SLOT(setSyncPostsDelay())) ; actnn->setData(QVariant( 90)) ; if(current_sync_time == 90) { actnn->setEnabled(false);actnn->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 6 months" ),this,SLOT(setSyncPostsDelay())) ; actnn->setData(QVariant(180)) ; if(current_sync_time ==180) { actnn->setEnabled(false);actnn->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 1 year " ),this,SLOT(setSyncPostsDelay())) ; actnn->setData(QVariant(365)) ; if(current_sync_time ==365) { actnn->setEnabled(false);actnn->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" Indefinitly"),this,SLOT(setSyncPostsDelay())) ; actnn->setData(QVariant( 0)) ; if(current_sync_time == 0) { actnn->setEnabled(false);actnn->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/start.png"));}
|
||||
|
||||
ctxMenu2 = contextMnu.addMenu(tr("Store posts for at most...")) ;
|
||||
actnn = ctxMenu2->addAction(tr(" 5 days" ),this,SLOT(setStorePostsDelay())) ; actnn->setData(QVariant( 5)) ; if(current_store_time == 5) { actnn->setEnabled(false);actnn->setIcon(QIcon(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 2 weeks" ),this,SLOT(setStorePostsDelay())) ; actnn->setData(QVariant( 15)) ; if(current_store_time == 15) { actnn->setEnabled(false);actnn->setIcon(QIcon(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 1 month" ),this,SLOT(setStorePostsDelay())) ; actnn->setData(QVariant( 30)) ; if(current_store_time == 30) { actnn->setEnabled(false);actnn->setIcon(QIcon(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 3 months" ),this,SLOT(setStorePostsDelay())) ; actnn->setData(QVariant( 90)) ; if(current_store_time == 90) { actnn->setEnabled(false);actnn->setIcon(QIcon(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 6 months" ),this,SLOT(setStorePostsDelay())) ; actnn->setData(QVariant(180)) ; if(current_store_time ==180) { actnn->setEnabled(false);actnn->setIcon(QIcon(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 1 year " ),this,SLOT(setStorePostsDelay())) ; actnn->setData(QVariant(365)) ; if(current_store_time ==365) { actnn->setEnabled(false);actnn->setIcon(QIcon(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" Indefinitly"),this,SLOT(setStorePostsDelay())) ; actnn->setData(QVariant( 0)) ; if(current_store_time == 0) { actnn->setEnabled(false);actnn->setIcon(QIcon(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 5 days" ),this,SLOT(setStorePostsDelay())) ; actnn->setData(QVariant( 5)) ; if(current_store_time == 5) { actnn->setEnabled(false);actnn->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 2 weeks" ),this,SLOT(setStorePostsDelay())) ; actnn->setData(QVariant( 15)) ; if(current_store_time == 15) { actnn->setEnabled(false);actnn->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 1 month" ),this,SLOT(setStorePostsDelay())) ; actnn->setData(QVariant( 30)) ; if(current_store_time == 30) { actnn->setEnabled(false);actnn->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 3 months" ),this,SLOT(setStorePostsDelay())) ; actnn->setData(QVariant( 90)) ; if(current_store_time == 90) { actnn->setEnabled(false);actnn->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 6 months" ),this,SLOT(setStorePostsDelay())) ; actnn->setData(QVariant(180)) ; if(current_store_time ==180) { actnn->setEnabled(false);actnn->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" 1 year " ),this,SLOT(setStorePostsDelay())) ; actnn->setData(QVariant(365)) ; if(current_store_time ==365) { actnn->setEnabled(false);actnn->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/start.png"));}
|
||||
actnn = ctxMenu2->addAction(tr(" Indefinitly"),this,SLOT(setStorePostsDelay())) ; actnn->setData(QVariant( 0)) ; if(current_store_time == 0) { actnn->setEnabled(false);actnn->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/start.png"));}
|
||||
|
||||
if (shareKeyType()) {
|
||||
action = contextMnu.addAction(QIcon(IMAGE_SHARE), tr("Share publish permissions..."), this, SLOT(sharePublishKey()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_SHARE), tr("Share publish permissions..."), this, SLOT(sharePublishKey()));
|
||||
action->setEnabled(!mGroupId.isNull() && isPublisher);
|
||||
}
|
||||
|
||||
if (getLinkType() != RetroShareLink::TYPE_UNKNOWN) {
|
||||
action = contextMnu.addAction(QIcon(IMAGE_COPYLINK), tr("Copy RetroShare Link"), this, SLOT(copyGroupLink()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_COPYLINK), tr("Copy RetroShare Link"), this, SLOT(copyGroupLink()));
|
||||
action->setEnabled(!mGroupId.isNull());
|
||||
}
|
||||
|
||||
contextMnu.addSeparator();
|
||||
|
||||
action = contextMnu.addAction(QIcon(":/images/message-mail-read.png"), tr("Mark all as read"), this, SLOT(markMsgAsRead()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/message-mail-read.png"), tr("Mark all as read"), this, SLOT(markMsgAsRead()));
|
||||
action->setEnabled (!mGroupId.isNull() && isSubscribed);
|
||||
|
||||
action = contextMnu.addAction(QIcon(":/images/message-mail.png"), tr("Mark all as unread"), this, SLOT(markMsgAsUnread()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/message-mail.png"), tr("Mark all as unread"), this, SLOT(markMsgAsUnread()));
|
||||
action->setEnabled (!mGroupId.isNull() && isSubscribed);
|
||||
|
||||
/* Add special actions */
|
||||
@ -739,7 +739,7 @@ void GxsGroupFrameDialog::loadComment(const RsGxsGroupId &grpId, const QVector<R
|
||||
commentDialog->commentLoad(grpId, msgv,most_recent_msgId);
|
||||
|
||||
int index = ui->messageTabWidget->addTab(commentDialog, comments);
|
||||
ui->messageTabWidget->setTabIcon(index, QIcon(IMAGE_COMMENT));
|
||||
ui->messageTabWidget->setTabIcon(index, FilesDefs::getIconFromQtResourcePath(IMAGE_COMMENT));
|
||||
}
|
||||
|
||||
ui->messageTabWidget->setCurrentWidget(commentDialog);
|
||||
@ -956,12 +956,12 @@ void GxsGroupFrameDialog::groupInfoToGroupItemInfo(const RsGxsGenericGroupData *
|
||||
#if TOGXS
|
||||
if (groupInfo.mGroupFlags & RS_DISTRIB_AUTHEN_REQ) {
|
||||
groupItemInfo.name += " (" + tr("AUTHD") + ")";
|
||||
groupItemInfo.icon = QIcon(IMAGE_GROUPAUTHD);
|
||||
groupItemInfo.icon = FilesDefs::getIconFromQtResourcePath(IMAGE_GROUPAUTHD);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
groupItemInfo.icon = QIcon(icon(ICON_DEFAULT));
|
||||
groupItemInfo.icon = FilesDefs::getIconFromQtResourcePath(icon(ICON_DEFAULT));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1209,7 +1209,7 @@ void GxsGroupFrameDialog::searchNetwork(const QString& search_string)
|
||||
if(request_id == 0)
|
||||
return ;
|
||||
|
||||
mSearchGroupsItems[request_id] = ui->groupTreeWidget->addSearchItem(tr("Search for")+ " \"" + search_string + "\"",(uint32_t)request_id,QIcon(icon(ICON_SEARCH)));
|
||||
mSearchGroupsItems[request_id] = ui->groupTreeWidget->addSearchItem(tr("Search for")+ " \"" + search_string + "\"",(uint32_t)request_id,FilesDefs::getIconFromQtResourcePath(icon(ICON_SEARCH)));
|
||||
}
|
||||
|
||||
void GxsGroupFrameDialog::distantRequestGroupData()
|
||||
|
@ -21,8 +21,9 @@
|
||||
#ifndef _GXSGROUPFRAMEDIALOG_H
|
||||
#define _GXSGROUPFRAMEDIALOG_H
|
||||
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
|
||||
#include "gui/gxs/RsGxsUpdateBroadcastPage.h"
|
||||
#include "RsAutoUpdatePage.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "util/RsUserdata.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "GxsIdDetails.h"
|
||||
#include "RsGxsUpdateBroadcastBase.h"
|
||||
#include "gui/Identity/IdEditDialog.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "util/misc.h"
|
||||
|
||||
#include <retroshare/rspeers.h>
|
||||
@ -162,7 +163,7 @@ static void loadPrivateIdsCallback(GxsIdDetailsType type, const RsIdentityDetail
|
||||
break;
|
||||
|
||||
case GXS_ID_DETAILS_TYPE_BANNED:
|
||||
icons.push_back(QIcon(BANNED_ICON)) ;
|
||||
icons.push_back(FilesDefs::getIconFromQtResourcePath(BANNED_ICON)) ;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -285,7 +286,7 @@ void GxsIdChooser::loadPrivateIds()
|
||||
QString str = tr("Create new Identity");
|
||||
QString id = "";
|
||||
|
||||
addItem(QIcon(":/icons/png/add-identity.png"), str, id);
|
||||
addItem(FilesDefs::getIconFromQtResourcePath(":/icons/png/add-identity.png"), str, id);
|
||||
setItemData(count() - 1, QString("%1_%2").arg(TYPE_CREATE_ID).arg(str), ROLE_SORT);
|
||||
setItemData(count() - 1, TYPE_CREATE_ID, ROLE_TYPE);
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "GxsIdDetails.h"
|
||||
|
||||
#include "gui/common/AvatarDialog.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "retroshare-gui/RsAutoUpdatePage.h"
|
||||
|
||||
#include <retroshare/rspeers.h>
|
||||
@ -375,10 +376,10 @@ static bool findTagIcon(int tag_class, int /*tag_type*/, QIcon &icon)
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
icon = QIcon(IMAGE_DEV_AMBASSADOR);
|
||||
icon = FilesDefs::getIconFromQtResourcePath(IMAGE_DEV_AMBASSADOR);
|
||||
break;
|
||||
case 1:
|
||||
icon = QIcon(IMAGE_DEV_CONTRIBUTOR);
|
||||
icon = FilesDefs::getIconFromQtResourcePath(IMAGE_DEV_CONTRIBUTOR);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@ -974,7 +975,7 @@ QString GxsIdDetails::getNameForType(GxsIdDetailsType type, const RsIdentityDeta
|
||||
|
||||
QIcon GxsIdDetails::getLoadingIcon(const RsGxsId &/*id*/)
|
||||
{
|
||||
return QIcon(IMAGE_LOADING);
|
||||
return FilesDefs::getIconFromQtResourcePath(IMAGE_LOADING);
|
||||
}
|
||||
|
||||
bool GxsIdDetails::MakeIdDesc(const RsGxsId &id, bool doIcons, QString &str, QList<QIcon> &icons, QString& comment,uint32_t icon_types)
|
||||
@ -1005,9 +1006,9 @@ bool GxsIdDetails::MakeIdDesc(const RsGxsId &id, bool doIcons, QString &str, QLi
|
||||
|
||||
// Cyril: I disabled these three which I believe to have been put for testing purposes.
|
||||
//
|
||||
// icons.push_back(QIcon(IMAGE_ANON));
|
||||
// icons.push_back(QIcon(IMAGE_ANON));
|
||||
// icons.push_back(QIcon(IMAGE_ANON));
|
||||
// icons.push_back(FilesDefs::getIconFromQtResourcePath(IMAGE_ANON));
|
||||
// icons.push_back(FilesDefs::getIconFromQtResourcePath(IMAGE_ANON));
|
||||
// icons.push_back(FilesDefs::getIconFromQtResourcePath(IMAGE_ANON));
|
||||
|
||||
// std::cerr << "GxsIdTreeWidget::MakeIdDesc() ID Ok. Comment: " << comment.toStdString() ;
|
||||
// std::cerr << std::endl;
|
||||
@ -1083,20 +1084,20 @@ QIcon GxsIdDetails::getReputationIcon(
|
||||
RsReputationLevel icon_index, uint32_t min_reputation )
|
||||
{
|
||||
if( static_cast<uint32_t>(icon_index) >= min_reputation )
|
||||
return QIcon(REPUTATION_VOID);
|
||||
return FilesDefs::getIconFromQtResourcePath(REPUTATION_VOID);
|
||||
|
||||
switch(icon_index)
|
||||
{
|
||||
case RsReputationLevel::LOCALLY_NEGATIVE:
|
||||
return QIcon(REPUTATION_LOCALLY_NEGATIVE_ICON);
|
||||
return FilesDefs::getIconFromQtResourcePath(REPUTATION_LOCALLY_NEGATIVE_ICON);
|
||||
case RsReputationLevel::LOCALLY_POSITIVE:
|
||||
return QIcon(REPUTATION_LOCALLY_POSITIVE_ICON);
|
||||
return FilesDefs::getIconFromQtResourcePath(REPUTATION_LOCALLY_POSITIVE_ICON);
|
||||
case RsReputationLevel::REMOTELY_POSITIVE:
|
||||
return QIcon(REPUTATION_REMOTELY_POSITIVE_ICON);
|
||||
return FilesDefs::getIconFromQtResourcePath(REPUTATION_REMOTELY_POSITIVE_ICON);
|
||||
case RsReputationLevel::REMOTELY_NEGATIVE:
|
||||
return QIcon(REPUTATION_REMOTELY_NEGATIVE_ICON);
|
||||
return FilesDefs::getIconFromQtResourcePath(REPUTATION_REMOTELY_NEGATIVE_ICON);
|
||||
case RsReputationLevel::NEUTRAL:
|
||||
return QIcon(REPUTATION_NEUTRAL_ICON);
|
||||
return FilesDefs::getIconFromQtResourcePath(REPUTATION_NEUTRAL_ICON);
|
||||
default:
|
||||
std::cerr << "Asked for unidentified icon index "
|
||||
<< static_cast<uint32_t>(icon_index) << std::endl;
|
||||
@ -1112,7 +1113,7 @@ void GxsIdDetails::getIcons(const RsIdentityDetails &details, QList<QIcon> &icon
|
||||
RsReputationLevel::LOCALLY_NEGATIVE )
|
||||
{
|
||||
icons.clear() ;
|
||||
icons.push_back(QIcon(IMAGE_BANNED)) ;
|
||||
icons.push_back(FilesDefs::getIconFromQtResourcePath(IMAGE_BANNED)) ;
|
||||
return ;
|
||||
}
|
||||
|
||||
@ -1141,12 +1142,12 @@ void GxsIdDetails::getIcons(const RsIdentityDetails &details, QList<QIcon> &icon
|
||||
if (details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED)
|
||||
{
|
||||
if (details.mFlags & RS_IDENTITY_FLAGS_PGP_KNOWN)
|
||||
baseIcon = QIcon(IMAGE_PGPKNOWN);
|
||||
baseIcon = FilesDefs::getIconFromQtResourcePath(IMAGE_PGPKNOWN);
|
||||
else
|
||||
baseIcon = QIcon(IMAGE_PGPUNKNOWN);
|
||||
baseIcon = FilesDefs::getIconFromQtResourcePath(IMAGE_PGPUNKNOWN);
|
||||
}
|
||||
else
|
||||
baseIcon = QIcon(IMAGE_ANON);
|
||||
baseIcon = FilesDefs::getIconFromQtResourcePath(IMAGE_ANON);
|
||||
|
||||
icons.push_back(baseIcon);
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ static void fillGxsIdRSTreeWidgetItemCallback(GxsIdDetailsType type, const RsIde
|
||||
break;
|
||||
|
||||
case GXS_ID_DETAILS_TYPE_BANNED:
|
||||
icons.push_back(QIcon("BANNED_IMAGE")) ;
|
||||
icons.push_back(FilesDefs::getIconFromQtResourcePath("BANNED_IMAGE")) ;
|
||||
break ;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "mainpage.h"
|
||||
#include <retroshare-gui/mainpage.h>
|
||||
#include <retroshare/rsgxsifacetypes.h>
|
||||
|
||||
// This class implement a basic RS functionality which is that widgets displaying info
|
||||
|
@ -122,9 +122,9 @@ void CreateGxsChannelMsg::contextMenu(QPoint /*point*/)
|
||||
|
||||
QAction *action ;
|
||||
if(n_file > 1)
|
||||
action = contextMnu.addAction(QIcon(":/images/pasterslink.png"), tr("Paste RetroShare Links"), this, SLOT(pasteLink()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/pasterslink.png"), tr("Paste RetroShare Links"), this, SLOT(pasteLink()));
|
||||
else
|
||||
action = contextMnu.addAction(QIcon(":/images/pasterslink.png"), tr("Paste RetroShare Link"), this, SLOT(pasteLink()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/pasterslink.png"), tr("Paste RetroShare Link"), this, SLOT(pasteLink()));
|
||||
|
||||
action->setDisabled(n_file < 1) ;
|
||||
contextMnu.exec(QCursor::pos());
|
||||
|
@ -108,6 +108,7 @@ QString GxsChannelDialog::getHelpString() const
|
||||
<p>Channels can be made anonymous, or attached to a Retroshare identity so that readers can contact you if needed.\
|
||||
Enable \"Allow Comments\" if you want to let users comment on your posts.</p>\
|
||||
<p>Channel posts are kept for %1 days, and sync-ed over the last %2 days, unless you change this.</p>\
|
||||
<p>UI Tip: use Control + mouse wheel to control image size in the thumbnail view.</p>\
|
||||
").arg(QString::number(rsGxsChannels->getDefaultStoragePeriod()/86400)).arg(QString::number(rsGxsChannels->getDefaultSyncPeriod()/86400));
|
||||
|
||||
return hlp_str ;
|
||||
@ -251,8 +252,8 @@ void GxsChannelDialog::groupTreeCustomActions(RsGxsGroupId grpId, int subscribeF
|
||||
|
||||
if (isSubscribed)
|
||||
{
|
||||
QAction *action = autoDownload ? (new QAction(QIcon(":/images/redled.png"), tr("Disable Auto-Download"), this))
|
||||
: (new QAction(QIcon(":/images/start.png"),tr("Enable Auto-Download"), this));
|
||||
QAction *action = autoDownload ? (new QAction(FilesDefs::getIconFromQtResourcePath(":/images/redled.png"), tr("Disable Auto-Download"), this))
|
||||
: (new QAction(FilesDefs::getIconFromQtResourcePath(":/images/start.png"),tr("Enable Auto-Download"), this));
|
||||
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(toggleAutoDownload()));
|
||||
actions.append(action);
|
||||
@ -263,7 +264,7 @@ void GxsChannelDialog::groupTreeCustomActions(RsGxsGroupId grpId, int subscribeF
|
||||
QMenu *mnu = new QMenu(tr("Set download directory")) ;
|
||||
|
||||
if(dl_directory.empty())
|
||||
mnu->addAction(QIcon(":/images/start.png"),tr("[Default directory]"), this, SLOT(setDefaultDirectory())) ;
|
||||
mnu->addAction(FilesDefs::getIconFromQtResourcePath(":/images/start.png"),tr("[Default directory]"), this, SLOT(setDefaultDirectory())) ;
|
||||
else
|
||||
mnu->addAction(tr("[Default directory]"), this, SLOT(setDefaultDirectory())) ;
|
||||
|
||||
@ -277,7 +278,7 @@ void GxsChannelDialog::groupTreeCustomActions(RsGxsGroupId grpId, int subscribeF
|
||||
|
||||
if(dl_directory == it->filename)
|
||||
{
|
||||
action = new QAction(QIcon(":/images/start.png"),QString::fromUtf8(it->filename.c_str()),NULL) ;
|
||||
action = new QAction(FilesDefs::getIconFromQtResourcePath(":/images/start.png"),QString::fromUtf8(it->filename.c_str()),NULL) ;
|
||||
found = true ;
|
||||
}
|
||||
else
|
||||
@ -291,7 +292,7 @@ void GxsChannelDialog::groupTreeCustomActions(RsGxsGroupId grpId, int subscribeF
|
||||
|
||||
if(!found && !dl_directory.empty())
|
||||
{
|
||||
QAction *action = new QAction(QIcon(":/images/start.png"),QString::fromUtf8(dl_directory.c_str()),NULL) ;
|
||||
QAction *action = new QAction(FilesDefs::getIconFromQtResourcePath(":/images/start.png"),QString::fromUtf8(dl_directory.c_str()),NULL) ;
|
||||
connect(action,SIGNAL(triggered()),this,SLOT(setDownloadDirectory())) ;
|
||||
action->setData(QString::fromUtf8(dl_directory.c_str())) ;
|
||||
|
||||
@ -391,7 +392,7 @@ void GxsChannelDialog::groupInfoToGroupItemInfo(const RsGxsGenericGroupData *gro
|
||||
groupItemInfo.icon = image;
|
||||
}
|
||||
else
|
||||
groupItemInfo.icon = QIcon(":icons/png/channel.png");
|
||||
groupItemInfo.icon = FilesDefs::getIconFromQtResourcePath(":icons/png/channel.png");
|
||||
|
||||
groupItemInfo.description = QString::fromUtf8(channelGroupData->mDescription.c_str());
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ void RsGxsChannelPostsModel::setFilter(const QStringList& strings, uint32_t& cou
|
||||
if(strings.empty())
|
||||
{
|
||||
mFilteredPosts.clear();
|
||||
for(int i=0;i<mPosts.size();++i)
|
||||
for(size_t i=0;i<mPosts.size();++i)
|
||||
mFilteredPosts.push_back(i);
|
||||
}
|
||||
else
|
||||
@ -179,7 +179,7 @@ void RsGxsChannelPostsModel::setFilter(const QStringList& strings, uint32_t& cou
|
||||
mFilteredPosts.clear();
|
||||
//mFilteredPosts.push_back(0);
|
||||
|
||||
for(int i=0;i<mPosts.size();++i)
|
||||
for(size_t i=0;i<mPosts.size();++i)
|
||||
{
|
||||
bool passes_strings = true;
|
||||
|
||||
@ -281,7 +281,7 @@ bool RsGxsChannelPostsModel::convertRefPointerToTabEntry(quintptr ref, uint32_t&
|
||||
|
||||
QModelIndex RsGxsChannelPostsModel::index(int row, int column, const QModelIndex & parent) const
|
||||
{
|
||||
if(row < 0 || column < 0 || column >= mColumns)
|
||||
if(row < 0 || column < 0 || column >= (int)mColumns)
|
||||
return QModelIndex();
|
||||
|
||||
quintptr ref = getChildRef(parent.internalId(),column + row*mColumns);
|
||||
@ -684,7 +684,19 @@ void RsGxsChannelPostsModel::createPostsArray(std::vector<RsGxsChannelPost>& pos
|
||||
}
|
||||
}
|
||||
|
||||
void RsGxsChannelPostsModel::setMsgReadStatus(const QModelIndex& i,bool read_status,bool with_children)
|
||||
void RsGxsChannelPostsModel::setAllMsgReadStatus(bool read_status)
|
||||
{
|
||||
// No need to call preMods()/postMods() here because we're not changing the model
|
||||
// All operations below are done async
|
||||
|
||||
RsThread::async([this, read_status]()
|
||||
{
|
||||
for(uint32_t i=0;i<mPosts.size();++i)
|
||||
rsGxsChannels->markRead(RsGxsGrpMsgIdPair(mPosts[i].mMeta.mGroupId,mPosts[i].mMeta.mMsgId),read_status);
|
||||
});
|
||||
}
|
||||
|
||||
void RsGxsChannelPostsModel::setMsgReadStatus(const QModelIndex& i,bool read_status)
|
||||
{
|
||||
if(!i.isValid())
|
||||
return ;
|
||||
@ -697,10 +709,7 @@ void RsGxsChannelPostsModel::setMsgReadStatus(const QModelIndex& i,bool read_sta
|
||||
if(!convertRefPointerToTabEntry(ref,entry) || entry >= mFilteredPosts.size())
|
||||
return ;
|
||||
|
||||
#warning TODO
|
||||
// bool has_unread_below, has_read_below;
|
||||
// recursSetMsgReadStatus(entry,read_status,with_children) ;
|
||||
// recursUpdateReadStatusAndTimes(0,has_unread_below,has_read_below);
|
||||
rsGxsChannels->markRead(RsGxsGrpMsgIdPair(mPosts[mFilteredPosts[entry]].mMeta.mGroupId,mPosts[mFilteredPosts[entry]].mMeta.mMsgId),read_status);
|
||||
}
|
||||
|
||||
QModelIndex RsGxsChannelPostsModel::getIndexOfMessage(const RsGxsMessageId& mid) const
|
||||
|
@ -127,7 +127,9 @@ public:
|
||||
void setTextColorMissing (QColor color) { mTextColorMissing = color;}
|
||||
#endif
|
||||
|
||||
void setMsgReadStatus(const QModelIndex &i, bool read_status, bool with_children);
|
||||
void setMsgReadStatus(const QModelIndex &i, bool read_status);
|
||||
void setAllMsgReadStatus(bool read_status);
|
||||
|
||||
void setFilter(const QStringList &strings, uint32_t &count) ;
|
||||
|
||||
#ifdef TODO
|
||||
|
@ -220,11 +220,11 @@ void GxsChannelPostsWidget::groupNameChanged(const QString &name)
|
||||
QIcon GxsChannelPostsWidget::groupIcon()
|
||||
{
|
||||
if (mStateHelper->isLoading(mTokenTypeGroupData) || mStateHelper->isLoading(mTokenTypeAllPosts)) {
|
||||
return QIcon(":/images/kalarm.png");
|
||||
return FilesDefs::getIconFromQtResourcePath(":/images/kalarm.png");
|
||||
}
|
||||
|
||||
// if (mNewCount) {
|
||||
// return QIcon(":/images/message-state-new.png");
|
||||
// return FilesDefs::getIconFromQtResourcePath(":/images/message-state-new.png");
|
||||
// }
|
||||
|
||||
return QIcon();
|
||||
|
@ -102,7 +102,6 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
|
||||
|
||||
RsGxsChannelPost post = index.data(Qt::UserRole).value<RsGxsChannelPost>() ;
|
||||
|
||||
painter->save();
|
||||
painter->fillRect( option.rect, option.backgroundBrush);
|
||||
painter->restore();
|
||||
|
||||
@ -246,7 +245,7 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
|
||||
ui->channelPostFiles_TV->sortByColumn(0, Qt::AscendingOrder);
|
||||
|
||||
ui->channelFiles_TV->setModel(mChannelFilesModel = new RsGxsChannelPostFilesModel());
|
||||
ui->channelFiles_TV->setItemDelegate(new ChannelPostFilesDelegate());
|
||||
ui->channelFiles_TV->setItemDelegate(mFilesDelegate = new ChannelPostFilesDelegate());
|
||||
ui->channelFiles_TV->setPlaceholderText(tr("No files in the channel, or no channel selected"));
|
||||
ui->channelFiles_TV->setSortingEnabled(true);
|
||||
ui->channelFiles_TV->sortByColumn(0, Qt::AscendingOrder);
|
||||
@ -632,6 +631,7 @@ GxsChannelPostsWidgetWithModel::~GxsChannelPostsWidgetWithModel()
|
||||
processSettings(false);
|
||||
|
||||
delete(mAutoDownloadAction);
|
||||
delete mFilesDelegate;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@ -1148,6 +1148,7 @@ public:
|
||||
uint32_t mLastToken;
|
||||
};
|
||||
|
||||
#ifdef TO_REMOVE
|
||||
static void setAllMessagesReadCallback(FeedItem *feedItem, void *data)
|
||||
{
|
||||
GxsChannelPostItem *channelPostItem = dynamic_cast<GxsChannelPostItem*>(feedItem);
|
||||
@ -1164,16 +1165,15 @@ static void setAllMessagesReadCallback(FeedItem *feedItem, void *data)
|
||||
RsGxsGrpMsgIdPair msgPair = std::make_pair(channelPostItem->groupId(), channelPostItem->messageId());
|
||||
rsGxsChannels->setMessageReadStatus(readData->mLastToken, msgPair, readData->mRead);
|
||||
}
|
||||
#endif
|
||||
|
||||
void GxsChannelPostsWidgetWithModel::setAllMessagesReadDo(bool read, uint32_t &token)
|
||||
void GxsChannelPostsWidgetWithModel::setAllMessagesReadDo(bool read, uint32_t& /*token*/)
|
||||
{
|
||||
if (groupId().isNull() || !IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags)) {
|
||||
if (groupId().isNull() || !IS_GROUP_SUBSCRIBED(mGroup.mMeta.mSubscribeFlags))
|
||||
return;
|
||||
}
|
||||
|
||||
GxsChannelPostsReadData data(read);
|
||||
//ui->feedWidget->withAll(setAllMessagesReadCallback, &data);
|
||||
|
||||
token = data.mLastToken;
|
||||
|
||||
QModelIndex src_index;
|
||||
|
||||
mChannelPostsModel->setAllMsgReadStatus(read);
|
||||
}
|
||||
|
||||
|
@ -174,6 +174,7 @@ private:
|
||||
RsGxsChannelPostFilesModel *mChannelPostFilesModel;
|
||||
RsGxsChannelPostFilesModel *mChannelFilesModel;
|
||||
ChannelPostDelegate *mChannelPostsDelegate;
|
||||
ChannelPostFilesDelegate *mFilesDelegate;
|
||||
|
||||
RsGxsMessageId mSelectedPost;
|
||||
|
||||
|
@ -775,7 +775,7 @@ void GxsForumThreadWidget::togglethreadview_internal()
|
||||
ui->expandButton->setToolTip(tr("Hide"));
|
||||
// } else {
|
||||
// ui->postText->setVisible(false);
|
||||
// ui->expandButton->setIcon(QIcon(QString(":/images/edit_add24.png")));
|
||||
// ui->expandButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/images/edit_add24.png")));
|
||||
// ui->expandButton->setToolTip(tr("Expand"));
|
||||
// }
|
||||
}
|
||||
|
@ -228,8 +228,8 @@ void GxsForumsDialog::groupInfoToGroupItemInfo(const RsGxsGenericGroupData *grou
|
||||
groupItemInfo.description = QString::fromUtf8(forumGroupData->mDescription.c_str());
|
||||
|
||||
if(IS_GROUP_ADMIN(groupData->mMeta.mSubscribeFlags))
|
||||
groupItemInfo.icon = QIcon(":icons/png/forums.png");
|
||||
groupItemInfo.icon = FilesDefs::getIconFromQtResourcePath(":icons/png/forums.png");
|
||||
else if ((IS_GROUP_PGP_AUTHED(groupData->mMeta.mSignFlags)) || (IS_GROUP_MESSAGE_TRACKING(groupData->mMeta.mSignFlags)) )
|
||||
groupItemInfo.icon = QIcon(":icons/png/forums-signed.png");
|
||||
groupItemInfo.icon = FilesDefs::getIconFromQtResourcePath(":icons/png/forums-signed.png");
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include <QMessageBox>
|
||||
#include <QCloseEvent>
|
||||
#include <QClipboard>
|
||||
@ -696,7 +697,7 @@ void MessageComposer::contextMenuFileList(QPoint)
|
||||
{
|
||||
QMenu contextMnu(this);
|
||||
|
||||
QAction *action = contextMnu.addAction(QIcon(":/images/pasterslink.png"), tr("Paste RetroShare Link"), this, SLOT(pasteRecommended()));
|
||||
QAction *action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/pasterslink.png"), tr("Paste RetroShare Link"), this, SLOT(pasteRecommended()));
|
||||
action->setDisabled(RSLinkClipboard::empty(RetroShareLink::TYPE_FILE));
|
||||
|
||||
contextMnu.exec(QCursor::pos());
|
||||
@ -805,7 +806,7 @@ void MessageComposer::peerStatusChanged(const QString& peer_id, int status)
|
||||
{
|
||||
QTableWidgetItem *item = ui.recipientWidget->item(row, COLUMN_RECIPIENT_ICON);
|
||||
if (item)
|
||||
item->setIcon(QIcon(StatusDefs::imageUser(status)));
|
||||
item->setIcon(FilesDefs::getIconFromQtResourcePath(StatusDefs::imageUser(status)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1606,7 +1607,7 @@ void MessageComposer::setRecipientToRow(int row, enumType type, destinationType
|
||||
switch(dest_type)
|
||||
{
|
||||
case PEER_TYPE_GROUP: {
|
||||
icon = QIcon(IMAGE_GROUP16);
|
||||
icon = FilesDefs::getIconFromQtResourcePath(IMAGE_GROUP16);
|
||||
|
||||
RsGroupInfo groupInfo;
|
||||
if (rsPeers->getGroupInfo(RsNodeGroupId(id), groupInfo)) {
|
||||
@ -1652,7 +1653,7 @@ void MessageComposer::setRecipientToRow(int row, enumType type, destinationType
|
||||
// No check of return value. Non existing status info is handled as offline.
|
||||
rsStatus->getStatus(RsPeerId(id), peerStatusInfo);
|
||||
|
||||
icon = QIcon(StatusDefs::imageUser(peerStatusInfo.status));
|
||||
icon = FilesDefs::getIconFromQtResourcePath(StatusDefs::imageUser(peerStatusInfo.status));
|
||||
}
|
||||
break ;
|
||||
default:
|
||||
@ -1928,7 +1929,7 @@ void MessageComposer::setupFileActions()
|
||||
connect(a, SIGNAL(triggered()), this, SLOT(filePrint()));
|
||||
menu->addAction(a);
|
||||
|
||||
/*a = new QAction(QIcon(":/images/textedit/fileprint.png"), tr("Print Preview..."), this);
|
||||
/*a = new QAction(FilesDefs::getIconFromQtResourcePath(":/images/textedit/fileprint.png"), tr("Print Preview..."), this);
|
||||
connect(a, SIGNAL(triggered()), this, SLOT(filePrintPreview()));
|
||||
menu->addAction(a);*/
|
||||
|
||||
@ -2021,7 +2022,7 @@ void MessageComposer::setupContactActions()
|
||||
connect(mActionAddBCC, SIGNAL(triggered(bool)), this, SLOT(addBcc()));
|
||||
mActionAddRecommend = new QAction(tr("Add as Recommend"), this);
|
||||
connect(mActionAddRecommend, SIGNAL(triggered(bool)), this, SLOT(addRecommend()));
|
||||
mActionContactDetails = new QAction(QIcon(IMAGE_FRIENDINFO), tr("Details"), this);
|
||||
mActionContactDetails = new QAction(FilesDefs::getIconFromQtResourcePath(IMAGE_FRIENDINFO), tr("Details"), this);
|
||||
connect(mActionContactDetails, SIGNAL(triggered(bool)), this, SLOT(contactDetails()));
|
||||
|
||||
ui.friendSelectionWidget->addContextMenuAction(mActionAddTo);
|
||||
@ -2435,9 +2436,9 @@ void MessageComposer::on_contactsdockWidget_visibilityChanged(bool visible)
|
||||
void MessageComposer::updatecontactsviewicons()
|
||||
{
|
||||
if(!ui.contactsdockWidget->isVisible()){
|
||||
ui.actionContactsView->setIcon(QIcon(":/icons/mail/contacts.png"));
|
||||
ui.actionContactsView->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/mail/contacts.png"));
|
||||
}else{
|
||||
ui.actionContactsView->setIcon(QIcon(":/icons/mail/contacts.png"));
|
||||
ui.actionContactsView->setIcon(FilesDefs::getIconFromQtResourcePath(":/icons/mail/contacts.png"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "MessageUserNotify.h"
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/MainWindow.h"
|
||||
@ -40,12 +41,12 @@ bool MessageUserNotify::hasSetting(QString *name, QString *group)
|
||||
|
||||
QIcon MessageUserNotify::getIcon()
|
||||
{
|
||||
return QIcon(":/icons/png/messages.png");
|
||||
return FilesDefs::getIconFromQtResourcePath(":/icons/png/messages.png");
|
||||
}
|
||||
|
||||
QIcon MessageUserNotify::getMainIcon(bool hasNew)
|
||||
{
|
||||
return hasNew ? QIcon(":/icons/png/messages-notify.png") : QIcon(":/icons/png/messages.png");
|
||||
return hasNew ? FilesDefs::getIconFromQtResourcePath(":/icons/png/messages-notify.png") : FilesDefs::getIconFromQtResourcePath(":/icons/png/messages.png");
|
||||
}
|
||||
|
||||
unsigned int MessageUserNotify::getNewCount()
|
||||
|
@ -315,8 +315,8 @@ void MessageWidget::msgfilelistWidgetCostumPopupMenu( QPoint /*point*/ )
|
||||
{
|
||||
QMenu contextMnu(this);
|
||||
|
||||
contextMnu.addAction(QIcon(IMAGE_DOWNLOAD), tr("Download"), this, SLOT(getcurrentrecommended()));
|
||||
contextMnu.addAction(QIcon(IMAGE_DOWNLOADALL), tr("Download all"), this, SLOT(getallrecommended()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_DOWNLOAD), tr("Download"), this, SLOT(getcurrentrecommended()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_DOWNLOADALL), tr("Download all"), this, SLOT(getallrecommended()));
|
||||
|
||||
contextMnu.exec(QCursor::pos());
|
||||
}
|
||||
@ -328,10 +328,10 @@ void MessageWidget::togglefileview(bool noUpdate/*=false*/)
|
||||
*/
|
||||
|
||||
if (ui.expandFilesButton->isChecked()) {
|
||||
ui.expandFilesButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png")));
|
||||
ui.expandFilesButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/down-arrow.png")));
|
||||
ui.expandFilesButton->setToolTip(tr("Hide the attachment pane"));
|
||||
} else {
|
||||
ui.expandFilesButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png")));
|
||||
ui.expandFilesButton->setIcon(FilesDefs::getIconFromQtResourcePath(QString(":/icons/png/up-arrow.png")));
|
||||
ui.expandFilesButton->setToolTip(tr("Show the attachment pane"));
|
||||
}
|
||||
if (!noUpdate)
|
||||
|
@ -18,6 +18,7 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "MessageWindow.h"
|
||||
#include "MessageWidget.h"
|
||||
#include "MessageComposer.h"
|
||||
@ -180,12 +181,12 @@ void MessageWindow::setupFileActions()
|
||||
menuBar()->addMenu(menu);
|
||||
|
||||
actionSaveAs = menu->addAction(tr("Save &As File"));
|
||||
actionPrint = menu->addAction(QIcon(":/images/textedit/fileprint.png"), tr("&Print..."));
|
||||
actionPrint = menu->addAction(FilesDefs::getIconFromQtResourcePath(":/images/textedit/fileprint.png"), tr("&Print..."));
|
||||
actionPrint->setShortcut(QKeySequence::Print);
|
||||
|
||||
actionPrintPreview = menu->addAction(QIcon(":/images/textedit/fileprint.png"), tr("Print Preview..."));
|
||||
actionPrintPreview = menu->addAction(FilesDefs::getIconFromQtResourcePath(":/images/textedit/fileprint.png"), tr("Print Preview..."));
|
||||
|
||||
// a = new QAction(QIcon(":/images/textedit/exportpdf.png"), tr("&Export PDF..."), this);
|
||||
// a = new QAction(FilesDefs::getIconFromQtResourcePath(":/images/textedit/exportpdf.png"), tr("&Export PDF..."), this);
|
||||
// a->setShortcut(Qt::CTRL + Qt::Key_D);
|
||||
// connect(a, SIGNAL(triggered()), this, SLOT(filePrintPdf()));
|
||||
// menu->addAction(a);
|
||||
|
@ -422,7 +422,7 @@ void MessagesDialog::fillQuickView()
|
||||
|
||||
// add static items
|
||||
item = new QListWidgetItem(tr("Starred"), ui.quickViewWidget);
|
||||
item->setIcon(QIcon(IMAGE_STAR_ON));
|
||||
item->setIcon(FilesDefs::getIconFromQtResourcePath(IMAGE_STAR_ON));
|
||||
item->setData(ROLE_QUICKVIEW_TYPE, QUICKVIEW_TYPE_STATIC);
|
||||
item->setData(ROLE_QUICKVIEW_ID, QUICKVIEW_STATIC_ID_STARRED);
|
||||
item->setData(ROLE_QUICKVIEW_TEXT, item->text()); // for updateMessageSummaryList
|
||||
@ -432,7 +432,7 @@ void MessagesDialog::fillQuickView()
|
||||
}
|
||||
|
||||
item = new QListWidgetItem(tr("System"), ui.quickViewWidget);
|
||||
item->setIcon(QIcon(IMAGE_NOTFICATION));
|
||||
item->setIcon(FilesDefs::getIconFromQtResourcePath(IMAGE_NOTFICATION));
|
||||
item->setData(ROLE_QUICKVIEW_TYPE, QUICKVIEW_TYPE_STATIC);
|
||||
item->setData(ROLE_QUICKVIEW_ID, QUICKVIEW_STATIC_ID_SYSTEM);
|
||||
item->setData(ROLE_QUICKVIEW_TEXT, item->text()); // for updateMessageSummaryList
|
||||
@ -442,7 +442,7 @@ void MessagesDialog::fillQuickView()
|
||||
}
|
||||
|
||||
item = new QListWidgetItem(tr("Spam"), ui.quickViewWidget);
|
||||
item->setIcon(QIcon(IMAGE_SPAM_ON));
|
||||
item->setIcon(FilesDefs::getIconFromQtResourcePath(IMAGE_SPAM_ON));
|
||||
item->setData(ROLE_QUICKVIEW_TYPE, QUICKVIEW_TYPE_STATIC);
|
||||
item->setData(ROLE_QUICKVIEW_ID, QUICKVIEW_STATIC_ID_SPAM);
|
||||
item->setData(ROLE_QUICKVIEW_TEXT, item->text()); // for updateMessageSummaryList
|
||||
@ -452,7 +452,7 @@ void MessagesDialog::fillQuickView()
|
||||
}
|
||||
|
||||
item = new QListWidgetItem(tr("Attachment"), ui.quickViewWidget);
|
||||
item->setIcon(QIcon(IMAGE_ATTACHMENT));
|
||||
item->setIcon(FilesDefs::getIconFromQtResourcePath(IMAGE_ATTACHMENT));
|
||||
item->setData(ROLE_QUICKVIEW_TYPE, QUICKVIEW_TYPE_STATIC);
|
||||
item->setData(ROLE_QUICKVIEW_ID, QUICKVIEW_STATIC_ID_ATTACHMENT);
|
||||
item->setData(ROLE_QUICKVIEW_TEXT, item->text()); // for updateMessageSummaryList
|
||||
@ -584,13 +584,13 @@ void MessagesDialog::messageTreeWidgetCustomPopupMenu(QPoint /*point*/)
|
||||
|
||||
QMenu contextMnu( this );
|
||||
|
||||
QAction *action = contextMnu.addAction(QIcon(":/images/view_split_top_bottom.png"), tr("Open in a new window"), this, SLOT(openAsWindow()));
|
||||
QAction *action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/view_split_top_bottom.png"), tr("Open in a new window"), this, SLOT(openAsWindow()));
|
||||
|
||||
if (nCount != 1) {
|
||||
action->setDisabled(true);
|
||||
}
|
||||
|
||||
action = contextMnu.addAction(QIcon(":/images/tab-dock.png"), tr("Open in a new tab"), this, SLOT(openAsTab()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/tab-dock.png"), tr("Open in a new tab"), this, SLOT(openAsTab()));
|
||||
if (nCount != 1) {
|
||||
action->setDisabled(true);
|
||||
}
|
||||
@ -608,12 +608,12 @@ void MessagesDialog::messageTreeWidgetCustomPopupMenu(QPoint /*point*/)
|
||||
|
||||
contextMnu.addSeparator();
|
||||
|
||||
action = contextMnu.addAction(QIcon(":/images/message-mail-read.png"), tr("Mark as read"), this, SLOT(markAsRead()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/message-mail-read.png"), tr("Mark as read"), this, SLOT(markAsRead()));
|
||||
if (itemsUnread.isEmpty()) {
|
||||
action->setDisabled(true);
|
||||
}
|
||||
|
||||
action = contextMnu.addAction(QIcon(":/images/message-mail.png"), tr("Mark as unread"), this, SLOT(markAsUnread()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/message-mail.png"), tr("Mark as unread"), this, SLOT(markAsUnread()));
|
||||
|
||||
if (itemsRead.isEmpty()) {
|
||||
action->setDisabled(true);
|
||||
@ -647,7 +647,7 @@ void MessagesDialog::messageTreeWidgetCustomPopupMenu(QPoint /*point*/)
|
||||
action->setDisabled(true);
|
||||
}
|
||||
|
||||
action = contextMnu.addAction(QIcon(IMAGE_MESSAGEREMOVE), (nCount > 1) ? tr("Remove Messages") : tr("Remove Message"), this, SLOT(removemessage()));
|
||||
action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MESSAGEREMOVE), (nCount > 1) ? tr("Remove Messages") : tr("Remove Message"), this, SLOT(removemessage()));
|
||||
if (nCount == 0) {
|
||||
action->setDisabled(true);
|
||||
}
|
||||
@ -674,11 +674,11 @@ void MessagesDialog::messageTreeWidgetCustomPopupMenu(QPoint /*point*/)
|
||||
{
|
||||
std::cerr << "Src ID = " << msgInfo.rsgxsid_srcId << std::endl;
|
||||
|
||||
contextMnu.addAction(QIcon(IMAGE_AUTHOR_INFO),tr("Show author in People"),this,SLOT(showAuthorInPeopleTab()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_AUTHOR_INFO),tr("Show author in People"),this,SLOT(showAuthorInPeopleTab()));
|
||||
contextMnu.addSeparator();
|
||||
}
|
||||
|
||||
contextMnu.addAction(QIcon(IMAGE_MESSAGE), tr("New Message"), this, SLOT(newmessage()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_MESSAGE), tr("New Message"), this, SLOT(newmessage()));
|
||||
|
||||
contextMnu.exec(QCursor::pos());
|
||||
}
|
||||
@ -767,7 +767,7 @@ void MessagesDialog::openAsTab()
|
||||
return;
|
||||
}
|
||||
|
||||
ui.tabWidget->addTab(msgWidget,QIcon(IMAGE_MAIL), msgWidget->subject(true));
|
||||
ui.tabWidget->addTab(msgWidget,FilesDefs::getIconFromQtResourcePath(IMAGE_MAIL), msgWidget->subject(true));
|
||||
ui.tabWidget->setCurrentWidget(msgWidget);
|
||||
connect(msgWidget, SIGNAL(messageRemoved()), this, SLOT(messageRemoved()));
|
||||
|
||||
@ -1284,7 +1284,7 @@ void MessagesDialog::updateMessageSummaryList()
|
||||
QFont qf = item->font();
|
||||
qf.setBold(true);
|
||||
item->setFont(qf);
|
||||
item->setIcon(QIcon(":/images/folder-inbox-new.png"));
|
||||
item->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/folder-inbox-new.png"));
|
||||
item->setData(Qt::ForegroundRole, mTextColorInbox);
|
||||
}
|
||||
else
|
||||
@ -1294,7 +1294,7 @@ void MessagesDialog::updateMessageSummaryList()
|
||||
QFont qf = item->font();
|
||||
qf.setBold(false);
|
||||
item->setFont(qf);
|
||||
item->setIcon(QIcon(":/images/folder-inbox.png"));
|
||||
item->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/folder-inbox.png"));
|
||||
item->setData(Qt::ForegroundRole, QVariant());
|
||||
}
|
||||
|
||||
@ -1553,6 +1553,6 @@ void MessagesDialog::updateInterface()
|
||||
else
|
||||
{
|
||||
ui.tabWidget->setTabText(0, tr("No Box selected."));
|
||||
ui.tabWidget->setTabIcon(0, QIcon(":/icons/warning_yellow_128.png"));
|
||||
ui.tabWidget->setTabIcon(0, FilesDefs::getIconFromQtResourcePath(":/icons/warning_yellow_128.png"));
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,8 @@
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
#include "mainpage.h"
|
||||
#include <retroshare-gui/mainpage.h>
|
||||
|
||||
#include "ui_MessagesDialog.h"
|
||||
|
||||
#define IMAGE_MESSAGES ":/icons/png/message.png"
|
||||
|
@ -18,6 +18,7 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include <retroshare/rsgxsifacehelper.h>
|
||||
|
||||
#include <QInputDialog>
|
||||
@ -32,7 +33,7 @@
|
||||
#include <retroshare/rsidentity.h>
|
||||
#include <util/rsdir.h>
|
||||
|
||||
#include "RsAutoUpdatePage.h"
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
|
||||
#include "MainWindow.h"
|
||||
#include "toaster/OnlineToaster.h"
|
||||
@ -276,7 +277,7 @@ bool NotifyQt::askForPluginConfirmation(const std::string& plugin_file_name, con
|
||||
text += "</UL>" ;
|
||||
|
||||
dialog.setText(text) ;
|
||||
dialog.setWindowIcon(QIcon(":/icons/logo_128.png"));
|
||||
dialog.setWindowIcon(FilesDefs::getIconFromQtResourcePath(":/icons/logo_128.png"));
|
||||
dialog.setStandardButtons(QMessageBox::Yes | QMessageBox::No) ;
|
||||
|
||||
int ret = dialog.exec();
|
||||
|
@ -19,6 +19,7 @@
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include <rshare.h>
|
||||
#include <util/rsrandom.h>
|
||||
#include <retroshare/rsinit.h>
|
||||
@ -67,7 +68,7 @@ void ProfileManager::identityTreeWidgetCostumPopupMenu(QPoint)
|
||||
|
||||
QMenu contextMnu(this);
|
||||
|
||||
QAction *action = contextMnu.addAction(QIcon(IMAGE_EXPORT), tr("Export Identity"), this, SLOT(exportIdentity()));
|
||||
QAction *action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_EXPORT), tr("Export Identity"), this, SLOT(exportIdentity()));
|
||||
action->setEnabled(item != NULL);
|
||||
|
||||
contextMnu.exec(QCursor::pos());
|
||||
|
@ -928,3 +928,9 @@ MessagesDialog QWidget#messageTreeWidget::item:hover {
|
||||
GxsForumThreadWidget QWidget#threadTreeWidget::item {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
PulseTopLevel QFrame#frame, PulseViewGroup QFrame#frame, PulseReply QFrame#frame {
|
||||
border: 2px solid #7ecbfb;
|
||||
border-radius: 6px;
|
||||
background: white;
|
||||
}
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "gui/statusbar/SoundStatus.h"
|
||||
#include "gui/statusbar/ToasterDisable.h"
|
||||
#include "gui/statusbar/SysTrayStatus.h"
|
||||
#include "gui/common/FilesDefs.h"
|
||||
|
||||
/** Constructor */
|
||||
AppearancePage::AppearancePage(QWidget * parent, Qt::WindowFlags flags)
|
||||
@ -69,7 +70,7 @@ AppearancePage::AppearancePage(QWidget * parent, Qt::WindowFlags flags)
|
||||
|
||||
/* Populate combo boxes */
|
||||
foreach (QString code, LanguageSupport::languageCodes()) {
|
||||
ui.cmboLanguage->addItem(QIcon(":/images/flags/" + code + ".png"), LanguageSupport::languageName(code), code);
|
||||
ui.cmboLanguage->addItem(FilesDefs::getIconFromQtResourcePath(":/images/flags/" + code + ".png"), LanguageSupport::languageName(code), code);
|
||||
}
|
||||
foreach (QString style, QStyleFactory::keys()) {
|
||||
ui.cmboStyle->addItem(style, style.toLower());
|
||||
|
@ -19,6 +19,7 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include "FileAssociationsPage.h"
|
||||
#include "AddFileAssociationDialog.h"
|
||||
//#include "rshare.h" // for Rshare::dataDirectory() method
|
||||
@ -60,19 +61,19 @@ FileAssociationsPage::FileAssociationsPage(QWidget * parent, Qt::WindowFlags fla
|
||||
QVBoxLayout* pageLay = new QVBoxLayout(this);
|
||||
|
||||
toolBar = new QToolBar("actions", this);
|
||||
newAction = new QAction(QIcon(":/icons/png/add.png"), tr("&New"), this);
|
||||
newAction = new QAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/add.png"), tr("&New"), this);
|
||||
//newAction->setShortcut(tr("Ctrl+N"));
|
||||
newAction->setStatusTip(tr("Add new Association"));
|
||||
connect(newAction, SIGNAL(triggered()), this, SLOT(addnew()));
|
||||
toolBar->addAction(newAction);
|
||||
|
||||
editAction = new QAction(QIcon(":/images/kcmsystem24.png"),
|
||||
editAction = new QAction(FilesDefs::getIconFromQtResourcePath(":/images/kcmsystem24.png"),
|
||||
tr("&Edit"), this);
|
||||
editAction->setStatusTip(tr("Edit this Association"));
|
||||
connect(editAction, SIGNAL(triggered()), this, SLOT(edit()));
|
||||
toolBar->addAction(editAction);
|
||||
|
||||
removeAction = new QAction(QIcon(":/images/edit_remove24.png"),
|
||||
removeAction = new QAction(FilesDefs::getIconFromQtResourcePath(":/images/edit_remove24.png"),
|
||||
tr("&Remove"), this);
|
||||
removeAction->setStatusTip(tr("Remove this Association"));
|
||||
connect(removeAction, SIGNAL(triggered()), this, SLOT(remove()));
|
||||
|
@ -1352,7 +1352,7 @@ void ServerPage::updateInProxyIndicator()
|
||||
return ;
|
||||
|
||||
//ui.iconlabel_tor_incoming->setPixmap(QPixmap(ICON_STATUS_UNKNOWN)) ;
|
||||
//ui.testIncomingTor_PB->setIcon(QIcon(":/loader/circleball-16.gif")) ;
|
||||
//ui.testIncomingTor_PB->setIcon(FilesDefs::getIconFromQtResourcePath(":/loader/circleball-16.gif")) ;
|
||||
QMovie *movie = new QMovie(":/images/loader/circleball-16.gif");
|
||||
ui.iconlabel_service_incoming->setMovie(movie);
|
||||
movie->start();
|
||||
@ -1846,11 +1846,11 @@ void ServerPage::updateInProxyIndicatorResult(bool success)
|
||||
|
||||
ui.iconlabel_service_incoming->setPixmap(QPixmap(ICON_STATUS_OK)) ;
|
||||
ui.iconlabel_service_incoming->setToolTip(tr("You are reachable through the hidden service.")) ;
|
||||
//ui.testIncomingTor_PB->setIcon(QIcon(ICON_STATUS_OK)) ;
|
||||
//ui.testIncomingTor_PB->setIcon(FilesDefs::getIconFromQtResourcePath(ICON_STATUS_OK)) ;
|
||||
} else {
|
||||
std::cerr <<"Failed!" << std::endl;
|
||||
|
||||
//ui.testIncomingTor_PB->setIcon(QIcon(ICON_STATUS_UNKNOWN)) ;
|
||||
//ui.testIncomingTor_PB->setIcon(FilesDefs::getIconFromQtResourcePath(ICON_STATUS_UNKNOWN)) ;
|
||||
ui.iconlabel_service_incoming->setPixmap(QPixmap(ICON_STATUS_UNKNOWN)) ;
|
||||
ui.iconlabel_service_incoming->setToolTip(tr("The proxy is not enabled or broken.\nAre all services up and running fine??\nAlso check your ports!")) ;
|
||||
}
|
||||
|
@ -21,10 +21,12 @@
|
||||
#ifndef RSETTINGSWIN_HPP_
|
||||
#define RSETTINGSWIN_HPP_
|
||||
|
||||
#include "gui/common/FilesDefs.h"
|
||||
#include <QDialog>
|
||||
#include <retroshare-gui/configpage.h>
|
||||
#include <retroshare-gui/mainpage.h>
|
||||
|
||||
#include "ui_settingsw.h"
|
||||
#include "mainpage.h"
|
||||
|
||||
class FloatingHelpBrowser;
|
||||
|
||||
@ -44,7 +46,7 @@ public:
|
||||
|
||||
void postModDirectories(bool update_local);
|
||||
|
||||
virtual QIcon iconPixmap() const { return QIcon(IMAGE_PREFERENCES) ; } //MainPage
|
||||
virtual QIcon iconPixmap() const { return FilesDefs::getIconFromQtResourcePath(IMAGE_PREFERENCES) ; } //MainPage
|
||||
virtual QString pageName() const { return tr("Preferences") ; } //MainPage
|
||||
|
||||
protected:
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include <QAbstractItemDelegate>
|
||||
|
||||
#include "RsAutoUpdatePage.h"
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
#include "gui/common/RSGraphWidget.h"
|
||||
#include "ui_BwCtrlWindow.h"
|
||||
|
||||
|
@ -21,7 +21,8 @@
|
||||
#ifndef RSDHT_WINDOW_H
|
||||
#define RSDHT_WINDOW_H
|
||||
|
||||
#include "RsAutoUpdatePage.h"
|
||||
#include <retroshare-gui/RsAutoUpdatePage.h>
|
||||
|
||||
#include "ui_DhtWindow.h"
|
||||
|
||||
class DhtWindow : public RsAutoUpdatePage/*, public Ui::DhtWindow*/ {
|
||||
|
@ -126,7 +126,7 @@ void GlobalRouterStatistics::CustomPopupMenu( QPoint )
|
||||
|
||||
QTreeWidgetItem *item = treeWidget->currentItem();
|
||||
if (item) {
|
||||
contextMnu.addAction(QIcon(":/images/info16.png"), tr("Details"), this, SLOT(personDetails()));
|
||||
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(":/images/info16.png"), tr("Details"), this, SLOT(personDetails()));
|
||||
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user