Added action to GroupChats Button Menu for disable/enable Emoticon's, not yet stored

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2371 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-02-19 18:33:35 +00:00
parent e3f2afd031
commit 459c364636
6 changed files with 38 additions and 8 deletions

View File

@ -173,6 +173,7 @@ PeersDialog::PeersDialog(QWidget *parent)
QMenu * grpchatmenu = new QMenu(); QMenu * grpchatmenu = new QMenu();
grpchatmenu->addAction(ui.actionClearChat); grpchatmenu->addAction(ui.actionClearChat);
grpchatmenu->addAction(ui.actionDisable_Emoticons);
ui.menuButton->setMenu(grpchatmenu); ui.menuButton->setMenu(grpchatmenu);
_underline = false; _underline = false;
@ -967,6 +968,8 @@ void PeersDialog::insertChat()
count ++; count ++;
} }
if(!ui.actionDisable_Emoticons->isChecked())
{
QHashIterator<QString, QString> i(smileys); QHashIterator<QString, QString> i(smileys);
while(i.hasNext()) while(i.hasNext())
{ {
@ -974,6 +977,7 @@ void PeersDialog::insertChat()
foreach(QString code, i.key().split("|")) foreach(QString code, i.key().split("|"))
extraTxt.replace(code, "<img src=\"" + i.value() + "\" />"); extraTxt.replace(code, "<img src=\"" + i.value() + "\" />");
} }
}
if ((msgWidget->verticalScrollBar()->maximum() - 30) < msgWidget->verticalScrollBar()->value() ) { if ((msgWidget->verticalScrollBar()->maximum() - 30) < msgWidget->verticalScrollBar()->value() ) {
msgWidget->append(extraTxt); msgWidget->append(extraTxt);

View File

@ -1117,6 +1117,10 @@ border: 1px solid #CCCCCC;}</string>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/fonts.png</normaloff>:/images/fonts.png</iconset>
</property>
<property name="autoRaise"> <property name="autoRaise">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -1158,7 +1162,7 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QToolButton" name="menuButton"> <widget class="QPushButton" name="menuButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -1180,11 +1184,18 @@ p, li { white-space: pre-wrap; }
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="popupMode"> <property name="icon">
<enum>QToolButton::MenuButtonPopup</enum> <iconset resource="images.qrc">
<normaloff>:/images/configure.png</normaloff>:/images/configure.png</iconset>
</property> </property>
<property name="autoRaise"> <property name="iconSize">
<bool>false</bool> <size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
@ -1301,6 +1312,10 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
<action name="actionClearChat"> <action name="actionClearChat">
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/edit-clear-history.png</normaloff>:/images/edit-clear-history.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Clear Chat History</string> <string>Clear Chat History</string>
</property> </property>
@ -1377,6 +1392,17 @@ p, li { white-space: pre-wrap; }
<string>Edit your status Message</string> <string>Edit your status Message</string>
</property> </property>
</action> </action>
<action name="actionDisable_Emoticons">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Disable Emoticons</string>
</property>
<property name="toolTip">
<string>Disable Emoticons</string>
</property>
</action>
</widget> </widget>
<resources> <resources>
<include location="images.qrc"/> <include location="images.qrc"/>

View File

@ -11,16 +11,17 @@
<file>images/btn4.png</file> <file>images/btn4.png</file>
<file>images/btn_26.png</file> <file>images/btn_26.png</file>
<file>images/btn_26_hover.png</file> <file>images/btn_26_hover.png</file>
<file>images/btn_26_pressed.png</file>
<file>images/btn_27.png</file> <file>images/btn_27.png</file>
<file>images/btn_27_hover.png</file> <file>images/btn_27_hover.png</file>
<file>images/connect_established.png</file> <file>images/connect_established.png</file>
<file>images/connect_creating.png</file> <file>images/connect_creating.png</file>
<file>images/connect_no.png</file> <file>images/connect_no.png</file>
<file>images/edit-clear-history.png</file>
<file>images/feedback_arrow.png</file> <file>images/feedback_arrow.png</file>
<file>images/feedback_arrow_hover.png</file> <file>images/feedback_arrow_hover.png</file>
<file>images/list_bullet_arrow.png</file> <file>images/list_bullet_arrow.png</file>
<file>images/rc_combined.png</file> <file>images/rc_combined.png</file>
<file>images/btn_26_pressed.png</file>
<file>images/combobox_arrow.png</file> <file>images/combobox_arrow.png</file>
<file>images/arrow-left.png</file> <file>images/arrow-left.png</file>
<file>images/arrow-right.png</file> <file>images/arrow-right.png</file>
@ -37,6 +38,7 @@
<file>images/backgroundl.png</file> <file>images/backgroundl.png</file>
<file>images/blockdevice.png</file> <file>images/blockdevice.png</file>
<file>images/blockdevice2.png</file> <file>images/blockdevice2.png</file>
<file>images/configure.png</file>
<file>images/channels.png</file> <file>images/channels.png</file>
<file>images/turtle.png</file> <file>images/turtle.png</file>
<file>images/channels16.png</file> <file>images/channels16.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -53,7 +53,6 @@
#define IMAGE_FORUMS ":/images/konversation.png" #define IMAGE_FORUMS ":/images/konversation.png"
#define IMAGE_CHANNELS ":/images/channels.png" #define IMAGE_CHANNELS ":/images/channels.png"
#define IMAGE_PREFERENCES ":/images/settings16.png" #define IMAGE_PREFERENCES ":/images/settings16.png"
#define IMAGE_CHAT ":/images/chats_24x24.png"
#define IMAGE_RETROSHARE ":/images/RetroShare16.png" #define IMAGE_RETROSHARE ":/images/RetroShare16.png"
#define IMAGE_ABOUT ":/images/informations_24x24.png" #define IMAGE_ABOUT ":/images/informations_24x24.png"
#define IMAGE_STATISTIC ":/images/ksysguard32.png" #define IMAGE_STATISTIC ":/images/ksysguard32.png"
@ -63,7 +62,6 @@
#define IMAGE_RSM32 ":/images/rsmessenger32.png" #define IMAGE_RSM32 ":/images/rsmessenger32.png"
#define IMAGE_RSM16 ":/images/rsmessenger16.png" #define IMAGE_RSM16 ":/images/rsmessenger16.png"
#define IMAGE_CLOSE ":/images/close_normal.png" #define IMAGE_CLOSE ":/images/close_normal.png"
#define IMAGE_SMPLAYER ":/images/smplayer_icon32.png"
#define IMAGE_CALENDAR ":/images/calendar.png" #define IMAGE_CALENDAR ":/images/calendar.png"
#define IMAGE_NEWSFEED ":/images/konqsidebar_news24.png" #define IMAGE_NEWSFEED ":/images/konqsidebar_news24.png"
#define IMAGE_LINKS ":/images/ktorrent.png" #define IMAGE_LINKS ":/images/ktorrent.png"