Merge pull request #3410 from ngosang/preview

Minor changes in the GUI (Preview file & Forece Resume)
This commit is contained in:
sledgehammer999
2015-07-20 02:46:40 +03:00
8 changed files with 35 additions and 70 deletions

View File

@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>414</width>
<width>462</width>
<height>256</height>
</rect>
</property>
@@ -14,34 +14,6 @@
<string>Preview selection</string>
</property>
<layout class="QVBoxLayout">
<item>
<widget class="QLabel" name="lbl_title">
<property name="minimumSize">
<size>
<width>0</width>
<height>37</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>37</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>File preview</string>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="maximumSize">

View File

@@ -621,10 +621,10 @@ void TransferListWidget::displayListMenu(const QPoint&)
// Create actions
QAction actionStart(GuiIconProvider::instance()->getIcon("media-playback-start"), tr("Resume", "Resume/start the torrent"), 0);
connect(&actionStart, SIGNAL(triggered()), this, SLOT(startSelectedTorrents()));
QAction actionForceStart(tr("Force Resume", "Force Resume/start the torrent"), 0);
connect(&actionForceStart, SIGNAL(triggered()), this, SLOT(forceStartSelectedTorrents()));
QAction actionPause(GuiIconProvider::instance()->getIcon("media-playback-pause"), tr("Pause", "Pause the torrent"), 0);
connect(&actionPause, SIGNAL(triggered()), this, SLOT(pauseSelectedTorrents()));
QAction actionForceStart(GuiIconProvider::instance()->getIcon("media-seek-forward"), tr("Force Resume", "Force Resume/start the torrent"), 0);
connect(&actionForceStart, SIGNAL(triggered()), this, SLOT(forceStartSelectedTorrents()));
QAction actionDelete(GuiIconProvider::instance()->getIcon("edit-delete"), tr("Delete", "Delete the torrent"), 0);
connect(&actionDelete, SIGNAL(triggered()), this, SLOT(deleteSelectedTorrents()));
QAction actionPreview_file(GuiIconProvider::instance()->getIcon("view-preview"), tr("Preview file..."), 0);
@@ -723,24 +723,18 @@ void TransferListWidget::displayListMenu(const QPoint&)
}
}
else {
if (!forced) {
if (!has_force) {
listMenu.addAction(&actionForceStart);
has_force = true;
}
if (forced && !has_start) {
listMenu.addAction(&actionStart);
has_start = true;
}
else {
if (!has_start) {
listMenu.addAction(&actionStart);
has_start = true;
}
}
if (!has_pause) {
listMenu.addAction(&actionPause);
has_pause = true;
}
if (!forced && !has_force) {
listMenu.addAction(&actionForceStart);
has_force = true;
}
}
if (torrent->hasMetadata() && !has_preview)
has_preview = true;