Browse Source

Add custom patch to preview file when double clicking in qbittorrent

master
mid-kid 8 years ago
parent
commit
71a0cf5520
  1. 47
      satellites/extrafiles/qbittorrent/qbittorrent-3.3.12-preview-file-on-double-click.patch
  2. 4
      satellites/qbittorrent.sat

47
satellites/extrafiles/qbittorrent/qbittorrent-3.3.12-preview-file-on-double-click.patch

@ -0,0 +1,47 @@
# This patch adds the functionality of previewing a file when double-clicking on it.
# I hope to send this patch to upstream soon, but handling translations is a pain.
+++ src/gui/optionsdlg.h
@@ -44,6 +44,7 @@
{
TOGGLE_PAUSE,
OPEN_DEST,
+ PREVIEW,
NO_ACTION
};
+++ src/gui/optionsdlg.ui
@@ -295,6 +295,11 @@
</item>
<item>
<property name="text">
+ <string>Preview file</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
<string>No action</string>
</property>
</item>
@@ -320,6 +325,11 @@
</property>
</item>
<item>
+ <property name="text">
+ <string>Preview file</string>
+ </property>
+ </item>
+ <item>
<property name="text">
<string>No action</string>
</property>
+++ src/gui/transferlistwidget.cpp
@@ -239,6 +239,9 @@
else
Utils::Misc::openPath(torrent->contentPath(true));
break;
+ case PREVIEW:
+ if (torrent->hasMetadata())
+ new PreviewSelect(this, torrent);
}
}

4
satellites/qbittorrent.sat

@ -5,12 +5,16 @@ version=3.3.12
update_url='https://www.qbittorrent.org/download.php'
define_option '!qt4: Build for Qt4 instead of Qt5'
define_option '!patch: Apply some custom patches'
dlextract "http://sourceforge.net/projects/$name/files/$name/$name-$version/$name-$version.tar.xz" \
'2537a5afa16e2b9b86e88412dc59f7fb'
option patch extrafile "$name-$version-preview-file-on-double-click.patch"
header_end
cd "$name-$version"
option patch patch -p0 -i "../$name-$version-preview-file-on-double-click.patch"
compile_configure -I -- \
--with-qtsingleapplication=shipped \
$(option qt4 && echo '--with-qt4 --with-qjson=shipped' || echo '--without-qt4')

Loading…
Cancel
Save