mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
New class "StatusDefs" for status information like strings, images, fonts and colors.
Removed the status string function from the lib. Removed static strings like " - " and " : " from translation. Removed not needed images. Fixed german translation in MessengerWindow, PeersDialog and PopupChatDialog. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3472 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d05d723af1
commit
60746b5702
17 changed files with 517 additions and 2494 deletions
|
@ -36,12 +36,14 @@ extern RsStatus *rsStatus;
|
|||
#include <list>
|
||||
|
||||
|
||||
const uint32_t RS_STATUS_OFFLINE = 0x0000;
|
||||
const uint32_t RS_STATUS_AWAY = 0x0001;
|
||||
const uint32_t RS_STATUS_BUSY = 0x0002;
|
||||
const uint32_t RS_STATUS_ONLINE = 0x0003;
|
||||
const uint32_t RS_STATUS_OFFLINE = 0x0000;
|
||||
const uint32_t RS_STATUS_AWAY = 0x0001;
|
||||
const uint32_t RS_STATUS_BUSY = 0x0002;
|
||||
const uint32_t RS_STATUS_ONLINE = 0x0003;
|
||||
const uint32_t RS_STATUS_INACTIVE = 0x0004;
|
||||
|
||||
const uint32_t RS_STATUS_COUNT = 0x0005; // count of status
|
||||
|
||||
//! data object for peer status information
|
||||
/*!
|
||||
* data object used for peer status information
|
||||
|
@ -95,14 +97,6 @@ class RsStatus
|
|||
* @return will return false if status info does not belong to client
|
||||
*/
|
||||
virtual bool sendStatus(std::string id, uint32_t status) = 0;
|
||||
|
||||
/**
|
||||
* translates the status field of a peer to a string
|
||||
* @status the status id that needs to be translated
|
||||
* @statusString the string translation is passed here
|
||||
*/
|
||||
virtual void getStatusString(uint32_t status, std::string& statusString) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -56,26 +56,3 @@ bool p3Status::sendStatus(std::string id, uint32_t status){
|
|||
|
||||
return mStatusSrv->sendStatus(id, status);
|
||||
}
|
||||
|
||||
void p3Status::getStatusString(uint32_t status, std::string& statusString){
|
||||
|
||||
switch (status) {
|
||||
case RS_STATUS_OFFLINE:
|
||||
statusString = "Offline";
|
||||
break;
|
||||
case RS_STATUS_AWAY:
|
||||
statusString = "Away";
|
||||
break;
|
||||
case RS_STATUS_BUSY:
|
||||
statusString = "Busy";
|
||||
break;
|
||||
case RS_STATUS_ONLINE:
|
||||
statusString = "Online";
|
||||
break;
|
||||
case RS_STATUS_INACTIVE:
|
||||
statusString = "Inactive";
|
||||
break;
|
||||
default:
|
||||
statusString.erase();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,8 +48,6 @@ public:
|
|||
virtual bool getStatus(std::string &id, StatusInfo &statusInfo);
|
||||
virtual bool sendStatus(std::string id, uint32_t status);
|
||||
|
||||
virtual void getStatusString(uint32_t status, std::string& statusString);
|
||||
|
||||
private:
|
||||
|
||||
p3StatusService* mStatusSrv;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue