From 1b82dd315bddc69adee51e8e52215eef66662acd Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Thu, 19 Nov 2009 12:17:51 +0000 Subject: [PATCH] - Fix and improved torrent comment display - Made links linkable in torrent comments --- src/propertiesWidget.ui | 578 ++++++++++++++++++++++----------------- src/propertieswidget.cpp | 4 +- 2 files changed, 323 insertions(+), 259 deletions(-) diff --git a/src/propertiesWidget.ui b/src/propertiesWidget.ui index e15ac973e..f640dbf2f 100644 --- a/src/propertiesWidget.ui +++ b/src/propertiesWidget.ui @@ -7,7 +7,7 @@ 0 0 540 - 305 + 329 @@ -40,8 +40,11 @@ - - Qt::ScrollBarAsNeeded + + + 0 + 0 + true @@ -50,23 +53,17 @@ 0 - 0 - 536 - 265 + -85 + 518 + 374 - - - 3 - - - 3 - - - 1 - + + + QLayout::SetDefaultConstraint + @@ -121,248 +118,237 @@ - - - Transfer - - - - 3 - - - 3 - - - 3 - - - - - 6 - - - 0 + + + + + Transfer + + + + 3 - - - - Uploaded: - - - - - - - Downloaded: - - - - - - - Wasted: - - - - - - - - - - - 0 Kb - - - - - - - 0 Kb - - - - - - - 0 kb - - - - - - - - - Qt::Horizontal + + 3 - - - 97 - 20 - + + 3 - - - - - - - - UP limit: - - - - - - DL limit: + + + 6 - - - - - - Time elapsed: + + 0 - + + + + Uploaded: + + + + + + + Downloaded: + + + + + + + Wasted: + + + + - - - - - - - - - + + + + + 0 Kb + + + + + + + 0 Kb + + + + + + + 0 kb + + + + - - - + + + Qt::Horizontal - - - - - - + + + 97 + 20 + - + - - - - - - Qt::Horizontal - - - - 98 - 20 - - - - - - - - - Share ratio: - - + + + + + UP limit: + + + + + + + DL limit: + + + + + + + Time elapsed: + + + + - - - Connections: - - + + + + + + + + + + + + + + + + + + + + + + + - - - + + + Qt::Horizontal - - - - - - - - - - 1.0 + + + 98 + 20 + - + - - - 0 - - + + + + + Share ratio: + + + + + + + Connections: + + + + + + + + + + + - - - - - + + + + + 1.0 + + + + + + + 0 + + + + + + + + + + + - - - - - Qt::Horizontal - - - - 97 - 20 - - - - - - + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + Information - - - 6 - - - 3 - - - 9 - - - 3 - - - 3 - + - - - 16777215 - 19 - + + + 0 + 0 + Save path: @@ -371,6 +357,12 @@ + + + 0 + 0 + + Created on: @@ -378,6 +370,12 @@ + + + 0 + 0 + + Torrent hash: @@ -388,6 +386,9 @@ Comment: + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + @@ -396,11 +397,14 @@ - - 6 - + + + 0 + 0 + + path @@ -411,7 +415,7 @@ 22 - 19 + 15 @@ -422,47 +426,107 @@ + + + + Qt::Horizontal + + + + 40 + 14 + + + + - - - date - - + + + + + + 0 + 0 + + + + date + + + + + + + Qt::Horizontal + + + + 40 + 14 + + + + + - - - hash - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - + + + + + + 0 + 0 + + + + hash + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + Qt::Horizontal + + + + 40 + 14 + + + + + - - - comment - - + + + + + <!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;"> +<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></body></html> + + + true + + + true + + + + - - - - Qt::Horizontal - - - - 517 - 20 - - - - diff --git a/src/propertieswidget.cpp b/src/propertieswidget.cpp index ede0e30ed..7f4d32c50 100644 --- a/src/propertieswidget.cpp +++ b/src/propertieswidget.cpp @@ -164,7 +164,7 @@ void PropertiesWidget::clear() { save_path->clear(); lbl_creationDate->clear(); hash_lbl->clear(); - comment_lbl->clear(); + comment_text->clear(); incrementalDownload->setChecked(false); trackerList->clear(); progressBar->setProgress(QRealArray()); @@ -210,7 +210,7 @@ void PropertiesWidget::loadTorrentInfos(QTorrentHandle &_h) { // Hash hash_lbl->setText(h.hash()); // Comment - comment_lbl->setText(h.comment()); + comment_text->setHtml(h.comment()); // Sequential download incrementalDownload->setChecked(TorrentPersistentData::isSequentialDownload(h.hash())); // URL seeds