Optimized the functions for the forum messages.

- used "const std::string&" for the parameters
- used "std::map" for the read status
- removed useless variables
Added new define DEBUG_FORUMS in ForumsDialog.cpp.
Added function to generate mass data for the forum messages.
Fixed german language for the FriendsDialog.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4236 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-06-06 21:44:16 +00:00
parent 9fb2ddfec0
commit 0dd77f6f27
8 changed files with 291 additions and 254 deletions

View File

@ -402,7 +402,7 @@ void p3GroupDistrib::updateCacheDocument()
pCacheId pCid;
int count = 0;
int count2 = 0, count3 = 0;
// int count2 = 0, count3 = 0;
for(; msgIt != mMsgHistPending.end(); msgIt++)
{
@ -2321,7 +2321,7 @@ void p3GroupDistrib::getPopularGroupList(uint32_t popMin, uint32_t popMax, std::
/* get Msg Lists */
bool p3GroupDistrib::getAllMsgList(std::string grpId, std::list<std::string> &msgIds)
bool p3GroupDistrib::getAllMsgList(const std::string& grpId, std::list<std::string> &msgIds)
{
RsStackMutex stack(distribMtx); /************* STACK MUTEX ************/
@ -2346,7 +2346,7 @@ bool p3GroupDistrib::getAllMsgList(std::string grpId, std::list<std::string> &ms
return true;
}
bool p3GroupDistrib::getParentMsgList(std::string grpId, std::string pId,
bool p3GroupDistrib::getParentMsgList(const std::string& grpId, const std::string& pId,
std::list<std::string> &msgIds)
{
RsStackMutex stack(distribMtx); /************* STACK MUTEX ************/
@ -2373,7 +2373,7 @@ bool p3GroupDistrib::getParentMsgList(std::string grpId, std::string pId,
return true;
}
bool p3GroupDistrib::getTimePeriodMsgList(std::string grpId, uint32_t timeMin,
bool p3GroupDistrib::getTimePeriodMsgList(const std::string& grpId, uint32_t timeMin,
uint32_t timeMax, std::list<std::string> &msgIds)
{
RsStackMutex stack(distribMtx); /************* STACK MUTEX ************/
@ -2397,7 +2397,7 @@ bool p3GroupDistrib::getTimePeriodMsgList(std::string grpId, uint32_t timeMin,
}
GroupInfo *p3GroupDistrib::locked_getGroupInfo(std::string grpId)
GroupInfo *p3GroupDistrib::locked_getGroupInfo(const std::string& grpId)
{
/************* ALREADY LOCKED ************/
std::map<std::string, GroupInfo>::iterator git;
@ -2409,7 +2409,7 @@ GroupInfo *p3GroupDistrib::locked_getGroupInfo(std::string grpId)
}
RsDistribMsg *p3GroupDistrib::locked_getGroupMsg(std::string grpId, std::string msgId)
RsDistribMsg *p3GroupDistrib::locked_getGroupMsg(const std::string& grpId, const std::string& msgId)
{
/************* ALREADY LOCKED ************/
@ -2765,7 +2765,6 @@ bool p3GroupDistrib::loadList(std::list<RsItem *>& load)
RsSerialType* childSer = createSerialiser();
grpCachePair gcPair;
pCacheId cId;
bool cached = false;
for(lit = load.begin(); lit != load.end(); lit++)
{
/* decide what type it is */
@ -2782,6 +2781,7 @@ bool p3GroupDistrib::loadList(std::list<RsItem *>& load)
if(loadGroup(newGrp, false)){
#ifdef ENABLE_CACHE_OPT
bool cached = false;
RsStackMutex stack(distribMtx);
if(!locked_historyCached(newGrp->grpId, cached)){
@ -5117,7 +5117,7 @@ bool p3GroupDistrib::locked_printDummyMsgs(GroupInfo &grp)
/***** These Functions are used by the children classes to access the dummyData
****/
bool p3GroupDistrib::getDummyParentMsgList(std::string grpId, std::string pId, std::list<std::string> &msgIds)
bool p3GroupDistrib::getDummyParentMsgList(const std::string& grpId, const std::string& pId, std::list<std::string> &msgIds)
{
#ifdef DISTRIB_DUMMYMSG_DEBUG
@ -5159,9 +5159,8 @@ bool p3GroupDistrib::getDummyParentMsgList(std::string grpId, std::string pId, s
}
RsDistribDummyMsg *p3GroupDistrib::locked_getGroupDummyMsg(std::string grpId, std::string msgId)
RsDistribDummyMsg *p3GroupDistrib::locked_getGroupDummyMsg(const std::string& grpId, const std::string& msgId)
{
locked_processHistoryCached(grpId);
#ifdef DISTRIB_DUMMYMSG_DEBUG
std::cerr << "p3GroupDistrib::locked_getGroupDummyMsg(grpId:" << grpId << "," << msgId << ")";

View File

@ -545,14 +545,14 @@ class p3GroupDistrib: public CacheSource, public CacheStore, public p3Config, pu
/* get Msg Lists */
bool getAllMsgList(std::string grpId, std::list<std::string> &msgIds);
bool getParentMsgList(std::string grpId, std::string pId, std::list<std::string> &msgIds);
bool getTimePeriodMsgList(std::string grpId, uint32_t timeMin,
bool getAllMsgList(const std::string& grpId, std::list<std::string> &msgIds);
bool getParentMsgList(const std::string& grpId, const std::string& pId, std::list<std::string> &msgIds);
bool getTimePeriodMsgList(const std::string& grpId, uint32_t timeMin,
uint32_t timeMax, std::list<std::string> &msgIds);
GroupInfo *locked_getGroupInfo(std::string grpId);
RsDistribMsg *locked_getGroupMsg(std::string grpId, std::string msgId);
GroupInfo *locked_getGroupInfo(const std::string& grpId);
RsDistribMsg *locked_getGroupMsg(const std::string& grpId, const std::string& msgId);
/*!
* for retrieving the grpList for which public keys are available
@ -834,8 +834,8 @@ bool locked_printAllDummyMsgs();
bool locked_printDummyMsgs(GroupInfo &info);
/* access the dummy msgs */
bool getDummyParentMsgList(std::string grpId, std::string pId, std::list<std::string> &msgIds);
RsDistribDummyMsg *locked_getGroupDummyMsg(std::string grpId, std::string msgId);
bool getDummyParentMsgList(const std::string& grpId, const std::string& pId, std::list<std::string> &msgIds);
RsDistribDummyMsg *locked_getGroupDummyMsg(const std::string& grpId, const std::string& msgId);
/* key cache functions - we use .... (not overloaded)

View File

@ -233,7 +233,7 @@ bool p3Forums::getForumThreadMsgList(const std::string &fId, const std::string &
getParentMsgList(fId, pId, msgIds);
std::list<std::string> msgDummyIds;
std::list<std::string> msgDummyIds;
getDummyParentMsgList(fId, pId, msgDummyIds);
RsStackMutex stack(distribMtx); /***** STACK LOCKED MUTEX *****/
@ -357,6 +357,9 @@ bool p3Forums::ForumMessageSend(ForumMsgInfo &info)
return false;
}
// return id
info.msgId = mId;
return setMessageStatus(info.forumId, mId, FORUM_MSG_STATUS_READ, FORUM_MSG_STATUS_MASK);
}
@ -365,28 +368,18 @@ bool p3Forums::setMessageStatus(const std::string& fId,const std::string& mId,co
{
RsStackMutex stack(distribMtx); /***** STACK LOCKED MUTEX *****/
std::list<RsForumReadStatus *>::iterator lit = mReadStatus.begin();
for(; lit != mReadStatus.end(); lit++)
{
if((*lit)->forumId == fId)
{
RsForumReadStatus* rsi = *lit;
rsi->msgReadStatus[mId] &= ~statusMask;
rsi->msgReadStatus[mId] |= (status & statusMask);
break;
}
}
// if forum id does not exist create one
if(lit == mReadStatus.end())
std::map<std::string, RsForumReadStatus*>::iterator mit = mReadStatus.find(fId);
if (mit != mReadStatus.end())
{
RsForumReadStatus* rsi = mit->second;
rsi->msgReadStatus[mId] &= ~statusMask;
rsi->msgReadStatus[mId] |= (status & statusMask);
} else {
// if forum id does not exist create one
RsForumReadStatus* rsi = new RsForumReadStatus();
rsi->forumId = fId;
rsi->msgReadStatus[mId] = status & statusMask;
mReadStatus.push_back(rsi);
mReadStatus[fId] = rsi;
mSaveList.push_back(rsi);
}
@ -400,33 +393,22 @@ bool p3Forums::setMessageStatus(const std::string& fId,const std::string& mId,co
bool p3Forums::getMessageStatus(const std::string& fId, const std::string& mId, uint32_t& status)
{
status = 0;
RsStackMutex stack(distribMtx);
std::list<RsForumReadStatus *>::iterator lit = mReadStatus.begin();
std::map<std::string, RsForumReadStatus*>::iterator fit = mReadStatus.find(fId);
for(; lit != mReadStatus.end(); lit++)
{
if((*lit)->forumId == fId)
{
break;
}
}
if(lit == mReadStatus.end())
if (fit == mReadStatus.end())
{
return false;
}
std::map<std::string, uint32_t >::iterator mit = (*lit)->msgReadStatus.find(mId);
std::map<std::string, uint32_t >::iterator rit = fit->second->msgReadStatus.find(mId);
if(mit != (*lit)->msgReadStatus.end())
if(rit != fit->second->msgReadStatus.end())
{
status = mit->second;
status = rit->second;
return true;
}
@ -569,28 +551,22 @@ bool p3Forums::getMessageCount(const std::string &fId, unsigned int &newCount, u
if (grpFlags & (RS_DISTRIB_ADMIN | RS_DISTRIB_SUBSCRIBED)) {
std::list<std::string> msgIds;
if (getAllMsgList(fId, msgIds)) {
std::list<std::string>::iterator mit;
RsStackMutex stack(distribMtx); /***** STACK LOCKED MUTEX *****/
std::list<RsForumReadStatus *>::iterator lit;
for(lit = mReadStatus.begin(); lit != mReadStatus.end(); lit++) {
if ((*lit)->forumId == fId) {
break;
}
}
if (lit == mReadStatus.end()) {
std::map<std::string, RsForumReadStatus*>::iterator fit = mReadStatus.find(fId);
if (fit == mReadStatus.end()) {
// no status available -> all messages are new
newCount += msgIds.size();
unreadCount += msgIds.size();
continue;
}
std::list<std::string>::iterator mit;
for (mit = msgIds.begin(); mit != msgIds.end(); mit++) {
std::map<std::string, uint32_t >::iterator rit = (*lit)->msgReadStatus.find(*mit);
std::map<std::string, uint32_t >::iterator rit = fit->second->msgReadStatus.find(*mit);
if (rit == (*lit)->msgReadStatus.end()) {
if (rit == fit->second->msgReadStatus.end()) {
// no status available -> message is new
newCount++;
unreadCount++;
@ -799,7 +775,7 @@ bool p3Forums::childLoadList(std::list<RsItem* >& configSaves)
{
if(NULL != (drs = dynamic_cast<RsForumReadStatus* >(*it)))
{
mReadStatus.push_back(drs);
mReadStatus[drs->forumId] = drs;
mSaveList.push_back(drs);
}
else

View File

@ -97,7 +97,7 @@ std::string createForumMsg(std::string fId, std::string pId,
std::string mForumsDir;
std::list<RsItem *> mSaveList; // store save data
std::list<RsForumReadStatus *> mReadStatus;
std::map<std::string, RsForumReadStatus*> mReadStatus;
};

View File

@ -42,6 +42,7 @@
#include <algorithm>
//#define DEBUG_FORUMS
/* Images for context menu icons */
#define IMAGE_MESSAGE ":/images/folder-draft.png"
@ -129,8 +130,8 @@ ForumsDialog::ForumsDialog(QWidget *parent)
ui.setupUi(this);
m_bProcessSettings = false;
m_bIsForumSubscribed = false;
m_bIsForumAdmin = false;
isForumSubscribed = false;
isForumAdmin = false;
connect( ui.forumTreeWidget, SIGNAL( treeCustomContextMenuRequested( QPoint ) ), this, SLOT( forumListCustomPopupMenu( QPoint ) ) );
connect( ui.threadTreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( threadListCustomPopupMenu( QPoint ) ) );
@ -190,7 +191,7 @@ ForumsDialog::ForumsDialog(QWidget *parent)
popularForums = ui.forumTreeWidget->addCategoryItem(tr("Popular Forums"), QIcon(IMAGE_FOLDERGREEN), false);
otherForums = ui.forumTreeWidget->addCategoryItem(tr("Other Forums"), QIcon(IMAGE_FOLDERYELLOW), false);
m_LastViewType = -1;
lastViewType = -1;
ui.clearButton->hide();
@ -269,10 +270,10 @@ void ForumsDialog::forumListCustomPopupMenu( QPoint point )
QMenu contextMnu( this );
QAction *action = contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Subscribe to Forum"), this, SLOT(subscribeToForum()));
action->setDisabled (mCurrForumId.empty() || m_bIsForumSubscribed);
action->setDisabled (mCurrForumId.empty() || isForumSubscribed);
action = contextMnu.addAction(QIcon(IMAGE_UNSUBSCRIBE), tr("Unsubscribe to Forum"), this, SLOT(unsubscribeToForum()));
action->setEnabled (!mCurrForumId.empty() && m_bIsForumSubscribed);
action->setEnabled (!mCurrForumId.empty() && isForumSubscribed);
contextMnu.addSeparator();
@ -282,12 +283,12 @@ void ForumsDialog::forumListCustomPopupMenu( QPoint point )
action->setEnabled (!mCurrForumId.empty ());
action = contextMnu.addAction(QIcon(":/images/settings16.png"), tr("Edit Forum Details"), this, SLOT(editForumDetails()));
action->setEnabled (!mCurrForumId.empty () && m_bIsForumAdmin);
action->setEnabled (!mCurrForumId.empty () && isForumAdmin);
QAction *restoreKeysAct = new QAction(QIcon(":/images/settings16.png"), tr("Restore Publish Rights for Forum" ), &contextMnu);
connect( restoreKeysAct , SIGNAL( triggered() ), this, SLOT( restoreForumKeys() ) );
restoreKeysAct->setEnabled(!mCurrForumId.empty() && !m_bIsForumAdmin);
restoreKeysAct->setEnabled(!mCurrForumId.empty() && !isForumAdmin);
contextMnu.addAction( restoreKeysAct);
action = contextMnu.addAction(QIcon(IMAGE_COPYLINK), tr("Copy RetroShare Link"), this, SLOT(copyForumLink()));
@ -296,10 +297,16 @@ void ForumsDialog::forumListCustomPopupMenu( QPoint point )
contextMnu.addSeparator();
action = contextMnu.addAction(QIcon(":/images/message-mail-read.png"), tr("Mark all as read"), this, SLOT(markMsgAsReadAll()));
action->setEnabled (!mCurrForumId.empty () && m_bIsForumSubscribed);
action->setEnabled (!mCurrForumId.empty () && isForumSubscribed);
action = contextMnu.addAction(QIcon(":/images/message-mail.png"), tr("Mark all as unread"), this, SLOT(markMsgAsUnreadAll()));
action->setEnabled (!mCurrForumId.empty () && m_bIsForumSubscribed);
action->setEnabled (!mCurrForumId.empty () && isForumSubscribed);
#ifdef DEBUG_FORUMS
contextMnu.addSeparator();
action = contextMnu.addAction("Generate mass data", this, SLOT(generateMassData()));
action->setEnabled (!mCurrForumId.empty() && isForumSubscribed);
#endif
contextMnu.exec(QCursor::pos());
}
@ -312,7 +319,7 @@ void ForumsDialog::threadListCustomPopupMenu( QPoint point )
connect( replyAct , SIGNAL( triggered() ), this, SLOT( createmessage() ) );
QAction *newthreadAct = new QAction(QIcon(IMAGE_DOWNLOADALL), tr( "Start New Thread" ), &contextMnu );
newthreadAct->setEnabled (m_bIsForumSubscribed);
newthreadAct->setEnabled (isForumSubscribed);
connect( newthreadAct , SIGNAL( triggered() ), this, SLOT( createthread() ) );
QAction *replyauthorAct = new QAction(QIcon(IMAGE_MESSAGEREPLY), tr( "Reply to Author" ), &contextMnu );
@ -336,7 +343,7 @@ void ForumsDialog::threadListCustomPopupMenu( QPoint point )
QAction *markMsgAsUnreadChildren = new QAction(QIcon(":/images/message-mail.png"), tr("Mark as unread") + " (" + tr ("with children") + ")", &contextMnu);
connect(markMsgAsUnreadChildren , SIGNAL(triggered()), this, SLOT(markMsgAsUnreadChildren()));
if (m_bIsForumSubscribed) {
if (isForumSubscribed) {
QList<QTreeWidgetItem*> Rows;
QList<QTreeWidgetItem*> RowsRead;
QList<QTreeWidgetItem*> RowsUnread;
@ -576,7 +583,7 @@ void ForumsDialog::changedThread ()
void ForumsDialog::clickedThread (QTreeWidgetItem *item, int column)
{
if (mCurrForumId.empty() || m_bIsForumSubscribed == false) {
if (mCurrForumId.empty() || isForumSubscribed == false) {
return;
}
@ -631,7 +638,7 @@ void ForumsDialog::CalculateIconsAndFonts(QTreeWidgetItem *pItem, bool &bHasRead
for (int i = 0; i < COLUMN_THREAD_COUNT; i++) {
QFont qf = pItem->font(i);
if (m_bIsForumSubscribed == false) {
if (isForumSubscribed == false) {
qf.setBold(false);
pItem->setTextColor(i, Qt::black);
} else if (bUnread) {
@ -680,11 +687,13 @@ void ForumsDialog::CalculateIconsAndFonts(QTreeWidgetItem *pItem /*= NULL*/)
void ForumsDialog::insertThreads()
{
#ifdef DEBUG_FORUMS
/* get the current Forum */
std::cerr << "ForumsDialog::insertThreads()" << std::endl;
#endif
m_bIsForumSubscribed = false;
m_bIsForumAdmin = false;
isForumSubscribed = false;
isForumAdmin = false;
if (mCurrForumId.empty())
{
@ -696,8 +705,10 @@ void ForumsDialog::insertThreads()
ui.postText->clear();
/* clear last stored forumID */
mCurrForumId.erase();
m_LastForumID.erase();
lastForumID.erase();
#ifdef DEBUG_FORUMS
std::cerr << "ForumsDialog::insertThreads() Current Thread Invalid" << std::endl;
#endif
ui.newmessageButton->setEnabled (false);
ui.newthreadButton->setEnabled (false);
@ -708,10 +719,10 @@ void ForumsDialog::insertThreads()
ForumInfo fi;
if (rsForums->getForumInfo (mCurrForumId, fi)) {
if (fi.subscribeFlags & RS_DISTRIB_ADMIN) {
m_bIsForumAdmin = true;
isForumAdmin = true;
}
if (fi.subscribeFlags & (RS_DISTRIB_ADMIN | RS_DISTRIB_SUBSCRIBED)) {
m_bIsForumSubscribed = true;
isForumSubscribed = true;
}
} else {
return;
@ -719,13 +730,13 @@ void ForumsDialog::insertThreads()
ui.forumName->setText(QString::fromStdWString(fi.forumName));
ui.newmessageButton->setEnabled (m_bIsForumSubscribed);
ui.newthreadButton->setEnabled (m_bIsForumSubscribed);
ui.newmessageButton->setEnabled (isForumSubscribed);
ui.newthreadButton->setEnabled (isForumSubscribed);
bool flatView = false;
bool useChildTS = false;
int ViewType = ui.viewBox->currentIndex();
switch(ViewType)
int viewType = ui.viewBox->currentIndex();
switch(viewType)
{
case VIEW_LAST_POST:
useChildTS = true;
@ -739,20 +750,20 @@ void ForumsDialog::insertThreads()
}
if (flatView) {
ui.threadTreeWidget->setRootIsDecorated( true );
ui.threadTreeWidget->setRootIsDecorated(false);
} else {
ui.threadTreeWidget->setRootIsDecorated( true );
ui.threadTreeWidget->setRootIsDecorated(true);
}
bool bExpandNewMessages = Settings->getExpandNewMessages();
bool expandNewMessages = Settings->getExpandNewMessages();
std::list<QTreeWidgetItem*> itemToExpand;
bool bFillComplete = false;
if (m_LastViewType != ViewType || m_LastForumID != mCurrForumId) {
bFillComplete = true;
bool fillComplete = false;
if (lastViewType != viewType || lastForumID != mCurrForumId) {
fillComplete = true;
}
int nFilterColumn = FilterColumnFromComboBox(ui.filterColumnComboBox->currentIndex());
int filterColumn = FilterColumnFromComboBox(ui.filterColumnComboBox->currentIndex());
uint32_t status;
std::list<ThreadInfoSummary> threads;
@ -762,13 +773,17 @@ void ForumsDialog::insertThreads()
QList<QTreeWidgetItem *> items;
for(tit = threads.begin(); tit != threads.end(); tit++)
{
#ifdef DEBUG_FORUMS
std::cerr << "ForumsDialog::insertThreads() Adding TopLevel Thread: mId: ";
std::cerr << tit->msgId << std::endl;
#endif
ForumMsgInfo msginfo;
if (rsForums->getForumMessage(mCurrForumId, tit->msgId, msginfo) == false) {
#ifdef DEBUG_FORUMS
std::cerr << "ForumsDialog::insertThreads() Failed to Get Msg";
std::cerr << std::endl;
#endif
continue;
}
@ -779,6 +794,8 @@ void ForumsDialog::insertThreads()
QTreeWidgetItem *item = new QTreeWidgetItem();
QString text;
{
QDateTime qtime;
if (useChildTS)
@ -786,43 +803,42 @@ void ForumsDialog::insertThreads()
else
qtime.setTime_t(tit->ts);
QString timestamp = qtime.toString("yyyy-MM-dd hh:mm:ss");
QString txt = timestamp;
text = qtime.toString("yyyy-MM-dd hh:mm:ss");
if (useChildTS)
{
QDateTime qtime2;
qtime2.setTime_t(tit->ts);
QString timestamp2 = qtime2.toString("yyyy-MM-dd hh:mm:ss");
txt += " / ";
txt += timestamp2;
text += " / ";
text += timestamp2;
}
item -> setText(COLUMN_THREAD_DATE, txt);
item->setText(COLUMN_THREAD_DATE, text);
}
item->setText(COLUMN_THREAD_TITLE, QString::fromStdWString(tit->title));
if (rsPeers->getPeerName(msginfo.srcId) !="")
text = QString::fromStdString(rsPeers->getPeerName(msginfo.srcId));
if (text.isEmpty())
{
item->setText(COLUMN_THREAD_AUTHOR, QString::fromStdString(rsPeers->getPeerName(msginfo.srcId)));
item->setText(COLUMN_THREAD_AUTHOR, tr("Anonymous"));
}
else
{
item->setText(COLUMN_THREAD_AUTHOR, tr("Anonymous"));
item->setText(COLUMN_THREAD_AUTHOR, text);
}
if (msginfo.msgflags & RS_DISTRIB_AUTHEN_REQ)
{
item->setText(COLUMN_THREAD_SIGNED, tr("signed"));
item->setIcon(COLUMN_THREAD_SIGNED,(QIcon(":/images/mail-signed.png")));
item->setIcon(COLUMN_THREAD_SIGNED, QIcon(":/images/mail-signed.png"));
}
else
{
item->setText(COLUMN_THREAD_SIGNED, tr("none"));
item->setIcon(COLUMN_THREAD_SIGNED,(QIcon(":/images/mail-signature-unknown.png")));
item->setIcon(COLUMN_THREAD_SIGNED, QIcon(":/images/mail-signature-unknown.png"));
}
if (nFilterColumn == COLUMN_THREAD_CONTENT) {
if (filterColumn == COLUMN_THREAD_CONTENT) {
// need content for filter
QTextDocument doc;
doc.setHtml(QString::fromStdWString(msginfo.msg));
@ -831,7 +847,7 @@ void ForumsDialog::insertThreads()
item->setData(COLUMN_THREAD_DATA, ROLE_THREAD_MSGID, QString::fromStdString(tit->msgId));
if (m_bIsForumSubscribed && !(msginfo.msgflags & RS_DISTRIB_MISSING_MSG)) {
if (isForumSubscribed && !(msginfo.msgflags & RS_DISTRIB_MISSING_MSG)) {
rsForums->getMessageStatus(msginfo.forumId, msginfo.msgId, status);
} else {
// show message as read
@ -854,24 +870,32 @@ void ForumsDialog::insertThreads()
std::list<ThreadInfoSummary> msgs;
std::list<ThreadInfoSummary>::iterator mit;
#ifdef DEBUG_FORUMS
std::cerr << "ForumsDialog::insertThreads() Getting Children of : " << pId;
std::cerr << std::endl;
#endif
if (rsForums->getForumThreadMsgList(mCurrForumId, pId, msgs))
{
#ifdef DEBUG_FORUMS
std::cerr << "ForumsDialog::insertThreads() #Children " << msgs.size();
std::cerr << std::endl;
#endif
/* iterate through child */
for(mit = msgs.begin(); mit != msgs.end(); mit++)
{
#ifdef DEBUG_FORUMS
std::cerr << "ForumsDialog::insertThreads() adding " << mit->msgId;
std::cerr << std::endl;
#endif
ForumMsgInfo msginfo;
if (rsForums->getForumMessage(mCurrForumId, mit->msgId, msginfo) == false) {
#ifdef DEBUG_FORUMS
std::cerr << "ForumsDialog::insertThreads() Failed to Get Msg";
std::cerr << std::endl;
#endif
continue;
}
@ -892,30 +916,29 @@ void ForumsDialog::insertThreads()
else
qtime.setTime_t(mit->ts);
QString timestamp = qtime.toString("yyyy-MM-dd hh:mm:ss");
text = qtime.toString("yyyy-MM-dd hh:mm:ss");
QString txt = timestamp;
if (useChildTS)
{
QDateTime qtime2;
qtime2.setTime_t(mit->ts);
QString timestamp2 = qtime2.toString("yyyy-MM-dd hh:mm:ss");
txt += " / ";
txt += timestamp2;
text += " / ";
text += timestamp2;
}
child -> setText(COLUMN_THREAD_DATE, txt);
child->setText(COLUMN_THREAD_DATE, text);
}
child->setText(COLUMN_THREAD_TITLE, QString::fromStdWString(mit->title));
if (rsPeers->getPeerName(msginfo.srcId) !="")
text = QString::fromStdString(rsPeers->getPeerName(msginfo.srcId));
if (text.isEmpty())
{
child->setText(COLUMN_THREAD_AUTHOR, QString::fromStdString(rsPeers->getPeerName(msginfo.srcId)));
child->setText(COLUMN_THREAD_AUTHOR, tr("Anonymous"));
}
else
{
child->setText(COLUMN_THREAD_AUTHOR, tr("Anonymous"));
child->setText(COLUMN_THREAD_AUTHOR, text);
}
if (msginfo.msgflags & RS_DISTRIB_AUTHEN_REQ)
@ -929,7 +952,7 @@ void ForumsDialog::insertThreads()
child->setIcon(COLUMN_THREAD_SIGNED,(QIcon(":/images/mail-signature-unknown.png")));
}
if (nFilterColumn == COLUMN_THREAD_CONTENT) {
if (filterColumn == COLUMN_THREAD_CONTENT) {
// need content for filter
QTextDocument doc;
doc.setHtml(QString::fromStdWString(msginfo.msg));
@ -938,7 +961,7 @@ void ForumsDialog::insertThreads()
child->setData(COLUMN_THREAD_DATA, ROLE_THREAD_MSGID, QString::fromStdString(mit->msgId));
if (m_bIsForumSubscribed && !(msginfo.msgflags & RS_DISTRIB_MISSING_MSG)) {
if (isForumSubscribed && !(msginfo.msgflags & RS_DISTRIB_MISSING_MSG)) {
rsForums->getMessageStatus(msginfo.forumId, msginfo.msgId, status);
} else {
// show message as read
@ -948,7 +971,7 @@ void ForumsDialog::insertThreads()
child->setData(COLUMN_THREAD_DATA, ROLE_THREAD_MISSING, (msginfo.msgflags & RS_DISTRIB_MISSING_MSG) ? true : false);
if (bFillComplete && bExpandNewMessages && IS_UNREAD(status)) {
if (fillComplete && expandNewMessages && IS_UNREAD(status)) {
QTreeWidgetItem *pParent = child;
while ((pParent = pParent->parent()) != NULL) {
if (std::find(itemToExpand.begin(), itemToExpand.end(), pParent) == itemToExpand.end()) {
@ -975,13 +998,13 @@ void ForumsDialog::insertThreads()
ui.postText->clear();
ui.threadTitle->clear();
/* add all messages in! */
if (m_LastViewType != ViewType || m_LastForumID != mCurrForumId) {
if (lastViewType != viewType || lastForumID != mCurrForumId) {
ui.threadTreeWidget->clear();
m_LastViewType = ViewType;
m_LastForumID = mCurrForumId;
lastViewType = viewType;
lastForumID = mCurrForumId;
ui.threadTreeWidget->insertTopLevelItems(0, items);
} else {
FillThreads (items, bExpandNewMessages, itemToExpand);
FillThreads (items, expandNewMessages, itemToExpand);
CleanupItems (items);
}
@ -1001,7 +1024,7 @@ void ForumsDialog::insertThreads()
CalculateIconsAndFonts();
}
void ForumsDialog::FillThreads(QList<QTreeWidgetItem *> &ThreadList, bool bExpandNewMessages, std::list<QTreeWidgetItem*> &itemToExpand)
void ForumsDialog::FillThreads(QList<QTreeWidgetItem *> &ThreadList, bool expandNewMessages, std::list<QTreeWidgetItem*> &itemToExpand)
{
int Index = 0;
QTreeWidgetItem *Thread;
@ -1052,7 +1075,7 @@ void ForumsDialog::FillThreads(QList<QTreeWidgetItem *> &ThreadList, bool bExpan
}
// fill recursive
FillChildren (Thread, *NewThread, bExpandNewMessages, itemToExpand);
FillChildren (Thread, *NewThread, expandNewMessages, itemToExpand);
} else {
// add new thread
ui.threadTreeWidget->addTopLevelItem (*NewThread);
@ -1061,7 +1084,7 @@ void ForumsDialog::FillThreads(QList<QTreeWidgetItem *> &ThreadList, bool bExpan
}
uint32_t status = Thread->data (COLUMN_THREAD_DATA, ROLE_THREAD_STATUS).toUInt();
if (bExpandNewMessages && IS_UNREAD(status)) {
if (expandNewMessages && IS_UNREAD(status)) {
QTreeWidgetItem *pParent = Thread;
while ((pParent = pParent->parent()) != NULL) {
if (std::find(itemToExpand.begin(), itemToExpand.end(), pParent) == itemToExpand.end()) {
@ -1072,7 +1095,7 @@ void ForumsDialog::FillThreads(QList<QTreeWidgetItem *> &ThreadList, bool bExpan
}
}
void ForumsDialog::FillChildren(QTreeWidgetItem *Parent, QTreeWidgetItem *NewParent, bool bExpandNewMessages, std::list<QTreeWidgetItem*> &itemToExpand)
void ForumsDialog::FillChildren(QTreeWidgetItem *Parent, QTreeWidgetItem *NewParent, bool expandNewMessages, std::list<QTreeWidgetItem*> &itemToExpand)
{
int Index = 0;
int NewIndex;
@ -1130,7 +1153,7 @@ void ForumsDialog::FillChildren(QTreeWidgetItem *Parent, QTreeWidgetItem *NewPar
}
// fill recursive
FillChildren (Child, NewChild, bExpandNewMessages, itemToExpand);
FillChildren (Child, NewChild, expandNewMessages, itemToExpand);
} else {
// add new child
Child = NewParent->takeChild(NewIndex);
@ -1140,7 +1163,7 @@ void ForumsDialog::FillChildren(QTreeWidgetItem *Parent, QTreeWidgetItem *NewPar
}
uint32_t status = Child->data (COLUMN_THREAD_DATA, ROLE_THREAD_STATUS).toUInt();
if (bExpandNewMessages && IS_UNREAD(status)) {
if (expandNewMessages && IS_UNREAD(status)) {
QTreeWidgetItem *pParent = Child;
while ((pParent = pParent->parent()) != NULL) {
if (std::find(itemToExpand.begin(), itemToExpand.end(), pParent) == itemToExpand.end()) {
@ -1176,7 +1199,7 @@ void ForumsDialog::insertPost()
ui.nextButton->setEnabled(false);
}
ui.newmessageButton->setEnabled (m_bIsForumSubscribed && mCurrThreadId.empty() == false);
ui.newmessageButton->setEnabled (isForumSubscribed && mCurrThreadId.empty() == false);
/* get the Post */
ForumMsgInfo msg;
@ -1349,7 +1372,7 @@ void ForumsDialog::setMsgAsReadUnread(QList<QTreeWidgetItem*> &Rows, bool bRead)
void ForumsDialog::markMsgAsReadUnread (bool bRead, bool bChildren, bool bForum)
{
if (mCurrForumId.empty() || m_bIsForumSubscribed == false) {
if (mCurrForumId.empty() || isForumSubscribed == false) {
return;
}
@ -1468,7 +1491,7 @@ void ForumsDialog::newforum()
void ForumsDialog::createmessage()
{
if (mCurrForumId.empty () || m_bIsForumSubscribed == false) {
if (mCurrForumId.empty () || isForumSubscribed == false) {
return;
}
@ -1607,8 +1630,8 @@ void ForumsDialog::filterColumnChanged()
return;
}
int nFilterColumn = FilterColumnFromComboBox(ui.filterColumnComboBox->currentIndex());
if (nFilterColumn == COLUMN_THREAD_CONTENT) {
int filterColumn = FilterColumnFromComboBox(ui.filterColumnComboBox->currentIndex());
if (filterColumn == COLUMN_THREAD_CONTENT) {
// need content ... refill
insertThreads();
} else {
@ -1616,26 +1639,26 @@ void ForumsDialog::filterColumnChanged()
}
// save index
Settings->setValueToGroup("ForumsDialog", "filterColumn", nFilterColumn);
Settings->setValueToGroup("ForumsDialog", "filterColumn", filterColumn);
}
void ForumsDialog::FilterItems()
{
QString sPattern = ui.filterPatternLineEdit->text();
int nFilterColumn = FilterColumnFromComboBox(ui.filterColumnComboBox->currentIndex());
int filterColumn = FilterColumnFromComboBox(ui.filterColumnComboBox->currentIndex());
int nCount = ui.threadTreeWidget->topLevelItemCount ();
for (int nIndex = 0; nIndex < nCount; nIndex++) {
FilterItem(ui.threadTreeWidget->topLevelItem(nIndex), sPattern, nFilterColumn);
FilterItem(ui.threadTreeWidget->topLevelItem(nIndex), sPattern, filterColumn);
}
}
bool ForumsDialog::FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int nFilterColumn)
bool ForumsDialog::FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int filterColumn)
{
bool bVisible = true;
if (sPattern.isEmpty() == false) {
if (pItem->text(nFilterColumn).contains(sPattern, Qt::CaseInsensitive) == false) {
if (pItem->text(filterColumn).contains(sPattern, Qt::CaseInsensitive) == false) {
bVisible = false;
}
}
@ -1643,7 +1666,7 @@ bool ForumsDialog::FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int nFi
int nVisibleChildCount = 0;
int nCount = pItem->childCount();
for (int nIndex = 0; nIndex < nCount; nIndex++) {
if (FilterItem(pItem->child(nIndex), sPattern, nFilterColumn)) {
if (FilterItem(pItem->child(nIndex), sPattern, filterColumn)) {
nVisibleChildCount++;
}
}
@ -1722,3 +1745,40 @@ bool ForumsDialog::navigate(const std::string& forumId, const std::string& msgId
return false;
}
void ForumsDialog::generateMassData()
{
#ifdef DEBUG_FORUMS
if (mCurrForumId.empty ()) {
return;
}
if (QMessageBox::question(this, "Generate mass data", "Do you really want to generate mass data ?", QMessageBox::Yes|QMessageBox::No, QMessageBox::No) == QMessageBox::No) {
return;
}
for (int thread = 1; thread < 1000; thread++) {
ForumMsgInfo threadInfo;
threadInfo.forumId = mCurrForumId;
threadInfo.title = QString("Test %1").arg(thread, 3, 10, QChar('0')).toStdWString();
threadInfo.msg = QString("That is only a test").toStdWString();
if (rsForums->ForumMessageSend(threadInfo) == false) {
return;
}
for (int msg = 1; msg < 3; msg++) {
ForumMsgInfo msgInfo;
msgInfo.forumId = mCurrForumId;
msgInfo.threadId = threadInfo.msgId;
msgInfo.parentId = threadInfo.msgId;
msgInfo.title = threadInfo.title;
msgInfo.msg = threadInfo.msg;
if (rsForums->ForumMessageSend(msgInfo) == false) {
return;
}
}
}
#endif
}

View File

@ -91,6 +91,8 @@ private slots:
void filterRegExpChanged();
void clearFilter();
void generateMassData();
private:
void insertForums();
void insertThreads();
@ -112,7 +114,7 @@ private:
void togglethreadview_internal();
void FilterItems();
bool FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int nFilterColumn);
bool FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int filterColumn);
bool m_bProcessSettings;
@ -123,12 +125,12 @@ private:
std::string mCurrForumId;
std::string mCurrThreadId;
bool m_bIsForumSubscribed;
bool m_bIsForumAdmin;
bool isForumSubscribed;
bool isForumAdmin;
QFont m_ForumNameFont;
int m_LastViewType;
std::string m_LastForumID;
int lastViewType;
std::string lastForumID;
/** Qt Designer generated object */
Ui::ForumsDialog ui;

View File

@ -3686,7 +3686,7 @@ p, li { white-space: pre-wrap; }
<context>
<name>ForumsDialog</name>
<message>
<location filename="../gui/ForumsDialog.cpp" line="+271"/>
<location filename="../gui/ForumsDialog.cpp" line="+272"/>
<source>Subscribe to Forum</source>
<translation>Forum abonnieren</translation>
</message>
@ -3717,12 +3717,12 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location line="+6"/>
<location line="+93"/>
<location line="+99"/>
<source>Copy RetroShare Link</source>
<translation>Kopiere RetroShare Link</translation>
</message>
<message>
<location line="-88"/>
<location line="-94"/>
<source>Mark all as read</source>
<translation>Alle als gelesen markieren</translation>
</message>
@ -3732,7 +3732,7 @@ p, li { white-space: pre-wrap; }
<translation>Alle als ungelesen markieren</translation>
</message>
<message>
<location line="+10"/>
<location line="+16"/>
<source>Reply</source>
<translation>Antwort</translation>
</message>
@ -3767,20 +3767,20 @@ p, li { white-space: pre-wrap; }
<translation type="unfinished"></translation>
</message>
<message>
<location line="+328"/>
<location line="+107"/>
<location line="+333"/>
<location line="+114"/>
<source>Anonymous</source>
<translation>Anonym</translation>
</message>
<message>
<location line="-102"/>
<location line="+107"/>
<location line="-105"/>
<location line="+114"/>
<source>signed</source>
<translation>unterzeichnet</translation>
</message>
<message>
<location line="-102"/>
<location line="+107"/>
<location line="-109"/>
<location line="+114"/>
<source>none</source>
<translation>keine</translation>
</message>
@ -3801,7 +3801,7 @@ p, li { white-space: pre-wrap; }
<translation>Du kannst einem anonymen Autor nicht antworten</translation>
</message>
<message>
<location line="-1377"/>
<location line="-1399"/>
<source>Your Forums</source>
<translation>Deine Foren</translation>
</message>
@ -3947,8 +3947,8 @@ p, li { white-space: pre-wrap; }
<translation>Druckvorschau</translation>
</message>
<message>
<location filename="../gui/ForumsDialog.cpp" line="+123"/>
<location line="+1175"/>
<location filename="../gui/ForumsDialog.cpp" line="+129"/>
<location line="+1191"/>
<source>Start New Thread</source>
<translation>Erstelle neues Thema</translation>
</message>
@ -3976,7 +3976,7 @@ p, li { white-space: pre-wrap; }
<translation>Inhalt</translation>
</message>
<message>
<location filename="../gui/ForumsDialog.cpp" line="-1162"/>
<location filename="../gui/ForumsDialog.cpp" line="-1178"/>
<location line="+3"/>
<source>Mark as read</source>
<translation>Als gelesen markieren</translation>
@ -4003,7 +4003,7 @@ p, li { white-space: pre-wrap; }
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Arial&apos;; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Friends&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
<translation>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Arial&apos;; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
@ -4012,99 +4012,99 @@ p, li { white-space: pre-wrap; }
<message>
<location line="+16"/>
<source>Add</source>
<translation type="unfinished">Hinzufügen</translation>
<translation>Hinzufügen</translation>
</message>
<message>
<location line="+57"/>
<source>Display</source>
<translation type="unfinished">Anzeige</translation>
<translation>Anzeige</translation>
</message>
<message>
<location line="+111"/>
<source>Friends</source>
<translation type="unfinished">Freunde</translation>
<translation>Freunde</translation>
</message>
<message>
<location line="+5"/>
<source>Status</source>
<translation type="unfinished">Status</translation>
<translation>Status</translation>
</message>
<message>
<location line="+63"/>
<source>Add or Change your Avatar</source>
<translation type="unfinished">Wähle oder ändere dein Avatar Bild</translation>
<translation>Wähle oder ändere dein Avatar Bild</translation>
</message>
<message>
<location line="+67"/>
<source>Edit Personal message</source>
<translation type="unfinished">Statusnachricht ändern</translation>
<translation>Statusnachricht ändern</translation>
</message>
<message>
<location line="+38"/>
<source>Group Chat</source>
<translation type="unfinished">Gruppenchat</translation>
<translation>Gruppenchat</translation>
</message>
<message>
<location line="+104"/>
<source>Messages entered here are sent to all collected friends</source>
<translation type="unfinished">Nachrichten, die Du hier eingibst, werden an alle verbundenen Freunde versendet</translation>
<translation>Nachrichten, die Du hier eingibst, werden an alle verbundenen Freunde versendet</translation>
</message>
<message>
<location line="+96"/>
<source>Bold</source>
<translation type="unfinished">Fett</translation>
<translation>Fett</translation>
</message>
<message>
<location line="+41"/>
<source>Underline</source>
<translation type="unfinished">Unterstrichen</translation>
<translation>Unterstrichen</translation>
</message>
<message>
<location line="+41"/>
<source>Italic</source>
<translation type="unfinished">Kursiv</translation>
<translation>Kursiv</translation>
</message>
<message>
<location line="+41"/>
<source>Font</source>
<translation type="unfinished">Schriftart</translation>
<translation>Schriftart</translation>
</message>
<message>
<location line="+38"/>
<source>Text Color</source>
<translation type="unfinished">Textfarbe</translation>
<translation>Textfarbe</translation>
</message>
<message>
<location line="+90"/>
<source>Attach File</source>
<translation type="unfinished">Datei anhängen</translation>
<translation>Datei anhängen</translation>
</message>
<message>
<location line="+41"/>
<source>Send</source>
<translation type="unfinished">Senden</translation>
<translation>Senden</translation>
</message>
<message>
<location line="+27"/>
<source>Clear Chat History</source>
<translation type="unfinished">Nachrichtenverlauf leeren</translation>
<translation>Nachrichtenverlauf leeren</translation>
</message>
<message>
<location line="+9"/>
<location filename="../gui/FriendsDialog.cpp" line="+443"/>
<source>Add Friend</source>
<translation type="unfinished">Freund hinzufügen</translation>
<translation>Freund hinzufügen</translation>
</message>
<message>
<location line="+9"/>
<source>Create new Profile</source>
<translation type="unfinished">Erstelle neues Profil</translation>
<translation>Erstelle neues Profil</translation>
</message>
<message>
<location line="+9"/>
<location line="+3"/>
<source>Create new Forum</source>
<translation type="unfinished">Erstelle neues Forum</translation>
<translation>Erstelle neues Forum</translation>
</message>
<message>
<location line="+3"/>
@ -4115,7 +4115,7 @@ p, li { white-space: pre-wrap; }
<location line="+9"/>
<location line="+3"/>
<source>Create new Channel</source>
<translation type="unfinished">Erstelle neuen Kanal</translation>
<translation>Erstelle neuen Kanal</translation>
</message>
<message>
<location line="+3"/>
@ -4125,306 +4125,306 @@ p, li { white-space: pre-wrap; }
<message>
<location line="+9"/>
<source>Add your Avatar Picture</source>
<translation type="unfinished">Wähle dein Avatar Bild</translation>
<translation>Wähle dein Avatar Bild</translation>
</message>
<message>
<location line="+3"/>
<source>A</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<location line="+9"/>
<source>Set your Personal Message</source>
<translation type="unfinished">Statusnachricht ändern</translation>
<translation>Statusnachricht ändern</translation>
</message>
<message>
<location line="+3"/>
<source>Edit your status Message</source>
<translation type="unfinished">Statusnachricht ändern</translation>
<translation>Statusnachricht ändern</translation>
</message>
<message>
<location line="+5"/>
<source>Browse Message History</source>
<translation type="unfinished">Nachrichtenverlauf anzeigen</translation>
<translation>Nachrichtenverlauf anzeigen</translation>
</message>
<message>
<location line="+3"/>
<source>Browse History</source>
<translation type="unfinished">Nachrichtenverlauf</translation>
<translation>Nachrichtenverlauf</translation>
</message>
<message>
<location line="+5"/>
<location line="+3"/>
<source>Save Chat History</source>
<translation type="unfinished">Nachrichtenverlauf speichern</translation>
<translation>Nachrichtenverlauf speichern</translation>
</message>
<message>
<location line="+8"/>
<source>Hide Offline Friends</source>
<translation type="unfinished">Verstecke offline Freunde</translation>
<translation>Verstecke offline Freunde</translation>
</message>
<message>
<location line="+8"/>
<source>Hide Status Column</source>
<translation type="unfinished">Status Spalte ausblenden</translation>
<translation>Status Spalte ausblenden</translation>
</message>
<message>
<location line="+8"/>
<location line="+3"/>
<source>Sort by State</source>
<translation type="unfinished">Sortiere nach Status</translation>
<translation>Sortiere nach Status</translation>
</message>
<message>
<location line="+8"/>
<source>Hide State</source>
<translation type="unfinished">Status ausblenden</translation>
<translation>Status ausblenden</translation>
</message>
<message>
<location line="+9"/>
<location line="+3"/>
<source>Add a new Group</source>
<translation type="unfinished">Neue Gruppe hinzufügen</translation>
<translation>Neue Gruppe hinzufügen</translation>
</message>
<message>
<location line="+9"/>
<location line="+3"/>
<source>Sort Descending Order</source>
<translation type="unfinished">Absteigend sortieren</translation>
<translation>Absteigend sortieren</translation>
</message>
<message>
<location line="+9"/>
<location line="+3"/>
<source>Sort Ascending Order</source>
<translation type="unfinished">Aufsteigend sortieren</translation>
<translation>Aufsteigend sortieren</translation>
</message>
<message>
<location line="+9"/>
<source>Delete Chat History</source>
<translation type="unfinished">Nachrichtenverlauf löschen</translation>
<translation>Nachrichtenverlauf löschen</translation>
</message>
<message>
<location line="+3"/>
<source>Deletes all stored and displayed chat history</source>
<translation type="unfinished">Löscht den gespeicherten und angezeigten Chat Verlauf</translation>
<translation>Löscht den gespeicherten und angezeigten Chat Verlauf</translation>
</message>
<message>
<location filename="../gui/FriendsDialog.cpp" line="-291"/>
<source>Profile</source>
<translation type="unfinished">Profil</translation>
<translation>Profil</translation>
</message>
<message>
<location line="+2"/>
<source>News Feed</source>
<translation type="unfinished"></translation>
<translation>Neuigkeiten</translation>
</message>
<message>
<location line="+41"/>
<source>Welcome to RetroShare&apos;s group chat.</source>
<translation type="unfinished">Willkommen bei RetroShare&apos;s Gruppenchat.</translation>
<translation>Willkommen bei RetroShare&apos;s Gruppenchat.</translation>
</message>
<message>
<location line="+64"/>
<source>me</source>
<translation type="unfinished">ich</translation>
<translation>ich</translation>
</message>
<message>
<location line="+117"/>
<source>Paste RetroShare Link</source>
<translation type="unfinished">RetroShare Link einfügen</translation>
<translation>RetroShare Link einfügen</translation>
</message>
<message>
<location line="+49"/>
<source>Group</source>
<translation type="unfinished">Gruppe</translation>
<translation>Gruppe</translation>
</message>
<message>
<location line="+4"/>
<source>Friend</source>
<translation type="unfinished">Freund</translation>
<translation>Freund</translation>
</message>
<message>
<location line="+4"/>
<source>Location</source>
<translation type="unfinished"></translation>
<translation>Standort</translation>
</message>
<message>
<location line="+9"/>
<source>Message Group</source>
<translation type="unfinished">Gruppe anschreiben</translation>
<translation>Gruppe anschreiben</translation>
</message>
<message>
<location line="+5"/>
<source>Edit Group</source>
<translation type="unfinished">Gruppe ändern</translation>
<translation>Gruppe ändern</translation>
</message>
<message>
<location line="+3"/>
<source>Remove Group</source>
<translation type="unfinished">Gruppe entfernen</translation>
<translation>Gruppe entfernen</translation>
</message>
<message>
<location line="+7"/>
<source>Chat</source>
<translation type="unfinished"></translation>
<translation>Chat</translation>
</message>
<message>
<location line="+1"/>
<source>Message Friend</source>
<translation type="unfinished">Freund anschreiben</translation>
<translation>Freund anschreiben</translation>
</message>
<message>
<location line="+4"/>
<source>Friend Details</source>
<translation type="unfinished">Freund-Details</translation>
<translation>Freund-Details</translation>
</message>
<message>
<location line="+5"/>
<source>Recommend this Friend to...</source>
<translation type="unfinished">Freund weiterempfehlen...</translation>
<translation>Freund weiterempfehlen...</translation>
</message>
<message>
<location line="+3"/>
<source>Connect To Friend</source>
<translation type="unfinished"></translation>
<translation>Zum Freund verbinden</translation>
</message>
<message>
<location line="+3"/>
<source>Copy RetroShare Link</source>
<translation type="unfinished">Kopiere RetroShare Link</translation>
<translation>Kopiere RetroShare Link</translation>
</message>
<message>
<location line="+3"/>
<location line="+80"/>
<source>Paste Friend Link</source>
<translation type="unfinished">RetroShare Link einfügen</translation>
<translation>RetroShare Link einfügen</translation>
</message>
<message>
<location line="-74"/>
<source>Deny Friend</source>
<translation type="unfinished">Blockiere Freund</translation>
<translation>Blockiere Freund</translation>
</message>
<message>
<location line="+3"/>
<source>Remove Friend Location</source>
<translation type="unfinished">Freund entfernen</translation>
<translation>Freund entfernen</translation>
</message>
<message>
<location line="+23"/>
<source>Add to group</source>
<translation type="unfinished">Hinzufügen zur Gruppe</translation>
<translation>Hinzufügen zur Gruppe</translation>
</message>
<message>
<location line="+9"/>
<source>Move to group</source>
<translation type="unfinished">Verschiebe in Gruppe</translation>
<translation>Verschiebe in Gruppe</translation>
</message>
<message>
<location line="+12"/>
<source>Groups</source>
<translation type="unfinished">Gruppen</translation>
<translation>Gruppen</translation>
</message>
<message>
<location line="+13"/>
<source>Remove from group</source>
<translation type="unfinished">Aus Gruppe entfernen</translation>
<translation>Aus Gruppe entfernen</translation>
</message>
<message>
<location line="+5"/>
<source>Remove from all groups</source>
<translation type="unfinished">Aus allen Gruppen entfernen</translation>
<translation>Aus allen Gruppen entfernen</translation>
</message>
<message>
<location line="+17"/>
<source>Expand all</source>
<translation type="unfinished">Alle erweitern</translation>
<translation>Alle erweitern</translation>
</message>
<message>
<location line="+1"/>
<source>Collapse all</source>
<translation type="unfinished">Alle reduzieren</translation>
<translation>Alle reduzieren</translation>
</message>
<message>
<location line="+350"/>
<source>location</source>
<translation type="unfinished">Standort</translation>
<translation>Standort</translation>
</message>
<message>
<location line="+154"/>
<location line="+2"/>
<source>Available</source>
<translation type="unfinished">Verfügbar</translation>
<translation>Verfügbar</translation>
</message>
<message>
<location line="+98"/>
<source>Save Certificate</source>
<translation type="unfinished">Zertifikat speichern</translation>
<translation>Zertifikat speichern</translation>
</message>
<message>
<location line="+0"/>
<source>Certificates (*.pqi)</source>
<translation type="unfinished">Zertifikate (*.pqi)</translation>
<translation>Zertifikate (*.pqi)</translation>
</message>
<message>
<location line="+131"/>
<source>Do you want to remove this Friend?</source>
<translation type="unfinished">Willst du diesen Freund entfernen?</translation>
<translation>Willst du diesen Freund entfernen?</translation>
</message>
<message>
<location line="+84"/>
<source>is typing...</source>
<translation type="unfinished">tippt...</translation>
<translation>tippt...</translation>
</message>
<message>
<location line="+135"/>
<location line="+2"/>
<source>New group chat</source>
<translation type="unfinished">Neuer Gruppenchat</translation>
<translation>Neuer Gruppenchat</translation>
</message>
<message>
<location line="+229"/>
<source>Do you really want to physically delete the history?</source>
<translation type="unfinished">Willst Du wirklich den Nachrichtenverlauf physisch löschen?</translation>
<translation>Willst Du wirklich den Nachrichtenverlauf physisch löschen?</translation>
</message>
<message>
<location line="+64"/>
<source>Load File</source>
<translation type="unfinished">Lade Datei</translation>
<translation>Lade Datei</translation>
</message>
<message>
<location line="+0"/>
<source>Pictures (*.png *.xpm *.jpg *.tiff *.gif)</source>
<translation type="unfinished">Bilder (*.png *.xpm *.jpg *.tiff *.gif)</translation>
<translation>Bilder (*.png *.xpm *.jpg *.tiff *.gif)</translation>
</message>
<message>
<location line="+67"/>
<source>Add Extra File</source>
<translation type="unfinished"></translation>
<translation>Zusätzliche Datei hinzufügen</translation>
</message>
<message>
<location line="+97"/>
<location line="+6"/>
<source>Drop file error.</source>
<translation type="unfinished">Dateifehler bei Drag&apos;n&apos;Drop.</translation>
<translation>Dateifehler bei Drag&apos;n&apos;Drop.</translation>
</message>
<message>
<location line="-6"/>
<source>Directory can&apos;t be dropped, only files are accepted.</source>
<translation type="unfinished">Ordner können nicht für Drag&apos;n&apos;Drop genutzt werden. Nur Dateien werden akzeptiert.</translation>
<translation>Ordner können nicht für Drag&apos;n&apos;Drop genutzt werden. Nur Dateien werden akzeptiert.</translation>
</message>
<message>
<location line="+6"/>
<source>File not found or file name not accepted.</source>
<translation type="unfinished">Datei nicht gefunden oder Dateiname nicht akzeptiert.</translation>
<translation>Datei nicht gefunden oder Dateiname nicht akzeptiert.</translation>
</message>
<message>
<location line="+51"/>
<source>Save as...</source>
<translation type="unfinished">Speichern unter...</translation>
<translation>Speichern unter...</translation>
</message>
<message>
<location line="+0"/>
<source>Text File (*.txt );;All Files (*)</source>
<translation type="unfinished">Text Datei (*.txt );;Alle Dateien (*)</translation>
<translation>Text Datei (*.txt );;Alle Dateien (*)</translation>
</message>
</context>
<context>
@ -6989,7 +6989,7 @@ p, li { white-space: pre-wrap; }
<message>
<location line="-5"/>
<location filename="../gui/MessagesDialog.cpp" line="-1"/>
<location line="+736"/>
<location line="+737"/>
<source>From</source>
<translation>Von</translation>
</message>
@ -7071,16 +7071,16 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location line="+175"/>
<location filename="../gui/MessagesDialog.cpp" line="-62"/>
<location line="+834"/>
<location filename="../gui/MessagesDialog.cpp" line="-63"/>
<location line="+835"/>
<location line="+10"/>
<source>Inbox</source>
<translation>Posteingang</translation>
</message>
<message>
<location line="+9"/>
<location filename="../gui/MessagesDialog.cpp" line="-840"/>
<location line="+853"/>
<location filename="../gui/MessagesDialog.cpp" line="-841"/>
<location line="+854"/>
<location line="+8"/>
<source>Outbox</source>
<translation>Postausgang</translation>
@ -7092,7 +7092,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location line="+9"/>
<location filename="../gui/MessagesDialog.cpp" line="-853"/>
<location filename="../gui/MessagesDialog.cpp" line="-854"/>
<source>Sent</source>
<translation>Gesendet</translation>
</message>
@ -7241,12 +7241,12 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location line="+1"/>
<location line="+728"/>
<location line="+729"/>
<source>Click to sort by from</source>
<translation>Klicken, um nach Von zu sortieren</translation>
</message>
<message>
<location line="-727"/>
<location line="-728"/>
<source>Click to sort by date</source>
<translation>Klicken, um nach Datum zu sortieren</translation>
</message>
@ -7272,7 +7272,7 @@ p, li { white-space: pre-wrap; }
<translation type="obsolete">Empfohlene Dateien einblenden</translation>
</message>
<message>
<location line="+729"/>
<location line="+730"/>
<source>Click to sort by to</source>
<translation>Klicken, um nach Empfänger zu sortieren</translation>
</message>
@ -7294,7 +7294,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="../gui/MessagesDialog.ui" line="-9"/>
<location filename="../gui/MessagesDialog.cpp" line="-684"/>
<location filename="../gui/MessagesDialog.cpp" line="-685"/>
<source>Reply to All</source>
<translation>Allen antworten</translation>
</message>
@ -7332,7 +7332,7 @@ p, li { white-space: pre-wrap; }
<message>
<location line="+172"/>
<location filename="../gui/MessagesDialog.cpp" line="+598"/>
<location line="+880"/>
<location line="+881"/>
<location line="+5"/>
<source>Trash</source>
<translation>Papierkorb</translation>
@ -7355,7 +7355,7 @@ p, li { white-space: pre-wrap; }
<translation type="obsolete">Neues Schlagwort...</translation>
</message>
<message>
<location filename="../gui/MessagesDialog.cpp" line="-1199"/>
<location filename="../gui/MessagesDialog.cpp" line="-1200"/>
<source>Mark as read</source>
<translation>Als gelesen markieren</translation>
</message>
@ -7381,7 +7381,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location line="+241"/>
<location line="+869"/>
<location line="+870"/>
<location line="+8"/>
<source>Drafts</source>
<translation>Entwürfe</translation>
@ -7396,7 +7396,7 @@ p, li { white-space: pre-wrap; }
<translation type="obsolete">Editieren...</translation>
</message>
<message>
<location line="-727"/>
<location line="-728"/>
<source>Click to sort by star</source>
<translation>Klicken, um nach Kennzeichnung zu sortieren</translation>
</message>
@ -7406,7 +7406,7 @@ p, li { white-space: pre-wrap; }
<translation>Es sind keine gekennzeichneten Nachrichten vorhanden. Durch die Kennzeichnung kannst du Nachrichten mit einem speziellen Status versehen, sodass sie leichter zu finden sind. Klicke zum Kennzeichnen einer Nachricht auf den hellgrauen Stern neben der jeweiligen Nachricht.</translation>
</message>
<message>
<location line="+764"/>
<location line="+765"/>
<location line="+4"/>
<location line="+4"/>
<location line="+4"/>