mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
f441f4a407
commit
d828d23ca7
@ -119,8 +119,8 @@ FriendsDialog::FriendsDialog(QWidget *parent)
|
||||
connect(ui.textboldChatButton, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||
connect(ui.textunderlineChatButton, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||
connect(ui.textitalicChatButton, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||
connect(ui.fontsButton, SIGNAL(clicked()), this, SLOT(getFont()));
|
||||
connect(ui.colorChatButton, SIGNAL(clicked()), this, SLOT(setColor()));
|
||||
connect(ui.fontsButton, SIGNAL(clicked()), this, SLOT(chooseFont()));
|
||||
connect(ui.colorChatButton, SIGNAL(clicked()), this, SLOT(chooseColor()));
|
||||
connect(ui.actionSave_History, SIGNAL(triggered()), this, SLOT(fileSaveAs()));
|
||||
|
||||
connect(ui.hashBox, SIGNAL(fileHashingFinished(QList<HashedFile>)), this, SLOT(fileHashingFinished(QList<HashedFile>)));
|
||||
@ -130,8 +130,9 @@ FriendsDialog::FriendsDialog(QWidget *parent)
|
||||
mCurrentColor = Qt::black;
|
||||
mCurrentFont.fromString(Settings->getChatScreenFont());
|
||||
|
||||
colorChanged(mCurrentColor);
|
||||
fontChanged(mCurrentFont);
|
||||
colorChanged();
|
||||
fontChanged();
|
||||
setColorAndFont();
|
||||
|
||||
style.setStyleFromSettings(ChatStyle::TYPE_PUBLIC);
|
||||
|
||||
@ -150,14 +151,14 @@ FriendsDialog::FriendsDialog(QWidget *parent)
|
||||
}
|
||||
}
|
||||
|
||||
QMenu * grpchatmenu = new QMenu();
|
||||
grpchatmenu->addAction(ui.actionClear_Chat_History);
|
||||
grpchatmenu->addAction(ui.actionDelete_Chat_History);
|
||||
grpchatmenu->addAction(ui.actionSave_History);
|
||||
grpchatmenu->addAction(ui.actionMessageHistory);
|
||||
ui.menuButton->setMenu(grpchatmenu);
|
||||
|
||||
QMenu *menu = new QMenu();
|
||||
menu->addAction(ui.actionClear_Chat_History);
|
||||
menu->addAction(ui.actionDelete_Chat_History);
|
||||
menu->addAction(ui.actionSave_History);
|
||||
menu->addAction(ui.actionMessageHistory);
|
||||
ui.menuButton->setMenu(menu);
|
||||
|
||||
menu = new QMenu();
|
||||
menu->addAction(ui.actionAdd_Friend);
|
||||
menu->addAction(ui.actionAdd_Group);
|
||||
menu->addAction(ui.actionCreate_new_Chat_lobby);
|
||||
@ -493,7 +494,7 @@ void FriendsDialog::sendMsg()
|
||||
// QTextEdit::clear() does not reset the CharFormat if document contains hyperlinks that have been accessed.
|
||||
ui.lineEdit->setCurrentCharFormat(QTextCharFormat ());
|
||||
|
||||
setFont();
|
||||
setColorAndFont();
|
||||
|
||||
/* redraw send list */
|
||||
insertSendList();
|
||||
@ -590,56 +591,60 @@ void FriendsDialog::insertSendList()
|
||||
|
||||
//============================================================================
|
||||
|
||||
void FriendsDialog::setColor()
|
||||
void FriendsDialog::chooseColor()
|
||||
{
|
||||
bool ok;
|
||||
QRgb color = QColorDialog::getRgba(ui.lineEdit->textColor().rgba(), &ok, this);
|
||||
if (ok) {
|
||||
mCurrentColor = QColor(color);
|
||||
colorChanged(mCurrentColor);
|
||||
colorChanged();
|
||||
setColorAndFont();
|
||||
}
|
||||
setFont();
|
||||
}
|
||||
|
||||
void FriendsDialog::colorChanged(const QColor &c)
|
||||
void FriendsDialog::colorChanged()
|
||||
{
|
||||
QPixmap pxm(16,16);
|
||||
pxm.fill(c);
|
||||
pxm.fill(mCurrentColor);
|
||||
ui.colorChatButton->setIcon(pxm);
|
||||
}
|
||||
|
||||
void FriendsDialog::getFont()
|
||||
void FriendsDialog::chooseFont()
|
||||
{
|
||||
bool ok;
|
||||
mCurrentFont = QFontDialog::getFont(&ok, mCurrentFont, this);
|
||||
QFont font = QFontDialog::getFont(&ok, mCurrentFont, this);
|
||||
if (ok) {
|
||||
fontChanged(mCurrentFont);
|
||||
mCurrentFont = font;
|
||||
fontChanged();
|
||||
setFont();
|
||||
}
|
||||
}
|
||||
|
||||
void FriendsDialog::fontChanged(const QFont &font)
|
||||
void FriendsDialog::fontChanged()
|
||||
{
|
||||
mCurrentFont = font;
|
||||
|
||||
ui.textboldChatButton->setChecked(mCurrentFont.bold());
|
||||
ui.textunderlineChatButton->setChecked(mCurrentFont.underline());
|
||||
ui.textitalicChatButton->setChecked(mCurrentFont.italic());
|
||||
|
||||
setFont();
|
||||
}
|
||||
|
||||
void FriendsDialog::setFont()
|
||||
void FriendsDialog::setColorAndFont()
|
||||
{
|
||||
mCurrentFont.setBold(ui.textboldChatButton->isChecked());
|
||||
mCurrentFont.setUnderline(ui.textunderlineChatButton->isChecked());
|
||||
mCurrentFont.setItalic(ui.textitalicChatButton->isChecked());
|
||||
|
||||
ui.lineEdit->setFont(mCurrentFont);
|
||||
ui.lineEdit->setTextColor(mCurrentColor);
|
||||
Settings->setChatScreenFont(mCurrentFont.toString());
|
||||
|
||||
ui.lineEdit->setFocus();
|
||||
}
|
||||
|
||||
void FriendsDialog::setFont()
|
||||
{
|
||||
setColorAndFont();
|
||||
Settings->setChatScreenFont(mCurrentFont.toString());
|
||||
}
|
||||
|
||||
// Update Chat Info information
|
||||
void FriendsDialog::setChatInfo(QString info, QColor color)
|
||||
{
|
||||
|
@ -86,14 +86,14 @@ private slots:
|
||||
|
||||
void addFriend();
|
||||
|
||||
void setColor();
|
||||
void chooseColor();
|
||||
void insertSendList();
|
||||
void sendMsg();
|
||||
|
||||
void statusmessage();
|
||||
|
||||
void setFont();
|
||||
void getFont();
|
||||
void chooseFont();
|
||||
|
||||
void getAvatar();
|
||||
|
||||
@ -122,8 +122,9 @@ private:
|
||||
void processSettings(bool bLoad);
|
||||
void addChatMsg(bool incoming, bool history, const QString &name, const QDateTime &sendTime, const QDateTime &recvTime, const QString &message);
|
||||
|
||||
void colorChanged(const QColor &c);
|
||||
void fontChanged(const QFont &font);
|
||||
void colorChanged();
|
||||
void fontChanged();
|
||||
void setColorAndFont();
|
||||
|
||||
QString fileName;
|
||||
|
||||
|
@ -864,9 +864,6 @@ border: 1px solid #CCCCCC;}</string>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/emoticons/kopete/kopete020.png</normaloff>:/images/emoticons/kopete/kopete020.png</iconset>
|
||||
@ -908,9 +905,6 @@ border: 1px solid #CCCCCC;}</string>
|
||||
<property name="toolTip">
|
||||
<string>Bold</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/edit-bold.png</normaloff>:/images/edit-bold.png</iconset>
|
||||
@ -990,9 +984,6 @@ border: 1px solid #CCCCCC;}</string>
|
||||
<property name="toolTip">
|
||||
<string>Italic</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/edit-italic.png</normaloff>:/images/edit-italic.png</iconset>
|
||||
@ -1031,9 +1022,6 @@ border: 1px solid #CCCCCC;}</string>
|
||||
<property name="toolTip">
|
||||
<string>Font</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/fonts.png</normaloff>:/images/fonts.png</iconset>
|
||||
@ -1069,16 +1057,13 @@ border: 1px solid #CCCCCC;}</string>
|
||||
<property name="toolTip">
|
||||
<string>Text Color</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="menuButton">
|
||||
<widget class="QToolButton" name="menuButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -1100,24 +1085,6 @@ border: 1px solid #CCCCCC;}</string>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton::menu-indicator {
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: bottom right;
|
||||
}
|
||||
|
||||
QPushButton::menu-indicator:pressed, QPushButton::menu-indicator:open {
|
||||
position: relative;
|
||||
top: 1px; left: 1px; /* shift the arrow by 2 px */
|
||||
}
|
||||
|
||||
QPushButton:hover {
|
||||
border: 1px solid #CCCCCC;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/configure.png</normaloff>:/images/configure.png</iconset>
|
||||
@ -1128,7 +1095,10 @@ border: 1px solid #CCCCCC;}</string>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::InstantPopup</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
@ -1159,9 +1129,6 @@ border: 1px solid #CCCCCC;}</string>
|
||||
<property name="toolTip">
|
||||
<string>Attach File</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset>
|
||||
@ -1445,6 +1412,16 @@ background: white;}</string>
|
||||
<string>Friend Recommendations</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionChooseFont">
|
||||
<property name="text">
|
||||
<string>Choose Font</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionResetFont">
|
||||
<property name="text">
|
||||
<string>Reset font to default</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
@ -71,13 +71,14 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
connect(ui->textunderlineButton, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||
connect(ui->textitalicButton, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||
connect(ui->attachPictureButton, SIGNAL(clicked()), this, SLOT(addExtraPicture()));
|
||||
connect(ui->fontButton, SIGNAL(clicked()), this, SLOT(getFont()));
|
||||
connect(ui->colorButton, SIGNAL(clicked()), this, SLOT(setColor()));
|
||||
connect(ui->colorButton, SIGNAL(clicked()), this, SLOT(chooseColor()));
|
||||
connect(ui->emoteiconButton, SIGNAL(clicked()), this, SLOT(smileyWidget()));
|
||||
connect(ui->actionSaveChatHistory, SIGNAL(triggered()), this, SLOT(fileSaveAs()));
|
||||
connect(ui->actionClearChatHistory, SIGNAL(triggered()), this, SLOT(clearChatHistory()));
|
||||
connect(ui->actionDeleteChatHistory, SIGNAL(triggered()), this, SLOT(deleteChatHistory()));
|
||||
connect(ui->actionMessageHistory, SIGNAL(triggered()), this, SLOT(messageHistory()));
|
||||
connect(ui->actionChooseFont, SIGNAL(triggered()), this, SLOT(chooseFont()));
|
||||
connect(ui->actionResetFont, SIGNAL(triggered()), this, SLOT(resetFont()));
|
||||
|
||||
connect(ui->hashBox, SIGNAL(fileHashingFinished(QList<HashedFile>)), this, SLOT(fileHashingFinished(QList<HashedFile>)));
|
||||
|
||||
@ -89,27 +90,22 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
ui->infoframe->setVisible(false);
|
||||
ui->statusmessagelabel->hide();
|
||||
|
||||
ui->textboldButton->setIcon(QIcon(QString(":/images/edit-bold.png")));
|
||||
ui->textunderlineButton->setIcon(QIcon(QString(":/images/edit-underline.png")));
|
||||
ui->textitalicButton->setIcon(QIcon(QString(":/images/edit-italic.png")));
|
||||
ui->fontButton->setIcon(QIcon(QString(":/images/fonts.png")));
|
||||
ui->emoteiconButton->setIcon(QIcon(QString(":/images/emoticons/kopete/kopete020.png")));
|
||||
|
||||
ui->textboldButton->setCheckable(true);
|
||||
ui->textunderlineButton->setCheckable(true);
|
||||
ui->textitalicButton->setCheckable(true);
|
||||
|
||||
setAcceptDrops(true);
|
||||
ui->chattextEdit->setAcceptDrops(false);
|
||||
ui->hashBox->setDropWidget(this);
|
||||
ui->hashBox->setAutoHide(true);
|
||||
|
||||
QMenu *toolmenu = new QMenu();
|
||||
toolmenu->addAction(ui->actionClearChatHistory);
|
||||
toolmenu->addAction(ui->actionDeleteChatHistory);
|
||||
toolmenu->addAction(ui->actionSaveChatHistory);
|
||||
toolmenu->addAction(ui->actionMessageHistory);
|
||||
ui->pushtoolsButton->setMenu(toolmenu);
|
||||
QMenu *menu = new QMenu();
|
||||
menu->addAction(ui->actionChooseFont);
|
||||
menu->addAction(ui->actionResetFont);
|
||||
ui->fontButton->setMenu(menu);
|
||||
|
||||
menu = new QMenu();
|
||||
menu->addAction(ui->actionClearChatHistory);
|
||||
menu->addAction(ui->actionDeleteChatHistory);
|
||||
menu->addAction(ui->actionSaveChatHistory);
|
||||
menu->addAction(ui->actionMessageHistory);
|
||||
ui->pushtoolsButton->setMenu(menu);
|
||||
|
||||
ui->chattextEdit->installEventFilter(this);
|
||||
|
||||
@ -148,8 +144,9 @@ void ChatWidget::init(const std::string &peerId, const QString &title)
|
||||
currentColor.setNamedColor(PeerSettings->getPrivateChatColor(peerId));
|
||||
currentFont.fromString(PeerSettings->getPrivateChatFont(peerId));
|
||||
|
||||
colorChanged(currentColor);
|
||||
fontChanged(currentFont);
|
||||
colorChanged();
|
||||
fontChanged();
|
||||
setColorAndFont();
|
||||
|
||||
// load style
|
||||
PeerSettings->getStyle(peerId, "ChatWidget", style);
|
||||
@ -407,7 +404,7 @@ void ChatWidget::sendChat()
|
||||
// QTextEdit::clear() does not reset the CharFormat if document contains hyperlinks that have been accessed.
|
||||
chatWidget->setCurrentCharFormat(QTextCharFormat ());
|
||||
|
||||
setFont();
|
||||
setColorAndFont();
|
||||
}
|
||||
|
||||
void ChatWidget::on_closeInfoFrameButton_clicked()
|
||||
@ -415,46 +412,51 @@ void ChatWidget::on_closeInfoFrameButton_clicked()
|
||||
ui->infoframe->setVisible(false);
|
||||
}
|
||||
|
||||
void ChatWidget::setColor()
|
||||
void ChatWidget::chooseColor()
|
||||
{
|
||||
bool ok;
|
||||
QRgb color = QColorDialog::getRgba(ui->chattextEdit->textColor().rgba(), &ok, window());
|
||||
if (ok) {
|
||||
currentColor = QColor(color);
|
||||
PeerSettings->setPrivateChatColor(peerId, currentColor.name());
|
||||
colorChanged(currentColor);
|
||||
colorChanged();
|
||||
setColorAndFont();
|
||||
}
|
||||
setFont();
|
||||
}
|
||||
|
||||
void ChatWidget::colorChanged(const QColor &c)
|
||||
void ChatWidget::colorChanged()
|
||||
{
|
||||
QPixmap pix(16, 16);
|
||||
pix.fill(c);
|
||||
pix.fill(currentColor);
|
||||
ui->colorButton->setIcon(pix);
|
||||
}
|
||||
|
||||
void ChatWidget::getFont()
|
||||
void ChatWidget::chooseFont()
|
||||
{
|
||||
bool ok;
|
||||
QFont font = QFontDialog::getFont(&ok, currentFont, this);
|
||||
if (ok) {
|
||||
fontChanged(font);
|
||||
currentFont = font;
|
||||
fontChanged();
|
||||
setFont();
|
||||
}
|
||||
}
|
||||
|
||||
void ChatWidget::fontChanged(const QFont &font)
|
||||
void ChatWidget::resetFont()
|
||||
{
|
||||
currentFont = font;
|
||||
|
||||
ui->textboldButton->setChecked(currentFont.bold());
|
||||
ui->textunderlineButton->setChecked(currentFont.underline());
|
||||
ui->textitalicButton->setChecked(currentFont.italic());
|
||||
|
||||
currentFont.fromString(Settings->getChatScreenFont());
|
||||
fontChanged();
|
||||
setFont();
|
||||
}
|
||||
|
||||
void ChatWidget::setFont()
|
||||
void ChatWidget::fontChanged()
|
||||
{
|
||||
ui->textboldButton->setChecked(currentFont.bold());
|
||||
ui->textunderlineButton->setChecked(currentFont.underline());
|
||||
ui->textitalicButton->setChecked(currentFont.italic());
|
||||
}
|
||||
|
||||
void ChatWidget::setColorAndFont()
|
||||
{
|
||||
currentFont.setBold(ui->textboldButton->isChecked());
|
||||
currentFont.setUnderline(ui->textunderlineButton->isChecked());
|
||||
@ -464,7 +466,11 @@ void ChatWidget::setFont()
|
||||
ui->chattextEdit->setTextColor(currentColor);
|
||||
|
||||
ui->chattextEdit->setFocus();
|
||||
}
|
||||
|
||||
void ChatWidget::setFont()
|
||||
{
|
||||
setColorAndFont();
|
||||
PeerSettings->setPrivateChatFont(peerId, currentFont.toString());
|
||||
}
|
||||
|
||||
|
@ -101,8 +101,9 @@ private slots:
|
||||
void addExtraPicture();
|
||||
void on_closeInfoFrameButton_clicked();
|
||||
|
||||
void setColor();
|
||||
void getFont();
|
||||
void chooseColor();
|
||||
void chooseFont();
|
||||
void resetFont();
|
||||
void setFont();
|
||||
|
||||
void sendChat();
|
||||
@ -117,8 +118,9 @@ private:
|
||||
void updateStatusTyping();
|
||||
void setCurrentFileName(const QString &fileName);
|
||||
|
||||
void colorChanged(const QColor &c);
|
||||
void fontChanged(const QFont &font);
|
||||
void colorChanged();
|
||||
void fontChanged();
|
||||
void setColorAndFont();
|
||||
void processSettings(bool load);
|
||||
|
||||
std::string peerId;
|
||||
|
@ -288,6 +288,10 @@ background: white;}</string>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/emoticons/kopete/kopete020.png</normaloff>:/images/emoticons/kopete/kopete020.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
@ -319,8 +323,12 @@ background: white;}</string>
|
||||
<property name="toolTip">
|
||||
<string>Bold</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/edit-bold.png</normaloff>:/images/edit-bold.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
@ -347,8 +355,12 @@ background: white;}</string>
|
||||
<property name="toolTip">
|
||||
<string>Underline</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/edit-underline.png</normaloff>:/images/edit-underline.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
@ -375,8 +387,12 @@ background: white;}</string>
|
||||
<property name="toolTip">
|
||||
<string>Italic</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/edit-italic.png</normaloff>:/images/edit-italic.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
@ -387,13 +403,13 @@ background: white;}</string>
|
||||
<widget class="QToolButton" name="fontButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<width>32</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<width>32</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -403,8 +419,12 @@ background: white;}</string>
|
||||
<property name="toolTip">
|
||||
<string>Font</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/fonts.png</normaloff>:/images/fonts.png</iconset>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::InstantPopup</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
@ -456,9 +476,6 @@ background: white;}</string>
|
||||
<property name="toolTip">
|
||||
<string>Attach a Picture</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/add_image24.png</normaloff>:/images/add_image24.png</iconset>
|
||||
@ -488,9 +505,6 @@ background: white;}</string>
|
||||
<property name="toolTip">
|
||||
<string>Add a File for your Friend</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset>
|
||||
@ -507,7 +521,7 @@ background: white;}</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushtoolsButton">
|
||||
<widget class="QToolButton" name="pushtoolsButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
@ -523,24 +537,6 @@ background: white;}</string>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton::menu-indicator {
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: bottom right;
|
||||
}
|
||||
|
||||
QPushButton::menu-indicator:pressed, QPushButton::menu-indicator:open {
|
||||
position: relative;
|
||||
top: 1px; left: 1px; /* shift the arrow by 2 px */
|
||||
}
|
||||
|
||||
QPushButton:hover {
|
||||
border: 1px solid #CCCCCC;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/configure.png</normaloff>:/images/configure.png</iconset>
|
||||
@ -551,7 +547,10 @@ border: 1px solid #CCCCCC;
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::InstantPopup</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
@ -651,6 +650,16 @@ border: 1px solid #CCCCCC;
|
||||
<string>Deletes all stored and displayed chat history</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionChooseFont">
|
||||
<property name="text">
|
||||
<string>Choose font</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionResetFont">
|
||||
<property name="text">
|
||||
<string>Reset font to default</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
@ -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)
|
||||
|
Binary file not shown.
@ -790,7 +790,7 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="+26"/>
|
||||
<location filename="../gui/feeds/ChanMsgItem.cpp" line="+323"/>
|
||||
<location filename="../gui/feeds/ChanMsgItem.cpp" line="+324"/>
|
||||
<source>Expand</source>
|
||||
<translation>Erweitern</translation>
|
||||
</message>
|
||||
@ -1102,7 +1102,7 @@ Do you want to send them a Message instead</source>
|
||||
<context>
|
||||
<name>ChatLobbyDialog</name>
|
||||
<message>
|
||||
<location filename="../gui/chat/ChatLobbyDialog.cpp" line="+115"/>
|
||||
<location filename="../gui/chat/ChatLobbyDialog.cpp" line="+117"/>
|
||||
<source>Please enter your new nick name</source>
|
||||
<translation>Bitte gib deinen neuen Spitznamen ein</translation>
|
||||
</message>
|
||||
@ -1469,50 +1469,50 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Schliessen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+332"/>
|
||||
<location line="+346"/>
|
||||
<source>Attach a Picture</source>
|
||||
<translation>Bild anhängen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+32"/>
|
||||
<location line="+29"/>
|
||||
<source>Add a File for your Friend</source>
|
||||
<translation>Füge eine Datei für deinen Freund hinzu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+86"/>
|
||||
<location line="+68"/>
|
||||
<source>Send</source>
|
||||
<translation>Senden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-255"/>
|
||||
<location line="+271"/>
|
||||
<location line="-250"/>
|
||||
<location line="+266"/>
|
||||
<source>Bold</source>
|
||||
<translation>Fett</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-243"/>
|
||||
<location line="+253"/>
|
||||
<location line="-234"/>
|
||||
<location line="+244"/>
|
||||
<source>Underline</source>
|
||||
<translation>Unterstrichen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-225"/>
|
||||
<location line="+220"/>
|
||||
<location line="-212"/>
|
||||
<location line="+207"/>
|
||||
<source>Italic</source>
|
||||
<translation>Kursiv</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-192"/>
|
||||
<location line="-175"/>
|
||||
<source>Font</source>
|
||||
<translation>Schriftart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+28"/>
|
||||
<location line="+32"/>
|
||||
<source>Text Color</source>
|
||||
<translation>Textfarbe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+174"/>
|
||||
<location line="+153"/>
|
||||
<source>Strike</source>
|
||||
<translation>Durchgestrichen</translation>
|
||||
</message>
|
||||
@ -1553,7 +1553,17 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Löscht den gespeicherten und angezeigten Chat Verlauf</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/chat/ChatWidget.cpp" line="+348"/>
|
||||
<location line="+5"/>
|
||||
<source>Choose font</source>
|
||||
<translation>Schriftart wählen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<source>Reset font to default</source>
|
||||
<translation>Schriftart auf den Standard setzen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/chat/ChatWidget.cpp" line="+344"/>
|
||||
<source>Paste RetroShare Link</source>
|
||||
<translation>RetroShare Link einfügen</translation>
|
||||
</message>
|
||||
@ -1563,7 +1573,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>tippt...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+118"/>
|
||||
<location line="+129"/>
|
||||
<source>Do you really want to physically delete the history?</source>
|
||||
<translation>Möchtest du wirklich den Nachrichtenverlauf physisch löschen?</translation>
|
||||
</message>
|
||||
@ -1684,7 +1694,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>ConfCertDialog</name>
|
||||
<message>
|
||||
<location filename="../gui/connect/ConfCertDialog.ui" line="+753"/>
|
||||
<location filename="../gui/connect/ConfCertDialog.ui" line="+746"/>
|
||||
<source>Cancel</source>
|
||||
<translation>Abbrechen</translation>
|
||||
</message>
|
||||
@ -1694,7 +1704,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>OK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-702"/>
|
||||
<location line="-695"/>
|
||||
<source>Peer Info</source>
|
||||
<translation>Nachbar Info</translation>
|
||||
</message>
|
||||
@ -1714,12 +1724,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Peer ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+137"/>
|
||||
<location line="+134"/>
|
||||
<source>Peer Address</source>
|
||||
<translation>Adresse des Nachbarn</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+448"/>
|
||||
<location line="+444"/>
|
||||
<source>Deny Friend</source>
|
||||
<translation>Blockiere Freund</translation>
|
||||
</message>
|
||||
@ -1735,7 +1745,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Unterzeichne GPG Schlüssel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-196"/>
|
||||
<location line="-192"/>
|
||||
<source>Your trust in this peer is:</source>
|
||||
<translation>Dein Vertrauen zu diesem Nachbar ist:</translation>
|
||||
</message>
|
||||
@ -1755,7 +1765,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Nachbar Schlüssel ist unterzeichnet von:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-476"/>
|
||||
<location line="-473"/>
|
||||
<source>Last Contact</source>
|
||||
<translation>Letzter Kontakt</translation>
|
||||
</message>
|
||||
@ -1775,7 +1785,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Ort</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+52"/>
|
||||
<location line="+49"/>
|
||||
<source>Status</source>
|
||||
<translation>Status</translation>
|
||||
</message>
|
||||
@ -1816,7 +1826,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Voll </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+94"/>
|
||||
<location line="+90"/>
|
||||
<location line="+29"/>
|
||||
<source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
@ -1915,7 +1925,7 @@ und meinen GPG Schlüssel nicht unterzeichnet</translation>
|
||||
<translation>Vielleicht ist das Passwort falsch</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/connect/ConfCertDialog.ui" line="-329"/>
|
||||
<location filename="../gui/connect/ConfCertDialog.ui" line="-325"/>
|
||||
<source>Trust </source>
|
||||
<translation>Vertrauen </translation>
|
||||
</message>
|
||||
@ -1930,12 +1940,12 @@ und meinen GPG Schlüssel nicht unterzeichnet</translation>
|
||||
<translation>Zeige Hilfe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-414"/>
|
||||
<location line="-411"/>
|
||||
<source>RetroShare ID</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+588"/>
|
||||
<location line="+581"/>
|
||||
<source>Certificate</source>
|
||||
<translation>Zertifikat</translation>
|
||||
</message>
|
||||
@ -4582,7 +4592,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Forum erstellen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+620"/>
|
||||
<location line="+614"/>
|
||||
<source>Print</source>
|
||||
<translation>Drucken</translation>
|
||||
</message>
|
||||
@ -4598,7 +4608,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Erstelle neues Thema</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/ForumsDialog.ui" line="-227"/>
|
||||
<location filename="../gui/ForumsDialog.ui" line="-221"/>
|
||||
<source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
@ -5062,17 +5072,17 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Gruppenchat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+456"/>
|
||||
<location line="+417"/>
|
||||
<source>Messages entered here are sent to all connected friends</source>
|
||||
<translation>Nachrichten, die Du hier eingibst, werden an alle verbundenen Freunde versendet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-369"/>
|
||||
<location line="-333"/>
|
||||
<source>Bold</source>
|
||||
<translation>Fett</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+41"/>
|
||||
<location line="+38"/>
|
||||
<source>Underline</source>
|
||||
<translation>Unterstrichen</translation>
|
||||
</message>
|
||||
@ -5082,27 +5092,27 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Kursiv</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+41"/>
|
||||
<location line="+38"/>
|
||||
<source>Font</source>
|
||||
<translation>Schriftart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+38"/>
|
||||
<location line="+35"/>
|
||||
<source>Text Color</source>
|
||||
<translation>Textfarbe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+90"/>
|
||||
<location line="+72"/>
|
||||
<source>Attach File</source>
|
||||
<translation>Datei anhängen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+41"/>
|
||||
<location line="+38"/>
|
||||
<source>Send</source>
|
||||
<translation>Senden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+117"/>
|
||||
<location line="+111"/>
|
||||
<source>Clear Chat History</source>
|
||||
<translation>Nachrichtenverlauf leeren</translation>
|
||||
</message>
|
||||
@ -5181,10 +5191,20 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Neue Chat Lobby erstellen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<location line="+9"/>
|
||||
<source>Friend Recommendations</source>
|
||||
<translation>Freundempfehlungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<source>Choose Font</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<source>Reset font to default</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hide Offline Friends</source>
|
||||
<translation type="obsolete">Verstecke offline Freunde</translation>
|
||||
@ -5206,7 +5226,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">Status ausblenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-32"/>
|
||||
<location line="-46"/>
|
||||
<location line="+3"/>
|
||||
<source>Add a new Group</source>
|
||||
<translation>Neue Gruppe hinzufügen</translation>
|
||||
@ -7874,7 +7894,7 @@ Möchtest du die Nachricht speichern ?</translation>
|
||||
<context>
|
||||
<name>MessageWidget</name>
|
||||
<message>
|
||||
<location filename="../gui/msgs/MessageWidget.ui" line="+80"/>
|
||||
<location filename="../gui/msgs/MessageWidget.ui" line="+74"/>
|
||||
<source><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
|
||||
@ -13909,7 +13929,7 @@ p, li { white-space: pre-wrap; }
|
||||
<message>
|
||||
<location line="+125"/>
|
||||
<source>Priority (Speed)...</source>
|
||||
<translation>Prioritä t(Geschwindigkeit)...</translation>
|
||||
<translation>Priorität (Geschwindigkeit)...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-123"/>
|
||||
|
Loading…
Reference in New Issue
Block a user