mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
Fixup PulseAddDialog and underlying datatypes
Cleaned up UI, removing unnecessary sidebar. Added cleanup of Dialog to reset properly Disabled URL adder, until it is complete Added ComboBox for reply sentiment Only enable Post button when length between 1 and 999 characters Add Icon to WireGroup (future proofing datatype)
This commit is contained in:
parent
9e0d56f408
commit
124781c1e0
6 changed files with 261 additions and 262 deletions
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "retroshare/rstokenservice.h"
|
||||
#include "retroshare/rsgxsifacehelper.h"
|
||||
#include "retroshare/rsgxscommon.h"
|
||||
|
||||
|
||||
/* The Main Interface Class - for information about your Peers */
|
||||
|
@ -38,6 +39,7 @@ struct RsWireGroup: RsGxsGenericGroupData
|
|||
{
|
||||
public:
|
||||
std::string mDescription;
|
||||
RsGxsImage mIcon;
|
||||
};
|
||||
|
||||
|
||||
|
@ -93,9 +95,10 @@ class RsWirePlace
|
|||
#define WIRE_PULSE_TYPE_REPLY_MSG (0x0002)
|
||||
#define WIRE_PULSE_TYPE_REPLY_REFERENCE (0x0004)
|
||||
|
||||
#define WIRE_PULSE_TYPE_SENTIMENT_POSITIVE (0x0010)
|
||||
#define WIRE_PULSE_TYPE_SENTIMENT_NEUTRAL (0x0020)
|
||||
#define WIRE_PULSE_TYPE_SENTIMENT_NEGATIVE (0x0040)
|
||||
#define WIRE_PULSE_SENTIMENT_NO_SENTIMENT (0x0000)
|
||||
#define WIRE_PULSE_SENTIMENT_POSITIVE (0x0001)
|
||||
#define WIRE_PULSE_SENTIMENT_NEUTRAL (0x0002)
|
||||
#define WIRE_PULSE_SENTIMENT_NEGATIVE (0x0003)
|
||||
|
||||
class RsWirePulse
|
||||
{
|
||||
|
@ -107,6 +110,7 @@ class RsWirePulse
|
|||
std::string mPulseText;
|
||||
|
||||
uint32_t mPulseType;
|
||||
uint32_t mReplySentiment; // only relevant if a reply.
|
||||
|
||||
// These Ref to the related (parent or reply) if reply (MODE_REPLY_MSG set)
|
||||
// Mode REPLY_MSG only REPLY_REFERENCE
|
||||
|
|
|
@ -44,17 +44,20 @@ RsItem *RsGxsWireSerialiser::create_item(uint16_t service,uint8_t item_subtype)
|
|||
void RsGxsWireGroupItem::clear()
|
||||
{
|
||||
group.mDescription.clear();
|
||||
group.mIcon.clear();
|
||||
}
|
||||
|
||||
void RsGxsWireGroupItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx)
|
||||
{
|
||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_DESCR,group.mDescription,"group.mDescription") ;
|
||||
group.mIcon.serial_process(j, ctx);
|
||||
}
|
||||
|
||||
void RsGxsWirePulseItem::clear()
|
||||
{
|
||||
pulse.mPulseText.clear();
|
||||
pulse.mPulseType = 0;
|
||||
pulse.mReplySentiment = 0;
|
||||
pulse.mRefGroupId.clear();
|
||||
pulse.mRefGroupName.clear();
|
||||
pulse.mRefOrigMsgId.clear();
|
||||
|
@ -66,6 +69,7 @@ void RsGxsWirePulseItem::serial_process(RsGenericSerializer::SerializeJob j,RsGe
|
|||
{
|
||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_MSG,pulse.mPulseText,"pulse.mPulseText") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_UINT32_PARAM,pulse.mPulseType,"pulse.mPulseType") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_UINT32_PARAM,pulse.mReplySentiment,"pulse.mReplySentiment") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,pulse.mRefGroupId,"pulse.mRefGroupId") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_NAME,pulse.mRefGroupName,"pulse.mRefGroupName") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,pulse.mRefOrigMsgId,"pulse.mRefOrigMsgId") ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue