QTfrontend/chatwidget.cpp
changeset 3019 d6e19f35d98d
parent 2948 3f21a9dc93d0
child 3058 2ebc20485344
equal deleted inserted replaced
3018:13ceaad4767e 3019:d6e19f35d98d
    37   mainLayout(this)
    37   mainLayout(this)
    38 {
    38 {
    39     this->gameSettings = gameSettings;
    39     this->gameSettings = gameSettings;
    40     this->sdli = sdli;
    40     this->sdli = sdli;
    41     this->notify = notify;
    41     this->notify = notify;
    42     if(notify && gameSettings->value("audio/frontendsound", true).toBool()) {
    42     if(notify && gameSettings->value("frontend/sound", true).toBool()) {
    43        QDir tmpdir;
    43        QDir tmpdir;
    44 
    44 
    45        tmpdir.cd(datadir->absolutePath());
    45        tmpdir.cd(datadir->absolutePath());
    46        tmpdir.cd("Sounds/voices");
    46        tmpdir.cd("Sounds/voices");
    47        sdli->SDLMusicInit();
    47        sdli->SDLMusicInit();
   236 {
   236 {
   237     QListWidgetItem * item = new QListWidgetItem(nick);
   237     QListWidgetItem * item = new QListWidgetItem(nick);
   238     updateIcon(item);
   238     updateIcon(item);
   239     chatNicks->addItem(item);
   239     chatNicks->addItem(item);
   240 
   240 
   241     if(notifyNick && notify && gameSettings->value("audio/frontendsound", true).toBool()) {
   241     if(notifyNick && notify && gameSettings->value("frontend/sound", true).toBool()) {
   242        Mix_PlayChannel(-1, sound[rand()%4], 0);
   242        Mix_PlayChannel(-1, sound[rand()%4], 0);
   243     }
   243     }
   244 }
   244 }
   245 
   245 
   246 void HWChatWidget::nickRemoved(const QString& nick)
   246 void HWChatWidget::nickRemoved(const QString& nick)