From a9b49ea3e07850f0c38d21411e241fda224545da Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 24 Nov 2009 13:10:17 +0000 Subject: [PATCH] - Display torrent files in Web UI --- src/Icons/tree/I.gif | Bin 66 -> 0 bytes src/Icons/tree/L.gif | Bin 66 -> 0 bytes src/Icons/tree/Lminus.gif | Bin 92 -> 0 bytes src/Icons/tree/Lplus.gif | Bin 96 -> 0 bytes src/Icons/tree/Rminus.gif | Bin 89 -> 0 bytes src/Icons/tree/Rplus.gif | Bin 91 -> 0 bytes src/Icons/tree/T.gif | Bin 69 -> 0 bytes src/Icons/tree/Tminus.gif | Bin 109 -> 0 bytes src/Icons/tree/Tplus.gif | Bin 97 -> 0 bytes src/Icons/tree/_closed.gif | Bin 242 -> 0 bytes src/Icons/tree/_doc.gif | Bin 193 -> 0 bytes src/Icons/tree/_open.gif | Bin 351 -> 0 bytes src/Icons/tree/minus.gif | Bin 98 -> 0 bytes src/Icons/tree/plus.gif | Bin 88 -> 0 bytes src/eventmanager.cpp | 45 +++++++++++ src/eventmanager.h | 1 + src/httpconnection.cpp | 19 ++++- src/httpconnection.h | 1 + src/icons.qrc | 14 ---- src/lang/qbittorrent_bg.ts | 75 ++++++++++++++++- src/lang/qbittorrent_ca.ts | 75 ++++++++++++++++- src/lang/qbittorrent_cs.ts | 75 ++++++++++++++++- src/lang/qbittorrent_da.ts | 75 ++++++++++++++++- src/lang/qbittorrent_de.ts | 75 ++++++++++++++++- src/lang/qbittorrent_el.ts | 75 ++++++++++++++++- src/lang/qbittorrent_en.ts | 75 ++++++++++++++++- src/lang/qbittorrent_es.ts | 75 ++++++++++++++++- src/lang/qbittorrent_fi.ts | 75 ++++++++++++++++- src/lang/qbittorrent_fr.ts | 75 ++++++++++++++++- src/lang/qbittorrent_hu.ts | 75 ++++++++++++++++- src/lang/qbittorrent_it.ts | 75 ++++++++++++++++- src/lang/qbittorrent_ja.ts | 75 ++++++++++++++++- src/lang/qbittorrent_ko.ts | 75 ++++++++++++++++- src/lang/qbittorrent_nb.ts | 75 ++++++++++++++++- src/lang/qbittorrent_nl.ts | 54 +++++++++++++ src/lang/qbittorrent_pl.ts | 54 +++++++++++++ src/lang/qbittorrent_pt.ts | 54 +++++++++++++ src/lang/qbittorrent_pt_BR.ts | 54 +++++++++++++ src/lang/qbittorrent_ro.ts | 54 +++++++++++++ src/lang/qbittorrent_ru.ts | 54 +++++++++++++ src/lang/qbittorrent_sk.ts | 54 +++++++++++++ src/lang/qbittorrent_sv.ts | 54 +++++++++++++ src/lang/qbittorrent_tr.ts | 54 +++++++++++++ src/lang/qbittorrent_uk.ts | 54 +++++++++++++ src/lang/qbittorrent_zh.ts | 54 +++++++++++++ src/lang/qbittorrent_zh_TW.ts | 54 +++++++++++++ src/torrentfilesmodel.h | 2 +- src/webui.qrc | 1 - src/webui/css/dynamicTable.css | 8 ++ src/webui/index.html | 1 - src/webui/prop-files.html | 143 ++++++++++++++++++++++++++++++--- src/webui/scripts/tree.js | 124 ---------------------------- 52 files changed, 1949 insertions(+), 183 deletions(-) delete mode 100644 src/Icons/tree/I.gif delete mode 100644 src/Icons/tree/L.gif delete mode 100644 src/Icons/tree/Lminus.gif delete mode 100644 src/Icons/tree/Lplus.gif delete mode 100644 src/Icons/tree/Rminus.gif delete mode 100644 src/Icons/tree/Rplus.gif delete mode 100644 src/Icons/tree/T.gif delete mode 100644 src/Icons/tree/Tminus.gif delete mode 100644 src/Icons/tree/Tplus.gif delete mode 100644 src/Icons/tree/_closed.gif delete mode 100644 src/Icons/tree/_doc.gif delete mode 100644 src/Icons/tree/_open.gif delete mode 100644 src/Icons/tree/minus.gif delete mode 100644 src/Icons/tree/plus.gif delete mode 100644 src/webui/scripts/tree.js diff --git a/src/Icons/tree/I.gif b/src/Icons/tree/I.gif deleted file mode 100644 index 1a259eea00c330eee85fb18aa64e2e232d5410b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 66 zcmZ?wbhEHb6k-r!XkcV$XlVHV|G(l-7DfgJMg|=QAOOiQFiG~vH=KUEdfpt3ORshA Txqp6J8?ND(@^elGBZD;ng_;%{ diff --git a/src/Icons/tree/L.gif b/src/Icons/tree/L.gif deleted file mode 100644 index 48b81c80a9e25f6f29e2614aaa33bdf4a4d2881b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 66 zcmZ?wbhEHb6k-r!XkcV$XlVHV|G(l-7DfgJMg|=QAOOiQFiG~vH=KUEdfpt3ORshA Tx&LIzy5lkJS?4l0Mh0sDgH;v` diff --git a/src/Icons/tree/Lminus.gif b/src/Icons/tree/Lminus.gif deleted file mode 100644 index 26c2b3449fffc7c01e67b8bc05697c129f75e5aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 92 zcmZ?wbhEHb6k-r!n8?8J|NsAnh6V-(hT6R+6@RiYGB7YR=m5DuSs?}nCfzyqji=wP wo;PP<)NiI6GDnt`-ag)<#L0MQSJlbiGiAF@$kg6QE{na)&%@Pzh>5`(0DfK}d;kCd diff --git a/src/Icons/tree/Lplus.gif b/src/Icons/tree/Lplus.gif deleted file mode 100644 index 775619d3272da22197b01493839ef5ac22e45901..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 96 zcmZ?wbhEHb6k-r!n8?8J|NsAnh6V-(hT6R+6@RiYGB7YR=m5DuSs?}nCc`=Qji=wP zo;PP<)NiI6GDnu>GJQ8xG{{qJ;d-~?$jQQGamQ|I7nNDp?(}Ipvgl(5P^&cn_Ff~7 diff --git a/src/Icons/tree/Rminus.gif b/src/Icons/tree/Rminus.gif deleted file mode 100644 index e62222abd17907f57e7b0dd930974eec7dd4ec33..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 89 zcmZ?wbhEHb6k-r!n8?8J|NsAnh6V-(hT6R+6@RiYGB7YR=m5DuSs?}nCapRBD^I_@ t-!#X#soQbG&pfe`d8$*En&rF_?7DxcY`su=vD4EF=f3~Duff1z4FDnVA_xEg diff --git a/src/Icons/tree/Rplus.gif b/src/Icons/tree/Rplus.gif deleted file mode 100644 index 1c40a78dcf9aa5cd38afd1752ace7f3b5f2dc823..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 91 zcmZ?wbhEHb6k-r!n8?8J|NsAnh6V-(hT6R+6@RiYGB7YR=m5DuSs?}nCY?F`D^I_@ u-!#X#soQZw_=B@7Gs+vgHI}S2%Xz0*CeJ=0XU17YSI2++JY3SO4AuZZ(;lM$ diff --git a/src/Icons/tree/T.gif b/src/Icons/tree/T.gif deleted file mode 100644 index 34dd47610a5d7c3580dedc342683559bf77abce2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 69 zcmZ?wbhEHb6k-r!XkcV$XlVHV|G(l-7DfgJMg|=QAOOiQFv;}DH=KUEdfpt3ORshA Wx&LIzk};W<vKC_i diff --git a/src/Icons/tree/Tminus.gif b/src/Icons/tree/Tminus.gif deleted file mode 100644 index 025840f4ffdde0f9f778d272b2622a722c5ddb37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 109 zcmZ?wbhEHb6k-r!Sj52a|NsA{rly951_lO(+Px=%Bm^k_WMO1rU}4Y!aY1Ssn2kJk zsr)fG^?cc0rEFW)9|{4kaX)$kG8c&$>{)-~%wnlcJ-m;)>&j-IP1WEO=ogX`n#90h F4FK2!BBcNT diff --git a/src/Icons/tree/Tplus.gif b/src/Icons/tree/Tplus.gif deleted file mode 100644 index 4659651e06153fbad76f3e9df29b1389d10eab72..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97 zcmZ?wbhEHb6k-r!n8?8J|NsAnh6V-(hT6R+6@RiYGB7YR=m5DuSs?}nCZjp_ji=wP zo;PP<)NiI6GDnu>GJQ8xG{{qJ;d-~?$jQQGamQ|I7nNDp?(}KvlmBSp%*V}O4FD6P BBGv!^ diff --git a/src/Icons/tree/_closed.gif b/src/Icons/tree/_closed.gif deleted file mode 100644 index c2d3b329cb5c8ba75171b0177c0dc87eaf4229cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 242 zcmZ?wbhEHb6k-r!I3mID|8(;I?>+xN_x!(K{r~fvrL_Y8U$^}KzV!d)?C;lG?rm~< zzAxzBCd+%dHh#h)yU3=9$s zIv`1qoeZq`3Tk~Rne$#)tPS?^3;(l4&*$!y)VI}vek~0K3LTQQ`pzxKb5^lUJDqH0 zswOwBE2C+{1C4h5hDmps_VjJJr5G_`>x`2#g;w5HZacP6X1?>k1_5TS{Iocsj?NAq amKq7)2{r{vqEn|$pQbl!_8dJ$25SI!#%$97 diff --git a/src/Icons/tree/_doc.gif b/src/Icons/tree/_doc.gif deleted file mode 100644 index 155a632442c5df6830480ecaaf8ea5d707af57d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 193 zcmV;y06zamNk%w1VG;lm0J9GOS6GN>YngX@rFMa^jH}t?@BgXJ|HIt>)aL)~_5b$z z|5}{Z|NsB%>+96i)c^ngA^8LW000jFEC2ui01^Na000DT@X1MQT_oc?TC)$qj3hHG zo+Xy!aG)QxvOzsK7dsY+A>cBdBGLO*W+R0HQ3Otq3?=1tXCt9H`b%HlZkZ v4S=vnN<En>ge8bf|xBZP)8~%WSaTEZBhKGe=4-Sltj*K9Y77+kDcRE*Q diff --git a/src/Icons/tree/_open.gif b/src/Icons/tree/_open.gif deleted file mode 100644 index 7064a303848f38a3831192e101b170c12f4fe026..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 351 zcmZ?wbhEHb6k-r!xT?zV|8vi|MT-BQxBR`D|9+R#hbNW)KhHV8NcI2!rH>B!fB(=q zw@UK=^_Jg1r#;^nbZnO7t^L{iXKGyEVgLVl)VV#;_cl5Gzh8ZFfx`da-;d9ceze)? z|KsYVMLhpsxBUM;<^T2UIh7Izrb+z&Kj+viAPE8tR0WDZSr{1@R2g(Yrh@#$z*ci$ zQh|q#RR4*@1W6Ae<|P`LPjq@c7Oly!dR5k~%$#5|&CQ+r(Td3*cHN!xu*0y)#V~DB zgNS$^n=)5avyw1xZJ3lehg@%8FP}(i4#VYl?B)yC*ViKXvr-n(-$SOWl%+aQ(z diff --git a/src/Icons/tree/plus.gif b/src/Icons/tree/plus.gif deleted file mode 100644 index 3fe85900f3bd2a794c19155b9efedeb34f4af52c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 88 zcmZ?wbhEHb6k-r!n8?8J|NsAnh6V-(hT6R+6@RiYGB7YR=m5DuSs?}nCe1nhD^I_@ r-!#X#soQZw_=B@7Gs+vgHI}SA#;79Q7e9L@SF7`{bKmQN85pbq>UtlM diff --git a/src/eventmanager.cpp b/src/eventmanager.cpp index 6167883f2..3406d9625 100644 --- a/src/eventmanager.cpp +++ b/src/eventmanager.cpp @@ -32,6 +32,7 @@ #include "eventmanager.h" #include "bittorrent.h" #include "misc.h" +#include "proplistdelegate.h" #include "torrentpersistentdata.h" #include @@ -89,6 +90,50 @@ QList EventManager::getPropTrackersInfo(QString hash) const { return trackersInfo; } +QList EventManager::getPropFilesInfo(QString hash) const { + QList files; + QTorrentHandle h = BTSession->getTorrentHandle(hash); + if(!h.is_valid()) return files; + std::vector priorities = h.file_priorities(); + std::vector fp; + h.file_progress(fp); + torrent_info t = h.get_torrent_info(); + torrent_info::file_iterator fi; + int i=0; + for(fi=t.begin_files(); fi != t.end_files(); fi++) { + QVariantMap file; + if(h.num_files() == 1) { + file["name"] = h.name(); + } else { + QString path = QDir::cleanPath(misc::toQString(fi->path.string())); + QString name = path.split('/').last(); + file["name"] = name; + } + file["size"] = misc::friendlyUnit((double)fi->size); + file["progress"] = fp[i]/(double)fi->size; + switch(priorities[i]) { + case IGNORED: + file["priority"] = tr("Ignored"); + break; + case NORMAL: + file["priority"] = tr("Normal", "Normal (priority)"); + break; + case HIGH: + file["priority"] = tr("High", "High (priority)"); + break; + case MAXIMUM: + file["priority"] = tr("Maximum", "Maximum (priority)"); + break; + default: + qDebug("Unhandled priority, setting NORMAL, priority was %d", priorities[i]); + file["priority"] = tr("Normal", "Normal (priority)"); + } + files << file; + ++i; + } + return files; +} + QVariantMap EventManager::getPropGeneralInfo(QString hash) const { QVariantMap data; QTorrentHandle h = BTSession->getTorrentHandle(hash); diff --git a/src/eventmanager.h b/src/eventmanager.h index 299567807..d83ccc4ec 100644 --- a/src/eventmanager.h +++ b/src/eventmanager.h @@ -53,6 +53,7 @@ class EventManager : public QObject QList getEventList() const; QVariantMap getPropGeneralInfo(QString hash) const; QList getPropTrackersInfo(QString hash) const; + QList getPropFilesInfo(QString hash) const; public slots: void addedTorrent(QTorrentHandle& h); diff --git a/src/httpconnection.cpp b/src/httpconnection.cpp index 24162505c..8b56c76e1 100644 --- a/src/httpconnection.cpp +++ b/src/httpconnection.cpp @@ -102,7 +102,7 @@ void HttpConnection::write() } QString HttpConnection::translateDocument(QString data) { - std::string contexts[] = {"TransferListFiltersWidget", "TransferListWidget", "PropertiesWidget", "GUI", "MainWindow", "HttpServer", "confirmDeletionDlg", "TrackerList"}; + std::string contexts[] = {"TransferListFiltersWidget", "TransferListWidget", "PropertiesWidget", "GUI", "MainWindow", "HttpServer", "confirmDeletionDlg", "TrackerList", "TorrentFilesModel"}; int i=0; bool found = false; do { @@ -117,7 +117,7 @@ QString HttpConnection::translateDocument(QString data) { do { translation = qApp->translate(contexts[context_index].c_str(), word.toLocal8Bit().data(), 0, QCoreApplication::UnicodeUTF8, 1); ++context_index; - }while(translation == word && context_index < 8); + }while(translation == word && context_index < 9); //qDebug("Translation is %s", translation.toUtf8().data()); data = data.replace(i, regex.matchedLength(), translation); i += translation.length(); @@ -163,11 +163,15 @@ void HttpConnection::respond() return; } if(list[1] == "propertiesTrackers") { - qDebug("Web UI asked for trackers"); QString hash = list[2]; respondTrackersPropertiesJson(hash); return; } + if(list[1] == "propertiesFiles") { + QString hash = list[2]; + respondFilesPropertiesJson(hash); + return; + } } } if (list[0] == "command") @@ -241,6 +245,15 @@ void HttpConnection::respondTrackersPropertiesJson(QString hash) { write(); } +void HttpConnection::respondFilesPropertiesJson(QString hash) { + EventManager* manager = parent->eventManager(); + QString string = json::toJson(manager->getPropFilesInfo(hash)); + generator.setStatusLine(200, "OK"); + generator.setContentTypeByExt("js"); + generator.setMessage(string); + write(); +} + void HttpConnection::respondCommand(QString command) { diff --git a/src/httpconnection.h b/src/httpconnection.h index 9b194e258..20fa39b0a 100644 --- a/src/httpconnection.h +++ b/src/httpconnection.h @@ -58,6 +58,7 @@ class HttpConnection : public QObject void respondJson(); void respondGenPropertiesJson(QString hash); void respondTrackersPropertiesJson(QString hash); + void respondFilesPropertiesJson(QString hash); void respondCommand(QString command); void respondNotFound(); void processDownloadedFile(QString, QString); diff --git a/src/icons.qrc b/src/icons.qrc index 7149a3dac..67d239c0b 100644 --- a/src/icons.qrc +++ b/src/icons.qrc @@ -114,20 +114,6 @@ Icons/flags/japan.png Icons/flags/malaysia.png Icons/flags/philippines.png - Icons/tree/Lplus.gif - Icons/tree/Tminus.gif - Icons/tree/Tplus.gif - Icons/tree/_open.gif - Icons/tree/plus.gif - Icons/tree/Rminus.gif - Icons/tree/Lminus.gif - Icons/tree/T.gif - Icons/tree/_closed.gif - Icons/tree/L.gif - Icons/tree/_doc.gif - Icons/tree/I.gif - Icons/tree/minus.gif - Icons/tree/Rplus.gif Icons/oxygen/mail-queue.png Icons/oxygen/view-refresh.png Icons/oxygen/file.png diff --git a/src/lang/qbittorrent_bg.ts b/src/lang/qbittorrent_bg.ts index ec4c1599e..6f82bbfc0 100644 --- a/src/lang/qbittorrent_bg.ts +++ b/src/lang/qbittorrent_bg.ts @@ -1521,8 +1521,56 @@ Copyright © 2006 от Christophe Dumez<br> EventManager - - + + + Working + + + + + Updating... + + + + + + Not working + + + + + + Not contacted yet + + + + + + this session + + + + + + /s + /second (i.e. per second) + + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + + %1 max + e.g. 10 max + + + + + %1/s e.g. 120 KiB/s @@ -4203,6 +4251,29 @@ Changelog: + + TorrentFilesModel + + + Name + Име + + + + Size + Размер + + + + Progress + Изпълнение + + + + Priority + Предимство + + TrackerList diff --git a/src/lang/qbittorrent_ca.ts b/src/lang/qbittorrent_ca.ts index 8033afc17..dfd7121a6 100644 --- a/src/lang/qbittorrent_ca.ts +++ b/src/lang/qbittorrent_ca.ts @@ -1273,8 +1273,56 @@ p, li { white-space: pre-wrap; } EventManager - - + + + Working + + + + + Updating... + + + + + + Not working + + + + + + Not contacted yet + + + + + + this session + + + + + + /s + /second (i.e. per second) + /s + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + + %1 max + e.g. 10 max + + + + + %1/s e.g. 120 KiB/s @@ -3578,6 +3626,29 @@ Log: + + TorrentFilesModel + + + Name + Nom + + + + Size + Mida + + + + Progress + Progrès + + + + Priority + + + TrackerList diff --git a/src/lang/qbittorrent_cs.ts b/src/lang/qbittorrent_cs.ts index 90e0c4ed0..f52a1437d 100644 --- a/src/lang/qbittorrent_cs.ts +++ b/src/lang/qbittorrent_cs.ts @@ -1128,8 +1128,56 @@ Copyright © 2006 by Christophe Dumez<br> EventManager - - + + + Working + + + + + Updating... + + + + + + Not working + + + + + + Not contacted yet + + + + + + this session + + + + + + /s + /second (i.e. per second) + + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + + %1 max + e.g. 10 max + + + + + %1/s e.g. 120 KiB/s @@ -3051,6 +3099,29 @@ p, li { white-space: pre-wrap; } + + TorrentFilesModel + + + Name + Název + + + + Size + Velikost + + + + Progress + Průběh + + + + Priority + Priorita + + TrackerList diff --git a/src/lang/qbittorrent_da.ts b/src/lang/qbittorrent_da.ts index d71162b88..516d6f315 100644 --- a/src/lang/qbittorrent_da.ts +++ b/src/lang/qbittorrent_da.ts @@ -1178,8 +1178,56 @@ Copyright © 2006 by Christophe Dumez<br> EventManager - - + + + Working + + + + + Updating... + + + + + + Not working + + + + + + Not contacted yet + + + + + + this session + + + + + + /s + /second (i.e. per second) + + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + + %1 max + e.g. 10 max + + + + + %1/s e.g. 120 KiB/s @@ -3242,6 +3290,29 @@ Changelog: + + TorrentFilesModel + + + Name + Navn + + + + Size + Størrelse + + + + Progress + Hentet + + + + Priority + + + TrackerList diff --git a/src/lang/qbittorrent_de.ts b/src/lang/qbittorrent_de.ts index 88d58863d..bc332415b 100644 --- a/src/lang/qbittorrent_de.ts +++ b/src/lang/qbittorrent_de.ts @@ -1451,8 +1451,56 @@ qBittorrent beobachtet das Verzeichniss und starten den Download von vorhandenen EventManager - - + + + Working + + + + + Updating... + + + + + + Not working + + + + + + Not contacted yet + + + + + + this session + + + + + + /s + /second (i.e. per second) + + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + + %1 max + e.g. 10 max + + + + + %1/s e.g. 120 KiB/s @@ -4174,6 +4222,29 @@ Changelog: + + TorrentFilesModel + + + Name + + + + + Size + + + + + Progress + + + + + Priority + Priorität + + TrackerList diff --git a/src/lang/qbittorrent_el.ts b/src/lang/qbittorrent_el.ts index 10467cf0f..73e36481a 100644 --- a/src/lang/qbittorrent_el.ts +++ b/src/lang/qbittorrent_el.ts @@ -1544,8 +1544,56 @@ Copyright © 2006 από τον Christophe Dumez<br> EventManager - - + + + Working + + + + + Updating... + + + + + + Not working + + + + + + Not contacted yet + + + + + + this session + + + + + + /s + /second (i.e. per second) + /s + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + + %1 max + e.g. 10 max + + + + + %1/s e.g. 120 KiB/s @@ -4293,6 +4341,29 @@ Changelog: + + TorrentFilesModel + + + Name + + + + + Size + Μέγεθος + + + + Progress + Πρόοδος + + + + Priority + Προτεραιότητα + + TrackerList diff --git a/src/lang/qbittorrent_en.ts b/src/lang/qbittorrent_en.ts index e1edc80e0..8136dbd80 100644 --- a/src/lang/qbittorrent_en.ts +++ b/src/lang/qbittorrent_en.ts @@ -860,8 +860,56 @@ p, li { white-space: pre-wrap; } EventManager - - + + + Working + + + + + Updating... + + + + + + Not working + + + + + + Not contacted yet + + + + + + this session + + + + + + /s + /second (i.e. per second) + + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + + %1 max + e.g. 10 max + + + + + %1/s e.g. 120 KiB/s @@ -2351,6 +2399,29 @@ p, li { white-space: pre-wrap; } + + TorrentFilesModel + + + Name + + + + + Size + + + + + Progress + + + + + Priority + + + TrackerList diff --git a/src/lang/qbittorrent_es.ts b/src/lang/qbittorrent_es.ts index 37e8a8943..33b2566de 100644 --- a/src/lang/qbittorrent_es.ts +++ b/src/lang/qbittorrent_es.ts @@ -1440,8 +1440,56 @@ p, li { white-space: pre-wrap; } EventManager - - + + + Working + + + + + Updating... + + + + + + Not working + + + + + + Not contacted yet + + + + + + this session + + + + + + /s + /second (i.e. per second) + + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + + %1 max + e.g. 10 max + + + + + %1/s e.g. 120 KiB/s @@ -4121,6 +4169,29 @@ Log: + + TorrentFilesModel + + + Name + Nombre + + + + Size + Tamaño + + + + Progress + Progreso + + + + Priority + Prioridad + + TrackerList diff --git a/src/lang/qbittorrent_fi.ts b/src/lang/qbittorrent_fi.ts index 8ccc4ff71..8e6d78f3d 100644 --- a/src/lang/qbittorrent_fi.ts +++ b/src/lang/qbittorrent_fi.ts @@ -1325,8 +1325,56 @@ p, li { white-space: pre-wrap; } EventManager - - + + + Working + + + + + Updating... + + + + + + Not working + + + + + + Not contacted yet + + + + + + this session + + + + + + /s + /second (i.e. per second) + + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + + %1 max + e.g. 10 max + + + + + %1/s e.g. 120 KiB/s @@ -3778,6 +3826,29 @@ Muutoshistoria: + + TorrentFilesModel + + + Name + Nimi + + + + Size + Koko + + + + Progress + Edistyminen + + + + Priority + Prioriteetti + + TrackerList diff --git a/src/lang/qbittorrent_fr.ts b/src/lang/qbittorrent_fr.ts index 7ce2a348e..a93c21737 100644 --- a/src/lang/qbittorrent_fr.ts +++ b/src/lang/qbittorrent_fr.ts @@ -1564,8 +1564,56 @@ Copyright © 2006 par Christophe DUMEZ<br> EventManager - - + + + Working + Fonctionne + + + + Updating... + Mise à jour... + + + + + Not working + Indisponible + + + + + Not contacted yet + Pas encore contacté + + + + + this session + cette session + + + + + /s + /second (i.e. per second) + /s + + + + Seeded for %1 + e.g. Seeded for 3m10s + Complet depuis %1 + + + + %1 max + e.g. 10 max + %1 max + + + + %1/s e.g. 120 KiB/s %1/s @@ -4381,6 +4429,29 @@ Changements: Limite globale de la vitesse d'envoi + + TorrentFilesModel + + + Name + Nom + + + + Size + Taille + + + + Progress + Progression + + + + Priority + Priorité + + TrackerList diff --git a/src/lang/qbittorrent_hu.ts b/src/lang/qbittorrent_hu.ts index cef34b986..91bb9f700 100644 --- a/src/lang/qbittorrent_hu.ts +++ b/src/lang/qbittorrent_hu.ts @@ -1368,8 +1368,56 @@ Copyright © 2006 by Christophe Dumez<br> EventManager - - + + + Working + + + + + Updating... + + + + + + Not working + + + + + + Not contacted yet + + + + + + this session + + + + + + /s + /second (i.e. per second) + + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + + %1 max + e.g. 10 max + + + + + %1/s e.g. 120 KiB/s @@ -3603,6 +3651,29 @@ Changelog: + + TorrentFilesModel + + + Name + Név + + + + Size + Méret + + + + Progress + Folyamat + + + + Priority + + + TrackerList diff --git a/src/lang/qbittorrent_it.ts b/src/lang/qbittorrent_it.ts index 5792e86ee..35045f9a1 100644 --- a/src/lang/qbittorrent_it.ts +++ b/src/lang/qbittorrent_it.ts @@ -1424,8 +1424,56 @@ Copyright © 2006 by Christophe Dumez<br> EventManager - - + + + Working + + + + + Updating... + + + + + + Not working + + + + + + Not contacted yet + + + + + + this session + + + + + + /s + /second (i.e. per second) + + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + + %1 max + e.g. 10 max + + + + + %1/s e.g. 120 KiB/s @@ -3978,6 +4026,29 @@ Changelog: + + TorrentFilesModel + + + Name + Nome + + + + Size + Dimensione + + + + Progress + + + + + Priority + Priorità + + TrackerList diff --git a/src/lang/qbittorrent_ja.ts b/src/lang/qbittorrent_ja.ts index 26d6e12ee..a5c745cd8 100644 --- a/src/lang/qbittorrent_ja.ts +++ b/src/lang/qbittorrent_ja.ts @@ -1340,8 +1340,56 @@ Copyright © 2006 by Christophe Dumez<br> EventManager - - + + + Working + + + + + Updating... + + + + + + Not working + + + + + + Not contacted yet + + + + + + this session + + + + + + /s + /second (i.e. per second) + + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + + %1 max + e.g. 10 max + + + + + %1/s e.g. 120 KiB/s @@ -3545,6 +3593,29 @@ Changelog: + + TorrentFilesModel + + + Name + 名前 + + + + Size + サイズ + + + + Progress + 進行状況 + + + + Priority + 優先度 + + TrackerList diff --git a/src/lang/qbittorrent_ko.ts b/src/lang/qbittorrent_ko.ts index cb3e20701..cc8bc3bc4 100644 --- a/src/lang/qbittorrent_ko.ts +++ b/src/lang/qbittorrent_ko.ts @@ -1479,8 +1479,56 @@ list: EventManager - - + + + Working + + + + + Updating... + + + + + + Not working + + + + + + Not contacted yet + + + + + + this session + + + + + + /s + /second (i.e. per second) + + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + + %1 max + e.g. 10 max + + + + + %1/s e.g. 120 KiB/s @@ -4195,6 +4243,29 @@ Changelog: + + TorrentFilesModel + + + Name + + + + + Size + 크기 + + + + Progress + + + + + Priority + 우선순위 + + TrackerList diff --git a/src/lang/qbittorrent_nb.ts b/src/lang/qbittorrent_nb.ts index 4a1f2c59b..8e66c515e 100644 --- a/src/lang/qbittorrent_nb.ts +++ b/src/lang/qbittorrent_nb.ts @@ -1200,8 +1200,56 @@ Copyright © 2006 av Christophe Dumez<br> EventManager - - + + + Working + + + + + Updating... + + + + + + Not working + + + + + + Not contacted yet + + + + + + this session + + + + + + /s + /second (i.e. per second) + + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + + %1 max + e.g. 10 max + + + + + %1/s e.g. 120 KiB/s @@ -3447,6 +3495,29 @@ Endringer: + + TorrentFilesModel + + + Name + Navn + + + + Size + Størrelse + + + + Progress + + + + + Priority + + + TrackerList diff --git a/src/lang/qbittorrent_nl.ts b/src/lang/qbittorrent_nl.ts index 348a0b874..f18c93eba 100644 --- a/src/lang/qbittorrent_nl.ts +++ b/src/lang/qbittorrent_nl.ts @@ -1342,6 +1342,41 @@ p, li { white-space: pre-wrap; } e.g. 120 KiB/s + + Working + + + + Updating... + + + + Not working + + + + Not contacted yet + + + + this session + + + + /s + /second (i.e. per second) + /s + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + %1 max + e.g. 10 max + + FeedDownloader @@ -3679,6 +3714,25 @@ Changelog: + + TorrentFilesModel + + Name + Naam + + + Size + Grootte + + + Progress + Voortgang + + + Priority + Prioriteit + + TrackerList diff --git a/src/lang/qbittorrent_pl.ts b/src/lang/qbittorrent_pl.ts index baa78c550..a920a0fb0 100644 --- a/src/lang/qbittorrent_pl.ts +++ b/src/lang/qbittorrent_pl.ts @@ -1310,6 +1310,41 @@ Wszystkie prawa zastrżeżone © 2006 Christophe Dumez<br>(new line) e.g. 120 KiB/s + + Working + + + + Updating... + + + + Not working + + + + Not contacted yet + + + + this session + + + + /s + /second (i.e. per second) + /s + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + %1 max + e.g. 10 max + + FeedDownloader @@ -3710,6 +3745,25 @@ Zmiany: + + TorrentFilesModel + + Name + Nazwa + + + Size + Rozmiar + + + Progress + Postęp + + + Priority + Priorytet + + TrackerList diff --git a/src/lang/qbittorrent_pt.ts b/src/lang/qbittorrent_pt.ts index a5cfb09eb..3740fba9e 100644 --- a/src/lang/qbittorrent_pt.ts +++ b/src/lang/qbittorrent_pt.ts @@ -1264,6 +1264,41 @@ qBittorrent irá procurar no diretório e baixará automaticamente torrents pres e.g. 120 KiB/s + + Working + + + + Updating... + + + + Not working + + + + Not contacted yet + + + + this session + + + + /s + /second (i.e. per second) + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + %1 max + e.g. 10 max + + FeedDownloader @@ -3682,6 +3717,25 @@ Log de mudanças: + + TorrentFilesModel + + Name + Nome + + + Size + Tamanho + + + Progress + Progresso + + + Priority + Prioridade + + TrackerList diff --git a/src/lang/qbittorrent_pt_BR.ts b/src/lang/qbittorrent_pt_BR.ts index a5cfb09eb..3740fba9e 100644 --- a/src/lang/qbittorrent_pt_BR.ts +++ b/src/lang/qbittorrent_pt_BR.ts @@ -1264,6 +1264,41 @@ qBittorrent irá procurar no diretório e baixará automaticamente torrents pres e.g. 120 KiB/s + + Working + + + + Updating... + + + + Not working + + + + Not contacted yet + + + + this session + + + + /s + /second (i.e. per second) + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + %1 max + e.g. 10 max + + FeedDownloader @@ -3682,6 +3717,25 @@ Log de mudanças: + + TorrentFilesModel + + Name + Nome + + + Size + Tamanho + + + Progress + Progresso + + + Priority + Prioridade + + TrackerList diff --git a/src/lang/qbittorrent_ro.ts b/src/lang/qbittorrent_ro.ts index 590abf5d2..d895c758d 100644 --- a/src/lang/qbittorrent_ro.ts +++ b/src/lang/qbittorrent_ro.ts @@ -1262,6 +1262,41 @@ qBittorrent va monitoriza directoriul și va adăuga în lista de descărcare a e.g. 120 KiB/s + + Working + + + + Updating... + + + + Not working + + + + Not contacted yet + + + + this session + + + + /s + /second (i.e. per second) + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + %1 max + e.g. 10 max + + FeedDownloader @@ -3523,6 +3558,25 @@ Changelog: + + TorrentFilesModel + + Name + Nume + + + Size + Capacitate + + + Progress + Progress + + + Priority + Prioritate + + TrackerList diff --git a/src/lang/qbittorrent_ru.ts b/src/lang/qbittorrent_ru.ts index c2a4517b6..38ab9d0d7 100644 --- a/src/lang/qbittorrent_ru.ts +++ b/src/lang/qbittorrent_ru.ts @@ -1307,6 +1307,41 @@ p, li { white-space: pre-wrap; } e.g. 120 KiB/s + + Working + + + + Updating... + + + + Not working + + + + Not contacted yet + + + + this session + эта сессия + + + /s + /second (i.e. per second) + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + %1 max + e.g. 10 max + %1 макс + FeedDownloader @@ -3711,6 +3746,25 @@ Changelog: + + TorrentFilesModel + + Name + Имя + + + Size + Размер + + + Progress + + + + Priority + Приоритет + + TrackerList diff --git a/src/lang/qbittorrent_sk.ts b/src/lang/qbittorrent_sk.ts index 0308f1979..b7b69c17c 100644 --- a/src/lang/qbittorrent_sk.ts +++ b/src/lang/qbittorrent_sk.ts @@ -1268,6 +1268,41 @@ p, li { white-space: pre-wrap; } e.g. 120 KiB/s + + Working + + + + Updating... + + + + Not working + + + + Not contacted yet + + + + this session + + + + /s + /second (i.e. per second) + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + %1 max + e.g. 10 max + + FeedDownloader @@ -3602,6 +3637,25 @@ Záznam zmien: + + TorrentFilesModel + + Name + + + + Size + + + + Progress + Priebeh + + + Priority + Priorita + + TrackerList diff --git a/src/lang/qbittorrent_sv.ts b/src/lang/qbittorrent_sv.ts index da2ade8d6..9cfcbe834 100644 --- a/src/lang/qbittorrent_sv.ts +++ b/src/lang/qbittorrent_sv.ts @@ -887,6 +887,41 @@ p, li { white-space: pre-wrap; } e.g. 120 KiB/s + + Working + + + + Updating... + + + + Not working + + + + Not contacted yet + + + + this session + + + + /s + /second (i.e. per second) + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + %1 max + e.g. 10 max + + FeedDownloader @@ -2433,6 +2468,25 @@ p, li { white-space: pre-wrap; } + + TorrentFilesModel + + Name + Namn + + + Size + Storlek + + + Progress + Förlopp + + + Priority + Prioritet + + TrackerList diff --git a/src/lang/qbittorrent_tr.ts b/src/lang/qbittorrent_tr.ts index 522f2e84f..14650e19f 100644 --- a/src/lang/qbittorrent_tr.ts +++ b/src/lang/qbittorrent_tr.ts @@ -1293,6 +1293,41 @@ p, li { white-space: pre-wrap; } e.g. 120 KiB/s + + Working + + + + Updating... + + + + Not working + + + + Not contacted yet + + + + this session + + + + /s + /second (i.e. per second) + /s + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + %1 max + e.g. 10 max + + FeedDownloader @@ -3673,6 +3708,25 @@ Changelog: + + TorrentFilesModel + + Name + + + + Size + Boyut + + + Progress + İlerleme + + + Priority + Öncelik + + TrackerList diff --git a/src/lang/qbittorrent_uk.ts b/src/lang/qbittorrent_uk.ts index 1b2ac3bbf..4017d135b 100644 --- a/src/lang/qbittorrent_uk.ts +++ b/src/lang/qbittorrent_uk.ts @@ -1214,6 +1214,41 @@ p, li { white-space: pre-wrap; } e.g. 120 KiB/s + + Working + + + + Updating... + + + + Not working + + + + Not contacted yet + + + + this session + + + + /s + /second (i.e. per second) + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + %1 max + e.g. 10 max + + FeedDownloader @@ -3543,6 +3578,25 @@ Changelog: + + TorrentFilesModel + + Name + Ім'я + + + Size + Розмір + + + Progress + Прогрес + + + Priority + Пріоритет + + TrackerList diff --git a/src/lang/qbittorrent_zh.ts b/src/lang/qbittorrent_zh.ts index 72f45395d..d35b361e5 100644 --- a/src/lang/qbittorrent_zh.ts +++ b/src/lang/qbittorrent_zh.ts @@ -1380,6 +1380,41 @@ wait... e.g. 120 KiB/s + + Working + + + + Updating... + + + + Not working + + + + Not contacted yet + + + + this session + + + + /s + /second (i.e. per second) + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + %1 max + e.g. 10 max + + FeedDownloader @@ -3821,6 +3856,25 @@ reason: %2. + + TorrentFilesModel + + Name + 名称 + + + Size + 大小 + + + Progress + 进度 + + + Priority + 优先 + + TrackerList diff --git a/src/lang/qbittorrent_zh_TW.ts b/src/lang/qbittorrent_zh_TW.ts index e401c7afc..1ab9146ad 100644 --- a/src/lang/qbittorrent_zh_TW.ts +++ b/src/lang/qbittorrent_zh_TW.ts @@ -948,6 +948,41 @@ p, li { white-space: pre-wrap; } e.g. 120 KiB/s + + Working + + + + Updating... + + + + Not working + + + + Not contacted yet + + + + this session + + + + /s + /second (i.e. per second) + + + + Seeded for %1 + e.g. Seeded for 3m10s + + + + %1 max + e.g. 10 max + + FeedDownloader @@ -2532,6 +2567,25 @@ p, li { white-space: pre-wrap; } + + TorrentFilesModel + + Name + 名稱 + + + Size + 大小 + + + Progress + 進度 + + + Priority + 優先度 + + TrackerList diff --git a/src/torrentfilesmodel.h b/src/torrentfilesmodel.h index e8ba6fe35..3e50a58df 100644 --- a/src/torrentfilesmodel.h +++ b/src/torrentfilesmodel.h @@ -255,7 +255,7 @@ public: TorrentFilesModel(QObject *parent=0): QAbstractItemModel(parent) { files_index = 0; QList rootData; - rootData << "Name" << "Size" << "Progress" << "Priority"; + rootData << tr("Name") << tr("Size") << tr("Progress") << tr("Priority"); rootItem = new TreeItem(rootData); } diff --git a/src/webui.qrc b/src/webui.qrc index dbbd2f305..fb1c22824 100644 --- a/src/webui.qrc +++ b/src/webui.qrc @@ -18,7 +18,6 @@ webui/scripts/excanvas-compressed.js webui/scripts/mocha.js webui/scripts/mocha-init.js - webui/scripts/tree.js webui/scripts/mootools-1.2-core-yc.js webui/scripts/mootools-1.2-more.js webui/scripts/dynamicTable.js diff --git a/src/webui/css/dynamicTable.css b/src/webui/css/dynamicTable.css index 83fd6d602..b0f9cde03 100644 --- a/src/webui/css/dynamicTable.css +++ b/src/webui/css/dynamicTable.css @@ -7,41 +7,49 @@ **************************************************************/ +#properties #torrentFiles table, #properties #trackers table, #transferList table { border: 1px solid #ccc; width: 100%; } +#properties #torrentFiles th, #properties #trackers th, #transferList th { background-color: #eee; padding: 4px; } +#properties #torrentFiles tr, #properties #trackers tr, #transferList tr { background-color: #fff; padding: 4px; } + +#properties #torrentFiles tr.alt, #properties #trackers tr.alt, #transferList tr.alt { background-color: #eee; padding: 4px; } +#properties #torrentFiles td, #properties #trackers td, #transferList td { padding: 0 2px; } +#properties #torrentFiles tr.selected, #properties #trackers tr.selected, #transferList tr.selected { background-color: #354158; color: #fff; } +#properties #torrentFiles tr.over, #properties #trackers tr.over, #transferList tr.over { background-color: #ee6600; diff --git a/src/webui/index.html b/src/webui/index.html index 72135b99f..2b9935dec 100644 --- a/src/webui/index.html +++ b/src/webui/index.html @@ -16,7 +16,6 @@ -
diff --git a/src/webui/prop-files.html b/src/webui/prop-files.html index 151353cc6..eaee0538f 100644 --- a/src/webui/prop-files.html +++ b/src/webui/prop-files.html @@ -1,12 +1,137 @@ - + + + + + + + + + + + +
_(Name)_(Size)_(Progress)_(Priority)
+
\ No newline at end of file diff --git a/src/webui/scripts/tree.js b/src/webui/scripts/tree.js deleted file mode 100644 index 8c25a9541..000000000 --- a/src/webui/scripts/tree.js +++ /dev/null @@ -1,124 +0,0 @@ -/* - -Script: Tree.js - Create folder trees. - -Copyright: - Copyright (c) 2007-2008 Greg Houston, . - -License: - MIT-style license. - -*/ - -function buildTree(treeID){ - - $$('#'+treeID+' li.folder').each(function(folder){ - var folderContents = folder.getChildren('ul'); - var folderImage = new Element('img', { - 'src': '../images/tree/_open.gif', - 'width': 18, - 'height': 18 - }).inject(folder, 'top'); - - // Determine which open and close graphic each folder gets - - if (folder.hasClass('root')) { - folder.minus = '../images/tree/Rminus.gif' - folder.plus = '../images/tree/Rplus.gif' - } - else - if (folder.getNext()) { - folder.minus = '../images/tree/Tminus.gif' - folder.plus = '../images/tree/Tplus.gif' - } - else { - folder.minus = '../images/tree/Lminus.gif' - folder.plus = '../images/tree/Lplus.gif' - } - - var image = new Element('img', { - 'src': folder.minus, - 'width': 18, - 'height': 18 - }).addEvent('click', function(){ - if (folder.hasClass('f-open')) { - image.setProperty('src', folder.plus); - folderImage.setProperty('src', '../images/tree/_closed.gif'); - folderContents.each(function(el){ - el.setStyle('display', 'none'); - }); - folder.removeClass('f-open'); - } - else { - image.setProperty('src', folder.minus); - folderImage.setProperty('src', '../images/tree/_open.gif'); - folderContents.each(function(el){ - el.setStyle('display', 'block'); - }); - folder.addClass('f-open'); - } - }).inject(folder, 'top'); - - if (!folder.hasClass('f-open')) { - image.setProperty('src', folder.plus); - folderContents.each(function(el){ - el.setStyle('display', 'none'); - }); - folder.removeClass('f-open'); - } - - // Add connecting branches to each file node - - folderContents.each(function(element){ - var docs = element.getChildren('li.doc'); - docs.each(function(el){ - if (el == docs.getLast() && !el.getNext()) { - new Element('img', { - 'src': '../images/tree/L.gif', - 'width': 18, - 'height': 18 - }).inject(el.getElement('span'), 'before'); - } - else { - new Element('img', { - 'src': '../images/tree/T.gif', - 'width': 18, - 'height': 18 - }).inject(el.getElement('span'), 'before'); - } - }); - }); - - }); - - // Add connecting branches to each node - - $$('#'+treeID+' li').each(function(node){ - node.getParents('li').each(function(parent){ - if (parent.getNext()) { - new Element('img', { - 'src': '../images/tree/I.gif', - 'width': 18, - 'height': 18 - }).inject(node, 'top'); - } - else { - new Element('img', { - 'src': 'images/spacer.gif', - 'width': 18, - 'height': 18 - }).inject(node, 'top'); - } - }); - }); - - $$('#'+treeID+' li.doc').each(function(el){ - new Element('img', { - 'src': '../images/tree/_doc.gif', - 'width': 18, - 'height': 18 - }).inject(el.getElement('span'), 'before'); - }); - -}