Use system icons in the Web UI too

This commit is contained in:
Christophe Dumez 2010-12-13 18:22:19 +00:00
commit b61e4363f5
7 changed files with 72 additions and 60 deletions

View file

@ -217,9 +217,11 @@ void HttpConnection::respond() {
} else {
if(list[1] == "preferences") {
respondPreferencesJson();
return;
} else {
if(list[1] == "transferInfo") {
respondGlobalTransferInfoJson();
return;
}
}
}
@ -233,14 +235,21 @@ void HttpConnection::respond() {
return;
}
}
if (list[0] == "images") {
list[0] = "Icons";
// Icons from theme
qDebug() << "list[0]" << list[0];
if(list[0] == "theme" && list.size() == 2) {
url = misc::getIconPath(list[1]);
qDebug() << "There icon:" << url;
} else {
if(list.last().endsWith(".html"))
list.prepend("html");
list.prepend("webui");
if (list[0] == "images") {
list[0] = "Icons";
} else {
if(list.last().endsWith(".html"))
list.prepend("html");
list.prepend("webui");
}
url = ":/" + list.join("/");
}
url = ":/" + list.join("/");
QFile file(url);
if(!file.open(QIODevice::ReadOnly))
{