mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
merge upstream/master
This commit is contained in:
commit
47dd44292a
@ -124,10 +124,13 @@ void DistantChatService::handleRecvChatStatusItem(RsChatStatusItem *cs)
|
||||
std::cerr << "DistantChatService::handleRecvChatStatusItem(): received keep alive packet for inactive chat! peerId=" << cs->PeerId() << std::endl;
|
||||
}
|
||||
|
||||
bool DistantChatService::acceptDataFromPeer(const RsGxsId& gxs_id,const RsGxsTunnelId& tunnel_id)
|
||||
bool DistantChatService::acceptDataFromPeer(const RsGxsId& gxs_id,const RsGxsTunnelId& tunnel_id,bool is_client_side)
|
||||
{
|
||||
bool res = true ;
|
||||
|
||||
if(is_client_side) // always accept distant chat when we're the client side.
|
||||
return true ;
|
||||
|
||||
if(mDistantChatPermissions & RS_DISTANT_CHAT_CONTACT_PERMISSION_FLAG_FILTER_NON_CONTACTS)
|
||||
res = (rsIdentity!=NULL) && rsIdentity->isARegularContact(gxs_id) ;
|
||||
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
virtual void connectToGxsTunnelService(RsGxsTunnelService *tunnel_service) ;
|
||||
|
||||
private:
|
||||
virtual bool acceptDataFromPeer(const RsGxsId& gxs_id,const RsGxsTunnelService::RsGxsTunnelId& tunnel_id) ;
|
||||
virtual bool acceptDataFromPeer(const RsGxsId& gxs_id, const RsGxsTunnelService::RsGxsTunnelId& tunnel_id, bool is_client_side) ;
|
||||
virtual void notifyTunnelStatus(const RsGxsTunnelService::RsGxsTunnelId& tunnel_id,uint32_t tunnel_status) ;
|
||||
virtual void receiveData(const RsGxsTunnelService::RsGxsTunnelId& id,unsigned char *data,uint32_t data_size) ;
|
||||
|
||||
|
@ -349,6 +349,7 @@ void p3GxsTunnelService::handleRecvTunnelDataItem(const RsGxsTunnelId& tunnel_id
|
||||
|
||||
RsGxsTunnelClientService *service = NULL ;
|
||||
RsGxsId peer_from ;
|
||||
bool is_client_side = false ;
|
||||
|
||||
{
|
||||
RS_STACK_MUTEX(mGxsTunnelMtx); /********** STACK LOCKED MTX ******/
|
||||
@ -367,6 +368,7 @@ void p3GxsTunnelService::handleRecvTunnelDataItem(const RsGxsTunnelId& tunnel_id
|
||||
{
|
||||
it2->second.client_services.insert(item->service_id) ;
|
||||
peer_from = it2->second.to_gxs_id ;
|
||||
is_client_side = (it2->second.direction == RsTurtleGenericDataItem::DIRECTION_CLIENT);
|
||||
}
|
||||
|
||||
// Check if the item has already been received. This is necessary because we actually re-send items until an ACK is received. If the ACK gets lost (connection interrupted) the
|
||||
@ -380,7 +382,7 @@ void p3GxsTunnelService::handleRecvTunnelDataItem(const RsGxsTunnelId& tunnel_id
|
||||
it2->second.received_data_prints[item->unique_item_counter] = time(NULL) ;
|
||||
}
|
||||
|
||||
if(service->acceptDataFromPeer(peer_from,tunnel_id))
|
||||
if(service->acceptDataFromPeer(peer_from,tunnel_id,is_client_side))
|
||||
service->receiveData(tunnel_id,item->data,item->data_size) ;
|
||||
|
||||
item->data = NULL ; // avoids deletion, since the client has the memory now
|
||||
@ -1474,6 +1476,7 @@ bool p3GxsTunnelService::getTunnelInfo(const RsGxsTunnelId& tunnel_id,GxsTunnelI
|
||||
info.tunnel_status = it->second.status;
|
||||
info.total_size_sent = it->second.total_sent;
|
||||
info.total_size_received= it->second.total_received;
|
||||
info.is_client_side = (it->second.direction == RsTurtleGenericTunnelItem::DIRECTION_CLIENT);
|
||||
|
||||
// Data packets
|
||||
|
||||
|
@ -183,8 +183,10 @@ void pqistreamer::updateRates()
|
||||
|
||||
if (t > mAvgLastUpdate + PQISTREAM_AVG_PERIOD)
|
||||
{
|
||||
float avgReadpSec = getRate(true) * PQISTREAM_AVG_FRAC + (1.0 - PQISTREAM_AVG_FRAC) * mAvgReadCount/(1000.0 * (t - mAvgLastUpdate));
|
||||
float avgSentpSec = getRate(false) * PQISTREAM_AVG_FRAC + (1.0 - PQISTREAM_AVG_FRAC) * mAvgSentCount/(1000.0 * (t - mAvgLastUpdate));
|
||||
int64_t diff = int64_t(t) - int64_t(mAvgLastUpdate) ;
|
||||
|
||||
float avgReadpSec = getRate(true) * PQISTREAM_AVG_FRAC + (1.0 - PQISTREAM_AVG_FRAC) * mAvgReadCount/(1000.0 * float(diff));
|
||||
float avgSentpSec = getRate(false) * PQISTREAM_AVG_FRAC + (1.0 - PQISTREAM_AVG_FRAC) * mAvgSentCount/(1000.0 * float(diff));
|
||||
|
||||
#ifdef DEBUG_PQISTREAMER
|
||||
std::cerr << "Peer " << PeerId() << ": Current speed estimates: " << avgReadpSec << " / " << avgSentpSec << std::endl;
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
|
||||
// Gives feedback about type of data that is allowed in. For security reasons, this always needs to be re-derived (Clients can return true on default)
|
||||
|
||||
virtual bool acceptDataFromPeer(const RsGxsId& gxs_id,const RsGxsTunnelId& tunnel_id) = 0 ;
|
||||
virtual bool acceptDataFromPeer(const RsGxsId& gxs_id,const RsGxsTunnelId& tunnel_id,bool is_client_side) = 0 ;
|
||||
};
|
||||
|
||||
class GxsTunnelInfo
|
||||
@ -80,6 +80,7 @@ public:
|
||||
uint32_t tunnel_status ; // active, requested, DH pending, etc.
|
||||
uint32_t total_size_sent ; // total bytes sent through that tunnel since openned (including management).
|
||||
uint32_t total_size_received ; // total bytes received through that tunnel since openned (including management).
|
||||
bool is_client_side ; // specifiec wether we are client(managing the tunnel) or server.
|
||||
|
||||
// Data packets
|
||||
|
||||
|
@ -1017,8 +1017,6 @@ void p3turtle::handleSearchResult(RsTurtleSearchResultItem *item)
|
||||
|
||||
// Is this result's target actually ours ?
|
||||
|
||||
++(item->depth) ; // increase depth
|
||||
|
||||
if(it->second.origin == _own_id)
|
||||
returnSearchResult(item) ; // Yes, so send upward.
|
||||
else
|
||||
@ -1032,7 +1030,7 @@ void p3turtle::handleSearchResult(RsTurtleSearchResultItem *item)
|
||||
// of the files found can be further reached by a tunnel.
|
||||
|
||||
fwd_item->PeerId(it->second.origin) ;
|
||||
fwd_item->depth = 2 + (rand() % 256) ; // obfuscate the depth for non immediate friends.
|
||||
fwd_item->depth = 0 ; // obfuscate the depth for non immediate friends. Result will always be 0. This effectively removes the information.
|
||||
|
||||
sendItem(fwd_item) ;
|
||||
}
|
||||
|
@ -624,12 +624,12 @@ void CreateCircleDialog::updateCircleGUI()
|
||||
}
|
||||
else
|
||||
{
|
||||
std::set<RsGxsId> ids ;
|
||||
ids.insert(mCircleGroup.mMeta.mAuthorId) ;
|
||||
//std::set<RsGxsId> ids ;
|
||||
//ids.insert(mCircleGroup.mMeta.mAuthorId) ;
|
||||
ui.idChooser->setDefaultId(mCircleGroup.mMeta.mAuthorId) ;
|
||||
ui.idChooser->setChosenId(mCircleGroup.mMeta.mAuthorId) ;
|
||||
ui.idChooser->setIdConstraintSet(ids) ;
|
||||
ui.idChooser->setFlags(IDCHOOSER_ID_REQUIRED | IDCHOOSER_NO_CREATE) ;
|
||||
//ui.idChooser->setIdConstraintSet(ids) ;
|
||||
ui.idChooser->setFlags(IDCHOOSER_NO_CREATE) ;
|
||||
ui.circleAdminLabel->setVisible(false) ;
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,16 @@
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
@ -38,7 +47,16 @@
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -129,6 +147,18 @@
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="LineEditClear" name="filterLineEdit"/>
|
||||
</item>
|
||||
@ -254,7 +284,7 @@
|
||||
<string>Reputation</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignLeft|AlignVCenter</set>
|
||||
<set>AlignLeading|AlignVCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
@ -331,7 +361,16 @@
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@ -505,7 +544,16 @@
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1">
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual QString getHelpString() const ;
|
||||
virtual RetroShareLink::enumType getLinkType() { return RetroShareLink::TYPE_UNKNOWN; }
|
||||
virtual RetroShareLink::enumType getLinkType() { return RetroShareLink::TYPE_POSTED; }
|
||||
virtual GroupFrameSettings::Type groupFrameSettingsType() { return GroupFrameSettings::Posted; }
|
||||
virtual void groupInfoToGroupItemInfo(const RsGroupMetaData &groupInfo, GroupItemInfo &groupItemInfo, const RsUserdata *userdata);
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "MainWindow.h"
|
||||
#include "gui/gxsforums/GxsForumsDialog.h"
|
||||
#include "gui/gxschannels/GxsChannelDialog.h"
|
||||
#include "gui/Posted/PostedDialog.h"
|
||||
#include "gui/FileTransfer/SearchDialog.h"
|
||||
#include "msgs/MessageComposer.h"
|
||||
#include "util/misc.h"
|
||||
@ -61,11 +62,12 @@
|
||||
#define HOST_PERSON "person"
|
||||
#define HOST_FORUM "forum"
|
||||
#define HOST_CHANNEL "channel"
|
||||
#define HOST_POSTED "posted"
|
||||
#define HOST_MESSAGE "message"
|
||||
#define HOST_SEARCH "search"
|
||||
#define HOST_CERTIFICATE "certificate"
|
||||
#define HOST_PUBLIC_MSG "public_msg"
|
||||
#define HOST_REGEXP "file|extra|person|forum|channel|search|message|certificate|private_chat|public_msg"
|
||||
#define HOST_REGEXP "file|extra|person|forum|channel|posted|search|message|certificate|private_chat|public_msg"
|
||||
|
||||
#define FILE_NAME "name"
|
||||
#define FILE_SIZE "size"
|
||||
@ -83,6 +85,11 @@
|
||||
#define CHANNEL_ID "id"
|
||||
#define CHANNEL_MSGID "msgid"
|
||||
|
||||
#define POSTED_NAME "name"
|
||||
#define POSTED_ID "id"
|
||||
#define POSTED_MSGID "msgid"
|
||||
|
||||
|
||||
#define MESSAGE_ID "id"
|
||||
#define MESSAGE_SUBJECT "subject"
|
||||
|
||||
@ -280,6 +287,15 @@ void RetroShareLink::fromUrl(const QUrl& url)
|
||||
return;
|
||||
}
|
||||
|
||||
if (url.host() == HOST_POSTED) {
|
||||
_type = TYPE_POSTED;
|
||||
_name = decodedQueryItemValue(urlQuery, POSTED_NAME);
|
||||
_hash = urlQuery.queryItemValue(POSTED_ID);
|
||||
_msgId = urlQuery.queryItemValue(POSTED_MSGID);
|
||||
check();
|
||||
return;
|
||||
}
|
||||
|
||||
if (url.host() == HOST_SEARCH) {
|
||||
_type = TYPE_SEARCH;
|
||||
_name = decodedQueryItemValue(urlQuery, SEARCH_KEYWORDS);
|
||||
@ -579,6 +595,16 @@ void RetroShareLink::check()
|
||||
if(_hash.isEmpty())
|
||||
_valid = false;
|
||||
break;
|
||||
case TYPE_POSTED:
|
||||
if(_size != 0)
|
||||
_valid = false;
|
||||
|
||||
if(_name.isEmpty())
|
||||
_valid = false;
|
||||
|
||||
if(_hash.isEmpty())
|
||||
_valid = false;
|
||||
break;
|
||||
case TYPE_SEARCH:
|
||||
if(_size != 0)
|
||||
_valid = false;
|
||||
@ -629,6 +655,7 @@ QString RetroShareLink::title() const
|
||||
return PeerDefs::rsidFromId(RsPgpId(hash().toStdString()));
|
||||
case TYPE_FORUM:
|
||||
case TYPE_CHANNEL:
|
||||
case TYPE_POSTED:
|
||||
case TYPE_SEARCH:
|
||||
break;
|
||||
case TYPE_MESSAGE:
|
||||
@ -724,6 +751,17 @@ QString RetroShareLink::toString() const
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_POSTED:
|
||||
url.setScheme(RSLINK_SCHEME);
|
||||
url.setHost(HOST_POSTED);
|
||||
urlQuery.addQueryItem(POSTED_NAME, encodeItem(_name));
|
||||
urlQuery.addQueryItem(POSTED_ID, _hash);
|
||||
if (!_msgId.isEmpty()) {
|
||||
urlQuery.addQueryItem(POSTED_MSGID, _msgId);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_SEARCH:
|
||||
url.setScheme(RSLINK_SCHEME);
|
||||
url.setHost(HOST_SEARCH);
|
||||
@ -969,6 +1007,7 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
||||
case TYPE_UNKNOWN:
|
||||
case TYPE_FORUM:
|
||||
case TYPE_CHANNEL:
|
||||
case TYPE_POSTED:
|
||||
case TYPE_SEARCH:
|
||||
case TYPE_MESSAGE:
|
||||
case TYPE_CERTIFICATE:
|
||||
@ -1040,6 +1079,12 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
||||
QStringList channelUnknown;
|
||||
QStringList channelMsgUnknown;
|
||||
|
||||
// forum
|
||||
QStringList postedFound;
|
||||
QStringList postedMsgFound;
|
||||
QStringList postedUnknown;
|
||||
QStringList postedMsgUnknown;
|
||||
|
||||
// search
|
||||
QStringList searchStarted;
|
||||
|
||||
@ -1056,8 +1101,8 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
||||
QList<QStringList*> processedList;
|
||||
QList<QStringList*> errorList;
|
||||
|
||||
processedList << &fileAdded << &personAdded << &forumFound << &channelFound << &searchStarted << &messageStarted;
|
||||
errorList << &fileExist << &personExist << &personFailed << &personNotFound << &forumUnknown << &forumMsgUnknown << &channelUnknown << &channelMsgUnknown << &messageReceipientNotAccepted << &messageReceipientUnknown;
|
||||
processedList << &fileAdded << &personAdded << &forumFound << &channelFound << &postedFound << &searchStarted << &messageStarted;
|
||||
errorList << &fileExist << &personExist << &personFailed << &personNotFound << &forumUnknown << &forumMsgUnknown << &channelUnknown << &channelMsgUnknown << &postedUnknown << &postedMsgUnknown << &messageReceipientNotAccepted << &messageReceipientUnknown;
|
||||
// not needed: forumFound, channelFound, messageStarted
|
||||
|
||||
for (linkIt = links.begin(); linkIt != links.end(); ++linkIt) {
|
||||
@ -1289,6 +1334,36 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case TYPE_POSTED:
|
||||
{
|
||||
#ifdef DEBUG_RSLINK
|
||||
std::cerr << " RetroShareLink::process PostedRequest : name : " << link.name().toStdString() << ". id : " << link.hash().toStdString() << ". msgId : " << link.msgId().toStdString() << std::endl;
|
||||
#endif
|
||||
|
||||
MainWindow::showWindow(MainWindow::Posted);
|
||||
PostedDialog *postedDialog = dynamic_cast<PostedDialog*>(MainWindow::getPage(MainWindow::Posted));
|
||||
|
||||
if (!postedDialog) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (postedDialog->navigate(RsGxsGroupId(link.id().toStdString()), RsGxsMessageId(link.msgId().toStdString()))) {
|
||||
if (link.msgId().isEmpty()) {
|
||||
postedFound.append(link.name());
|
||||
} else {
|
||||
postedMsgFound.append(link.name());
|
||||
}
|
||||
} else {
|
||||
if (link.msgId().isEmpty()) {
|
||||
postedUnknown.append(link.name());
|
||||
} else {
|
||||
postedMsgUnknown.append(link.name());
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case TYPE_SEARCH:
|
||||
{
|
||||
#ifdef DEBUG_RSLINK
|
||||
@ -1438,6 +1513,16 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
||||
}
|
||||
}
|
||||
|
||||
// posted
|
||||
if (flag & RSLINK_PROCESS_NOTIFY_ERROR) {
|
||||
if (!postedUnknown.isEmpty()) {
|
||||
processList(postedUnknown, QObject::tr("Posted not found"), QObject::tr("Posted not found"), result);
|
||||
}
|
||||
if (!postedMsgUnknown.isEmpty()) {
|
||||
processList(postedMsgUnknown, QObject::tr("Posted message not found"), QObject::tr("Posted messages not found"), result);
|
||||
}
|
||||
}
|
||||
|
||||
// message
|
||||
if (flag & RSLINK_PROCESS_NOTIFY_ERROR) {
|
||||
if (!messageReceipientNotAccepted.isEmpty()) {
|
||||
|
@ -67,7 +67,8 @@ class RetroShareLink
|
||||
TYPE_CERTIFICATE = 0x07,
|
||||
TYPE_EXTRAFILE = 0x08,
|
||||
TYPE_PRIVATE_CHAT = 0x09,
|
||||
TYPE_PUBLIC_MSG = 0x0a
|
||||
TYPE_PUBLIC_MSG = 0x0a,
|
||||
TYPE_POSTED = 0x0b
|
||||
};
|
||||
|
||||
public:
|
||||
|
@ -62,6 +62,8 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define FMM 2//fontMetricsMultiplicator
|
||||
|
||||
/*****
|
||||
* #define CHAT_DEBUG 1
|
||||
*****/
|
||||
@ -71,6 +73,10 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
int iconHeight = FMM*QFontMetricsF(font()).height() ;
|
||||
QSize iconSize = QSize(iconHeight,iconHeight);
|
||||
QSize buttonSize = QSize(iconSize + QSize(FMM,FMM));
|
||||
|
||||
newMessages = false;
|
||||
typing = false;
|
||||
peerStatus = 0;
|
||||
@ -82,6 +88,29 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
|
||||
lastStatusSendTime = 0 ;
|
||||
|
||||
//Resize Tool buttons
|
||||
ui->emoteiconButton->setFixedSize(buttonSize);
|
||||
ui->emoteiconButton->setIconSize(iconSize);
|
||||
ui->fontButton->setFixedSize(buttonSize);
|
||||
ui->fontButton->setIconSize(iconSize);
|
||||
ui->attachPictureButton->setFixedSize(buttonSize);
|
||||
ui->attachPictureButton->setIconSize(iconSize);
|
||||
ui->addFileButton->setFixedSize(buttonSize);
|
||||
ui->addFileButton->setIconSize(iconSize);
|
||||
ui->pushtoolsButton->setFixedSize(buttonSize);
|
||||
ui->pushtoolsButton->setIconSize(iconSize);
|
||||
ui->notifyButton->setFixedSize(buttonSize);
|
||||
ui->notifyButton->setIconSize(iconSize);
|
||||
ui->markButton->setFixedSize(buttonSize);
|
||||
ui->markButton->setIconSize(iconSize);
|
||||
ui->leSearch->setFixedHeight(iconHeight);
|
||||
ui->searchBefore->setFixedHeight(iconHeight);
|
||||
ui->searchAfter->setFixedHeight(iconHeight);
|
||||
ui->searchButton->setFixedSize(buttonSize);
|
||||
ui->searchButton->setIconSize(iconSize);
|
||||
ui->sendButton->setFixedHeight(iconHeight);
|
||||
|
||||
//Initialize search
|
||||
iCharToStartSearch=Settings->getChatSearchCharToStartSearch();
|
||||
bFindCaseSensitively=Settings->getChatSearchCaseSensitively();
|
||||
bFindWholeWords=Settings->getChatSearchWholeWords();
|
||||
@ -90,7 +119,6 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
uiMaxSearchLimitColor=Settings->getChatSearchMaxSearchLimitColor();
|
||||
cFoundColor=Settings->getChatSearchFoundColor();
|
||||
|
||||
|
||||
ui->actionSearchWithoutLimit->setText(tr("Don't stop to color after")+" "+QString::number(uiMaxSearchLimitColor)+" "+tr("items found (need more CPU)"));
|
||||
|
||||
ui->leSearch->setVisible(false);
|
||||
@ -102,23 +130,23 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
ui->searchButton->setChecked(false);
|
||||
ui->searchButton->setToolTip(tr("<b>Find </b><br/><i>Ctrl+F</i>"));
|
||||
ui->leSearch->installEventFilter(this);
|
||||
|
||||
connect(ui->actionFindCaseSensitively, SIGNAL(triggered()), this, SLOT(toogle_FindCaseSensitively()));
|
||||
connect(ui->actionFindWholeWords, SIGNAL(triggered()), this, SLOT(toogle_FindWholeWords()));
|
||||
connect(ui->actionMoveToCursor, SIGNAL(triggered()), this, SLOT(toogle_MoveToCursor()));
|
||||
connect(ui->actionSearchWithoutLimit, SIGNAL(triggered()), this, SLOT(toogle_SeachWithoutLimit()));
|
||||
connect(ui->searchButton, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuSearchButton(QPoint)));
|
||||
connect(ui->actionSearch_History, SIGNAL(triggered()), this, SLOT(searchHistory()));
|
||||
|
||||
notify=NULL;
|
||||
ui->notifyButton->setVisible(false);
|
||||
|
||||
ui->markButton->setToolTip(tr("<b>Mark this selected text</b><br><i>Ctrl+M</i>"));
|
||||
|
||||
connect(ui->sendButton, SIGNAL(clicked()), this, SLOT(sendChat()));
|
||||
connect(ui->addFileButton, SIGNAL(clicked()), this , SLOT(addExtraFile()));
|
||||
|
||||
connect(ui->attachPictureButton, SIGNAL(clicked()), this, SLOT(addExtraPicture()));
|
||||
connect(ui->emoteiconButton, SIGNAL(clicked()), this, SLOT(smileyWidget()));
|
||||
connect(ui->attachPictureButton, SIGNAL(clicked()), this, SLOT(addExtraPicture()));
|
||||
connect(ui->addFileButton, SIGNAL(clicked()), this , SLOT(addExtraFile()));
|
||||
connect(ui->sendButton, SIGNAL(clicked()), this, SLOT(sendChat()));
|
||||
|
||||
connect(ui->actionSaveChatHistory, SIGNAL(triggered()), this, SLOT(fileSaveAs()));
|
||||
connect(ui->actionClearChatHistory, SIGNAL(triggered()), this, SLOT(clearChatHistory()));
|
||||
connect(ui->actionDeleteChatHistory, SIGNAL(triggered()), this, SLOT(deleteChatHistory()));
|
||||
@ -146,9 +174,6 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
ui->infoFrame->setVisible(false);
|
||||
ui->statusMessageLabel->hide();
|
||||
|
||||
ui->actionSearch_History->setChecked(Settings->getChatSearchShowBarByDefault());
|
||||
searchHistory();
|
||||
|
||||
setAcceptDrops(true);
|
||||
ui->chatTextEdit->setAcceptDrops(false);
|
||||
ui->hashBox->setDropWidget(this);
|
||||
@ -165,7 +190,6 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
menu->addAction(ui->actionDeleteChatHistory);
|
||||
menu->addAction(ui->actionSaveChatHistory);
|
||||
menu->addAction(ui->actionMessageHistory);
|
||||
menu->addAction(ui->actionSearch_History);
|
||||
ui->pushtoolsButton->setMenu(menu);
|
||||
|
||||
ui->textBrowser->installEventFilter(this);
|
||||
@ -218,12 +242,16 @@ void ChatWidget::setDefaultExtraFileFlags(TransferRequestFlags fl)
|
||||
|
||||
void ChatWidget::addChatHorizontalWidget(QWidget *w)
|
||||
{
|
||||
ui->vl_Plugins->addWidget(w) ;
|
||||
ui->pluginsVLayout->addWidget(w) ;
|
||||
update() ;
|
||||
}
|
||||
|
||||
void ChatWidget::addChatBarWidget(QWidget *w)
|
||||
{
|
||||
int iconHeight = FMM*QFontMetricsF(font()).height() ;
|
||||
QSize iconSize = QSize(iconHeight,iconHeight);
|
||||
QSize buttonSize = QSize(iconSize + QSize(FMM,FMM));
|
||||
w->setFixedSize(buttonSize);
|
||||
ui->pluginButtonFrame->layout()->addWidget(w) ;
|
||||
}
|
||||
|
||||
@ -234,8 +262,7 @@ void ChatWidget::addTitleBarWidget(QWidget *w)
|
||||
|
||||
void ChatWidget::hideChatText(bool hidden)
|
||||
{
|
||||
ui->frame_ChatText->setHidden(hidden); ;
|
||||
ui->searchframe->setVisible(ui->actionSearch_History->isChecked() && !hidden); ;
|
||||
ui->chatTextFrame->setHidden(hidden); ;
|
||||
}
|
||||
|
||||
RSButtonOnText* ChatWidget::getNewButtonOnTextBrowser()
|
||||
@ -316,7 +343,6 @@ void ChatWidget::init(const ChatId &chat_id, const QString &title)
|
||||
messageCount = Settings->getPublicChatHistoryCount();
|
||||
|
||||
ui->titleBarFrame->setVisible(false);
|
||||
ui->actionSearch_History->setVisible(false);
|
||||
}
|
||||
|
||||
if (rsHistory->getEnable(hist_chat_type))
|
||||
@ -400,12 +426,12 @@ void ChatWidget::processSettings(bool load)
|
||||
// load settings
|
||||
|
||||
// state of splitter
|
||||
ui->chatsplitter->restoreState(Settings->value("ChatSplitter").toByteArray());
|
||||
ui->chatVSplitter->restoreState(Settings->value("ChatSplitter").toByteArray());
|
||||
} else {
|
||||
// save settings
|
||||
|
||||
// state of splitter
|
||||
Settings->setValue("ChatSplitter", ui->chatsplitter->saveState());
|
||||
Settings->setValue("ChatSplitter", ui->chatVSplitter->saveState());
|
||||
}
|
||||
|
||||
Settings->endGroup();
|
||||
@ -835,7 +861,7 @@ void ChatWidget::on_notifyButton_clicked()
|
||||
QIcon icoLobby=(ui->notifyButton->icon());
|
||||
|
||||
notify->makeSubMenu(menu, icoLobby, title, chatId.toLobbyId());
|
||||
menu->exec(ui->notifyButton->mapToGlobal(ui->notifyButton->geometry().bottomLeft()));
|
||||
menu->exec(ui->notifyButton->mapToGlobal(QPoint(0,ui->notifyButton->geometry().height())));
|
||||
|
||||
}
|
||||
|
||||
@ -1031,7 +1057,7 @@ void ChatWidget::chatCharFormatChanged()
|
||||
void ChatWidget::resetStatusBar()
|
||||
{
|
||||
ui->typingLabel->clear();
|
||||
ui->typingpixmapLabel->clear();
|
||||
ui->typingPixmapLabel->clear();
|
||||
|
||||
typing = false;
|
||||
|
||||
@ -1076,15 +1102,21 @@ void ChatWidget::updateLenOfChatTextEdit()
|
||||
break;
|
||||
}
|
||||
|
||||
bool msgToLarge = false;
|
||||
int charRemains = 0;
|
||||
if (maxMessageSize > 0) {
|
||||
msgToLarge = (msg.length() >= maxMessageSize);
|
||||
charRemains = maxMessageSize - msg.length();
|
||||
}
|
||||
|
||||
ui->sendButton->setEnabled(!msgToLarge);
|
||||
text = tr("%1This message consists of %2 characters.").arg(msgToLarge ? tr("Warning:")+" " : "").arg(msg.length());
|
||||
ui->sendButton->setEnabled(charRemains>=0);
|
||||
if (charRemains>0)
|
||||
text = tr("It remains %1 characters\nafter HTML conversion.").arg(charRemains);
|
||||
else if(charRemains<0)
|
||||
text = tr("Warning: This message is too big of %1 characters\nafter HTML conversion.").arg((0-charRemains));
|
||||
else
|
||||
text = "";
|
||||
|
||||
ui->sendButton->setToolTip(text);
|
||||
ui->chatTextEdit->setToolTip(msgToLarge?text:"");
|
||||
ui->chatTextEdit->setToolTip(text);
|
||||
}
|
||||
|
||||
void ChatWidget::sendChat()
|
||||
@ -1427,16 +1459,6 @@ void ChatWidget::messageHistory()
|
||||
imBrowser.exec();
|
||||
}
|
||||
|
||||
void ChatWidget::searchHistory()
|
||||
{
|
||||
if(ui->actionSearch_History->isChecked()){
|
||||
ui->searchframe->show();
|
||||
}else {
|
||||
ui->searchframe->hide();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ChatWidget::addExtraFile()
|
||||
{
|
||||
QStringList files;
|
||||
@ -1660,8 +1682,8 @@ void ChatWidget::updatePeersCustomStateString(const QString& /*peer_id*/, const
|
||||
|
||||
void ChatWidget::updateStatusString(const QString &statusMask, const QString &statusString, bool permanent)
|
||||
{
|
||||
ui->typingLabel->setText(QString(statusMask).arg(tr(statusString.toUtf8()))); // displays info for 5 secs.
|
||||
ui->typingpixmapLabel->setPixmap(QPixmap(":images/typing.png") );
|
||||
ui->typingLabel->setText(QString(statusMask).arg(tr(statusString.toUtf8()))); // displays info for 5 secs.
|
||||
ui->typingPixmapLabel->setPixmap(QPixmap(":images/typing.png") );
|
||||
|
||||
if (statusString == "is typing...") {
|
||||
typing = true;
|
||||
|
@ -132,8 +132,6 @@ private slots:
|
||||
void deleteChatHistory();
|
||||
void messageHistory();
|
||||
void resetStatusBar() ;
|
||||
void searchHistory();
|
||||
|
||||
|
||||
signals:
|
||||
void infoChanged(ChatWidget*);
|
||||
|
@ -10,7 +10,7 @@
|
||||
<height>323</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -27,12 +27,12 @@
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="hl_TextChat">
|
||||
<layout class="QHBoxLayout" name="textChatHLayout">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_ChatText">
|
||||
<widget class="QFrame" name="chatTextFrame">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
@ -45,7 +45,7 @@
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<layout class="QVBoxLayout" name="chatTextFrameVLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -130,7 +130,7 @@
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<layout class="QHBoxLayout" name="infoFrameHLayout">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
@ -207,7 +207,7 @@ border-image: url(:/images/closepressed.png)
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSplitter" name="chatsplitter">
|
||||
<widget class="QSplitter" name="chatVSplitter">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
@ -235,14 +235,14 @@ border-image: url(:/images/closepressed.png)
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="chatTextVLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<layout class="QHBoxLayout" name="typingHLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="typingpixmapLabel">
|
||||
<widget class="QLabel" name="typingPixmapLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>18</width>
|
||||
@ -280,7 +280,7 @@ border-image: url(:/images/closepressed.png)
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<spacer name="typingHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -308,7 +308,7 @@ border-image: url(:/images/closepressed.png)
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="placeholderText" stdset="0">
|
||||
<property name="placeholderText">
|
||||
<string>Type a message here</string>
|
||||
</property>
|
||||
</widget>
|
||||
@ -325,7 +325,7 @@ border-image: url(:/images/closepressed.png)
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QHBoxLayout" name="toolBarFrameHLayout">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
@ -521,7 +521,7 @@ border-image: url(:/images/closepressed.png)
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="HL_pluginButtonFrame">
|
||||
<layout class="QHBoxLayout" name="pluginButtonFrameHLayout">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
@ -538,7 +538,179 @@ border-image: url(:/images/closepressed.png)
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<widget class="QToolButton" name="notifyButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/chat_red24.png</normaloff>:/images/chat_red24.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="markButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/highlight.png</normaloff>:/images/highlight.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="LineEditClear" name="leSearch"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="searchBefore">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/arrow-left.png</normaloff>:/images/arrow-left.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="searchAfter">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/arrow-right.png</normaloff>:/images/arrow-right.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="searchButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/find.png</normaloff>:/images/find.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="toolBarHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -571,12 +743,12 @@ border-image: url(:/images/closepressed.png)
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="vl_Plugins"/>
|
||||
<layout class="QVBoxLayout" name="pluginsVLayout"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="hTitleLayout">
|
||||
<layout class="QHBoxLayout" name="titleBarMainHLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMaximumSize</enum>
|
||||
</property>
|
||||
@ -600,7 +772,7 @@ border-image: url(:/images/closepressed.png)
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="hlTitleBarFrame">
|
||||
<layout class="QHBoxLayout" name="titleBarFrameHLayout">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
@ -670,7 +842,7 @@ border-image: url(:/images/closepressed.png)
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<spacer name="titleBarHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -690,7 +862,7 @@ border-image: url(:/images/closepressed.png)
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="HL_pluginTitleFrame">
|
||||
<layout class="QHBoxLayout" name="pluginTitleFrameHLayout">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
@ -706,202 +878,6 @@ border-image: url(:/images/closepressed.png)
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="searchframe">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="5">
|
||||
<widget class="QToolButton" name="searchButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/find.png</normaloff>:/images/find.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QToolButton" name="notifyButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/chat_red24.png</normaloff>:/images/chat_red24.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QToolButton" name="searchAfter">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/arrow-right.png</normaloff>:/images/arrow-right.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="LineEditClear" name="leSearch"/>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QToolButton" name="searchBefore">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/arrow-left.png</normaloff>:/images/arrow-left.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QToolButton" name="markButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/highlight.png</normaloff>:/images/highlight.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -1033,17 +1009,6 @@ border-image: url(:/images/closepressed.png)
|
||||
<string>Choose color</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSearch_History">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Display Search Box</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Search Box</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionQuote">
|
||||
<property name="text">
|
||||
<string>Quote</string>
|
||||
@ -1099,8 +1064,8 @@ border-image: url(:/images/closepressed.png)
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../emojione.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -71,7 +71,7 @@ void PostedGroupItem::setup()
|
||||
connect(ui->subscribeButton, SIGNAL(clicked()), this, SLOT(subscribePosted()));
|
||||
connect(ui->copyLinkButton, SIGNAL(clicked()), this, SLOT(copyGroupLink()));
|
||||
|
||||
ui->copyLinkButton->hide(); // No link type at this moment
|
||||
//ui->copyLinkButton->hide(); // No link type at this moment
|
||||
|
||||
ui->expandFrame->hide();
|
||||
}
|
||||
@ -130,10 +130,10 @@ void PostedGroupItem::fill()
|
||||
#endif
|
||||
|
||||
// No link type at this moment
|
||||
// RetroShareLink link;
|
||||
// link.createGxsGroupLink(RetroShareLink::TYPE_POSTED, mGroup.mMeta.mGroupId, groupName());
|
||||
// ui->nameLabel->setText(link.toHtml());
|
||||
ui->nameLabel->setText(groupName());
|
||||
RetroShareLink link;
|
||||
link.createGxsGroupLink(RetroShareLink::TYPE_POSTED, mGroup.mMeta.mGroupId, groupName());
|
||||
ui->nameLabel->setText(link.toHtml());
|
||||
// ui->nameLabel->setText(groupName());
|
||||
|
||||
ui->descLabel->setText(QString::fromUtf8(mGroup.mDescription.c_str()));
|
||||
|
||||
|
@ -69,6 +69,7 @@ GxsIdDetails::GxsIdDetails()
|
||||
{
|
||||
mCheckTimerId = 0;
|
||||
mProcessDisableCount = 0;
|
||||
mPendingDataIterator = mPendingData.end() ;
|
||||
|
||||
connect(this, SIGNAL(startTimerFromThread()), this, SLOT(doStartTimer()));
|
||||
}
|
||||
@ -106,16 +107,16 @@ void GxsIdDetails::objectDestroyed(QObject *object)
|
||||
|
||||
/* Object is about to be destroyed, remove it from pending list */
|
||||
QList<CallbackData>::iterator dataIt;
|
||||
for (dataIt = mPendingData.begin(); dataIt != mPendingData.end(); ) {
|
||||
CallbackData &pendingData = *dataIt;
|
||||
|
||||
if (pendingData.mObject == object) {
|
||||
dataIt = mPendingData.erase(dataIt);
|
||||
continue;
|
||||
}
|
||||
|
||||
++dataIt;
|
||||
}
|
||||
|
||||
QMap<QObject*,CallbackData>::iterator it = mPendingData.find(object) ;
|
||||
|
||||
if(it != mPendingData.end())
|
||||
{
|
||||
if(it == mPendingDataIterator)
|
||||
mPendingDataIterator = mPendingData.erase(it) ;
|
||||
else
|
||||
mPendingData.erase(it) ;
|
||||
}
|
||||
}
|
||||
|
||||
void GxsIdDetails::connectObject_locked(QObject *object, bool doConnect)
|
||||
@ -125,13 +126,9 @@ void GxsIdDetails::connectObject_locked(QObject *object, bool doConnect)
|
||||
}
|
||||
|
||||
/* Search Object in pending list */
|
||||
QList<CallbackData>::iterator dataIt;
|
||||
for (dataIt = mPendingData.begin(); dataIt != mPendingData.end(); ++dataIt) {
|
||||
if (dataIt->mObject == object) {
|
||||
/* Object still/already in pending list */
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(mPendingData.find(object) == mPendingData.end()) // force disconnect when not in the list
|
||||
doConnect = false ;
|
||||
|
||||
if (doConnect) {
|
||||
connect(object, SIGNAL(destroyed(QObject*)), this, SLOT(objectDestroyed(QObject*)));
|
||||
@ -155,12 +152,16 @@ void GxsIdDetails::timerEvent(QTimerEvent *event)
|
||||
if (!mPendingData.empty()) {
|
||||
/* Check pending id's */
|
||||
int processed = qMin(MAX_PROCESS_COUNT_PER_TIMER, mPendingData.size());
|
||||
|
||||
while (!mPendingData.isEmpty()) {
|
||||
if (processed-- <= 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
if(mPendingDataIterator == mPendingData.end())
|
||||
mPendingDataIterator = mPendingData.begin() ;
|
||||
|
||||
CallbackData &pendingData = mPendingData.front();
|
||||
CallbackData &pendingData = *mPendingDataIterator;
|
||||
|
||||
RsIdentityDetails details;
|
||||
if (rsIdentity->getIdDetails(pendingData.mId, details)) {
|
||||
@ -168,9 +169,10 @@ void GxsIdDetails::timerEvent(QTimerEvent *event)
|
||||
pendingData.mCallback(GXS_ID_DETAILS_TYPE_DONE, details, pendingData.mObject, pendingData.mData);
|
||||
|
||||
QObject *object = pendingData.mObject;
|
||||
mPendingData.pop_front();
|
||||
connectObject_locked(object, false);
|
||||
|
||||
mPendingDataIterator = mPendingData.erase(mPendingDataIterator);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -180,13 +182,16 @@ void GxsIdDetails::timerEvent(QTimerEvent *event)
|
||||
pendingData.mCallback(GXS_ID_DETAILS_TYPE_FAILED, details, pendingData.mObject, pendingData.mData);
|
||||
|
||||
QObject *object = pendingData.mObject;
|
||||
mPendingData.pop_front();
|
||||
connectObject_locked(object, false);
|
||||
|
||||
mPendingDataIterator = mPendingData.erase(mPendingDataIterator);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
mPendingData.move(0, mPendingData.size() - 1);
|
||||
|
||||
++mPendingDataIterator ;
|
||||
|
||||
//mPendingData.move(0, mPendingData.size() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -246,6 +251,26 @@ bool GxsIdDetails::process(const RsGxsId &id, GxsIdDetailsCallbackFunction callb
|
||||
return true;
|
||||
}
|
||||
|
||||
// remove any existing call for this object. This is needed for when the same widget is used to display IDs that vary in time.
|
||||
{
|
||||
QMutexLocker lock(&mInstance->mMutex);
|
||||
|
||||
// check if a pending request is not already on its way. If so, replace it.
|
||||
|
||||
QMap<QObject*,CallbackData>::iterator it = mInstance->mPendingData.find(object) ;
|
||||
|
||||
if(it != mInstance->mPendingData.end())
|
||||
{
|
||||
mInstance->connectObject_locked(object, false);
|
||||
|
||||
if(mInstance->mPendingDataIterator == it)
|
||||
mInstance->mPendingDataIterator = mInstance->mPendingData.erase(it) ;
|
||||
else
|
||||
mInstance->mPendingData.erase(it) ;
|
||||
}
|
||||
|
||||
/* Connect signal "destroy" */
|
||||
}
|
||||
/* Try to get the information */
|
||||
// the idea behind this was, to call the callback directly when the identity is already loaded in librs
|
||||
// without one timer tick, but it causes the use of Pixmap in avatars within a threat that is different than
|
||||
@ -277,10 +302,12 @@ bool GxsIdDetails::process(const RsGxsId &id, GxsIdDetailsCallbackFunction callb
|
||||
{
|
||||
QMutexLocker lock(&mInstance->mMutex);
|
||||
|
||||
// check if a pending request is not already on its way. If so, replace it.
|
||||
|
||||
mInstance->mPendingData[object] = pendingData;
|
||||
|
||||
/* Connect signal "destroy" */
|
||||
mInstance->connectObject_locked(object, true);
|
||||
|
||||
mInstance->mPendingData.push_back(pendingData);
|
||||
}
|
||||
|
||||
/* Start timer */
|
||||
|
@ -132,7 +132,8 @@ protected:
|
||||
static GxsIdDetails *mInstance;
|
||||
|
||||
/* Pending data */
|
||||
QList<CallbackData> mPendingData;
|
||||
QMap<QObject*,CallbackData> mPendingData;
|
||||
QMap<QObject*,CallbackData>::iterator mPendingDataIterator;
|
||||
int mCheckTimerId;
|
||||
int mProcessDisableCount;
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include <QDateTime>
|
||||
#include <QSignalMapper>
|
||||
|
||||
#include "retroshare/rsgxscircles.h"
|
||||
|
||||
#include "GxsChannelPostsWidget.h"
|
||||
#include "ui_GxsChannelPostsWidget.h"
|
||||
#include "gui/feeds/GxsChannelPostItem.h"
|
||||
@ -265,6 +267,36 @@ void GxsChannelPostsWidget::insertChannelDetails(const RsGxsChannelGroup &group)
|
||||
} else {
|
||||
ui->infoPosts->setText(QString::number(group.mMeta.mVisibleMsgCount));
|
||||
ui->infoDescription->setText(QString::fromUtf8(group.mDescription.c_str()));
|
||||
|
||||
ui->infoAdministrator->setId(group.mMeta.mAuthorId) ;
|
||||
|
||||
QString distrib_string ( "[unknown]" );
|
||||
|
||||
switch(group.mMeta.mCircleType)
|
||||
{
|
||||
case GXS_CIRCLE_TYPE_PUBLIC: distrib_string = tr("Public") ;
|
||||
break ;
|
||||
case GXS_CIRCLE_TYPE_EXTERNAL:
|
||||
{
|
||||
RsGxsCircleDetails det ;
|
||||
|
||||
// !! What we need here is some sort of CircleLabel, which loads the circle and updates the label when done.
|
||||
|
||||
if(rsGxsCircles->getCircleDetails(group.mMeta.mCircleId,det))
|
||||
distrib_string = tr("Restricted to members of circle \"")+QString::fromUtf8(det.mCircleName.c_str()) +"\"";
|
||||
else
|
||||
distrib_string = tr("Restricted to members of circle ")+QString::fromStdString(group.mMeta.mCircleId.toStdString()) ;
|
||||
}
|
||||
break ;
|
||||
case GXS_CIRCLE_TYPE_YOUREYESONLY: distrib_string = tr("Your eyes only");
|
||||
break ;
|
||||
case GXS_CIRCLE_TYPE_LOCAL: distrib_string = tr("You and your friend nodes");
|
||||
break ;
|
||||
default:
|
||||
std::cerr << "(EE) badly initialised group distribution ID = " << group.mMeta.mCircleType << std::endl;
|
||||
}
|
||||
|
||||
ui->infoDistribution->setText(distrib_string);
|
||||
|
||||
ui->infoWidget->show();
|
||||
ui->feedWidget->hide();
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>681</width>
|
||||
<width>793</width>
|
||||
<height>465</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -14,7 +14,16 @@
|
||||
<property name="spacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -26,7 +35,16 @@
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -289,7 +307,16 @@
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -370,15 +397,8 @@
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="infoPosts">
|
||||
<property name="text">
|
||||
<string notr="true">0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="infoDescriptionLabel">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
@ -386,7 +406,7 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Description:</string>
|
||||
<string>Administrator:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -409,14 +429,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QTextBrowser" name="infoDescription">
|
||||
<property name="html">
|
||||
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Description</p></body></html></string>
|
||||
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Description</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
@ -426,6 +446,53 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="infoDescriptionLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Description:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="GxsIdLabel" name="infoAdministrator">
|
||||
<property name="text">
|
||||
<string>unknown</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="infoPosts">
|
||||
<property name="text">
|
||||
<string notr="true">0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Distribution:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="infoDistribution">
|
||||
<property name="text">
|
||||
<string>unknown</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
@ -485,6 +552,11 @@ p, li { white-space: pre-wrap; }
|
||||
<zorder>infoWidget</zorder>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>GxsIdLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>gui/gxs/GxsIdLabel.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>StyledElidedLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
|
@ -130,7 +130,6 @@ ChatPage::save(QString &/*errmsg*/)
|
||||
|
||||
Settings->setChatSendMessageWithCtrlReturn(ui.sendMessageWithCtrlReturn->isChecked());
|
||||
|
||||
Settings->setChatSearchShowBarByDefault(ui.cbSearch_ShowBar->isChecked());
|
||||
Settings->setChatSearchCharToStartSearch(ui.sbSearch_CharToStart->value());
|
||||
Settings->setChatSearchCaseSensitively(ui.cbSearch_CaseSensitively->isChecked());
|
||||
Settings->setChatSearchWholeWords(ui.cbSearch_WholeWords->isChecked());
|
||||
@ -238,7 +237,6 @@ ChatPage::load()
|
||||
|
||||
ui.sendMessageWithCtrlReturn->setChecked(Settings->getChatSendMessageWithCtrlReturn());
|
||||
|
||||
ui.cbSearch_ShowBar->setChecked(Settings->getChatSearchShowBarByDefault());
|
||||
ui.sbSearch_CharToStart->setValue(Settings->getChatSearchCharToStartSearch());
|
||||
ui.cbSearch_CaseSensitively->setChecked(Settings->getChatSearchCaseSensitively());
|
||||
ui.cbSearch_WholeWords->setChecked(Settings->getChatSearchWholeWords());
|
||||
|
@ -512,16 +512,6 @@ void RshareSettings::setChatSendMessageWithCtrlReturn(bool bValue)
|
||||
setValueToGroup("Chat", "SendMessageWithCtrlReturn", bValue);
|
||||
}
|
||||
|
||||
bool RshareSettings::getChatSearchShowBarByDefault()
|
||||
{
|
||||
return valueFromGroup("Chat", "SearchShowBarByDefault", false).toBool();
|
||||
}
|
||||
|
||||
void RshareSettings::setChatSearchShowBarByDefault(bool bValue)
|
||||
{
|
||||
setValueToGroup("Chat", "SearchShowBarByDefault", bValue);
|
||||
}
|
||||
|
||||
void RshareSettings::setChatSearchCharToStartSearch(int iValue)
|
||||
{
|
||||
setValueToGroup("Chat", "SearchCharToStartSearch", iValue);
|
||||
|
@ -209,9 +209,6 @@ public:
|
||||
bool getChatSendMessageWithCtrlReturn();
|
||||
void setChatSendMessageWithCtrlReturn(bool bValue);
|
||||
|
||||
bool getChatSearchShowBarByDefault();
|
||||
void setChatSearchShowBarByDefault(bool bValue);
|
||||
|
||||
void setChatSearchCharToStartSearch(int iValue);
|
||||
int getChatSearchCharToStartSearch();
|
||||
|
||||
|
@ -145,6 +145,7 @@ bool RsHtml::canReplaceAnchor(QDomDocument &/*doc*/, QDomElement &/*element*/, c
|
||||
case RetroShareLink::TYPE_PERSON:
|
||||
case RetroShareLink::TYPE_FORUM:
|
||||
case RetroShareLink::TYPE_CHANNEL:
|
||||
case RetroShareLink::TYPE_POSTED:
|
||||
case RetroShareLink::TYPE_SEARCH:
|
||||
case RetroShareLink::TYPE_MESSAGE:
|
||||
case RetroShareLink::TYPE_EXTRAFILE:
|
||||
@ -173,6 +174,7 @@ void RsHtml::anchorStylesheetForImg(QDomDocument &/*doc*/, QDomElement &/*elemen
|
||||
case RetroShareLink::TYPE_PERSON:
|
||||
case RetroShareLink::TYPE_FORUM:
|
||||
case RetroShareLink::TYPE_CHANNEL:
|
||||
case RetroShareLink::TYPE_POSTED:
|
||||
case RetroShareLink::TYPE_SEARCH:
|
||||
case RetroShareLink::TYPE_MESSAGE:
|
||||
case RetroShareLink::TYPE_EXTRAFILE:
|
||||
|
Loading…
Reference in New Issue
Block a user