publish key not generated for public groups anymore, added signature creation for publish and id keys (used in main line of code, correctly initialise ur gxs services)

groupid assigned to group before service_CreateGroup now (to help with identity using pgp hashes)
fixed up dummy group creation for photo service and ui 
completed basic functions of GxsGroupDialog




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5809 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-11-11 23:45:22 +00:00
parent 6906f47fa7
commit d8dc2a0420
17 changed files with 467 additions and 236 deletions

View file

@ -2,6 +2,7 @@
#include "AlbumDialog.h"
#include "ui_AlbumDialog.h"
#include "gxs/rsgxsflags.h"
AlbumDialog::AlbumDialog(const RsPhotoAlbum& album, TokenQueue* photoQueue, RsPhotoV2* rs_Photo, QWidget *parent) :
QDialog(parent),
@ -13,6 +14,12 @@ AlbumDialog::AlbumDialog(const RsPhotoAlbum& album, TokenQueue* photoQueue, RsPh
connect(ui->pushButton_DeletePhoto, SIGNAL(clicked()), this, SLOT(deletePhoto()));
mPhotoDrop = ui->scrollAreaWidgetContents;
if(!(mAlbum.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN))
{
ui->scrollAreaPhotos->setEnabled(false);
ui->pushButton_DeletePhoto->setEnabled(false);
}
mPhotoDrop->setPhotoItemHolder(this);
setUp();
@ -32,6 +39,7 @@ void AlbumDialog::setUp()
}
void AlbumDialog::updateAlbumPhotos(){
QSet<PhotoItem*> photos;
mPhotoDrop->getPhotos(photos);

View file

@ -285,7 +285,7 @@ p, li { white-space: pre-wrap; }
<x>0</x>
<y>0</y>
<width>627</width>
<height>107</height>
<height>116</height>
</rect>
</property>
<property name="styleSheet">
@ -344,7 +344,7 @@ p, li { white-space: pre-wrap; }
<item>
<widget class="QPushButton" name="pushButton_PublishPhotos">
<property name="text">
<string>Publish Photos</string>
<string>Publish Photos / Close</string>
</property>
</widget>
</item>

View file

@ -2,7 +2,7 @@
#include <QVBoxLayout>
#include "PhotoDialog.h"
#include "ui_PhotoDialog.h"
#include "retroshare/rsidentity.h"
#include "AddCommentDialog.h"
PhotoDialog::PhotoDialog(RsPhotoV2 *rs_photo, const RsPhotoPhoto &photo, QWidget *parent) :
@ -37,8 +37,6 @@ void PhotoDialog::setUp()
ui->label_Photo->setPixmap(qtn);
ui->lineEdit_Title->setText(QString::fromStdString(mPhotoDetails.mMeta.mMsgName));
//ui->scrollAreaWidgetContents->setLayout(new QVBoxLayout());
requestComments();
}

View file

@ -56,21 +56,13 @@ bool PostedGroupDialog::service_CreateGroup(uint32_t &token, const RsGroupMetaDa
{
// Specific Function.
RsPostedGroup grp;
grp.mDescription = getDescription().toStdString();
grp.mMeta = meta;
rsPosted->submitGroup(token, grp);
return true;
}
QPixmap PostedGroupDialog::service_getLogo()
{
return QPixmap(); // null pixmap
}
QString PostedGroupDialog::service_getDescription()
{
return QString();
}

View file

@ -46,19 +46,6 @@ protected:
bool service_CreateGroup(uint32_t &token, const RsGroupMetaData &meta);
/*!
* This should return a group logo \n
* Will be called when GxsGroupDialog is initialised in show mode
*
*/
virtual QPixmap service_getLogo();
/*!
* This should return a group description string
* @return group description string
*/
virtual QString service_getDescription();
private:
RsPostedGroup mGrp;

View file

@ -399,7 +399,15 @@ void GxsGroupDialog::addGroupLogo()
ui.groupLogo->setIcon(picture);
}
QPixmap GxsGroupDialog::getLogo()
{
return picture;
}
QString GxsGroupDialog::getDescription()
{
return ui.groupDesc->document()->toPlainText();
}
/***********************************************************************************
Share Lists.

View file

@ -149,24 +149,24 @@ protected:
/*!
* Main purpose is to help tansfer meta data to service
* and also
*
* @param token This should be set to the token retrieved
* @param meta The deriving GXS service should set their grp meta to this value
*/
virtual bool service_CreateGroup(uint32_t &token, const RsGroupMetaData &meta) = 0;
/*!
* This should return a group logo \n
* Will be called when GxsGroupDialog is initialised in show mode
* This returns a group logo from the ui \n
* Should be calleld by deriving service
* @return The logo for the service
*/
virtual QPixmap service_getLogo() = 0;
QPixmap getLogo();
/*!
* This should return a group description string
* This returns a group description string from the ui
* @return group description string
*/
virtual QString service_getDescription() = 0;
virtual QString getDescription();
private slots: