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; pCacheId pCid;
int count = 0; int count = 0;
int count2 = 0, count3 = 0; // int count2 = 0, count3 = 0;
for(; msgIt != mMsgHistPending.end(); msgIt++) for(; msgIt != mMsgHistPending.end(); msgIt++)
{ {
@ -2321,7 +2321,7 @@ void p3GroupDistrib::getPopularGroupList(uint32_t popMin, uint32_t popMax, std::
/* get Msg Lists */ /* 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 ************/ RsStackMutex stack(distribMtx); /************* STACK MUTEX ************/
@ -2346,7 +2346,7 @@ bool p3GroupDistrib::getAllMsgList(std::string grpId, std::list<std::string> &ms
return true; 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) std::list<std::string> &msgIds)
{ {
RsStackMutex stack(distribMtx); /************* STACK MUTEX ************/ RsStackMutex stack(distribMtx); /************* STACK MUTEX ************/
@ -2373,7 +2373,7 @@ bool p3GroupDistrib::getParentMsgList(std::string grpId, std::string pId,
return true; 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) uint32_t timeMax, std::list<std::string> &msgIds)
{ {
RsStackMutex stack(distribMtx); /************* STACK MUTEX ************/ 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 ************/ /************* ALREADY LOCKED ************/
std::map<std::string, GroupInfo>::iterator git; 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 ************/ /************* ALREADY LOCKED ************/
@ -2765,7 +2765,6 @@ bool p3GroupDistrib::loadList(std::list<RsItem *>& load)
RsSerialType* childSer = createSerialiser(); RsSerialType* childSer = createSerialiser();
grpCachePair gcPair; grpCachePair gcPair;
pCacheId cId; pCacheId cId;
bool cached = false;
for(lit = load.begin(); lit != load.end(); lit++) for(lit = load.begin(); lit != load.end(); lit++)
{ {
/* decide what type it is */ /* decide what type it is */
@ -2782,6 +2781,7 @@ bool p3GroupDistrib::loadList(std::list<RsItem *>& load)
if(loadGroup(newGrp, false)){ if(loadGroup(newGrp, false)){
#ifdef ENABLE_CACHE_OPT #ifdef ENABLE_CACHE_OPT
bool cached = false;
RsStackMutex stack(distribMtx); RsStackMutex stack(distribMtx);
if(!locked_historyCached(newGrp->grpId, cached)){ 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 /***** 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 #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); locked_processHistoryCached(grpId);
#ifdef DISTRIB_DUMMYMSG_DEBUG #ifdef DISTRIB_DUMMYMSG_DEBUG
std::cerr << "p3GroupDistrib::locked_getGroupDummyMsg(grpId:" << grpId << "," << msgId << ")"; 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 */ /* get Msg Lists */
bool getAllMsgList(std::string grpId, std::list<std::string> &msgIds); bool getAllMsgList(const std::string& grpId, std::list<std::string> &msgIds);
bool getParentMsgList(std::string grpId, std::string pId, std::list<std::string> &msgIds); bool getParentMsgList(const std::string& grpId, const std::string& pId, std::list<std::string> &msgIds);
bool getTimePeriodMsgList(std::string grpId, uint32_t timeMin, bool getTimePeriodMsgList(const std::string& grpId, uint32_t timeMin,
uint32_t timeMax, std::list<std::string> &msgIds); uint32_t timeMax, std::list<std::string> &msgIds);
GroupInfo *locked_getGroupInfo(std::string grpId); GroupInfo *locked_getGroupInfo(const std::string& grpId);
RsDistribMsg *locked_getGroupMsg(std::string grpId, std::string msgId); RsDistribMsg *locked_getGroupMsg(const std::string& grpId, const std::string& msgId);
/*! /*!
* for retrieving the grpList for which public keys are available * for retrieving the grpList for which public keys are available
@ -834,8 +834,8 @@ bool locked_printAllDummyMsgs();
bool locked_printDummyMsgs(GroupInfo &info); bool locked_printDummyMsgs(GroupInfo &info);
/* access the dummy msgs */ /* access the dummy msgs */
bool getDummyParentMsgList(std::string grpId, std::string pId, std::list<std::string> &msgIds); bool getDummyParentMsgList(const std::string& grpId, const std::string& pId, std::list<std::string> &msgIds);
RsDistribDummyMsg *locked_getGroupDummyMsg(std::string grpId, std::string msgId); RsDistribDummyMsg *locked_getGroupDummyMsg(const std::string& grpId, const std::string& msgId);
/* key cache functions - we use .... (not overloaded) /* 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); getParentMsgList(fId, pId, msgIds);
std::list<std::string> msgDummyIds; std::list<std::string> msgDummyIds;
getDummyParentMsgList(fId, pId, msgDummyIds); getDummyParentMsgList(fId, pId, msgDummyIds);
RsStackMutex stack(distribMtx); /***** STACK LOCKED MUTEX *****/ RsStackMutex stack(distribMtx); /***** STACK LOCKED MUTEX *****/
@ -357,6 +357,9 @@ bool p3Forums::ForumMessageSend(ForumMsgInfo &info)
return false; return false;
} }
// return id
info.msgId = mId;
return setMessageStatus(info.forumId, mId, FORUM_MSG_STATUS_READ, FORUM_MSG_STATUS_MASK); 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 *****/ RsStackMutex stack(distribMtx); /***** STACK LOCKED MUTEX *****/
std::list<RsForumReadStatus *>::iterator lit = mReadStatus.begin(); std::map<std::string, RsForumReadStatus*>::iterator mit = mReadStatus.find(fId);
if (mit != mReadStatus.end())
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())
{ {
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(); RsForumReadStatus* rsi = new RsForumReadStatus();
rsi->forumId = fId; rsi->forumId = fId;
rsi->msgReadStatus[mId] = status & statusMask; rsi->msgReadStatus[mId] = status & statusMask;
mReadStatus.push_back(rsi); mReadStatus[fId] = rsi;
mSaveList.push_back(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) bool p3Forums::getMessageStatus(const std::string& fId, const std::string& mId, uint32_t& status)
{ {
status = 0; status = 0;
RsStackMutex stack(distribMtx); 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 (fit == mReadStatus.end())
{
if((*lit)->forumId == fId)
{
break;
}
}
if(lit == mReadStatus.end())
{ {
return false; 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; 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)) { if (grpFlags & (RS_DISTRIB_ADMIN | RS_DISTRIB_SUBSCRIBED)) {
std::list<std::string> msgIds; std::list<std::string> msgIds;
if (getAllMsgList(fId, msgIds)) { if (getAllMsgList(fId, msgIds)) {
std::list<std::string>::iterator mit;
RsStackMutex stack(distribMtx); /***** STACK LOCKED MUTEX *****/ RsStackMutex stack(distribMtx); /***** STACK LOCKED MUTEX *****/
std::list<RsForumReadStatus *>::iterator lit; std::map<std::string, RsForumReadStatus*>::iterator fit = mReadStatus.find(fId);
for(lit = mReadStatus.begin(); lit != mReadStatus.end(); lit++) { if (fit == mReadStatus.end()) {
if ((*lit)->forumId == fId) {
break;
}
}
if (lit == mReadStatus.end()) {
// no status available -> all messages are new // no status available -> all messages are new
newCount += msgIds.size(); newCount += msgIds.size();
unreadCount += msgIds.size(); unreadCount += msgIds.size();
continue; continue;
} }
std::list<std::string>::iterator mit;
for (mit = msgIds.begin(); mit != msgIds.end(); 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 // no status available -> message is new
newCount++; newCount++;
unreadCount++; unreadCount++;
@ -799,7 +775,7 @@ bool p3Forums::childLoadList(std::list<RsItem* >& configSaves)
{ {
if(NULL != (drs = dynamic_cast<RsForumReadStatus* >(*it))) if(NULL != (drs = dynamic_cast<RsForumReadStatus* >(*it)))
{ {
mReadStatus.push_back(drs); mReadStatus[drs->forumId] = drs;
mSaveList.push_back(drs); mSaveList.push_back(drs);
} }
else else

View file

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

View file

@ -3686,7 +3686,7 @@ p, li { white-space: pre-wrap; }
<context> <context>
<name>ForumsDialog</name> <name>ForumsDialog</name>
<message> <message>
<location filename="../gui/ForumsDialog.cpp" line="+271"/> <location filename="../gui/ForumsDialog.cpp" line="+272"/>
<source>Subscribe to Forum</source> <source>Subscribe to Forum</source>
<translation>Forum abonnieren</translation> <translation>Forum abonnieren</translation>
</message> </message>
@ -3717,12 +3717,12 @@ p, li { white-space: pre-wrap; }
</message> </message>
<message> <message>
<location line="+6"/> <location line="+6"/>
<location line="+93"/> <location line="+99"/>
<source>Copy RetroShare Link</source> <source>Copy RetroShare Link</source>
<translation>Kopiere RetroShare Link</translation> <translation>Kopiere RetroShare Link</translation>
</message> </message>
<message> <message>
<location line="-88"/> <location line="-94"/>
<source>Mark all as read</source> <source>Mark all as read</source>
<translation>Alle als gelesen markieren</translation> <translation>Alle als gelesen markieren</translation>
</message> </message>
@ -3732,7 +3732,7 @@ p, li { white-space: pre-wrap; }
<translation>Alle als ungelesen markieren</translation> <translation>Alle als ungelesen markieren</translation>
</message> </message>
<message> <message>
<location line="+10"/> <location line="+16"/>
<source>Reply</source> <source>Reply</source>
<translation>Antwort</translation> <translation>Antwort</translation>
</message> </message>
@ -3767,20 +3767,20 @@ p, li { white-space: pre-wrap; }
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location line="+328"/> <location line="+333"/>
<location line="+107"/> <location line="+114"/>
<source>Anonymous</source> <source>Anonymous</source>
<translation>Anonym</translation> <translation>Anonym</translation>
</message> </message>
<message> <message>
<location line="-102"/> <location line="-105"/>
<location line="+107"/> <location line="+114"/>
<source>signed</source> <source>signed</source>
<translation>unterzeichnet</translation> <translation>unterzeichnet</translation>
</message> </message>
<message> <message>
<location line="-102"/> <location line="-109"/>
<location line="+107"/> <location line="+114"/>
<source>none</source> <source>none</source>
<translation>keine</translation> <translation>keine</translation>
</message> </message>
@ -3801,7 +3801,7 @@ p, li { white-space: pre-wrap; }
<translation>Du kannst einem anonymen Autor nicht antworten</translation> <translation>Du kannst einem anonymen Autor nicht antworten</translation>
</message> </message>
<message> <message>
<location line="-1377"/> <location line="-1399"/>
<source>Your Forums</source> <source>Your Forums</source>
<translation>Deine Foren</translation> <translation>Deine Foren</translation>
</message> </message>
@ -3947,8 +3947,8 @@ p, li { white-space: pre-wrap; }
<translation>Druckvorschau</translation> <translation>Druckvorschau</translation>
</message> </message>
<message> <message>
<location filename="../gui/ForumsDialog.cpp" line="+123"/> <location filename="../gui/ForumsDialog.cpp" line="+129"/>
<location line="+1175"/> <location line="+1191"/>
<source>Start New Thread</source> <source>Start New Thread</source>
<translation>Erstelle neues Thema</translation> <translation>Erstelle neues Thema</translation>
</message> </message>
@ -3976,7 +3976,7 @@ p, li { white-space: pre-wrap; }
<translation>Inhalt</translation> <translation>Inhalt</translation>
</message> </message>
<message> <message>
<location filename="../gui/ForumsDialog.cpp" line="-1162"/> <location filename="../gui/ForumsDialog.cpp" line="-1178"/>
<location line="+3"/> <location line="+3"/>
<source>Mark as read</source> <source>Mark as read</source>
<translation>Als gelesen markieren</translation> <translation>Als gelesen markieren</translation>
@ -4003,7 +4003,7 @@ p, li { white-space: pre-wrap; }
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;/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> &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; &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; } 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;/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> <message>
<location line="+16"/> <location line="+16"/>
<source>Add</source> <source>Add</source>
<translation type="unfinished">Hinzufügen</translation> <translation>Hinzufügen</translation>
</message> </message>
<message> <message>
<location line="+57"/> <location line="+57"/>
<source>Display</source> <source>Display</source>
<translation type="unfinished">Anzeige</translation> <translation>Anzeige</translation>
</message> </message>
<message> <message>
<location line="+111"/> <location line="+111"/>
<source>Friends</source> <source>Friends</source>
<translation type="unfinished">Freunde</translation> <translation>Freunde</translation>
</message> </message>
<message> <message>
<location line="+5"/> <location line="+5"/>
<source>Status</source> <source>Status</source>
<translation type="unfinished">Status</translation> <translation>Status</translation>
</message> </message>
<message> <message>
<location line="+63"/> <location line="+63"/>
<source>Add or Change your Avatar</source> <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>
<message> <message>
<location line="+67"/> <location line="+67"/>
<source>Edit Personal message</source> <source>Edit Personal message</source>
<translation type="unfinished">Statusnachricht ändern</translation> <translation>Statusnachricht ändern</translation>
</message> </message>
<message> <message>
<location line="+38"/> <location line="+38"/>
<source>Group Chat</source> <source>Group Chat</source>
<translation type="unfinished">Gruppenchat</translation> <translation>Gruppenchat</translation>
</message> </message>
<message> <message>
<location line="+104"/> <location line="+104"/>
<source>Messages entered here are sent to all collected friends</source> <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>
<message> <message>
<location line="+96"/> <location line="+96"/>
<source>Bold</source> <source>Bold</source>
<translation type="unfinished">Fett</translation> <translation>Fett</translation>
</message> </message>
<message> <message>
<location line="+41"/> <location line="+41"/>
<source>Underline</source> <source>Underline</source>
<translation type="unfinished">Unterstrichen</translation> <translation>Unterstrichen</translation>
</message> </message>
<message> <message>
<location line="+41"/> <location line="+41"/>
<source>Italic</source> <source>Italic</source>
<translation type="unfinished">Kursiv</translation> <translation>Kursiv</translation>
</message> </message>
<message> <message>
<location line="+41"/> <location line="+41"/>
<source>Font</source> <source>Font</source>
<translation type="unfinished">Schriftart</translation> <translation>Schriftart</translation>
</message> </message>
<message> <message>
<location line="+38"/> <location line="+38"/>
<source>Text Color</source> <source>Text Color</source>
<translation type="unfinished">Textfarbe</translation> <translation>Textfarbe</translation>
</message> </message>
<message> <message>
<location line="+90"/> <location line="+90"/>
<source>Attach File</source> <source>Attach File</source>
<translation type="unfinished">Datei anhängen</translation> <translation>Datei anhängen</translation>
</message> </message>
<message> <message>
<location line="+41"/> <location line="+41"/>
<source>Send</source> <source>Send</source>
<translation type="unfinished">Senden</translation> <translation>Senden</translation>
</message> </message>
<message> <message>
<location line="+27"/> <location line="+27"/>
<source>Clear Chat History</source> <source>Clear Chat History</source>
<translation type="unfinished">Nachrichtenverlauf leeren</translation> <translation>Nachrichtenverlauf leeren</translation>
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<location filename="../gui/FriendsDialog.cpp" line="+443"/> <location filename="../gui/FriendsDialog.cpp" line="+443"/>
<source>Add Friend</source> <source>Add Friend</source>
<translation type="unfinished">Freund hinzufügen</translation> <translation>Freund hinzufügen</translation>
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<source>Create new Profile</source> <source>Create new Profile</source>
<translation type="unfinished">Erstelle neues Profil</translation> <translation>Erstelle neues Profil</translation>
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<location line="+3"/> <location line="+3"/>
<source>Create new Forum</source> <source>Create new Forum</source>
<translation type="unfinished">Erstelle neues Forum</translation> <translation>Erstelle neues Forum</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
@ -4115,7 +4115,7 @@ p, li { white-space: pre-wrap; }
<location line="+9"/> <location line="+9"/>
<location line="+3"/> <location line="+3"/>
<source>Create new Channel</source> <source>Create new Channel</source>
<translation type="unfinished">Erstelle neuen Kanal</translation> <translation>Erstelle neuen Kanal</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
@ -4125,306 +4125,306 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="+9"/> <location line="+9"/>
<source>Add your Avatar Picture</source> <source>Add your Avatar Picture</source>
<translation type="unfinished">Wähle dein Avatar Bild</translation> <translation>Wähle dein Avatar Bild</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>A</source> <source>A</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<source>Set your Personal Message</source> <source>Set your Personal Message</source>
<translation type="unfinished">Statusnachricht ändern</translation> <translation>Statusnachricht ändern</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>Edit your status Message</source> <source>Edit your status Message</source>
<translation type="unfinished">Statusnachricht ändern</translation> <translation>Statusnachricht ändern</translation>
</message> </message>
<message> <message>
<location line="+5"/> <location line="+5"/>
<source>Browse Message History</source> <source>Browse Message History</source>
<translation type="unfinished">Nachrichtenverlauf anzeigen</translation> <translation>Nachrichtenverlauf anzeigen</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>Browse History</source> <source>Browse History</source>
<translation type="unfinished">Nachrichtenverlauf</translation> <translation>Nachrichtenverlauf</translation>
</message> </message>
<message> <message>
<location line="+5"/> <location line="+5"/>
<location line="+3"/> <location line="+3"/>
<source>Save Chat History</source> <source>Save Chat History</source>
<translation type="unfinished">Nachrichtenverlauf speichern</translation> <translation>Nachrichtenverlauf speichern</translation>
</message> </message>
<message> <message>
<location line="+8"/> <location line="+8"/>
<source>Hide Offline Friends</source> <source>Hide Offline Friends</source>
<translation type="unfinished">Verstecke offline Freunde</translation> <translation>Verstecke offline Freunde</translation>
</message> </message>
<message> <message>
<location line="+8"/> <location line="+8"/>
<source>Hide Status Column</source> <source>Hide Status Column</source>
<translation type="unfinished">Status Spalte ausblenden</translation> <translation>Status Spalte ausblenden</translation>
</message> </message>
<message> <message>
<location line="+8"/> <location line="+8"/>
<location line="+3"/> <location line="+3"/>
<source>Sort by State</source> <source>Sort by State</source>
<translation type="unfinished">Sortiere nach Status</translation> <translation>Sortiere nach Status</translation>
</message> </message>
<message> <message>
<location line="+8"/> <location line="+8"/>
<source>Hide State</source> <source>Hide State</source>
<translation type="unfinished">Status ausblenden</translation> <translation>Status ausblenden</translation>
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<location line="+3"/> <location line="+3"/>
<source>Add a new Group</source> <source>Add a new Group</source>
<translation type="unfinished">Neue Gruppe hinzufügen</translation> <translation>Neue Gruppe hinzufügen</translation>
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<location line="+3"/> <location line="+3"/>
<source>Sort Descending Order</source> <source>Sort Descending Order</source>
<translation type="unfinished">Absteigend sortieren</translation> <translation>Absteigend sortieren</translation>
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<location line="+3"/> <location line="+3"/>
<source>Sort Ascending Order</source> <source>Sort Ascending Order</source>
<translation type="unfinished">Aufsteigend sortieren</translation> <translation>Aufsteigend sortieren</translation>
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<source>Delete Chat History</source> <source>Delete Chat History</source>
<translation type="unfinished">Nachrichtenverlauf löschen</translation> <translation>Nachrichtenverlauf löschen</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>Deletes all stored and displayed chat history</source> <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>
<message> <message>
<location filename="../gui/FriendsDialog.cpp" line="-291"/> <location filename="../gui/FriendsDialog.cpp" line="-291"/>
<source>Profile</source> <source>Profile</source>
<translation type="unfinished">Profil</translation> <translation>Profil</translation>
</message> </message>
<message> <message>
<location line="+2"/> <location line="+2"/>
<source>News Feed</source> <source>News Feed</source>
<translation type="unfinished"></translation> <translation>Neuigkeiten</translation>
</message> </message>
<message> <message>
<location line="+41"/> <location line="+41"/>
<source>Welcome to RetroShare&apos;s group chat.</source> <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>
<message> <message>
<location line="+64"/> <location line="+64"/>
<source>me</source> <source>me</source>
<translation type="unfinished">ich</translation> <translation>ich</translation>
</message> </message>
<message> <message>
<location line="+117"/> <location line="+117"/>
<source>Paste RetroShare Link</source> <source>Paste RetroShare Link</source>
<translation type="unfinished">RetroShare Link einfügen</translation> <translation>RetroShare Link einfügen</translation>
</message> </message>
<message> <message>
<location line="+49"/> <location line="+49"/>
<source>Group</source> <source>Group</source>
<translation type="unfinished">Gruppe</translation> <translation>Gruppe</translation>
</message> </message>
<message> <message>
<location line="+4"/> <location line="+4"/>
<source>Friend</source> <source>Friend</source>
<translation type="unfinished">Freund</translation> <translation>Freund</translation>
</message> </message>
<message> <message>
<location line="+4"/> <location line="+4"/>
<source>Location</source> <source>Location</source>
<translation type="unfinished"></translation> <translation>Standort</translation>
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<source>Message Group</source> <source>Message Group</source>
<translation type="unfinished">Gruppe anschreiben</translation> <translation>Gruppe anschreiben</translation>
</message> </message>
<message> <message>
<location line="+5"/> <location line="+5"/>
<source>Edit Group</source> <source>Edit Group</source>
<translation type="unfinished">Gruppe ändern</translation> <translation>Gruppe ändern</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>Remove Group</source> <source>Remove Group</source>
<translation type="unfinished">Gruppe entfernen</translation> <translation>Gruppe entfernen</translation>
</message> </message>
<message> <message>
<location line="+7"/> <location line="+7"/>
<source>Chat</source> <source>Chat</source>
<translation type="unfinished"></translation> <translation>Chat</translation>
</message> </message>
<message> <message>
<location line="+1"/> <location line="+1"/>
<source>Message Friend</source> <source>Message Friend</source>
<translation type="unfinished">Freund anschreiben</translation> <translation>Freund anschreiben</translation>
</message> </message>
<message> <message>
<location line="+4"/> <location line="+4"/>
<source>Friend Details</source> <source>Friend Details</source>
<translation type="unfinished">Freund-Details</translation> <translation>Freund-Details</translation>
</message> </message>
<message> <message>
<location line="+5"/> <location line="+5"/>
<source>Recommend this Friend to...</source> <source>Recommend this Friend to...</source>
<translation type="unfinished">Freund weiterempfehlen...</translation> <translation>Freund weiterempfehlen...</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>Connect To Friend</source> <source>Connect To Friend</source>
<translation type="unfinished"></translation> <translation>Zum Freund verbinden</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>Copy RetroShare Link</source> <source>Copy RetroShare Link</source>
<translation type="unfinished">Kopiere RetroShare Link</translation> <translation>Kopiere RetroShare Link</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<location line="+80"/> <location line="+80"/>
<source>Paste Friend Link</source> <source>Paste Friend Link</source>
<translation type="unfinished">RetroShare Link einfügen</translation> <translation>RetroShare Link einfügen</translation>
</message> </message>
<message> <message>
<location line="-74"/> <location line="-74"/>
<source>Deny Friend</source> <source>Deny Friend</source>
<translation type="unfinished">Blockiere Freund</translation> <translation>Blockiere Freund</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>Remove Friend Location</source> <source>Remove Friend Location</source>
<translation type="unfinished">Freund entfernen</translation> <translation>Freund entfernen</translation>
</message> </message>
<message> <message>
<location line="+23"/> <location line="+23"/>
<source>Add to group</source> <source>Add to group</source>
<translation type="unfinished">Hinzufügen zur Gruppe</translation> <translation>Hinzufügen zur Gruppe</translation>
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<source>Move to group</source> <source>Move to group</source>
<translation type="unfinished">Verschiebe in Gruppe</translation> <translation>Verschiebe in Gruppe</translation>
</message> </message>
<message> <message>
<location line="+12"/> <location line="+12"/>
<source>Groups</source> <source>Groups</source>
<translation type="unfinished">Gruppen</translation> <translation>Gruppen</translation>
</message> </message>
<message> <message>
<location line="+13"/> <location line="+13"/>
<source>Remove from group</source> <source>Remove from group</source>
<translation type="unfinished">Aus Gruppe entfernen</translation> <translation>Aus Gruppe entfernen</translation>
</message> </message>
<message> <message>
<location line="+5"/> <location line="+5"/>
<source>Remove from all groups</source> <source>Remove from all groups</source>
<translation type="unfinished">Aus allen Gruppen entfernen</translation> <translation>Aus allen Gruppen entfernen</translation>
</message> </message>
<message> <message>
<location line="+17"/> <location line="+17"/>
<source>Expand all</source> <source>Expand all</source>
<translation type="unfinished">Alle erweitern</translation> <translation>Alle erweitern</translation>
</message> </message>
<message> <message>
<location line="+1"/> <location line="+1"/>
<source>Collapse all</source> <source>Collapse all</source>
<translation type="unfinished">Alle reduzieren</translation> <translation>Alle reduzieren</translation>
</message> </message>
<message> <message>
<location line="+350"/> <location line="+350"/>
<source>location</source> <source>location</source>
<translation type="unfinished">Standort</translation> <translation>Standort</translation>
</message> </message>
<message> <message>
<location line="+154"/> <location line="+154"/>
<location line="+2"/> <location line="+2"/>
<source>Available</source> <source>Available</source>
<translation type="unfinished">Verfügbar</translation> <translation>Verfügbar</translation>
</message> </message>
<message> <message>
<location line="+98"/> <location line="+98"/>
<source>Save Certificate</source> <source>Save Certificate</source>
<translation type="unfinished">Zertifikat speichern</translation> <translation>Zertifikat speichern</translation>
</message> </message>
<message> <message>
<location line="+0"/> <location line="+0"/>
<source>Certificates (*.pqi)</source> <source>Certificates (*.pqi)</source>
<translation type="unfinished">Zertifikate (*.pqi)</translation> <translation>Zertifikate (*.pqi)</translation>
</message> </message>
<message> <message>
<location line="+131"/> <location line="+131"/>
<source>Do you want to remove this Friend?</source> <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>
<message> <message>
<location line="+84"/> <location line="+84"/>
<source>is typing...</source> <source>is typing...</source>
<translation type="unfinished">tippt...</translation> <translation>tippt...</translation>
</message> </message>
<message> <message>
<location line="+135"/> <location line="+135"/>
<location line="+2"/> <location line="+2"/>
<source>New group chat</source> <source>New group chat</source>
<translation type="unfinished">Neuer Gruppenchat</translation> <translation>Neuer Gruppenchat</translation>
</message> </message>
<message> <message>
<location line="+229"/> <location line="+229"/>
<source>Do you really want to physically delete the history?</source> <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>
<message> <message>
<location line="+64"/> <location line="+64"/>
<source>Load File</source> <source>Load File</source>
<translation type="unfinished">Lade Datei</translation> <translation>Lade Datei</translation>
</message> </message>
<message> <message>
<location line="+0"/> <location line="+0"/>
<source>Pictures (*.png *.xpm *.jpg *.tiff *.gif)</source> <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>
<message> <message>
<location line="+67"/> <location line="+67"/>
<source>Add Extra File</source> <source>Add Extra File</source>
<translation type="unfinished"></translation> <translation>Zusätzliche Datei hinzufügen</translation>
</message> </message>
<message> <message>
<location line="+97"/> <location line="+97"/>
<location line="+6"/> <location line="+6"/>
<source>Drop file error.</source> <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>
<message> <message>
<location line="-6"/> <location line="-6"/>
<source>Directory can&apos;t be dropped, only files are accepted.</source> <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>
<message> <message>
<location line="+6"/> <location line="+6"/>
<source>File not found or file name not accepted.</source> <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>
<message> <message>
<location line="+51"/> <location line="+51"/>
<source>Save as...</source> <source>Save as...</source>
<translation type="unfinished">Speichern unter...</translation> <translation>Speichern unter...</translation>
</message> </message>
<message> <message>
<location line="+0"/> <location line="+0"/>
<source>Text File (*.txt );;All Files (*)</source> <source>Text File (*.txt );;All Files (*)</source>
<translation type="unfinished">Text Datei (*.txt );;Alle Dateien (*)</translation> <translation>Text Datei (*.txt );;Alle Dateien (*)</translation>
</message> </message>
</context> </context>
<context> <context>
@ -6989,7 +6989,7 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="-5"/> <location line="-5"/>
<location filename="../gui/MessagesDialog.cpp" line="-1"/> <location filename="../gui/MessagesDialog.cpp" line="-1"/>
<location line="+736"/> <location line="+737"/>
<source>From</source> <source>From</source>
<translation>Von</translation> <translation>Von</translation>
</message> </message>
@ -7071,16 +7071,16 @@ p, li { white-space: pre-wrap; }
</message> </message>
<message> <message>
<location line="+175"/> <location line="+175"/>
<location filename="../gui/MessagesDialog.cpp" line="-62"/> <location filename="../gui/MessagesDialog.cpp" line="-63"/>
<location line="+834"/> <location line="+835"/>
<location line="+10"/> <location line="+10"/>
<source>Inbox</source> <source>Inbox</source>
<translation>Posteingang</translation> <translation>Posteingang</translation>
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<location filename="../gui/MessagesDialog.cpp" line="-840"/> <location filename="../gui/MessagesDialog.cpp" line="-841"/>
<location line="+853"/> <location line="+854"/>
<location line="+8"/> <location line="+8"/>
<source>Outbox</source> <source>Outbox</source>
<translation>Postausgang</translation> <translation>Postausgang</translation>
@ -7092,7 +7092,7 @@ p, li { white-space: pre-wrap; }
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<location filename="../gui/MessagesDialog.cpp" line="-853"/> <location filename="../gui/MessagesDialog.cpp" line="-854"/>
<source>Sent</source> <source>Sent</source>
<translation>Gesendet</translation> <translation>Gesendet</translation>
</message> </message>
@ -7241,12 +7241,12 @@ p, li { white-space: pre-wrap; }
</message> </message>
<message> <message>
<location line="+1"/> <location line="+1"/>
<location line="+728"/> <location line="+729"/>
<source>Click to sort by from</source> <source>Click to sort by from</source>
<translation>Klicken, um nach Von zu sortieren</translation> <translation>Klicken, um nach Von zu sortieren</translation>
</message> </message>
<message> <message>
<location line="-727"/> <location line="-728"/>
<source>Click to sort by date</source> <source>Click to sort by date</source>
<translation>Klicken, um nach Datum zu sortieren</translation> <translation>Klicken, um nach Datum zu sortieren</translation>
</message> </message>
@ -7272,7 +7272,7 @@ p, li { white-space: pre-wrap; }
<translation type="obsolete">Empfohlene Dateien einblenden</translation> <translation type="obsolete">Empfohlene Dateien einblenden</translation>
</message> </message>
<message> <message>
<location line="+729"/> <location line="+730"/>
<source>Click to sort by to</source> <source>Click to sort by to</source>
<translation>Klicken, um nach Empfänger zu sortieren</translation> <translation>Klicken, um nach Empfänger zu sortieren</translation>
</message> </message>
@ -7294,7 +7294,7 @@ p, li { white-space: pre-wrap; }
</message> </message>
<message> <message>
<location filename="../gui/MessagesDialog.ui" line="-9"/> <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> <source>Reply to All</source>
<translation>Allen antworten</translation> <translation>Allen antworten</translation>
</message> </message>
@ -7332,7 +7332,7 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="+172"/> <location line="+172"/>
<location filename="../gui/MessagesDialog.cpp" line="+598"/> <location filename="../gui/MessagesDialog.cpp" line="+598"/>
<location line="+880"/> <location line="+881"/>
<location line="+5"/> <location line="+5"/>
<source>Trash</source> <source>Trash</source>
<translation>Papierkorb</translation> <translation>Papierkorb</translation>
@ -7355,7 +7355,7 @@ p, li { white-space: pre-wrap; }
<translation type="obsolete">Neues Schlagwort...</translation> <translation type="obsolete">Neues Schlagwort...</translation>
</message> </message>
<message> <message>
<location filename="../gui/MessagesDialog.cpp" line="-1199"/> <location filename="../gui/MessagesDialog.cpp" line="-1200"/>
<source>Mark as read</source> <source>Mark as read</source>
<translation>Als gelesen markieren</translation> <translation>Als gelesen markieren</translation>
</message> </message>
@ -7381,7 +7381,7 @@ p, li { white-space: pre-wrap; }
</message> </message>
<message> <message>
<location line="+241"/> <location line="+241"/>
<location line="+869"/> <location line="+870"/>
<location line="+8"/> <location line="+8"/>
<source>Drafts</source> <source>Drafts</source>
<translation>Entwürfe</translation> <translation>Entwürfe</translation>
@ -7396,7 +7396,7 @@ p, li { white-space: pre-wrap; }
<translation type="obsolete">Editieren...</translation> <translation type="obsolete">Editieren...</translation>
</message> </message>
<message> <message>
<location line="-727"/> <location line="-728"/>
<source>Click to sort by star</source> <source>Click to sort by star</source>
<translation>Klicken, um nach Kennzeichnung zu sortieren</translation> <translation>Klicken, um nach Kennzeichnung zu sortieren</translation>
</message> </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> <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>
<message> <message>
<location line="+764"/> <location line="+765"/>
<location line="+4"/> <location line="+4"/>
<location line="+4"/> <location line="+4"/>
<location line="+4"/> <location line="+4"/>