New dialog for defining own colors for the private chat window.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4150 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-04-09 22:52:52 +00:00
parent eed8ccd1df
commit 0fbde70e32
16 changed files with 1957 additions and 934 deletions

View file

@ -31,6 +31,7 @@
#include <retroshare/rspeers.h>
#include "RsharePeerSettings.h"
#include "gui/style/RSStyle.h"
/** The file in which all settings of he peers will read and written. */
#define SETTINGS_FILE (RsInit::RsProfileConfigDirectory() + "/RSPeers.conf")
@ -206,3 +207,41 @@ void RsharePeerSettings::setShowAvatarFrame(const std::string &peerId, bool valu
{
return set(peerId, "ShowAvatarFrame", value);
}
void RsharePeerSettings::getStyle(const std::string &peerId, const QString &name, RSStyle &style)
{
std::string gpgId;
if (getGpgIdOfSslId(peerId, gpgId) == false) {
/* gpg id not found */
return;
}
beginGroup(QString::fromStdString(gpgId));
beginGroup("style");
beginGroup(name);
style.readSetting(*this);
endGroup();
endGroup();
endGroup();
}
void RsharePeerSettings::setStyle(const std::string &peerId, const QString &name, RSStyle &style)
{
std::string gpgId;
if (getGpgIdOfSslId(peerId, gpgId) == false) {
/* gpg id not found */
return;
}
beginGroup(QString::fromStdString(gpgId));
beginGroup("style");
beginGroup(name);
style.writeSetting(*this);
endGroup();
endGroup();
endGroup();
}