From ac097b99042963f296ac00c5c41bb73ea8878c0e Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 7 Aug 2011 15:07:28 +0300 Subject: [PATCH] Added back ability to reorder trackers --- src/properties/propertieswidget.cpp | 5 ----- src/properties/propertieswidget.ui | 31 ++++++++--------------------- src/properties/trackerlist.cpp | 4 ---- 3 files changed, 8 insertions(+), 32 deletions(-) diff --git a/src/properties/propertieswidget.cpp b/src/properties/propertieswidget.cpp index c94caacca..a94aebf53 100644 --- a/src/properties/propertieswidget.cpp +++ b/src/properties/propertieswidget.cpp @@ -106,13 +106,8 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, Tra ProgressHLayout_2->insertWidget(1, pieces_availability); // Tracker list trackerList = new TrackerList(this); -#if LIBTORRENT_VERSION_MINOR > 14 - trackerUpButton->setVisible(false); - trackerDownButton->setVisible(false); -#else connect(trackerUpButton, SIGNAL(clicked()), trackerList, SLOT(moveSelectionUp())); connect(trackerDownButton, SIGNAL(clicked()), trackerList, SLOT(moveSelectionDown())); -#endif horizontalLayout_trackers->insertWidget(0, trackerList); // Peers list peersList = new PeerListWidget(this); diff --git a/src/properties/propertieswidget.ui b/src/properties/propertieswidget.ui index 55371f57e..600ca4224 100644 --- a/src/properties/propertieswidget.ui +++ b/src/properties/propertieswidget.ui @@ -6,7 +6,7 @@ 0 0 - 540 + 551 274 @@ -28,7 +28,7 @@ - 0 + 1 @@ -54,8 +54,8 @@ 0 0 - 520 - 373 + 531 + 395 @@ -557,15 +557,16 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans'; font-size:8pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'Cantarell'; font-size:8pt; font-weight:400; font-style:normal;"> <table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> <tr> <td style="border: none;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans';"></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans';"></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu';"></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu';"></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu';"></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></td></tr></table></body></html> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans';"></p></td></tr></table></body></html> true @@ -628,22 +629,6 @@ p, li { white-space: pre-wrap; } - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 28 - - - - diff --git a/src/properties/trackerlist.cpp b/src/properties/trackerlist.cpp index 2387cf76f..69a3f7407 100644 --- a/src/properties/trackerlist.cpp +++ b/src/properties/trackerlist.cpp @@ -100,7 +100,6 @@ void TrackerList::setRowColor(int row, QColor color) { } void TrackerList::moveSelectionUp() { -#if LIBTORRENT_VERSION_MINOR < 15 QTorrentHandle h = properties->getCurrentTorrent(); if(!h.is_valid()) { clear(); @@ -134,11 +133,9 @@ void TrackerList::moveSelectionUp() { h.replace_trackers(trackers); // Reannounce h.force_reannounce(); -#endif } void TrackerList::moveSelectionDown() { -#if LIBTORRENT_VERSION_MINOR < 15 QTorrentHandle h = properties->getCurrentTorrent(); if(!h.is_valid()) { clear(); @@ -172,7 +169,6 @@ void TrackerList::moveSelectionDown() { h.replace_trackers(trackers); // Reannounce h.force_reannounce(); -#endif } void TrackerList::clear() {