mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-15 10:54:22 -05:00
Added actions for disable/enable Emoticons in Privat Chat and for Clear Chat History
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2374 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5633e7b5f4
commit
a32c4b74b4
@ -1181,6 +1181,21 @@ p, li { white-space: pre-wrap; }
|
||||
<height>24</height>
|
||||
</size>
|
||||
</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>
|
||||
|
@ -123,6 +123,11 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
|
||||
|
||||
/*Disabled style Button when will switch chat style RetroShare will crash need to be fix */
|
||||
//ui.styleButton->setEnabled(false);
|
||||
|
||||
QMenu * toolmenu = new QMenu();
|
||||
toolmenu->addAction(ui.actionClear_Chat);
|
||||
toolmenu->addAction(ui.action_Disable_Emoticons);
|
||||
ui.pushtoolsButton->setMenu(toolmenu);
|
||||
|
||||
|
||||
mCurrentColor = Qt::black;
|
||||
@ -267,6 +272,8 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci)
|
||||
std::cout << "PopupChatDialog:addChatMsg message : " << message.toStdString() << std::endl;
|
||||
#endif
|
||||
|
||||
if(!ui.action_Disable_Emoticons->isChecked())
|
||||
{
|
||||
QHashIterator<QString, QString> i(smileys);
|
||||
while(i.hasNext())
|
||||
{
|
||||
@ -274,6 +281,8 @@ std::cout << "PopupChatDialog:addChatMsg message : " << message.toStdString() <<
|
||||
foreach(QString code, i.key().split("|"))
|
||||
message.replace(code, "<img src=\"" + i.value() + "\" />");
|
||||
}
|
||||
}
|
||||
|
||||
history /*<< nickColor << color << font << fontSize*/ << timestamp << name << message;
|
||||
|
||||
QString formatMsg = loadEmptyStyle()/*.replace(nickColor)
|
||||
@ -600,6 +609,11 @@ QString PopupChatDialog::loadEmptyStyle()
|
||||
}
|
||||
}
|
||||
|
||||
void PopupChatDialog::on_actionClear_Chat_triggered()
|
||||
{
|
||||
ui.textBrowser->clear();
|
||||
}
|
||||
|
||||
void PopupChatDialog::changeStyle()
|
||||
{
|
||||
QString newStyle = QFileDialog::getOpenFileName(this, tr("Open Style"),
|
||||
|
@ -103,6 +103,8 @@ private slots:
|
||||
void sendChat();
|
||||
|
||||
void getAvatar();
|
||||
|
||||
void on_actionClear_Chat_triggered();
|
||||
|
||||
|
||||
private:
|
||||
|
@ -13,6 +13,9 @@
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolBar#toolBar{background-image: url(:/images/connect/connectFriendBanner.png)}</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QGridLayout">
|
||||
<property name="rightMargin">
|
||||
@ -214,6 +217,13 @@ border-image: url(:/images/mystatus_bg.png);
|
||||
<height>46</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#Chatbuttonframe{
|
||||
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
||||
stop:0 #FEFEFE, stop:1 #E8E8E8);
|
||||
|
||||
border: 1px solid #CCCCCC;}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
@ -443,6 +453,53 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="8">
|
||||
<widget class="QPushButton" name="pushtoolsButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</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>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -565,6 +622,23 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Set your Avatar Picture</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionClear_Chat">
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/edit-clear-history.png</normaloff>:/images/edit-clear-history.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Clear Chat</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Disable_Emoticons">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Disable Emoticons</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
|
Loading…
Reference in New Issue
Block a user