summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2011-03-05 10:21:28 +0000
committerJustin Lecher <jlec@gentoo.org>2011-03-05 10:21:28 +0000
commitd61e7de1f254fefbcb4bdff50bd321658e42c303 (patch)
treefa6aaacc624397f718151aeaa04d728fd51c36db /app-office/gtg
parentFixes for New Python ABI Stuff, 311675; added missing Dep on dev-python/simpl... (diff)
downloadgentoo-2-d61e7de1f254fefbcb4bdff50bd321658e42c303.tar.gz
gentoo-2-d61e7de1f254fefbcb4bdff50bd321658e42c303.tar.bz2
gentoo-2-d61e7de1f254fefbcb4bdff50bd321658e42c303.zip
Correctly work with hamster applett
(Portage version: 2.2.0_alpha26/cvs/Linux x86_64)
Diffstat (limited to 'app-office/gtg')
-rw-r--r--app-office/gtg/ChangeLog6
-rw-r--r--app-office/gtg/files/gtg-0.2.4-hamster.patch41
-rw-r--r--app-office/gtg/gtg-0.2.4-r1.ebuild9
3 files changed, 53 insertions, 3 deletions
diff --git a/app-office/gtg/ChangeLog b/app-office/gtg/ChangeLog
index cdf57a448035..db224da4e5e9 100644
--- a/app-office/gtg/ChangeLog
+++ b/app-office/gtg/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-office/gtg
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-office/gtg/ChangeLog,v 1.8 2011/03/05 09:52:40 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-office/gtg/ChangeLog,v 1.9 2011/03/05 10:21:28 jlec Exp $
+
+ 05 Mar 2011; Justin Lecher <jlec@gentoo.org> gtg-0.2.4-r1.ebuild,
+ +files/gtg-0.2.4-hamster.patch:
+ Correctly work with hamster applett
*gtg-0.2.4-r1 (05 Mar 2011)
diff --git a/app-office/gtg/files/gtg-0.2.4-hamster.patch b/app-office/gtg/files/gtg-0.2.4-hamster.patch
new file mode 100644
index 000000000000..258c03fcce22
--- /dev/null
+++ b/app-office/gtg/files/gtg-0.2.4-hamster.patch
@@ -0,0 +1,41 @@
+diff --git a/GTG/plugins/hamster/hamster.py b/GTG/plugins/hamster/hamster.py
+index b4e2208..046fd10 100755
+--- a/GTG/plugins/hamster/hamster.py
++++ b/GTG/plugins/hamster/hamster.py
+@@ -65,16 +65,19 @@ class hamsterPlugin:
+ hamster_activities=dict([(unicode(x[0]), unicode(x[1])) for x in self.hamster.GetActivities()])
+ if (gtg_title in hamster_activities
+ or gtg_title.replace(",", "") in hamster_activities):
+- category = "@%s" % hamster_activities[gtg_title]
++ category = "%s" % hamster_activities[gtg_title]
+
+ if (self.preferences['category'] == 'tag' or
+ (self.preferences['category'] == 'auto_tag' and not category)):
+ # See if any of the tags match existing categories
+- categories = dict([(unicode(x).lower(), unicode(x)) for x in self.hamster.GetCategories()])
++ categories = dict([(unicode(x[1]).lower(), unicode(x[1])) for x in self.hamster.GetCategories()])
+ intersection = set(categories.keys()).intersection(set([x.lower() for x in gtg_tags]))
+ if len(intersection) > 0:
+- category = "@%s" % categories[intersection.pop()]
+-
++ category = "%s" % categories[intersection.pop()]
++ else:
++ # Force category if not found
++ category = gtg_tags[0]
++
+ description = ""
+ if self.preferences['description'] == 'title':
+ description = gtg_title
+@@ -91,10 +94,10 @@ class hamsterPlugin:
+ except dbus.exceptions.DBusException:
+ # old hamster version, doesn't support tags
+ pass
+- tag_str = "".join([" #" + x for x in tag_candidates])
++ tag_str = "".join([", " + x for x in tag_candidates])
+
+ #print '%s%s,%s%s'%(activity, category, description, tag_str)
+- hamster_id=self.hamster.AddFact('%s%s,%s%s'%(activity, category, description, tag_str), 0, 0)
++ hamster_id=self.hamster.AddFact(activity, tag_str, 0, 0, category, description, False)
+
+ ids=self.get_hamster_ids(task)
+ ids.append(str(hamster_id))
diff --git a/app-office/gtg/gtg-0.2.4-r1.ebuild b/app-office/gtg/gtg-0.2.4-r1.ebuild
index f4061b439418..36b11e09b6d8 100644
--- a/app-office/gtg/gtg-0.2.4-r1.ebuild
+++ b/app-office/gtg/gtg-0.2.4-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-office/gtg/gtg-0.2.4-r1.ebuild,v 1.1 2011/03/05 09:52:40 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-office/gtg/gtg-0.2.4-r1.ebuild,v 1.2 2011/03/05 10:21:28 jlec Exp $
EAPI="3"
@@ -8,7 +8,7 @@ PYTHON_DEPEND="2"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.*"
-inherit fdo-mime gnome2-utils distutils
+inherit eutils fdo-mime gnome2-utils distutils
DESCRIPTION="Personal organizer for the GNOME desktop environment"
HOMEPAGE="http://gtg.fritalk.com/"
@@ -29,6 +29,11 @@ RDEPEND="
dev-python/simplejson"
DEPEND="${RDEPEND}"
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-hamster.patch
+ distutils_src_prepare
+}
+
pkg_preinst() {
gnome2_icon_savelist
}