mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
Add new information about when torrent was added to transmission in the Information Tab in transmission-qt (#3121)
This commit is contained in:
@@ -934,6 +934,37 @@ void DetailsDialog::refreshUI()
|
||||
}
|
||||
|
||||
ui_.locationValueLabel->setText(string);
|
||||
// myAddedLabel
|
||||
string = none;
|
||||
|
||||
if (!torrents.empty())
|
||||
{
|
||||
auto const date = torrents[0]->dateAdded();
|
||||
bool mixed_date = false;
|
||||
|
||||
for (Torrent const* const t : torrents)
|
||||
{
|
||||
mixed_date |= (date != t->dateAdded());
|
||||
}
|
||||
|
||||
bool const empty_date = date <= 0;
|
||||
|
||||
if (empty_date)
|
||||
{
|
||||
string = tr("N/A");
|
||||
}
|
||||
else if (mixed_date)
|
||||
{
|
||||
string = mixed;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto const date_str = QDateTime::fromSecsSinceEpoch(date).toString();
|
||||
string = date_str;
|
||||
}
|
||||
}
|
||||
|
||||
ui_.addedLabelValue->setText(string);
|
||||
|
||||
///
|
||||
/// Options Tab
|
||||
|
||||
@@ -442,7 +442,21 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="addedLabel">
|
||||
<property name="text">
|
||||
<string>Added:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="addedLabelValue">
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="commentLabel">
|
||||
<property name="text">
|
||||
<string>Comment:</string>
|
||||
@@ -452,7 +466,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="QTextBrowser" name="commentBrowser">
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
|
||||
Reference in New Issue
Block a user