equal
deleted
inserted
replaced
35 mainLayout(this) |
35 mainLayout(this) |
36 { |
36 { |
37 this->gameSettings = gameSettings; |
37 this->gameSettings = gameSettings; |
38 this->sdli = sdli; |
38 this->sdli = sdli; |
39 this->notify = notify; |
39 this->notify = notify; |
40 if(notify && gameSettings->value("audio/sound", true).toBool()) { |
40 if(notify && gameSettings->value("audio/frontendsound", true).toBool()) { |
41 QDir tmpdir; |
41 QDir tmpdir; |
42 |
42 |
43 tmpdir.cd(datadir->absolutePath()); |
43 tmpdir.cd(datadir->absolutePath()); |
44 tmpdir.cd("Sounds/"); |
44 tmpdir.cd("Sounds/"); |
45 sdli->SDLMusicInit(); |
45 sdli->SDLMusicInit(); |
124 chatText->setHtml(chatStrings.join("<br>")); |
124 chatText->setHtml(chatStrings.join("<br>")); |
125 |
125 |
126 chatText->moveCursor(QTextCursor::End); |
126 chatText->moveCursor(QTextCursor::End); |
127 } |
127 } |
128 |
128 |
129 void HWChatWidget::nickAdded(const QString& nick) |
129 void HWChatWidget::nickAdded(const QString& nick, bool isChief) |
130 { |
130 { |
131 QListWidgetItem * item = new QListWidgetItem(nick); |
131 QListWidgetItem * item = new QListWidgetItem(nick); |
132 item->setIcon(QIcon(":/res/hh_small.png")); |
132 item->setIcon(QIcon(":/res/hh_small.png")); |
133 chatNicks->addItem(item); |
133 chatNicks->addItem(item); |
134 |
134 |
135 if(notify && gameSettings->value("audio/sound", true).toBool()) { |
135 if(isChief && notify && gameSettings->value("audio/frontendsound", true).toBool()) { |
136 Mix_PlayChannel(-1, sound, 0); |
136 Mix_PlayChannel(-1, sound, 0); |
137 } |
137 } |
138 } |
138 } |
139 |
139 |
140 void HWChatWidget::nickRemoved(const QString& nick) |
140 void HWChatWidget::nickRemoved(const QString& nick) |