From fdcaf644692e151ddc596b148465ce4a77e6b670 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 Jan 2012 23:14:46 +0000 Subject: Mon Jan 9 23:14:46 UTC 2012 --- ...gtk-conf-set-correct-download-dir-default.patch | 31 ++++++++++++++ extra/transmission/PKGBUILD | 47 +++++++++++++--------- extra/transmission/fix_minimize.patch | 27 +++++++++++++ 3 files changed, 85 insertions(+), 20 deletions(-) create mode 100644 extra/transmission/0001-gtk-conf-set-correct-download-dir-default.patch create mode 100644 extra/transmission/fix_minimize.patch (limited to 'extra/transmission') diff --git a/extra/transmission/0001-gtk-conf-set-correct-download-dir-default.patch b/extra/transmission/0001-gtk-conf-set-correct-download-dir-default.patch new file mode 100644 index 000000000..3b0a38400 --- /dev/null +++ b/extra/transmission/0001-gtk-conf-set-correct-download-dir-default.patch @@ -0,0 +1,31 @@ +From 4028320ba2e8c181292e02171d83ebf6ce3aee5a Mon Sep 17 00:00:00 2001 +From: Felipe Contreras +Date: Thu, 29 Dec 2011 03:28:27 +0200 +Subject: [PATCH] gtk: conf: set correct download dir default + +Otherwise people might get: +ERROR:open-dialog.c:285:gtr_torrent_options_dialog_new: code should not be reached + +It was fixed at some point in ticket #1873, but somebody broket it +again. + +Signed-off-by: Felipe Contreras +--- + gtk/conf.c | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/gtk/conf.c b/gtk/conf.c +index 623b839..6ad6ca2 100644 +--- a/gtk/conf.c ++++ b/gtk/conf.c +@@ -108,7 +108,6 @@ tr_prefs_init_defaults( tr_benc * d ) + tr_bencDictAddInt( d, PREF_KEY_MAIN_WINDOW_X, 50 ); + tr_bencDictAddInt( d, PREF_KEY_MAIN_WINDOW_Y, 50 ); + +- str = g_get_user_special_dir( G_USER_DIRECTORY_DOWNLOAD ); + tr_bencDictAddStr( d, TR_PREFS_KEY_DOWNLOAD_DIR, str ); + + tr_bencDictAddStr( d, PREF_KEY_SORT_MODE, "sort-by-name" ); +-- +1.7.8.1 + diff --git a/extra/transmission/PKGBUILD b/extra/transmission/PKGBUILD index 68d081cd4..2d43a286b 100644 --- a/extra/transmission/PKGBUILD +++ b/extra/transmission/PKGBUILD @@ -1,21 +1,28 @@ -# $Id: PKGBUILD 141093 2011-10-23 18:45:30Z ibiru $ +# $Id: PKGBUILD 146293 2012-01-08 17:03:43Z ibiru $ # Maintainer : Ionut Biru pkgbase=transmission pkgname=('transmission-cli' 'transmission-gtk' 'transmission-qt') pkgver=2.42 -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64') url="http://www.transmissionbt.com/" license=('MIT') makedepends=('gtk3' 'intltool' 'curl' 'qt' 'libevent') -source=(http://mirrors.m0k.org/transmission/files/${pkgbase}-${pkgver}.tar.xz - transmissiond transmissiond.conf) +source=(http://mirrors.m0k.org/transmission/files/$pkgbase-$pkgver.tar.xz + transmissiond transmissiond.conf + 0001-gtk-conf-set-correct-download-dir-default.patch + fix_minimize.patch) md5sums=('50f6dd76c5c01f45d5ed20783c686815' '08875299e3fbb68fc546c1f350ac1f06' - 'be39806c35b7544856fa4070b00fc960') + 'be39806c35b7544856fa4070b00fc960' + 'f9fae46f5aa9ed3a22af64091604c6d0' + 'bd764dea56aaf69757762ea1a4c92be2') build() { - cd "${srcdir}/${pkgbase}-${pkgver}" + cd "$srcdir/$pkgbase-$pkgver" + + patch -Np1 -i "$srcdir/0001-gtk-conf-set-correct-download-dir-default.patch" + patch -Np2 -i "$srcdir/fix_minimize.patch" ./configure --prefix=/usr make @@ -29,16 +36,16 @@ package_transmission-cli() { backup=('etc/conf.d/transmissiond') install=transmission-cli.install - cd "${srcdir}/${pkgbase}-${pkgver}" + cd "$srcdir/$pkgbase-$pkgver" for dir in daemon cli web utils do - make -C "${dir}" DESTDIR="${pkgdir}" install + make -C "$dir" DESTDIR="$pkgdir" install done - install -D -m755 "${srcdir}/transmissiond" "${pkgdir}/etc/rc.d/transmissiond" - install -D -m644 "${srcdir}/transmissiond.conf" "${pkgdir}/etc/conf.d/transmissiond" - install -D -m644 COPYING "${pkgdir}/usr/share/licenses/transmission-cli/COPYING" + install -D -m755 "$srcdir/transmissiond" "$pkgdir/etc/rc.d/transmissiond" + install -D -m644 "$srcdir/transmissiond.conf" "$pkgdir/etc/conf.d/transmissiond" + install -D -m644 COPYING "$pkgdir/usr/share/licenses/transmission-cli/COPYING" } package_transmission-gtk() { @@ -48,11 +55,11 @@ package_transmission-gtk() { 'transmission-cli: daemon and web support') install=transmission-gtk.install - cd "${srcdir}/${pkgbase}-${pkgver}" + cd "$srcdir/$pkgbase-$pkgver" - make -C gtk DESTDIR="${pkgdir}" install - make -C po DESTDIR="${pkgdir}" install - install -D -m644 COPYING "${pkgdir}/usr/share/licenses/transmission-gtk/COPYING" + make -C gtk DESTDIR="$pkgdir" install + make -C po DESTDIR="$pkgdir" install + install -D -m644 COPYING "$pkgdir/usr/share/licenses/transmission-gtk/COPYING" } package_transmission-qt() { @@ -61,11 +68,11 @@ package_transmission-qt() { optdepends=('transmission-cli: daemon and web support') install=transmission-qt.install - cd "${srcdir}/${pkgbase}-${pkgver}" + cd "$srcdir/$pkgbase-$pkgver" - make -C qt INSTALL_ROOT="${pkgdir}"/usr install + make -C qt INSTALL_ROOT="$pkgdir"/usr install - install -D -m644 COPYING "${pkgdir}/usr/share/licenses/transmission-qt/COPYING" - install -D -m644 qt/icons/transmission.png "${pkgdir}/usr/share/pixmaps/transmission-qt.png" - install -D -m644 qt/transmission-qt.desktop "${pkgdir}/usr/share/applications/transmission-qt.desktop" + install -D -m644 COPYING "$pkgdir/usr/share/licenses/transmission-qt/COPYING" + install -D -m644 qt/icons/transmission.png "$pkgdir/usr/share/pixmaps/transmission-qt.png" + install -D -m644 qt/transmission-qt.desktop "$pkgdir/usr/share/applications/transmission-qt.desktop" } diff --git a/extra/transmission/fix_minimize.patch b/extra/transmission/fix_minimize.patch new file mode 100644 index 000000000..fe0f42a03 --- /dev/null +++ b/extra/transmission/fix_minimize.patch @@ -0,0 +1,27 @@ +Index: /trunk/gtk/main.c +=================================================================== +--- /trunk/gtk/main.c (revision 12968) ++++ /trunk/gtk/main.c (revision 13067) +@@ -73,4 +73,5 @@ + gboolean is_iconified; + ++ guint activation_count; + guint timer; + guint update_model_soon_tag; +@@ -533,6 +534,14 @@ + + static void +-on_activate( GApplication * app UNUSED, gpointer unused UNUSED ) +-{ ++on_activate( GApplication * app UNUSED, struct cbdata * cbdata ) ++{ ++ cbdata->activation_count++; ++ ++ /* GApplication emits an 'activate' signal when bootstrapping the primary. ++ * Ordinarily we handle that by presenting the main window, but if the user ++ * user started Transmission minimized, ignore that initial signal... */ ++ if( cbdata->is_iconified && ( cbdata->activation_count == 1 ) ) ++ return; ++ + gtr_action_activate( "present-main-window" ); + } -- cgit v1.2.3-54-g00ecf