mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-17 21:34:10 -05:00
fixed share on channel code
This commit is contained in:
parent
770add8b8a
commit
b6aeacbed4
@ -411,6 +411,11 @@ void CreateGxsChannelMsg::addExtraFile()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CreateGxsChannelMsg::addHtmlText(const QString& text)
|
||||||
|
{
|
||||||
|
msgEdit->setHtml(text) ;
|
||||||
|
}
|
||||||
|
|
||||||
void CreateGxsChannelMsg::addAttachment(const std::string &path)
|
void CreateGxsChannelMsg::addAttachment(const std::string &path)
|
||||||
{
|
{
|
||||||
/* add a SubFileItem to the attachment section */
|
/* add a SubFileItem to the attachment section */
|
||||||
|
@ -43,6 +43,7 @@ public:
|
|||||||
/** Default Destructor */
|
/** Default Destructor */
|
||||||
~CreateGxsChannelMsg();
|
~CreateGxsChannelMsg();
|
||||||
|
|
||||||
|
void addHtmlText(const QString& text) ;
|
||||||
void addAttachment(const std::string &path);
|
void addAttachment(const std::string &path);
|
||||||
void addAttachment(const RsFileHash &hash, const std::string &fname, uint64_t size, bool local, const RsPeerId &srcId,bool assume_file_ready = false);
|
void addAttachment(const RsFileHash &hash, const std::string &fname, uint64_t size, bool local, const RsPeerId &srcId,bool assume_file_ready = false);
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "GxsChannelDialog.h"
|
#include "GxsChannelDialog.h"
|
||||||
#include "GxsChannelGroupDialog.h"
|
#include "GxsChannelGroupDialog.h"
|
||||||
#include "GxsChannelPostsWidget.h"
|
#include "GxsChannelPostsWidget.h"
|
||||||
|
#include "CreateGxsChannelMsg.h"
|
||||||
#include "GxsChannelUserNotify.h"
|
#include "GxsChannelUserNotify.h"
|
||||||
#include "gui/gxs/GxsGroupShareKey.h"
|
#include "gui/gxs/GxsGroupShareKey.h"
|
||||||
#include "gui/feeds/GxsChannelPostItem.h"
|
#include "gui/feeds/GxsChannelPostItem.h"
|
||||||
@ -76,9 +77,18 @@ UserNotify *GxsChannelDialog::getUserNotify(QObject *parent)
|
|||||||
return new GxsChannelUserNotify(rsGxsChannels, parent);
|
return new GxsChannelUserNotify(rsGxsChannels, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GxsChannelDialog::shareOnChannel(const RsGxsGroupId& channel_id,const QList<RetroShareLink>& file_link)
|
void GxsChannelDialog::shareOnChannel(const RsGxsGroupId& channel_id,const QList<RetroShareLink>& file_links)
|
||||||
{
|
{
|
||||||
std::cerr << "Sharing file link on channel " << channel_id << ": Not yet implemented!" << std::endl;
|
std::cerr << "Sharing file link on channel " << channel_id << ": Not yet implemented!" << std::endl;
|
||||||
|
|
||||||
|
CreateGxsChannelMsg *msgDialog = new CreateGxsChannelMsg(channel_id) ;
|
||||||
|
|
||||||
|
QString txt ;
|
||||||
|
for(QList<RetroShareLink>::const_iterator it(file_links.begin());it!=file_links.end();++it)
|
||||||
|
txt += (*it).toHtml() + "\n" ;
|
||||||
|
|
||||||
|
msgDialog->addHtmlText(txt);
|
||||||
|
msgDialog->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GxsChannelDialog::text(TextType type)
|
QString GxsChannelDialog::text(TextType type)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user