From f3687a9490a6b8646c75abeccc363e3c39ca21e2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 17 Feb 2011 19:06:19 -0500 Subject: [PATCH] GailEntry: remove idle if cell editing is canceled This avoids warnings when cell editing is interrupted e.g. by adding or removing a row. --- modules/other/gail/gailentry.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/other/gail/gailentry.c b/modules/other/gail/gailentry.c index f4a537d340..5f239c82ff 100644 --- a/modules/other/gail/gailentry.c +++ b/modules/other/gail/gailentry.c @@ -296,6 +296,18 @@ gail_entry_real_notify_gtk (GObject *obj, { text_setup (entry, gtk_entry); } + else if (strcmp (pspec->name, "editing-canceled") == 0) + { + gboolean canceled; + + g_object_get (obj, "editing-canceled", &canceled, NULL); + + if (entry->insert_idle_handler && canceled) + { + g_source_remove (entry->insert_idle_handler); + entry->insert_idle_handler = 0; + } + } else GAIL_WIDGET_CLASS (gail_entry_parent_class)->notify_gtk (obj, pspec); }