mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-22 13:24:26 -04:00
adding blog bad to gui, test for new blog reply field
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2376 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
de217179d3
commit
3ff7635171
3 changed files with 16 additions and 6 deletions
|
@ -47,7 +47,7 @@ void RsBlogMsg::clear()
|
||||||
|
|
||||||
std::ostream &RsBlogMsg::print(std::ostream &out, uint16_t indent)
|
std::ostream &RsBlogMsg::print(std::ostream &out, uint16_t indent)
|
||||||
{
|
{
|
||||||
printRsItemBase(out, "RsChannelMsg", indent);
|
printRsItemBase(out, "RsBlogMsg", indent);
|
||||||
uint16_t int_Indent = indent + 2;
|
uint16_t int_Indent = indent + 2;
|
||||||
|
|
||||||
RsDistribMsg::print(out, int_Indent);
|
RsDistribMsg::print(out, int_Indent);
|
||||||
|
@ -186,7 +186,7 @@ RsBlogMsg *RsBlogSerialiser::deserialiseMsg(void *data, uint32_t *pktsize)
|
||||||
|
|
||||||
ok &= GetTlvWideString(data, rssize, &offset, TLV_TYPE_WSTR_SUBJECT, item->subject);
|
ok &= GetTlvWideString(data, rssize, &offset, TLV_TYPE_WSTR_SUBJECT, item->subject);
|
||||||
ok &= GetTlvWideString(data, rssize, &offset, TLV_TYPE_WSTR_MSG, item->message);
|
ok &= GetTlvWideString(data, rssize, &offset, TLV_TYPE_WSTR_MSG, item->message);
|
||||||
ok &= GetTlvString(data, rssize, &offset, TLV_TYPE_STR_MSGID, item->mIdReply);
|
ok &= GetTlvString(data, rssize, &offset, TLV_TYPE_STR_MSG, item->mIdReply);
|
||||||
|
|
||||||
ok &= item->attachment.GetTlv(data, rssize, &offset);
|
ok &= item->attachment.GetTlv(data, rssize, &offset);
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "LinksDialog.h"
|
#include "LinksDialog.h"
|
||||||
#include "ForumsDialog.h"
|
#include "ForumsDialog.h"
|
||||||
#include "NewsFeed.h"
|
#include "NewsFeed.h"
|
||||||
|
#include "blogs/BlogsDialog.h"
|
||||||
|
|
||||||
#include "rshare.h"
|
#include "rshare.h"
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
|
@ -97,6 +98,7 @@
|
||||||
#define IMAGE_NOONLINE ":/images/rstray0.png"
|
#define IMAGE_NOONLINE ":/images/rstray0.png"
|
||||||
#define IMAGE_ONEONLINE ":/images/rstray1.png"
|
#define IMAGE_ONEONLINE ":/images/rstray1.png"
|
||||||
#define IMAGE_TWOONLINE ":/images/rstray2.png"
|
#define IMAGE_TWOONLINE ":/images/rstray2.png"
|
||||||
|
#define IMAGE_BLOGS ":/images/kblogger.png"
|
||||||
|
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
|
@ -184,6 +186,12 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||||
createPageAction(QIcon(IMAGE_CHANNELS), tr("Channels"), grp));
|
createPageAction(QIcon(IMAGE_CHANNELS), tr("Channels"), grp));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef RS_RELEASE_VERSION
|
||||||
|
BlogsDialog *blogsFeed = NULL;
|
||||||
|
ui.stackPages->add(blogsFeed = new BlogsDialog(ui.stackPages),
|
||||||
|
createPageAction(QIcon(IMAGE_BLOGS), tr("Blogs"), grp));
|
||||||
|
#endif
|
||||||
|
|
||||||
ForumsDialog *forumsDialog = NULL;
|
ForumsDialog *forumsDialog = NULL;
|
||||||
ui.stackPages->add(forumsDialog = new ForumsDialog(ui.stackPages),
|
ui.stackPages->add(forumsDialog = new ForumsDialog(ui.stackPages),
|
||||||
createPageAction(QIcon(IMAGE_FORUMS), tr("Forums"), grp));
|
createPageAction(QIcon(IMAGE_FORUMS), tr("Forums"), grp));
|
||||||
|
|
|
@ -173,7 +173,7 @@ void CreateBlogMsg::parseRsFileListAttachments(std::string attachList)
|
||||||
|
|
||||||
for(it = attachItems.begin(); it != attachItems.end(); it++)
|
for(it = attachItems.begin(); it != attachItems.end(); it++)
|
||||||
{
|
{
|
||||||
std::cerr << "CreateChannelMsg::parseRsFileListAttachments() Entry: ";
|
std::cerr << "CreateBlogMsg::parseRsFileListAttachments() Entry: ";
|
||||||
|
|
||||||
QStringList parts = (*it).split("/");
|
QStringList parts = (*it).split("/");
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ void CreateBlogMsg::checkAttachmentReady()
|
||||||
|
|
||||||
void CreateBlogMsg::cancelMsg()
|
void CreateBlogMsg::cancelMsg()
|
||||||
{
|
{
|
||||||
std::cerr << "CreateChannelMsg::cancelMsg()";
|
std::cerr << "CreateBlogMsg::cancelMsg()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
close();
|
close();
|
||||||
return;
|
return;
|
||||||
|
@ -383,7 +383,7 @@ void CreateBlogMsg::newBlogMsg()
|
||||||
|
|
||||||
void CreateBlogMsg::sendMsg()
|
void CreateBlogMsg::sendMsg()
|
||||||
{
|
{
|
||||||
std::cerr << "CreateChannelMsg::sendMsg()";
|
std::cerr << "CreateBlogMsg::sendMsg()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
/* construct message bits */
|
/* construct message bits */
|
||||||
|
@ -423,6 +423,8 @@ void CreateBlogMsg::sendMsg()
|
||||||
|
|
||||||
void CreateBlogMsg::sendMessage(std::wstring subject, std::wstring msg, std::list<FileInfo> &files)
|
void CreateBlogMsg::sendMessage(std::wstring subject, std::wstring msg, std::list<FileInfo> &files)
|
||||||
{
|
{
|
||||||
|
std::cerr << "CreateBlogMsg::sendMessage()" << std::endl;
|
||||||
|
|
||||||
QString name = subjectEdit->text();
|
QString name = subjectEdit->text();
|
||||||
|
|
||||||
if(name.isEmpty())
|
if(name.isEmpty())
|
||||||
|
@ -446,7 +448,7 @@ void CreateBlogMsg::sendMessage(std::wstring subject, std::wstring msg, std::lis
|
||||||
msgInfo.subject = subject;
|
msgInfo.subject = subject;
|
||||||
msgInfo.msg = msg;
|
msgInfo.msg = msg;
|
||||||
msgInfo.files = files;
|
msgInfo.files = files;
|
||||||
|
msgInfo.msgIdReply = "nothing";
|
||||||
rsBlogs->BlogMessageSend(msgInfo);
|
rsBlogs->BlogMessageSend(msgInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue