mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-15 17:40:35 -04:00
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:
parent
eed8ccd1df
commit
0fbde70e32
16 changed files with 1957 additions and 934 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue