mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-14 09:05:48 -04:00
Photoshare ID cleaning
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-IdCleaning@7161 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ff6f32059b
commit
fff8485a0e
7 changed files with 16 additions and 16 deletions
|
@ -34,7 +34,7 @@ void AlbumDialog::setUp()
|
||||||
ui->lineEdit_Title->setText(QString::fromStdString(mAlbum.mMeta.mGroupName));
|
ui->lineEdit_Title->setText(QString::fromStdString(mAlbum.mMeta.mGroupName));
|
||||||
ui->lineEdit_Caption->setText(QString::fromStdString(mAlbum.mCaption));
|
ui->lineEdit_Caption->setText(QString::fromStdString(mAlbum.mCaption));
|
||||||
ui->lineEdit_Category->setText(QString::fromStdString(mAlbum.mCategory));
|
ui->lineEdit_Category->setText(QString::fromStdString(mAlbum.mCategory));
|
||||||
ui->lineEdit_Identity->setText(QString::fromStdString(mAlbum.mMeta.mAuthorId));
|
ui->lineEdit_Identity->setText(QString::fromStdString(mAlbum.mMeta.mAuthorId.toStdString()));
|
||||||
ui->lineEdit_Where->setText(QString::fromStdString(mAlbum.mWhere));
|
ui->lineEdit_Where->setText(QString::fromStdString(mAlbum.mWhere));
|
||||||
ui->textEdit_description->setText(QString::fromStdString(mAlbum.mDescription));
|
ui->textEdit_description->setText(QString::fromStdString(mAlbum.mDescription));
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,7 @@ void PhotoDialog::acknowledgeComment(uint32_t token)
|
||||||
RsGxsGrpMsgIdPair msgId;
|
RsGxsGrpMsgIdPair msgId;
|
||||||
mRsPhoto->acknowledgeMsg(token, msgId);
|
mRsPhoto->acknowledgeMsg(token, msgId);
|
||||||
|
|
||||||
if(msgId.first.empty() || msgId.second.empty()){
|
if(msgId.first.isNull() || msgId.second.isNull()){
|
||||||
|
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,7 @@ PhotoItem::PhotoItem(PhotoShareItemHolder *holder, const QString& path, QWidget
|
||||||
connect(ui->lineEdit_Title, SIGNAL(editingFinished()), this, SLOT(setTitle()));
|
connect(ui->lineEdit_Title, SIGNAL(editingFinished()), this, SLOT(setTitle()));
|
||||||
connect(ui->lineEdit_PhotoGrapher, SIGNAL(editingFinished()), this, SLOT(setPhotoGrapher()));
|
connect(ui->lineEdit_PhotoGrapher, SIGNAL(editingFinished()), this, SLOT(setPhotoGrapher()));
|
||||||
|
|
||||||
ui->idChooser->loadIds(0, "");
|
ui->idChooser->loadIds(0, RsGxsId());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@ void PhotoShare::checkUpdate()
|
||||||
if (rsPhoto->updated())
|
if (rsPhoto->updated())
|
||||||
{
|
{
|
||||||
//insertAlbums();
|
//insertAlbums();
|
||||||
std::list<std::string> grpIds;
|
std::list<RsGxsGroupId> grpIds;
|
||||||
rsPhoto->groupsChanged(grpIds);
|
rsPhoto->groupsChanged(grpIds);
|
||||||
if(!grpIds.empty())
|
if(!grpIds.empty())
|
||||||
{
|
{
|
||||||
|
@ -449,7 +449,7 @@ void PhotoShare::updatePhotos()
|
||||||
/**************************** Request / Response Filling of Data ************************/
|
/**************************** Request / Response Filling of Data ************************/
|
||||||
|
|
||||||
|
|
||||||
void PhotoShare::requestAlbumList(std::list<std::string>& ids)
|
void PhotoShare::requestAlbumList(std::list<RsGxsGroupId>& ids)
|
||||||
{
|
{
|
||||||
RsTokReqOptions opts;
|
RsTokReqOptions opts;
|
||||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_IDS;
|
opts.mReqType = GXS_REQUEST_TYPE_GROUP_IDS;
|
||||||
|
@ -472,12 +472,12 @@ void PhotoShare::loadAlbumList(const uint32_t &token)
|
||||||
std::cerr << "PhotoShare::loadAlbumList()";
|
std::cerr << "PhotoShare::loadAlbumList()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
std::list<std::string> albumIds;
|
std::list<RsGxsGroupId> albumIds;
|
||||||
rsPhoto->getGroupList(token, albumIds);
|
rsPhoto->getGroupList(token, albumIds);
|
||||||
|
|
||||||
requestAlbumData(albumIds);
|
requestAlbumData(albumIds);
|
||||||
|
|
||||||
std::list<std::string>::iterator it;
|
std::list<RsGxsGroupId>::iterator it;
|
||||||
for(it = albumIds.begin(); it != albumIds.end(); it++)
|
for(it = albumIds.begin(); it != albumIds.end(); it++)
|
||||||
{
|
{
|
||||||
requestPhotoList(*it);
|
requestPhotoList(*it);
|
||||||
|
@ -525,7 +525,7 @@ bool PhotoShare::loadAlbumData(const uint32_t &token)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PhotoShare::requestPhotoList(const std::string &albumId)
|
void PhotoShare::requestPhotoList(const RsGxsGroupId &albumId)
|
||||||
{
|
{
|
||||||
|
|
||||||
std::list<RsGxsGroupId> grpIds;
|
std::list<RsGxsGroupId> grpIds;
|
||||||
|
@ -543,7 +543,7 @@ void PhotoShare::acknowledgeGroup(const uint32_t &token)
|
||||||
RsGxsGroupId grpId;
|
RsGxsGroupId grpId;
|
||||||
rsPhoto->acknowledgeGrp(token, grpId);
|
rsPhoto->acknowledgeGrp(token, grpId);
|
||||||
|
|
||||||
if(!grpId.empty())
|
if(!grpId.isNull())
|
||||||
{
|
{
|
||||||
std::list<RsGxsGroupId> grpIds;
|
std::list<RsGxsGroupId> grpIds;
|
||||||
grpIds.push_back(grpId);
|
grpIds.push_back(grpId);
|
||||||
|
|
|
@ -44,7 +44,7 @@ private slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* Request Response Functions for loading data */
|
/* Request Response Functions for loading data */
|
||||||
void requestAlbumList(std::list<std::string>& ids);
|
void requestAlbumList(std::list<RsGxsGroupId> &ids);
|
||||||
void requestAlbumData(std::list<RsGxsGroupId> &ids);
|
void requestAlbumData(std::list<RsGxsGroupId> &ids);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -52,7 +52,7 @@ private:
|
||||||
*/
|
*/
|
||||||
void requestAlbumData();
|
void requestAlbumData();
|
||||||
void requestPhotoList(GxsMsgReq &albumIds);
|
void requestPhotoList(GxsMsgReq &albumIds);
|
||||||
void requestPhotoList(const std::string &albumId);
|
void requestPhotoList(const RsGxsGroupId &albumId);
|
||||||
void requestPhotoData(GxsMsgReq &photoIds);
|
void requestPhotoData(GxsMsgReq &photoIds);
|
||||||
void requestPhotoData(const std::list<RsGxsGroupId> &grpIds);
|
void requestPhotoData(const std::list<RsGxsGroupId> &grpIds);
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ PhotoSlideShow::PhotoSlideShow(const RsPhotoAlbum& album, QWidget *parent)
|
||||||
|
|
||||||
PhotoSlideShow::~PhotoSlideShow(){
|
PhotoSlideShow::~PhotoSlideShow(){
|
||||||
|
|
||||||
std::map<std::string, RsPhotoPhoto *>::iterator mit = mPhotos.begin();
|
std::map<RsGxsMessageId, RsPhotoPhoto *>::iterator mit = mPhotos.begin();
|
||||||
|
|
||||||
for(; mit != mPhotos.end(); mit++)
|
for(; mit != mPhotos.end(); mit++)
|
||||||
{
|
{
|
||||||
|
@ -153,10 +153,10 @@ void PhotoSlideShow::loadImage()
|
||||||
/* get the image */
|
/* get the image */
|
||||||
int i = 0;
|
int i = 0;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
std::string msgId;
|
RsGxsMessageId msgId;
|
||||||
|
|
||||||
//std::map<std::string, RsPhotoPhoto *>::iterator it;
|
//std::map<std::string, RsPhotoPhoto *>::iterator it;
|
||||||
std::map<int, std::string>::iterator it;
|
std::map<int, RsGxsMessageId>::iterator it;
|
||||||
for(it = mPhotoOrder.begin(); it != mPhotoOrder.end(); it++, i++)
|
for(it = mPhotoOrder.begin(); it != mPhotoOrder.end(); it++, i++)
|
||||||
{
|
{
|
||||||
if (i == mImageIdx)
|
if (i == mImageIdx)
|
||||||
|
|
|
@ -59,8 +59,8 @@ private:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::map<std::string, RsPhotoPhoto *> mPhotos;
|
std::map<RsGxsMessageId, RsPhotoPhoto *> mPhotos;
|
||||||
std::map<int, std::string> mPhotoOrder;
|
std::map<int, RsGxsMessageId> mPhotoOrder;
|
||||||
|
|
||||||
bool mRunning;
|
bool mRunning;
|
||||||
int mImageIdx;
|
int mImageIdx;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue