Compare commits

...

18 Commits

Author SHA1 Message Date
Christophe Dumez
8b53028828 Fix DHT wrongly reported as disabled for magnet links (closes #987340) 2012-07-14 17:41:15 +03:00
Christophe Dumez
17b7ff3fd2 Fix possible model update problem when setting the priority of a folder in torrent content 2012-07-02 22:52:55 +03:00
Christophe Dumez
9ca171c96f Update Changelog 2012-07-02 20:57:39 +03:00
Christophe Dumez
cfd2576002 Fix issue when "minimize to systray" and "start minimized" are both enabled.
Window could not be restored.
2012-07-02 20:56:27 +03:00
Christophe Dumez
ca0af8c858 Update Python version for Windows 2012-07-01 16:07:02 +03:00
Christophe Dumez
70320ed4b3 Bump version to v2.9.11 2012-07-01 14:48:17 +03:00
Christophe Dumez
869af25826 Update Changelog 2012-07-01 14:35:41 +03:00
Christophe Dumez
b3ac151302 Fix ThePirateBay search plugin 2012-07-01 14:35:17 +03:00
Christophe Dumez
d02ff9cd66 Update Changelog 2012-06-30 18:27:06 +03:00
Christophe Dumez
32c0b7801c Fix keyboard focus issues on Main window 2012-06-30 18:25:57 +03:00
Christophe Dumez
6049b2ce03 Update Changelog 2012-06-29 19:40:37 +03:00
Christophe Dumez
b3aec8e6f9 Bring window to front after restoring from systray 2012-06-29 19:39:53 +03:00
Christophe Dumez
e1933e9382 Add some spacing between property panel buttons 2012-06-28 18:26:43 +03:00
Christophe Dumez
5cc4f31b4b Update Changelog 2012-06-28 18:12:04 +03:00
Christophe Dumez
ad918651a5 Fix torrent availability computation 2012-06-28 18:11:03 +03:00
Christophe Dumez
2fa3e9ae8e Code optimization 2012-06-27 19:27:49 +03:00
Christophe Dumez
5fd7bad57c Update Changelog 2012-06-27 17:47:58 +03:00
Christophe Dumez
d7eb29ab71 Fix window visibility toggling bug with "minimized to systray" enabled
The issue seemed to affect Windows only.
2012-06-27 17:46:26 +03:00
13 changed files with 59 additions and 33 deletions

View File

@@ -1,3 +1,13 @@
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.9.12
- BUGFIX: Fix issue when "Minimize to tray" and "Start minimized" are both enabled
* Sun Jul 1 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.11
- BUGFIX: Fix unreversible "Minimize to tray" on some window managers
- BUGFIX: Fix torrent availability computation (closes #988869)
- BUGFIX: Bring window to front after restoring from systray
- BUGFIX: Fix keyboard focus problems on main window (closes #1019563)
- BUGFIX: Fix ThePirateBay search plugin
* Sun Jun 24 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.10
- BUGFIX: Fix possible crash when showing torrent content (closes #1002586)
- BUGFIX: Add support for RSS feeds using magnet links (closes #1016379)

View File

@@ -45,7 +45,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.9.10</string>
<string>2.9.11</string>
<key>CFBundleSignature</key>
<string>qBit</string>
<key>CFBundleExecutable</key>

View File

@@ -255,9 +255,13 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
readSettings();
if(!ui_locked) {
if(pref.startMinimized() && systrayIcon)
showMinimized();
else {
if(pref.startMinimized() && systrayIcon) {
show();
minimizeWindow();
// XXX: Using showMinimized() makes it impossible to restore
// the window if "Minimize to systray" is enabled.
//showMinimized();
} else {
show();
activateWindow();
raise();
@@ -701,6 +705,9 @@ void MainWindow::toggleVisibility(QSystemTrayIcon::ActivationReason e) {
if(!unlockUI())
return;
}
// Make sure the window is not minimized
setWindowState(windowState() & ~Qt::WindowMinimized | Qt::WindowActive);
// Then show it
show();
raise();
activateWindow();

View File

@@ -39,6 +39,7 @@
PropTabBar::PropTabBar(QWidget *parent) :
QHBoxLayout(parent), m_currentIndex(-1)
{
setSpacing(2);
m_btnGroup = new QButtonGroup(this);
// General tab
QPushButton *main_infos_button = new QPushButton(IconProvider::instance()->getIcon("document-properties"), tr("General"), parent);

View File

@@ -81,9 +81,9 @@ TrackerList::~TrackerList() {
}
QList<QTreeWidgetItem*> TrackerList::getSelectedTrackerItems() const {
QList<QTreeWidgetItem*> selected_items = selectedItems();
const QList<QTreeWidgetItem*> selected_items = selectedItems();
QList<QTreeWidgetItem*> selected_trackers;
foreach(QTreeWidgetItem *item, selectedItems()) {
foreach(QTreeWidgetItem *item, selected_items) {
if(indexOfTopLevelItem(item) >= NB_STICKY_ITEM) { // Ignore STICKY ITEMS
selected_trackers << item;
}
@@ -188,11 +188,12 @@ void TrackerList::clear() {
void TrackerList::loadStickyItems(const QTorrentHandle &h) {
// XXX: libtorrent should provide this info...
// Count peers from DHT, LSD, PeX
uint nb_dht=0, nb_lsd=0, nb_pex=0;
uint nb_dht = 0, nb_lsd = 0, nb_pex = 0;
std::vector<peer_info> peers;
h.get_peer_info(peers);
std::vector<peer_info>::iterator it;
for(it=peers.begin(); it!=peers.end(); it++) {
std::vector<peer_info>::iterator it = peers.begin();
std::vector<peer_info>::iterator end = peers.end();
for ( ; it != end; ++it) {
if(it->source & peer_info::dht)
++nb_dht;
if(it->source & peer_info::lsd)
@@ -201,7 +202,7 @@ void TrackerList::loadStickyItems(const QTorrentHandle &h) {
++nb_pex;
}
// load DHT information
if(QBtSession::instance()->isDHTEnabled() && h.has_metadata() && !h.priv()) {
if (QBtSession::instance()->isDHTEnabled() && !h.priv()) {
dht_item->setText(COL_STATUS, tr("Working"));
} else {
dht_item->setText(COL_STATUS, tr("Disabled"));
@@ -233,7 +234,9 @@ void TrackerList::loadTrackers() {
QHash<QString, TrackerInfos> trackers_data = QBtSession::instance()->getTrackersInfo(h.hash());
QStringList old_trackers_urls = tracker_items.keys();
const std::vector<announce_entry> trackers = h.trackers();
for(std::vector<announce_entry>::const_iterator it = trackers.begin(); it != trackers.end(); it++) {
std::vector<announce_entry>::const_iterator it = trackers.begin();
std::vector<announce_entry>::const_iterator end = trackers.end();
for( ; it != end; ++it) {
QString tracker_url = misc::toQString(it->url);
QTreeWidgetItem *item = tracker_items.value(tracker_url, 0);
if(!item) {

View File

@@ -556,7 +556,7 @@ void QTorrentHandle::downloading_pieces(bitfield &bf) const {
bool QTorrentHandle::has_metadata() const {
#if LIBTORRENT_VERSION_MINOR > 15
return torrent_handle::status(query_distributed_copies).has_metadata;
return torrent_handle::status(0x0).has_metadata;
#else
return torrent_handle::has_metadata();
#endif
@@ -564,7 +564,7 @@ bool QTorrentHandle::has_metadata() const {
float QTorrentHandle::distributed_copies() const {
#if LIBTORRENT_VERSION_MINOR > 15
return torrent_handle::status(0x0).distributed_copies;
return torrent_handle::status(query_distributed_copies).distributed_copies;
#else
return torrent_handle::status().distributed_copies;
#endif

View File

@@ -1,4 +1,4 @@
#VERSION: 1.41
#VERSION: 1.50
#AUTHORS: Fabien Devaux (fab@gnux.info)
#CONTRIBUTORS: Christophe Dumez (chris@qbittorrent.org)
@@ -31,14 +31,14 @@ import sgmllib
from helpers import retrieve_url, download_file
class piratebay(object):
url = 'http://thepiratebay.org'
url = 'http://thepiratebay.se'
name = 'The Pirate Bay'
supported_categories = {'all': '0', 'movies': '200', 'music': '100', 'games': '400', 'software': '300'}
def __init__(self):
self.results = []
self.parser = self.SimpleSGMLParser(self.results, self.url)
def download_torrent(self, info):
print download_file(info)
@@ -57,10 +57,9 @@ class piratebay(object):
if params['href'].startswith('/torrent/'):
self.current_item = {}
self.td_counter = 0
self.code = params['href'].split('/')[2]
self.current_item['desc_link'] = 'http://thepiratebay.org'+params['href'].strip()
self.current_item['desc_link'] = 'http://thepiratebay.se'+params['href'].strip()
self.in_name = True
elif params['href'].startswith('http://torrents.thepiratebay.org/%s'%self.code):
elif params['href'].startswith('magnet:'):
self.current_item['link']=params['href'].strip()
self.in_name = False

View File

@@ -1,4 +1,4 @@
#VERSION: 1.40
#VERSION: 1.50
#AUTHORS: Fabien Devaux (fab@gnux.info)
#CONTRIBUTORS: Christophe Dumez (chris@qbittorrent.org)
@@ -31,14 +31,14 @@ import sgmllib3
from helpers import retrieve_url, download_file
class piratebay(object):
url = 'http://thepiratebay.org'
url = 'http://thepiratebay.se'
name = 'The Pirate Bay'
supported_categories = {'all': '0', 'movies': '200', 'music': '100', 'games': '400', 'software': '300'}
def __init__(self):
self.results = []
self.parser = self.SimpleSGMLParser(self.results, self.url)
def download_torrent(self, info):
print(download_file(info))
@@ -57,10 +57,9 @@ class piratebay(object):
if params['href'].startswith('/torrent/'):
self.current_item = {}
self.td_counter = 0
self.code = params['href'].split('/')[2]
self.current_item['desc_link'] = 'http://thepiratebay.org'+params['href'].strip()
self.current_item['desc_link'] = 'http://thepiratebay.se'+params['href'].strip()
self.in_name = True
elif params['href'].startswith('http://torrents.thepiratebay.org/%s'%self.code):
elif params['href'].startswith('magnet:'):
self.current_item['link']=params['href'].strip()
self.in_name = False

View File

@@ -143,7 +143,7 @@ void SearchEngine::installPython() {
DownloadThread *pydownloader = new DownloadThread(this);
connect(pydownloader, SIGNAL(downloadFinished(QString,QString)), this, SLOT(pythonDownloadSuccess(QString,QString)));
connect(pydownloader, SIGNAL(downloadFailure(QString,QString)), this, SLOT(pythonDownloadFailure(QString,QString)));
pydownloader->downloadUrl("http://python.org/ftp/python/2.7.2/python-2.7.2.msi");
pydownloader->downloadUrl("http://python.org/ftp/python/2.7.3/python-2.7.3.msi");
}
void SearchEngine::pythonDownloadSuccess(QString url, QString file_path) {

View File

@@ -415,7 +415,7 @@ public:
item->setPriority(prio::IGNORED);
else
item->setPriority(prio::NORMAL);
emit dataChanged(this->index(0,0), this->index(rowCount(), columnCount()));
emit dataChanged(this->index(0,0), this->index(rowCount()-1, columnCount()-1));
emit filteredFilesChanged();
}
return true;

View File

@@ -64,6 +64,9 @@ public:
setAcceptDrops(true);
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
setStyleSheet("QListWidget { background: transparent; border: 0 }");
#if defined(Q_WS_MAC)
setAttribute(Qt::WA_MacShowFocusRect, false);
#endif
}
// Redefine addItem() to make sure the list stays sorted
@@ -161,6 +164,9 @@ public:
// Height is fixed (sizeHint().height() is used)
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
setStyleSheet("QListWidget { background: transparent; border: 0 }");
#if defined(Q_WS_MAC)
setAttribute(Qt::WA_MacShowFocusRect, false);
#endif
}
protected:
@@ -202,14 +208,12 @@ public:
vLayout->addWidget(torrentsLabel);
statusFilters = new StatusFiltersWidget(this);
vLayout->addWidget(statusFilters);
statusFilters->setFocusPolicy(Qt::NoFocus);
QLabel *labelsLabel = new QLabel(tr("Labels"));
labelsLabel->setIndent(2);
labelsLabel->setFont(font);
vLayout->addWidget(labelsLabel);
labelFilters = new LabelFiltersList(this);
vLayout->addWidget(labelFilters);
labelFilters->setFocusPolicy(Qt::NoFocus);
setLayout(vLayout);
labelFilters->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
statusFilters->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

View File

@@ -106,6 +106,9 @@ TransferListWidget::TransferListWidget(QWidget *parent, MainWindow *main_window,
setItemsExpandable(false);
setAutoScroll(true);
setDragDropMode(QAbstractItemView::DragOnly);
#if defined(Q_WS_MAC)
setAttribute(Qt::WA_MacShowFocusRect, false);
#endif
// Default hidden columns
if(!column_loaded) {

View File

@@ -1,5 +1,5 @@
PROJECT_NAME = qbittorrent
PROJECT_VERSION = 2.9.10
PROJECT_VERSION = 2.9.11
os2 {
DEFINES += VERSION=\'\"v$${PROJECT_VERSION}\"\'
@@ -9,4 +9,4 @@ os2 {
DEFINES += VERSION_MAJOR=2
DEFINES += VERSION_MINOR=9
DEFINES += VERSION_BUGFIX=10
DEFINES += VERSION_BUGFIX=11