Browse Source

Removed useless icons to reduce tarball size

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
472604d1b0
  1. 0
      src/Icons/skin/checking.png
  2. BIN
      src/Icons/skin/checkingUP.png
  3. BIN
      src/Icons/skin/paused.png
  4. BIN
      src/Icons/skin/pausedDL.png
  5. BIN
      src/Icons/skin/pausedUP.png
  6. 0
      src/Icons/skin/queued.png
  7. BIN
      src/Icons/skin/queuedUP.png
  8. 8
      src/icons.qrc
  9. 22
      src/transferlistwidget.cpp
  10. 11
      src/webui/scripts/client.js

0
src/Icons/skin/checkingDL.png → src/Icons/skin/checking.png

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
src/Icons/skin/checkingUP.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

BIN
src/Icons/skin/paused.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
src/Icons/skin/pausedDL.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

BIN
src/Icons/skin/pausedUP.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

0
src/Icons/skin/queuedDL.png → src/Icons/skin/queued.png

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
src/Icons/skin/queuedUP.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

8
src/icons.qrc

@ -12,13 +12,10 @@
<file>Icons/slow_off.png</file> <file>Icons/slow_off.png</file>
<file>Icons/uparrow.png</file> <file>Icons/uparrow.png</file>
<file>Icons/rss16.png</file> <file>Icons/rss16.png</file>
<file>Icons/skin/checkingUP.png</file>
<file>Icons/skin/bg-handle-horizontal.gif</file> <file>Icons/skin/bg-handle-horizontal.gif</file>
<file>Icons/skin/play.png</file> <file>Icons/skin/play.png</file>
<file>Icons/skin/qbittorrent22.png</file> <file>Icons/skin/qbittorrent22.png</file>
<file>Icons/skin/queuedDL.png</file>
<file>Icons/skin/new.png</file> <file>Icons/skin/new.png</file>
<file>Icons/skin/queuedUP.png</file>
<file>Icons/skin/preview.png</file> <file>Icons/skin/preview.png</file>
<file>Icons/skin/stalled.png</file> <file>Icons/skin/stalled.png</file>
<file>Icons/skin/delete.png</file> <file>Icons/skin/delete.png</file>
@ -30,9 +27,7 @@
<file>Icons/skin/delete_perm22.png</file> <file>Icons/skin/delete_perm22.png</file>
<file>Icons/skin/filteractive.png</file> <file>Icons/skin/filteractive.png</file>
<file>Icons/skin/connected.png</file> <file>Icons/skin/connected.png</file>
<file>Icons/skin/pausedDL.png</file>
<file>Icons/skin/mascot.png</file> <file>Icons/skin/mascot.png</file>
<file>Icons/skin/pausedUP.png</file>
<file>Icons/skin/seeding.png</file> <file>Icons/skin/seeding.png</file>
<file>Icons/skin/increase.png</file> <file>Icons/skin/increase.png</file>
<file>Icons/skin/qbittorrent32.png</file> <file>Icons/skin/qbittorrent32.png</file>
@ -51,6 +46,7 @@
<file>Icons/skin/pause_all.png</file> <file>Icons/skin/pause_all.png</file>
<file>Icons/skin/error.png</file> <file>Icons/skin/error.png</file>
<file>Icons/skin/delete22.png</file> <file>Icons/skin/delete22.png</file>
<file>Icons/skin/checking.png</file>
<file>Icons/skin/play_all.png</file> <file>Icons/skin/play_all.png</file>
<file>Icons/skin/pause.png</file> <file>Icons/skin/pause.png</file>
<file>Icons/skin/firewalled.png</file> <file>Icons/skin/firewalled.png</file>
@ -58,7 +54,7 @@
<file>Icons/skin/info.png</file> <file>Icons/skin/info.png</file>
<file>Icons/skin/tabs.gif</file> <file>Icons/skin/tabs.gif</file>
<file>Icons/skin/delete_perm.png</file> <file>Icons/skin/delete_perm.png</file>
<file>Icons/skin/checkingDL.png</file> <file>Icons/skin/queued.png</file>
<file>Icons/skin/settings.png</file> <file>Icons/skin/settings.png</file>
<file>Icons/skin/exit.png</file> <file>Icons/skin/exit.png</file>
<file>Icons/skin/delete_all.png</file> <file>Icons/skin/delete_all.png</file>

22
src/transferlistwidget.cpp

