mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 08:29:26 -05:00
Merge pull request #260 from PhenomRetroShare/Add_SendAsPlainText_And_NoEmoteIcon_Button
Add buttons to send message in plain text and without EmoteIcon.
This commit is contained in:
commit
cedce2ecef
@ -72,7 +72,7 @@ ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WindowFlags flags)
|
||||
|
||||
QObject::connect( ui.filterLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterItems(QString)));
|
||||
QObject::connect( ui.filterLineEdit, SIGNAL(filterChanged(int)), this, SLOT(filterColumnChanged(int)));
|
||||
QObject::connect( ui.createlobbytoolButton, SIGNAL(clicked()), this, SLOT(createChatLobby()));
|
||||
QObject::connect( ui.createLobbyToolButton, SIGNAL(clicked()), this, SLOT(createChatLobby()));
|
||||
|
||||
compareRole = new RSTreeWidgetItemCompareRole;
|
||||
compareRole->setRole(COLUMN_NAME, ROLE_SORT);
|
||||
|
@ -10,8 +10,17 @@
|
||||
<height>517</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="margin">
|
||||
<layout class="QVBoxLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -28,8 +37,17 @@
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="margin">
|
||||
<layout class="QHBoxLayout" name="titleBarFrameLayout">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
@ -53,7 +71,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<spacer name="titleBarVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -91,7 +109,7 @@
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<layout class="QVBoxLayout" name="lobbyTreeVLayout">
|
||||
<item>
|
||||
<widget class="QFrame" name="toolBarFrame">
|
||||
<property name="styleSheet">
|
||||
@ -103,7 +121,7 @@
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<layout class="QGridLayout" name="toolBarFrameGLayout">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
@ -130,7 +148,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QToolButton" name="createlobbytoolButton">
|
||||
<widget class="QToolButton" name="createLobbyToolButton">
|
||||
<property name="toolTip">
|
||||
<string>Create chat lobby</string>
|
||||
</property>
|
||||
@ -183,8 +201,17 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="_lobby_blank_page">
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<property name="margin">
|
||||
<layout class="QGridLayout" name="_lobby_blank_pageGLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@ -195,13 +222,13 @@
|
||||
<property name="title">
|
||||
<string>Selected lobby info</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<layout class="QVBoxLayout" name="lobbyinfo_groupBoxVLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<layout class="QHBoxLayout" name="lobbyInfoHLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="lobbyInfoNameVLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QLabel" name="lobbyname_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
@ -214,7 +241,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<widget class="QLabel" name="lobbyid_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
@ -227,7 +254,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<widget class="QLabel" name="lobbytopic_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
@ -240,7 +267,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<widget class="QLabel" name="lobbytype_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
@ -253,7 +280,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<widget class="QLabel" name="lobbysec_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
@ -266,7 +293,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<widget class="QLabel" name="lobbypeers_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
@ -281,7 +308,7 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<layout class="QVBoxLayout" name="lobbyInfoValueVLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="lobbyname_lineEdit">
|
||||
<property name="sizePolicy">
|
||||
@ -372,7 +399,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<spacer name="lobbyInfoVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<property name="windowTitle">
|
||||
<string notr="true">MainWindow</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QHBoxLayout" name="ChatLobbyDialogHLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -52,7 +52,7 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<layout class="QVBoxLayout" name="participantsFrameVLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
@ -99,6 +99,10 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
ui->addFileButton->setIconSize(iconSize);
|
||||
ui->pushtoolsButton->setFixedSize(buttonSize);
|
||||
ui->pushtoolsButton->setIconSize(iconSize);
|
||||
ui->sendAsPlainTextButton->setFixedSize(buttonSize);
|
||||
ui->sendAsPlainTextButton->setIconSize(iconSize);
|
||||
ui->noEmbedButton->setFixedSize(buttonSize);
|
||||
ui->noEmbedButton->setIconSize(iconSize);
|
||||
ui->notifyButton->setFixedSize(buttonSize);
|
||||
ui->notifyButton->setIconSize(iconSize);
|
||||
ui->markButton->setFixedSize(buttonSize);
|
||||
@ -191,6 +195,7 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
menu->addAction(ui->actionSaveChatHistory);
|
||||
menu->addAction(ui->actionMessageHistory);
|
||||
ui->pushtoolsButton->setMenu(menu);
|
||||
ui->sendAsPlainTextButton->setChecked(Settings->getChatSendAsPlainTextByDef());
|
||||
|
||||
ui->textBrowser->installEventFilter(this);
|
||||
ui->textBrowser->viewport()->installEventFilter(this);
|
||||
@ -899,7 +904,8 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const RsGxsId gx
|
||||
|
||||
// embed smileys ?
|
||||
if (Settings->valueFromGroup(QString("Chat"), QString::fromUtf8("Emoteicons_PrivatChat"), true).toBool()) {
|
||||
formatTextFlag |= RSHTML_FORMATTEXT_EMBED_SMILEYS;
|
||||
if (!message.contains("NoEmbed=\"true\""))
|
||||
formatTextFlag |= RSHTML_FORMATTEXT_EMBED_SMILEYS;
|
||||
}
|
||||
|
||||
// Always fix colors
|
||||
@ -1134,7 +1140,12 @@ void ChatWidget::sendChat()
|
||||
}
|
||||
|
||||
QString text;
|
||||
RsHtml::optimizeHtml(chatWidget, text);
|
||||
if (ui->sendAsPlainTextButton->isChecked()){
|
||||
text = chatWidget->toPlainText();
|
||||
text.replace(QChar(-4),"");//Char used when image on text.
|
||||
} else {
|
||||
RsHtml::optimizeHtml(chatWidget, text, (ui->noEmbedButton->isChecked() ? RSHTML_FORMATTEXT_NO_EMBED : 0));
|
||||
}
|
||||
std::string msg = text.toUtf8().constData();
|
||||
|
||||
if (msg.empty()) {
|
||||
|
@ -513,6 +513,42 @@ border-image: url(:/images/closepressed.png)
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="sendAsPlainTextButton">
|
||||
<property name="toolTip">
|
||||
<string>Send as plain text without font.</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/ColoredText.png</normaloff>
|
||||
<normalon>:/images/SimpleText.png</normalon>:/images/ColoredText.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="noEmbedButton">
|
||||
<property name="toolTip">
|
||||
<string>Don't replace tag with Emote Icon.</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/emoticons/kopete/kopete020.png</normaloff>
|
||||
<normalon>:/images/SmileyText.png</normalon>:/images/emoticons/kopete/kopete020.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="pluginButtonFrame">
|
||||
<property name="frameShape">
|
||||
|
@ -658,5 +658,8 @@
|
||||
<file>images/rsmessenger16.png</file>
|
||||
<file>images/rsmessenger32.png</file>
|
||||
<file>images/rsmessenger48.png</file>
|
||||
<file>images/SmileyText.png</file>
|
||||
<file>images/SimpleText.png</file>
|
||||
<file>images/ColoredText.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
BIN
retroshare-gui/src/gui/images/ColoredText.png
Executable file
BIN
retroshare-gui/src/gui/images/ColoredText.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
retroshare-gui/src/gui/images/SimpleText.png
Executable file
BIN
retroshare-gui/src/gui/images/SimpleText.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
retroshare-gui/src/gui/images/SmileyText.png
Executable file
BIN
retroshare-gui/src/gui/images/SmileyText.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
@ -100,7 +100,7 @@ ChatPage::ChatPage(QWidget * parent, Qt::WindowFlags flags)
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
connect(ui.distantChatcomboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(distantChatComboBoxChanged(int)));
|
||||
connect(ui.distantChatComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(distantChatComboBoxChanged(int)));
|
||||
|
||||
#if QT_VERSION < 0x040600
|
||||
ui.minimumContrastLabel->hide();
|
||||
@ -123,12 +123,13 @@ ChatPage::save(QString &/*errmsg*/)
|
||||
Settings->setValue("MinimumContrast", ui.minimumContrast->value());
|
||||
Settings->endGroup();
|
||||
// state of distant Chat combobox
|
||||
Settings->setValue("DistantChat", ui.distantChatcomboBox->currentIndex());
|
||||
Settings->setValue("DistantChat", ui.distantChatComboBox->currentIndex());
|
||||
|
||||
Settings->setChatScreenFont(fontTempChat.toString());
|
||||
NotifyQt::getInstance()->notifyChatFontChanged();
|
||||
|
||||
Settings->setChatSendMessageWithCtrlReturn(ui.sendMessageWithCtrlReturn->isChecked());
|
||||
Settings->setChatSendAsPlainTextByDef(ui.sendAsPlainTextByDef->isChecked());
|
||||
|
||||
Settings->setChatSearchCharToStartSearch(ui.sbSearch_CharToStart->value());
|
||||
Settings->setChatSearchCaseSensitively(ui.cbSearch_CaseSensitively->isChecked());
|
||||
@ -231,11 +232,12 @@ ChatPage::load()
|
||||
|
||||
// state of distant Chat combobox
|
||||
int index = Settings->value("DistantChat", 0).toInt();
|
||||
ui.distantChatcomboBox->setCurrentIndex(index);
|
||||
ui.distantChatComboBox->setCurrentIndex(index);
|
||||
|
||||
fontTempChat.fromString(Settings->getChatScreenFont());
|
||||
|
||||
ui.sendMessageWithCtrlReturn->setChecked(Settings->getChatSendMessageWithCtrlReturn());
|
||||
ui.sendAsPlainTextByDef->setChecked(Settings->getChatSendAsPlainTextByDef());
|
||||
|
||||
ui.sbSearch_CharToStart->setValue(Settings->getChatSearchCharToStartSearch());
|
||||
ui.cbSearch_CaseSensitively->setChecked(Settings->getChatSearchCaseSensitively());
|
||||
|
@ -6,11 +6,11 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>705</width>
|
||||
<height>517</height>
|
||||
<width>635</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<layout class="QGridLayout">
|
||||
<item row="3" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
@ -20,15 +20,15 @@
|
||||
<attribute name="title">
|
||||
<string>General</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<layout class="QGridLayout" name="generalGLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<widget class="QGroupBox" name="distantGBox">
|
||||
<property name="title">
|
||||
<string>Distant Chat</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<layout class="QGridLayout" name="distantGBoxGLayout">
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="distantChatcomboBox">
|
||||
<widget class="QComboBox" name="distantChatComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Everyone</string>
|
||||
@ -47,7 +47,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="distantchatlabel">
|
||||
<widget class="QLabel" name="distantChatLabel">
|
||||
<property name="text">
|
||||
<string>Accept encrypted distant chat from</string>
|
||||
</property>
|
||||
@ -57,9 +57,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<layout class="QVBoxLayout" name="leftVLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<widget class="QGroupBox" name="chatSettingsGBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -69,7 +69,7 @@
|
||||
<property name="title">
|
||||
<string>Chat Settings</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<layout class="QVBoxLayout" name="chatSettingsGBoxVLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_emoteprivchat">
|
||||
<property name="text">
|
||||
@ -111,7 +111,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="hl_minimumFontSize">
|
||||
<layout class="QHBoxLayout" name="minimumFontSizeHLayout">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -123,7 +123,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="hs_minimumFontSize">
|
||||
<spacer name="minimumFontSizeHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -168,7 +168,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_40">
|
||||
<layout class="QHBoxLayout" name="minimumContrastHLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="minimumContrastLabel">
|
||||
<property name="text">
|
||||
@ -177,7 +177,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<spacer name="minimumContrastHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -211,15 +211,22 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="sendAsPlainTextByDef">
|
||||
<property name="text">
|
||||
<string>Send as plain text by default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="chatLobbyGroupBox">
|
||||
<widget class="QGroupBox" name="chatLobbyGBox">
|
||||
<property name="title">
|
||||
<string>Chat Lobby</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<layout class="QVBoxLayout" name="chatLobbyGBoxVLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chatLobby_Blink">
|
||||
<property name="text">
|
||||
@ -228,7 +235,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QLabel" name="defIDLabel">
|
||||
<property name="text">
|
||||
<string>Default identity for chat lobbies:</string>
|
||||
</property>
|
||||
@ -237,7 +244,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="nickNameLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<spacer name="chatLobbyIdentity_HSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -261,7 +268,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<spacer name="leftVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
@ -276,13 +283,13 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<layout class="QVBoxLayout" name="rightVLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<widget class="QGroupBox" name="privateChatGBox">
|
||||
<property name="title">
|
||||
<string>Private Chat</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="_2">
|
||||
<layout class="QVBoxLayout" name="privateChatGBoxVLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chat_NewWindow">
|
||||
<property name="text">
|
||||
@ -315,11 +322,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxIRCColors">
|
||||
<widget class="QGroupBox" name="chatFontGBox">
|
||||
<property name="title">
|
||||
<string>Chat Font</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<layout class="QVBoxLayout" name="chatFontGBoxVLayout">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
@ -366,7 +373,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxSearch">
|
||||
<widget class="QGroupBox" name="searchGBox">
|
||||
<property name="title">
|
||||
<string>Search by default</string>
|
||||
</property>
|
||||
@ -530,7 +537,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<spacer name="rightVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
@ -550,9 +557,9 @@
|
||||
<attribute name="title">
|
||||
<string>History</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="historyVLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<widget class="QLabel" name="histHeaderLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
@ -574,11 +581,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<layout class="QHBoxLayout" name="histSetupVLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<layout class="QGridLayout" name="histSetupGLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<widget class="QLabel" name="publicHeaderLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
@ -591,7 +598,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<widget class="QLabel" name="privateHeaderLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
@ -604,7 +611,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<widget class="QLabel" name="lobbyHeaderLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
@ -617,7 +624,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<widget class="QLabel" name="labelChatEnable">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
@ -651,7 +658,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label1">
|
||||
<widget class="QLabel" name="labelChatSaveCount">
|
||||
<property name="text">
|
||||
<string>Saved messages (0 = unlimited):</string>
|
||||
</property>
|
||||
@ -718,7 +725,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label2">
|
||||
<widget class="QLabel" name="labelChatLoadCount">
|
||||
<property name="text">
|
||||
<string>Number of messages restored (0 = off):</string>
|
||||
</property>
|
||||
@ -769,7 +776,7 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<spacer name="histSetupHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -784,15 +791,15 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_5">
|
||||
<widget class="QGroupBox" name="histGenGBox">
|
||||
<property name="title">
|
||||
<string>General</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<layout class="QVBoxLayout" name="histGenGBoxVLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<layout class="QHBoxLayout" name="max_storage_period_HLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<widget class="QLabel" name="max_storage_period_Label">
|
||||
<property name="text">
|
||||
<string>Maximum storage period, in days (0=keep all):</string>
|
||||
</property>
|
||||
@ -802,7 +809,7 @@
|
||||
<widget class="QSpinBox" name="max_storage_period"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<spacer name="max_storage_period_HSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -820,7 +827,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<spacer name="histVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
@ -838,7 +845,7 @@
|
||||
<attribute name="title">
|
||||
<string>Style</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QHBoxLayout" name="styleHLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="styleTabWidget">
|
||||
<property name="tabPosition">
|
||||
@ -851,11 +858,11 @@
|
||||
<attribute name="title">
|
||||
<string>Group chat</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="publicLayout_1">
|
||||
<layout class="QVBoxLayout" name="publicTabVLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="publiclLayout_2">
|
||||
<layout class="QHBoxLayout" name="publicStyleHLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="publicLayout_3">
|
||||
<layout class="QVBoxLayout" name="publicStyleListVLayout">
|
||||
<item>
|
||||
<widget class="QListWidget" name="publicList">
|
||||
<property name="sizePolicy">
|
||||
@ -873,7 +880,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="publicLayout_4">
|
||||
<layout class="QHBoxLayout" name="publicStyleVarHLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="publicLabelVariant">
|
||||
<property name="sizePolicy">
|
||||
@ -921,7 +928,7 @@
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelPublicAuthor">
|
||||
<widget class="QLabel" name="publicLabelAuthor">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@ -934,7 +941,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelPublicDescription">
|
||||
<widget class="QLabel" name="publicLabelDescription">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@ -986,11 +993,11 @@
|
||||
<attribute name="title">
|
||||
<string>Private chat</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="privateLayout_1">
|
||||
<layout class="QVBoxLayout" name="privateTabVLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="privatelLayout_2">
|
||||
<layout class="QHBoxLayout" name="privateStyleHLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="privateLayout_3">
|
||||
<layout class="QVBoxLayout" name="privateStyleListVLayout">
|
||||
<item>
|
||||
<widget class="QListWidget" name="privateList">
|
||||
<property name="sizePolicy">
|
||||
@ -1008,7 +1015,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="privateLayout_4">
|
||||
<layout class="QHBoxLayout" name="privateStyleVarHLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="privateLabelVariant">
|
||||
<property name="sizePolicy">
|
||||
@ -1056,7 +1063,7 @@
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelPrivateAuthor">
|
||||
<widget class="QLabel" name="privateLabelAuthor">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@ -1069,7 +1076,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelPrivateDescription">
|
||||
<widget class="QLabel" name="privateLabelDescription">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@ -1121,11 +1128,11 @@
|
||||
<attribute name="title">
|
||||
<string>History</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="historyLayout_1">
|
||||
<layout class="QVBoxLayout" name="historyTabVLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="historylLayout_2">
|
||||
<layout class="QHBoxLayout" name="historyStyleHLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="historyLayout_3">
|
||||
<layout class="QVBoxLayout" name="historyStyleListVLayout">
|
||||
<item>
|
||||
<widget class="QListWidget" name="historyList">
|
||||
<property name="sizePolicy">
|
||||
@ -1143,7 +1150,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="historyLayout_4">
|
||||
<layout class="QHBoxLayout" name="historyStyleVarHLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="historyLabelVariant">
|
||||
<property name="sizePolicy">
|
||||
@ -1191,7 +1198,7 @@
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelHistoryAuthor">
|
||||
<widget class="QLabel" name="historyLabelAuthor">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@ -1204,7 +1211,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelHistoryDescription">
|
||||
<widget class="QLabel" name="historyLabelDescription">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -512,6 +512,26 @@ void RshareSettings::setChatSendMessageWithCtrlReturn(bool bValue)
|
||||
setValueToGroup("Chat", "SendMessageWithCtrlReturn", bValue);
|
||||
}
|
||||
|
||||
bool RshareSettings::getChatSendAsPlainTextByDef()
|
||||
{
|
||||
return valueFromGroup("Chat", "SendAsPlainTextByDef", false).toBool();
|
||||
}
|
||||
|
||||
void RshareSettings::setChatSendAsPlainTextByDef(bool bValue)
|
||||
{
|
||||
setValueToGroup("Chat", "SendAsPlainTextByDef", bValue);
|
||||
}
|
||||
|
||||
bool RshareSettings::getChatSearchShowBarByDefault()
|
||||
{
|
||||
return valueFromGroup("Chat", "SearchShowBarByDefault", false).toBool();
|
||||
}
|
||||
|
||||
void RshareSettings::setChatSearchShowBarByDefault(bool bValue)
|
||||
{
|
||||
setValueToGroup("Chat", "SearchShowBarByDefault", bValue);
|
||||
}
|
||||
|
||||
void RshareSettings::setChatSearchCharToStartSearch(int iValue)
|
||||
{
|
||||
setValueToGroup("Chat", "SearchCharToStartSearch", iValue);
|
||||
|
@ -209,6 +209,12 @@ public:
|
||||
bool getChatSendMessageWithCtrlReturn();
|
||||
void setChatSendMessageWithCtrlReturn(bool bValue);
|
||||
|
||||
bool getChatSendAsPlainTextByDef();
|
||||
void setChatSendAsPlainTextByDef(bool bValue);
|
||||
|
||||
bool getChatSearchShowBarByDefault();
|
||||
void setChatSearchShowBarByDefault(bool bValue);
|
||||
|
||||
void setChatSearchCharToStartSearch(int iValue);
|
||||
int getChatSearchCharToStartSearch();
|
||||
|
||||
|
@ -874,6 +874,12 @@ static void styleCreate(QDomDocument& doc
|
||||
optAttr = doc.createAttribute("RSOptimized");
|
||||
optAttr.setValue("v2");
|
||||
styleElem.attributes().setNamedItem(optAttr);
|
||||
if (flag & RSHTML_FORMATTEXT_NO_EMBED) {
|
||||
QDomAttr noEmbedAttr;
|
||||
noEmbedAttr = doc.createAttribute("NoEmbed");
|
||||
noEmbedAttr.setValue("true");
|
||||
styleElem.attributes().setNamedItem(noEmbedAttr);
|
||||
}
|
||||
}
|
||||
|
||||
while(styleElem.childNodes().count()>0) {
|
||||
|
@ -31,19 +31,19 @@
|
||||
#define HANDLE_RICH_TEXT_H_
|
||||
|
||||
/* Flags for RsHtml::formatText */
|
||||
#define RSHTML_FORMATTEXT_EMBED_SMILEYS 1
|
||||
#define RSHTML_FORMATTEXT_EMBED_LINKS 2
|
||||
#define RSHTML_FORMATTEXT_OPTIMIZE 4
|
||||
#define RSHTML_FORMATTEXT_REPLACE_LINKS 8
|
||||
#define RSHTML_FORMATTEXT_REMOVE_COLOR 16
|
||||
#define RSHTML_FORMATTEXT_FIX_COLORS 32 /* Make text readable */
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_WEIGHT 64 /* Remove bold */
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_STYLE 128 /* Remove italics */
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_FAMILY 256
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_SIZE 512
|
||||
#define RSHTML_FORMATTEXT_EMBED_SMILEYS 0x0001//1
|
||||
#define RSHTML_FORMATTEXT_EMBED_LINKS 0x0002//2
|
||||
#define RSHTML_FORMATTEXT_OPTIMIZE 0x0004//4
|
||||
#define RSHTML_FORMATTEXT_REPLACE_LINKS 0x0008//8
|
||||
#define RSHTML_FORMATTEXT_REMOVE_COLOR 0x0010//16
|
||||
#define RSHTML_FORMATTEXT_FIX_COLORS 0x0020//32 /* Make text readable */
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_WEIGHT 0x0040//64 /* Remove bold */
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_STYLE 0x0080//128 /* Remove italics */
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_FAMILY 0x0100//256
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT_SIZE 0x0200//512
|
||||
#define RSHTML_FORMATTEXT_REMOVE_FONT (RSHTML_FORMATTEXT_REMOVE_FONT_WEIGHT | RSHTML_FORMATTEXT_REMOVE_FONT_STYLE | RSHTML_FORMATTEXT_REMOVE_FONT_FAMILY | RSHTML_FORMATTEXT_REMOVE_FONT_SIZE)
|
||||
#define RSHTML_FORMATTEXT_CLEANSTYLE (RSHTML_FORMATTEXT_REMOVE_FONT | RSHTML_FORMATTEXT_REMOVE_COLOR)
|
||||
|
||||
#define RSHTML_FORMATTEXT_NO_EMBED 0x0400//1024
|
||||
/* Flags for RsHtml::optimizeHtml */
|
||||
#define RSHTML_OPTIMIZEHTML_MASK (RSHTML_FORMATTEXT_CLEANSTYLE | RSHTML_FORMATTEXT_FIX_COLORS | RSHTML_FORMATTEXT_OPTIMIZE)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user