added systray notifications for chat lobbies.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5357 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-07-30 13:27:40 +00:00
parent bbae97b88d
commit a2b6b97ef9
8 changed files with 393 additions and 371 deletions

View File

@ -588,6 +588,15 @@ void MainWindow::createNotifyIcons()
#undef DELETE_OBJECT #undef DELETE_OBJECT
} }
/*static*/ void MainWindow::displayLobbySystrayMsg(const QString& title,const QString& msg)
{
if (_instance == NULL)
return;
if(Settings->getDisplayTrayChatLobby())
_instance->displaySystrayMsg(title,msg) ;
}
/*static*/ void MainWindow::installGroupChatNotifier() /*static*/ void MainWindow::installGroupChatNotifier()
{ {

View File

@ -133,6 +133,7 @@ public:
static void installGroupChatNotifier(); static void installGroupChatNotifier();
static void installNotifyIcons(); static void installNotifyIcons();
static void displayLobbySystrayMsg(const QString&,const QString&);
/* initialize widget with status informations, status constant stored in data or in Qt::UserRole */ /* initialize widget with status informations, status constant stored in data or in Qt::UserRole */
void initializeStatusObject(QObject *pObject, bool bConnect); void initializeStatusObject(QObject *pObject, bool bConnect);

View File

@ -61,6 +61,7 @@ void ChatLobbyDialog::init(const std::string &peerId, const QString &title)
if (rsMsgs->getVirtualPeerId(lobbyIt->lobby_id, vpid)) { if (rsMsgs->getVirtualPeerId(lobbyIt->lobby_id, vpid)) {
if (vpid == peerId) { if (vpid == peerId) {
QString msg = tr("Welcome to lobby %1").arg(QString::fromUtf8(lobbyIt->lobby_name.c_str())); QString msg = tr("Welcome to lobby %1").arg(QString::fromUtf8(lobbyIt->lobby_name.c_str()));
_lobby_name = QString(lobbyIt->lobby_name.c_str()) ;
if (!lobbyIt->lobby_topic.empty()) { if (!lobbyIt->lobby_topic.empty()) {
msg += "\n" + tr("Topic: %1").arg(QString::fromUtf8(lobbyIt->lobby_topic.c_str())); msg += "\n" + tr("Topic: %1").arg(QString::fromUtf8(lobbyIt->lobby_topic.c_str()));
} }
@ -179,13 +180,19 @@ void ChatLobbyDialog::addIncomingChatMsg(const ChatInfo& info)
std::cerr << "message from rsid " << info.rsid.c_str() << std::endl; std::cerr << "message from rsid " << info.rsid.c_str() << std::endl;
if (!isParticipantMuted(name)) { if(!isParticipantMuted(name))
// ui.chatWidget->addChatMsg(true, name.append(" ").append(rsid), sendTime, recvTime, message, ChatWidget::TYPE_NORMAL);
ui.chatWidget->addChatMsg(true, name, sendTime, recvTime, message, ChatWidget::TYPE_NORMAL); ui.chatWidget->addChatMsg(true, name, sendTime, recvTime, message, ChatWidget::TYPE_NORMAL);
} else {
// ui.chatWidget->addChatMsg(true, name, sendTime, recvTime, message.append(" (BLOCKED)"), ChatWidget::TYPE_NORMAL);
}
// This is a trick to translate HTML into text.
QTextEdit editor;
editor.setHtml(message);
QString notifyMsg = name + ": " + editor.toPlainText();
if(notifyMsg.length() > 30)
MainWindow::displayLobbySystrayMsg(tr("Lobby chat") + ": " + _lobby_name, notifyMsg.left(30) + QString("..."));
else
MainWindow::displayLobbySystrayMsg(tr("Lobby chat") + ": " + _lobby_name, notifyMsg);
// also update peer list. // also update peer list.
time_t now = time(NULL); time_t now = time(NULL);

View File

@ -69,6 +69,7 @@ private:
bool isNicknameInLobby(const QString &nickname); bool isNicknameInLobby(const QString &nickname);
ChatLobbyId lobbyId; ChatLobbyId lobbyId;
QString _lobby_name ;
time_t lastUpdateListTime; time_t lastUpdateListTime;
/** Qt Designer generated object */ /** Qt Designer generated object */

View File

@ -134,6 +134,7 @@ NotifyPage::save(QString &/*errmsg*/)
Settings->setChatFlags(chatflags); Settings->setChatFlags(chatflags);
Settings->setMessageFlags(messageflags); Settings->setMessageFlags(messageflags);
Settings->setDisplayTrayChatLobby(ui.systray_ChatLobby->isChecked());
Settings->setDisplayTrayGroupChat(ui.systray_GroupChat->isChecked()); Settings->setDisplayTrayGroupChat(ui.systray_GroupChat->isChecked());
MainWindow::installGroupChatNotifier(); MainWindow::installGroupChatNotifier();
MainWindow::installNotifyIcons(); MainWindow::installNotifyIcons();
@ -186,6 +187,7 @@ void NotifyPage::load()
ui.message_ConnectAttempt->setChecked(messageflags & RS_MESSAGE_CONNECT_ATTEMPT); ui.message_ConnectAttempt->setChecked(messageflags & RS_MESSAGE_CONNECT_ATTEMPT);
ui.systray_GroupChat->setChecked(Settings->getDisplayTrayGroupChat()); ui.systray_GroupChat->setChecked(Settings->getDisplayTrayGroupChat());
ui.systray_ChatLobby->setChecked(Settings->getDisplayTrayChatLobby());
ui.trayNotify_PrivateChat->setChecked(traynotifyflags & TRAYNOTIFY_PRIVATECHAT); ui.trayNotify_PrivateChat->setChecked(traynotifyflags & TRAYNOTIFY_PRIVATECHAT);
ui.trayNotify_Messages->setChecked(traynotifyflags & TRAYNOTIFY_MESSAGES); ui.trayNotify_Messages->setChecked(traynotifyflags & TRAYNOTIFY_MESSAGES);

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>516</width> <width>569</width>
<height>474</height> <height>512</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -499,410 +499,400 @@
<property name="contextMenuPolicy"> <property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QVBoxLayout" name="verticalLayout_4">
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_3"> <widget class="QGroupBox" name="notify_ForumNewMsg">
<item> <property name="title">
<widget class="QGroupBox" name="notify_ForumNewMsg"> <string>News Feed</string>
<property name="title"> </property>
<string>News Feed</string> <layout class="QVBoxLayout">
</property> <property name="spacing">
<layout class="QVBoxLayout"> <number>0</number>
<property name="spacing"> </property>
<number>0</number> <property name="margin">
<number>6</number>
</property>
<item>
<widget class="QCheckBox" name="notify_Peers">
<property name="text">
<string>Peers</string>
</property> </property>
<property name="margin"> </widget>
<number>6</number> </item>
<item>
<widget class="QCheckBox" name="notify_Channels">
<property name="text">
<string>Channels</string>
</property> </property>
<item> </widget>
<widget class="QCheckBox" name="notify_Peers"> </item>
<property name="text"> <item>
<string>Peers</string> <widget class="QCheckBox" name="notify_Forums">
</property> <property name="text">
</widget> <string>Forums</string>
</item> </property>
<item> </widget>
<widget class="QCheckBox" name="notify_Channels"> </item>
<property name="text"> <item>
<string>Channels</string> <widget class="QCheckBox" name="notify_Blogs">
</property> <property name="text">
</widget> <string>Blogs</string>
</item> </property>
<item> </widget>
<widget class="QCheckBox" name="notify_Forums"> </item>
<property name="text"> <item>
<string>Forums</string> <widget class="QCheckBox" name="notify_Messages">
</property> <property name="text">
</widget> <string>Messages</string>
</item> </property>
<item> </widget>
<widget class="QCheckBox" name="notify_Blogs"> </item>
<property name="text"> <item>
<string>Blogs</string> <widget class="QCheckBox" name="notify_Chat">
</property> <property name="text">
</widget> <string>Chat</string>
</item> </property>
<item> </widget>
<widget class="QCheckBox" name="notify_Messages"> </item>
<property name="text"> <item>
<string>Messages</string> <widget class="QCheckBox" name="notify_Security">
</property> <property name="text">
</widget> <string>Security</string>
</item> </property>
<item> </widget>
<widget class="QCheckBox" name="notify_Chat"> </item>
<property name="text"> <item>
<string>Chat</string> <widget class="Line" name="line">
</property> <property name="orientation">
</widget> <enum>Qt::Horizontal</enum>
</item> </property>
<item> </widget>
<widget class="QCheckBox" name="notify_Security"> </item>
<property name="text"> <item>
<string>Security</string> <widget class="QCheckBox" name="addFeedsAtEnd">
</property> <property name="text">
</widget> <string>Add feeds at end</string>
</item> </property>
<item> </widget>
<widget class="Line" name="line"> </item>
<property name="orientation"> </layout>
<enum>Qt::Horizontal</enum> </widget>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="addFeedsAtEnd">
<property name="text">
<string>Add feeds at end</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="trayNotifyGroupBox">
<property name="title">
<string>Systray Icon</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QCheckBox" name="trayNotify_PrivateChat">
<property name="text">
<string>Private Chat</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="trayNotify_Messages">
<property name="text">
<string>Message</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="trayNotify_Channels">
<property name="text">
<string>Channel Post</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="trayNotify_Forums">
<property name="text">
<string>Forum Post</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="trayNotify_Transfer">
<property name="text">
<string>Download completed</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="trayNotify_PrivateChatCombined">
<property name="text">
<string>Combined</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="trayNotify_MessagesCombined">
<property name="text">
<string>Combined</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="trayNotify_ChannelsCombined">
<property name="text">
<string>Combined</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="trayNotify_ForumsCombined">
<property name="text">
<string>Combined</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="trayNotify_TransferCombined">
<property name="text">
<string>Combined</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="messageGroupBox">
<property name="title">
<string>Message</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QCheckBox" name="message_ConnectAttempt">
<property name="text">
<string>Connect attempt</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout"> <widget class="QGroupBox" name="trayNotifyGroupBox">
<item> <property name="title">
<widget class="QGroupBox" name="groupBox"> <string>Systray Icon</string>
<property name="title"> </property>
<string>Toasters</string> <layout class="QVBoxLayout" name="verticalLayout_5">
</property> <item>
<layout class="QVBoxLayout"> <layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin"> <item row="0" column="0">
<number>9</number> <widget class="QCheckBox" name="trayNotify_PrivateChat">
</property>
<property name="topMargin">
<number>9</number>
</property>
<item>
<widget class="QCheckBox" name="popup_Connect">
<property name="text">
<string>Friend Connect</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="popup_NewMsg">
<property name="text">
<string>New Message</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="popup_DownloadFinished">
<property name="text">
<string>Download completed</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="popup_PrivateChat">
<property name="text"> <property name="text">
<string>Private Chat</string> <string>Private Chat</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="0">
<widget class="QCheckBox" name="popup_GroupChat"> <widget class="QCheckBox" name="trayNotify_Messages">
<property name="text"> <property name="text">
<string>Group Chat</string> <string>Message</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="0">
<widget class="QCheckBox" name="popup_ChatLobby"> <widget class="QCheckBox" name="trayNotify_Channels">
<property name="text"> <property name="text">
<string>Chat Lobby</string> <string>Channel Post</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="3" column="0">
<widget class="QCheckBox" name="popup_ConnectAttempt"> <widget class="QCheckBox" name="trayNotify_Forums">
<property name="text"> <property name="text">
<string>Connect attempt</string> <string>Forum Post</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="4" column="0">
<layout class="QGridLayout" name="gridLayout"> <widget class="QCheckBox" name="trayNotify_Transfer">
<item row="1" column="0">
<widget class="QLabel" name="labelToasterPosition">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Position</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="3">
<widget class="QComboBox" name="comboBoxToasterPosition">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelToasterXMargin">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>X Margin</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="spinBoxToasterXMargin">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>20</number>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="labelToasterYMargin">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Y Margin</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QSpinBox" name="spinBoxToasterYMargin">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>20</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Private Chat</string>
</property>
<layout class="QVBoxLayout">
<item>
<widget class="QCheckBox" name="chat_NewWindow">
<property name="text"> <property name="text">
<string>Open Window for new chat</string> <string>Download completed</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="1">
<widget class="QCheckBox" name="chat_Focus"> <widget class="QCheckBox" name="trayNotify_PrivateChatCombined">
<property name="text"> <property name="text">
<string>Grab Focus when chat arrives</string> <string>Combined</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="1">
<widget class="QCheckBox" name="chat_tabbedWindow"> <widget class="QCheckBox" name="trayNotify_MessagesCombined">
<property name="text"> <property name="text">
<string>Use a single tabbed window</string> <string>Combined</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="trayNotify_ChannelsCombined">
<property name="text">
<string>Combined</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="trayNotify_ForumsCombined">
<property name="text">
<string>Combined</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="trayNotify_TransferCombined">
<property name="text">
<string>Combined</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </item>
</item> </layout>
<item> </widget>
<widget class="QGroupBox" name="groupBox_3"> </item>
<property name="title"> <item>
<string>Group chat</string> <widget class="QGroupBox" name="messageGroupBox">
</property> <property name="title">
<layout class="QVBoxLayout" name="verticalLayout_2"> <string>Message</string>
<item> </property>
<widget class="QCheckBox" name="systray_GroupChat"> <layout class="QVBoxLayout" name="verticalLayout_6">
<property name="text"> <item>
<string>Display systray message</string> <widget class="QCheckBox" name="message_ConnectAttempt">
</property> <property name="text">
</widget> <string>Connect attempt</string>
</item> </property>
</layout> </widget>
</widget> </item>
</item> <item>
</layout> <spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_2"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="orientation"> <item>
<enum>Qt::Vertical</enum> <widget class="QGroupBox" name="groupBox">
</property> <property name="title">
<property name="sizeHint" stdset="0"> <string>Toasters</string>
<size> </property>
<width>20</width> <layout class="QVBoxLayout">
<height>130</height> <property name="leftMargin">
</size> <number>9</number>
</property> </property>
</spacer> <property name="topMargin">
<number>9</number>
</property>
<item>
<widget class="QCheckBox" name="popup_Connect">
<property name="text">
<string>Friend Connect</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="popup_NewMsg">
<property name="text">
<string>New Message</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="popup_DownloadFinished">
<property name="text">
<string>Download completed</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="popup_PrivateChat">
<property name="text">
<string>Private Chat</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="popup_GroupChat">
<property name="text">
<string>Group Chat</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="popup_ChatLobby">
<property name="text">
<string>Chat Lobby</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="popup_ConnectAttempt">
<property name="text">
<string>Connect attempt</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<widget class="QLabel" name="labelToasterPosition">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Position</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="3">
<widget class="QComboBox" name="comboBoxToasterPosition">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelToasterXMargin">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>X Margin</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="spinBoxToasterXMargin">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>20</number>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="labelToasterYMargin">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Y Margin</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QSpinBox" name="spinBoxToasterYMargin">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>20</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Systray message</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="systray_GroupChat">
<property name="text">
<string>Group chat</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="systray_ChatLobby">
<property name="text">
<string>Chat lobbies</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Private Chat</string>
</property>
<layout class="QVBoxLayout">
<item>
<widget class="QCheckBox" name="chat_NewWindow">
<property name="text">
<string>Open Window for new chat</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chat_Focus">
<property name="text">
<string>Grab Focus when chat arrives</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chat_tabbedWindow">
<property name="text">
<string>Use a single tabbed window</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>

View File

@ -325,11 +325,21 @@ void RshareSettings::setMessageFlags(uint flags)
setValue("MessageFlags", flags); setValue("MessageFlags", flags);
} }
bool RshareSettings::getDisplayTrayChatLobby()
{
return value("DisplayTrayChatLobby").toBool();
}
bool RshareSettings::getDisplayTrayGroupChat() bool RshareSettings::getDisplayTrayGroupChat()
{ {
return value("DisplayTrayGroupChat").toBool(); return value("DisplayTrayGroupChat").toBool();
} }
void RshareSettings::setDisplayTrayChatLobby(bool bValue)
{
setValue("DisplayTrayChatLobby", bValue);
}
void RshareSettings::setDisplayTrayGroupChat(bool bValue) void RshareSettings::setDisplayTrayGroupChat(bool bValue)
{ {
setValue("DisplayTrayGroupChat", bValue); setValue("DisplayTrayGroupChat", bValue);

View File

@ -164,6 +164,8 @@ public:
uint getMessageFlags(); uint getMessageFlags();
void setMessageFlags(uint flags); void setMessageFlags(uint flags);
bool getDisplayTrayChatLobby();
void setDisplayTrayChatLobby(bool bValue);
bool getDisplayTrayGroupChat(); bool getDisplayTrayGroupChat();
void setDisplayTrayGroupChat(bool bValue); void setDisplayTrayGroupChat(bool bValue);