[gnome-builder: 1/2] hover: fix cancellable usage
- From: Günther Wagner <gwagner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder: 1/2] hover: fix cancellable usage
- Date: Fri, 12 Nov 2021 19:51:38 +0000 (UTC)
commit b610ad2ec7e4276fe3d4867077bbf2f94141289e
Author: Georg Vienna <georg vienna himbarsoft com>
Date: Fri Nov 12 16:28:13 2021 +0100
hover: fix cancellable usage
src/libide/sourceview/ide-hover-popover.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/sourceview/ide-hover-popover.c b/src/libide/sourceview/ide-hover-popover.c
index 53d418284..e4c054a1a 100644
--- a/src/libide/sourceview/ide-hover-popover.c
+++ b/src/libide/sourceview/ide-hover-popover.c
@@ -322,12 +322,19 @@ void
_ide_hover_popover_show (IdeHoverPopover *self)
{
GtkWidget *view;
+ g_autoptr(GCancellable) cancellable = NULL;
g_return_if_fail (IDE_IS_HOVER_POPOVER (self));
g_return_if_fail (self->context != NULL);
+ cancellable = g_steal_pointer(&self->cancellable);
+ self->cancellable = g_cancellable_new();
+ if (!g_cancellable_is_cancelled(cancellable))
+ {
+ g_cancellable_cancel(cancellable);
+ }
+
if (self->has_providers &&
- !g_cancellable_is_cancelled (self->cancellable) &&
(view = gtk_popover_get_relative_to (GTK_POPOVER (self))) &&
GTK_IS_TEXT_VIEW (view))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]