1 |
commit: c7803da9e125647116ce1cb2b05f57a654e9a6dc |
2 |
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 19 11:28:48 2021 +0000 |
4 |
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 19 11:28:48 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7803da9 |
7 |
|
8 |
app-office/gtg: bump to 0.5 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/788868 |
11 |
Package-Manager: Portage-3.0.12, Repoman-3.0.2 |
12 |
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org> |
13 |
|
14 |
app-office/gtg/Manifest | 1 + |
15 |
app-office/gtg/files/0.5-mouse-cursor-fixes1.patch | 69 ++++++++++++++++++++++ |
16 |
app-office/gtg/files/0.5-mouse-cursor-fixes2.patch | 55 +++++++++++++++++ |
17 |
app-office/gtg/files/0.5-mouse-cursor-fixes3.patch | 41 +++++++++++++ |
18 |
app-office/gtg/gtg-0.5.ebuild | 63 ++++++++++++++++++++ |
19 |
5 files changed, 229 insertions(+) |
20 |
|
21 |
diff --git a/app-office/gtg/Manifest b/app-office/gtg/Manifest |
22 |
index b3bc648952f..ead4f5170cf 100644 |
23 |
--- a/app-office/gtg/Manifest |
24 |
+++ b/app-office/gtg/Manifest |
25 |
@@ -1 +1,2 @@ |
26 |
DIST gtg-0.4.0.tar.xz 3744752 BLAKE2B fdeabe32135dea24ac6113a486650b66b5143aa745117029b03e26e1bb3f2e8629623b26efdae0c8217741a2b4964b5dc060f0e450c05c950e21ea360f3f3823 SHA512 f2677f6bbc0b6cb21b7882a2bd0342b4919581c12e4aa43c13b5dbc48740418c512a41619584d0d75bfa63ebc4a5460abfbc27360e1817c8832cbecf3c34a60e |
27 |
+DIST gtg-0.5.tar.gz 2229259 BLAKE2B e724cbd015a6f0b6fee62c52283b56244490efb7df4e57b2e30745f58fbc41442b008f5c81b53cfd001f04a92ff53a14e2117d6c12d0d5a35fe49158b5f736fa SHA512 631f5343301d7d72211398152fa081c0fa15154babc7ec900f13a39a2677d0edaf4fea534a83284207e8019926c9108dc1d8f25bdbeae85ef0665dfe1c7b768a |
28 |
|
29 |
diff --git a/app-office/gtg/files/0.5-mouse-cursor-fixes1.patch b/app-office/gtg/files/0.5-mouse-cursor-fixes1.patch |
30 |
new file mode 100644 |
31 |
index 00000000000..624c01ac0f2 |
32 |
--- /dev/null |
33 |
+++ b/app-office/gtg/files/0.5-mouse-cursor-fixes1.patch |
34 |
@@ -0,0 +1,69 @@ |
35 |
+From ee709d2722a75f11b5f6c9d7cd9b4a925107e54f Mon Sep 17 00:00:00 2001 |
36 |
+From: Neui <neuisen@××××××××××.com> |
37 |
+Date: Wed, 21 Apr 2021 01:58:40 +0200 |
38 |
+Subject: [PATCH] Remove Gdk.Cursor.new depredation warnings |
39 |
+ |
40 |
+Gdk.Cursor.new has been replaced by Gdk.Cursor.new_for_display, which |
41 |
+needs an additional display. |
42 |
+It was only used to set the cursor on windows, which has an display |
43 |
+associated with it, so now it is created when needed rather than being |
44 |
+cached. |
45 |
+--- |
46 |
+ GTG/gtk/editor/taskview.py | 12 ++++++------ |
47 |
+ GTG/plugins/unmaintained/tomboy/tomboy.py | 4 +++- |
48 |
+ 2 files changed, 9 insertions(+), 7 deletions(-) |
49 |
+ |
50 |
+diff --git a/GTG/gtk/editor/taskview.py b/GTG/gtk/editor/taskview.py |
51 |
+index 7f73fbb3..4b510499 100644 |
52 |
+--- a/GTG/gtk/editor/taskview.py |
53 |
++++ b/GTG/gtk/editor/taskview.py |
54 |
+@@ -74,10 +74,6 @@ class TaskView(Gtk.TextView): |
55 |
+ # Timeout in milliseconds |
56 |
+ PROCESSING_DELAY = 250 |
57 |
+ |
58 |
+- # Mouse cursors |
59 |
+- CURSOR_HAND = Gdk.Cursor.new(Gdk.CursorType.HAND2) |
60 |
+- CURSOR_NORMAL = Gdk.Cursor.new(Gdk.CursorType.XTERM) |
61 |
+- |
62 |
+ |
63 |
+ def __init__(self, req: Requester, clipboard) -> None: |
64 |
+ super().__init__() |
65 |
+@@ -601,7 +597,9 @@ class TaskView(Gtk.TextView): |
66 |
+ tags = view.get_iter_at_location(x, y)[1].get_tags() |
67 |
+ |
68 |
+ # Reset cursor and hover states |
69 |
+- window.set_cursor(self.CURSOR_NORMAL) |
70 |
++ cursor = Gdk.Cursor.new_for_display(window.get_display(), |
71 |
++ Gdk.CursorType.XTERM) |
72 |
++ window.set_cursor(cursor) |
73 |
+ |
74 |
+ if self.hovered_tag: |
75 |
+ try: |
76 |
+@@ -615,7 +613,9 @@ class TaskView(Gtk.TextView): |
77 |
+ try: |
78 |
+ tag = tags[0] |
79 |
+ tag.set_hover() |
80 |
+- window.set_cursor(self.CURSOR_HAND) |
81 |
++ cursor = Gdk.Cursor.new_for_display(window.get_display(), |
82 |
++ Gdk.CursorType.HAND2) |
83 |
++ window.set_cursor(cursor) |
84 |
+ self.hovered_tag = tag |
85 |
+ |
86 |
+ except (AttributeError, IndexError): |
87 |
+diff --git a/GTG/plugins/unmaintained/tomboy/tomboy.py b/GTG/plugins/unmaintained/tomboy/tomboy.py |
88 |
+index 33ec9264..28c4226a 100644 |
89 |
+--- a/GTG/plugins/unmaintained/tomboy/tomboy.py |
90 |
++++ b/GTG/plugins/unmaintained/tomboy/tomboy.py |
91 |
+@@ -337,6 +337,8 @@ class TomboyPlugin(): |
92 |
+ # cursor changes to a hand |
93 |
+ |
94 |
+ def realize_callback(widget): |
95 |
+- eventbox.window.set_cursor(Gdk.Cursor.new(Gdk.HAND2)) |
96 |
++ cursor = Gdk.Cursor.new_for_display(eventbox.window.get_display(), |
97 |
++ Gdk.CursorType.HAND2) |
98 |
++ eventbox.window.set_cursor(cursor) |
99 |
+ eventbox.connect("realize", realize_callback) |
100 |
+ return eventbox |
101 |
+-- |
102 |
+2.30.0 |
103 |
+ |
104 |
|
105 |
diff --git a/app-office/gtg/files/0.5-mouse-cursor-fixes2.patch b/app-office/gtg/files/0.5-mouse-cursor-fixes2.patch |
106 |
new file mode 100644 |
107 |
index 00000000000..f0fb4a8a5c2 |
108 |
--- /dev/null |
109 |
+++ b/app-office/gtg/files/0.5-mouse-cursor-fixes2.patch |
110 |
@@ -0,0 +1,55 @@ |
111 |
+From 522f79e4ed58ea821dd939daa856a2d9dfd6f934 Mon Sep 17 00:00:00 2001 |
112 |
+From: Neui <neuisen@××××××××××.com> |
113 |
+Date: Sun, 2 May 2021 01:08:37 +0200 |
114 |
+Subject: [PATCH] Use Gdk.Cursor.new_from_name() |
115 |
+ |
116 |
+Because GDK4 dropped new_for_display in favour of new_from_name. |
117 |
+--- |
118 |
+ GTG/gtk/editor/taskview.py | 8 ++++---- |
119 |
+ GTG/plugins/unmaintained/tomboy/tomboy.py | 4 ++-- |
120 |
+ 2 files changed, 6 insertions(+), 6 deletions(-) |
121 |
+ |
122 |
+diff --git a/GTG/gtk/editor/taskview.py b/GTG/gtk/editor/taskview.py |
123 |
+index 4b510499..1313ead8 100644 |
124 |
+--- a/GTG/gtk/editor/taskview.py |
125 |
++++ b/GTG/gtk/editor/taskview.py |
126 |
+@@ -597,8 +597,8 @@ class TaskView(Gtk.TextView): |
127 |
+ tags = view.get_iter_at_location(x, y)[1].get_tags() |
128 |
+ |
129 |
+ # Reset cursor and hover states |
130 |
+- cursor = Gdk.Cursor.new_for_display(window.get_display(), |
131 |
+- Gdk.CursorType.XTERM) |
132 |
++ cursor = Gdk.Cursor.new_from_name(window.get_display(), |
133 |
++ 'text') |
134 |
+ window.set_cursor(cursor) |
135 |
+ |
136 |
+ if self.hovered_tag: |
137 |
+@@ -613,8 +613,8 @@ class TaskView(Gtk.TextView): |
138 |
+ try: |
139 |
+ tag = tags[0] |
140 |
+ tag.set_hover() |
141 |
+- cursor = Gdk.Cursor.new_for_display(window.get_display(), |
142 |
+- Gdk.CursorType.HAND2) |
143 |
++ cursor = Gdk.Cursor.new_from_name(window.get_display(), |
144 |
++ 'pointer') |
145 |
+ window.set_cursor(cursor) |
146 |
+ self.hovered_tag = tag |
147 |
+ |
148 |
+diff --git a/GTG/plugins/unmaintained/tomboy/tomboy.py b/GTG/plugins/unmaintained/tomboy/tomboy.py |
149 |
+index 28c4226a..d81cd58c 100644 |
150 |
+--- a/GTG/plugins/unmaintained/tomboy/tomboy.py |
151 |
++++ b/GTG/plugins/unmaintained/tomboy/tomboy.py |
152 |
+@@ -337,8 +337,8 @@ class TomboyPlugin(): |
153 |
+ # cursor changes to a hand |
154 |
+ |
155 |
+ def realize_callback(widget): |
156 |
+- cursor = Gdk.Cursor.new_for_display(eventbox.window.get_display(), |
157 |
+- Gdk.CursorType.HAND2) |
158 |
++ cursor = Gdk.Cursor.new_from_name(eventbox.window.get_display(), |
159 |
++ 'pointer') |
160 |
+ eventbox.window.set_cursor(cursor) |
161 |
+ eventbox.connect("realize", realize_callback) |
162 |
+ return eventbox |
163 |
+-- |
164 |
+2.30.0 |
165 |
+ |
166 |
|
167 |
diff --git a/app-office/gtg/files/0.5-mouse-cursor-fixes3.patch b/app-office/gtg/files/0.5-mouse-cursor-fixes3.patch |
168 |
new file mode 100644 |
169 |
index 00000000000..d0c965027c1 |
170 |
--- /dev/null |
171 |
+++ b/app-office/gtg/files/0.5-mouse-cursor-fixes3.patch |
172 |
@@ -0,0 +1,41 @@ |
173 |
+From c6fa415ed7b71197f27e946b8a854d74a8e92f84 Mon Sep 17 00:00:00 2001 |
174 |
+From: Neui <neuisen@××××××××××.com> |
175 |
+Date: Sun, 2 May 2021 01:12:08 +0200 |
176 |
+Subject: [PATCH] Prevent flicker cursor when moving over a tag |
177 |
+ |
178 |
+When hovering over a tag in the task editor, it'll "flicker" between a |
179 |
+normal text cursor and the pointer cursor. This fixes this by simply |
180 |
+calling set_cursor just once. |
181 |
+--- |
182 |
+ GTG/gtk/editor/taskview.py | 3 +-- |
183 |
+ 1 file changed, 1 insertion(+), 2 deletions(-) |
184 |
+ |
185 |
+diff --git a/GTG/gtk/editor/taskview.py b/GTG/gtk/editor/taskview.py |
186 |
+index 1313ead8..9358b98f 100644 |
187 |
+--- a/GTG/gtk/editor/taskview.py |
188 |
++++ b/GTG/gtk/editor/taskview.py |
189 |
+@@ -599,7 +599,6 @@ class TaskView(Gtk.TextView): |
190 |
+ # Reset cursor and hover states |
191 |
+ cursor = Gdk.Cursor.new_from_name(window.get_display(), |
192 |
+ 'text') |
193 |
+- window.set_cursor(cursor) |
194 |
+ |
195 |
+ if self.hovered_tag: |
196 |
+ try: |
197 |
+@@ -615,12 +614,12 @@ class TaskView(Gtk.TextView): |
198 |
+ tag.set_hover() |
199 |
+ cursor = Gdk.Cursor.new_from_name(window.get_display(), |
200 |
+ 'pointer') |
201 |
+- window.set_cursor(cursor) |
202 |
+ self.hovered_tag = tag |
203 |
+ |
204 |
+ except (AttributeError, IndexError): |
205 |
+ # Not an interactive tag, or no tag at all |
206 |
+ pass |
207 |
++ window.set_cursor(cursor) |
208 |
+ |
209 |
+ |
210 |
+ def do_populate_popup(self, popup) -> None: |
211 |
+-- |
212 |
+2.30.0 |
213 |
+ |
214 |
|
215 |
diff --git a/app-office/gtg/gtg-0.5.ebuild b/app-office/gtg/gtg-0.5.ebuild |
216 |
new file mode 100644 |
217 |
index 00000000000..a2e3580997f |
218 |
--- /dev/null |
219 |
+++ b/app-office/gtg/gtg-0.5.ebuild |
220 |
@@ -0,0 +1,63 @@ |
221 |
+# Copyright 1999-2021 Gentoo Authors |
222 |
+# Distributed under the terms of the GNU General Public License v2 |
223 |
+ |
224 |
+EAPI="7" |
225 |
+PYTHON_COMPAT=( python3_8 ) |
226 |
+PYTHON_REQ_USE="xml(+)" |
227 |
+ |
228 |
+inherit meson python-single-r1 xdg |
229 |
+ |
230 |
+DESCRIPTION="Personal organizer for the GNOME desktop environment" |
231 |
+HOMEPAGE="https://wiki.gnome.org/Apps/GTG/" |
232 |
+SRC_URI="https://github.com/getting-things-gnome/gtg/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" |
233 |
+ |
234 |
+LICENSE="GPL-3+" |
235 |
+SLOT="0" |
236 |
+KEYWORDS="~amd64 ~x86" |
237 |
+IUSE="test" |
238 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
239 |
+RESTRICT="!test? ( test )" |
240 |
+ |
241 |
+RDEPEND=" |
242 |
+ ${PYTHON_DEPS} |
243 |
+ $(python_gen_cond_dep ' |
244 |
+ dev-python/dbus-python[${PYTHON_USEDEP}] |
245 |
+ dev-python/pygobject:3[${PYTHON_USEDEP}] |
246 |
+ >=dev-python/liblarch-3.1.0[${PYTHON_USEDEP}] |
247 |
+ dev-python/pycairo[${PYTHON_USEDEP}] |
248 |
+ dev-python/lxml[${PYTHON_USEDEP}] |
249 |
+ ') |
250 |
+ x11-libs/pango[introspection] |
251 |
+ x11-libs/gdk-pixbuf[introspection] |
252 |
+ x11-libs/gtk+:3[introspection] |
253 |
+" |
254 |
+DEPEND="${RDEPEND}" |
255 |
+BDEPEND=" |
256 |
+ dev-util/itstool |
257 |
+ >=sys-devel/gettext-0.19.8 |
258 |
+ test? ( $(python_gen_cond_dep ' |
259 |
+ dev-python/nose[${PYTHON_USEDEP}] |
260 |
+ dev-python/cheetah3[${PYTHON_USEDEP}] |
261 |
+ dev-python/mock[${PYTHON_USEDEP}] |
262 |
+ ') |
263 |
+ app-text/pdfjam |
264 |
+ app-text/pdftk |
265 |
+ dev-texlive/texlive-latex |
266 |
+ ) |
267 |
+" |
268 |
+ |
269 |
+PATCHES=( |
270 |
+ # Fixes tests, and mouse cursor with some themes |
271 |
+ "${FILESDIR}"/${PV}-mouse-cursor-fixes{1,2,3}.patch |
272 |
+) |
273 |
+ |
274 |
+src_install() { |
275 |
+ meson_src_install |
276 |
+ python_fix_shebang "${ED}"/usr/bin/gtg |
277 |
+ python_optimize |
278 |
+} |
279 |
+ |
280 |
+src_test() { |
281 |
+ sed -e "s|@VCS_TAG@|${PV}|" GTG/core/info.py.in > GTG/core/info.py || die |
282 |
+ nosetests -v || die |
283 |
+} |