aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-07-30 04:06:54 +0800
committerChris Lahey <clahey@src.gnome.org>2000-07-30 04:06:54 +0800
commit08f83c6fcf6fb24a12553efa2410d6f389ee7911 (patch)
tree6ea1d4e6cccced365d6eeb1eb55a8051d58ad4c2
parent99fde85896e0370f4020c2e91ec47f375dcb8c7b (diff)
downloadgsoc2013-evolution-08f83c6fcf6fb24a12553efa2410d6f389ee7911.tar.gz
gsoc2013-evolution-08f83c6fcf6fb24a12553efa2410d6f389ee7911.tar.zst
gsoc2013-evolution-08f83c6fcf6fb24a12553efa2410d6f389ee7911.zip
Made enter key destroy and recreate the ETableItem.
2000-07-29 Christopher James Lahey <clahey@helixcode.com> * e-table-click-to-add.c: Made enter key destroy and recreate the ETableItem. * e-table-item.c: Grab focus when person clicks even if cursor isn't changing. svn path=/trunk/; revision=4416
-rw-r--r--widgets/e-table/ChangeLog8
-rw-r--r--widgets/e-table/e-table-click-to-add.c14
-rw-r--r--widgets/e-table/e-table-item.c2
-rw-r--r--widgets/table/e-table-click-to-add.c14
-rw-r--r--widgets/table/e-table-item.c2
5 files changed, 38 insertions, 2 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog
index a206b42c98..08775273c7 100644
--- a/widgets/e-table/ChangeLog
+++ b/widgets/e-table/ChangeLog
@@ -1,3 +1,11 @@
+2000-07-29 Christopher James Lahey <clahey@helixcode.com>
+
+ * e-table-click-to-add.c: Made enter key destroy and recreate the
+ ETableItem.
+
+ * e-table-item.c: Grab focus when person clicks even if cursor
+ isn't changing.
+
2000-07-28 Dan Winship <danw@helixcode.com>
* e-table-header.c (eth_destroy): Remove the idle handler before
diff --git a/widgets/e-table/e-table-click-to-add.c b/widgets/e-table/e-table-click-to-add.c
index ed22b5117c..d111df1cd9 100644
--- a/widgets/e-table/e-table-click-to-add.c
+++ b/widgets/e-table/e-table-click-to-add.c
@@ -319,15 +319,27 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_3270_Enter:
if (etcta->row) {
ETableModel *one;
- e_table_selection_model_clear(etcta->selection);
e_table_one_commit(E_TABLE_ONE(etcta->one));
etcta_drop_one (etcta);
+ gtk_object_destroy(GTK_OBJECT(etcta->row));
+ etcta->row = NULL;
one = e_table_one_new(etcta->model);
etcta_add_one (etcta, one);
gtk_object_unref(GTK_OBJECT(one));
+ e_table_selection_model_clear(etcta->selection);
+
+ etcta->row = gnome_canvas_item_new(GNOME_CANVAS_GROUP(item),
+ e_table_item_get_type(),
+ "ETableHeader", etcta->eth,
+ "ETableModel", etcta->one,
+ "minimum_width", etcta->width,
+ "drawgrid", TRUE,
+ "table_selection_model", etcta->selection,
+ NULL);
+
e_table_item_set_cursor(E_TABLE_ITEM(etcta->row), 0, 0);
}
break;
diff --git a/widgets/e-table/e-table-item.c b/widgets/e-table/e-table-item.c
index a1afb2c3be..4eac94ed41 100644
--- a/widgets/e-table/e-table-item.c
+++ b/widgets/e-table/e-table-item.c
@@ -1361,6 +1361,8 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
gint ctrled = e->button.state & GDK_CONTROL_MASK;
gint cursor_row, cursor_col;
+ e_canvas_item_grab_focus(GNOME_CANVAS_ITEM(eti));
+
switch (e->button.button) {
case 1: /* Fall through. */
case 2:
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index ed22b5117c..d111df1cd9 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -319,15 +319,27 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_3270_Enter:
if (etcta->row) {
ETableModel *one;
- e_table_selection_model_clear(etcta->selection);
e_table_one_commit(E_TABLE_ONE(etcta->one));
etcta_drop_one (etcta);
+ gtk_object_destroy(GTK_OBJECT(etcta->row));
+ etcta->row = NULL;
one = e_table_one_new(etcta->model);
etcta_add_one (etcta, one);
gtk_object_unref(GTK_OBJECT(one));
+ e_table_selection_model_clear(etcta->selection);
+
+ etcta->row = gnome_canvas_item_new(GNOME_CANVAS_GROUP(item),
+ e_table_item_get_type(),
+ "ETableHeader", etcta->eth,
+ "ETableModel", etcta->one,
+ "minimum_width", etcta->width,
+ "drawgrid", TRUE,
+ "table_selection_model", etcta->selection,
+ NULL);
+
e_table_item_set_cursor(E_TABLE_ITEM(etcta->row), 0, 0);
}
break;
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index a1afb2c3be..4eac94ed41 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -1361,6 +1361,8 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
gint ctrled = e->button.state & GDK_CONTROL_MASK;
gint cursor_row, cursor_col;
+ e_canvas_item_grab_focus(GNOME_CANVAS_ITEM(eti));
+
switch (e->button.button) {
case 1: /* Fall through. */
case 2: