[gtksourceview] CompletionItem: emit the ::changed signal also in set_text()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] CompletionItem: emit the ::changed signal also in set_text()
- Date: Thu, 20 Oct 2016 07:35:39 +0000 (UTC)
commit 79df184bcdf1080b43bf9fee30899669a6047a2c
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Oct 20 09:31:18 2016 +0200
CompletionItem: emit the ::changed signal also in set_text()
It was not emitted because the other GtkSourceCompletion* classes don't
need to update the UI when the text changes (the text is read only when
activating the proposal).
But external code might have a different implementation that needs to
update the UI when the text changes, for example if the text is shown in
the GtkTextBuffer in gray, see:
https://bugzilla.gnome.org/show_bug.cgi?id=706535
gtksourceview/gtksourcecompletionitem.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletionitem.c b/gtksourceview/gtksourcecompletionitem.c
index c8f0be4..2fd8576 100644
--- a/gtksourceview/gtksourcecompletionitem.c
+++ b/gtksourceview/gtksourcecompletionitem.c
@@ -570,6 +570,7 @@ gtk_source_completion_item_set_text (GtkSourceCompletionItem *item,
g_free (item->priv->text);
item->priv->text = g_strdup (text);
+ emit_changed (item);
g_object_notify (G_OBJECT (item), "text");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]