diff options
author | shtrom | 2014-06-18 03:23:08 +0000 |
---|---|---|
committer | shtrom | 2014-06-18 03:23:08 +0000 |
commit | 03872d641eafddded7904365e17e858f7464a1b8 (patch) | |
tree | ab6ce8548a08aa8d1df036b2e2cf44a17bef72a1 | |
parent | dea7bf41a5bc98645e2fcbd0f6eef242fffc2261 (diff) | |
download | aur-03872d641eafddded7904365e17e858f7464a1b8.tar.gz |
[gtg-git] Cleaner patches to fix Hamster integration.
git-svn-id: svn+ssh://scm.narf.ssji.net/svn/archlinux-packages@368 df209809-8e4a-0410-9a64-c169741eb0fc
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | 0001-Use-better-default-preferences.patch | 32 | ||||
-rw-r--r-- | 0001-Use-str-as-unicode-if-missing.patch | 29 | ||||
-rw-r--r-- | 0001-plugin-API-Open-preference-file-for-reading-as-binar.patch | 29 | ||||
-rw-r--r-- | 0002-No-need-to-use-unicode-on-strs.patch | 26 | ||||
-rw-r--r-- | PKGBUILD | 14 |
6 files changed, 67 insertions, 73 deletions
@@ -1,6 +1,6 @@ pkgbase = gtg-git pkgdesc = Personal GTD like organizer for the GNOME desktop environment. Git version. - pkgver = r5106.8814fb2 + pkgver = r5107.767bfca pkgrel = 1 url = http://gtgnome.net/ install = gtg-git.install @@ -37,11 +37,11 @@ pkgbase = gtg-git optdepends = python-launchpadlib: for Launchpad synchronization service conflicts = gtg source = gtg-git::git+https://github.com/getting-things-gnome/gtg - source = 0001-Use-better-default-preferences.patch - source = 0001-Use-str-as-unicode-if-missing.patch + source = 0001-plugin-API-Open-preference-file-for-reading-as-binar.patch + source = 0002-No-need-to-use-unicode-on-strs.patch md5sums = SKIP - md5sums = 7cb958cbfbbc0c4b94a73868cea915ba - md5sums = 6ccda926c78dc1811fc86a40881520a6 + md5sums = 443cf942f731a97c031a0118d3a2c895 + md5sums = 6850a96df56027f7eee02054ad2554af pkgname = gtg-git diff --git a/0001-Use-better-default-preferences.patch b/0001-Use-better-default-preferences.patch deleted file mode 100644 index 81d1d0adc8df..000000000000 --- a/0001-Use-better-default-preferences.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b1ee094c0249fe3e278b37d98868fe1af7568739 Mon Sep 17 00:00:00 2001 -From: Olivier Mehani <olivier.mehani@nicta.com.au> -Date: Tue, 17 Jun 2014 16:00:04 +1000 -Subject: [PATCH] Use better default preferences - -Don't flood Hamster too much - -Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au> ---- - GTG/plugins/hamster/hamster.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/GTG/plugins/hamster/hamster.py b/GTG/plugins/hamster/hamster.py -index 2badf8b..a414aaa 100644 ---- a/GTG/plugins/hamster/hamster.py -+++ b/GTG/plugins/hamster/hamster.py -@@ -32,9 +32,9 @@ from GTG.core.task import Task - class hamsterPlugin: - PLUGIN_NAMESPACE = 'hamster-plugin' - DEFAULT_PREFERENCES = { -- "activity": "title", -- "category": "auto", -- "description": "contents", -+ "activity": "tag", -+ "category": "auto_tag", -+ "description": "title", - "tags": "existing", - } - TOOLTIP_TEXT_START_ACTIVITY = _("Start a new activity in Hamster Time" + --- -2.0.0 - diff --git a/0001-Use-str-as-unicode-if-missing.patch b/0001-Use-str-as-unicode-if-missing.patch deleted file mode 100644 index ffc2cf32e4ac..000000000000 --- a/0001-Use-str-as-unicode-if-missing.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 546c7fdd794206e504faa9374d5f9e53f17b853f Mon Sep 17 00:00:00 2001 -From: Olivier Mehani <olivier.mehani@nicta.com.au> -Date: Tue, 17 Jun 2014 16:23:02 +1000 -Subject: [PATCH] Use str() as unicode() if missing - -Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au> ---- - GTG/plugins/hamster/hamster.py | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/GTG/plugins/hamster/hamster.py b/GTG/plugins/hamster/hamster.py -index 2badf8b..ada250e 100644 ---- a/GTG/plugins/hamster/hamster.py -+++ b/GTG/plugins/hamster/hamster.py -@@ -28,7 +28,11 @@ import datetime - from GTG import _ - from GTG.core.task import Task - -+try: -+ unicode("") -+except: -+ unicode=str - - class hamsterPlugin: - PLUGIN_NAMESPACE = 'hamster-plugin' - DEFAULT_PREFERENCES = { --- -2.0.0 - diff --git a/0001-plugin-API-Open-preference-file-for-reading-as-binar.patch b/0001-plugin-API-Open-preference-file-for-reading-as-binar.patch new file mode 100644 index 000000000000..5330fde41e3d --- /dev/null +++ b/0001-plugin-API-Open-preference-file-for-reading-as-binar.patch @@ -0,0 +1,29 @@ +From 767bfca97a931def28d354d18c1ec3541779ff59 Mon Sep 17 00:00:00 2001 +From: Olivier Mehani <shtrom+gtg@ssji.net> +Date: Wed, 18 Jun 2014 09:46:31 +1000 +Subject: [PATCH] [plugin API] Open preference file for reading as binary + +Otherwise, the file is not readable as such when reloading, and the +plugin (e.g., Hamster integration) always uses the defaults. + +Signed-off-by: Olivier Mehani <shtrom+gtg@ssji.net> +--- + GTG/core/plugins/api.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/GTG/core/plugins/api.py b/GTG/core/plugins/api.py +index 6e881f4..09c3f4f 100644 +--- a/GTG/core/plugins/api.py ++++ b/GTG/core/plugins/api.py +@@ -237,7 +237,7 @@ class PluginAPI: + if os.path.isdir(dirname): + if os.path.isfile(path): + try: +- with open(path, 'r') as file: ++ with open(path, 'rb') as file: + item = pickle.load(file) + config.update(item) + except: +-- +2.0.0 + diff --git a/0002-No-need-to-use-unicode-on-strs.patch b/0002-No-need-to-use-unicode-on-strs.patch new file mode 100644 index 000000000000..c614eea367a6 --- /dev/null +++ b/0002-No-need-to-use-unicode-on-strs.patch @@ -0,0 +1,26 @@ +From f10a378cb1efc6fa73f0f113968efcc8221eb287 Mon Sep 17 00:00:00 2001 +From: Olivier Mehani <olivier.mehani@nicta.com.au> +Date: Wed, 18 Jun 2014 13:11:01 +1000 +Subject: [PATCH 2/2] No need to use unicode() on strs + +Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au> +--- + GTG/plugins/hamster/hamster.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/GTG/plugins/hamster/hamster.py b/GTG/plugins/hamster/hamster.py +index 2badf8b..cbc97d4 100644 +--- a/GTG/plugins/hamster/hamster.py ++++ b/GTG/plugins/hamster/hamster.py +@@ -90,7 +90,7 @@ class hamsterPlugin: + + category = "" + if self.preferences['category'] == 'auto_tag': +- hamster_activities = dict([(str(x[0]), unicode(x[1])) ++ hamster_activities = dict([(str(x[0]), x[1]) + for x in + self.hamster.GetActivities('')]) + if (gtg_title in hamster_activities +-- +2.0.0 + @@ -3,7 +3,7 @@ # Maintainer: Olivier Mehani <shtrom-aur@ssji.net> # $Id$ pkgname=gtg-git -pkgver=r5106.8814fb2 +pkgver=r5107.767bfca pkgrel=1 pkgdesc="Personal GTD like organizer for the GNOME desktop environment. Git version." url="http://gtgnome.net/" @@ -35,18 +35,18 @@ optdepends=( conflicts=('gtg') install="${pkgname}.install" source=("${pkgname}::git+https://github.com/getting-things-gnome/gtg" - "0001-Use-better-default-preferences.patch" - "0001-Use-str-as-unicode-if-missing.patch") + "0001-plugin-API-Open-preference-file-for-reading-as-binar.patch" + "0002-No-need-to-use-unicode-on-strs.patch") pkgver() { cd "$srcdir/${pkgname}" + patch -p1 < ${srcdir}/0001-plugin-API-Open-preference-file-for-reading-as-binar.patch + patch -p1 < ${srcdir}/0002-No-need-to-use-unicode-on-strs.patch printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { cd "${srcdir}/${pkgname}" - patch -p 1 < "${srcdir}/0001-Use-better-default-preferences.patch" - patch -p 1 < "${srcdir}/0001-Use-str-as-unicode-if-missing.patch" python setup.py build } @@ -57,5 +57,5 @@ package() { # vim:set ts=2 sw=2 et: md5sums=('SKIP' - '7cb958cbfbbc0c4b94a73868cea915ba' - '6ccda926c78dc1811fc86a40881520a6') + '443cf942f731a97c031a0118d3a2c895' + '6850a96df56027f7eee02054ad2554af') |