cancel editing (ie. don't accept changes) when the entry loses focus.

2006-12-10  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_focus_out_event):
	cancel editing (ie. don't accept changes) when the entry loses
	focus. (Fixes #164494, reported by Chris Rouch).
This commit is contained in:
Kristian Rietveld 2006-12-10 20:52:05 +00:00 committed by Kristian Rietveld
parent 51945b883e
commit 1cd7347a54
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2006-12-10 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_focus_out_event):
cancel editing (ie. don't accept changes) when the entry loses
focus. (Fixes #164494, reported by Chris Rouch).
2006-12-10 Matthias Clasen <mclasen@redhat.com>
* configure.in: Correct a misapplied patch.

View File

@ -1805,7 +1805,9 @@ gtk_cell_renderer_text_focus_out_event (GtkWidget *entry,
if (priv->in_entry_menu)
return FALSE;
gtk_cell_renderer_text_editing_done (GTK_CELL_EDITABLE (entry), data);
GTK_ENTRY (entry)->editing_canceled = TRUE;
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (entry));
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (entry));
/* entry needs focus-out-event */
return FALSE;