mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-10 03:49:51 -05:00
Add Chat Load Embedded Images Option like forum and message.
This commit is contained in:
parent
0e1c0c2eb3
commit
f71aad4b9c
@ -120,7 +120,7 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
|||||||
|
|
||||||
ui->actionSearchWithoutLimit->setText(tr("Don't stop to color after")+" "+QString::number(uiMaxSearchLimitColor)+" "+tr("items found (need more CPU)"));
|
ui->actionSearchWithoutLimit->setText(tr("Don't stop to color after")+" "+QString::number(uiMaxSearchLimitColor)+" "+tr("items found (need more CPU)"));
|
||||||
|
|
||||||
ui->markButton->setVisible(false);
|
ui->markButton->setVisible(false);
|
||||||
ui->leSearch->setVisible(false);
|
ui->leSearch->setVisible(false);
|
||||||
ui->searchBefore->setVisible(false);
|
ui->searchBefore->setVisible(false);
|
||||||
ui->searchBefore->setToolTip(tr("<b>Find Previous </b><br/><i>Ctrl+Shift+G</i>"));
|
ui->searchBefore->setToolTip(tr("<b>Find Previous </b><br/><i>Ctrl+Shift+G</i>"));
|
||||||
@ -194,8 +194,10 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
|||||||
ui->pushtoolsButton->setMenu(menu);
|
ui->pushtoolsButton->setMenu(menu);
|
||||||
menu->addMenu(fontmenu);
|
menu->addMenu(fontmenu);
|
||||||
|
|
||||||
ui->actionSendAsPlainText->setChecked(Settings->getChatSendAsPlainTextByDef());
|
ui->actionSendAsPlainText->setChecked(Settings->getChatSendAsPlainTextByDef());
|
||||||
|
|
||||||
|
ui->textBrowser->resetImagesStatus(Settings->getChatLoadEmbeddedImages());
|
||||||
|
ui->textBrowser->setImageBlockWidget(ui->imageBlockWidget);
|
||||||
ui->textBrowser->installEventFilter(this);
|
ui->textBrowser->installEventFilter(this);
|
||||||
ui->textBrowser->viewport()->installEventFilter(this);
|
ui->textBrowser->viewport()->installEventFilter(this);
|
||||||
ui->chatTextEdit->installEventFilter(this);
|
ui->chatTextEdit->installEventFilter(this);
|
||||||
|
@ -206,6 +206,16 @@ border-image: url(:/images/closepressed.png)
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="RSImageBlockWidget" name="imageBlockWidget" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSplitter" name="chatVSplitter">
|
<widget class="QSplitter" name="chatVSplitter">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -1007,6 +1017,12 @@ border-image: url(:/images/closepressed.png)
|
|||||||
<extends>QTextEdit</extends>
|
<extends>QTextEdit</extends>
|
||||||
<header location="global">gui/common/MimeTextEdit.h</header>
|
<header location="global">gui/common/MimeTextEdit.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>RSImageBlockWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>gui/common/RSImageBlockWidget.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../emojione.qrc"/>
|
<include location="../emojione.qrc"/>
|
||||||
|
@ -130,6 +130,7 @@ ChatPage::save(QString &/*errmsg*/)
|
|||||||
|
|
||||||
Settings->setChatSendMessageWithCtrlReturn(ui.sendMessageWithCtrlReturn->isChecked());
|
Settings->setChatSendMessageWithCtrlReturn(ui.sendMessageWithCtrlReturn->isChecked());
|
||||||
Settings->setChatSendAsPlainTextByDef(ui.sendAsPlainTextByDef->isChecked());
|
Settings->setChatSendAsPlainTextByDef(ui.sendAsPlainTextByDef->isChecked());
|
||||||
|
Settings->setChatLoadEmbeddedImages(ui.loadEmbeddedImages->isChecked());
|
||||||
|
|
||||||
Settings->setChatSearchCharToStartSearch(ui.sbSearch_CharToStart->value());
|
Settings->setChatSearchCharToStartSearch(ui.sbSearch_CharToStart->value());
|
||||||
Settings->setChatSearchCaseSensitively(ui.cbSearch_CaseSensitively->isChecked());
|
Settings->setChatSearchCaseSensitively(ui.cbSearch_CaseSensitively->isChecked());
|
||||||
@ -238,6 +239,7 @@ ChatPage::load()
|
|||||||
|
|
||||||
ui.sendMessageWithCtrlReturn->setChecked(Settings->getChatSendMessageWithCtrlReturn());
|
ui.sendMessageWithCtrlReturn->setChecked(Settings->getChatSendMessageWithCtrlReturn());
|
||||||
ui.sendAsPlainTextByDef->setChecked(Settings->getChatSendAsPlainTextByDef());
|
ui.sendAsPlainTextByDef->setChecked(Settings->getChatSendAsPlainTextByDef());
|
||||||
|
ui.loadEmbeddedImages->setChecked(Settings->getChatLoadEmbeddedImages());
|
||||||
|
|
||||||
ui.sbSearch_CharToStart->setValue(Settings->getChatSearchCharToStartSearch());
|
ui.sbSearch_CharToStart->setValue(Settings->getChatSearchCharToStartSearch());
|
||||||
ui.cbSearch_CaseSensitively->setChecked(Settings->getChatSearchCaseSensitively());
|
ui.cbSearch_CaseSensitively->setChecked(Settings->getChatSearchCaseSensitively());
|
||||||
|
@ -218,6 +218,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="loadEmbeddedImages">
|
||||||
|
<property name="text">
|
||||||
|
<string>Load embedded images</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -345,6 +345,8 @@ static QString getKeyForLastDir(RshareSettings::enumLastDir type)
|
|||||||
return "Messages";
|
return "Messages";
|
||||||
case RshareSettings::LASTDIR_SOUNDS:
|
case RshareSettings::LASTDIR_SOUNDS:
|
||||||
return "SOUNDS";
|
return "SOUNDS";
|
||||||
|
case RshareSettings::LASTDIR_PLUGIN:
|
||||||
|
return "PLUGIN";
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -601,6 +603,16 @@ QRgb RshareSettings::getChatSearchFoundColor()
|
|||||||
return valueFromGroup("Chat", "SearchMaxSearchFoundColor", QString::number(QColor(255,255,150).rgba())).toUInt();
|
return valueFromGroup("Chat", "SearchMaxSearchFoundColor", QString::number(QColor(255,255,150).rgba())).toUInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RshareSettings::getChatLoadEmbeddedImages()
|
||||||
|
{
|
||||||
|
return valueFromGroup("Chat", "LoadEmbeddedImages", true).toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RshareSettings::setChatLoadEmbeddedImages(bool value)
|
||||||
|
{
|
||||||
|
setValueToGroup("Chat", "LoadEmbeddedImages", value);
|
||||||
|
}
|
||||||
|
|
||||||
RshareSettings::enumToasterPosition RshareSettings::getToasterPosition()
|
RshareSettings::enumToasterPosition RshareSettings::getToasterPosition()
|
||||||
{
|
{
|
||||||
return (enumToasterPosition) value("ToasterPosition", TOASTERPOS_BOTTOMRIGHT).toInt();
|
return (enumToasterPosition) value("ToasterPosition", TOASTERPOS_BOTTOMRIGHT).toInt();
|
||||||
|
@ -237,6 +237,9 @@ public:
|
|||||||
void setChatSearchFoundColor(QRgb rgbValue);
|
void setChatSearchFoundColor(QRgb rgbValue);
|
||||||
QRgb getChatSearchFoundColor();
|
QRgb getChatSearchFoundColor();
|
||||||
|
|
||||||
|
bool getChatLoadEmbeddedImages();
|
||||||
|
void setChatLoadEmbeddedImages(bool value);
|
||||||
|
|
||||||
enumToasterPosition getToasterPosition();
|
enumToasterPosition getToasterPosition();
|
||||||
void setToasterPosition(enumToasterPosition position);
|
void setToasterPosition(enumToasterPosition position);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user