[gtk+/gtk-2-24] GailEntry: remove idle if cell editing is canceled



commit cb3f20ecbe3698d4207f9e04935739b709d87fe8
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Feb 17 19:06:19 2011 -0500

    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 |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/modules/other/gail/gailentry.c b/modules/other/gail/gailentry.c
index 9da1f45..7f7590e 100644
--- a/modules/other/gail/gailentry.c
+++ b/modules/other/gail/gailentry.c
@@ -294,6 +294,14 @@ gail_entry_real_notify_gtk (GObject		*obj,
     {
       text_setup (entry, gtk_entry);
     }
+  else if (strcmp (pspec->name, "editing-canceled") == 0)
+    {
+      if (entry->insert_idle_handler)
+        {
+          g_source_remove (entry->insert_idle_handler);
+          entry->insert_idle_handler = 0;
+        }
+    }
   else
     GAIL_WIDGET_CLASS (gail_entry_parent_class)->notify_gtk (obj, pspec);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]