]> Pileus Git - ~andy/gtk/commitdiff
remove the completion timeout when the user pressed on Enter/ESC. Fixes
authorKristian Rietveld <kris@gtk.org>
Mon, 20 Oct 2003 21:28:38 +0000 (21:28 +0000)
committerKristian Rietveld <kristian@src.gnome.org>
Mon, 20 Oct 2003 21:28:38 +0000 (21:28 +0000)
Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>

* gtk/gtkentry.c (gtk_entry_key_press): remove the completion
timeout when the user pressed on Enter/ESC. Fixes the bug where the
completion popup popped up after the user pressed on Enter (which is
just weird). Reported by the Epiphany people (all of them).

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkentry.c

index 4ec6b36843bef8541a39760c68e81497a1f35f16..9974cde183298dc6bd000fa9b2445495319c44c1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkentry.c (gtk_entry_key_press): remove the completion
+       timeout when the user pressed on Enter/ESC. Fixes the bug where the
+       completion popup popped up after the user pressed on Enter (which is
+       just weird). Reported by the Epiphany people (all of them).
+
 Mon Oct 20 20:27:22 2003  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        Add support for OS X like sliding of toolbar items during drag and
index 4ec6b36843bef8541a39760c68e81497a1f35f16..9974cde183298dc6bd000fa9b2445495319c44c1 100644 (file)
@@ -1,3 +1,10 @@
+Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkentry.c (gtk_entry_key_press): remove the completion
+       timeout when the user pressed on Enter/ESC. Fixes the bug where the
+       completion popup popped up after the user pressed on Enter (which is
+       just weird). Reported by the Epiphany people (all of them).
+
 Mon Oct 20 20:27:22 2003  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        Add support for OS X like sliding of toolbar items during drag and
index 4ec6b36843bef8541a39760c68e81497a1f35f16..9974cde183298dc6bd000fa9b2445495319c44c1 100644 (file)
@@ -1,3 +1,10 @@
+Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkentry.c (gtk_entry_key_press): remove the completion
+       timeout when the user pressed on Enter/ESC. Fixes the bug where the
+       completion popup popped up after the user pressed on Enter (which is
+       just weird). Reported by the Epiphany people (all of them).
+
 Mon Oct 20 20:27:22 2003  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        Add support for OS X like sliding of toolbar items during drag and
index 4ec6b36843bef8541a39760c68e81497a1f35f16..9974cde183298dc6bd000fa9b2445495319c44c1 100644 (file)
@@ -1,3 +1,10 @@
+Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkentry.c (gtk_entry_key_press): remove the completion
+       timeout when the user pressed on Enter/ESC. Fixes the bug where the
+       completion popup popped up after the user pressed on Enter (which is
+       just weird). Reported by the Epiphany people (all of them).
+
 Mon Oct 20 20:27:22 2003  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        Add support for OS X like sliding of toolbar items during drag and
index 4ec6b36843bef8541a39760c68e81497a1f35f16..9974cde183298dc6bd000fa9b2445495319c44c1 100644 (file)
@@ -1,3 +1,10 @@
+Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkentry.c (gtk_entry_key_press): remove the completion
+       timeout when the user pressed on Enter/ESC. Fixes the bug where the
+       completion popup popped up after the user pressed on Enter (which is
+       just weird). Reported by the Epiphany people (all of them).
+
 Mon Oct 20 20:27:22 2003  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        Add support for OS X like sliding of toolbar items during drag and
index 7576d72872a1790e134d5e3e3d66286c37163347..3e97af9f82abc95e5de4e256bb92071c71d11d2b 100644 (file)
@@ -1622,6 +1622,18 @@ gtk_entry_key_press (GtkWidget   *widget,
        }
     }
 
+  if (event->keyval == GDK_Return || event->keyval == GDK_ISO_Enter
+      || event->keyval == GDK_Escape)
+    {
+      GtkEntryCompletion *completion = gtk_entry_get_completion (entry);
+
+      if (completion && completion->priv->completion_timeout)
+        {
+          g_source_remove (completion->priv->completion_timeout);
+          completion->priv->completion_timeout = 0;
+        }
+    }
+
   if (GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event))
     /* Activate key bindings
      */