summaryrefslogtreecommitdiff
path: root/gtk/gtkcellarea.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2011-10-03 19:32:00 -0400
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2011-10-04 14:15:21 -0400
commit00d79fdb61d317f9909be274f64c7662f71de80e (patch)
treea8d3d9fa61551a19e7e38c1aedb991b49641aa6f /gtk/gtkcellarea.c
parentb928664471e13505cfcd923a80266e933d0ad91b (diff)
downloadgtk+-00d79fdb61d317f9909be274f64c7662f71de80e.tar.gz
Fixed gtk_cell_area_stop_editing() to properly notify when editing is not canceled
This fixes bug 653289, in gtk+-2 gtk_tree_view_stop_editing() was previously responsible for notifying with gtk_cell_editable_editing_done(), this detail was missed when porting the cell renderer management to GtkCellArea.
Diffstat (limited to 'gtk/gtkcellarea.c')
-rw-r--r--gtk/gtkcellarea.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/gtk/gtkcellarea.c b/gtk/gtkcellarea.c
index 590d492644..9764448cba 100644
--- a/gtk/gtkcellarea.c
+++ b/gtk/gtkcellarea.c
@@ -3464,11 +3464,14 @@ gtk_cell_area_activate_cell (GtkCellArea *area,
* @area: a #GtkCellArea
* @canceled: whether editing was canceled.
*
- * Explicitly stops the editing of the currently
- * edited cell (see gtk_cell_area_get_edited_cell()).
+ * Explicitly stops the editing of the currently edited cell.
*
- * If @canceled is %TRUE, the cell renderer will emit
- * the ::editing-canceled signal.
+ * If @canceled is %TRUE, the currently edited cell renderer
+ * will emit the ::editing-canceled signal, otherwise the
+ * the ::editing-done signal will be emitted on the current
+ * edit widget.
+ *
+ * See gtk_cell_area_get_edited_cell() and gtk_cell_area_get_edit_widget().
*
* Since: 3.0
*/
@@ -3490,6 +3493,13 @@ gtk_cell_area_stop_editing (GtkCellArea *area,
/* Stop editing of the cell renderer */
gtk_cell_renderer_stop_editing (priv->edited_cell, canceled);
+ /* When editing is explicitly halted either
+ * the "editing-canceled" signal is emitted on the cell
+ * renderer or the "editing-done" signal on the GtkCellEditable widget
+ */
+ if (!canceled)
+ gtk_cell_editable_editing_done (edit_widget);
+
/* Remove any references to the editable widget */
gtk_cell_area_set_edited_cell (area, NULL);
gtk_cell_area_set_edit_widget (area, NULL);