in ChatLobbyWidget: show dialog to create a new identity when there is no own identity

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8269 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
electron128 2015-05-17 10:13:32 +00:00
parent 789b76f7b4
commit 699dc50b3f
8 changed files with 70 additions and 23 deletions

View file

@ -1578,13 +1578,11 @@ bool DistributedChatService::setDefaultIdentityForChatLobby(const RsGxsId& nick)
triggerConfigSave() ;
return true ;
}
bool DistributedChatService::getDefaultIdentityForChatLobby(RsGxsId& nick)
void DistributedChatService::getDefaultIdentityForChatLobby(RsGxsId& nick)
{
RsStackMutex stack(mDistributedChatMtx); /********** STACK LOCKED MTX ******/
nick = locked_getDefaultIdentity() ;
return true ;
}
RsGxsId DistributedChatService::locked_getDefaultIdentity()

View file

@ -71,7 +71,7 @@ class DistributedChatService
bool setIdentityForChatLobby(const ChatLobbyId& lobby_id,const RsGxsId& nick) ;
bool getIdentityForChatLobby(const ChatLobbyId& lobby_id,RsGxsId& nick) ;
bool setDefaultIdentityForChatLobby(const RsGxsId& nick) ;
bool getDefaultIdentityForChatLobby(RsGxsId& nick) ;
void getDefaultIdentityForChatLobby(RsGxsId& nick) ;
void setLobbyAutoSubscribe(const ChatLobbyId& lobby_id, const bool autoSubscribe);
bool getLobbyAutoSubscribe(const ChatLobbyId& lobby_id);
void sendLobbyStatusString(const ChatLobbyId& id,const std::string& status_string) ;

View file

@ -471,7 +471,7 @@ virtual void unsubscribeChatLobby(const ChatLobbyId& lobby_id) = 0;
virtual bool setIdentityForChatLobby(const ChatLobbyId& lobby_id,const RsGxsId& nick) = 0;
virtual bool getIdentityForChatLobby(const ChatLobbyId& lobby_id,RsGxsId& nick) = 0 ;
virtual bool setDefaultIdentityForChatLobby(const RsGxsId& nick) = 0;
virtual bool getDefaultIdentityForChatLobby(RsGxsId& id) = 0 ;
virtual void getDefaultIdentityForChatLobby(RsGxsId& id) = 0 ;
virtual void setLobbyAutoSubscribe(const ChatLobbyId& lobby_id, const bool autoSubscribe) = 0 ;
virtual bool getLobbyAutoSubscribe(const ChatLobbyId& lobby_id) = 0 ;
virtual ChatLobbyId createChatLobby(const std::string& lobby_name,const RsGxsId& lobby_identity,const std::string& lobby_topic,const std::set<RsPeerId>& invited_friends,ChatLobbyFlags lobby_privacy_type) = 0 ;

View file

@ -471,9 +471,9 @@ bool p3Msgs::setDefaultIdentityForChatLobby(const RsGxsId& nick)
{
return mChatSrv->setDefaultIdentityForChatLobby(nick) ;
}
bool p3Msgs::getDefaultIdentityForChatLobby(RsGxsId& nick_name)
void p3Msgs::getDefaultIdentityForChatLobby(RsGxsId& nick_name)
{
return mChatSrv->getDefaultIdentityForChatLobby(nick_name) ;
mChatSrv->getDefaultIdentityForChatLobby(nick_name) ;
}
bool p3Msgs::setIdentityForChatLobby(const ChatLobbyId& lobby_id,const RsGxsId& nick)

View file

@ -150,7 +150,7 @@ class p3Msgs: public RsMsgs
virtual bool setIdentityForChatLobby(const ChatLobbyId& lobby_id,const RsGxsId&) ;
virtual bool getIdentityForChatLobby(const ChatLobbyId&,RsGxsId& nick) ;
virtual bool setDefaultIdentityForChatLobby(const RsGxsId&) ;
virtual bool getDefaultIdentityForChatLobby(RsGxsId& nick) ;
virtual void getDefaultIdentityForChatLobby(RsGxsId& nick) ;
virtual void setLobbyAutoSubscribe(const ChatLobbyId& lobby_id, const bool autoSubscribe);
virtual bool getLobbyAutoSubscribe(const ChatLobbyId& lobby_id);
virtual ChatLobbyId createChatLobby(const std::string& lobby_name,const RsGxsId& lobby_identity,const std::string& lobby_topic,const std::set<RsPeerId>& invited_friends,ChatLobbyFlags privacy_type) ;

View file

@ -439,7 +439,10 @@ bool p3IdService::getOwnIds(std::list<RsGxsId> &ownIds)
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
if(!mOwnIdsLoaded)
{
std::cerr << "p3IdService::getOwnIds(): own identities are not loaded yet." << std::endl;
return false ;
}
ownIds = mOwnIds;
return true ;