[gnome-text-editor] searchbar: remove cancellable from operations
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-text-editor] searchbar: remove cancellable from operations
- Date: Tue, 19 Oct 2021 21:47:11 +0000 (UTC)
commit d2e3da0df37a9bf7f5bd8d93c6f78e7c6e1fc54d
Author: Christian Hergert <chergert redhat com>
Date: Tue Oct 19 14:44:02 2021 -0700
searchbar: remove cancellable from operations
These end up getting cancelled internally by the search context which
causes issues for us. Instead, just drop them altogether since we don't
really end up using them.
src/editor-search-bar.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/editor-search-bar.c b/src/editor-search-bar.c
index c7e2700..1a04894 100644
--- a/src/editor-search-bar.c
+++ b/src/editor-search-bar.c
@@ -34,7 +34,6 @@ struct _EditorSearchBar
GtkSourceSearchContext *context;
GtkSourceSearchSettings *settings;
- GCancellable *cancellable;
GtkGrid *grid;
EditorSearchEntry *search_entry;
@@ -181,7 +180,7 @@ _editor_search_bar_move_next (EditorSearchBar *self,
gtk_source_search_context_forward_async (self->context,
&end,
- self->cancellable,
+ NULL,
editor_search_bar_move_next_forward_cb,
g_object_ref (self));
}
@@ -208,7 +207,7 @@ _editor_search_bar_move_previous (EditorSearchBar *self,
gtk_source_search_context_backward_async (self->context,
&begin,
- self->cancellable,
+ NULL,
/* XXX: fixme */
editor_search_bar_move_next_forward_cb,
g_object_ref (self));
@@ -354,7 +353,6 @@ editor_search_bar_finalize (GObject *object)
{
EditorSearchBar *self = (EditorSearchBar *)object;
- g_clear_object (&self->cancellable);
g_clear_object (&self->context);
g_clear_object (&self->settings);
@@ -638,7 +636,6 @@ _editor_search_bar_attach (EditorSearchBar *self,
gtk_editable_set_text (GTK_EDITABLE (self->search_entry), text);
}
- self->cancellable = g_cancellable_new ();
self->context = gtk_source_search_context_new (GTK_SOURCE_BUFFER (document), self->settings);
g_signal_connect_object (self->context,
@@ -677,9 +674,6 @@ _editor_search_bar_detach (EditorSearchBar *self)
g_clear_object (&self->context);
}
- g_cancellable_cancel (self->cancellable);
- g_clear_object (&self->cancellable);
-
self->hide_after_move = FALSE;
self->jump_back_on_hide = FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]