equal
deleted
inserted
replaced
62 |
62 |
63 // no stylesheet supplied, search for one or use default |
63 // no stylesheet supplied, search for one or use default |
64 if (orgStyleSheet.isEmpty()) |
64 if (orgStyleSheet.isEmpty()) |
65 { |
65 { |
66 // load external stylesheet if there is any |
66 // load external stylesheet if there is any |
67 QFile extFile(DataManager::instance().findFileForRead("css/chat.css")); |
67 QFile extFile("physfs://css/chat.css"); |
68 |
68 |
69 QFile resFile(":/res/css/chat.css"); |
69 QFile resFile(":/res/css/chat.css"); |
70 |
70 |
71 QFile & file = (extFile.exists()?extFile:resFile); |
71 QFile & file = (extFile.exists()?extFile:resFile); |
72 |
72 |
192 QStringList vpList = |
192 QStringList vpList = |
193 QStringList() << "Classic" << "Default" << "Mobster" << "Russian"; |
193 QStringList() << "Classic" << "Default" << "Mobster" << "Russian"; |
194 |
194 |
195 foreach (QString vp, vpList) |
195 foreach (QString vp, vpList) |
196 { |
196 { |
197 m_helloSounds.append(DataManager::instance().findFileForRead( |
197 m_helloSounds.append(QString("physfs://Sounds/voices/%1/Hello.ogg").arg(vp)); |
198 QString("Sounds/voices/%1/Hello.ogg").arg(vp))); |
198 } |
199 } |
199 |
200 |
200 m_hilightSound = "physfs://Sounds/beep.ogg"; |
201 m_hilightSound = DataManager::instance().findFileForRead( |
|
202 "Sounds/beep.ogg"); |
|
203 |
201 |
204 } |
202 } |
205 |
203 |
206 mainLayout.setSpacing(1); |
204 mainLayout.setSpacing(1); |
207 mainLayout.setMargin(1); |
205 mainLayout.setMargin(1); |
760 } |
758 } |
761 |
759 |
762 |
760 |
763 void HWChatWidget::saveStyleSheet() |
761 void HWChatWidget::saveStyleSheet() |
764 { |
762 { |
765 QString dest = |
763 QString dest = "physfs://css/chat.css"; |
766 DataManager::instance().findFileForWrite("css/chat.css"); |
|
767 |
764 |
768 QFile file(dest); |
765 QFile file(dest); |
769 if (file.open(QIODevice::WriteOnly | QIODevice::Text)) |
766 if (file.open(QIODevice::WriteOnly | QIODevice::Text)) |
770 { |
767 { |
771 QTextStream out(&file); |
768 QTextStream out(&file); |