The standard font is now used for new chat lobbies.

Added a new menu item to set the font of a private chat and chat lobby to the default font.
Fixed german language.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4926 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-02-11 21:41:41 +00:00
parent f441f4a407
commit d828d23ca7
9 changed files with 215 additions and 186 deletions

View file

@ -32,6 +32,7 @@
#include <retroshare/rsmsgs.h>
#include "RsharePeerSettings.h"
#include "rsharesettings.h"
#include "gui/style/RSStyle.h"
/** The file in which all settings of he peers will read and written. */
@ -144,7 +145,11 @@ void RsharePeerSettings::set(const std::string &peerId, const QString &key, cons
}
beginGroup(QString::fromStdString(settingsId));
setValue(key, value);
if (value.isNull()) {
remove(key);
} else {
setValue(key, value);
}
endGroup();
}
@ -160,12 +165,16 @@ void RsharePeerSettings::setPrivateChatColor(const std::string &peerId, const QS
QString RsharePeerSettings::getPrivateChatFont(const std::string &peerId)
{
return get(peerId, "PrivateChatFont", QFont("Comic Sans MS", 10).toString()).toString();
return get(peerId, "PrivateChatFont", Settings->getChatScreenFont()).toString();
}
void RsharePeerSettings::setPrivateChatFont(const std::string &peerId, const QString &value)
{
set(peerId, "PrivateChatFont", value);
if (Settings->getChatScreenFont() == value) {
set(peerId, "PrivateChatFont", QVariant());
} else {
set(peerId, "PrivateChatFont", value);
}
}
bool RsharePeerSettings::getPrivateChatOnTop(const std::string &peerId)