aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/ChangeLog10
-rw-r--r--widgets/table/e-cell-combo.c3
-rw-r--r--widgets/table/e-cell-text.c3
-rw-r--r--widgets/table/e-table-click-to-add.c10
4 files changed, 25 insertions, 1 deletions
diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog
index c8ee9919c1..86d9f28ee7 100644
--- a/widgets/table/ChangeLog
+++ b/widgets/table/ChangeLog
@@ -1,3 +1,13 @@
+2007-11-05 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #255051
+
+ * e-cell-combo.c: (e_cell_combo_key_press):
+ * e-cell-text.c: (ect_event):
+ Pass Escape event to parent, if there is no action to do with it.
+ * e-table-click-to-add.c: (etcta_event): Drop changes when pressed
+ Escape and go back to default line with text "Click to add...".
+
2007-11-02 Damien Carbery <damien.carbery@sun.com>
** Fixes bug #492058
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index bd13848148..764a2c2031 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -628,6 +628,9 @@ e_cell_combo_key_press (GtkWidget *popup_window,
&& event->keyval != GDK_3270_Enter)
return FALSE;
+ if (event->keyval == GDK_Escape && (!ecc->popup_window||!GTK_WIDGET_VISIBLE (ecc->popup_window)))
+ return FALSE;
+
gtk_grab_remove (ecc->popup_window);
gdk_pointer_ungrab (event->time);
gdk_keyboard_ungrab (event->time);
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index f89e34ec0b..9c548b620f 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -994,8 +994,9 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
}
if (event->key.keyval == GDK_Escape){
+ /* if not changed, then pass this even to parent */
+ return_val = text_view->edit != NULL && text_view->edit->text && text_view->edit->old_text && 0 != strcmp (text_view->edit->text, text_view->edit->old_text);
ect_cancel_edit (text_view);
- return_val = TRUE;
break;
}
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index 718b3e3e3e..572d79acc1 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -433,6 +433,16 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
break;
default:
return FALSE;
+ case GDK_Escape:
+ if (etcta->row) {
+ e_table_item_leave_edit (E_TABLE_ITEM (etcta->row));
+ etcta_drop_one (etcta);
+ gtk_object_destroy(GTK_OBJECT (etcta->row));
+ etcta->row = NULL;
+ create_rect_and_text (etcta);
+ e_canvas_item_move_absolute (etcta->text, 3, 3);
+ }
+ break;
}
break;