Recommiting from old repo:

commit msg from last:

Fixed minor bug in group creation
msg now set to unread and unprocessed on creation (added read flag in gxsflags.h also)
Got topic and post generation working 

Additional changes:

Voting update now working

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5951 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-12-08 21:50:13 +00:00
parent 0c49fba4d8
commit 6527aaf2d8
8 changed files with 323 additions and 215 deletions

View file

@ -55,7 +55,12 @@ PostedItem::PostedItem(PostedHolder *postHolder, const RsPostedPost &post)
"><span style=\" text-decoration: underline; color:#0000ff;\">" +
QString::fromStdString(post.mLink) + "</span></a>");
scoreLabel->setText(QString("1"));
uint32_t up, down, nComments;
rsPosted->retrieveScores(mPost.mMeta.mServiceString, up, down, nComments);
int32_t vote = up - down;
scoreLabel->setText(QString::number(vote));
connect( commentButton, SIGNAL( clicked() ), this, SLOT( loadComments() ) );
connect( voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
@ -72,16 +77,16 @@ RsPostedPost PostedItem::getPost() const
void PostedItem::makeDownVote()
{
RsGxsGrpMsgIdPair msgId;
msgId.first = mPost.mMeta.mMsgId;
msgId.second = mPost.mMeta.mGroupId;
msgId.first = mPost.mMeta.mGroupId;
msgId.second = mPost.mMeta.mMsgId;
emit vote(msgId, false);
}
void PostedItem::makeUpVote()
{
RsGxsGrpMsgIdPair msgId;
msgId.first = mPost.mMeta.mMsgId;
msgId.second = mPost.mMeta.mGroupId;
msgId.first = mPost.mMeta.mGroupId;
msgId.second = mPost.mMeta.mMsgId;
emit vote(msgId, true);
}

View file

@ -53,7 +53,7 @@ border-radius: 10px}</string>
</font>
</property>
<property name="text">
<string>1</string>
<string>0</string>
</property>
</widget>
</item>