From 66d4cc2ab872175acd264576f1d6e45947553804 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 14 Aug 2010 15:53:05 +0000 Subject: [PATCH] FEATURE: Added actions to "Move to top/bottom" of priority queue --- Changelog | 5 +- src/Icons/oxygen/go-bottom.png | Bin 0 -> 1037 bytes src/Icons/oxygen/go-down.png | Bin 0 -> 892 bytes src/Icons/oxygen/go-top.png | Bin 0 -> 996 bytes src/Icons/oxygen/go-up.png | Bin 0 -> 929 bytes src/filesystemwatcher.h | 3 +- src/icons.qrc | 274 +++++++++++++++++---------------- src/lang.qrc | 46 +++--- src/qtorrenthandle.cpp | 9 ++ src/qtorrenthandle.h | 2 + src/search.qrc | 20 +-- src/transferlistwidget.cpp | 43 +++++- src/transferlistwidget.h | 2 + 13 files changed, 228 insertions(+), 176 deletions(-) create mode 100644 src/Icons/oxygen/go-bottom.png create mode 100644 src/Icons/oxygen/go-down.png create mode 100644 src/Icons/oxygen/go-top.png create mode 100644 src/Icons/oxygen/go-up.png diff --git a/Changelog b/Changelog index d9f87855e..41e2279ff 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,7 @@ -* Unreleased - Christophe Dumez - v2.3.0 +* Unreleased - Christophe Dumez - v2.4.0 + - FEATURE: Added actions to "Move to top/bottom" of priority queue + +* Tue Jul 27 2010 - Christophe Dumez - v2.3.0 - FEATURE: Simplified torrent root folder renaming/truncating (< v2.3.0 is no longer forward compatible) - FEATURE: Remember previous save paths in torrent addition dialog - FEATURE: Max number of half-open connections can now be edited diff --git a/src/Icons/oxygen/go-bottom.png b/src/Icons/oxygen/go-bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..d5c65e2485222290d38bb448a0d029755cb17557 GIT binary patch literal 1037 zcmV+o1oHcdP)mAW80Wut1Yq>D3qHl%Wc`AGqbyMJ99h?q}GJ8B>X1d%*kZF z-+c3*%m}y#C;Pr`%(gX5Um2NDu?^!J*w*UUqlYcWrH4Lwv!{q1knS`w20{4mKG$b# z%_v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ga2{rxK)V}Ll;P>GdB6sgqt2H@Vv z!&PqQz_rToPybArIJa=CV9?+6_4VeAVF)9QP?_hB$U(A3ey^NoCKx?m95~W8CD<5s zxU1CpaW>ybARvkvB_+okv1T;q>6}7CNDJkT#^$(Q8ERkm1%EBLp)|N6lgWJ9St=6< zDM%X*!z92g7$la^5cG`G9)?Ud3)jMcsy+Vvm0-8C-#0KrbBiTwvK~{pfYO3MHbI}- zkd>CG1q`EO3L_83ap&$RgzdvCUN`E-@#x26Q|zs*-^Nj z3ros`OXX8Ffy57I4uMGz!p%W?O(?X_N6X^UUoR!T`Q3?qZb$!qCM+=F5JW?(TIhMM zXz+d5Hmx(3{%S%9aJLawuILNP54q)GV$#C!Z@1!?z=`U2e$_92%=K^`2fj}wyG{xY z!Vm@~O-TXbN7paLc!eb1Bw-sV1svN(1Hn1xKmrd!h!pG^kY)}xCOJXZ6v#Mxz9!r} zz^vJU9p6D1MX1+ - Icons/rss32.png - Icons/sphere2.png - Icons/downarrow.png Icons/url.png - Icons/3-state-checkbox.gif Icons/loading.png - Icons/slow.png - Icons/magnet.png + Icons/rss16.png + Icons/rss32.png + Icons/3-state-checkbox.gif + Icons/uparrow.png Icons/sphere.png - Icons/L.gif + Icons/downarrow.png Icons/slow_off.png - Icons/uparrow.png - Icons/rss16.png - Icons/skin/bg-handle-horizontal.gif - Icons/skin/play.png - Icons/skin/qbittorrent22.png - Icons/skin/new.png + Icons/sphere2.png + Icons/magnet.png + Icons/slow.png + Icons/L.gif + Icons/skin/seeding.png + Icons/skin/splash.png Icons/skin/preview.png + Icons/skin/tabs.gif Icons/skin/delete.png - Icons/skin/handle-icon-horizontal.gif - Icons/skin/handle-icon.gif - Icons/skin/knob.gif - Icons/skin/url.png - Icons/skin/stalledUP.png - Icons/skin/filteractive.png + Icons/skin/increase.png + Icons/skin/qbittorrent16.png Icons/skin/connected.png + Icons/skin/url.png + Icons/skin/qbittorrent22.png + Icons/skin/disconnected.png Icons/skin/mascot.png - Icons/skin/seeding.png - Icons/skin/increase.png - Icons/skin/qbittorrent32.png + Icons/skin/info.png Icons/skin/paused.png - Icons/skin/toolbox-divider.gif - Icons/skin/stalledDL.png - Icons/skin/qb_question.png - Icons/skin/download.png - Icons/skin/open.png - Icons/skin/play22.png - Icons/skin/qbittorrent16.png Icons/skin/slider-area.gif - Icons/skin/downloading.png - Icons/skin/filterinactive.png Icons/skin/pause22.png - Icons/skin/pause_all.png - Icons/skin/error.png - Icons/skin/delete22.png - Icons/skin/checking.png - Icons/skin/play_all.png - Icons/skin/pause.png - Icons/skin/firewalled.png - Icons/skin/info.png - Icons/skin/tabs.gif + Icons/skin/stalledDL.png + Icons/skin/play.png + Icons/skin/delete_all.png Icons/skin/delete_perm.png - Icons/skin/queued.png + Icons/skin/qb_question.png + Icons/skin/error.png Icons/skin/settings.png + Icons/skin/handle-icon-horizontal.gif + Icons/skin/pause.png + Icons/skin/qbittorrent32.png Icons/skin/exit.png - Icons/skin/delete_all.png - Icons/skin/splash.png - Icons/skin/disconnected.png - Icons/skin/decrease.png - Icons/skin/uploading.png + Icons/skin/knob.gif + Icons/skin/open.png + Icons/skin/pause_all.png Icons/skin/filterall.png - Icons/flags/czech.png - Icons/flags/serbia.png - Icons/flags/iceland.png - Icons/flags/china.png - Icons/flags/luxembourg.png - Icons/flags/newzealand.png - Icons/flags/austria.png - Icons/flags/indonesia.png - Icons/flags/united_arab_emirates.png - Icons/flags/norway.png - Icons/flags/india.png - Icons/flags/finland.png - Icons/flags/australia.png + Icons/skin/uploading.png + Icons/skin/queued.png + Icons/skin/checking.png + Icons/skin/handle-icon.gif + Icons/skin/filterinactive.png + Icons/skin/decrease.png + Icons/skin/play22.png + Icons/skin/firewalled.png + Icons/skin/delete22.png + Icons/skin/new.png + Icons/skin/downloading.png + Icons/skin/play_all.png + Icons/skin/toolbox-divider.gif + Icons/skin/stalledUP.png + Icons/skin/filteractive.png + Icons/skin/bg-handle-horizontal.gif + Icons/skin/download.png + Icons/flags/pakistan.png + Icons/flags/argentina.png Icons/flags/netherlands.png - Icons/flags/south_africa.png + Icons/flags/australia.png + Icons/flags/finland.png + Icons/flags/croatia.png + Icons/flags/indonesia.png + Icons/flags/greece.png Icons/flags/belarus.png + Icons/flags/morocco.png + Icons/flags/portugal.png + Icons/flags/egypt.png Icons/flags/georgia.png - Icons/flags/taiwan.png - Icons/flags/sweden.png - Icons/flags/spain_catalunya.png - Icons/flags/ireland.png - Icons/flags/singapore.png - Icons/flags/israel.png - Icons/flags/belgium.png - Icons/flags/usa.png Icons/flags/costa_rica.png - Icons/flags/romania.png - Icons/flags/suisse.png - Icons/flags/croatia.png - Icons/flags/mexico.png Icons/flags/denmark.png - Icons/flags/hungary.png - Icons/flags/slovenia.png - Icons/flags/ukraine.png + Icons/flags/bosnia.png + Icons/flags/newzealand.png + Icons/flags/serbia.png + Icons/flags/singapore.png + Icons/flags/italy.png + Icons/flags/brazil.png + Icons/flags/taiwan.png + Icons/flags/south_korea.png Icons/flags/turkey.png Icons/flags/algeria.png - Icons/flags/greece.png - Icons/flags/morocco.png - Icons/flags/argentina.png + Icons/flags/japan.png + Icons/flags/luxembourg.png + Icons/flags/poland.png + Icons/flags/iceland.png Icons/flags/spain.png - Icons/flags/portugal.png + Icons/flags/saoudi_arabia.png + Icons/flags/norway.png Icons/flags/russia.png - Icons/flags/united_kingdom.png + Icons/flags/slovakia.png + Icons/flags/philippines.png Icons/flags/thailand.png - Icons/flags/poland.png - Icons/flags/germany.png + Icons/flags/israel.png Icons/flags/bulgaria.png + Icons/flags/czech.png + Icons/flags/usa.png + Icons/flags/malaysia.png + Icons/flags/belgium.png + Icons/flags/south_africa.png + Icons/flags/slovenia.png + Icons/flags/china.png + Icons/flags/germany.png + Icons/flags/ukraine.png + Icons/flags/india.png + Icons/flags/spain_catalunya.png + Icons/flags/romania.png + Icons/flags/united_kingdom.png + Icons/flags/united_arab_emirates.png + Icons/flags/sweden.png Icons/flags/canada.png - Icons/flags/brazil.png + Icons/flags/mexico.png + Icons/flags/hungary.png Icons/flags/france.png - Icons/flags/slovakia.png - Icons/flags/pakistan.png - Icons/flags/egypt.png - Icons/flags/italy.png - Icons/flags/south_korea.png - Icons/flags/saoudi_arabia.png - Icons/flags/bosnia.png - Icons/flags/japan.png - Icons/flags/malaysia.png - Icons/flags/philippines.png - Icons/oxygen/view-refresh.png - Icons/oxygen/file.png - Icons/oxygen/folder-remote16.png - Icons/oxygen/mail-folder-inbox.png - Icons/oxygen/edit-find.png - Icons/oxygen/folder-new.png - Icons/oxygen/folder-remote.png - Icons/oxygen/edit-paste.png - Icons/oxygen/run-build.png - Icons/oxygen/proxy.png - Icons/oxygen/services.png - Icons/oxygen/user-group-delete.png - Icons/oxygen/user-group-new.png - Icons/oxygen/log.png - Icons/oxygen/unavailable.png - Icons/oxygen/button_ok.png - Icons/oxygen/button_cancel.png - Icons/oxygen/edit-clear.png - Icons/oxygen/filter.png - Icons/oxygen/encrypted.png - Icons/oxygen/edit_clear.png - Icons/oxygen/download.png - Icons/oxygen/cookies.png - Icons/oxygen/gear32.png - Icons/oxygen/gear.png - Icons/oxygen/remove.png - Icons/oxygen/dialog-warning.png + Icons/flags/ireland.png + Icons/flags/austria.png + Icons/flags/suisse.png Icons/oxygen/peer.png - Icons/oxygen/browse.png - Icons/oxygen/unsubscribe16.png + Icons/oxygen/unavailable.png Icons/oxygen/subscribe.png - Icons/oxygen/edit-copy.png - Icons/oxygen/chronometer.png - Icons/oxygen/bt_settings.png - Icons/oxygen/document-new.png - Icons/oxygen/preferences-desktop.png - Icons/oxygen/tab-close.png - Icons/oxygen/webui.png Icons/oxygen/list-remove.png - Icons/oxygen/connection.png - Icons/oxygen/bug.png - Icons/oxygen/help-about.png - Icons/oxygen/list-add.png - Icons/oxygen/network-server.png + Icons/oxygen/dialog-warning.png + Icons/oxygen/mail-folder-inbox.png Icons/oxygen/folder.png - Icons/oxygen/urlseed.png + Icons/oxygen/edit-copy.png Icons/oxygen/folder-documents.png + Icons/oxygen/urlseed.png + Icons/oxygen/go-up.png Icons/oxygen/edit-cut.png + Icons/oxygen/gear32.png + Icons/oxygen/go-bottom.png + Icons/oxygen/user-group-delete.png Icons/oxygen/unsubscribe.png + Icons/oxygen/tab-close.png + Icons/oxygen/file.png + Icons/oxygen/services.png + Icons/oxygen/view-refresh.png Icons/oxygen/feed-subscribe.png + Icons/oxygen/remove.png + Icons/oxygen/chronometer.png + Icons/oxygen/filter.png + Icons/oxygen/run-build.png + Icons/oxygen/button_ok.png + Icons/oxygen/user-group-new.png + Icons/oxygen/cookies.png + Icons/oxygen/network-server.png + Icons/oxygen/unsubscribe16.png + Icons/oxygen/list-add.png + Icons/oxygen/edit-paste.png + Icons/oxygen/folder-remote.png + Icons/oxygen/help-about.png + Icons/oxygen/encrypted.png + Icons/oxygen/folder-remote16.png + Icons/oxygen/go-top.png + Icons/oxygen/edit_clear.png + Icons/oxygen/bug.png + Icons/oxygen/gear.png + Icons/oxygen/connection.png + Icons/oxygen/document-new.png + Icons/oxygen/browse.png + Icons/oxygen/proxy.png + Icons/oxygen/button_cancel.png + Icons/oxygen/preferences-desktop.png + Icons/oxygen/bt_settings.png + Icons/oxygen/go-down.png Icons/oxygen/subscribe16.png + Icons/oxygen/download.png + Icons/oxygen/log.png + Icons/oxygen/edit-find.png + Icons/oxygen/edit-clear.png + Icons/oxygen/webui.png + Icons/oxygen/folder-new.png \ No newline at end of file diff --git a/src/lang.qrc b/src/lang.qrc index 4ebfaf20a..26ad7d5c5 100644 --- a/src/lang.qrc +++ b/src/lang.qrc @@ -1,34 +1,34 @@ - lang/qbittorrent_es.qm - lang/qbittorrent_sk.qm + lang/qbittorrent_nl.qm + lang/qbittorrent_hu.qm + lang/qbittorrent_ru.qm lang/qbittorrent_zh_TW.qm + lang/qbittorrent_tr.qm + lang/qbittorrent_fi.qm + lang/qbittorrent_sk.qm + lang/qbittorrent_ja.qm + lang/qbittorrent_el.qm + lang/qbittorrent_ca.qm lang/qbittorrent_pt.qm - lang/qbittorrent_sv.qm - lang/qbittorrent_pl.qm lang/qbittorrent_it.qm - lang/qbittorrent_ar.qm + lang/qbittorrent_fr.qm + lang/qbittorrent_uk.qm + lang/qbittorrent_zh.qm lang/qbittorrent_ko.qm - lang/qbittorrent_en.qm - lang/qbittorrent_ro.qm - lang/qbittorrent_bg.qm - lang/qbittorrent_ru.qm - lang/qbittorrent_nl.qm lang/qbittorrent_nb.qm - lang/qbittorrent_fi.qm - lang/qbittorrent_uk.qm - lang/qbittorrent_cs.qm - lang/qbittorrent_pt_BR.qm - lang/qbittorrent_el.qm - lang/qbittorrent_ca.qm - lang/qbittorrent_hr.qm + lang/qbittorrent_sv.qm + lang/qbittorrent_de.qm lang/qbittorrent_sr.qm - lang/qbittorrent_hu.qm + lang/qbittorrent_pt_BR.qm lang/qbittorrent_da.qm - lang/qbittorrent_de.qm - lang/qbittorrent_zh.qm - lang/qbittorrent_ja.qm - lang/qbittorrent_tr.qm - lang/qbittorrent_fr.qm + lang/qbittorrent_cs.qm + lang/qbittorrent_pl.qm + lang/qbittorrent_bg.qm + lang/qbittorrent_ar.qm + lang/qbittorrent_es.qm + lang/qbittorrent_en.qm + lang/qbittorrent_hr.qm + lang/qbittorrent_ro.qm \ No newline at end of file diff --git a/src/qtorrenthandle.cpp b/src/qtorrenthandle.cpp index e3cee0965..9f11a285b 100644 --- a/src/qtorrenthandle.cpp +++ b/src/qtorrenthandle.cpp @@ -585,7 +585,16 @@ void QTorrentHandle::queue_position_up() const { Q_ASSERT(h.is_valid()); if(h.queue_position() > 0) h.queue_position_up(); +} +void QTorrentHandle::queue_position_top() const { + Q_ASSERT(h.is_valid()); + h.queue_position_top(); +} + +void QTorrentHandle::queue_position_bottom() const { + Q_ASSERT(h.is_valid()); + h.queue_position_bottom(); } void QTorrentHandle::force_reannounce() { diff --git a/src/qtorrenthandle.h b/src/qtorrenthandle.h index a5b6b5d28..fea8e7e1e 100644 --- a/src/qtorrenthandle.h +++ b/src/qtorrenthandle.h @@ -157,6 +157,8 @@ class QTorrentHandle { void set_tracker_login(QString username, QString password); void queue_position_down() const; void queue_position_up() const; + void queue_position_top() const; + void queue_position_bottom() const; void auto_managed(bool) const; void force_recheck() const; void move_storage(QString path) const; diff --git a/src/search.qrc b/src/search.qrc index 098ff92a6..f1dc1b678 100644 --- a/src/search.qrc +++ b/src/search.qrc @@ -1,23 +1,23 @@ + search_engine/nova2.py search_engine/novaprinter.py + search_engine/socks.py search_engine/nova2dl.py search_engine/helpers.py - search_engine/socks.py - search_engine/nova2.py - search_engine/engines/isohunt.py - search_engine/engines/isohunt.png search_engine/engines/vertor.png - search_engine/engines/torrentdownloads.py + search_engine/engines/mininova.png + search_engine/engines/mininova.py search_engine/engines/torrentdownloads.png - search_engine/engines/piratebay.py + search_engine/engines/isohunt.png search_engine/engines/torrentreactor.py - search_engine/engines/piratebay.png search_engine/engines/btjunkie.png + search_engine/engines/piratebay.py + search_engine/engines/torrentdownloads.py + search_engine/engines/torrentreactor.png + search_engine/engines/isohunt.py search_engine/engines/btjunkie.py + search_engine/engines/piratebay.png search_engine/engines/vertor.py - search_engine/engines/torrentreactor.png - search_engine/engines/mininova.png - search_engine/engines/mininova.py \ No newline at end of file diff --git a/src/transferlistwidget.cpp b/src/transferlistwidget.cpp index bccecb18a..428f3f636 100644 --- a/src/transferlistwidget.cpp +++ b/src/transferlistwidget.cpp @@ -742,6 +742,30 @@ void TransferListWidget::decreasePrioSelectedTorrents() { refreshList(); } +// FIXME: Should work only if the tab is displayed +void TransferListWidget::topPrioSelectedTorrents() { + const QStringList hashes = getSelectedTorrentsHashes(); + foreach(const QString &hash, hashes) { + QTorrentHandle h = BTSession->getTorrentHandle(hash); + if(h.is_valid() && !h.is_seed()) { + h.queue_position_top(); + } + } + refreshList(); +} + +// FIXME: Should work only if the tab is displayed +void TransferListWidget::bottomPrioSelectedTorrents() { + const QStringList hashes = getSelectedTorrentsHashes(); + foreach(const QString &hash, hashes) { + QTorrentHandle h = BTSession->getTorrentHandle(hash); + if(h.is_valid() && !h.is_seed()) { + h.queue_position_bottom(); + } + } + refreshList(); +} + void TransferListWidget::buySelectedTorrents() const { const QStringList hashes = getSelectedTorrentsHashes(); foreach(const QString &hash, hashes) { @@ -1053,12 +1077,16 @@ void TransferListWidget::displayListMenu(const QPoint&) { connect(&actionOpen_destination_folder, SIGNAL(triggered()), this, SLOT(openSelectedTorrentsFolder())); //QAction actionBuy_it(QIcon(QString::fromUtf8(":/Icons/oxygen/wallet.png")), tr("Buy it"), 0); //connect(&actionBuy_it, SIGNAL(triggered()), this, SLOT(buySelectedTorrents())); - QAction actionSetTorrentPath(QIcon(QString::fromUtf8(":/Icons/skin/folder.png")), tr("Set location..."), 0); - connect(&actionSetTorrentPath, SIGNAL(triggered()), this, SLOT(setSelectedTorrentsLocation())); - QAction actionIncreasePriority(QIcon(QString::fromUtf8(":/Icons/skin/increase.png")), tr("Increase priority"), 0); + QAction actionIncreasePriority(QIcon(QString::fromUtf8(":/Icons/oxygen/go-up.png")), tr("Move up", "i.e. move up in the queue"), 0); connect(&actionIncreasePriority, SIGNAL(triggered()), this, SLOT(increasePrioSelectedTorrents())); - QAction actionDecreasePriority(QIcon(QString::fromUtf8(":/Icons/skin/decrease.png")), tr("Decrease priority"), 0); + QAction actionDecreasePriority(QIcon(QString::fromUtf8(":/Icons/oxygen/go-down.png")), tr("Move down", "i.e. Move down in the queue"), 0); connect(&actionDecreasePriority, SIGNAL(triggered()), this, SLOT(decreasePrioSelectedTorrents())); + QAction actionTopPriority(QIcon(QString::fromUtf8(":/Icons/oxygen/go-top.png")), tr("Move to top", "i.e. Move to top of the queue"), 0); + connect(&actionTopPriority, SIGNAL(triggered()), this, SLOT(topPrioSelectedTorrents())); + QAction actionBottomPriority(QIcon(QString::fromUtf8(":/Icons/oxygen/go-bottom.png")), tr("Move to bottom", "i.e. Move to bottom of the queue"), 0); + connect(&actionBottomPriority, SIGNAL(triggered()), this, SLOT(bottomPrioSelectedTorrents())); + QAction actionSetTorrentPath(QIcon(QString::fromUtf8(":/Icons/skin/folder.png")), tr("Set location..."), 0); + connect(&actionSetTorrentPath, SIGNAL(triggered()), this, SLOT(setSelectedTorrentsLocation())); QAction actionForce_recheck(QIcon(QString::fromUtf8(":/Icons/oxygen/gear.png")), tr("Force recheck"), 0); connect(&actionForce_recheck, SIGNAL(triggered()), this, SLOT(recheckSelectedTorrents())); QAction actionCopy_magnet_link(QIcon(QString::fromUtf8(":/Icons/magnet.png")), tr("Copy magnet link"), 0); @@ -1199,8 +1227,11 @@ void TransferListWidget::displayListMenu(const QPoint&) { listMenu.addAction(&actionOpen_destination_folder); if(BTSession->isQueueingEnabled() && one_not_seed) { listMenu.addSeparator(); - listMenu.addAction(&actionIncreasePriority); - listMenu.addAction(&actionDecreasePriority); + QMenu *prioMenu = listMenu.addMenu(tr("Priority")); + prioMenu->addAction(&actionTopPriority); + prioMenu->addAction(&actionIncreasePriority); + prioMenu->addAction(&actionDecreasePriority); + prioMenu->addAction(&actionBottomPriority); } listMenu.addSeparator(); if(one_has_metadata) diff --git a/src/transferlistwidget.h b/src/transferlistwidget.h index 86a88370d..7cd9d4034 100644 --- a/src/transferlistwidget.h +++ b/src/transferlistwidget.h @@ -68,6 +68,8 @@ public slots: void deleteSelectedTorrents(); void increasePrioSelectedTorrents(); void decreasePrioSelectedTorrents(); + void topPrioSelectedTorrents(); + void bottomPrioSelectedTorrents(); void buySelectedTorrents() const; void copySelectedMagnetURIs() const; void openSelectedTorrentsFolder() const;