From e9dd04abd0ede1143ea4af10059e37c2f599e1fd Mon Sep 17 00:00:00 2001 From: root Date: Mon, 15 Oct 2012 00:36:27 -0700 Subject: Mon Oct 15 00:36:26 PDT 2012 --- community/ubuntuone-client/1339_1338.diff | 57 ++++++++++++++++++++++++ community/ubuntuone-client/PKGBUILD | 31 ++++++------- community/ubuntuone-client/fix-notify-hint.patch | 20 +++++++++ 3 files changed, 91 insertions(+), 17 deletions(-) create mode 100644 community/ubuntuone-client/1339_1338.diff create mode 100644 community/ubuntuone-client/fix-notify-hint.patch (limited to 'community/ubuntuone-client') diff --git a/community/ubuntuone-client/1339_1338.diff b/community/ubuntuone-client/1339_1338.diff new file mode 100644 index 000000000..cbd966a70 --- /dev/null +++ b/community/ubuntuone-client/1339_1338.diff @@ -0,0 +1,57 @@ +=== modified file 'tests/platform/sync_menu/test_linux.py' +--- tests/platform/sync_menu/test_linux.py 2012-10-10 14:54:49 +0000 ++++ tests/platform/sync_menu/test_linux.py 2012-10-11 12:01:27 +0000 +@@ -124,6 +124,7 @@ + """Check that the dummy has the proper methods required by the API.""" + dummy = linux.DummySyncMenu('random', 'args') + self.assertIsInstance(dummy.update_transfers, Callable) ++ self.assertIsInstance(dummy.sync_status_changed, Callable) + + + class SyncMenuTestCase(TestCase): + +=== modified file 'ubuntuone/platform/sync_menu/linux.py' +--- ubuntuone/platform/sync_menu/linux.py 2012-10-10 17:06:14 +0000 ++++ ubuntuone/platform/sync_menu/linux.py 2012-10-11 13:00:10 +0000 +@@ -183,7 +183,7 @@ + self.timer.addCallback(self._timeout) + + +-class TransfersMenu(Dbusmenu.Menuitem): ++class TransfersMenu(Dbusmenu.Menuitem if use_syncmenu else object): + """Menu that handles the recent and current transfers.""" + + def __init__(self, status_frontend): +@@ -227,7 +227,7 @@ + items_added = 0 + remove = [] + for item in self._uploading_items: +- if item in uploading_data: ++ if item in uploading_data.keys(): + size, written = uploading_data[item] + percentage = written * 100 / size + upload_item = self._uploading_items[item] +@@ -243,7 +243,7 @@ + for item in remove: + self._uploading_items.pop(item) + if items_added < 5: +- for item in uploading_data: ++ for item in uploading_data.keys(): + if item not in self._uploading_items and items_added < 5: + size, written = uploading_data[item] + percentage = written * 100 / size +@@ -270,4 +270,12 @@ + def update_transfers(self): + """Do nothing.""" + +-UbuntuOneSyncMenu = UbuntuOneSyncMenuLinux if use_syncmenu else DummySyncMenu ++ def sync_status_changed(self): ++ """Do nothing.""" ++ ++ ++if use_syncmenu: ++ UbuntuOneSyncMenu = UbuntuOneSyncMenuLinux ++else: ++ UbuntuOneSyncMenu = DummySyncMenu ++ TransfersMenu = None + diff --git a/community/ubuntuone-client/PKGBUILD b/community/ubuntuone-client/PKGBUILD index 31e198468..296bed607 100644 --- a/community/ubuntuone-client/PKGBUILD +++ b/community/ubuntuone-client/PKGBUILD @@ -1,37 +1,34 @@ -# $Id: PKGBUILD 72611 2012-06-17 13:44:37Z bgyorgy $ +# $Id: PKGBUILD 77827 2012-10-15 01:33:32Z bgyorgy $ # Maintainer: Balló György pkgname=ubuntuone-client -pkgver=3.0.2 +pkgver=4.0.0 pkgrel=1 pkgdesc="Ubuntu One helps you store, sync and share files between your computers" arch=('i686' 'x86_64') url="https://launchpad.net/ubuntuone-client" license=('GPL') depends=('dbus-glib' 'python2-configglue' 'python2-distribute' 'libnotify' 'python2-gobject2' 'python2-pyinotify' 'python-simplejson' 'ubuntu-sso-client' 'python2-ubuntuone-storageprotocol' 'hicolor-icon-theme' 'xdg-utils') -makedepends=('intltool' 'imake' 'gobject-introspection' 'vala') -optdepends=('ubuntu-sso-client-qt: required for first-time log in or' - 'ubuntu-sso-client-gtk: required for first-time log in' - 'python2-pyqt: proxy support') +makedepends=('intltool' 'imake' 'gobject-introspection') options=('!libtool') install=$pkgname.install -source=(http://launchpad.net/ubuntuone-client/stable-3-0/$pkgver/+download/$pkgname-$pkgver.tar.gz - http://pkgbuild.com/~bgyorgy/sources/$pkgname-translations-20120513.tar.gz) -md5sums=('5251fad8d316e8730188078239a4dd73' - '6f4603f11ea21d030bfaef34d3567f68') +source=(http://launchpad.net/ubuntuone-client/stable-4-0/$pkgver/+download/$pkgname-$pkgver.tar.gz + 1339_1338.diff + fix-notify-hint.patch) +md5sums=('738039703d4dcf54518a725f8ffbc4de' + 'e82e80c229de06692988c1f938a34fb9' + '54dfeb2be011f0a12ea7cfa0f0c19bec') build() { cd "$srcdir/$pkgname-$pkgver" sed -i 's@^#!.*python$@#!/usr/bin/python2@' bin/* - # Install language files - echo 'ace af am an ar ast az be bg bn bo br bs ca ca@valencia ckb crh cv cy cs csb da de el en_AU en_CA en_GB eo es et eu fa fi fo fr fy gd gl gu he hi hr hu hy id is it ja jv kk km kn ko ku ky lt lv ml mr ms my nb nds nl nn oc pl pt pt_BR ro ru sd shn si sk sl sq sr sv ta te th tr ug uk ur uz vi zh_CN zh_HK zh_TW' >po/LINGUAS - rename $pkgname- '' ../po/$pkgname-*.po - mv -f -t po ../po/* + # Improve TransfersMenu declaration to avoid problems + patch -Np0 -i "$srcdir/1339_1338.diff" - # Fix desktop file - sed -i 's/ubuntuone-installer/ubuntuone-control-panel-qt/' \ - ubuntuone/platform/linux/{messaging,launcher}.py + # Workaround for crash in notification-daemon + # https://bugzilla.gnome.org/show_bug.cgi?id=665166 + patch -Np1 -i "$srcdir/fix-notify-hint.patch" ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgname \ --disable-static \ diff --git a/community/ubuntuone-client/fix-notify-hint.patch b/community/ubuntuone-client/fix-notify-hint.patch new file mode 100644 index 000000000..f32280de9 --- /dev/null +++ b/community/ubuntuone-client/fix-notify-hint.patch @@ -0,0 +1,20 @@ +diff -Naur ubuntuone-client-4.0.0.orig/ubuntuone/platform/notification/linux.py ubuntuone-client-4.0.0/ubuntuone/platform/notification/linux.py +--- ubuntuone-client-4.0.0.orig/ubuntuone/platform/notification/linux.py 2012-06-19 15:51:01.000000000 +0200 ++++ ubuntuone-client-4.0.0/ubuntuone/platform/notification/linux.py 2012-10-15 01:14:01.019476818 +0200 +@@ -40,7 +40,7 @@ + + if 'gi' in sys.modules and sys.modules['gi'] is not None: + try: +- from gi.repository import Notify ++ from gi.repository import GLib, Notify + Notify # pyflakes + NOTIFY_MODULE = 'gi' + except ImportError: +@@ -85,5 +85,6 @@ + if append: + self.notification.set_hint_string('x-canonical-append', '') + +- self.notification.set_hint_int32('transient', int(True)) ++ if NOTIFY_MODULE == 'gi': ++ self.notification.set_hint('transient', GLib.Variant.new_boolean(1)) + self.notification.show() -- cgit v1.2.3-54-g00ecf