[nautilus] location-entry: Fix insert-text and delete-text signals
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] location-entry: Fix insert-text and delete-text signals
- Date: Wed, 20 Jul 2022 14:11:00 +0000 (UTC)
commit 60b0a8ae87075374d56b5e3a766a63e5bcdd39ee
Author: Corey Berla <corey berla me>
Date: Tue Jul 19 08:38:53 2022 -0700
location-entry: Fix insert-text and delete-text signals
The signals are connected to the NatuilusLocationEntry, which does
not emit these signals. Instead set it to the delegate of the
GTK_EDITABLE for the entry.
src/nautilus-location-entry.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/nautilus-location-entry.c b/src/nautilus-location-entry.c
index 6a5dc37fc..470bdeb6d 100644
--- a/src/nautilus-location-entry.c
+++ b/src/nautilus-location-entry.c
@@ -752,7 +752,7 @@ on_after_insert_text (GtkEditable *editable,
gint *position,
gpointer data)
{
- NautilusLocationEntry *self = NAUTILUS_LOCATION_ENTRY (editable);
+ NautilusLocationEntry *self = NAUTILUS_LOCATION_ENTRY (data);
after_text_change (self, TRUE);
}
@@ -763,7 +763,7 @@ on_after_delete_text (GtkEditable *editable,
gint end_pos,
gpointer data)
{
- NautilusLocationEntry *self = NAUTILUS_LOCATION_ENTRY (editable);
+ NautilusLocationEntry *self = NAUTILUS_LOCATION_ENTRY (data);
after_text_change (self, FALSE);
}
@@ -969,14 +969,14 @@ nautilus_location_entry_init (NautilusLocationEntry *entry)
g_signal_connect (controller, "key-pressed",
G_CALLBACK (nautilus_location_entry_key_pressed), NULL);
- g_signal_connect_after (entry,
+ g_signal_connect_after (gtk_editable_get_delegate (GTK_EDITABLE (entry)),
"insert-text",
G_CALLBACK (on_after_insert_text),
- NULL);
- g_signal_connect_after (entry,
+ entry);
+ g_signal_connect_after (gtk_editable_get_delegate (GTK_EDITABLE (entry)),
"delete-text",
G_CALLBACK (on_after_delete_text),
- NULL);
+ entry);
priv->completion = gtk_entry_completion_new ();
priv->completions_store = gtk_list_store_new (1, G_TYPE_STRING);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]