summaryrefslogtreecommitdiff
path: root/app-office/gtg
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-20 14:45:01 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-20 14:45:01 +0100
commit34dea8e38f88007799629d0a56b12dec480b1d21 (patch)
tree6790873994b58030360328cf5897d934b3b03d16 /app-office/gtg
parent7932d472a02d4c016ff7dff4b7a5479ab9d1883d (diff)
gentoo resync : 20.06.2021
Diffstat (limited to 'app-office/gtg')
-rw-r--r--app-office/gtg/Manifest5
-rw-r--r--app-office/gtg/files/0.5-mouse-cursor-fixes1.patch69
-rw-r--r--app-office/gtg/files/0.5-mouse-cursor-fixes2.patch55
-rw-r--r--app-office/gtg/files/0.5-mouse-cursor-fixes3.patch41
-rw-r--r--app-office/gtg/gtg-0.5.ebuild63
5 files changed, 233 insertions, 0 deletions
diff --git a/app-office/gtg/Manifest b/app-office/gtg/Manifest
index dfd469b7d22a..a4cfb1a092fd 100644
--- a/app-office/gtg/Manifest
+++ b/app-office/gtg/Manifest
@@ -1,3 +1,8 @@
+AUX 0.5-mouse-cursor-fixes1.patch 2684 BLAKE2B 3ed8e075911fca65eb8031ea9a998411365c48a40b0985f9ba7bca6de107986be12b74c23ce4d1ab0b469823b60c38875ba592a7e8eaa6e049052a5f88ab8ea6 SHA512 6dcc68967e148bc481a615063913393e2190d8ea070cf193f6525e2e6f24947099fb20353cfb27270005ea2c244d706206f3f3b6f2e48e2f107f8c3f8938f72a
+AUX 0.5-mouse-cursor-fixes2.patch 2299 BLAKE2B 0664740211d33f56f8a55efcec05c89e82f113d04e808a3a883c2c0c9db0298dc2d9bbb060472dfdd3a3a1c219a287aef224387fc161b8b72c44091cee85dc0b SHA512 6a055344dd5012ae0c2a27d115c7c06530ff26fb4817f73f0c9bcaec9dcfb07ed6bc5c40d644f2feaf26c8b7eec7020432b5ae3653c598faea1c55c64a6b6fe4
+AUX 0.5-mouse-cursor-fixes3.patch 1431 BLAKE2B 887e3237d57623b12d3b94e67138aa0838f6b5782aeff18abec12a1f6607334cf49dd1bd82d07053a80649a1f3bb7fdcf1c02a9d7b36749a0a45fe8e9f80ce7a SHA512 a353a4bc4d641e973cd50424cfa089a213d3de283b1c61c3aaeb859d2e8f068108d7740b1f3f6935f20142d2500ca0dffcdd570e47e83b9e0d9959da37f3e726
DIST gtg-0.4.0.tar.xz 3744752 BLAKE2B fdeabe32135dea24ac6113a486650b66b5143aa745117029b03e26e1bb3f2e8629623b26efdae0c8217741a2b4964b5dc060f0e450c05c950e21ea360f3f3823 SHA512 f2677f6bbc0b6cb21b7882a2bd0342b4919581c12e4aa43c13b5dbc48740418c512a41619584d0d75bfa63ebc4a5460abfbc27360e1817c8832cbecf3c34a60e
+DIST gtg-0.5.tar.gz 2229259 BLAKE2B e724cbd015a6f0b6fee62c52283b56244490efb7df4e57b2e30745f58fbc41442b008f5c81b53cfd001f04a92ff53a14e2117d6c12d0d5a35fe49158b5f736fa SHA512 631f5343301d7d72211398152fa081c0fa15154babc7ec900f13a39a2677d0edaf4fea534a83284207e8019926c9108dc1d8f25bdbeae85ef0665dfe1c7b768a
EBUILD gtg-0.4.0.ebuild 1329 BLAKE2B a4da48e80920c74e1f7249e5dda2c3cdb2aea8bb636c776053d531da02531a88911e5c28057d6d0963e7ee9d04db9e8ba12f836378c5d830dd5e2829897fc709 SHA512 c1d6f91a67cf4c0b41d462426bd69bcfa12e2f0f605fc06e1848a9b03402f47207d187aca0456495a23dac89c00b770ff9f497de283dfa3c5e490b7e9ea97c1c
+EBUILD gtg-0.5.ebuild 1533 BLAKE2B 45fcf8016cac5030fab3f43f134be6981a154f69836552cf2cec769c90d5be35aeb9edbb9a2ebcb775ffd64962a4544c4c56734e3a05fdbfe128a17f7ac7c8ca SHA512 a0e919aa427440566b866f448d13339faa85b60fadb46d31f797d0c740ea8fb7b3ffdf4722bab094f5776d1f5e91295570a3d9808c7488078120e619614bc8c7
MISC metadata.xml 886 BLAKE2B 5f0068ca29003ca7dc9988c6e648076eb612103a30c0d5bbf60faec65c7e859d8546243d42764f2b09c000c37ad05e665646aefc6493288c856e2ee96f3187ff SHA512 9676a4693ee4c934eb22673f80b13fe61531e6c82b821990d070ad7c3b709a416c14741c870c3845e5d49a1b4c91b7c8fd16b7812d5e7466ebf352f53328f945
diff --git a/app-office/gtg/files/0.5-mouse-cursor-fixes1.patch b/app-office/gtg/files/0.5-mouse-cursor-fixes1.patch
new file mode 100644
index 000000000000..624c01ac0f29
--- /dev/null
+++ b/app-office/gtg/files/0.5-mouse-cursor-fixes1.patch
@@ -0,0 +1,69 @@
+From ee709d2722a75f11b5f6c9d7cd9b4a925107e54f Mon Sep 17 00:00:00 2001
+From: Neui <neuisen@googlemail.com>
+Date: Wed, 21 Apr 2021 01:58:40 +0200
+Subject: [PATCH] Remove Gdk.Cursor.new depredation warnings
+
+Gdk.Cursor.new has been replaced by Gdk.Cursor.new_for_display, which
+needs an additional display.
+It was only used to set the cursor on windows, which has an display
+associated with it, so now it is created when needed rather than being
+cached.
+---
+ GTG/gtk/editor/taskview.py | 12 ++++++------
+ GTG/plugins/unmaintained/tomboy/tomboy.py | 4 +++-
+ 2 files changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/GTG/gtk/editor/taskview.py b/GTG/gtk/editor/taskview.py
+index 7f73fbb3..4b510499 100644
+--- a/GTG/gtk/editor/taskview.py
++++ b/GTG/gtk/editor/taskview.py
+@@ -74,10 +74,6 @@ class TaskView(Gtk.TextView):
+ # Timeout in milliseconds
+ PROCESSING_DELAY = 250
+
+- # Mouse cursors
+- CURSOR_HAND = Gdk.Cursor.new(Gdk.CursorType.HAND2)
+- CURSOR_NORMAL = Gdk.Cursor.new(Gdk.CursorType.XTERM)
+-
+
+ def __init__(self, req: Requester, clipboard) -> None:
+ super().__init__()
+@@ -601,7 +597,9 @@ class TaskView(Gtk.TextView):
+ tags = view.get_iter_at_location(x, y)[1].get_tags()
+
+ # Reset cursor and hover states
+- window.set_cursor(self.CURSOR_NORMAL)
++ cursor = Gdk.Cursor.new_for_display(window.get_display(),
++ Gdk.CursorType.XTERM)
++ window.set_cursor(cursor)
+
+ if self.hovered_tag:
+ try:
+@@ -615,7 +613,9 @@ class TaskView(Gtk.TextView):
+ try:
+ tag = tags[0]
+ tag.set_hover()
+- window.set_cursor(self.CURSOR_HAND)
++ cursor = Gdk.Cursor.new_for_display(window.get_display(),
++ Gdk.CursorType.HAND2)
++ window.set_cursor(cursor)
+ self.hovered_tag = tag
+
+ except (AttributeError, IndexError):
+diff --git a/GTG/plugins/unmaintained/tomboy/tomboy.py b/GTG/plugins/unmaintained/tomboy/tomboy.py
+index 33ec9264..28c4226a 100644
+--- a/GTG/plugins/unmaintained/tomboy/tomboy.py
++++ b/GTG/plugins/unmaintained/tomboy/tomboy.py
+@@ -337,6 +337,8 @@ class TomboyPlugin():
+ # cursor changes to a hand
+
+ def realize_callback(widget):
+- eventbox.window.set_cursor(Gdk.Cursor.new(Gdk.HAND2))
++ cursor = Gdk.Cursor.new_for_display(eventbox.window.get_display(),
++ Gdk.CursorType.HAND2)
++ eventbox.window.set_cursor(cursor)
+ eventbox.connect("realize", realize_callback)
+ return eventbox
+--
+2.30.0
+
diff --git a/app-office/gtg/files/0.5-mouse-cursor-fixes2.patch b/app-office/gtg/files/0.5-mouse-cursor-fixes2.patch
new file mode 100644
index 000000000000..f0fb4a8a5c20
--- /dev/null
+++ b/app-office/gtg/files/0.5-mouse-cursor-fixes2.patch
@@ -0,0 +1,55 @@
+From 522f79e4ed58ea821dd939daa856a2d9dfd6f934 Mon Sep 17 00:00:00 2001
+From: Neui <neuisen@googlemail.com>
+Date: Sun, 2 May 2021 01:08:37 +0200
+Subject: [PATCH] Use Gdk.Cursor.new_from_name()
+
+Because GDK4 dropped new_for_display in favour of new_from_name.
+---
+ GTG/gtk/editor/taskview.py | 8 ++++----
+ GTG/plugins/unmaintained/tomboy/tomboy.py | 4 ++--
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/GTG/gtk/editor/taskview.py b/GTG/gtk/editor/taskview.py
+index 4b510499..1313ead8 100644
+--- a/GTG/gtk/editor/taskview.py
++++ b/GTG/gtk/editor/taskview.py
+@@ -597,8 +597,8 @@ class TaskView(Gtk.TextView):
+ tags = view.get_iter_at_location(x, y)[1].get_tags()
+
+ # Reset cursor and hover states
+- cursor = Gdk.Cursor.new_for_display(window.get_display(),
+- Gdk.CursorType.XTERM)
++ cursor = Gdk.Cursor.new_from_name(window.get_display(),
++ 'text')
+ window.set_cursor(cursor)
+
+ if self.hovered_tag:
+@@ -613,8 +613,8 @@ class TaskView(Gtk.TextView):
+ try:
+ tag = tags[0]
+ tag.set_hover()
+- cursor = Gdk.Cursor.new_for_display(window.get_display(),
+- Gdk.CursorType.HAND2)
++ cursor = Gdk.Cursor.new_from_name(window.get_display(),
++ 'pointer')
+ window.set_cursor(cursor)
+ self.hovered_tag = tag
+
+diff --git a/GTG/plugins/unmaintained/tomboy/tomboy.py b/GTG/plugins/unmaintained/tomboy/tomboy.py
+index 28c4226a..d81cd58c 100644
+--- a/GTG/plugins/unmaintained/tomboy/tomboy.py
++++ b/GTG/plugins/unmaintained/tomboy/tomboy.py
+@@ -337,8 +337,8 @@ class TomboyPlugin():
+ # cursor changes to a hand
+
+ def realize_callback(widget):
+- cursor = Gdk.Cursor.new_for_display(eventbox.window.get_display(),
+- Gdk.CursorType.HAND2)
++ cursor = Gdk.Cursor.new_from_name(eventbox.window.get_display(),
++ 'pointer')
+ eventbox.window.set_cursor(cursor)
+ eventbox.connect("realize", realize_callback)
+ return eventbox
+--
+2.30.0
+
diff --git a/app-office/gtg/files/0.5-mouse-cursor-fixes3.patch b/app-office/gtg/files/0.5-mouse-cursor-fixes3.patch
new file mode 100644
index 000000000000..d0c965027c1d
--- /dev/null
+++ b/app-office/gtg/files/0.5-mouse-cursor-fixes3.patch
@@ -0,0 +1,41 @@
+From c6fa415ed7b71197f27e946b8a854d74a8e92f84 Mon Sep 17 00:00:00 2001
+From: Neui <neuisen@googlemail.com>
+Date: Sun, 2 May 2021 01:12:08 +0200
+Subject: [PATCH] Prevent flicker cursor when moving over a tag
+
+When hovering over a tag in the task editor, it'll "flicker" between a
+normal text cursor and the pointer cursor. This fixes this by simply
+calling set_cursor just once.
+---
+ GTG/gtk/editor/taskview.py | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/GTG/gtk/editor/taskview.py b/GTG/gtk/editor/taskview.py
+index 1313ead8..9358b98f 100644
+--- a/GTG/gtk/editor/taskview.py
++++ b/GTG/gtk/editor/taskview.py
+@@ -599,7 +599,6 @@ class TaskView(Gtk.TextView):
+ # Reset cursor and hover states
+ cursor = Gdk.Cursor.new_from_name(window.get_display(),
+ 'text')
+- window.set_cursor(cursor)
+
+ if self.hovered_tag:
+ try:
+@@ -615,12 +614,12 @@ class TaskView(Gtk.TextView):
+ tag.set_hover()
+ cursor = Gdk.Cursor.new_from_name(window.get_display(),
+ 'pointer')
+- window.set_cursor(cursor)
+ self.hovered_tag = tag
+
+ except (AttributeError, IndexError):
+ # Not an interactive tag, or no tag at all
+ pass
++ window.set_cursor(cursor)
+
+
+ def do_populate_popup(self, popup) -> None:
+--
+2.30.0
+
diff --git a/app-office/gtg/gtg-0.5.ebuild b/app-office/gtg/gtg-0.5.ebuild
new file mode 100644
index 000000000000..90a0833c2d73
--- /dev/null
+++ b/app-office/gtg/gtg-0.5.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+PYTHON_COMPAT=( python3_{8..9} )
+PYTHON_REQ_USE="xml(+)"
+
+inherit meson python-single-r1 xdg
+
+DESCRIPTION="Personal organizer for the GNOME desktop environment"
+HOMEPAGE="https://wiki.gnome.org/Apps/GTG/"
+SRC_URI="https://github.com/getting-things-gnome/gtg/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ >=dev-python/liblarch-3.1.0[${PYTHON_USEDEP}]
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ ')
+ x11-libs/pango[introspection]
+ x11-libs/gdk-pixbuf[introspection]
+ x11-libs/gtk+:3[introspection]
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-util/itstool
+ >=sys-devel/gettext-0.19.8
+ test? ( $(python_gen_cond_dep '
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/cheetah3[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ ')
+ app-text/pdfjam
+ app-text/pdftk
+ dev-texlive/texlive-latex
+ )
+"
+
+PATCHES=(
+ # Fixes tests, and mouse cursor with some themes
+ "${FILESDIR}"/${PV}-mouse-cursor-fixes{1,2,3}.patch
+)
+
+src_install() {
+ meson_src_install
+ python_fix_shebang "${ED}"/usr/bin/gtg
+ python_optimize
+}
+
+src_test() {
+ sed -e "s|@VCS_TAG@|${PV}|" GTG/core/info.py.in > GTG/core/info.py || die
+ nosetests -v || die
+}