@ -185,12 +185,11 @@ void TransferListWidget::addTorrent(QTorrentHandle& h) {
if(h.is_paused()) { if(h.is_paused()) {
if(h.is_seed()) { if(h.is_seed()) {
listModel->setData(listModel->index(row, TR_STATUS), STATE_PAUSED_UP); listModel->setData(listModel->index(row, TR_STATUS), STATE_PAUSED_UP);
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/pausedUP.png"))), Qt::DecorationRole);
listModel->setData(listModel->index(row, TR_ETA), QVariant((qlonglong)0)); listModel->setData(listModel->index(row, TR_ETA), QVariant((qlonglong)0));
} else { } else {
listModel->setData(listModel->index(row, TR_STATUS), STATE_PAUSED_DL); listModel->setData(listModel->index(row, TR_STATUS), STATE_PAUSED_DL);
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/pausedDL.png"))), Qt::DecorationRole);
} }
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/paused.png"))), Qt::DecorationRole);
setRowColor(row, QString::fromUtf8("red")); setRowColor(row, QString::fromUtf8("red"));
}else{ }else{
if(h.is_seed()) { if(h.is_seed()) {
@ -253,7 +252,7 @@ void TransferListWidget::pauseTorrent(int row, bool refresh_list) {
listModel->setData(listModel->index(row, TR_NAME), h.error(), Qt::ToolTipRole); listModel->setData(listModel->index(row, TR_NAME), h.error(), Qt::ToolTipRole);
listModel->setData(listModel->index(row, TR_NAME), QIcon(QString::fromUtf8(":/Icons/skin/error.png")), Qt::DecorationRole); listModel->setData(listModel->index(row, TR_NAME), QIcon(QString::fromUtf8(":/Icons/skin/error.png")), Qt::DecorationRole);
} else { } else {
listModel->setData(listModel->index(row, TR_NAME), QIcon(QString::fromUtf8(":/Icons/skin/pausedUP.png")), Qt::DecorationRole); listModel->setData(listModel->index(row, TR_NAME), QIcon(QString::fromUtf8(":/Icons/skin/paused.png")), Qt::DecorationRole);
} }
} else { } else {
listModel->setData(listModel->index(row, TR_STATUS), STATE_PAUSED_DL); listModel->setData(listModel->index(row, TR_STATUS), STATE_PAUSED_DL);
@ -261,7 +260,7 @@ void TransferListWidget::pauseTorrent(int row, bool refresh_list) {
listModel->setData(listModel->index(row, TR_NAME), h.error(), Qt::ToolTipRole); listModel->setData(listModel->index(row, TR_NAME), h.error(), Qt::ToolTipRole);
listModel->setData(listModel->index(row, TR_NAME), QIcon(QString::fromUtf8(":/Icons/skin/error.png")), Qt::DecorationRole); listModel->setData(listModel->index(row, TR_NAME), QIcon(QString::fromUtf8(":/Icons/skin/error.png")), Qt::DecorationRole);
} else { } else {
listModel->setData(listModel->index(row, TR_NAME), QIcon(QString::fromUtf8(":/Icons/skin/pausedDL.png")), Qt::DecorationRole); listModel->setData(listModel->index(row, TR_NAME), QIcon(QString::fromUtf8(":/Icons/skin/paused.png")), Qt::DecorationRole);
} }
listModel->setData(listModel->index(row, TR_ETA), QVariant((qlonglong)MAX_ETA)); listModel->setData(listModel->index(row, TR_ETA), QVariant((qlonglong)MAX_ETA));
} }
@ -356,21 +355,19 @@ int TransferListWidget::updateTorrent(int row) {
listModel->setData(listModel->index(row, TR_PROGRESS), QVariant((double)h.progress())); listModel->setData(listModel->index(row, TR_PROGRESS), QVariant((double)h.progress()));
if(h.is_seed()) { if(h.is_seed()) {
s = STATE_CHECKING_UP; s = STATE_CHECKING_UP;
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/checkingUP.png"))), Qt::DecorationRole);
} else { } else {
s = STATE_CHECKING_DL; s = STATE_CHECKING_DL;
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/checkingDL.png"))), Qt::DecorationRole);
} }
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/checking.png"))), Qt::DecorationRole);
listModel->setData(listModel->index(row, TR_STATUS), s); listModel->setData(listModel->index(row, TR_STATUS), s);
}else { }else {
listModel->setData(listModel->index(row, TR_ETA), QVariant((qlonglong)MAX_ETA)); listModel->setData(listModel->index(row, TR_ETA), QVariant((qlonglong)MAX_ETA));
if(h.is_seed()) { if(h.is_seed()) {
s = STATE_QUEUED_UP; s = STATE_QUEUED_UP;
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/queuedUP.png"))), Qt::DecorationRole);
} else { } else {
s =STATE_QUEUED_DL; s =STATE_QUEUED_DL;
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/queuedDL.png"))), Qt::DecorationRole);
} }
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/queued.png"))), Qt::DecorationRole);
listModel->setData(listModel->index(row, TR_STATUS), s); listModel->setData(listModel->index(row, TR_STATUS), s);
} }
// Reset speeds and seeds/leech // Reset speeds and seeds/leech
@ -399,13 +396,10 @@ int TransferListWidget::updateTorrent(int row) {
case torrent_status::checking_resume_data: case torrent_status::checking_resume_data:
if(h.is_seed()) { if(h.is_seed()) {
s = STATE_CHECKING_UP; s = STATE_CHECKING_UP;
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/checkingUP.png"))), Qt::DecorationRole);
} else { } else {
s = STATE_CHECKING_DL; s = STATE_CHECKING_DL;
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/checkingDL.png"))), Qt::DecorationRole);
} }
listModel->setData(listModel->index(row, TR_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/checking.png"))), Qt::DecorationRole);
listModel->setData(listModel->index(row, TR_PROGRESS), QVariant((double)h.progress())); listModel->setData(listModel->index(row, TR_PROGRESS), QVariant((double)h.progress()));
if(!isColumnHidden(TR_ETA)) if(!isColumnHidden(TR_ETA))
listModel->setData(listModel->index(row, TR_ETA), QVariant((qlonglong)MAX_ETA)); listModel->setData(listModel->index(row, TR_ETA), QVariant((qlonglong)MAX_ETA));
@ -460,7 +454,7 @@ void TransferListWidget::setFinished(QTorrentHandle &h) {
try { try {
if(row >= 0) { if(row >= 0) {
if(h.is_paused()) { if(h.is_paused()) {
listModel->setData(listModel->index(row, TR_NAME), QIcon(":/Icons/skin/pausedUP.png"), Qt::DecorationRole); listModel->setData(listModel->index(row, TR_NAME), QIcon(":/Icons/skin/paused.png"), Qt::DecorationRole);
listModel->setData(listModel->index(row, TR_STATUS), STATE_PAUSED_UP); listModel->setData(listModel->index(row, TR_STATUS), STATE_PAUSED_UP);
setRowColor(row, "red"); setRowColor(row, "red");
}else{ }else{
@ -493,7 +487,7 @@ void TransferListWidget::refreshList(bool force) {
if(!force && main_window->getCurrentTabIndex() != TAB_TRANSFER) return; if(!force && main_window->getCurrentTabIndex() != TAB_TRANSFER) return;
unsigned int nb_downloading = 0, nb_seeding=0, nb_active=0, nb_inactive = 0; unsigned int nb_downloading = 0, nb_seeding=0, nb_active=0, nb_inactive = 0;
if(BTSession->getSession()->get_torrents().size() != (uint)listModel->rowCount()) { if(BTSession->getSession()->get_torrents().size() != (uint)listModel->rowCount()) {
// Oups, we have torrents that are not displayed, fix that // Oups, we have torrents that are not displayed, fix this
std::vector<torrent_handle> torrents = BTSession->getSession()->get_torrents(); std::vector<torrent_handle> torrents = BTSession->getSession()->get_torrents();
std::vector<torrent_handle>::iterator itr; std::vector<torrent_handle>::iterator itr;
for(itr = torrents.begin(); itr != torrents.end(); itr++) { for(itr = torrents.begin(); itr != torrents.end(); itr++) {

11
src/webui/scripts/client.js

@ -190,6 +190,17 @@ window.addEvent('load', function(){
var waitingTrInfo = false; var waitingTrInfo = false;
var stateToImg = function(state){ var stateToImg = function(state){
if(state == "pausedUP" || state == "pausedDL") {
state = "paused";
} else {
if(state == "queuedUP" || state == "queuedDL") {
state = "queued";
} else {
if(state == "checkingUP" || state == "checkingDL") {
state = "checking";
}
}
}
return 'images/skin/'+state+'.png'; return 'images/skin/'+state+'.png';
}; };
var loadTransferInfo = function() { var loadTransferInfo = function() {

Loading…
Cancel
Save