[gtk+/gtk-3-22] EntryBuffer: Don't generate changed events when input is truncated
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] EntryBuffer: Don't generate changed events when input is truncated
- Date: Tue, 16 May 2017 21:06:24 +0000 (UTC)
commit 4d1c0317ccb2ff2b3afe73b3a09cfaa90a60c7e8
Author: Robert Ancell <robert ancell canonical com>
Date: Mon May 15 17:03:36 2017 +1200
EntryBuffer: Don't generate changed events when input is truncated
gtk/gtkentrybuffer.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkentrybuffer.c b/gtk/gtkentrybuffer.c
index 4594a43..9c36a55 100644
--- a/gtk/gtkentrybuffer.c
+++ b/gtk/gtkentrybuffer.c
@@ -661,6 +661,9 @@ gtk_entry_buffer_insert_text (GtkEntryBuffer *buffer,
n_chars -= (length + n_chars) - pv->max_length;
}
+ if (n_chars == 0)
+ return 0;
+
klass = GTK_ENTRY_BUFFER_GET_CLASS (buffer);
g_return_val_if_fail (klass->insert_text != NULL, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]